Commit Graph

33 Commits

Author SHA1 Message Date
PaddleStroke
4f323f9580 Core: Enable TaskDialogs to associate view (#17373)
* Core: Add possibility for task dialogs to associate a view and be able to close when associated view is closed.

* TaskImage: Use task dialog view association.

* Sketcher: Use task dialog view association. Preventing crash (https://github.com/FreeCAD/FreeCAD/issues/16702)

* EditableDatumLabel: Use QPointer to prevent crash
2024-10-29 09:58:11 -05:00
wmayer
112f4a2d29 Core: Do not set to XY plane by default if the rotation of the image doesn't match 2024-09-28 19:05:52 +02:00
wmayer
09e140cf19 Core: Fix resetting placement of transformed image
The restored Euler angles of a rotation may significantly differ from the input Euler angles so that determining the plane isn't very reliable.
To get the plane reliably multiply (0,0,1) with the rotation and use this as reference normal of the plane.
2024-09-28 18:46:35 +02:00
wwmayer
977e13795a Gui: Prepare for clang-format (#16051)
* Gui: Prepare for clang-format

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-09-02 17:48:55 +02:00
PaddleStroke
29889bfd9a Core: Image taskbox : close if document is closed. 2024-07-15 11:33:24 -05:00
wmayer
30d8a74ce7 Gui: Fix crash when trying to calibrate image after document is closed 2024-07-04 22:19:42 +02:00
wmayer
0ed7eb5652 Gui: use of TaskDialog::addTaskBox 2024-03-26 15:57:20 +01:00
Chris Hennes
cbd0ef5975 Merge branch 'main' into modernize-type-check 2023-10-25 16:07:28 -05:00
Paddle
7f1fe0a3f7 EditableDatumLabel : Change the 'invisibleToMouse' to 'visibleToMouse' to avoid double negation.
Also add parameter to startEdit to set this setting. Defaulting to false. So that we don't have to set manually again and again in tool settings.
2023-10-24 19:27:10 +02:00
Florian Foinant-Willig
773c701eec Core: modernize type checking 2023-10-23 18:07:07 +02:00
wmayer
56820718c5 Core: Revert superfluous changes made with PR #9521 2023-10-09 15:06:45 +02:00
AgCaliva
dacb2c43a4 Merge branch 'master' into User/Document/Feature_level_units_selection_#7746 2023-09-18 14:01:25 -03:00
wmayer
da65485979 Gui: fix clang-tidy warnings in TaskImage 2023-09-17 19:11:31 +02:00
Paddle
a6971d376c TaskImage: remove the spinbox/sodatumLabel gestion and use the global EditableDatumLabel instead. 2023-09-17 13:05:53 +02:00
AgCaliva
280e5e3987 Fixing DOMDocument redefinition 2023-09-16 00:38:41 -03:00
wmayer
963322876f Gui: fix several pending issues of image scale:
* refactor some functions
* do not use mdi view of active document as parent for spin box because this can be the wrong widget
* fix compiler warnings of unused variables
* fix typo
* handle Qt::Key_Return in event filter
* fix lint error
2023-04-20 16:52:06 +02:00
Paddle
b3e1d3dc6a TaskImage: Fix segfault when doc closed before taskview is dismissed. 2023-04-17 16:03:11 +02:00
Paddle
ba1ed19643 TaskImage: Remove 'outside picture' mode. 2023-04-17 15:10:13 +02:00
Paddle
7b3069868d TaskImage: Simplify restore & updatePlacement. It will make it easier if we want to enable other planes than XY XZ ZY. 2023-04-12 18:52:04 +02:00
Paddle
b10a7a65db TaskImage: finish fixing when imageplane is in transformed part. 2023-04-12 18:23:35 +02:00
Paddle
e168be3397 TaskImage: try to fix bug when in Part container. 2023-04-12 17:50:59 +02:00
Paddle
6487c748e6 TaskImage : fix X Y distances that were not taken into account for SoDatumLabel transform. 2023-04-12 17:50:42 +02:00
Paddle
08d87644a9 Task image. replace {} with () in the ctor for consistency 2023-04-12 17:49:54 +02:00
Paddle
c90dc541cd TaskImage: fix X,Y distance that were reversed on XZ and ZY. 2023-04-12 17:49:18 +02:00
Paddle
c9c9920531 TaskImage: Fix enter doesn't work. 2023-04-12 16:48:08 +02:00
Paddle
a8f65156db TaskImage: fix issues 2023-04-12 16:48:08 +02:00
Paddle
46a9d89e4b TaskImage: add missing headers 2023-04-12 16:48:08 +02:00
Paddle
3be327d29e TaskImage: Fix Cancel on Esc and final ui adjustments. 2023-04-12 16:48:08 +02:00
Paddle
33614f4c02 TaskImage : Remove OK and Cancel buttons and others 2023-04-12 16:48:07 +02:00
Paddle
31b2cf68d6 TaskImage : Add OK and Cancel buttons. 2023-04-12 16:48:07 +02:00
Paddle
0acbb881cb TaskImage: rework interactive scaling tool. 2023-04-12 16:48:07 +02:00
Paddle
9172157d40 TaskImage: use SoDatumLabel instead of basic line. 2023-04-12 16:48:07 +02:00
Paddle
1071fb1cdd Image: Merge taskboxes into one 'Image plane Settings'
- Allow user to position the image with a X / Y distance.
- Allow user to rotate the image on its plane.
- Adds Transparency.
- Image sizes change from PX to System unit as PX don't make sense for the user.
2023-04-12 16:48:07 +02:00