summaryrefslogtreecommitdiff
path: root/GLView.h
diff options
context:
space:
mode:
authorkintel <kintel@b57f626f-c46c-0410-a088-ec61d464b74c>2010-01-15 13:03:42 (GMT)
committerkintel <kintel@b57f626f-c46c-0410-a088-ec61d464b74c>2010-01-15 13:03:42 (GMT)
commit4c53f4ec2281b0aeff77ec1bbd91daf6890fbce0 (patch)
treeae4e6d53a49ebe2e4b4b340b94571e630ec7a0fd /GLView.h
parent4e3548fe03cc6ac78381e556d5e8da753759b510 (diff)
Added CROSSHAIR_COLOR, refactored parts of the public GLView interface
git-svn-id: http://svn.clifford.at/openscad/trunk@313 b57f626f-c46c-0410-a088-ec61d464b74c
Diffstat (limited to 'GLView.h')
-rw-r--r--GLView.h39
1 files changed, 27 insertions, 12 deletions
diff --git a/GLView.h b/GLView.h
index ca269ce..dd896fc 100644
--- a/GLView.h
+++ b/GLView.h
@@ -12,34 +12,49 @@
class GLView : public QGLWidget
{
Q_OBJECT
+ Q_PROPERTY(bool showAxes READ showAxes WRITE setShowAxes);
+ Q_PROPERTY(bool showCrosshairs READ showCrosshairs WRITE setShowCrosshairs);
+ Q_PROPERTY(bool orthoMode READ orthoMode WRITE setOrthoMode);
public:
- void (*renderfunc)(void*);
- void *renderfunc_vp;
-
- bool orthomode;
- bool showaxes;
- bool showcrosshairs;
+ GLView(QWidget *parent = NULL);
+ void setRenderFunc(void (*func)(void*), void *userdata);
+#ifdef ENABLE_OPENCSG
+ bool hasOpenCSGSupport() { return this->opencsg_support; }
+#endif
+ // Properties
+ bool showAxes() const { return this->showaxes; }
+ void setShowAxes(bool enabled) { this->showaxes = enabled; }
+ bool showCrosshairs() const { return this->showcrosshairs; }
+ void setShowCrosshairs(bool enabled) { this->showcrosshairs = enabled; }
+ bool orthoMode() const { return this->orthomode; }
+ void setOrthoMode(bool enabled) { this->orthomode = enabled; }
- double viewer_distance;
+ QLabel *statusLabel;
double object_rot_x;
double object_rot_y;
double object_rot_z;
double object_trans_x;
double object_trans_y;
double object_trans_z;
+ GLint shaderinfo[11];
+
+private:
+ void (*renderfunc)(void*);
+ void *renderfunc_vp;
+
+ bool showaxes;
+ bool showcrosshairs;
+ bool orthomode;
+
+ double viewer_distance;
double w_h_ratio;
- GLint shaderinfo[11];
- QLabel *statusLabel;
#ifdef ENABLE_OPENCSG
bool opencsg_support;
#endif
- GLView(QWidget *parent = NULL);
-
-protected:
bool mouse_drag_active;
int last_mouse_x;
int last_mouse_y;
contact: Jan Huwald // Impressum