Class for graphical representation of node flags.
More...
#include <FlagGraphicsItem.h>
|
| void | setChecked (bool checked) |
| | Sets the state of the flag to the given value.
|
| |
|
| void | toggled (bool checked) |
| | Signal that is emitted when the flag has been toggled.
|
| |
|
| 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.
|
| |
|
| bool | m_state |
| | The state of the flag.
|
| |
| QColor | m_color |
| | The item's base color.
|
| |
| bool | m_actAsButton |
| | Flag that states whether the item should act as a button.
|
| |
| bool | m_hovered |
| | Flag that states whether the item is currently hovered by the mouse pointer.
|
| |
| bool | m_clicked |
| | Flag that states whether the item is currently clicked by the mouse pointer (i.e. a mouse button is pressed).
|
| |
Class for graphical representation of node flags.
Inheritance Diagram
| Frapper::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. |
| Frapper::FlagGraphicsItem::~FlagGraphicsItem |
( |
| ) |
|
| void Frapper::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 Frapper::BaseRectItem.
Reimplemented in Frapper::ViewFlagGraphicsItem.
| void Frapper::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 Frapper::FlagGraphicsItem::toggled |
( |
bool |
checked | ) |
|
|
signal |
Signal that is emitted when the flag has been toggled.
- Parameters
-
| checked | The new state of the flag. |
| void Frapper::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. |
| void Frapper::FlagGraphicsItem::mouseReleaseEvent |
( |
QGraphicsSceneMouseEvent * |
event | ) |
|
|
protected |
Event handler that reacts to mouse release events.
- Parameters
-
| event | The object containing details about the event. |
| bool Frapper::FlagGraphicsItem::m_state |
|
protected |
The documentation for this class was generated from the following files: