summaryrefslogtreecommitdiffstats
path: root/src/runtime/api/q3dswidget.cpp
diff options
context:
space:
mode:
authorAndy Nichols <andy.nichols@qt.io>2018-05-23 10:09:50 +0200
committerLaszlo Agocs <laszlo.agocs@qt.io>2018-05-25 14:52:54 +0000
commitbd9e2b07b297c46b1e0b4a70a25b140ad9efadfd (patch)
treed148d4f7c1d16c0dd1ea58be91729a7e3ef082d7 /src/runtime/api/q3dswidget.cpp
parent17b1dd544706630c40f8ca75bfff3bf35bf1ec8b (diff)
Add support for using Q3DSViewerSettings in Q3DSEngine
Q3DSEngine has a reference to the Q3DSViewerSettings for usage in generating the viewport for the main presentation. This is used to make sure that the scene is rendered with the correct scale mode and matte if requested on the main presentation. Adds Menu items for scale modes and matte to Q3DSViewer Change-Id: I9f468c42fe846be8170dac01fcdf6d692aae19ab Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Diffstat (limited to 'src/runtime/api/q3dswidget.cpp')
-rw-r--r--src/runtime/api/q3dswidget.cpp8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/runtime/api/q3dswidget.cpp b/src/runtime/api/q3dswidget.cpp
index 56d65d5..7381ce5 100644
--- a/src/runtime/api/q3dswidget.cpp
+++ b/src/runtime/api/q3dswidget.cpp
@@ -325,11 +325,6 @@ Q3DSWidgetPrivate::Q3DSWidgetPrivate(Q3DSWidget *q)
{
Q3DSPresentationPrivate::get(presentation)->setController(this);
- QObject::connect(viewerSettings, &Q3DSViewerSettings::showRenderStatsChanged, viewerSettings, [this] {
- if (engine)
- engine->setProfileUiVisible(viewerSettings->isShowingRenderStats());
- });
-
typedef void (QWidget::*QWidgetVoidSlot)();
QObject::connect(&updateTimer, &QTimer::timeout, q, static_cast<QWidgetVoidSlot>(&QWidget::update));
updateTimer.setInterval(updateInterval);
@@ -355,6 +350,7 @@ void Q3DSWidgetPrivate::createEngine()
engine->setAutoToggleProfileUi(false); // up to the app to control this via the API instead
engine->setSurface(q_ptr->window()->windowHandle());
+ engine->setViewerSettings(viewerSettings);
qCDebug(lc3DSWidget, "Created engine %p", engine);
initializePresentationController(engine, presentation);
@@ -366,8 +362,6 @@ void Q3DSWidgetPrivate::createEngine()
engine->resize(sz);
QObject::connect(engine, &Q3DSEngine::presentationLoaded, engine, [this] {
- if (viewerSettings->isShowingRenderStats())
- engine->setProfileUiVisible(true);
emit q_ptr->presentationLoaded();
});