te::process::qt::TaskGraphicsItem Class Reference

A GraphicItem to represents a Task Process Builder item. More...

#include <TaskGraphicsItem.h>

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

Public Member Functions

void addConnector (ConnectorGraphicsItem *connector)
 Function used to add a new connector item to this task. More...
 
QBrush getBrush ()
 
QFont getFont ()
 
QPen getPen ()
 
const std::string getTaskId () const
 Function used to get the task id. More...
 
void resetTaskId (const std::string &newTaskId)
 Function used to reset the task id. More...
 
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)
 
 TaskGraphicsItem (ProcessManager *manager, const std::string &taskId)
 Default constructor. More...
 
 ~TaskGraphicsItem ()
 Virtual destructor. More...
 

Protected Member Functions

virtual QRectF boundingRect () const
 Virtual function that defines the outer bounds of the item as a rectangle. More...
 
virtual void dragEnterEvent (QGraphicsSceneDragDropEvent *event) override
 Virtual function to reimplement qt event. More...
 
virtual void dragLeaveEvent (QGraphicsSceneDragDropEvent *event) override
 Virtual function to reimplement qt event. More...
 
virtual void dragMoveEvent (QGraphicsSceneDragDropEvent *event) override
 Virtual function to reimplement qt event. More...
 
virtual void dropEvent (QGraphicsSceneDragDropEvent *event) override
 Virtual function to reimplement qt event. More...
 
HotPointGraphicsItemgetHotPoint (const QPointF &pos)
 Function used to get hotpoint given a item position. More...
 
virtual void hotPointPressed (HotPointGraphicsItem *hotpoint)
 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
 
std::vector< ConnectorGraphicsItem * > m_connectors
 All connectors that is linked with this task. More...
 
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...
 
ProcessManagerm_manager
 
QPainterPath m_path
 Paintr path that represents this item. More...
 
QPen m_pen
 
std::unique_ptr< TaskGraphicalCapabilitiesm_taskGraphicalCapabilities
 
std::string m_taskId
 Task id that represents this item. More...
 

Detailed Description

A GraphicItem to represents a Task Process Builder item.

Definition at line 54 of file TaskGraphicsItem.h.

Constructor & Destructor Documentation

◆ TaskGraphicsItem()

te::process::qt::TaskGraphicsItem::TaskGraphicsItem ( ProcessManager manager,
const std::string &  taskId 
)

Default constructor.

◆ ~TaskGraphicsItem()

te::process::qt::TaskGraphicsItem::~TaskGraphicsItem ( )

Virtual destructor.

Member Function Documentation

◆ addConnector()

void te::process::qt::TaskGraphicsItem::addConnector ( ConnectorGraphicsItem connector)

Function used to add a new connector item to this task.

◆ boundingRect()

virtual QRectF te::process::qt::TaskGraphicsItem::boundingRect ( ) const
protectedvirtual

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

Returns
QRectF for this item.

Implements te::process::qt::AbstractGraphicsItem.

◆ dragEnterEvent()

virtual void te::process::qt::TaskGraphicsItem::dragEnterEvent ( QGraphicsSceneDragDropEvent *  event)
overrideprotectedvirtual

Virtual function to reimplement qt event.

◆ dragLeaveEvent()

virtual void te::process::qt::TaskGraphicsItem::dragLeaveEvent ( QGraphicsSceneDragDropEvent *  event)
overrideprotectedvirtual

Virtual function to reimplement qt event.

◆ dragMoveEvent()

virtual void te::process::qt::TaskGraphicsItem::dragMoveEvent ( QGraphicsSceneDragDropEvent *  event)
overrideprotectedvirtual

Virtual function to reimplement qt event.

◆ dropEvent()

virtual void te::process::qt::TaskGraphicsItem::dropEvent ( QGraphicsSceneDragDropEvent *  event)
overrideprotectedvirtual

Virtual function to reimplement qt event.

◆ getBrush()

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

◆ getFont()

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

◆ getHotPoint()

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

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 ( )
inherited

◆ getTaskId()

const std::string te::process::qt::TaskGraphicsItem::getTaskId ( ) const

Function used to get the task id.

◆ hotPointPressed()

virtual void te::process::qt::TaskGraphicsItem::hotPointPressed ( HotPointGraphicsItem hotpoint)
protectedvirtual

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

Parameters
hotpointPointer to the hotpoint pressed.

Implements te::process::qt::AbstractGraphicsItem.

◆ hoverEnterEvent()

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

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

Parameters
eventQt event.

◆ hoverLeaveEvent()

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

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

Parameters
eventQt event.

◆ hoverMoveEvent()

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

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

Parameters
eventQt event.

◆ mouseMoveEvent()

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

Receive mouse move events for this item.

Parameters
eventQt event.

◆ mousePressEvent()

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

Receive mouse press events for this item.

Parameters
eventQt event.

◆ mouseReleaseEvent()

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

Receive mouse release events for this item.

Parameters
eventQt event.

◆ paint()

virtual void te::process::qt::TaskGraphicsItem::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 from te::process::qt::AbstractGraphicsItem.

◆ resetTaskId()

void te::process::qt::TaskGraphicsItem::resetTaskId ( const std::string &  newTaskId)

Function used to reset the task id.

◆ setBrushColor()

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

◆ setBrushStyle()

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

◆ setFont()

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

◆ setPenColor()

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

◆ setPenStyle()

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

◆ setPenWidth()

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

Member Data Documentation

◆ m_brush

QBrush te::process::qt::AbstractGraphicsItem::m_brush
protectedinherited

Definition at line 171 of file AbstractGraphicsItem.h.

◆ m_connectors

std::vector<ConnectorGraphicsItem*> te::process::qt::TaskGraphicsItem::m_connectors
protected

All connectors that is linked with this task.

Definition at line 127 of file TaskGraphicsItem.h.

◆ m_drawHotPoints

bool te::process::qt::AbstractGraphicsItem::m_drawHotPoints
protectedinherited

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
protectedinherited

Definition at line 172 of file AbstractGraphicsItem.h.

◆ m_hotPoints

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

List of all hotpoints for this item.

Definition at line 164 of file AbstractGraphicsItem.h.

◆ m_manager

ProcessManager* te::process::qt::TaskGraphicsItem::m_manager
protected

Definition at line 123 of file TaskGraphicsItem.h.

◆ m_path

QPainterPath te::process::qt::AbstractGraphicsItem::m_path
protectedinherited

Paintr path that represents this item.

Definition at line 162 of file AbstractGraphicsItem.h.

◆ m_pen

QPen te::process::qt::AbstractGraphicsItem::m_pen
protectedinherited

Definition at line 170 of file AbstractGraphicsItem.h.

◆ m_taskGraphicalCapabilities

std::unique_ptr<TaskGraphicalCapabilities> te::process::qt::TaskGraphicsItem::m_taskGraphicalCapabilities
protected

Definition at line 129 of file TaskGraphicsItem.h.

◆ m_taskId

std::string te::process::qt::TaskGraphicsItem::m_taskId
protected

Task id that represents this item.

Definition at line 125 of file TaskGraphicsItem.h.


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