diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2019-10-14 17:46:16 +0200 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2019-10-14 17:46:34 +0200 |
commit | 440286655e0ca271506cf7cc02ad0dbf4baef9ca (patch) | |
tree | 896fa81adb8b14a69355a3a6cf64d06ec8173c9a /examples/widgets/graphicsview/boxes/scene.h | |
parent | 1e27ad1697187549151657ba187928e439300db7 (diff) | |
parent | e164d61ca8263fc4b46fdd916e1ea77c7dd2b735 (diff) |
Merge remote-tracking branch 'origin/dev' into wip/cmake
Change-Id: I4a78428a8ea273b6960792e3b8043f816fa37fcf
Diffstat (limited to 'examples/widgets/graphicsview/boxes/scene.h')
-rw-r--r-- | examples/widgets/graphicsview/boxes/scene.h | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/examples/widgets/graphicsview/boxes/scene.h b/examples/widgets/graphicsview/boxes/scene.h index ffff01358f..5d65dc71e2 100644 --- a/examples/widgets/graphicsview/boxes/scene.h +++ b/examples/widgets/graphicsview/boxes/scene.h @@ -51,17 +51,12 @@ #ifndef SCENE_H #define SCENE_H -//#include <GL/glew.h> +#include "glbuffers.h" #include "glextensions.h" - -#include <QtWidgets> -#include <QtOpenGL> - -#include "roundedbox.h" #include "gltrianglemesh.h" -#include "trackball.h" -#include "glbuffers.h" #include "qtbox.h" +#include "roundedbox.h" +#include "trackball.h" QT_BEGIN_NAMESPACE class QMatrix4x4; @@ -116,7 +111,7 @@ private: class GraphicsWidget : public QGraphicsProxyWidget { public: - GraphicsWidget() : QGraphicsProxyWidget(0, Qt::Window) {} + GraphicsWidget() : QGraphicsProxyWidget(nullptr, Qt::Window) {} protected: QVariant itemChange(GraphicsItemChange change, const QVariant &value) override; void resizeEvent(QGraphicsSceneResizeEvent *event) override; @@ -127,7 +122,7 @@ class TwoSidedGraphicsWidget : public QObject { Q_OBJECT public: - TwoSidedGraphicsWidget(QGraphicsScene *scene); + using QObject::QObject; void setWidget(int index, QWidget *widget); QWidget *widget(int index); public slots: @@ -135,10 +130,10 @@ public slots: protected slots: void animateFlip(); private: - GraphicsWidget *m_proxyWidgets[2]; - int m_current; - int m_angle; // angle in degrees - int m_delta; + GraphicsWidget *m_proxyWidgets[2] = {nullptr, nullptr}; + int m_current = 0; + int m_angle = 0; // angle in degrees + int m_delta = 0; }; class RenderOptionsDialog : public QDialog |