Commit Graph

993 Commits

Author SHA1 Message Date
Christian Stenger
e65e4b81ea QmlDesigner: Fix build of tests
Amends b0c47267d8.

Change-Id: I62c8007156a0f9cebdcc83c2f4cef135e19d27e2
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2020-09-01 09:44:48 +00:00
Marco Bubke
b0c47267d8 QmlDesigner: Inline vector stream operators
Task-number: QTCREATORBUG-24548
Change-Id: I01d1b6e12c04c4ea47279e3a5046a0d3e34a5c09
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-09-01 09:10:19 +00:00
Marco Bubke
7962dbb413 QmlDesigner: Fix CapturedDataCommand
Change-Id: I7dbbce3c071440924550140002d81128befa3404
Reviewed-by: Michael Winkelmann <michael.winkelmann@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-08-25 08:22:08 +00:00
Michael Winkelmann
c78f9352d2 QmlPuppet: Fix build error for ChangeLanguageCommand on MinGW
Change-Id: I190097871e1abf6932fdbb93293e189af7809793
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-08-21 07:15:49 +00: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
098d32b370 QmlPuppet: Refactor ChangeLanguageCommand
Change-Id: I31813d13da753ba742488943afea673540b3a3fa
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2020-08-20 09:32:48 +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
22fcfb0d6f QmlDesigner: Fix compilation of coretests
This reverts commit 7856c2c2f0. There were files
compiled which are not used in the tests but have external dependencies.
So instead of using the preprocessor we simply don't link the source
files in the project.

Change-Id: Ibba4a1dace1868b016af7135262c795bb29af204
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-08-18 12:14:06 +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
Marco Bubke
bfddaf6f9f QmlDesigner: Fix linux build
Change-Id: I32f560e18def0a72f2b94ab2fa9e8b6ea20f1bc4
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-08-13 12:36:30 +00: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
Miikka Heikkinen
32f71ca8ff QmlDesigner: Fix group selection for 3D scenes that have Models as root
Change-Id: If6ec2bcb4a4627fcf658e23f6998115a68718ee8
Fixes: QDS-2467
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2020-08-07 10:56:53 +00:00
Miikka Heikkinen
a774890a10 QmlDesigner: Fix default transformMode setting in 3D edit view
Change-Id: Ia918d05bf58d9460e25e9fa4dd592c68c03bd0cf
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2020-08-07 10:55:31 +00:00
Miikka Heikkinen
5343490eb4 QmlDesigner: Fix pivot point scaling
Now pivot point in 3D edit view will always appear same size regardless
of the viewing angle.

Change-Id: Iddd4fc8800eecbc63f16fc130b7f93dcba4d5d65
Fixes: QDS-2570
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-08-07 07:27:13 +00:00
Miikka Heikkinen
4d45e2defe QmlDesigner: Fix 3D overlay object colors
Recent changes to Quick3D changed how NoLighting materials work.
Emissive color no longer has effect in that case, so use diffuse color
instead.

Change-Id: Idde43f5bdf06a432a5dd06f9c52d6812fa790a73
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2020-08-04 10:51:58 +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
Miikka Heikkinen
fccc02de96 QmlDesigner: Allow starting free drag on initial selection press
Changed object selection to be done on press instead of click, and
the initial press now also starts free drag of the selected object
after a short distance moved to prevent accidental drags.

Change-Id: I61656661cd734d167ef9f8db42d986f0e97402a3
Fixes: QDS-2376
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2020-07-03 11:35:49 +00:00
Miikka Heikkinen
38ded4ffea QmlDesigner: Turn the 3D edit light on initially for lightless scenes
Change-Id: Ib840adec751604f08b5135b3e3088b7ce663685a
Fixes: QDS-2316
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2020-06-29 13:30:07 +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
Eike Ziller
40a14070d3 Merge remote-tracking branch 'origin/4.13'
Change-Id: Ie67085fcbb4150c60f0253312e19a82b95b4a898
2020-06-29 09:01:31 +02:00
The Qt Project
018e4aa197 Merge "Merge remote-tracking branch 'origin/qds-1.59' into 4.13" into 4.13 2020-06-29 04:38:48 +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
Artur Shepilko
1522dc98c1 Qmlpuppet: Remove an explicit bool type for fitAndHideBox() function
Explicit return values in qml functions cause errors in some Qt
versions, so remove the need for it.

Change-Id: Idd3035b19b56c25e94bc846c3de8f7aa5381e1eb
Reviewed-by: Artur Shepilko <artur.shepilko@nomadbyte.com>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2020-06-26 13:57:15 +00:00
Miikka Heikkinen
2949504a9d QmlDesigner: Fix draggable priorities in 3D edit gizmos
Upped default priority of all directional draggables a bit to make
them preferable to free rotation ball.

Change-Id: If934cb723e8c1a8ca9a114d71b19cbfc196e2682
Fixes: QDS-2286
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2020-06-26 13:56:52 +00:00
hjk
dbca372780 QmlPuppet: Fall back to pre-Qt5.2 for QVariant comparison
Change-Id: Ibf55561e01f50ec7d689d40b50d100b8d257aa80
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-06-26 07:11:16 +00: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
Tim Jenssen
86cf85af5e qmlpuppet: improve text
Change-Id: Ibd1b7cd783561bc0b1e853e8875ee631eddb85d6
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-06-16 14:34:59 +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
0a83cc4e88 QmlDesigner: Show the scene id in 3D edit view
It's sometimes hard to tell which scene is shown in 3D edit view, so
added the scene id to the upper left corner of the view.

Task-number: QDS-2239
Change-Id: I5999e41c3f92028cd9a0f79ae0c8b72263d9ce42
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-06-09 12:31:37 +00:00
Miikka Heikkinen
5551791077 QmlDesigner: Fix hover hightlight of 3D edit icon gizmos
MouseArea.containsMouse gets confused when the mouse input gets grabbed
by an overlapping 3D mouse area.

Change-Id: I6ee69f217d95c5e4f3f5361e14c932ce0a2feab0
Fixes: QDS-2187
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-06-09 12:28:03 +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
47ca3ccd8f QmlDesigner: Fix RotateGizmo and LightGizmo label z-value
Labels went under IconGizmos, so increased the z-value to match that
of MoveGizmo label.

Change-Id: I2620db0cadfadc73808a3a9f9967aadf87c9a863
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-06-09 12:16:24 +00:00
Miikka Heikkinen
b2b590ae24 QmlDesigner: Restart overlay update timer on each request
If timer is not restarted on each request, the update can end up
happening before the next frame has been rendered. This can happen e.g.
at puppet startup, where the delay between first request and first
frame render can easily be more than 16ms.

Change-Id: Ib9555548e8c60799c585d0ab43d0626cfa31a494
Fixes: QDS-2082
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-06-09 12:14:35 +00:00
Miikka Heikkinen
cfa8373ce0 QmlDesigner: Remove unused signal
Change-Id: If0adce20a27575f7b4a39a08836da250d0b7bae6
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-06-09 12:13:32 +00:00
Miikka Heikkinen
b441988b58 QmlDesigner: Add fade control handle to point light gizmo
Also changed the point light mesh to just a single camera plane ring
based on discussions with UX.

Change-Id: If9e847440570bbe87483194c0b417cf09c7084a2
Fixes: QDS-2041
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-06-09 12:13:13 +00:00
Miikka Heikkinen
327821220c QmlDesigner: Add handles to light gizmo for adjusting area light
Change-Id: Ic12bd6f5ec8800d7a42064247eecbb742ebea40c
Fixes: QDS-2040
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-06-09 12:12:55 +00:00
Miikka Heikkinen
e4b2e45ea6 QmlDesigner: Implement spotlight drag handles
Inner cone visualization for spotlight was added, as well as drag
handles to adjust inner and outer cone angles and fade.

Fade handle adjusts fades in order: quadratic, linear, constant.
If a specific fade value is zero, the next one in list is chosen
for adjustment.

Change-Id: I921936d9782de511558bc6c24cfa0953cce494f0
Fixes: QDS-2038
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-06-09 12:12:32 +00:00
Miikka Heikkinen
387657b83a QmlDesigner: Add missing camera plane ring to point light model
Task-number: QDS-2037
Change-Id: Ica5a7ec2983da251d2ab75565120423288de27a2
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-06-09 12:10:58 +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