#ifndef CLINEITEM_H #define CLINEITEM_H #include "CPathItem.h" class CLineItem : public CPathItem { public: typedef enum { Curve, Line, Polyline, CurveToLine, } CLineType; explicit CLineItem(QGraphicsItem *parent = nullptr); explicit CLineItem(const QPointF &startPos, const QPointF &endPos, QGraphicsItem *parent = nullptr); QPointF startPos() const; void setStartPos(const QPointF start); QPointF endPos() const; void setEndPos(const QPointF end); CLineType lineType() const; void setLineType(CLineType type); bool showArrow() const; void setShowArrow(bool s); void updatePath() override; private: QPointF m_startPos; QPointF m_endPos; CLineType m_lineType = Curve; bool m_showArrow = false; }; #endif // CLINEITEM_H