|
graph_analysis
|
standard implementation of graphical nodes for an Edge More...
#include <EdgeItemBase.hpp>


Public Member Functions | |
| EdgeItemBase (GraphWidget *graphWidget, const graph_analysis::Edge::Ptr &edge, QGraphicsItem *parent) | |
| constructor More... | |
| virtual | ~EdgeItemBase () |
| virtual int | type () const |
| virtual void | adjustEdgePoints (QVector< QPointF > points) |
| virtual void | adjustEdgePositioning () |
| void | drawStraightEdge () |
| void | drawBezierEdge () |
| void | drawArrowHead (size_t arrowSize, QBrush brush=QBrush(Qt::black), QPen pen=QPen(Qt::black)) |
| graph_analysis::Edge::Ptr | getEdge () const |
| void | setEdge (graph_analysis::Edge::Ptr edge) |
| GraphWidget * | getGraphWidget () const |
| virtual QPainterPath | shape () const |
| QGraphicsPathItem * | getEdgePath () const |
| QGraphicsPolygonItem * | getArrowHead () const |
Public Attributes | |
| QVector< QPointF > | mPoints |
Protected Member Functions | |
| EdgeItemBase () | |
| virtual void | hoverEnterEvent (QGraphicsSceneHoverEvent *event) |
| virtual void | hoverLeaveEvent (QGraphicsSceneHoverEvent *event) |
| virtual EdgeItemBase * | createNewItem (GraphWidget *graphWidget, const graph_analysis::Edge::Ptr &edge, QGraphicsItem *parent) const =0 |
Protected Attributes | |
| graph_analysis::Edge::Ptr | mpEdge |
| underlying graph edge pointer More... | |
| GraphWidget * | mpGraphWidget |
| parent managing graph widget More... | |
| QGraphicsPathItem * | mpEdgePath |
| QGraphicsPolygonItem * | mpArrowHead |
| render an arrow head More... | |
Friends | |
| class | EdgeItemTypeManager |
standard implementation of graphical nodes for an Edge
used as polymorphic base for several graphical node implementations
|
protected |
| graph_analysis::gui::EdgeItemBase::EdgeItemBase | ( | GraphWidget * | graphWidget, |
| const graph_analysis::Edge::Ptr & | edge, | ||
| QGraphicsItem * | parent | ||
| ) |
constructor
| graphWidget | the parent and managing graph widget |
| edge | the internal conceptual edge |
| parent | the parent |
|
virtual |
|
virtual |
|
virtual |
Reimplemented in graph_analysis::gui::EdgeItemSimple.
|
protectedpure virtual |
Implemented in graph_analysis::gui::EdgeItemSimple.
| void graph_analysis::gui::EdgeItemBase::drawArrowHead | ( | size_t | arrowSize, |
| QBrush | brush = QBrush(Qt::black), |
||
| QPen | pen = QPen(Qt::black) |
||
| ) |
Calling this function in adjustEdgePositioning in a subclass will render an arrow head at the tip needs to be called after(!) drawStraightEdge or drawBezierEdge
| arrowSize | Size of the arrow |
| brush | Control the fill style |
| pen | Control the line style |
| void graph_analysis::gui::EdgeItemBase::drawBezierEdge | ( | ) |
Calling this function in adjustEdgePositioning in a subclass will render bezier curves between vertices
| void graph_analysis::gui::EdgeItemBase::drawStraightEdge | ( | ) |
Calling this function in adjustEdgePositioning in a subclass will render straight paths between vertices
|
inline |
Get the arrow head, e.g., to allow setting the brush
|
inline |
getter method for retrieving the underlying conceptual graph edge
|
inline |
Get the edge path, e.g., to allow setting the brush
|
inline |
getter method for retrieving the parent managing graph widget
|
protectedvirtual |
provide mouse-over status updates of the currently selected Edge
Reimplemented in graph_analysis::gui::EdgeItemSimple.
|
protectedvirtual |
Reimplemented in graph_analysis::gui::EdgeItemSimple.
|
inline |
setter method for updating the underlying conceptual graph edge
|
virtual |
Compute the shape of the edge (based on the edge path and the arrowhead)
Reimplemented in graph_analysis::gui::EdgeItemSimple.
|
virtual |
Reimplemented in graph_analysis::gui::EdgeItemSimple.
|
friend |
|
protected |
render an arrow head
|
protected |
underlying graph edge pointer
|
protected |
path for rendering an edge, adapt style using setPen or setBrush Pen: draw lines and outlines of shapes Brush: fill pattern of shapes
|
protected |
parent managing graph widget
| QVector<QPointF> graph_analysis::gui::EdgeItemBase::mPoints |
two points of the source and target, where this edge should attach
this can be as simple as two points which shall be connected by a straight line.
1.8.17