123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- #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
|