graph_analysis
Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
graph_analysis::gui::VertexItemBase Class Referenceabstract

graphical node representation interface More...

#include <VertexItemBase.hpp>

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

Public Member Functions

 VertexItemBase (GraphWidget *graphWidget, graph_analysis::Vertex::Ptr vertex, QGraphicsItem *parent)
 constructor More...
 
virtual ~VertexItemBase ()
 
virtual int type () const
 
virtual QPointF getConnector () const
 
graph_analysis::Vertex::Ptr getVertex () const
 getter method for retrieving the underlying conceptual graph vertex More...
 
void setVertex (graph_analysis::Vertex::Ptr vertex)
 setter method for updating the underlying conceptual graph vertex More...
 
GraphWidget * getGraphWidget () const
 getter method for retrieving the parent managing graph widget More...
 
virtual QVariant itemChange (GraphicsItemChange change, const QVariant &value)
 
QPointF getIntersectionPoint (VertexItemBase *otherItem) const
 
virtual void setGeometry (const QRectF &geometry)
 
virtual QSizeF sizeHint (Qt::SizeHint which, const QSizeF &constraint=QSizeF()) const
 
virtual void paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=0)
 
virtual QRectF boundingRect () const
 

Protected Member Functions

 VertexItemBase ()
 
shared_ptr< BaseGraph > getGraph () const
 
virtual void hoverEnterEvent (QGraphicsSceneHoverEvent *event)
 
virtual void hoverLeaveEvent (QGraphicsSceneHoverEvent *event)
 
virtual VertexItemBase * createNewItem (GraphWidget *graphWidget, const graph_analysis::Vertex::Ptr &vertex, QGraphicsItem *parent) const =0
 

Protected Attributes

graph_analysis::Vertex::Ptr mpVertex
 
GraphWidget * mpGraphWidget
 

Friends

class VertexItemTypeManager
 

Detailed Description

graphical node representation interface

used as polymorphic base for several graphical node implementations

Constructor & Destructor Documentation

◆ VertexItemBase() [1/2]

graph_analysis::gui::VertexItemBase::VertexItemBase ( )
protected

◆ VertexItemBase() [2/2]

graph_analysis::gui::VertexItemBase::VertexItemBase ( GraphWidget *  graphWidget,
graph_analysis::Vertex::Ptr  vertex,
QGraphicsItem *  parent 
)

constructor

Parameters
graphWidgetthe parent and managing graph widget
vertexthe internal conceptual vertex
parentthe parent

◆ ~VertexItemBase()

graph_analysis::gui::VertexItemBase::~VertexItemBase ( )
virtual

Member Function Documentation

◆ boundingRect()

QRectF graph_analysis::gui::VertexItemBase::boundingRect ( ) const
virtual

◆ createNewItem()

virtual VertexItemBase* graph_analysis::gui::VertexItemBase::createNewItem ( GraphWidget *  graphWidget,
const graph_analysis::Vertex::Ptr &  vertex,
QGraphicsItem *  parent 
) const
protectedpure virtual

◆ getConnector()

virtual QPointF graph_analysis::gui::VertexItemBase::getConnector ( ) const
inlinevirtual

return a point where an edge should point to when it connects to this vertex

◆ getGraph()

BaseGraph::Ptr graph_analysis::gui::VertexItemBase::getGraph ( ) const
protected

extracting the BaseGraph from the GraphWidget

◆ getGraphWidget()

GraphWidget* graph_analysis::gui::VertexItemBase::getGraphWidget ( ) const
inline

getter method for retrieving the parent managing graph widget

◆ getIntersectionPoint()

QPointF graph_analysis::gui::VertexItemBase::getIntersectionPoint ( VertexItemBase *  otherItem) const

calculates the two intersection points between the connector of this item and the connector of the otherItem with the bounding-box of the two respective items.

◆ getVertex()

graph_analysis::Vertex::Ptr graph_analysis::gui::VertexItemBase::getVertex ( ) const
inline

getter method for retrieving the underlying conceptual graph vertex

◆ hoverEnterEvent()

void graph_analysis::gui::VertexItemBase::hoverEnterEvent ( QGraphicsSceneHoverEvent *  event)
protectedvirtual

this is used to update the statusbar of the current active widget with information about the currently hovered (or not hovered) vertex

Reimplemented in graph_analysis::gui::VertexItemSimple.

◆ hoverLeaveEvent()

void graph_analysis::gui::VertexItemBase::hoverLeaveEvent ( QGraphicsSceneHoverEvent *  event)
protectedvirtual

◆ itemChange()

QVariant graph_analysis::gui::VertexItemBase::itemChange ( GraphicsItemChange  change,
const QVariant &  value 
)
virtual

callback to trigger the base-graph to adjust all edges of this vertex after its position has changed in the scene.

Reimplemented in graph_analysis::gui::VertexItemSimple.

◆ paint()

void graph_analysis::gui::VertexItemBase::paint ( QPainter *  painter,
const QStyleOptionGraphicsItem *  option,
QWidget *  widget = 0 
)
virtual

◆ setGeometry()

void graph_analysis::gui::VertexItemBase::setGeometry ( const QRectF &  geometry)
virtual

◆ setVertex()

void graph_analysis::gui::VertexItemBase::setVertex ( graph_analysis::Vertex::Ptr  vertex)
inline

setter method for updating the underlying conceptual graph vertex

◆ sizeHint()

QSizeF graph_analysis::gui::VertexItemBase::sizeHint ( Qt::SizeHint  which,
const QSizeF &  constraint = QSizeF() 
) const
virtual

◆ type()

virtual int graph_analysis::gui::VertexItemBase::type ( ) const
inlinevirtual

Friends And Related Function Documentation

◆ VertexItemTypeManager

friend class VertexItemTypeManager
friend

Member Data Documentation

◆ mpGraphWidget

GraphWidget* graph_analysis::gui::VertexItemBase::mpGraphWidget
protected

◆ mpVertex

graph_analysis::Vertex::Ptr graph_analysis::gui::VertexItemBase::mpVertex
protected

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