diff options
author | Thomas Hartmann <thomas.hartmann@qt.io> | 2019-09-27 18:52:06 +0200 |
---|---|---|
committer | Thomas Hartmann <thomas.hartmann@qt.io> | 2019-10-09 10:07:11 +0000 |
commit | 1900276c1760cf26b80c95fd4364dc3433d9e492 (patch) | |
tree | c95ee39868d675cb0aa5980dfd243638290c8bbb /share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5nodeinstanceclientproxy.cpp | |
parent | 3451f4c0480b1e13a28063f1a2e35426768f428e (diff) |
QmlDesigner: Enable 3D Edit View in Qt Quick Designer
If we find a QQuick3DViewport or the root node is a QQuick3DNode,
we create an 3D Edit View QQuickView for 3D editing in the 'editmode'.
This requires to not use the DesignerWindowManager for the 'editmode'.
The current implementation for the 3D Edit View is done in EditView3D.qml,
but can be replaced by a custom EditView class later. At this point in time
there is no hard dependency on QtQuick3D. Once we start to implement
more advanceded editing features, EditView3D.qml has to be replaced by a
custom C++ class with a hard dependency on QtQuick3D.
Currently the scene can be rotated around the 'y' axis, it is possible
to move the camera on the 'z' axis and the custom light can be turned
on and off. This is simply a proof of concept that the 3D Edit View
already allows some user interaction.
Change-Id: I96400e72b0853dde7939c693d1d7300f9c2ab142
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Diffstat (limited to 'share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5nodeinstanceclientproxy.cpp')
-rw-r--r-- | share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5nodeinstanceclientproxy.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5nodeinstanceclientproxy.cpp b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5nodeinstanceclientproxy.cpp index 449e4ff188..d9fdcda65a 100644 --- a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5nodeinstanceclientproxy.cpp +++ b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5nodeinstanceclientproxy.cpp @@ -54,7 +54,6 @@ Qt5NodeInstanceClientProxy::Qt5NodeInstanceClientProxy(QObject *parent) : NodeInstanceClientProxy(parent) { prioritizeDown(); - DesignerSupport::activateDesignerWindowManager(); if (QCoreApplication::arguments().at(1) == QLatin1String("--readcapturedstream")) { qputenv("DESIGNER_DONT_USE_SHARED_MEMORY", "1"); setNodeInstanceServer(new Qt5TestNodeInstanceServer(this)); @@ -62,12 +61,18 @@ Qt5NodeInstanceClientProxy::Qt5NodeInstanceClientProxy(QObject *parent) : readDataStream(); QCoreApplication::exit(); } else if (QCoreApplication::arguments().at(2) == QLatin1String("previewmode")) { + DesignerSupport::activateDesignerWindowManager(); setNodeInstanceServer(new Qt5PreviewNodeInstanceServer(this)); initializeSocket(); } else if (QCoreApplication::arguments().at(2) == QLatin1String("editormode")) { + /* The editormode does not use the DesignerWindowManager, + * because we want to be able to show the 3D Edit View + * as a normal QQuickView. + * The DesignerWindowManager prevents any window from actually being shown. */ setNodeInstanceServer(new Qt5InformationNodeInstanceServer(this)); initializeSocket(); } else if (QCoreApplication::arguments().at(2) == QLatin1String("rendermode")) { + DesignerSupport::activateDesignerWindowManager(); setNodeInstanceServer(new Qt5RenderNodeInstanceServer(this)); initializeSocket(); } |