graph_analysis
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
graph_analysis::gui::EdgeItem Class Reference

graphical edge representation interface More...

#include <EdgeItem.hpp>

Inheritance diagram for graph_analysis::gui::EdgeItem:
Inheritance graph
[legend]
Collaboration diagram for graph_analysis::gui::EdgeItem:
Collaboration graph
[legend]

Public Member Functions

 EdgeItem ()
 empty constructor More...
 
 ~EdgeItem ()
 destructor More...
 
 EdgeItem (GraphWidget *graphWidget, QGraphicsItem *source, QGraphicsItem *target, graph_analysis::Edge::Ptr edge)
 constructor More...
 
QGraphicsItem * sourceItem () const
 getter method to retrieve source node More...
 
QGraphicsItem * targetItem () const
 getter method to retrieve target node More...
 
virtual void adjust ()
 updates edge graphics: edge lenght and endpoints positioning More...
 
int type () const
 getter method to retrieve constant More...
 
graph_analysis::Edge::Ptr getEdge ()
 getter method to retrieve the internal conceptual edge More...
 
virtual EdgeItem * createNewItem (GraphWidget *graphWidget, QGraphicsItem *source, QGraphicsItem *target, graph_analysis::Edge::Ptr edge) const
 
virtual void setLabel (const std::string &)
 
virtual graph_analysis::gui::items::EdgeLabel * getLabel ()
 
virtual void adjustLabel ()
 

Protected Member Functions

virtual QRectF boundingRect () const
 retrieves the bounding rectangular box around the area occupied by the node in the scene More...
 
virtual void paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
 qt node painting method - here the node components get placed in the scene More...
 
virtual void hoverEnterEvent (QGraphicsSceneHoverEvent *event)
 retrieves the path of the bounding rectangular box around the area occupied by the node in the scene More...
 
virtual void hoverLeaveEvent (QGraphicsSceneHoverEvent *event)
 

Protected Attributes

GraphWidget * mpGraphWidget
 parent and managing graph widget More...
 
QGraphicsItem * mpSourceItem
 source edge-endpoint More...
 
QGraphicsItem * mpTargetItem
 target edge-endpoint More...
 
graph_analysis::Edge::Ptr mpEdge
 internal conceptual edge on whose basis the edge's been constructed More...
 
QPointF mSourcePoint
 in-scene edge source point More...
 
QPointF mTargetPoint
 in-scene edge target point More...
 
qreal mArrowSize
 arrow tip size More...
 

Detailed Description

graphical edge representation interface

used as polymorphic base for several graphical edge implementations

Constructor & Destructor Documentation

◆ EdgeItem() [1/2]

graph_analysis::gui::EdgeItem::EdgeItem ( )
inline

empty constructor

◆ ~EdgeItem()

graph_analysis::gui::EdgeItem::~EdgeItem ( )
inline

destructor

◆ EdgeItem() [2/2]

graph_analysis::gui::EdgeItem::EdgeItem ( GraphWidget *  graphWidget,
QGraphicsItem *  source,
QGraphicsItem *  target,
graph_analysis::Edge::Ptr  edge 
)

constructor

Parameters
graphWidgetthe parent and managing graph widget
sourcethe edge source endpoint vertex
targetthe edge target endpoint vertex
edgethe internal conceptual edge

Member Function Documentation

◆ adjust()

virtual void graph_analysis::gui::EdgeItem::adjust ( )
virtual

updates edge graphics: edge lenght and endpoints positioning

◆ adjustLabel()

virtual void graph_analysis::gui::EdgeItem::adjustLabel ( )
inlinevirtual

◆ boundingRect()

virtual QRectF graph_analysis::gui::EdgeItem::boundingRect ( ) const
protectedvirtual

retrieves the bounding rectangular box around the area occupied by the node in the scene

◆ createNewItem()

virtual EdgeItem* graph_analysis::gui::EdgeItem::createNewItem ( GraphWidget *  graphWidget,
QGraphicsItem *  source,
QGraphicsItem *  target,
graph_analysis::Edge::Ptr  edge 
) const
inlinevirtual

◆ getEdge()

graph_analysis::Edge::Ptr graph_analysis::gui::EdgeItem::getEdge ( )
inline

getter method to retrieve the internal conceptual edge

◆ getLabel()

virtual graph_analysis::gui::items::EdgeLabel* graph_analysis::gui::EdgeItem::getLabel ( )
inlinevirtual

◆ hoverEnterEvent()

virtual void graph_analysis::gui::EdgeItem::hoverEnterEvent ( QGraphicsSceneHoverEvent *  event)
protectedvirtual

retrieves the path of the bounding rectangular box around the area occupied by the node in the scene

◆ hoverLeaveEvent()

virtual void graph_analysis::gui::EdgeItem::hoverLeaveEvent ( QGraphicsSceneHoverEvent *  event)
protectedvirtual

◆ paint()

virtual void graph_analysis::gui::EdgeItem::paint ( QPainter *  painter,
const QStyleOptionGraphicsItem *  option,
QWidget *  widget 
)
protectedvirtual

qt node painting method - here the node components get placed in the scene

◆ setLabel()

virtual void graph_analysis::gui::EdgeItem::setLabel ( const std::string &  )
inlinevirtual

◆ sourceItem()

QGraphicsItem* graph_analysis::gui::EdgeItem::sourceItem ( ) const
inline

getter method to retrieve source node

◆ targetItem()

QGraphicsItem* graph_analysis::gui::EdgeItem::targetItem ( ) const
inline

getter method to retrieve target node

◆ type()

int graph_analysis::gui::EdgeItem::type ( ) const
inline

getter method to retrieve constant

Member Data Documentation

◆ mArrowSize

qreal graph_analysis::gui::EdgeItem::mArrowSize
protected

arrow tip size

◆ mpEdge

graph_analysis::Edge::Ptr graph_analysis::gui::EdgeItem::mpEdge
protected

internal conceptual edge on whose basis the edge's been constructed

◆ mpGraphWidget

GraphWidget* graph_analysis::gui::EdgeItem::mpGraphWidget
protected

parent and managing graph widget

◆ mpSourceItem

QGraphicsItem* graph_analysis::gui::EdgeItem::mpSourceItem
protected

source edge-endpoint

◆ mpTargetItem

QGraphicsItem* graph_analysis::gui::EdgeItem::mpTargetItem
protected

target edge-endpoint

◆ mSourcePoint

QPointF graph_analysis::gui::EdgeItem::mSourcePoint
protected

in-scene edge source point

◆ mTargetPoint

QPointF graph_analysis::gui::EdgeItem::mTargetPoint
protected

in-scene edge target point


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