summaryrefslogtreecommitdiff
path: root/share/qtcreator/qml/qmlpuppet/instances/nodeinstanceclientproxy.cpp
diff options
context:
space:
mode:
authorThomas Hartmann <thomas.hartmann@qt.io>2019-11-13 11:16:55 +0100
committerThomas Hartmann <thomas.hartmann@qt.io>2019-11-28 13:09:51 +0000
commit880ab11e76478f4702edcd1f27d789c44743b130 (patch)
tree90cc2b331733739f15c7d86ddb074f033f56e87f /share/qtcreator/qml/qmlpuppet/instances/nodeinstanceclientproxy.cpp
parent93e201f1aba8bdba363678d0b3da93f33d838b30 (diff)
downloadqt-creator-880ab11e76478f4702edcd1f27d789c44743b130.tar.gz
QmlDesigner: Use proxy dialog for 3D edit view
To integrate the 3D edit view in the qml2puppet process, we create a dialog in the Qt Creator process. This dialog acts as a proxy that manages the actual window. For this I introduced a new command that allows showing, hiding, resizing and moving of the 3D edit view. The 3D edit view always follows the proxy dialog. During moving and resizing we hide the window to avoid artefacts. At this point in time the proxy widget is a dialog, but it could also be a dockwidget or any other QWidget in the future. Task-number: QDS-1179 Change-Id: I67ccab49eb2de9ba23098a67b2f9577f6c7fd3ac Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Diffstat (limited to 'share/qtcreator/qml/qmlpuppet/instances/nodeinstanceclientproxy.cpp')
-rw-r--r--share/qtcreator/qml/qmlpuppet/instances/nodeinstanceclientproxy.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/share/qtcreator/qml/qmlpuppet/instances/nodeinstanceclientproxy.cpp b/share/qtcreator/qml/qmlpuppet/instances/nodeinstanceclientproxy.cpp
index 7d46fcbfc1..93520c2f7d 100644
--- a/share/qtcreator/qml/qmlpuppet/instances/nodeinstanceclientproxy.cpp
+++ b/share/qtcreator/qml/qmlpuppet/instances/nodeinstanceclientproxy.cpp
@@ -41,6 +41,7 @@
#include "instancecontainer.h"
#include "createinstancescommand.h"
#include "createscenecommand.h"
+#include "change3dviewcommand.h"
#include "changevaluescommand.h"
#include "changebindingscommand.h"
#include "changeauxiliarycommand.h"
@@ -360,6 +361,11 @@ void NodeInstanceClientProxy::createScene(const CreateSceneCommand &command)
nodeInstanceServer()->createScene(command);
}
+void NodeInstanceClientProxy::change3DView(const Change3DViewCommand &command)
+{
+ nodeInstanceServer()->change3DView(command);
+}
+
void NodeInstanceClientProxy::clearScene(const ClearSceneCommand &command)
{
nodeInstanceServer()->clearScene(command);
@@ -447,6 +453,7 @@ void NodeInstanceClientProxy::changeSelection(const ChangeSelectionCommand &comm
void NodeInstanceClientProxy::dispatchCommand(const QVariant &command)
{
static const int createInstancesCommandType = QMetaType::type("CreateInstancesCommand");
+ static const int change3DViewCommandType = QMetaType::type("Change3DViewCommand");
static const int changeFileUrlCommandType = QMetaType::type("ChangeFileUrlCommand");
static const int createSceneCommandType = QMetaType::type("CreateSceneCommand");
static const int clearSceneCommandType = QMetaType::type("ClearSceneCommand");
@@ -470,6 +477,8 @@ void NodeInstanceClientProxy::dispatchCommand(const QVariant &command)
if (commandType == createInstancesCommandType)
createInstances(command.value<CreateInstancesCommand>());
+ else if (commandType == change3DViewCommandType)
+ change3DView(command.value<Change3DViewCommand>());
else if (commandType == changeFileUrlCommandType)
changeFileUrl(command.value<ChangeFileUrlCommand>());
else if (commandType == createSceneCommandType)