FlagGraphicsItem Class Reference

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

#include <FlagGraphicsItem.h>

Inheritance diagram for FlagGraphicsItem:

Inheritance graph
[legend]
Collaboration diagram for FlagGraphicsItem:

Collaboration graph
[legend]

List of all members.

Public Slots

void setChecked (bool checked)
 Sets the state of the flag to the given value.

Signals

void toggled (bool checked)
 Signal that is emitted when the flag has been toggled.

Public Member Functions

 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.
virtual void paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=0)
 Paints the graphics item into a graphics view.

Protected Member Functions

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 Attributes

bool m_state
 The state of the flag.


Detailed Description

Class for graphical representation of node flags.

Inheritance Diagram

inline_dotgraph_5.dot
[legend]

Constructor & Destructor Documentation

FlagGraphicsItem::FlagGraphicsItem ( QGraphicsItem *  parent,
const QString &  name,
bool  state,
const QColor &  color,
const QPointF &  position 
)

Constructor of the FlagGraphicsItem class.

Constructors and Destructors.

Parameters:
parent The graphics item this item will be a child of.
name The flag's name.
state The initial state of the flag.
color The flag's base color.
position The flag's relative position in its parent.
Constructor of the FlagGraphicsItem class.

Parameters:
parent The graphics item this item will be a child of.
name The flag's name.
state The initial state of the flag.
color The flag's base color.
position The flag's relative position in its parent.

FlagGraphicsItem::~FlagGraphicsItem (  ) 

Destructor of the FlagGraphicsItem class.


Member Function Documentation

void FlagGraphicsItem::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.

Implements BaseRectItem.

Reimplemented in ViewFlagGraphicsItem.

void FlagGraphicsItem::setChecked ( bool  checked  )  [slot]

Sets the state of the flag to the given value.

Public Slots.

Parameters:
checked The new state for the flag.
Sets the state of the flag to the given value.

Parameters:
checked The new state for the flag.

void FlagGraphicsItem::toggled ( bool  checked  )  [signal]

Signal that is emitted when the flag has been toggled.

Parameters:
checked The new state of the flag.

void FlagGraphicsItem::mousePressEvent ( QGraphicsSceneMouseEvent *  event  )  [protected]

Event handler that reacts to mouse press events.

Protected Functions.

Parameters:
event The object containing details about the event.
Event handler that reacts to mouse press events.

Parameters:
event The object containing details about the event.

Reimplemented from BaseRectItem.

void FlagGraphicsItem::mouseReleaseEvent ( QGraphicsSceneMouseEvent *  event  )  [protected]

Event handler that reacts to mouse release events.

Parameters:
event The object containing details about the event.

Reimplemented from BaseRectItem.


Member Data Documentation

bool FlagGraphicsItem::m_state [protected]

The state of the flag.


The documentation for this class was generated from the following files:

Generated on Wed Feb 24 15:01:00 2010 for Frapper by  doxygen 1.5.9