Commit Graph

77 Commits

Author SHA1 Message Date
Markus Reitböck
63ab3de853 TechDraw: 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-23 00:50:59 +02:00
theo-vt
f32ae1ca17 TechDraw: add transactions to multiple commands (#22795)
* TechDraw: add transactions to multiple commands

* Feed each 'Create Dimension' option to the translation macro

* Call fixSceneDependencies when re-adding dimensions so that it shows up at the right place
2025-08-18 11:46:15 -04:00
Kacper Donat
ed6e953c90 TechDraw: Replace dynamic_cast with qobject_cast 2025-04-26 14:23:25 +02:00
Chris Hennes
d41114589c Merge pull request #19411 from benj5378/enums2
TechDraw: hard type enums, part 2
2025-03-03 10:37:21 -06:00
Chris Hennes
1a2070c36f Merge pull request #19636 from kadet1090/color-in-base
Base: Move App::Color to Base
2025-03-02 16:36:40 -06:00
Benjamin Bræstrup Sayoc
351feb132a Remove magic number and hard type enums in ArrowPropEnum.h
- Remove currently present magic numbers
- Hard type enums, so magic numbers can no longer be introduced. We don't want people to introduce magic numbers.
2025-03-02 17:14:24 +01:00
wandererfan
4c39987df4 [TD]fix bad formatting 2025-02-23 09:14:23 -05:00
wandererfan
812976f9df [TD]lint removal 2025-02-23 09:14:23 -05:00
wandererfan
b084d7fadb {TD]Set Arrow end property at Dimension level. 2025-02-23 09:14:23 -05:00
Kacper Donat
13fbab9e42 Base: Move App::Color to Base
Every basic data type is stored in Base module, color is standing out as
one that does not. Moving it to Base opens possibilities to integrate it
better with the rest of FreeCAD.
2025-02-17 21:10:26 +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
WandererFan
91d7c875a5 [TD]Fix RichText parent in scene (fix #18283) (#18768)
* [TD]allow DrawViewAnno to be attached to another view

* [TD]allow image and spreadsheet attach to view

* [TD]ensure correct parent in scene

* [TD]refactor command helpers to separate file

- gathering the helpers in one place
- helper redundancy to be address in another change

* [TD]create symbol, spreadsheet, image with parent

* [TD]fix claimChildren for some views

- also includes many lint fixes
2025-01-06 18:11:25 +01:00
Roy-043
15cc47a11c Correct tree icon for TechDraw_AreaDimension 2024-09-22 16:58:52 -05:00
PaddleStroke
41650a78d4 TechDraw: Implement 'Area' dimension. 2024-05-06 18:42:28 +02:00
wandererfan
284365f0c5 [TD]prevent fail on delete with open dialog 2024-03-14 21:45:16 -04:00
wandererfan
d4e1731716 [TD]Standard Line Styles - Gui components 2023-12-01 11:27:29 -05: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
grubertechnic
7a68d1b6d3 [TechDraw] let arrow size of a dimension change due property task panel 2023-06-07 12:38:26 -04:00
Benjamin Bræstrup Sayoc
ddff39dbac [TechDraw] Add customizability for dimension line spacing 2023-04-15 10:20:38 -04:00
Benjamin Bræstrup Sayoc
f11fced78b [TD]resolve merge conflicts re Preference retrieval #2 2023-04-10 23:34:05 -04:00
Benjamin Bræstrup Sayoc
3794897699 [TechDraw] Simplify return logic 2023-04-10 23:34:05 -04:00
Benjamin Bræstrup Sayoc
5d05acc87e [TechDraw] Simplify retrievement of user preferences
for all TechDraw files
2023-04-10 23:34:05 -04:00
wandererfan
208104e9e0 [TD]Refactor Dimensions for 3d upgrade
- separate validation, geometry and reference handling into
  individual files
- improve 3d reference geometry handling
- eliminate duplicate dim creation code

- add Dimension reference repair dialog

- Refactor formatting out of DrawViewDimension

- move dimension repaint control to ViewProvider
2023-01-07 16:32:03 -05:00
wandererfan
02386e3150 [TD]move makeAlignedPieces to separate thread
- correct ComplexSection rotation

- fix fail to load CS for some profiles and directions
2022-12-18 09:42:42 -05:00
wandererfan
f970a321b2 [TD]fix StackTop and StackBottom 2022-09-24 08:18:38 -04:00
wandererfan
d8be4398e3 [TD]implement view stacking 2022-09-07 16:06:54 -04:00
wandererfan
aa2b1b8392 [TD]CI clang warnings 2022-09-05 17:48:38 -04:00
berniev
f4ffd15864 Mod: redundant void 2 2022-08-08 10:27:50 +02:00
Benjamin Bræstrup Sayoc
17bcd06464 [TechDraw] Use inherited unsetEdit
Remove uneeded redefinitions of inherited functions
2022-08-04 10:02:47 -04:00
Benjamin Bræstrup Sayoc
aed0346cdb [TechDraw] Remove uneeded redefinitions of inherited functions 2022-08-04 10:02:47 -04:00
Benjamin Bræstrup Sayoc
f30c30b06f [TechDraw] Simplify code getting default line weights 2022-08-02 16:13:01 -04:00
Uwe
b514f47c21 [TD] Gui: remove some superfluous nullptr checks 2022-07-19 02:49:46 +02:00
Wanderer Fan
94dde1b9fb [TD]fix ext line gap preference 2022-07-16 11:28:38 -04:00
Benjamin Bræstrup Sayoc
5d29f60040 [TechDraw] Improve readability of ViewProviderGeomHatch.cpp 2022-07-15 11:31:11 -04:00
Wanderer Fan
fe47248dea [TD]adjustable extension line gap 2022-07-04 20:43:49 -04:00
wmayer
0f5725b34a modernize C++: replace boost::function with std::function 2022-06-30 20:31:55 +02:00
Wanderer Fan
a799a5db66 [TD]fix Dimension/Balloon movement 2022-06-02 16:33:25 -04:00
wmayer
ccc0d54d97 TD: [skip ci] activate PCH of TechDraw (Gui) and use forward declarations
For MSVC this reduces compile time by ~20%
2022-03-25 13:54:47 +01:00
wmayer
e8f9c8a1d3 TD: modernize C++11
* use nullptr
2022-03-23 19:26:14 +01:00
Uwe
9b14bf80d1 [TD] ViewProviders: remove unused includes
- also sort the includes
2022-02-18 04:43:32 +01:00
wmayer
a12695e44f Gui: move methods startDefaultEditMode() and addDefaultAction() to ViewProviderDocumentObject 2021-12-06 19:24:26 +01:00
Roy-043
fa2851a7e8 TechDraw housekeeping: TechDraw_LandmarkDimension icon fix (#5033)
TechDraw housekeeping: TechDraw_LandmarkDimension icon fix
2021-09-16 18:42:11 -05:00
wmayer
fa86b0216e Mod: make sure to call the base class' handleChangedPropertyType 2021-09-15 14:07:32 +02:00
wmayer
2824acedda TechDraw: fixes for dimension feature:
* reimplement ViewProviderDimension::setupContextMenu() to show menu item to start editing it
* fix TaskDimension::accept() and TaskDimension::reject()
2021-02-12 15:55:26 +01:00
donovaly
1a296a4006 [TD] add dialog to modify some dimension settings
also fix issue that tolerance could be set despite theoretically exact is true under some circumstances

also some wording improvements

also a minor fix to use 0.0 instead of DBL_MIN
2021-01-15 05:21:49 +01:00
donovaly
96eaff8e4e [TD] some fixes
- the setting "Standard and Style" only affects new dimensions, thus it must be italic

- fix bug that the Property 'LockPosition' appears for dimensions -> this is an option for views and thus must be hidden for dimensions

- since tolerances are in the vast majority fractions of a millimeter/inch, set its stepsize to 0.1
(I hope I did it right in handleChangedPropertyType.)

- fix inconsistent newlines in TaskBalloon.h

- improve wording for a heading
2021-01-10 00:29:34 +01:00
donovaly
4bae944950 [TD] make LineGroup selectable
At the moment one has to specify the LineGroup as string. But one doesn't know what groups exist. So one has to check the Wiki, learn there where the groups are defined and then open the definition file with a text editor.

This PR simplifies this by reading the existing groups out of the definition file and fill the combobox accordingly.
It also give the user info what the selected LineGroup defines via the tooltip.

A nice side effect is that no typos can occur since you don't have to enter the LineGroup name as text.
2020-12-03 17:24:49 +01:00
wandererfan
a3029fec74 [TD]Centralize preference getters 2020-04-24 11:13:49 -04:00
donovaly
fa8d809268 CanDelete is necessary for dimensions
- therefore revert commit bd0bf690b53f8355400278a127524029d225dffb.
- handle balloons the same way
- fix line ending in ViewProviderProjGroupItem.cpp
2020-03-04 08:24:17 -05:00
donovaly
d31cf9478c ViewProviderDimension: remove unused function 2020-03-04 08:24:17 -05:00