16#ifndef QGSMODELARROWITEM_H
17#define QGSMODELARROWITEM_H
22#include <QGraphicsPathItem>
25class QgsModelComponentGraphicItem;
36class GUI_EXPORT QgsModelArrowItem :
public QObject,
public QGraphicsPathItem
53 QgsModelArrowItem( QgsModelComponentGraphicItem *startItem, Qt::Edge startEdge,
int startIndex,
bool startIsOutgoing, Marker startMarker, QgsModelComponentGraphicItem *endItem, Qt::Edge endEdge,
int endIndex,
bool endIsIncoming, Marker endMarker );
61 QgsModelArrowItem( QgsModelComponentGraphicItem *startItem, Qt::Edge startEdge,
int startIndex, Marker startMarker, QgsModelComponentGraphicItem *endItem, Marker endMarker );
69 QgsModelArrowItem( QgsModelComponentGraphicItem *startItem, Marker startMarker, QgsModelComponentGraphicItem *endItem, Qt::Edge endEdge,
int endIndex, Marker endMarker );
76 QgsModelArrowItem( QgsModelComponentGraphicItem *startItem, Marker startMarker, QgsModelComponentGraphicItem *endItem, Marker endMarker );
78 void paint( QPainter *painter,
const QStyleOptionGraphicsItem *option, QWidget *widget =
nullptr )
override;
83 void setPenStyle( Qt::PenStyle style );
93 QPointF bezierPointForCurve(
const QPointF &point, Qt::Edge edge,
bool incoming,
bool hasSpecificDirectionalFlow )
const;
95 void drawArrowHead( QPainter *painter,
const QPointF &point,
const QPointF &vector );
97 QgsModelComponentGraphicItem *mStartItem =
nullptr;
98 Qt::Edge mStartEdge = Qt::LeftEdge;
100 bool mStartIsOutgoing =
true;
103 QgsModelComponentGraphicItem *mEndItem =
nullptr;
104 Qt::Edge mEndEdge = Qt::LeftEdge;
106 bool mEndIsIncoming =
false;