diff -r 213a7c7a3ce4 -r c064cc048f14 src/editmodes/abstractEditMode.h --- a/src/editmodes/abstractEditMode.h Sun Oct 04 02:59:38 2015 +0300 +++ b/src/editmodes/abstractEditMode.h Sun Oct 04 04:26:11 2015 +0300 @@ -32,6 +32,7 @@ Circle, MagicWand, LinePath, + Curve, }; class AbstractEditMode : public QObject, public HierarchyElement @@ -80,24 +81,19 @@ public: AbstractDrawMode (GLRenderer* renderer); - virtual bool allowFreeCamera() const override - { - return false; - } - - bool mouseReleased (const AbstractEditMode::MouseEventData& data) override; void addDrawnVertex (const Vertex& pos); + virtual bool allowFreeCamera() const override final { return false; } + virtual void endDraw() {} + void drawLength (QPainter& painter, + const Vertex& v0, const Vertex& v1, + const QPointF& v0p, const QPointF& v1p) const; void finishDraw (const LDObjectList& objs); - void renderPolygon (QPainter& painter, const QVector& poly3d, - bool withlengths, bool withangles) const; - void drawLength (QPainter& painter, Vertex const& v0, Vertex const& v1, - const QPointF& v0p, const QPointF& v1p) const; + Vertex getCursorVertex() const; bool keyReleased (QKeyEvent* ev) override; - - virtual bool preAddVertex (Vertex const&) - { - return false; - } + virtual int maxVertices() const { return 0; } + bool mouseReleased (const AbstractEditMode::MouseEventData& data) override; + virtual bool preAddVertex (Vertex const&) { return false; } + void renderPolygon (QPainter& painter, const QVector& poly3d, bool withlengths, bool withangles) const; }; //