diff -r 1a2f593f0c02 -r 6add2126e7ff src/editmodes/abstracteditmode.h --- a/src/editmodes/abstracteditmode.h Fri Jul 04 22:19:01 2014 +0300 +++ b/src/editmodes/abstracteditmode.h Fri Jul 04 22:40:35 2014 +0300 @@ -33,8 +33,8 @@ virtual void render (QPainter& painter) const {}; GLRenderer* renderer() const; virtual EditModeType type() const = 0; - virtual void mousePressed (MouseEventData const& data) {} - virtual void mouseReleased (MouseEventData const& data) {} + virtual bool mousePressed (MouseEventData const& data) { return false; } + virtual bool mouseReleased (MouseEventData const& data) { return false; } static AbstractEditMode* createByType (GLRenderer* renderer, EditModeType type); }; @@ -47,6 +47,8 @@ QList m_drawedVerts; Vertex m_rectverts[4]; + DEFINE_CLASS (AbstractDrawMode, AbstractEditMode) + public: AbstractDrawMode (GLRenderer* renderer); @@ -55,7 +57,7 @@ return false; } - virtual void mouseReleased (MouseEventData const& data) override; + bool mouseReleased (const AbstractEditMode::MouseEventData& data) override; void addDrawnVertex (const Vertex& pos); virtual bool preAddVertex (Vertex const&) @@ -69,6 +71,8 @@ // class AbstractSelectMode : public AbstractEditMode { + DEFINE_CLASS (AbstractSelectMode, AbstractEditMode) + public: AbstractSelectMode (GLRenderer* renderer);