summaryrefslogtreecommitdiffstats
path: root/examples/qt3d/examples-common/qt3dwindow.cpp
diff options
context:
space:
mode:
authorPaul Lemire <paul.lemire@kdab.com>2016-01-15 15:09:44 +0100
committerSean Harmer <sean.harmer@kdab.com>2016-01-16 17:17:49 +0000
commitb0404a42ced2ea5a583e1c6ddc22940ffdc1e48e (patch)
treeb073c3c680e388bda00228b204743b092b11de6a /examples/qt3d/examples-common/qt3dwindow.cpp
parent8656b95ffb67efe7dd1cc3a65b12d277e83e1d22 (diff)
Move QCamera/QCameraLens to Qt3DRender
Also get rid of Qt3DRender::QWindow and of the hard codes camera controller. Change-Id: I307735d01caf97b7a690b28de8dc99fc9866c35f Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'examples/qt3d/examples-common/qt3dwindow.cpp')
-rw-r--r--examples/qt3d/examples-common/qt3dwindow.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/examples/qt3d/examples-common/qt3dwindow.cpp b/examples/qt3d/examples-common/qt3dwindow.cpp
index 9575424a8..e46b052a7 100644
--- a/examples/qt3d/examples-common/qt3dwindow.cpp
+++ b/examples/qt3d/examples-common/qt3dwindow.cpp
@@ -43,7 +43,7 @@
#include <Qt3DLogic/qlogicaspect.h>
#include <Qt3DCore/qaspectengine.h>
-#include <Qt3DCore/qcamera.h>
+#include <Qt3DRender/qcamera.h>
#include <Qt3DCore/qentity.h>
#include <QtGui/qopenglcontext.h>
@@ -57,7 +57,7 @@ Qt3DWindow::Qt3DWindow(QScreen *screen)
, m_inputAspect(new Qt3DInput::QInputAspect)
, m_logicAspect(new Qt3DLogic::QLogicAspect)
, m_frameGraph(nullptr)
- , m_defaultCamera(new Qt3DCore::QCamera)
+ , m_defaultCamera(new Qt3DRender::QCamera)
, m_root(new Qt3DCore::QEntity)
, m_userRoot(nullptr)
, m_initialized(false)
@@ -89,7 +89,7 @@ Qt3DWindow::Qt3DWindow(QWindow *parent)
, m_inputAspect(new Qt3DInput::QInputAspect)
, m_logicAspect(new Qt3DLogic::QLogicAspect)
, m_frameGraph(nullptr)
- , m_defaultCamera(new Qt3DCore::QCamera)
+ , m_defaultCamera(new Qt3DRender::QCamera)
, m_root(new Qt3DCore::QEntity)
, m_userRoot(nullptr)
, m_initialized(false)
@@ -135,7 +135,12 @@ void Qt3DWindow::setRootEntity(Qt3DCore::QEntity *root)
m_userRoot = root;
}
-Qt3DCore::QCamera *Qt3DWindow::camera() const
+void Qt3DWindow::setFrameGraph(Qt3DRender::QFrameGraph *frameGraph)
+{
+ m_frameGraph = frameGraph;
+}
+
+Qt3DRender::QCamera *Qt3DWindow::camera() const
{
return m_defaultCamera;
}
@@ -162,9 +167,6 @@ void Qt3DWindow::showEvent(QShowEvent *e)
m_root->addComponent(m_frameGraph);
m_aspectEngine->setRootEntity(m_root);
- // TODO: Get rid of this too
- m_inputAspect->setCamera(m_defaultCamera);
-
m_initialized = true;
}