graph_analysis
Public Member Functions | Protected Member Functions | Friends | List of all members
graph_analysis::gui::VertexItemSimple Class Reference

#include <VertexItemSimple.hpp>

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

Public Member Functions

 VertexItemSimple (GraphWidget *graphWidget, const graph_analysis::Vertex::Ptr &vertex, QGraphicsItem *parent)
 
virtual ~VertexItemSimple ()
 
virtual int type () const
 
virtual QVariant itemChange (GraphicsItemChange change, const QVariant &value)
 
- Public Member Functions inherited from graph_analysis::gui::VertexItemBase
 VertexItemBase (GraphWidget *graphWidget, graph_analysis::Vertex::Ptr vertex, QGraphicsItem *parent)
 constructor More...
 
virtual ~VertexItemBase ()
 
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...
 
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

 VertexItemSimple ()
 
void dragEnterEvent (QGraphicsSceneDragDropEvent *event)
 
void dragLeaveEvent (QGraphicsSceneDragDropEvent *event)
 
void dropEvent (QGraphicsSceneDragDropEvent *event)
 
void mouseDoubleClickEvent (QGraphicsSceneMouseEvent *event)
 
void hoverEnterEvent (QGraphicsSceneHoverEvent *event)
 
void hoverLeaveEvent (QGraphicsSceneHoverEvent *event)
 
VertexItemBase * createNewItem (GraphWidget *graphWidget, const graph_analysis::Vertex::Ptr &vertex, QGraphicsItem *parent) const
 
- Protected Member Functions inherited from graph_analysis::gui::VertexItemBase
 VertexItemBase ()
 
shared_ptr< BaseGraph > getGraph () const
 

Friends

class VertexItemTypeManager
 

Additional Inherited Members

- Protected Attributes inherited from graph_analysis::gui::VertexItemBase
graph_analysis::Vertex::Ptr mpVertex
 
GraphWidget * mpGraphWidget
 

Detailed Description

Simplest possible implementation of a VertexItemBase just a box with two strings – type and label

Constructor & Destructor Documentation

◆ VertexItemSimple() [1/2]

graph_analysis::gui::VertexItemSimple::VertexItemSimple ( )
protected

◆ VertexItemSimple() [2/2]

graph_analysis::gui::VertexItemSimple::VertexItemSimple ( GraphWidget *  graphWidget,
const graph_analysis::Vertex::Ptr &  vertex,
QGraphicsItem *  parent 
)

kiss: very simple base implementation of a rectangle

◆ ~VertexItemSimple()

graph_analysis::gui::VertexItemSimple::~VertexItemSimple ( )
virtual

Member Function Documentation

◆ createNewItem()

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

◆ dragEnterEvent()

void graph_analysis::gui::VertexItemSimple::dragEnterEvent ( QGraphicsSceneDragDropEvent *  event)
protected

all items by default accept drag-n-drop events. override this function in later classes to prevent certain drops?

◆ dragLeaveEvent()

void graph_analysis::gui::VertexItemSimple::dragLeaveEvent ( QGraphicsSceneDragDropEvent *  event)
protected

◆ dropEvent()

void graph_analysis::gui::VertexItemSimple::dropEvent ( QGraphicsSceneDragDropEvent *  event)
protected

◆ hoverEnterEvent()

void graph_analysis::gui::VertexItemSimple::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 from graph_analysis::gui::VertexItemBase.

◆ hoverLeaveEvent()

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

◆ itemChange()

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

uses this (read only) notification to update the label showing current canvas coordinate of the whole item. nice for debugging.

Reimplemented from graph_analysis::gui::VertexItemBase.

◆ mouseDoubleClickEvent()

void graph_analysis::gui::VertexItemSimple::mouseDoubleClickEvent ( QGraphicsSceneMouseEvent *  event)
protected

◆ type()

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

Friends And Related Function Documentation

◆ VertexItemTypeManager

friend class VertexItemTypeManager
friend

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