diff options
Diffstat (limited to 'src/line.h')
-rw-r--r-- | src/line.h | 34 |
1 files changed, 34 insertions, 0 deletions
@@ -38,13 +38,47 @@ public: Connector *connector(int index) const; + QRectF boundingRect() const; + QPainterPath shape() const; + void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0); + virtual void updateLayout(); virtual void loadFromXml(QDomElement element, DiagramDocument *document = 0); void saveToXml(QDomDocument doc, QDomElement element); + QPolygonF linePoints() const; + void setLinePoints(const QPolygonF &points); + + Qt::PenStyle lineStyle() const; + void setLineStyle(Qt::PenStyle style); + + QPainterPath startArrow() const; + void setStartArrow(const QPainterPath &path); + + bool fillStartArrow() const; + void setFillStartArrow(bool fill); + + QPainterPath endArrow() const; + void setEndArrow(const QPainterPath &path); + + bool fillEndArrow() const; + void setFillEndArrow(bool fill); + private: + void updateCache(); + Connector *m_connectors[2]; + QPolygonF m_linePoints; + Qt::PenStyle m_lineStyle; + QPainterPath m_shape; + QPainterPath m_startArrow; + QPainterPath m_transformedStartArrow; + bool m_fillStartArrow; + QPainterPath m_endArrow; + QPainterPath m_transformedEndArrow; + bool m_fillEndArrow; + bool m_dirty; }; #endif |