From e2fddf5f24b2c23c8188a3508e75e32db7f9ca57 Mon Sep 17 00:00:00 2001 From: Sean Harmer Date: Sun, 17 Jan 2016 14:31:18 +0000 Subject: Have Qt3DQuickWindow manage window surface Change-Id: I3d034728781aa5b99868c92ea73ebf427ee88c5a Reviewed-by: Paul Lemire --- src/quick3d/quick3d/qqmlaspectengine.cpp | 5 +++++ src/quick3d/quick3d/qqmlaspectengine.h | 1 + 2 files changed, 6 insertions(+) (limited to 'src') diff --git a/src/quick3d/quick3d/qqmlaspectengine.cpp b/src/quick3d/quick3d/qqmlaspectengine.cpp index cf2372ca5..d7e540c42 100644 --- a/src/quick3d/quick3d/qqmlaspectengine.cpp +++ b/src/quick3d/quick3d/qqmlaspectengine.cpp @@ -133,6 +133,11 @@ void QQmlAspectEnginePrivate::_q_continueExecute() return; } + // Let users know we have loaded the QML file, and the scene has been instantiated. + // This gives a chance to manipulate the scene before passing it over to the + // aspect engine. Useful for convenience window classes to set up cameras and surfaces + // on the framegraph and event sources for the input aspect etc. + emit q->sceneCreated(obj); m_aspectEngine->setRootEntity(qobject_cast(obj)); emit q->statusChanged(q->status()); } diff --git a/src/quick3d/quick3d/qqmlaspectengine.h b/src/quick3d/quick3d/qqmlaspectengine.h index 7f742e83f..b94c6ab10 100644 --- a/src/quick3d/quick3d/qqmlaspectengine.h +++ b/src/quick3d/quick3d/qqmlaspectengine.h @@ -64,6 +64,7 @@ public: Q_SIGNALS: void statusChanged(Status); + void sceneCreated(QObject* rootObject); private: Q_DECLARE_PRIVATE(QQmlAspectEngine) -- cgit v1.2.3