#include <FlagGraphicsItem.h>


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. | |
| FlagGraphicsItem::FlagGraphicsItem | ( | QGraphicsItem * | parent, | |
| const QString & | name, | |||
| bool | state, | |||
| const QColor & | color, | |||
| const QPointF & | position | |||
| ) |
Constructor of the FlagGraphicsItem class.
Constructors and Destructors.
| 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. |
| 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.
| void FlagGraphicsItem::paint | ( | QPainter * | painter, | |
| const QStyleOptionGraphicsItem * | option, | |||
| QWidget * | widget = 0 | |||
| ) | [virtual] |
Paints the graphics item into a graphics view.
Public Functions.
| 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. |
| 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.
| checked | The new state for the flag. |
| checked | The new state for the flag. |
| void FlagGraphicsItem::toggled | ( | bool | checked | ) | [signal] |
Signal that is emitted when the flag has been toggled.
| checked | The new state of the flag. |
| void FlagGraphicsItem::mousePressEvent | ( | QGraphicsSceneMouseEvent * | event | ) | [protected] |
Event handler that reacts to mouse press events.
Protected Functions.
| event | The object containing details about the event. |
| 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.
| event | The object containing details about the event. |
Reimplemented from BaseRectItem.
bool FlagGraphicsItem::m_state [protected] |
The state of the flag.
1.5.9