#include <BaseRectItem.h>

Public Member Functions | |
| 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. | |
| virtual void | paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=0)=0 |
| Paints the graphics item into a graphics view. | |
| QColor | getColor () const |
| Returns the item's base color. | |
Protected Member Functions | |
| 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. | |
Protected Attributes | |
| 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). | |
| BaseRectItem::BaseRectItem | ( | const QColor & | color, | |
| bool | actAsButton = false, |
|||
| QGraphicsItem * | parent = 0 | |||
| ) |
Constructor of the BaseRectItem class.
Constructors and Destructors.
| color | The base color for the graphics item. | |
| actAsButton | Flag that states whether the item should act as a button. | |
| parent | The graphics item this item will be a child of. |
| color | The base color for the graphics item. | |
| actAsButton | Flag that states whether the item should act as a button. | |
| parent | The graphics item this item will be a child of. |
| BaseRectItem::~BaseRectItem | ( | ) |
Destructor of the BaseRectItem class.
| QRectF BaseRectItem::boundingRect | ( | ) | const |
Returns the bounding rectangle of the graphics item.
Public Functions.
| virtual void BaseRectItem::paint | ( | QPainter * | painter, | |
| const QStyleOptionGraphicsItem * | option, | |||
| QWidget * | widget = 0 | |||
| ) | [pure virtual] |
Paints the graphics item into a graphics view.
| 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. |
Implemented in FlagGraphicsItem, NodeGraphicsItem, PinGraphicsItem, and ViewFlagGraphicsItem.
| QColor BaseRectItem::getColor | ( | ) | const |
Returns the item's base color.
| void BaseRectItem::hoverEnterEvent | ( | QGraphicsSceneHoverEvent * | event | ) | [protected] |
Event handler that reacts to hover enter events.
Protected Functions.
| event | The object containing details about the event. |
| event | The object containing details about the event. |
| void BaseRectItem::hoverLeaveEvent | ( | QGraphicsSceneHoverEvent * | event | ) | [protected] |
Event handler that reacts to hover leave events.
| event | The object containing details about the event. |
| void BaseRectItem::mousePressEvent | ( | QGraphicsSceneMouseEvent * | event | ) | [protected] |
Event handler that reacts to mouse press events.
| event | The object containing details about the event. |
Reimplemented in FlagGraphicsItem, and NodeGraphicsItem.
| void BaseRectItem::mouseReleaseEvent | ( | QGraphicsSceneMouseEvent * | event | ) | [protected] |
Event handler that reacts to mouse release events.
| event | The object containing details about the event. |
Reimplemented in FlagGraphicsItem, NodeGraphicsItem, and PinGraphicsItem.
QColor BaseRectItem::m_color [protected] |
The item's base color.
bool BaseRectItem::m_actAsButton [protected] |
Flag that states whether the item should act as a button.
bool BaseRectItem::m_hovered [protected] |
Flag that states whether the item is currently hovered by the mouse pointer.
bool BaseRectItem::m_clicked [protected] |
Flag that states whether the item is currently clicked by the mouse pointer (i.e. a mouse button is pressed).
1.5.9