diff options
author | Laszlo Agocs <laszlo.agocs@digia.com> | 2014-09-28 18:58:46 +0200 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@digia.com> | 2014-09-30 09:38:44 +0200 |
commit | 7824a9ba3145ea7c2184ea67ae8969d178c53065 (patch) | |
tree | ff2536f6b0c8b6fbfb3a3c6d6eb2acb589cfe34d /examples/opengl/qopenglwidget/mainwindow.h | |
parent | 90ce9701d088e7f1e93764f36fa0e54347b62438 (diff) |
Make qopenglwidget example functional without timers too
Change-Id: I6a89eaf794202c45a5ad3152d304e46041704730
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Diffstat (limited to 'examples/opengl/qopenglwidget/mainwindow.h')
-rw-r--r-- | examples/opengl/qopenglwidget/mainwindow.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/examples/opengl/qopenglwidget/mainwindow.h b/examples/opengl/qopenglwidget/mainwindow.h index 9db3e8cbec..353586c42c 100644 --- a/examples/opengl/qopenglwidget/mainwindow.h +++ b/examples/opengl/qopenglwidget/mainwindow.h @@ -45,6 +45,8 @@ #include <QTimer> #include <QGridLayout> +QT_FORWARD_DECLARE_CLASS(QOpenGLWidget) + class MainWindow : public QMainWindow { Q_OBJECT @@ -52,15 +54,18 @@ class MainWindow : public QMainWindow public: MainWindow(); void addNew(); + bool timerEnabled() const { return m_timer->isActive(); } private slots: void updateIntervalChanged(int value); + void timerUsageChanged(bool enabled); private: QTimer *m_timer; QGridLayout *m_layout; int m_nextX; int m_nextY; + QVector<QOpenGLWidget *> m_glWidgets; }; #endif |