src/gldraw.h

changeset 223
4f95d7f2e9ef
parent 219
70eb948a2b02
child 230
43d722c255d3
--- a/src/gldraw.h	Sun May 19 02:55:29 2013 +0300
+++ b/src/gldraw.h	Sun May 19 03:42:25 2013 +0300
@@ -41,6 +41,9 @@
 class GLRenderer : public QGLWidget {
 	Q_OBJECT
 	
+	PROPERTY (double, zoom, setZoom)
+	READ_PROPERTY (bool, picking)
+	
 public:
 	enum Camera { Top, Front, Left, Bottom, Back, Right, Free };
 	enum EditMode { Select, Draw };
@@ -56,11 +59,10 @@
 	void		compileObject		(LDObject* obj);
 	void		compileAllObjects	();
 	double		depthValue			() const;
-	EditMode	editMode			() const { return m_editmode; }
+	EditMode	editMode			() const { return m_editMode; }
 	void		endDraw				(bool accept);
 	QColor		getMainColor		();
 	void		hardRefresh		();
-	bool		picking				() const { return m_picking; }
 	void		refresh			();
 	void		resetAngles		();
 	uchar*		screencap			(ushort& w, ushort& h);
@@ -69,8 +71,6 @@
 	void		setDepthValue		(double depth);
 	void		setEditMode		(const EditMode mode);
 	void		setupOverlay		();
-	void		setZoom				(const double zoom) { m_zoom = zoom; }
-	double		zoom				() const { return m_zoom; }
 	
 	static void	deleteLists			(LDObject* obj);
 
@@ -93,15 +93,15 @@
 	Qt::KeyboardModifiers m_keymods;
 	ulong m_totalmove;
 	vertex m_hoverpos;
-	double m_virtWidth, m_virtHeight, m_rotX, m_rotY, m_rotZ, m_panX, m_panY, m_zoom;
-	bool m_darkbg, m_picking, m_rangepick, m_addpick, m_drawToolTip, m_screencap;
+	double m_virtWidth, m_virtHeight, m_rotX, m_rotY, m_rotZ, m_panX, m_panY;
+	bool m_darkbg, m_rangepick, m_addpick, m_drawToolTip, m_screencap;
 	QPoint m_pos, m_rangeStart;
 	QPen m_thinBorderPen, m_thickBorderPen;
 	Camera m_camera, m_toolTipCamera;
 	uint m_axeslist;
 	ushort m_width, m_height;
 	std::vector<vertex> m_drawedVerts;
-	EditMode m_editmode;
+	EditMode m_editMode;
 	bool m_rectdraw;
 	QColor m_bgcolor;
 	

mercurial