Commit Graph

48 Commits

Author SHA1 Message Date
pre-commit-ci[bot]
9fe130cd73 All: Reformat according to new standard 2025-11-11 13:49:01 +01: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
Max Wilfinger
6692dacc0a Gui: Update UI strings for consistency
Closes: #22135
2025-08-04 20:14:45 +02:00
Kacper Donat
954b729b56 Gui: Use getObject<T>() helpers in classes
This commit is generated using regex based find and replace:

```
s/[\w:]+_cast\s*<([^>]+)\*>\s*\(\s*getObject\(\s*\)\)/getObject<$1>/
s/[\w:]+_cast\s*<([^>]+)\*>\s*\(\s*([^)]*)\s*->\s*getObject\(\s*\)\)/$2->getObject<$1>()/
```

To regenerate if needed.
2024-12-06 18:29:39 +01:00
wmayer
c30d42c441 Core: Rename ViewProviderPythonFeature to ViewProviderFeaturePython
Fixes #15888
2024-08-26 18:14:22 +02:00
Max Wilfinger
0652666321 use checkbox in menu item to display current object state and refactor the code 2023-12-28 11:30:49 +01:00
Max Wilfinger
a32d3b1046 Change the description of the default 'Toggle active object' command in the right click menu based on the current state of the selected object. 2023-12-27 09:10:30 +01:00
wmayer
888a33917d Gui: modernize C++: use equals default 2023-08-20 18:12:43 +02:00
wmayer
948cbfccd9 modernize C++: avoid bind
In many cases std::bind() is kept because the code is much simpler
2023-08-08 21:10:16 +02:00
luz paz
818e2b2841 Gui: fix trailing whitespace 2022-12-02 19:18:54 -06: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
0f5725b34a modernize C++: replace boost::function with std::function 2022-06-30 20:31:55 +02:00
wmayer
8f786ea6ef Gui: Optimize includes to reduce compile time 2022-03-07 20:29:18 +01:00
Uwe
a345a226d5 [Gui] ViewProviderOrigin* etc.: remove unused includes 2022-03-06 01:44:33 +01:00
Zoltan Hubert
da0c6cc545 fix in ViewProviderPart.cpp 2021-07-26 13:32:03 +02:00
Zoltan Hubert
78e5b1e5b7 modified ViewProviderPart to show different icon for Assembly-Type 2021-07-17 19:46:17 +02:00
luz paz
38815b9550 Gui: Fix header uniformity, whitespace, and doxygen fixes 2020-11-26 10:14:56 +01:00
wmayer
d6169d6478 boost: fix for boost < 1.60 2020-06-15 19:38:39 +02:00
wmayer
730154a684 boost 1.73.0: The practice of declaring the Bind placeholders (_1, _2, ...) in the global namespace is deprecated 2020-06-12 17:51:33 +02:00
Zheng, Lei
432c9ae15b Gui/PartDesign: fix setActiveObject() for Part and Body 2019-08-30 15:02:48 +02:00
wmayer
c3763479da activate/create 3d view when setting or getting active objects 2019-07-05 18:53:35 +02:00
wmayer
0388fa4bf9 fix inconsistencies between default action of context menu and double-click 2018-09-10 17:32:39 +02:00
wmayer
6a24bc9602 add class ViewProviderDragger
derive ViewProviderGeometryObject from ViewProviderDragger
derive ViewProviderPart from ViewProviderDragger
2017-11-26 15:42:57 +01:00
wmayer
3a0c3499e5 improve whitespaces 2017-09-09 18:07:46 +02:00
Stefan Tröger
0dd5f14918 Add new icons for Part and Group 2017-09-09 16:55:55 +02:00
Stefan Tröger
89bbb81521 Extension: Fix order-of-initialisation crash
FreeCADs property system utilises some pointer math to calculate the offset between
property and base class. Due to virtual inheritance of th ePropertyContainer the memory
layout has been changed to rather random, which has lead to crashes dependend on the
order of object initialisation.

The solution is to not make PropertyContaner virtual but a class below, Base::Persitance.
Then the memory layout is random for Persistance, but it is perfectly aligned for the
base class chains from PropertyContainer onwards as well as from Extension onwards.
Hence the proeprty system was changed to take the offset always from those two.
2016-10-08 12:48:34 +02:00
Stefan Tröger
6e1a029996 Extension: Port ViewProvider of Part 2016-10-08 12:48:34 +02:00
Stefan Tröger
6fa964c53f Extensions: Introduce classes and port App groups 2016-10-08 12:48:34 +02:00
DeepSOIC
218c81b7cc PartDesign: deactivate a container on double-click if already active
Before, it was impossible to deactivate a container (Part, Body) via gui
(or it wasn't obvious).
2016-05-21 01:31:06 +03:00
Stefan Tröger
d6a2acbd3a prevent parts from being dragged into parts 2016-04-12 18:12:22 +02:00
Alexander Golubev
d72a919384 OriginGroup: add new abstraction layer between the Part and the GeoFeatureGroup 2016-04-12 18:12:18 +02:00
Alexander Golubev
305151be34 App/Origin: big refactoring
- Rebase App::Origin on App::DocumentObject
 - Keep all control over the Origin structure inside the Origin and it's
   ViewProvider
 - Add OriginFeature class as common base for App::Plane and App::Line
 - Rebase App::Plane and App::Line on top of newly created class and
   move to the file.
 - Change Origin's ViewProvider API associated with temporary display
 - Lots of associated changes to files
 - Several minor fixes
 - Lots of new bugs
2016-04-12 18:12:18 +02:00
Alexander Golubev
e26c6174ac App/GeoFeatureGroup: derive from DocumentObjectGroup
Refactor GeoFeatureGroup and derive it from DocumentObjectGroup rather
than GeoFeatureObject to unify code of those two classes.
2016-04-12 18:12:17 +02:00
Alexander Golubev
dfeb2e3f42 Gui/ViewProciderPart: fix XZ plane orientation
Also fix spacing and a Workbench.getValue() condition
2016-04-12 18:12:17 +02:00
Stefan Tröger
b733d38064 better active part and document tip handling 2016-04-12 18:12:10 +02:00
Stefan Tröger
eba61e360d make origin work correct with multiple parts 2016-04-12 18:12:08 +02:00
blobfish
c8729fa2f2 Gui: ViewProviderPart: fix crash when no origin objects 2016-04-12 18:12:07 +02:00
Stefan Tröger
9c00c9a1bd code clean up 2016-04-12 18:12:06 +02:00
Stefan Tröger
6bcda82373 fix crash when deleting body 2016-04-12 18:12:06 +02:00
blobfish
0d6925fe2a Gui: Part: Viewprovider: check sub objects for valid view provider 2016-04-12 18:12:06 +02:00
Stefan Tröger
4d1ccd63c6 Prevent origin and base entities from transforming 2016-04-12 18:12:05 +02:00
Stefan Tröger
46e4e3b2b4 group coordinate planes and lines 2016-04-12 18:12:05 +02:00
Stefan Tröger
b401f07bdf add base lines 2016-04-12 18:12:05 +02:00
Stefan Tröger
940857e508 Adopt planes to Part size 2016-04-12 18:12:04 +02:00
jriegel
d87d0e8376 Assembly: Rename to setActiveBody and make link indeipendant Part initialization 2016-04-12 18:12:02 +02:00
jriegel
4fb12b7dcd Assembly: Add GeoFeatureGroup and helpers 2016-04-12 18:12:02 +02:00
jriegel
29efef2175 Add path and view provider for Part 2016-04-12 18:12:02 +02:00