Commit Graph

48 Commits

Author SHA1 Message Date
PaddleStroke
0a010b1300 Core: move getPlacementProperty to be more accessible (#26088)
* Core: move getPlacementProperty to be more accessible

* Update DocumentObject.h

* Update DocumentObject.cpp

* Update ViewProviderDragger.h

* Update ViewProviderDragger.cpp

* Update DocumentObject.h

* Update DocumentObject.cpp

* Update ViewProviderLink.cpp

* Update DocumentObject.h

* Update DocumentObject.cpp

* Update DocumentObject.h
2025-12-12 11:59:03 +00:00
pre-commit-ci[bot]
9fe130cd73 All: Reformat according to new standard 2025-11-11 13:49:01 +01:00
Kacper Donat
d14743c2a5 Gui: Fix transform of link sub-elements 2025-09-22 11:17:04 -05:00
captain0xff
6282b7c08d Gui: refactor gizmo attachment code 2025-09-17 15:46:35 +02:00
Markus Reitböck
a72a0d6405 Gui: use CMake to generate precompiled headers on all platforms
"Professional CMake" book suggest the following:

"Targets should build successfully with or without compiler support for precompiled headers. It
should be considered an optimization, not a requirement. In particular, do not explicitly include a
precompile header (e.g. stdafx.h) in the source code, let CMake force-include an automatically
generated precompile header on the compiler command line instead. This is more portable across
the major compilers and is likely to be easier to maintain. It will also avoid warnings being
generated from certain code checking tools like iwyu (include what you use)."

Therefore, removed the "#include <PreCompiled.h>" from sources, also
there is no need for the "#ifdef _PreComp_" anymore
2025-09-14 09:47:03 +02:00
Kacper Donat
bca09d0ce6 Gui: Use no_except=true for getExtensionByType in ViewProviderDragger
Fixes: #22166
2025-06-25 12:54:11 +02:00
Kacper Donat
f71d1cf875 Gui: Use proper placement property for Link
Links require different placement property (LinkPlacement) to be used,
otherwise it breaks the transform.

Fixes: #20776
2025-06-22 23:04:06 -05:00
Max Wilfinger
a05cb9847c Gui: Fix dragger update when moving to target object and make flip independent of selected components. 2025-06-11 20:58:47 +02:00
Max Wilfinger
d64efad081 Advanced options for move to other object in the transform tool.
Allows for masking of individual translation or rotation axes.
2025-06-08 16:18:01 +02:00
captain0xff
68a8575536 Gui: rename TaskCSysDragger to TaskTransform 2025-04-28 23:30:14 +02:00
captain0xff
d2ff41dbd7 Gui: moved dragger classes to separate folder and files
* renamed SoFCCSysDragger to SoTransformDragger
* moved TDragger, RDragger and TPlanarDragger to separate files and also renamed them to be more descriptive
2025-04-13 21:36:54 +02:00
Kacper Donat
4b0a70b62d Gui: Disable Show Placement for Body Features 2025-04-13 17:54:01 +02:00
Kacper Donat
3e2f88b74c Gui: Hide Placement Indicator with object 2025-04-13 17:54:01 +02:00
Kacper Donat
fba2e31f6c Gui: Ensure that placement indicator is always on top 2025-04-13 17:54:01 +02:00
Kacper Donat
569ddc345b Gui: Add Show Placement utility 2025-02-24 17:30:27 +01:00
Benjamin Nauck
6f535f19fb Prefer to use BaseClass's isDerivedFrom<T> over non template or Base::Type's
Regex based changes, manually verified
2025-01-27 16:08:18 +01:00
wmayer
28dcc54f0b Fix several compiler warnings 2025-01-14 13:34:18 -06:00
Kacper Donat
bc0455d483 Gui: Zero out rotation only if more than 1 axis changed 2025-01-04 16:32:52 +01:00
Kacper Donat
d7aa1bb2ef PD: Forward transform requests to Body 2025-01-04 16:32:52 +01:00
Kacper Donat
f9efd69040 Gui: Make ViewProviderLink based on ViewProviderDragger 2025-01-04 16:32:52 +01:00
Kacper Donat
4702c72fb8 Gui: Rework TaskCSysDragger into new Transform Dialog
This commit refactor ViewProviderDragger and TaskCSysDragger to be more
modern and to support selecting TransformOrigin.
2025-01-04 16:32:52 +01:00
Kacper Donat
ceb0447d03 Gui: Reduce Transform Dragger size
Fixes: #13853
2024-07-15 10:57:19 -05:00
qewer33
cdf69d692f Gui: Transform dragger fix lint warnings 2023-09-19 21:04:25 +03:00
qewer33
53e3af5f98 Gui: Transform dragger fixes 2023-09-19 18:24:19 +03:00
qewer
01ff476b2f Gui: Transform dragger improvements (#10706)
* Gui: Improve transform dragger appereance

* Gui: Implement axis color parameters

* Gui: Implement plane draggers for the Transform tool

* Gui: Clean comments in Transform dragger files
2023-09-18 10:34:26 -05:00
didendron
ce2c0ed322 Gui: Add cancel button to transform task UI dialog
Fixes #7517
2023-09-04 16:43:27 +02:00
wmayer
888a33917d Gui: modernize C++: use equals default 2023-08-20 18:12:43 +02:00
wmayer
b0c9871722 Use View3DInventorViewer::setSelectionEnabled instead of SoFCUnifiedSelection::selectionRole 2023-05-04 08:03:11 +02:00
berniev
ae53c9b0a4 Gui: Use auto and range-based for (#7481)
* On lines where the variable type is obvious from inspection, avoid repeating the type using auto. 
* When possible use a ranged for loop instead of begin() and end() iterators
2022-09-14 13:25:13 -05:00
berniev
3d1f70765a Gui: redundant void 2 2022-08-08 10:21:44 +02:00
wmayer
d5340a82ab Gui/Mod: replace several reinterpret_cast with static_cast 2022-06-25 11:36:55 +02:00
wmayer
1178df06b4 Gui: modernize C++11
* use nullptr
2022-03-23 18:41:21 +01:00
Uwe
a830d92947 [Gui] ViewProviderDocument* etc.: remove unused includes 2022-03-06 00:01:37 +01:00
Uwe
9741854a39 [Gui] ViewProviderDragger: add missing include 2022-02-17 04:35:10 +01:00
Uwe
33ff01ec66 [Gui] ViewProviderDragger: remove unused includes
- also sort them
2022-02-17 04:13:53 +01:00
Uwe
732d8c3a21 [Gui] add context menu icon for Std_TransformManip
- the other context menu entries have icons and we use this icon already in the Edit menu

- also sort the includes
2022-02-17 03:49:02 +01:00
luz paz
fd3f2b0092 Fix various typos and refinements 2022-01-06 20:22:34 +01:00
luz paz
c93bf6cbae Gui: Issue #0004473: Expose openCommand() to translation
Continuing the work to expose the undo/redo functionality to translation. This commit does so for the src/Gui code.  
Ticket: https://tracker.freecadweb.org/view.php?id=4473
2020-12-01 14:53:35 +01:00
luz paz
38815b9550 Gui: Fix header uniformity, whitespace, and doxygen fixes 2020-11-26 10:14:56 +01:00
wmayer
df02e0ad67 Gui: [skip ci] add method extensionSetupContextMenu to extension view provider 2020-11-08 13:36:31 +01:00
Zheng, Lei
2f53721d9d Gui: fix Std_Transform tool
The problem is caused by tracking of editing object placement
introduced in b25ad5e085a42800c0ebd7a507233f081fcee7ef.

After this commit, any editing object can disable placement tracking by
calling Gui::Document::setEditingTransform() inside either
ViewProvider::startEditing() or setEditingViewProvider().
2019-12-21 15:17:48 +01:00
luz.paz
63a577fe07 Fix typos in src/Gio 2019-08-17 15:32:49 +02:00
Zheng, Lei
d4ac072306 Gui: support in-place editing
The link support means that an object can now appear in more than one
places, and even inside a document different from its own. This patch
adds support for in-place editing, meaning that the object can be edited
at correct place regardless where it is.

See [here](https://git.io/fjPIk) for more info about the relavent APIs.

This patch includes two example of modifications to support in-place
editing. One is the ViewProviderDragger, which simply adds the dragger
node to editing root node by calling
View3DInventorViewer::setupEditingRoot(dragger). The other much more
complex one is ViewProviderSketch which calls setupEditingRoot(0) to
transfer all its children node into editing root. ViewProviderSketch
also includes various modifications to command invocation, because we
can no longer assume the active document is the owner of the editing
object.

This patch also includes necessary modification of the 'Show' module to
support in-place editing.
2019-08-17 15:08:32 +02:00
wmayer
2f8179719e call updateData of base class for ViewProviderDragger and ViewProviderGeometryObject 2019-07-02 12:08:23 +02:00
wmayer
90258a47f0 move check for grabbed node and releasing it from ViewProviderDragger::unsetEditViewer to View3DInventorViewer::resetEditingViewProvider 2018-09-11 17:27:17 +02:00
wmayer
a5805c412f when leaving dragger edit mode make sure to release the grabbed node 2018-09-06 12:42:08 +02:00
wmayer
d4dc3aebfe fix possible crash with draggers in transform edit mode of a view provider 2018-03-18 10:11:35 +01:00
wmayer
6a24bc9602 add class ViewProviderDragger
derive ViewProviderGeometryObject from ViewProviderDragger
derive ViewProviderPart from ViewProviderDragger
2017-11-26 15:42:57 +01:00