Class representing a view for displaying and editing parameters of nodes.
More...
#include <PainterPanel.h>
|
void | triggerRedraw () |
| This signal is emitted when the node output changes.
|
|
|
void | selectedNodeChanged (Node *selectedNode) |
| Is called when a node is selected.
|
|
void | sceneChanged (QGraphicsScene *scene) |
| Is called when the displayed scene changes.
|
|
void | updateImageList () |
| Updates the list of images if the selected node(s) change.
|
|
void | imageListItemChanged (QListWidgetItem *clickedItem) |
| Slot which is called when an item in the image list is selected.
|
|
void | historyListItemChanged (QListWidgetItem *clickedItem) |
| Slot which is called when an item in the history list is selected.
|
|
void | historyListLayoutChanged () |
| Slot which is called when the history list is sorted, e.g. via drag and drop.
|
|
void | selectionChanged (bool selected) |
| Updates the scene and the panel if the node selection changes.
|
|
void | storeToNode () |
| Stores the painted scene and the background image to the nodes render target.
|
|
void | changeDrawMode (int mode) |
| Slot which is called when the user changes the draw mode via combo box.
|
|
void | onSceneSelectionChanged (QList< QGraphicsItem * > selectedItems) |
| Slot which is called when the scene selection changes.
|
|
void | onPenChanged (QPen pen) |
| Slot which is called when the current pen changes, e.g. by selecting a different item in the scene.
|
|
void | onBrushChanged (QBrush brush) |
| Slot which is called when the current brush changes, e.g. by selecting a different item in the scene.
|
|
void | onFillCheckToggled (bool checked) |
| Slot which is called when checked state of the fill check box changes.
|
|
void | onRefreshButtonClicked () |
| Slot which is called when the refresh scene button was clicked.
|
|
void | updateDrawModeCombo (int drawmode) |
| Slot which is called when the current draw mode changes.
|
|
void | selectPenColor () |
| Slot which is called when the user selects a different pen color.
|
|
void | selectPenSize (QString size) |
| Slot which is called when the user selects a different pen size.
|
|
void | selectBrushColor () |
| Slot which is called when the user selects a different brush color.
|
|
|
static void | deleteListItems () |
| clears the static list of list items. Call this function after the last PainterPanel instance has been destroyed
|
|
|
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.
PainterPanel::PainterPanel::PainterPanel |
( |
QWidget * |
parent = 0 , |
|
|
Qt::WindowFlags |
flags = 0 |
|
) |
| |
Constructor of the PainterPanel class.
- Parameters
-
parent | The parent widget the created instance will be a child of. |
flags | Extra widget options. |
virtual PainterPanel::PainterPanel::~PainterPanel |
( |
| ) |
|
|
virtual |
Destructor of the PainterPanel 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.
void PainterPanel::PainterPanel::registerControl |
( |
NodeModel * |
nodeModel, |
|
|
SceneModel * |
sceneModel |
|
) |
| |
|
virtual |
Connects the panel with the scene.
Public Functions.
- Parameters
-
*nodeModel | NodeModel of the scene |
*sceneModel | SceneModel of the scene |
Connects the panel with the scene.
- Parameters
-
*nodeModel | NodeModel of the scene |
*sceneModel | SceneModel of the scene |
Reimplemented from Frapper::Panel.
void PainterPanel::PainterPanel::fillToolBars |
( |
QToolBar * |
mainToolBar, |
|
|
QToolBar * |
panelToolBar |
|
) |
| |
|
virtual |
Fills the given tool bars with actions for the PainterPanel view.
- Parameters
-
mainToolBar | The main tool bar to fill with actions. |
panelToolBar | The panel tool bar to fill with actions. |
Reimplemented from Frapper::Panel.
void PainterPanel::PainterPanel::selectedNodeChanged |
( |
Node * |
selectedNode | ) |
|
|
privateslot |
Is called when a node is selected.
Private Slots.
- Parameters
-
selecedNode | the selected which was selected |
Is called a node is selected
- Parameters
-
selecedNode | the selected wich was selected |
void PainterPanel::PainterPanel::sceneChanged |
( |
QGraphicsScene * |
scene | ) |
|
|
privateslot |
Is called when the displayed scene changes.
- Parameters
-
scene | The new scene that is displayed |
void PainterPanel::PainterPanel::updateImageList |
( |
| ) |
|
|
privateslot |
Updates the list of images if the selected node(s) change.
Updates the list of images if the node model changes.
void PainterPanel::PainterPanel::imageListItemChanged |
( |
QListWidgetItem * |
clickedItem | ) |
|
|
privateslot |
Slot which is called when an item in the image list is selected.
Updates the panel if the node model changes.
void PainterPanel::PainterPanel::historyListItemChanged |
( |
QListWidgetItem * |
clickedItem | ) |
|
|
privateslot |
Slot which is called when an item in the history list is selected.
void PainterPanel::PainterPanel::historyListLayoutChanged |
( |
| ) |
|
|
privateslot |
Slot which is called when the history list is sorted, e.g. via drag and drop.
void PainterPanel::PainterPanel::selectionChanged |
( |
bool |
selected | ) |
|
|
privateslot |
Updates the scene and the panel if the node selection changes.
- Parameters
-
enabled | True if selected, false otherwise |
void PainterPanel::PainterPanel::storeToNode |
( |
| ) |
|
|
privateslot |
Stores the painted scene and the background image to the nodes render target.
Stores the painted scene and the background image to the nodes internal render target.
void PainterPanel::PainterPanel::changeDrawMode |
( |
int |
mode | ) |
|
|
privateslot |
Slot which is called when the user changes the draw mode via combo box.
void PainterPanel::PainterPanel::onSceneSelectionChanged |
( |
QList< QGraphicsItem * > |
selectedItems | ) |
|
|
privateslot |
Slot which is called when the scene selection changes.
void PainterPanel::PainterPanel::onPenChanged |
( |
QPen |
pen | ) |
|
|
privateslot |
Slot which is called when the current pen changes, e.g. by selecting a different item in the scene.
void PainterPanel::PainterPanel::onBrushChanged |
( |
QBrush |
brush | ) |
|
|
privateslot |
Slot which is called when the current brush changes, e.g. by selecting a different item in the scene.
void PainterPanel::PainterPanel::onFillCheckToggled |
( |
bool |
checked | ) |
|
|
privateslot |
Slot which is called when checked state of the fill check box changes.
void PainterPanel::PainterPanel::onRefreshButtonClicked |
( |
| ) |
|
|
privateslot |
Slot which is called when the refresh scene button was clicked.
void PainterPanel::PainterPanel::updateDrawModeCombo |
( |
int |
drawmode | ) |
|
|
privateslot |
Slot which is called when the current draw mode changes.
void PainterPanel::PainterPanel::selectPenColor |
( |
| ) |
|
|
privateslot |
Slot which is called when the user selects a different pen color.
void PainterPanel::PainterPanel::selectPenSize |
( |
QString |
size | ) |
|
|
privateslot |
Slot which is called when the user selects a different pen size.
void PainterPanel::PainterPanel::selectBrushColor |
( |
| ) |
|
|
privateslot |
Slot which is called when the user selects a different brush color.
void PainterPanel::PainterPanel::triggerRedraw |
( |
| ) |
|
|
signal |
This signal is emitted when the node output changes.
void PainterPanel::PainterPanel::setPenColorButton |
( |
QColor |
color | ) |
|
|
private |
Sets the color of the pen color button.
void PainterPanel::PainterPanel::setBrushColorButton |
( |
QColor |
color | ) |
|
|
private |
Sets the color of the brush color button.
void PainterPanel::PainterPanel::deleteListItems |
( |
| ) |
|
|
staticprivate |
clears the static list of list items. Call this function after the last PainterPanel instance has been destroyed
Set the standard pen color for the selected draw mode.
The static list of known PainterPanelListItems, shared across instances of the PainterPanel.
size_t PainterPanel::PainterPanel::s_numInstances = 0 |
|
static |
Instance counter, used to clear the above list of items after the last instance has been destroyed.
NodeModel* PainterPanel::PainterPanel::m_nodeModel |
|
private |
ImageNode* PainterPanel::PainterPanel::m_imageNode |
|
private |
SceneModel* PainterPanel::PainterPanel::m_sceneModel |
|
private |
The painter area, a QGaphicsView.
QListWidget* PainterPanel::PainterPanel::m_imageListWidget |
|
private |
The GUI Elements of the upper toolbar.
The list widget holding the images of the currently selected node
QListWidget* PainterPanel::PainterPanel::m_historyListWidget |
|
private |
The list widget holding the images of the currently selected node.
QComboBox* PainterPanel::PainterPanel::m_drawModeCombo |
|
private |
The combo box of draw modes.
QComboBox* PainterPanel::PainterPanel::m_penSizeCombo |
|
private |
The combo box of pen sizes.
QPushButton* PainterPanel::PainterPanel::m_penColorButton |
|
private |
The button to select the pen color.
QPushButton* PainterPanel::PainterPanel::m_brushColorButton |
|
private |
The button to select the brush color.
QPushButton* PainterPanel::PainterPanel::m_refreshBackground |
|
private |
The button to refresh the background of the current scene.
QPushButton* PainterPanel::PainterPanel::m_deleteItemButton |
|
private |
The button to delete the current item(s)
QCheckBox* PainterPanel::PainterPanel::m_fillCheck |
|
private |
The check box to fill the current item.
QColor PainterPanel::PainterPanel::m_penColor |
|
private |
current pen, brush, pencolor & brushcolor
QColor PainterPanel::PainterPanel::m_brushColor |
|
private |
QBrush PainterPanel::PainterPanel::m_brush |
|
private |
QPen PainterPanel::PainterPanel::m_pen |
|
private |
QIcon PainterPanel::PainterPanel::m_inIcon |
|
private |
QIcon PainterPanel::PainterPanel::m_outIcon |
|
private |
QIcon PainterPanel::PainterPanel::m_inOutIcon |
|
private |
The documentation for this class was generated from the following files: