Class for graphical representation of node view flags.
More...
#include <ViewFlagGraphicsItem.h>
|
void | stageIndexSet (unsigned int stageIndex) |
| Signal that is emitted when the stage index has been changed.
|
|
void | toggled (bool checked) |
| Signal that is emitted when the flag has been toggled.
|
|
|
| ViewFlagGraphicsItem (QGraphicsItem *parent, bool state, const QPointF &position, unsigned int stageIndex) |
| Constructor of the ViewFlagGraphicsItem class.
|
|
| ~ViewFlagGraphicsItem () |
| Destructor of the ViewFlagGraphicsItem class.
|
|
virtual void | paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=0) |
| Paints the graphics item into a graphics view.
|
|
| FlagGraphicsItem (QGraphicsItem *parent, const QString &name, bool state, const QColor &color, const QPointF &position) |
| Constructor of the FlagGraphicsItem class.
|
|
| ~FlagGraphicsItem () |
| Destructor of the FlagGraphicsItem class.
|
|
| BaseRectItem (const QColor &color, bool actAsButton=false, QGraphicsItem *parent=0) |
| Constructor of the BaseRectItem class.
|
|
| ~BaseRectItem () |
| Destructor of the BaseRectItem class.
|
|
QRectF | boundingRect () const |
| Returns the bounding rectangle of the graphics item.
|
|
QColor | getColor () const |
| Returns the item's base color.
|
|
|
void | contextMenuEvent (QGraphicsSceneContextMenuEvent *event) |
| Event handler that reacts to context menu events.
|
|
void | mousePressEvent (QGraphicsSceneMouseEvent *event) |
| Event handler that reacts to mouse press events.
|
|
void | mouseReleaseEvent (QGraphicsSceneMouseEvent *event) |
| Event handler that reacts to mouse release events.
|
|
void | hoverEnterEvent (QGraphicsSceneHoverEvent *event) |
| Event handler that reacts to hover enter events.
|
|
void | hoverLeaveEvent (QGraphicsSceneHoverEvent *event) |
| Event handler that reacts to hover leave events.
|
|
void | mousePressEvent (QGraphicsSceneMouseEvent *event) |
| Event handler that reacts to mouse press events.
|
|
void | mouseReleaseEvent (QGraphicsSceneMouseEvent *event) |
| Event handler that reacts to mouse release events.
|
|
|
void | selectStage (QAction *triggeredAction) |
| Selects the stage to assign to the node corresponding to the triggered stage action.
|
|
void | setStageIndex (unsigned int index, ViewNode *viewNode) |
| Activated when a new stage has been selected from outside.
|
|
|
unsigned int | m_stageIndex |
| The index of the stage that the node that this flag belongs to is contained in.
|
|
QActionGroup * | m_stageActionGroup |
| The group that all the stage actions will be added to.
|
|
|
void | setChecked (bool checked) |
| Sets the state of the flag to the given value.
|
|
bool | m_state |
| The state of the flag.
|
|
Class for graphical representation of node view flags.
Inheritance Diagram
Frapper::ViewFlagGraphicsItem::ViewFlagGraphicsItem |
( |
QGraphicsItem * |
parent, |
|
|
bool |
state, |
|
|
const QPointF & |
position, |
|
|
unsigned int |
stageIndex |
|
) |
| |
Constructor of the ViewFlagGraphicsItem class.
Constructors and Destructors.
- Parameters
-
parent | The graphics item this item will be a child of. |
state | The initial state of the flag. |
position | The flag's relative position in its parent. |
stageIndex | The index of the stage that the node that this flag belongs to is contained in. |
Constructor of the ViewFlagGraphicsItem class.
- Parameters
-
parent | The graphics item this item will be a child of. |
state | The initial state of the flag. |
position | The flag's relative position in its parent. |
stageIndex | The index of the stage that the node that this flag represents is contained in. |
Frapper::ViewFlagGraphicsItem::~ViewFlagGraphicsItem |
( |
| ) |
|
void Frapper::ViewFlagGraphicsItem::paint |
( |
QPainter * |
painter, |
|
|
const QStyleOptionGraphicsItem * |
option, |
|
|
QWidget * |
widget = 0 |
|
) |
| |
|
virtual |
Paints the graphics item into a graphics view.
Public Functions.
- Parameters
-
painter | The object to use for painting. |
option | Style options for painting the graphics item. |
widget | The widget into which to paint the graphics item. |
Paints the graphics item into a graphics view.
- Parameters
-
painter | The object to use for painting. |
option | Style options for painting the graphics item. |
widget | The widget into which to paint the graphics item. |
Reimplemented from Frapper::FlagGraphicsItem.
void Frapper::ViewFlagGraphicsItem::contextMenuEvent |
( |
QGraphicsSceneContextMenuEvent * |
event | ) |
|
|
protected |
Event handler that reacts to context menu events.
Protected Events.
- Parameters
-
event | The object containing details about the event. |
Event handler that reacts to context menu events.
- Parameters
-
event | The object containing details about the event. |
void Frapper::ViewFlagGraphicsItem::stageIndexSet |
( |
unsigned int |
stageIndex | ) |
|
|
signal |
Signal that is emitted when the stage index has been changed.
- Parameters
-
stageIndex | The index of the new stage that the node should be contained in. |
void Frapper::ViewFlagGraphicsItem::selectStage |
( |
QAction * |
triggeredAction | ) |
|
|
privateslot |
Selects the stage to assign to the node corresponding to the triggered stage action.
Private Slots.
- Parameters
-
triggeredAction | The action that was triggered. |
Selects the stage to assign to the node corresponding to the triggered stage action.
- Parameters
-
triggeredAction | The action that was triggered. |
void Frapper::ViewFlagGraphicsItem::setStageIndex |
( |
unsigned int |
index, |
|
|
ViewNode * |
viewNode |
|
) |
| |
|
privateslot |
Activated when a new stage has been selected from outside.
- Parameters
-
unsigned int Frapper::ViewFlagGraphicsItem::m_stageIndex |
|
private |
The index of the stage that the node that this flag belongs to is contained in.
QActionGroup* Frapper::ViewFlagGraphicsItem::m_stageActionGroup |
|
private |
The group that all the stage actions will be added to.
The documentation for this class was generated from the following files: