src/editmodes/abstractEditMode.h

changeset 841
1243abd47381
parent 830
a741a0b9df49
child 844
11587d419d2f
equal deleted inserted replaced
840:d077dd19bf9a 841:1243abd47381
25 25
26 enum class EditModeType 26 enum class EditModeType
27 { 27 {
28 Select, 28 Select,
29 Draw, 29 Draw,
30 Rectangle,
30 Circle, 31 Circle,
31 MagicWand, 32 MagicWand,
32 }; 33 };
33 34
34 class AbstractEditMode 35 class AbstractEditMode
66 { 67 {
67 DEFINE_CLASS (AbstractDrawMode, AbstractEditMode) 68 DEFINE_CLASS (AbstractDrawMode, AbstractEditMode)
68 69
69 protected: 70 protected:
70 QList<Vertex> _drawedVerts; 71 QList<Vertex> _drawedVerts;
71 Vertex _rectverts[4];
72 QBrush _polybrush; 72 QBrush _polybrush;
73 73
74 public: 74 public:
75 AbstractDrawMode (GLRenderer* renderer); 75 AbstractDrawMode (GLRenderer* renderer);
76 76
79 return false; 79 return false;
80 } 80 }
81 81
82 bool mouseReleased (const AbstractEditMode::MouseEventData& data) override; 82 bool mouseReleased (const AbstractEditMode::MouseEventData& data) override;
83 void addDrawnVertex (const Vertex& pos); 83 void addDrawnVertex (const Vertex& pos);
84 void finishDraw (LDObjectList& objs); 84 void finishDraw (const LDObjectList& objs);
85 void renderPolygon (QPainter& painter, const QVector<Vertex>& poly3d, bool withangles) const;
85 86
86 virtual bool preAddVertex (Vertex const&) 87 virtual bool preAddVertex (Vertex const&)
87 { 88 {
88 return false; 89 return false;
89 } 90 }

mercurial