Commit Graph

102 Commits

Author SHA1 Message Date
Miikka Heikkinen
90d9cb36f3 QmlDesigner: Add navigator preview tooltip for materials
Request 3D preview image for material instances from puppet
to show on tooltip.

Support for effect previews is also done, but handler for it is not
registered, as effects cannot be shared between windows due to
issue QTBUG-86616.

Also refactored the preview image support out of navigator
to make it more accessible by other components.

Change-Id: Ie08ba218f929660c2e43d39578997a5a1a883efd
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-09-16 07:00:06 +00:00
Eike Ziller
20f51bc642 Merge remote-tracking branch 'origin/4.13' into master
Conflicts:
	src/plugins/languageclient/languageclientcompletionassist.cpp

Change-Id: If12e1c532e5623ef063681309a918e7b51117b1c
2020-09-14 10:12:14 +02:00
Marco Bubke
0f9010d381 QmlDesigner: Introduce multiple node instance server
For capturing data we need a atomic mechanism. So in one
process multiple node instance server can be started and
then a command is send back that a scene is created. It
can be used to ensure that captured data of views is
up to date.

Task-number: QDS-2630
Change-Id: Iea8d0b036b6384c9c1b0f91af401f2b1f1978c12
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-09-11 08:57:42 +00:00
Eike Ziller
2a05186194 Merge remote-tracking branch 'origin/4.13' into master
Conflicts:
	CMakeLists.txt

Change-Id: I799060da2cb299bb0c49a3da3530fad18427a23c
2020-08-21 10:08:55 +02:00
Michael Winkelmann
44a3c092a0 QmlPuppet: Refactor ChangeIdsCommand
Change-Id: I75de863121b66a5050226dd5c8914229cb1af608
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2020-08-20 09:33:30 +00:00
Michael Winkelmann
d39a6f656f QmlPuppet: Refactor ChangeFileUrlCommand
Change-Id: I900f530109b6cdbb22d8138094443b48834d16cb
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2020-08-20 09:33:13 +00:00
Michael Winkelmann
95aa7f42de QmlPuppet: Refactor ChangeBindingsCommand
Change-Id: Id3020a73f59a1adfd25066a37d083d923e77956b
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2020-08-20 09:33:04 +00:00
Michael Winkelmann
888cbe7f8a QmlPuppet: Refactor ChangeAuxiliaryCommand
Change-Id: I32eb04db96322883aa908e22724756f5e25ded09
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2020-08-18 13:25:59 +00:00
Eike Ziller
0c4135e380 Merge remote-tracking branch 'origin/4.13' into master
Conflicts:
	src/plugins/android/androiddeployqtstep.cpp

Change-Id: Id624bad384050d567efba0700046331086cb12dd
2020-08-13 13:28:33 +02:00
Tim Jenssen
4fe5b923cd Merge remote-tracking branch 'origin/qds-1.59' into 4.13
Change-Id: Ic720f3adab305c5ef8cd10e713ccabf510eff0c0
2020-08-13 06:39:40 +00:00
Marco Bubke
e43c7fdb1d QmlDesigner: Split messaging and process for puppets
This will make it easier to implement custom puppets. The new connection
manager will restucture the code and it add a mechanism to capture data
too.

Task-number: QDS-2529
Change-Id: I5d15c3303ef1c9a3e25ba197d350e0d561ce813a
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-08-10 12:53:30 +00:00
hjk
c2dec324aa Some Qt6 compilation
Change-Id: Icbc9ed41e75799d2d0e16ef16379fec05f80b62e
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-07-13 10:52:47 +00:00
Tim Jenssen
b8cd87dea0 Merge remote-tracking branch 'origin/qds-1.59' into 4.13
Conflicts:
	src/plugins/clangformat/clangformatplugin.cpp
	src/plugins/qmldesigner/designercore/model/qmlitemnode.cpp
	src/plugins/qmldesigner/qmldesigner.qbs

Change-Id: Ie4a0beeb9fd32ac9683f4e8769988a9c3f3e369a
2020-06-26 16:51:22 +02:00
Miikka Heikkinen
60ff6b6577 QmlDesigner: Improve usage of QML items as quick3d textures
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>
2020-06-25 08:07:41 +00:00
Tim Jenssen
f652167768 qmldesigner: add language to create scene command
and also save the last used language to settings

Task-number: QDS-2218
Change-Id: Ib82f7bc755755661183452b32829be3d048d9947
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2020-06-11 15:26:39 +00:00
Tim Jenssen
cbd0649e3b qmlpuppet: enable the use of multilanguage database
Change-Id: I2277348ac1e6b5025e75c640da83da30294c9d10
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-05-26 18:12:38 +02:00
Marco Bubke
0e7a1e6650 QmlDesigner: Preview size is now changeable
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>
2020-05-12 07:11:15 +00:00
Marco Bubke
dacea667ed QmlDesigner: Add ChangeLanguage command
Change-Id: If79de7d04717ad81af05411e61c262b9ff70129b
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-04-29 06:17:34 +00:00
Thomas Hartmann
3caafb2b81 QmlDesigner: Inspect components for existing states
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>
2020-04-21 10:57:26 +00:00
Mahmoud Badri
fb843d3442 QmlDesigner: Remove the standalone view3D window implementation
Task-number: QDS-1692
Change-Id: I6c04aaee9ab6a119cfcc22ee2e19b808bb95ae0a
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2020-03-05 11:00:11 +00:00
Miikka Heikkinen
4908055937 Integrate Edit3D view into Creator
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>
2020-02-24 12:18:53 +00:00
Miikka Heikkinen
7c992f5450 QmlDesigner: Insert a node dragged to 3d edit view into correct scene
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>
2020-02-07 10:17:47 +00:00
Mahmoud Badri
f97de35dd4 Improve edit view 3D "on top" logic
- 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>
2019-12-13 12:40:43 +00:00
Thomas Hartmann
880ab11e76 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>
2019-11-28 13:09:51 +00:00
Mahmoud Badri
5df7ad94ec Implement DnD 3D objects from the item library to the EditView3D
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>
2019-11-12 10:00:34 +00:00
Thomas Hartmann
9469432035 QmlDesigner: Add Qt5InformationNodeInstanceServer::modifyProperties()
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>
2019-10-24 08:22:11 +00:00
Thomas Hartmann
ac84f8a457 QmlDesigner: Implement Quick3DNodeInstance wrapper
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>
2019-10-21 11:30:19 +00:00
Thomas Hartmann
640044c8f8 QmlDesigner: Implement command for synchronising the selection
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>
2019-10-21 05:52:13 +00:00
Thomas Hartmann
c5fe523774 QmlDesigner: Fix eyeball in navigator for QQuick3DNode
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>
2019-10-09 12:02:36 +00:00
Eike Ziller
e5543eaebf Merge remote-tracking branch 'origin/4.10'
Change-Id: Id9cab641788f93cda9a81da9f156614b91d87b2a
2019-08-01 11:58:56 +02:00
Thomas Hartmann
0f3c8a3c7b QmlDesigner: Fix custom qml2puppet build
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>
2019-07-31 10:38:28 +00:00
hjk
e3b1106afa Compile fix with recent Qt dev
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>
2019-07-29 08:54:18 +00:00
hjk
a34bf6a23b QmlPuppet: Replace some foreach
Change-Id: I59b4049282564762f75aa5e9a7a0b7eba055db48
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-07-26 12:59:41 +00:00
hjk
6a58666f44 More Utils::toSet/toList
... and unrelated cosmetic changes.

Change-Id: I591b17fd5289831e701b683f8fb47816efd1fa67
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-07-04 12:28:38 +00:00
hjk
92a52a7181 Use Qt's QFileInfoList instead of QList<QFileInfo>
Helps to adapt to potential upstream changes in Qt 6

Change-Id: Ie154bd4fd513d46cb0493758be8943fc4581d71c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-05-28 07:19:45 +00:00
Tobias Hunger
d366944519 QmlPuppet: Modernize (nullptr and member initialization)
Change-Id: Ifac20a48df8702f9d31042eb8765cbaadb60b25b
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-09-20 12:40:18 +00:00
Thomas Hartmann
6745536f1e QmlDesigner: Fix @NodeInstance
With @NodeInstance we can override the value of any property.

Change-Id: Ib64d8b6823b82f0a809092b2468c008d73a5525c
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-09-20 12:18:43 +00:00
Thomas Hartmann
d942111ace QmlDesigner: Fix manual puppet build
The overload for the "+" operator is ambiguous.

Change-Id: Iaebd889ef2eaed6e2d4261ecbd9555a6ba73c521
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-11-22 16:14:04 +00:00
Nikolai Kosjar
ab87035ed3 QmlDesigner: Fix compilation
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>
2016-11-22 10:01:04 +00:00
Tim Jenssen
cff0c06f0c QmlDesigner: fix import check again
Task-number: QTCREATORBUG-17303
Change-Id: I0f7a054d63234f3f368de65fd6092c494a9055d4
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@theqtcompany.com>
2016-11-22 09:19:53 +00:00
Tim Jenssen
571168f9fb QmlDesigner: fix endless loop in check import code
Change-Id: Id1255ed1fd544e0eed75aeeeb2ffb3df8f75dc84
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@theqtcompany.com>
2016-11-21 15:44:33 +00:00
Thomas Hartmann
cb86cc3bdd QmlDesigner: Only register mockup object if not available
If a cpp type is somehow available do not create the mockup.

Change-Id: Ibd76429c3d1190c46a223062d77d676f728fe666
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-10-25 14:05:41 +00:00
Thomas Hartmann
4f2557e9cf QmlDesigner: Fix build of qml2puppet
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>
2016-10-07 10:20:23 +00:00
Tim Jenssen
83e128c2d9 QmlDesigner: refactor test import code
Change-Id: I4efaaacbbf2de23b8709535a7b9a2446f0a4b90e
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@theqtcompany.com>
2016-10-06 15:50:11 +00:00
Thomas Hartmann
d3b4acfae2 QmlDesigner: Allow qml2puppet to mockup C++ types
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>
2016-10-04 08:59:24 +00:00
Thomas Hartmann
9065697572 QmlDesigner: Support .qrc files in the qml2puppet
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>
2016-06-10 14:24:26 +00:00
Eike Ziller
4a826ada04 Merge remote-tracking branch 'origin/4.0'
Conflicts:
	qtcreator.pri
	qtcreator.qbs

Change-Id: I0cbc9d335073e3234f472aa43f462eef9a9178aa
2016-04-22 15:13:58 +02:00
Thomas Hartmann
27c00777d5 QmlDesigner: Fix assert
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>
2016-04-21 13:06:49 +00:00
Eike Ziller
5c87432260 Merge remote-tracking branch 'origin/4.0'
Conflicts:
	src/plugins/qmldesigner/components/propertyeditor/propertyeditorqmlbackend.cpp

Change-Id: I6ae2d37290643d69390f679a54f7596782f3d97f
2016-04-12 11:34:46 +02:00
Thomas Hartmann
eb172fbbd4 QmlDesigner: Fix assert
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>
2016-04-06 13:10:04 +00:00