1 #ifndef GRAPH_ANALYSIS_GUI_EDGEITEM_HPP 2 #define GRAPH_ANALYSIS_GUI_EDGEITEM_HPP 4 #include <QGraphicsItem> 5 #include <QGraphicsItemGroup> 44 QGraphicsItem*
sourceItem()
const {
return mpSourceItem; }
46 QGraphicsItem*
targetItem()
const {
return mpTargetItem; }
49 virtual void adjust();
59 QGraphicsItem* source,
60 QGraphicsItem* target,
62 {
throw std::runtime_error(
"graph_analysis::gui::EdgeItem::createNewItem (@4 args) is not reimplemented"); }
64 virtual void setLabel(
const std::string&) {
throw std::runtime_error(
"graph_analysis::gui::EdgeItem::setLabel is not reimplemented"); }
66 virtual void adjustLabel() {
throw std::runtime_error(
"graph_analysis::gui::EdgeItem::adjustLabel is not reimplemented"); }
87 virtual QRectF boundingRect()
const;
89 virtual void paint(QPainter *painter,
const QStyleOptionGraphicsItem* option, QWidget* widget);
92 virtual void hoverEnterEvent(QGraphicsSceneHoverEvent* event);
93 virtual void hoverLeaveEvent(QGraphicsSceneHoverEvent* event);
99 #endif // GRAPH_ANALYSIS_GUI_EDGEITEM_HPP virtual EdgeItem * createNewItem(GraphWidget *graphWidget, QGraphicsItem *source, QGraphicsItem *target, graph_analysis::Edge::Ptr edge) const
Definition: EdgeItem.hpp:58
QPointF mTargetPoint
in-scene edge target point
Definition: EdgeItem.hpp:82
virtual void adjustLabel()
Definition: EdgeItem.hpp:66
QGraphicsItem * targetItem() const
getter method to retrieve target node
Definition: EdgeItem.hpp:46
virtual graph_analysis::gui::items::EdgeLabel * getLabel()
Definition: EdgeItem.hpp:65
shared_ptr< Edge > Ptr
Definition: Edge.hpp:21
qreal mArrowSize
arrow tip size
Definition: EdgeItem.hpp:84
GraphWidget * mpGraphWidget
parent and managing graph widget
Definition: EdgeItem.hpp:70
graphical edge representation interface
Definition: EdgeItem.hpp:26
int type() const
getter method to retrieve constant
Definition: EdgeItem.hpp:52
graph_analysis::Edge::Ptr mpEdge
internal conceptual edge on whose basis the edge's been constructed
Definition: EdgeItem.hpp:77
QGraphicsItem * mpSourceItem
source edge-endpoint
Definition: EdgeItem.hpp:72
virtual void setLabel(const std::string &)
Definition: EdgeItem.hpp:64
Main namespace of the graph analysis library.
Definition: BFS.cpp:3
EdgeItem()
empty constructor
Definition: EdgeItem.hpp:30
graph_analysis::Edge::Ptr getEdge()
getter method to retrieve the internal conceptual edge
Definition: EdgeItem.hpp:55
~EdgeItem()
destructor
Definition: EdgeItem.hpp:32
QPointF mSourcePoint
in-scene edge source point
Definition: EdgeItem.hpp:80
graphical edge text label implementation
Definition: EdgeLabel.hpp:18
QGraphicsItem * mpTargetItem
target edge-endpoint
Definition: EdgeItem.hpp:74
Definition: GraphicsItemTypes.hpp:11
QGraphicsItem * sourceItem() const
getter method to retrieve source node
Definition: EdgeItem.hpp:44