16#ifndef QGSMODELARROWITEM_H
17#define QGSMODELARROWITEM_H
21#include <QGraphicsPathItem>
24class QgsModelComponentGraphicItem;
35class GUI_EXPORT QgsModelArrowItem :
public QObject,
public QGraphicsPathItem
51 QgsModelArrowItem( QgsModelComponentGraphicItem *startItem, Qt::Edge startEdge,
int startIndex,
bool startIsOutgoing, Marker startMarker, QgsModelComponentGraphicItem *endItem, Qt::Edge endEdge,
int endIndex,
bool endIsIncoming, Marker endMarker );
59 QgsModelArrowItem( QgsModelComponentGraphicItem *startItem, Qt::Edge startEdge,
int startIndex, Marker startMarker, QgsModelComponentGraphicItem *endItem, Marker endMarker );
67 QgsModelArrowItem( QgsModelComponentGraphicItem *startItem, Marker startMarker, QgsModelComponentGraphicItem *endItem, Qt::Edge endEdge,
int endIndex, Marker endMarker );
74 QgsModelArrowItem( QgsModelComponentGraphicItem *startItem, Marker startMarker, QgsModelComponentGraphicItem *endItem, Marker endMarker );
76 void paint( QPainter *painter,
const QStyleOptionGraphicsItem *option, QWidget *widget =
nullptr )
override;
81 void setPenStyle( Qt::PenStyle style );
91 QPointF bezierPointForCurve(
const QPointF &point, Qt::Edge edge,
bool incoming,
bool hasSpecificDirectionalFlow )
const;
93 void drawArrowHead( QPainter *painter,
const QPointF &point,
const QPointF &vector );
95 QgsModelComponentGraphicItem *mStartItem =
nullptr;
96 Qt::Edge mStartEdge = Qt::LeftEdge;
98 bool mStartIsOutgoing =
true;
101 QgsModelComponentGraphicItem *mEndItem =
nullptr;
102 Qt::Edge mEndEdge = Qt::LeftEdge;
104 bool mEndIsIncoming =
false;