Quick3D Texture elements require some window signals to show QML item
as texture, so we fake them to make textures appear in form editor
and state preview. To prevent texture mirroring, flipV value
is force set at proxy creation. To keep state preview up to date,
we trigger multiple render passes if there are any QML items used
as texture sources in quick3D textures.
Task-number: QDS-2290
Change-Id: I16c34aad943213c0b737fdb073333be3bbd40f2d
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
and also save the last used language to settings
Task-number: QDS-2218
Change-Id: Ib82f7bc755755661183452b32829be3d048d9947
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
You can now change the preview size with
rootModelNode.setAuxiliaryData("previewSize@Internal", size);
If size is null it will use the bounding box size.
Change-Id: Icbe747ccc5a2e26e79783825d2ed94ecc640012b
Reviewed-by: Michael Winkelmann <michael.winkelmann@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
For each created items we retrieve a list of the names
of all existing states.
Task-number: QDS-1978
Change-Id: I8e85e439fce3c6204cb8bcf69f6be847cc8dae5c
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Edit3D view is now a tab alongside Form Editor.
Buttons were moved to a Creator side task bar on Edit 3D view.
Change-Id: Ia06107e4f855ba512ffea3e628a61558894e800e
Fixes: QDS-1570
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Added scene instance id to the drop command.
Change-Id: I42df07fec823083454ad5a70ccafa318d05ab224
Fixes: QDS-1594
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
- Proxy dialog removed
- When the QDS window is minimized/maximized, the edit view 3D follows.
The opposite is not true (edit view 3D can be minimized separately).
- Edit view 3D is always on top of QDS window. Only exception is when
a popup is shown (so that the user can handle the popup).
- External apps go normally on top of the edit view 3D.
Known (non critical) issues:
- Activating the edit view 3D doesn't raise() the QDS window, so if an
external app is on top of the edit view 3D then the view is clicked,
the external app will be in between the view and the QDS window.
- Closing the edit view 3D from the x button doesnt work (causes a
restart). This is not in the scope of this commit.
Task-number: QDS-1179
Change-Id: I1dd72590037be295b94735de96772307ba14c59c
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
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>
Proof of concept drag and drop implementation. Basic functionality
working but needs polish.
Task-number: QDS-1132
Change-Id: Ie3b9e80de9a414c4955d6e38daf338045bc1e614
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This method allows to modify properties in the data model from
the puppet. For performance reasons, properties should be modified
in bulks. Each bulk will be one step on the undo stack.
Change-Id: I7dbef02781706c8638981512ca0ec45d24c54545
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
We use Quick3DNodeInstance as a proxy class to wrap QQuick3DNode.
The access to private API like QQuick3DNodePrivate::setIsHiddenInEditor()
is restriced by such proxy classes.
Change-Id: If5191c3b730359000cf983c3af206dcffa07be74
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Pasi Keränen <pasi.keranen@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This patch implements the command and dispatchers for
synchronising the selection between Qt Creator and the qml2puppet.
Qt5InformationNodeInstanceServer::changeSelection() is called whenever the selection
is changed in Qt Creator.
Qt5InformationNodeInstanceServer::changeSelection() allows to change the
selection from the qml2puppet.
Change-Id: I73a64d8dc2a3f330433f966b42a10229cbbff649
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
The eyeball status for QQuickItem is handled in the form editor.
This does not work for QQuick3DNode.
* Adding support for 'invisible' in QmlVisualNode
This allows to handle the 'invisible" state for
both QQuickItem and QQuick3DNode.
* Adding support for 'invisible' in the NodeInstanceServer.
This means that the nodes are actuallly made invisible,
if the AuxiliaryData is set.
Even with this patch there is still a downside. We actually do
hide the QQuick3DNode, which is reflected by the value of 'visible'
in the property editor. This is not correct. The eybeball should not affect
the actual property. To properly implement this we need a way to hide an
item in the scene wihout changing the visibility property.
Task-number: QDS-1065
Change-Id: I713ec97bc89fdd7271b2174756f36ce3731cfd4e
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
The build of a custom qml2puppet was failing, because
of utils/algorithm.h missing.
We should minimize Qt Creator dependencies in the puppet.
Change-Id: Iba8dd1a3979dbeeb1bfa860b50ba586bea20c7a7
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
The reasoning in 1b4766e26c did not take into account that the scope
of QT_NO_JAVA_STYLE_ITERATORS may change over time, as done with
f70905448f6 in Qt base.
Change-Id: Ib1966ff26c4d36d5f62e149d6b45baa4aecf825d
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Helps to adapt to potential upstream changes in Qt 6
Change-Id: Ie154bd4fd513d46cb0493758be8943fc4581d71c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
With @NodeInstance we can override the value of any property.
Change-Id: Ib64d8b6823b82f0a809092b2468c008d73a5525c
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
nodeinstanceserver.cpp: In member function 'void
QmlDesigner::NodeInstanceServer::setupImports(const
QVector<QmlDesigner::AddImportContainer>&)':
nodeinstanceserver.cpp:458:71: error: conversion from 'const char*' to
'QChar' is ambiguous
Change-Id: Ifa4cb2700344aaacc17619f05249f338e9b28d0b
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
If a cpp type is somehow available do not create the mockup.
Change-Id: Ibd76429c3d1190c46a223062d77d676f728fe666
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
If the qml2puppet is build for the custom Qt then
the build failed because of utils/algorithm.h.
There is currently no reason to use utils/algorithm.h
in the puppet.
Change-Id: I4fb2aa2e7df4a5087ff48318cc416b457779c96e
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This allows Qt Quick Designer to register a component that can serve
as a mockup for known C++ components registered in e.g. main.cpp.
In many cases those components are the interface to the C++ backend.
While the C++ components itself are not relevant for the gui designer,
the user has to be able to instantiate gui components that use such C++
components.
We use the CreateSceneCommand to forward a list of C++ types to
qml2puppet.
Those types are then registered so that the imports and object institation
works.
Change-Id: I1543912f233f9a783998f3c6a1b48981b342ee80
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
The code model knows about .qrc files and has a mapping
that we forward to the qml2puppet.
Support for .qrc was broken when introducing the QmlPrivateGate.
Change-Id: I22d1c1add65d0c9a914e471dbe51ef505f308494
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
Trying to serialize a void start using QVariant does assert.
Solution: Ignore properties of type void star.
This was triggered by TreeView.
Change-Id: Idca5646a472fdfce8761861f5bf889bb73300fff
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
Trying to serialize a QModelIndex using QVariant does assert.
Solution: Ignore properties of type QModelIndex.
Change-Id: Idca5646a472fdfce8761861f5bf889bb73340df7
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
The dummyContextObject is now set as the context object
Change-Id: I710f1ef36b8c97cc481b9109a775f06d9e03f6b6
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
Use Clazy fix-old-style-connect to turn most connects to Qt5 style.
Change-Id: Ib81da329a7c1f5cf3e76536cbcc729a5c5d6dd56
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@theqtcompany.com>
MetaInfo cannot depend on ObjectNodeInstance.
I forward the QObject and the QmlEngine all the way through.
The commented code in metainfo.cpp is about defining a context
for the root item. The feature is basically unused, but we can bring
it back using a callback later.
Change-Id: I8f099b06c848e2faeaafc011ac6bd313192a64bd
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
MetaObject cannot have a dependency on ObjectNodeInstance.
Instead we register a callback.
Change-Id: I9f6e096c67caf1abd525201c9bacd363d31a2fa2
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
The goal is to avoid direct usage of private API.
Any access to private QML API is supposed to go through QmlPrivateGate.
NodeInstanceMetaObject is moved into QmlPrivateGate and renamed to just
MetaObject.
Change-Id: Iba0b574605e455b01e7b86306ec3ca47be7b4e58
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
Reduce the use of NodeInstanceMetaObject in QtQuickDesigner code
to two static methods:
- registerNodeInstanceMetaObject
- createNewDynamicProperty
Change-Id: I0ef8ee96995184e968467b799147c6b4c80fbccc
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>