graph_analysis
EdgeItemSimple.hpp
Go to the documentation of this file.
1 #ifndef GRAPH_ANALYSIS_GUI_EDGEITEMSIMPLE_HPP
2 #define GRAPH_ANALYSIS_GUI_EDGEITEMSIMPLE_HPP
3 
4 #include "EdgeItemBase.hpp"
5 
6 namespace graph_analysis {
7 namespace gui {
8 
15 {
16  friend class EdgeItemTypeManager;
17 
18 protected:
20 
21 public:
22  EdgeItemSimple(GraphWidget* graphWidget,
23  const graph_analysis::Edge::Ptr& edge,
24  QGraphicsItem* parent);
25  virtual ~EdgeItemSimple();
26  virtual int type() const;
27 
28  void adjustEdgePositioning();
29 
30 protected:
31  void paint(QPainter* painter, const QStyleOptionGraphicsItem* option,
32  QWidget* widget = 0);
33  QRectF boundingRect() const;
34  QPainterPath shape() const;
35 
36  QGraphicsTextItem* mpLabel;
37  QGraphicsTextItem* mpClassName;
39 
40  void hoverEnterEvent(QGraphicsSceneHoverEvent* event);
41  void hoverLeaveEvent(QGraphicsSceneHoverEvent* event);
42 
44  const graph_analysis::Edge::Ptr& edge,
45  QGraphicsItem* parent) const;
46 };
47 
48 } // end namespace gui
49 } // end namespace graph_analysis
50 #endif
graph_analysis::gui::EdgeItemSimple::type
virtual int type() const
Definition: EdgeItemSimple.cpp:39
graph_analysis::gui::EdgeItemSimple::~EdgeItemSimple
virtual ~EdgeItemSimple()
Definition: EdgeItemSimple.cpp:33
graph_analysis::gui::EdgeItemSimple::mArrowSize
int mArrowSize
Definition: EdgeItemSimple.hpp:38
graph_analysis::gui::EdgeItemTypeManager
factory for EdgeItem-s: clones different types of EdgeItem instances (i.e. graphical edges)
Definition: EdgeItemTypeManager.hpp:27
graph_analysis::gui::EdgeItemBase
standard implementation of graphical nodes for an Edge
Definition: EdgeItemBase.hpp:28
graph_analysis::gui::EdgeItemSimple::EdgeItemSimple
EdgeItemSimple()
Definition: EdgeItemSimple.cpp:9
graph_analysis::gui::EdgeItemSimple::paint
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=0)
Definition: EdgeItemSimple.cpp:58
graph_analysis
Main namespace of the graph analysis library.
Definition: BFS.cpp:3
EdgeItemBase.hpp
graph_analysis::Edge::Ptr
shared_ptr< Edge > Ptr
Definition: Edge.hpp:21
graph_analysis::gui::EdgeItemSimple::hoverLeaveEvent
void hoverLeaveEvent(QGraphicsSceneHoverEvent *event)
Definition: EdgeItemSimple.cpp:82
graph_analysis::gui::EdgeItemSimple::mpClassName
QGraphicsTextItem * mpClassName
Definition: EdgeItemSimple.hpp:37
graph_analysis::gui::EdgeItemSimple::hoverEnterEvent
void hoverEnterEvent(QGraphicsSceneHoverEvent *event)
Definition: EdgeItemSimple.cpp:77
graph_analysis::gui::EdgeItemSimple
Definition: EdgeItemSimple.hpp:14
graph_analysis::gui::EdgeItemSimple::createNewItem
EdgeItemBase * createNewItem(GraphWidget *graphWidget, const graph_analysis::Edge::Ptr &edge, QGraphicsItem *parent) const
Definition: EdgeItemSimple.cpp:88
graph_analysis::gui::EdgeItemSimple::adjustEdgePositioning
void adjustEdgePositioning()
Definition: EdgeItemSimple.cpp:44
graph_analysis::gui::EdgeItemSimple::mpLabel
QGraphicsTextItem * mpLabel
Definition: EdgeItemSimple.hpp:36
graph_analysis::gui::EdgeItemSimple::shape
QPainterPath shape() const
Definition: EdgeItemSimple.cpp:69
graph_analysis::gui::EdgeItemSimple::boundingRect
QRectF boundingRect() const
Definition: EdgeItemSimple.cpp:64
graph_analysis::gui::GraphWidget
Base-class for visual representations of a "Graph" in this framework.
Definition: GraphWidget.hpp:26