te::process::qt::AbstractGraphicsItem Class Referenceabstract

An Abstract graphicItem to represents a process Builder item. More...

#include <AbstractGraphicsItem.h>

Inheritance diagram for te::process::qt::AbstractGraphicsItem:
te::process::qt::TaskGraphicsItem

Public Member Functions

 AbstractGraphicsItem ()
 Default constructor. More...
 
QBrush getBrush ()
 
QFont getFont ()
 
QPen getPen ()
 
void setBrushColor (QColor color)
 
void setBrushStyle (Qt::BrushStyle style)
 
void setFont (QFont font)
 
void setPenColor (QColor color)
 
void setPenStyle (Qt::PenStyle style)
 
void setPenWidth (int width)
 
virtual ~AbstractGraphicsItem ()
 Virtual destructor. More...
 

Protected Member Functions

virtual QRectF boundingRect () const =0
 Virtual function that defines the outer bounds of the item as a rectangle. More...
 
HotPointGraphicsItemgetHotPoint (const QPointF &pos)
 Function used to get hotpoint given a item position. More...
 
virtual void hotPointPressed (HotPointGraphicsItem *hotpoint)=0
 Virtual function used to notify when user clicks over a hotpoint. More...
 
void hoverEnterEvent (QGraphicsSceneHoverEvent *event) override
 Receive hover enter events for this item. The default implementation calls update(). More...
 
void hoverLeaveEvent (QGraphicsSceneHoverEvent *event) override
 Receive hover leave events for this item. The default implementation calls update(). More...
 
void hoverMoveEvent (QGraphicsSceneHoverEvent *event) override
 Receive hover move events for this item. The default implementation does nothing. More...
 
void mouseMoveEvent (QGraphicsSceneMouseEvent *event) override
 Receive mouse move events for this item. More...
 
void mousePressEvent (QGraphicsSceneMouseEvent *event) override
 Receive mouse press events for this item. More...
 
void mouseReleaseEvent (QGraphicsSceneMouseEvent *event) override
 Receive mouse release events for this item. More...
 
virtual void paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=nullptr)
 Function used to draw the process item. More...
 

Protected Attributes

QBrush m_brush
 
bool m_drawHotPoints
 Flag used to indicate if the hot points has to be painted. More...
 
QFont m_font
 
std::vector< HotPointGraphicsItem * > m_hotPoints
 List of all hotpoints for this item. More...
 
QPainterPath m_path
 Paintr path that represents this item. More...
 
QPen m_pen
 

Detailed Description

An Abstract graphicItem to represents a process Builder item.

Definition at line 52 of file AbstractGraphicsItem.h.

Constructor & Destructor Documentation

◆ AbstractGraphicsItem()

te::process::qt::AbstractGraphicsItem::AbstractGraphicsItem ( )

Default constructor.

◆ ~AbstractGraphicsItem()

virtual te::process::qt::AbstractGraphicsItem::~AbstractGraphicsItem ( )
virtual

Virtual destructor.

Member Function Documentation

◆ boundingRect()

virtual QRectF te::process::qt::AbstractGraphicsItem::boundingRect ( ) const
protectedpure virtual

Virtual function that defines the outer bounds of the item as a rectangle.

Returns
QRectF for this item.

Implemented in te::process::qt::TaskGraphicsItem.

◆ getBrush()

QBrush te::process::qt::AbstractGraphicsItem::getBrush ( )

◆ getFont()

QFont te::process::qt::AbstractGraphicsItem::getFont ( )

◆ getHotPoint()

HotPointGraphicsItem* te::process::qt::AbstractGraphicsItem::getHotPoint ( const QPointF &  pos)
protected

Function used to get hotpoint given a item position.

\Return Pointer to the hotpoint if in this position has a hotpoint and nullptr in other case.

◆ getPen()

QPen te::process::qt::AbstractGraphicsItem::getPen ( )

◆ hotPointPressed()

virtual void te::process::qt::AbstractGraphicsItem::hotPointPressed ( HotPointGraphicsItem hotpoint)
protectedpure virtual

Virtual function used to notify when user clicks over a hotpoint.

Parameters
hotpointPointer to the hotpoint pressed.

Implemented in te::process::qt::TaskGraphicsItem.

◆ hoverEnterEvent()

void te::process::qt::AbstractGraphicsItem::hoverEnterEvent ( QGraphicsSceneHoverEvent *  event)
overrideprotected

Receive hover enter events for this item. The default implementation calls update().

Parameters
eventQt event.

◆ hoverLeaveEvent()

void te::process::qt::AbstractGraphicsItem::hoverLeaveEvent ( QGraphicsSceneHoverEvent *  event)
overrideprotected

Receive hover leave events for this item. The default implementation calls update().

Parameters
eventQt event.

◆ hoverMoveEvent()

void te::process::qt::AbstractGraphicsItem::hoverMoveEvent ( QGraphicsSceneHoverEvent *  event)
overrideprotected

Receive hover move events for this item. The default implementation does nothing.

Parameters
eventQt event.

◆ mouseMoveEvent()

void te::process::qt::AbstractGraphicsItem::mouseMoveEvent ( QGraphicsSceneMouseEvent *  event)
overrideprotected

Receive mouse move events for this item.

Parameters
eventQt event.

◆ mousePressEvent()

void te::process::qt::AbstractGraphicsItem::mousePressEvent ( QGraphicsSceneMouseEvent *  event)
overrideprotected

Receive mouse press events for this item.

Parameters
eventQt event.

◆ mouseReleaseEvent()

void te::process::qt::AbstractGraphicsItem::mouseReleaseEvent ( QGraphicsSceneMouseEvent *  event)
overrideprotected

Receive mouse release events for this item.

Parameters
eventQt event.

◆ paint()

virtual void te::process::qt::AbstractGraphicsItem::paint ( QPainter *  painter,
const QStyleOptionGraphicsItem *  option,
QWidget *  widget = nullptr 
)
protectedvirtual

Function used to draw the process item.

Parameters
painterQt Painter used to draw the process item.
optionQt style options used to draw the process item.

Reimplemented in te::process::qt::TaskGraphicsItem.

◆ setBrushColor()

void te::process::qt::AbstractGraphicsItem::setBrushColor ( QColor  color)

◆ setBrushStyle()

void te::process::qt::AbstractGraphicsItem::setBrushStyle ( Qt::BrushStyle  style)

◆ setFont()

void te::process::qt::AbstractGraphicsItem::setFont ( QFont  font)

◆ setPenColor()

void te::process::qt::AbstractGraphicsItem::setPenColor ( QColor  color)

◆ setPenStyle()

void te::process::qt::AbstractGraphicsItem::setPenStyle ( Qt::PenStyle  style)

◆ setPenWidth()

void te::process::qt::AbstractGraphicsItem::setPenWidth ( int  width)

Member Data Documentation

◆ m_brush

QBrush te::process::qt::AbstractGraphicsItem::m_brush
protected

Definition at line 171 of file AbstractGraphicsItem.h.

◆ m_drawHotPoints

bool te::process::qt::AbstractGraphicsItem::m_drawHotPoints
protected

Flag used to indicate if the hot points has to be painted.

Definition at line 166 of file AbstractGraphicsItem.h.

◆ m_font

QFont te::process::qt::AbstractGraphicsItem::m_font
protected

Definition at line 172 of file AbstractGraphicsItem.h.

◆ m_hotPoints

std::vector<HotPointGraphicsItem*> te::process::qt::AbstractGraphicsItem::m_hotPoints
protected

List of all hotpoints for this item.

Definition at line 164 of file AbstractGraphicsItem.h.

◆ m_path

QPainterPath te::process::qt::AbstractGraphicsItem::m_path
protected

Paintr path that represents this item.

Definition at line 162 of file AbstractGraphicsItem.h.

◆ m_pen

QPen te::process::qt::AbstractGraphicsItem::m_pen
protected

Definition at line 170 of file AbstractGraphicsItem.h.


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