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>
This commit is contained in:
Thomas Hartmann
2019-11-13 11:16:55 +01:00
parent 93e201f1ab
commit 880ab11e76
28 changed files with 565 additions and 6 deletions
@@ -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)