16 #ifndef QGSMODELARROWITEM_H
17 #define QGSMODELARROWITEM_H
21 #include <QGraphicsPathItem>
24 class QgsModelComponentGraphicItem;
35 class GUI_EXPORT QgsModelArrowItem :
public QObject,
public QGraphicsPathItem
52 QgsModelArrowItem( QgsModelComponentGraphicItem *startItem, Qt::Edge startEdge,
int startIndex,
bool startIsOutgoing, Marker startMarker,
53 QgsModelComponentGraphicItem *endItem, Qt::Edge endEdge,
int endIndex,
bool endIsIncoming, Marker endMarker );
61 QgsModelArrowItem( QgsModelComponentGraphicItem *startItem, Qt::Edge startEdge,
int startIndex, Marker startMarker,
62 QgsModelComponentGraphicItem *endItem, Marker endMarker );
70 QgsModelArrowItem( QgsModelComponentGraphicItem *startItem, Marker startMarker,
71 QgsModelComponentGraphicItem *endItem, Qt::Edge endEdge,
int endIndex, Marker endMarker );
78 QgsModelArrowItem( QgsModelComponentGraphicItem *startItem, Marker startMarker,
79 QgsModelComponentGraphicItem *endItem, Marker endMarker );
81 void paint( QPainter *painter,
const QStyleOptionGraphicsItem *option, QWidget *widget =
nullptr )
override;
86 void setPenStyle( Qt::PenStyle style );
97 QPointF bezierPointForCurve(
const QPointF &point, Qt::Edge edge,
bool incoming )
const;
99 void drawArrowHead( QPainter *painter,
const QPointF &point,
const QPointF &vector );
101 QgsModelComponentGraphicItem *mStartItem =
nullptr;
102 Qt::Edge mStartEdge = Qt::LeftEdge;
103 int mStartIndex = -1;
104 bool mStartIsOutgoing =
true;
107 QgsModelComponentGraphicItem *mEndItem =
nullptr;
108 Qt::Edge mEndEdge = Qt::LeftEdge;
110 bool mEndIsIncoming =
false;