src/editmodes/abstractEditMode.h

changeset 1217
314e12e23c3a
parent 1006
a6b462051ae0
child 1222
34def2630300
--- a/src/editmodes/abstractEditMode.h	Thu Jan 04 19:40:52 2018 +0200
+++ b/src/editmodes/abstractEditMode.h	Thu Jan 04 19:44:26 2018 +0200
@@ -48,20 +48,20 @@
 		Qt::MouseButtons releasedButtons;
 	};
 
-	AbstractEditMode (GLRenderer* renderer);
+	AbstractEditMode(GLRenderer* renderer);
 	virtual ~AbstractEditMode();
 
 	virtual bool			allowFreeCamera() const = 0;
-	virtual void			render (QPainter&) const {}
+	virtual void			render(QPainter&) const {}
 	GLRenderer*				renderer() const;
 	virtual EditModeType	type() const = 0;
-	virtual bool			mousePressed (QMouseEvent*) { return false; }
-	virtual bool			mouseReleased (MouseEventData const&) { return false; }
-	virtual bool			mouseDoubleClicked (QMouseEvent*) { return false; }
-	virtual bool			mouseMoved (QMouseEvent*) { return false; }
-	virtual bool			keyReleased (QKeyEvent*) { return false; }
+	virtual bool			mousePressed(QMouseEvent*) { return false; }
+	virtual bool			mouseReleased(MouseEventData const&) { return false; }
+	virtual bool			mouseDoubleClicked(QMouseEvent*) { return false; }
+	virtual bool			mouseMoved(QMouseEvent*) { return false; }
+	virtual bool			keyReleased(QKeyEvent*) { return false; }
 
-	static AbstractEditMode* createByType (GLRenderer* renderer, EditModeType type);
+	static AbstractEditMode* createByType(GLRenderer* renderer, EditModeType type);
 
 private:
 	GLRenderer* m_renderer;
@@ -72,28 +72,28 @@
 //
 class AbstractDrawMode : public AbstractEditMode
 {
-	DEFINE_CLASS (AbstractDrawMode, AbstractEditMode)
+	DEFINE_CLASS(AbstractDrawMode, AbstractEditMode)
 
 protected:
 	QList<Vertex>			m_drawedVerts;
 	QBrush					m_polybrush;
 
 public:
-	AbstractDrawMode (GLRenderer* renderer);
+	AbstractDrawMode(GLRenderer* renderer);
 
-	void addDrawnVertex (const Vertex& pos);
+	void addDrawnVertex(const Vertex& pos);
 	virtual bool allowFreeCamera() const override final { return false; }
 	virtual void endDraw() {}
-	void drawLength (QPainter& painter,
+	void drawLength(QPainter& painter,
 		const Vertex& v0, const Vertex& v1,
 		const QPointF& v0p, const QPointF& v1p) const;
-	void finishDraw (const LDObjectList& objs);
+	void finishDraw(const LDObjectList& objs);
 	Vertex getCursorVertex() const;
-	bool keyReleased (QKeyEvent* ev) override;
+	bool keyReleased(QKeyEvent* ev) override;
 	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<Vertex>& poly3d, bool withlengths, bool withangles) const;
+	bool mouseReleased(const AbstractEditMode::MouseEventData& data) override;
+	virtual bool preAddVertex(Vertex const&) { return false; }
+	void renderPolygon(QPainter& painter, const QVector<Vertex>& poly3d, bool withlengths, bool withangles) const;
 };
 
 //
@@ -101,10 +101,10 @@
 //
 class AbstractSelectMode : public AbstractEditMode
 {
-	DEFINE_CLASS (AbstractSelectMode, AbstractEditMode)
+	DEFINE_CLASS(AbstractSelectMode, AbstractEditMode)
 
 public:
-	AbstractSelectMode (GLRenderer* renderer);
+	AbstractSelectMode(GLRenderer* renderer);
 
 	virtual bool allowFreeCamera() const override
 	{

mercurial