BaseRectItem Class Reference

Abstract base class for the graphical representation of nodes, node flags and node connector pins. More...

#include <BaseRectItem.h>

Inheritance diagram for BaseRectItem:

Inheritance graph
[legend]

List of all members.

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).


Detailed Description

Abstract base class for the graphical representation of nodes, node flags and node connector pins.

Inheritance Diagram

inline_dotgraph_2.dot
[legend]

Constructor & Destructor Documentation

BaseRectItem::BaseRectItem ( const QColor &  color,
bool  actAsButton = false,
QGraphicsItem *  parent = 0 
)

Constructor of the BaseRectItem class.

Constructors and Destructors.

Parameters:
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.
Constructor of the BaseRectItem class.

Parameters:
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.


Member Function Documentation

QRectF BaseRectItem::boundingRect (  )  const

Returns the bounding rectangle of the graphics item.

Public Functions.

Returns:
The bounding rectangle of the graphics item.
Returns the bounding rectangle of the graphics item.

Returns:
The bounding rectangle of the graphics item.

virtual void BaseRectItem::paint ( QPainter *  painter,
const QStyleOptionGraphicsItem *  option,
QWidget *  widget = 0 
) [pure virtual]

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.

Implemented in FlagGraphicsItem, NodeGraphicsItem, PinGraphicsItem, and ViewFlagGraphicsItem.

QColor BaseRectItem::getColor (  )  const

Returns the item's base color.

Returns:
The item's base color.

void BaseRectItem::hoverEnterEvent ( QGraphicsSceneHoverEvent *  event  )  [protected]

Event handler that reacts to hover enter events.

Protected Functions.

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

Parameters:
event The object containing details about the event.

void BaseRectItem::hoverLeaveEvent ( QGraphicsSceneHoverEvent *  event  )  [protected]

Event handler that reacts to hover leave events.

Parameters:
event The object containing details about the event.

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

Event handler that reacts to mouse press events.

Parameters:
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.

Parameters:
event The object containing details about the event.

Reimplemented in FlagGraphicsItem, NodeGraphicsItem, and PinGraphicsItem.


Member Data Documentation

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).


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

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