Commit Graph

471 Commits

Author SHA1 Message Date
Miikka Heikkinen
31ec38dba5 QmlDesigner: Add navigator tooltip for 3D Components with Node root
This enables showing preview tooltip for all imported 3D models.

Also moved the preview image handling out of the model and into
NodeInstanceView, where it fits more naturally.

Change-Id: I48135d06aa8d9313525dae618e22692563da78fd
Fixes: QDS-2807
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-09-22 13:35:20 +00:00
Miikka Heikkinen
762addfbd0 QmlDesigner: Add navigator tooltip for 3D Model nodes
Only the source and geometry properties of the model is taken from the
node, rest of the properties are always same for consistent style.

Change-Id: I2355ce91c3e3d6f23b9f27ecf31430e3e13d0c80
Fixes: QDS-2764
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2020-09-22 13:35:10 +00:00
Eike Ziller
5ad724c61b Merge remote-tracking branch 'origin/4.13' into master
Conflicts:
	src/plugins/qmakeprojectmanager/qmakeproject.cpp

Change-Id: Ieb1c3e946f11d3c4fa1ee6b5afdf83cc532d8aed
2020-09-17 10:28:19 +02:00
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
Michael Winkelmann
64a37ec38a QmlPuppet: Return color property
Change-Id: Icc25fb0408aae50f67633688f221194ab6f77cd3
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2020-09-14 13:45:15 +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
3b76714290 Merge remote-tracking branch 'origin/4.13' into master
Conflicts:
	share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/ListViewSpecifics.qml
	share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/MouseAreaSpecifics.qml
	share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/RowSpecifics.qml
	share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/FlickableSection.qml
	share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/FontSection.qml
	share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/StandardTextSection.qml

Change-Id: Ie5deacd39ae4f3c0966e7cb41a8fd832dcefbb09
2020-09-03 12:18:02 +02:00
Miikka Heikkinen
893d5901a6 QmlPuppet: Fall back to primitive creation if component creation fails
This ensures components defined in .qml files get loaded properly.

Change-Id: I070132ab5ad58b2531f27f623f218e0ee3565c5b
Fixes: QDS-2697
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-09-01 13:47:53 +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
Marco Bubke
fcabab7b5f QmlDesigner: Extend captured data
Change-Id: I780815e6f42be4f3aceb1d784a685cc330572832
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-08-17 14:45:22 +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
dc870f538d Prepare merge of qds-1.59 to 4.13
It is not compiling but we are closing this branch anyway.

Change-Id: If96318175d92ae492871d668d5c937c473fd05d5
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-08-13 06:24:10 +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
Marco Bubke
da29ff0433 QmlDesigner: Fix prefiew size
Change-Id: I126c50209f2849d0212f0d295b35cba0f25f2728
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-07-17 12:24:40 +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
Miikka Heikkinen
85bcae2c38 QmlDesigner: Handle active scene id change properly on edit 3D view
The scene id shown on the corner of edit 3D view is updated and
toolstates are also stored under the new id.

Change-Id: Ib3ac2f2bb829a5d908e22932c313c76bd4143592
Fixes: QDS-2277
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2020-06-29 10:19:45 +00:00
Miikka Heikkinen
ba942583b8 QmlDesigner: Update 3D edit view on state change
Change-Id: I56b16afe4d9ccab802d6e07f60b57e46a353cc26
Fixes: QDS-2378
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2020-06-29 10:06:55 +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
Thomas Hartmann
003282c6f5 QmlDesigner: Fix crash on puppet
Change-Id: I233d3dab5a509bfd7c9a30c7dcc15dcf8751f456
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-06-26 06:48:26 +00:00
Thomas Hartmann
a381d8efc8 QmlDesigner: Fix crash on puppet
Change-Id: I233d3dab5a509bfd7c9a30c7dcc15dcf8751f456
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-06-25 12:02:57 +00: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
Christian Kandeler
fcef4709bb qmlpuppet: Fix function linkage
Putting static functions into a header file causes warnings in all cpp
files that include the header and don't use the function.

Change-Id: I9147c034092515e486dc6113a1b053f4d8094686
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-06-15 12:06:31 +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
3acdb7891b Merge remote-tracking branch 'origin/qds-1.59'
Change-Id: I8891e7490a7fd51997a3b57561961f6134be3252
2020-06-11 12:54:10 +02:00
Thomas Hartmann
ad4c5e0258 QmlDesigner: Fix puppet crash
Change-Id: I2a408d090c4bbf2c3da7f03473312eff4b7e6c34
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-06-10 16:02:59 +00:00
Miikka Heikkinen
29ceaade9c QmlDesigner: Restore the previously active 3D scene on scene creation
Store the last active scene in global 3D tool state and restore it
when a scene is created after puppet relaunch.

Change-Id: Ie2d69f6db6798ab383c66d38b2dea7eba13adc97
Fixes: QDS-2239
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-06-09 12:31:57 +00:00
Miikka Heikkinen
5b28847648 QmlDesigner: Fix drag-adjusting values not ending up with correct value
When drag-adjusting e.g. brightness or position of the object in 3D
edit view, the value ending up in property editor and qml doc didn't
always match what was displayed on 3D edit view. This happened because
ValuesModifiedCommand was compressed to 100ms intervals, but any
property changes also sent ValuesChangedCommand at 16ms interval,
which changed the instance value at backend, but not the model value.

Fixed by comparing modified value to model value instead of instance
value.

Also made the 100ms compression timer singleshot, so the backend
wouldn't be unnecessarily bombarded with ValuesModifiedCommand when
holding the mouse still while dragging.

Change-Id: If86dcd61bcf0c04735d65648e4c34d9d214c5313
Fixes: QDS-2081
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-06-09 12:18:08 +00:00
Miikka Heikkinen
3d162524e4 QmlDesigner: Add brightness control to light gizmo
Brightness can be controlled by dragging on the brightness indicator
arrow of the light gizmo in 3D edit view.

Change-Id: I317f5ee08b59bcc0bebf3fdf59861df15ef13c84
Fixes: QDS-2039
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-06-09 12:09:55 +00:00
Henning Gruendl
b851b71128 Fix compilation under linux
Change-Id: I3070876f0549a9fb7c3a52c5bc99638bad2d2894
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-06-03 09:09:38 +00:00
Thomas Hartmann
c8d7d44bfb QmlDesigner: Fix changePreviewImageSize
If the size is invalid set the default size.
Invalid size most likely means the setting was removed.

Change-Id: I3f1dad5bdac799673d37036099d954caab9aca19
Reviewed-by: Michael Winkelmann <michael.winkelmann@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-05-26 18:14:14 +02: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
Tim Jenssen
03a1282bdd Merge remote-tracking branch 'origin/qds-1.50' into qds-1.59
Change-Id: Ic0edcce1268b9cc47c91364eeb84e3b3f7dfe134
2020-05-12 10:04:10 +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
Thomas Hartmann
33c88a0ced QmlDesigner: Expose component url
Change-Id: I2b1708e6f87b00ad0b56c04f591ba24720a886ba
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-05-06 20:17:01 +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
Thomas Hartmann
74ffff63eb QmlDesigner: Allow setting state property
This has to be blocked only for the root item.

Task-number: QDS-1979
Change-Id: Ia05255468623fe715e3f7172e2f058a70629b783
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-04-21 09:43:11 +00:00
Thomas Hartmann
970f075e33 QmlDesigner: Show proper error message for component
If a component cannot be created we have to show a proper
error message.

Task-number: QDS-1980
Change-Id: I48a6ff0fd89c9666328c501abb00dc0997171d96
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-04-21 09:41:12 +00:00
Unseon Ryu
fee8848297 fix incorrect GaussianBlur shader code generation
m_quickView in Qt5NodeInstanceServer::initializeView()
is instantiated with setProfile(QSurfaceFormat::CoreProfile)
However QGfxShaderBuilder::QGfxShaderBuilder() initiates and
generate the gaussian blur shader code with referring default format.
that doesn't set the profile to QSurfaceFormat::CoreProfile.

The correct resolution is to get profile with accessing current window.
But QGfxShaderBuilder is not QQuickItem so it doesn't have any way to
access current window.

As qmlscene does, it could be a nice solution to keep the current
surface format as default when instantiating QQuickView.

Fixes: QDS-1864
Change-Id: I0fcf80effccebf7cfe8e58c071cf121b6af5bdbd
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2020-04-06 07:48:37 +00:00
Miikka Heikkinen
09f34a697f QmlDesigner: Fix crash in puppet when component has errors
Check component creation errors earlier to avoid crash.
This allows puppet to notify creator about the problem, so invalid
components can be properly highlighted in navigator.

Change-Id: I059a5be04c4e509a38f6d47daa97e0da36c333ae
Fixes: QDS-1887
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2020-04-02 12:20:35 +00:00
Miikka Heikkinen
e0751d56d0 QmlDesigner: Colorize light gizmos
Light gizmo icons and models are now colored based on the light color.
Image provider is used instead of simpler ColorOverlay component,
as ColorOverlay doesn't properly handle transparency when rendered
offscreen in puppet.

Change-Id: If6af915bca9bea2cb48ac23ac6c5ba46dc150e3b
Fixes: QDS-1733
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-03-31 07:39:16 +00:00
Miikka Heikkinen
9a2eedf196 QmlDesigner: Show selection and gizmo for scene root light/camera
Change-Id: Ib650a5e331cf2936ef20a47abec5086bb08f06d2
Fixes: QDS-1857
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2020-03-30 12:30:33 +00:00
Miikka Heikkinen
cbb7099902 QmlDesigner: Fix scene root finding logic
If there's a single node child on View3D, detect that as scene root
when another non-node direct child of View3D is selected.

Change-Id: Ib538b0ae368e7b460700a99e4c450a15586c2f62
Fixes: QDS-1865
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2020-03-30 11:24:49 +00:00
Mahmoud Badri
621a823a53 QmlDesigner: Enable toggling the helper grid on/off
Also remove the toolbar buttons from the puppet side and few other
clean-ups.

Task-number: QDS-1849
Change-Id: I075753552043a9f1bc649f6baf54dc7b689e4f64
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-03-30 09:57:03 +00:00