78 QBrush m_polybrush; |
79 QBrush m_polybrush; |
79 |
80 |
80 public: |
81 public: |
81 AbstractDrawMode (GLRenderer* renderer); |
82 AbstractDrawMode (GLRenderer* renderer); |
82 |
83 |
83 virtual bool allowFreeCamera() const override |
84 void addDrawnVertex (const Vertex& pos); |
84 { |
85 virtual bool allowFreeCamera() const override final { return false; } |
85 return false; |
86 virtual void endDraw() {} |
86 } |
87 void drawLength (QPainter& painter, |
87 |
88 const Vertex& v0, const Vertex& v1, |
|
89 const QPointF& v0p, const QPointF& v1p) const; |
|
90 void finishDraw (const LDObjectList& objs); |
|
91 Vertex getCursorVertex() const; |
|
92 bool keyReleased (QKeyEvent* ev) override; |
|
93 virtual int maxVertices() const { return 0; } |
88 bool mouseReleased (const AbstractEditMode::MouseEventData& data) override; |
94 bool mouseReleased (const AbstractEditMode::MouseEventData& data) override; |
89 void addDrawnVertex (const Vertex& pos); |
95 virtual bool preAddVertex (Vertex const&) { return false; } |
90 void finishDraw (const LDObjectList& objs); |
96 void renderPolygon (QPainter& painter, const QVector<Vertex>& poly3d, bool withlengths, bool withangles) const; |
91 void renderPolygon (QPainter& painter, const QVector<Vertex>& poly3d, |
|
92 bool withlengths, bool withangles) const; |
|
93 void drawLength (QPainter& painter, Vertex const& v0, Vertex const& v1, |
|
94 const QPointF& v0p, const QPointF& v1p) const; |
|
95 bool keyReleased (QKeyEvent* ev) override; |
|
96 |
|
97 virtual bool preAddVertex (Vertex const&) |
|
98 { |
|
99 return false; |
|
100 } |
|
101 }; |
97 }; |
102 |
98 |
103 // |
99 // |
104 // Base class for select-like edit modes |
100 // Base class for select-like edit modes |
105 // |
101 // |