summaryrefslogtreecommitdiffstats
path: root/examples/activeqt/opengl/glbox.h
diff options
context:
space:
mode:
authorAndre de la Rocha <andre.rocha@qt.io>2017-08-21 13:23:48 +0200
committerAndre de la Rocha <andre.rocha@qt.io>2017-08-23 11:01:43 +0000
commitc2751b1d664748cfbd05d2e397f95f2cc0bec13f (patch)
tree6a7a884caf28250927ee66f395e0634470ac0851 /examples/activeqt/opengl/glbox.h
parentb3e88744f36144db7cda0b85c161cdb10026eb65 (diff)
Active Qt Examples: Brush up to C++ 11
Use nullptr, member initialization, new connect syntax, QStringLiteral, etc. Change-Id: Ia79473ca302216f91eec6a32f670cf606761ed0d Reviewed-by: Michael Winkelmann <michael.winkelmann@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'examples/activeqt/opengl/glbox.h')
-rw-r--r--examples/activeqt/opengl/glbox.h26
1 files changed, 11 insertions, 15 deletions
diff --git a/examples/activeqt/opengl/glbox.h b/examples/activeqt/opengl/glbox.h
index 5c09912..a1b854a 100644
--- a/examples/activeqt/opengl/glbox.h
+++ b/examples/activeqt/opengl/glbox.h
@@ -63,32 +63,28 @@ class GLBox : public QGLWidget,
//! [0] //! [1]
public:
-
- GLBox( QWidget* parent, const char* name = 0 );
- ~GLBox();
-
+ explicit GLBox(QWidget *parent, const char *name = nullptr);
+ virtual ~GLBox();
QAxAggregated *createAggregate();
public slots:
-
- void setXRotation( int degrees );
+ void setXRotation(int degrees);
//! [1]
- void setYRotation( int degrees );
- void setZRotation( int degrees );
+ void setYRotation(int degrees);
+ void setZRotation(int degrees);
protected:
-
void initializeGL();
void paintGL();
- void resizeGL( int w, int h );
-
+ void resizeGL(int w, int h);
virtual GLuint makeObject();
private:
-
- GLuint object;
- GLfloat xRot, yRot, zRot, scale;
-
+ GLuint m_object;
+ GLfloat m_xRot;
+ GLfloat m_yRot;
+ GLfloat m_zRot;
+ GLfloat m_scale;
};
#endif // GLBOX_H