1#ifndef SchemaGraphicSegmentedArrow_H
2#define SchemaGraphicSegmentedArrow_H
5#include <QGraphicsPathItem>
18 bool IsInheritance,
bool IsComposite, QString ArrowName,
19 QString ArrowCardinality, QGraphicsItem * parent =
nullptr );
22 QPainterPath
shape()
const;
29 void paint ( QPainter * painter,
const QStyleOptionGraphicsItem * option,
30 QWidget * widget = 0 );
35 QPointF
p1()
const {
return path().elementCount() > 0 ? path().elementAt(0) : QPointF(); }
36 QPointF
p2()
const {
return path().elementCount() > 0 ? path().elementAt(path().elementCount()-1) : QPointF(); }
37 qreal
dx()
const {
return p2().x() -
p1().x(); }
38 qreal
dy()
const {
return p2().y() -
p1().y(); }
QPolygonF make_rhombus(qreal angle) const
QRectF m_rel_cardinality_br
QPainterPath shape() const
SchemaGraphicObject * GetEndItem() const
~SchemaGraphicSegmentedArrow()
SchemaGraphicSegmentedArrow(SchemaGraphicObject *StartItem, SchemaGraphicObject *EndItem, int connection_count, bool IsInheritance, bool IsComposite, QString ArrowName, QString ArrowCardinality, QGraphicsItem *parent=nullptr)
SchemaGraphicObject * m_end_item
QPolygonF make_arrow_head(qreal angle) const
SchemaGraphicObject * GetStartItem() const
bool GetInheritanceMode()
void hoverLeaveEvent(QGraphicsSceneHoverEvent *ev)
QRectF boundingRect() const
void hoverEnterEvent(QGraphicsSceneHoverEvent *ev)
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=0)
SchemaGraphicObject * m_start_item