Commit Graph

6 Commits

Author SHA1 Message Date
Henning Gruendl
3ad3a5f197 QmlDesigner: Remove unnecessary imports
Remove QtQuickDesignerTheme import if not needed.

Task-number: QDS-11177
Change-Id: Ia72001855bb636bfc2ddf11cbb00359fbe123c90
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2024-01-17 08:01:09 +00:00
Miikka Heikkinen
516a2238e2 QmlDesigner: Ensure we save the latest values on 3D snap dialog close
Track value property of spin boxes changes directly instead of the
extra valueModified signal, which is not emitted in all cases.

Also removed duplicate applying of snap configuration.

Fixes: QDS-10653
Change-Id: If0ce7bffa1dcfb5b01e80b6e962f356f91f44d51
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2023-09-18 10:09:31 +00:00
Miikka Heikkinen
f3036d52e5 QmlDesigner: Fix dragging 3D snap configuration spinboxes
Changed to use HelperWidgets.DoubleSpinBox, which has the proper drag
support built into it and implemented required context functions.

Fixes: QDS-10639
Change-Id: I6fce39251d7f754985f95bba5784784fc6eb8fae
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
2023-09-15 12:52:30 +00:00
Miikka Heikkinen
757c1734df QmlDesigner: Overhaul 3D snapping UI
Fixes: QDS-10532
Change-Id: I00dc78831aed62e0a93000938f514a04c2ab3a50
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2023-08-31 13:57:30 +00:00
Miikka Heikkinen
84e537f313 QmlDesigner: Add scale and rotation snapping to 3D view
Fixes: QDS-10464
Change-Id: I9b327b21a3e09313664b2b4b47772e3cb4244327
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2023-08-29 14:03:36 +00:00
Miikka Heikkinen
3d77155cea QmlDesigner: Implement snapping to increment
When ctrl is pressed during move gizmo drag, the move is snapped to
configurable increment. If the drag axes are aligned to the global
axes, the snapping can be done either to absolute grid or increment
to start position, depending on snap options selected.

If drag axes are not aligned, then drag is simply snapped to
configured increment length along the drag vector regardless of
configuration.

All snapping settings are persistent and shared by all 3D scenes.

Fixes: QDS-10463
Change-Id: I9407e558aae0ad8b72d975fb6dfa15a4e78f6ee8
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
2023-08-24 09:37:48 +00:00