Frapper  1.0a
Signals | Public Member Functions | Protected Member Functions | Private Slots | Private Attributes | List of all members
Frapper::ViewFlagGraphicsItem Class Reference

Class for graphical representation of node view flags. More...

#include <ViewFlagGraphicsItem.h>

Inheritance diagram for Frapper::ViewFlagGraphicsItem:
Inheritance graph
[legend]
Collaboration diagram for Frapper::ViewFlagGraphicsItem:
Collaboration graph
[legend]

Signals

void stageIndexSet (unsigned int stageIndex)
 Signal that is emitted when the stage index has been changed.
 
- Signals inherited from Frapper::FlagGraphicsItem
void toggled (bool checked)
 Signal that is emitted when the flag has been toggled.
 

Public Member Functions

 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.
 
- Public Member Functions inherited from Frapper::FlagGraphicsItem
 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.
 
- Public Member Functions inherited from Frapper::BaseRectItem
 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.
 

Protected Member Functions

void contextMenuEvent (QGraphicsSceneContextMenuEvent *event)
 Event handler that reacts to context menu events.
 
- Protected Member Functions inherited from Frapper::FlagGraphicsItem
void mousePressEvent (QGraphicsSceneMouseEvent *event)
 Event handler that reacts to mouse press events.
 
void mouseReleaseEvent (QGraphicsSceneMouseEvent *event)
 Event handler that reacts to mouse release events.
 
- Protected Member Functions inherited from Frapper::BaseRectItem
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.
 

Private Slots

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.
 

Private Attributes

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.
 

Additional Inherited Members

- Public Slots inherited from Frapper::FlagGraphicsItem
void setChecked (bool checked)
 Sets the state of the flag to the given value.
 
- Protected Attributes inherited from Frapper::FlagGraphicsItem
bool m_state
 The state of the flag.
 

Detailed Description

Class for graphical representation of node view flags.

Inheritance Diagram
dot_inline_dotgraph_12.png
[legend]

Constructor & Destructor Documentation

Frapper::ViewFlagGraphicsItem::ViewFlagGraphicsItem ( QGraphicsItem *  parent,
bool  state,
const QPointF &  position,
unsigned int  stageIndex 
)

Constructor of the ViewFlagGraphicsItem class.

Constructors and Destructors.

Parameters
parentThe graphics item this item will be a child of.
stateThe initial state of the flag.
positionThe flag's relative position in its parent.
stageIndexThe index of the stage that the node that this flag belongs to is contained in.

Constructor of the ViewFlagGraphicsItem class.

Parameters
parentThe graphics item this item will be a child of.
stateThe initial state of the flag.
positionThe flag's relative position in its parent.
stageIndexThe index of the stage that the node that this flag represents is contained in.
Frapper::ViewFlagGraphicsItem::~ViewFlagGraphicsItem ( )

Destructor of the ViewFlagGraphicsItem class.

Member Function Documentation

void Frapper::ViewFlagGraphicsItem::paint ( QPainter *  painter,
const QStyleOptionGraphicsItem *  option,
QWidget *  widget = 0 
)
virtual

Paints the graphics item into a graphics view.

Public Functions.

Parameters
painterThe object to use for painting.
optionStyle options for painting the graphics item.
widgetThe widget into which to paint the graphics item.

Paints the graphics item into a graphics view.

Parameters
painterThe object to use for painting.
optionStyle options for painting the graphics item.
widgetThe 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
eventThe object containing details about the event.

Event handler that reacts to context menu events.

Parameters
eventThe 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
stageIndexThe 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
triggeredActionThe action that was triggered.

Selects the stage to assign to the node corresponding to the triggered stage action.

Parameters
triggeredActionThe 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
indexThe stage index.

Member Data Documentation

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: