Go to the documentation of this file. 1 #ifndef GRAPH_ANALYSIS_GUI_EDGEITEM_HPP
2 #define GRAPH_ANALYSIS_GUI_EDGEITEM_HPP
4 #include <QGraphicsItem>
5 #include <QGraphicsItemGroup>
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"); }
89 virtual void paint(QPainter *painter,
const QStyleOptionGraphicsItem* option, QWidget* widget);
99 #endif // GRAPH_ANALYSIS_GUI_EDGEITEM_HPP
virtual void adjust()
updates edge graphics: edge lenght and endpoints positioning
~EdgeItem()
destructor
Definition: EdgeItem.hpp:32
graph_analysis::Edge::Ptr getEdge()
getter method to retrieve the internal conceptual edge
Definition: EdgeItem.hpp:55
graphical edge representation interface
Definition: EdgeItem.hpp:26
QPointF mSourcePoint
in-scene edge source point
Definition: EdgeItem.hpp:80
graphical edge text label implementation
Definition: EdgeLabel.hpp:18
Main namespace of the graph analysis library.
Definition: BFS.cpp:3
shared_ptr< Edge > Ptr
Definition: Edge.hpp:21
virtual QRectF boundingRect() const
retrieves the bounding rectangular box around the area occupied by the node in the scene
virtual void hoverEnterEvent(QGraphicsSceneHoverEvent *event)
retrieves the path of the bounding rectangular box around the area occupied by the node in the scene
QGraphicsItem * mpTargetItem
target edge-endpoint
Definition: EdgeItem.hpp:74
QGraphicsItem * sourceItem() const
getter method to retrieve source node
Definition: EdgeItem.hpp:44
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
qt node painting method - here the node components get placed in the scene
QPointF mTargetPoint
in-scene edge target point
Definition: EdgeItem.hpp:82
virtual EdgeItem * createNewItem(GraphWidget *graphWidget, QGraphicsItem *source, QGraphicsItem *target, graph_analysis::Edge::Ptr edge) const
Definition: EdgeItem.hpp:58
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
qreal mArrowSize
arrow tip size
Definition: EdgeItem.hpp:84
@ EdgeItemType
Definition: GraphicsItemTypes.hpp:11
int type() const
getter method to retrieve constant
Definition: EdgeItem.hpp:52
virtual void hoverLeaveEvent(QGraphicsSceneHoverEvent *event)
QGraphicsItem * mpSourceItem
source edge-endpoint
Definition: EdgeItem.hpp:72
GraphWidget * mpGraphWidget
parent and managing graph widget
Definition: EdgeItem.hpp:70
virtual void setLabel(const std::string &)
Definition: EdgeItem.hpp:64
graph_analysis::Edge::Ptr mpEdge
internal conceptual edge on whose basis the edge's been constructed
Definition: EdgeItem.hpp:77
EdgeItem()
empty constructor
Definition: EdgeItem.hpp:30