Frapper
1.0a
|
Class representing a view for displaying and editing parameters of nodes. More...
#include <ParameterPanel.h>
Public Slots | |
void | showParameters (Node *node) |
Displays the parameters and values for the given node. | |
void | updateParameters (bool objectsSelected) |
Slot that is called when the selection in the scene model has changed. | |
Signals | |
void | objectNameChangeRequested (const QString &oldName, const QString &newName) |
Signal that is emitted when the name of the currently edited node should change. | |
void | parameterChangeRequested (const QString &objectName, const QString ¶meterName, const QVariant &value) |
Signal that is emitted when the value of the parameter with the given name of the object with the given name should be changed to the given value. | |
Public Member Functions | |
ParameterPanel (QWidget *parent=0, Qt::WindowFlags flags=0) | |
Constructor of the ParameterPanel class. | |
virtual | ~ParameterPanel () |
Destructor of the ParameterPanel class. | |
virtual void | fillToolBars (QToolBar *mainToolBar, QToolBar *panelToolBar) |
Fills the given tool bars in a panel frame with actions for the panel. | |
![]() | |
ViewPanel (Type viewPanelType, QWidget *parent=0, Qt::WindowFlags flags=0) | |
Constructor of the ViewPanel class. | |
Type | getViewPanelType () |
Returns the type of the view panel. | |
![]() | |
Panel (QWidget *parent=0, Qt::WindowFlags flags=0) | |
Constructor of the Panel class. | |
virtual | ~Panel () |
Destructor of the Panel class. | |
QMap< QString, QString > | getPanelParameters () |
Gets the panel parameters. For load and save functionality. | |
virtual void | setPanelParameters (const QMap< QString, QString > ¶meterMap) |
Sets the panel parameters. For load and save functionality. | |
virtual void | registerControl (NodeModel *nodeModel, SceneModel *sceneModel) |
Connects the panel with the scene. | |
Protected Member Functions | |
virtual void | timerEvent (QTimerEvent *event) |
Event handler that reacts to timer events. | |
virtual bool | eventFilter (QObject *object, QEvent *event) |
Event filter, allows to disable value changes caused by the mouse wheel. | |
Private Slots | |
void | on_m_nodeNameEdit_editingFinished () |
Requests a name change for the currently edited node and displays the successfully changed name in the node name edit widget. | |
void | on_m_searchEdit_textChanged (const QString &text) |
Starts the timer that launches the parameter filtering search after a specific delay. | |
void | on_ui_resetSearchAction_triggered (bool checked=false) |
Cancels a running parameter search and resets the parameter search settings for the currently edited node. | |
void | loadTabPage (int index) |
Fills the tab page of the given index with widgets for editing the parameters that the tab page represents. | |
void | labelContextMenuRequested (const QPoint &position) |
Opens a context menu at the given position with actions for the label. | |
void | checkBoxToggled (bool checked) |
Applies an edited boolean value to the parameter represented by the checkbox widget calling this slot. | |
void | spinBoxEditingFinished () |
Applies an edited numeric value to the parameter represented by the spinbox widget calling this slot. | |
void | sliderValueChanged () |
Applies an edited numeric value to the parameter represented by the slider widget calling this slot. | |
void | doubleSpinBoxEditingFinished () |
Applies an edited floating point numeric value to the parameter represented by the spinbox widget calling this slot. | |
void | doubleSliderValueChanged () |
Applies an edited floating point numeric value to the parameter represented by the slider widget calling this slot. | |
void | lineEditEditingFinished () |
Applies an edited string value to the parameter represented by the line edit widget calling this slot. | |
void | browseButtonClicked () |
Displays a dialog for selecting a file for the edited parameter. | |
void | reloadButtonClicked () |
Reloads the file that the edited parameter represents. | |
void | selectColor () |
Displays a dialog for selecting a color for the edited parameter. | |
void | comboBoxIndexChanged (int index) |
Applies a changed combo box item selection to the edited parameter. | |
void | commandButtonClicked () |
Requests the execution of the command represented by the clicked button. | |
void | updateBooleanWidget () |
Updates the widget showing a boolean parameter's value. | |
void | updateIntegerWidgets () |
Updates the widgets showing an integer number parameter's value. | |
void | updateIntegerWidgets (int index) |
Updates the widgets showing the component with the given index of an integer number parameter. | |
void | updateUnsignedIntegerWidgets () |
Updates the widgets showing an unsigned integer number parameter's value. | |
void | updateUnsignedIntegerWidgets (int index) |
Updates the widgets showing the component with the given index of an unsigned integer number parameter. | |
void | updateFloatingPointWidgets () |
Updates the widgets showing a floating point number parameter's value. | |
void | updateFloatingPointWidgets (int index) |
Updates the widgets showing the component with the given index of a floating point number parameter. | |
void | updateStringWidget () |
Updates the widget showing a string parameter's value. | |
void | updateFilenameWidgets () |
Updates the widgets showing a filename parameter's value. | |
void | updateColorWidget () |
Updates the widget showing a color parameter's value. | |
void | updateEnumerationWidget () |
Updates the widget showing an enumeration parameter's value. | |
void | updateTextInfoWidget () |
Updates the label showing the text info parameter's value. | |
void | updateImageWidget () |
Updates the label showing info about the image parameter's image. | |
Private Member Functions | |
void | activateCustomContextMenu (QLabel *label) |
Activates the custom context menu for the given label widget. | |
void | grayOut (QWidget *widget) |
Updates the given widget's palette so that it is painted with a Window color background instead of a Base color background. | |
void | clear () |
Removes all widgets from the layout. | |
void | addRows (ParameterGroup *parameterGroup, QFormLayout *formLayout) |
Adds widgets for editing the parameters of the given parameter group to the given form layout. | |
void | addRows (Parameter *parameter, QFormLayout *formLayout) |
Adds widgets for editing the given parameter to the given form layout. | |
QWidget * | createBooleanWidget (Parameter *parameter) |
Creates a widget for editing a boolean parameter. | |
QLayout * | createIntegerLayout (NumberParameter *numberParameter, int index=0) |
Creates a layout with widgets for editing editing an integer parameter. | |
QLayout * | createUnsignedIntegerLayout (NumberParameter *numberParameter, int index=0) |
Creates a layout with widgets for editing an unsigned integer parameter. | |
QLayout * | createFloatingPointLayout (NumberParameter *numberParameter, int index=0) |
Creates a layout with widgets for editing a floating point parameter. | |
QWidget * | createStringWidget (Parameter *parameter) |
Creates a widget for editing a string parameter or displaying a read-only parameter's value. | |
QLayout * | createFilenameLayout (FilenameParameter *filenameParameter) |
Creates a layout with widgets for editing a filename parameter. | |
QWidget * | createColorWidget (Parameter *parameter) |
Creates a widget for editing a color parameter. | |
QWidget * | createEnumerationWidget (EnumerationParameter *enumerationParameter) |
Creates a widget for editing an enumeration parameter. | |
QWidget * | createTextInfoWidget (Parameter *parameter) |
Creates a label widget for displaying the text info contained in the given parameter. | |
QWidget * | createGenericWidget (Parameter *parameter) |
Creates a label widget for displaying the type info contained in the given parameter. | |
QWidget * | createCommandWidget (Parameter *parameter) |
Creates a button widget for executing the command represented by the given parameter. | |
QWidget * | createImageWidget (Parameter *parameter) |
Creates a widget displaying information about the image represented by the given parameter. | |
QLayout * | createVectorLayout (Parameter *parameter) |
Creates a layout with widgets for editing a parameter that stores several values of a specific type. | |
void | requestParameterChange (const QString &name, const QVariant &value) |
Notifies connected objects that a parameter of the currently edited object should be changed. | |
void | filterParameters () |
Filters the parameters displayed in the panel by the search text entered in the search edit widget. | |
QWidget * | createPluginWidget (Parameter *parameter) |
Creates a plugin widget. | |
Private Attributes | |
Node * | m_node |
The node for which parameters are displayed in the view. | |
QObject * | m_editedWidget |
The widget that is currently being edited which causes the requestParameterChange() function to be called. | |
QMultiMap< QString, QWidget * > | m_widgetMap |
A map with parameter names as keys and pointers to editing widgets as values. | |
QLabel * | m_nodeTypeLabel |
The label displaying the type of the currently edited node. | |
QAction * | m_nodeTypeLabelAction |
The action by which the label displaying the type of the currently edited node in the tool bar can be accessed. | |
QLineEdit * | m_nodeNameEdit |
The line edit for editing the name of the currently edited node. | |
QAction * | m_nodeNameEditAction |
The action by which the line edit for editing the name of the currently edited node in the tool bar can be accessed. | |
QLineEdit * | m_searchEdit |
The line edit for editing the string for a parameter search. | |
int | m_searchTimer |
The ID of the timer that is (re-)started each time the search text in the search edit widget is changed. | |
Additional Inherited Members | |
![]() | |
enum | Type { T_Documentation, T_Viewport, T_NetworkEditor, T_HierarchyEditor, T_ParameterEditor, T_CurveEditor, T_Timeline, T_PluginPanel, T_PainterPanel, T_NumTypes } |
Nested enumeration for the different types of view panels. More... | |
![]() | |
static QString | getTypeName (Type panelType) |
Returns the name of the given panel type. | |
static QString | getTypeIconName (Type panelType) |
Returns the icon name for the given panel type. | |
![]() | |
QMap< QString, QString > | m_parameterMap |
Map with default values. For load and save functionality. | |
Class representing a view for displaying and editing parameters of nodes.
Frapper::ParameterPanel::ParameterPanel | ( | QWidget * | parent = 0 , |
Qt::WindowFlags | flags = 0 |
||
) |
Constructor of the ParameterPanel class.
Constructors and Destructors.
parent | The parent widget the created instance will be a child of. |
flags | Extra widget options. |
Constructor of the ParameterPanel class.
parent | The parent widget the created instance will be a child of. |
flags | Extra widget options. |
|
virtual |
Destructor of the ParameterPanel class.
Destructor of the NetworkPanel class.
Defined virtual to guarantee that the destructor of a derived class will be called if the instance of the derived class is saved in a variable of its parent class type.
|
slot |
Displays the parameters and values for the given node.
Public Slots.
node | The node whose parameters to display in the parameter view. |
Displays the parameters and values for the given node.
node | The node whose parameters to display in the parameter view. |
|
slot |
Slot that is called when the selection in the scene model has changed.
objectsSelected | Flag that states whether objects in the scene are selected. |
|
virtual |
Fills the given tool bars in a panel frame with actions for the panel.
Public Functions.
mainToolBar | The main tool bar to fill with actions. |
panelToolBar | The panel tool bar to fill with actions. |
Fills the given tool bars in a panel frame with actions for the panel.
mainToolBar | The main tool bar to fill with actions. |
panelToolBar | The panel tool bar to fill with actions. |
Reimplemented from Frapper::Panel.
|
signal |
Signal that is emitted when the name of the currently edited node should change.
oldName | The name of the object to rename. |
newName | The new name for the object to rename. |
|
signal |
Signal that is emitted when the value of the parameter with the given name of the object with the given name should be changed to the given value.
objectName | The name of the object for which to change the parameter. |
parameterName | The name of the parameter to change. |
value | The new value for the parameter. |
|
protectedvirtual |
Event handler that reacts to timer events.
Protected Events.
event | The description of the timer event. |
Event handler that reacts to timer events.
event | The description of the timer event. |
|
protectedvirtual |
Event filter, allows to disable value changes caused by the mouse wheel.
object | the object with the installed event filter. |
event | the description of the event. |
|
privateslot |
Requests a name change for the currently edited node and displays the successfully changed name in the node name edit widget.
Private Slots.
Is called when editing the node's name has finished.
Requests a name change for the currently edited node and displays the successfully changed name in the node name edit widget.
Is called when editing the node's name has finished.
|
privateslot |
Starts the timer that launches the parameter filtering search after a specific delay.
Is called when the text in the search edit widget has changed.
text | The text that has been entered in the search edit widget. |
|
privateslot |
Cancels a running parameter search and resets the parameter search settings for the currently edited node.
Is called when the reset search action has been triggered.
checked | The state of the action (unused). |
|
privateslot |
Fills the tab page of the given index with widgets for editing the parameters that the tab page represents.
Is called when the index of the current tab in a tab widget has changed.
index | The index of the tab page to fill with editing widgets. |
|
privateslot |
Opens a context menu at the given position with actions for the label.
Is called when a context menu is requested for a label widget.
position | The position at which to open the context menu. |
|
privateslot |
Applies an edited boolean value to the parameter represented by the checkbox widget calling this slot.
Private Slots for updating parameter values when widgets change.
Is called when a checkbox representing a parameter has been toggled.
checked | The state of the check box. |
Applies an edited boolean value to the parameter represented by the checkbox widget calling this slot.
Is called when a checkbox representing a parameter has been toggled.
checked | The state of the check box. |
|
privateslot |
Applies an edited numeric value to the parameter represented by the spinbox widget calling this slot.
Is called when editing the value of a spin box representing a parameter has finished.
|
privateslot |
Applies an edited numeric value to the parameter represented by the slider widget calling this slot.
Is called when the value of a slider representing a parameter has changed.
|
privateslot |
Applies an edited floating point numeric value to the parameter represented by the spinbox widget calling this slot.
Is called when editing the value of a double spin box representing a parameter has finished.
|
privateslot |
Applies an edited floating point numeric value to the parameter represented by the slider widget calling this slot.
Is called when the value of a double slider representing a parameter has changed.
|
privateslot |
Applies an edited string value to the parameter represented by the line edit widget calling this slot.
Is called when editing the text of a line edit widget representing a parameter has finished.
|
privateslot |
Displays a dialog for selecting a file for the edited parameter.
Is called when the browse button for a filename parameter has been clicked.
|
privateslot |
Reloads the file that the edited parameter represents.
Is called when the reload button for a filename parameter has been clicked.
|
privateslot |
Displays a dialog for selecting a color for the edited parameter.
Is called when the color button representing a color parameter has been clicked.
|
privateslot |
Applies a changed combo box item selection to the edited parameter.
Is called when the index of the currently selected item of a combo box representing an enumeration parameter has changed.
index | The index of the item currently selected in the combo box. |
|
privateslot |
Requests the execution of the command represented by the clicked button.
Is called when the button representing a command parameter is clicked.
|
privateslot |
Updates the widget showing a boolean parameter's value.
Private Slots for updating widgets when parameter values change.
Is called when the value of a boolean parameter has changed.
Updates the widget showing a boolean parameter's value.
Is called when the value of a boolean parameter has changed.
|
privateslot |
Updates the widgets showing an integer number parameter's value.
Is called when the value of an integer number parameter has changed.
|
privateslot |
Updates the widgets showing the component with the given index of an integer number parameter.
Is called when one of the values of an integer number parameter that contains a list of values has changed.
index | The index of the value that has changed in the list of integer values. |
|
privateslot |
Updates the widgets showing an unsigned integer number parameter's value.
Is called when the value of an unsigned integer number parameter has changed.
|
privateslot |
Updates the widgets showing the component with the given index of an unsigned integer number parameter.
Is called when one of the values of an unsigned integer number parameter that contains a list of values has changed.
index | The index of the value that has changed in the list of unsigned integer values. |
|
privateslot |
Updates the widgets showing a floating point number parameter's value.
Is called when the value of a floating point number parameter has changed.
|
privateslot |
Updates the widgets showing the component with the given index of a floating point number parameter.
Is called when one of the values of a floating point number parameter that contains a list of values has changed.
index | The index of the value that has changed in the list of floating point values. |
|
privateslot |
Updates the widget showing a string parameter's value.
Is called when the value of a string parameter has changed.
|
privateslot |
Updates the widgets showing a filename parameter's value.
Is called when the value of a filename parameter has changed.
|
privateslot |
Updates the widget showing a color parameter's value.
Is called when the value of a color parameter has changed.
|
privateslot |
Updates the widget showing an enumeration parameter's value.
Is called when the value of an enumeration parameter has changed.
|
privateslot |
Updates the label showing the text info parameter's value.
Updates the label showing a text info parameter's value.
Is called when the value of a text info parameter has changed.
|
privateslot |
Updates the label showing info about the image parameter's image.
Is called when the value of an image parameter has changed.
|
private |
Activates the custom context menu for the given label widget.
Private Functions.
label | The label widget to activate a custom context menu for. |
Activates the custom context menu for the given label widget.
label | The label widget to activate a custom context menu for. |
|
private |
Updates the given widget's palette so that it is painted with a Window color background instead of a Base color background.
widget | The widget to gray out. |
|
private |
Removes all widgets from the layout.
|
private |
Adds widgets for editing the parameters of the given parameter group to the given form layout.
Adds widgets for editing the parameters of the given parameter group to the form layout.
parameterGroup | The parameter group to create editing widgets for. |
formLayout | The form layout to add editing widgets to. |
|
private |
Adds widgets for editing the given parameter to the given form layout.
Adds widgets for editing the given parameter to the form layout.
parameter | The parameter to create editing widgets for. |
formLayout | The form layout to add editing widgets to. |
|
private |
Creates a widget for editing a boolean parameter.
parameter | The boolean parameter to create an editing widget for. |
parameter | The parameter to create an editing widget for. |
|
private |
Creates a layout with widgets for editing editing an integer parameter.
Creates a layout with widgets for editing an integer parameter.
numberParameter | The number parameter to create an editing widget for. |
index | The index of the value to edit (for parameters that contain lists of values). |
numberParameter | The number parameter to create an editing widget for. |
index | The index of the value to edit (for parameters that contain lists of values). |
|
private |
Creates a layout with widgets for editing an unsigned integer parameter.
numberParameter | The number parameter to create an editing widget for. |
index | The index of the value to edit (for parameters that contain lists of values). |
numberParameter | The number parameter to create an editing widget for. |
index | The index of the value to edit (for parameters that contain lists of values). |
|
private |
Creates a layout with widgets for editing a floating point parameter.
numberParameter | The number parameter to create an editing widget for. |
index | The index of the value to edit (for parameters that contain lists of values). |
|
private |
Creates a widget for editing a string parameter or displaying a read-only parameter's value.
parameter | The string parameter to create an editing widget for. |
|
private |
Creates a layout with widgets for editing a filename parameter.
filenameParameter | The filename parameter to create an editing widget for. |
|
private |
Creates a widget for editing a color parameter.
parameter | The color parameter to create an editing widget for. |
|
private |
Creates a widget for editing an enumeration parameter.
enumerationParameter | The parameter to create an editing widget for. |
enumerationParameter | The enumeration parameter to create an editing widget for. |
|
private |
Creates a label widget for displaying the text info contained in the given parameter.
parameter | The text info parameter to create a label widget for. |
|
private |
Creates a label widget for displaying the type info contained in the given parameter.
parameter | The text info parameter to create a label widget for. |
|
private |
Creates a button widget for executing the command represented by the given parameter.
parameter | The command parameter to create a button widget for. |
|
private |
Creates a widget displaying information about the image represented by the given parameter.
parameter | The image parameter to create a widget for. |
|
private |
Creates a layout with widgets for editing a parameter that stores several values of a specific type.
parameter | The vector parameter to create a layout with editing widgets for. |
|
private |
Notifies connected objects that a parameter of the currently edited object should be changed.
name | The name of the parameter to change. |
value | The new value for the parameter. |
parameterName | The name of the parameter to change. |
value | The new value for the parameter. |
|
private |
Filters the parameters displayed in the panel by the search text entered in the search edit widget.
|
private |
Creates a plugin widget.
parameter | the parameter of the widget |
|
private |
The node for which parameters are displayed in the view.
|
private |
The widget that is currently being edited which causes the requestParameterChange() function to be called.
|
private |
A map with parameter names as keys and pointers to editing widgets as values.
|
private |
The label displaying the type of the currently edited node.
|
private |
The action by which the label displaying the type of the currently edited node in the tool bar can be accessed.
|
private |
The line edit for editing the name of the currently edited node.
|
private |
The action by which the line edit for editing the name of the currently edited node in the tool bar can be accessed.
|
private |
The line edit for editing the string for a parameter search.
|
private |
The ID of the timer that is (re-)started each time the search text in the search edit widget is changed.