Commit Graph

45 Commits

Author SHA1 Message Date
wandererfan
92690acc85 [TD]fix fail to create vertex outside frame 2025-11-17 22:28:06 -06:00
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
Ryan Kembrey
bbfbb6e059 TechDraw: Update UI strings for consistency
Closes: #22143
2025-08-04 20:26:04 +02:00
bofdahof
ba2c2ca5ad Console: rename PascalCase named methods to camelCase 2025-05-06 17:50:21 +02:00
Kacper Donat
b999ce0336 TechDraw: Use freecad_cast whenever possible 2025-04-26 14:23:25 +02:00
Benjamin Bræstrup Sayoc
9941b59e98 TechDraw: hard type enums, part 3 (#19418)
* Remove magic number and hard type enums in LineNameEnum.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.

* Remove magic number and hard type enums in QGIFace.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.

* Remove magic number and hard type enums in Enums.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.

* Remove magic number and hard type enums in QGVPage.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.

* Remove magic number and hard type enums in TaskSurfaceFinishSymbols.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.

* Remove magic number and hard type enums in QGTracker.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-02-24 11:58:05 -05:00
Ladislav Michl
e62b91ada4 Base: Drop QString-std::string conversion functions from Tools
Convenience helpers function Tools::toStdString and Tools::fromStdString
were implemented for Qt4 or older to perform utf8 aware conversion as
QString::toStdString/QString::fromStdString were using toAscii/fromAscii
internally (see https://dreamswork.github.io/qt4/classQString.html).

Since Qt5 QString uses toUtf8/fromUTf8, which makes the helper functions
obsolete (see https://doc.qt.io/qt-5/qstring.html#fromStdString).
2024-12-02 23:30:53 -05:00
wandererfan
5c310d5046 [TD]fix projection group detection (fix #16179) 2024-09-02 18:23:37 +02:00
WandererFan
50f970efd7 [TD]Cosmetic function overhaul (#14216)
* [TD]Cosmetic geometry and tools update

- all cosmetics to store geometry in same form
- all cosmetics to survive scaling and rotation
- extension functions to survive scaling and rotation

* [TD]overhaul leader point storage and editing

- add py routine makeLeader(points)

* [TD]add leader conversion utility

* [TD]Set Leader RotateWithView default to true

* [TD]fix intersection vertex position

* [TD]add CosmeticEdge::makeLineFromCanonicalPoints

* [TD]fix 2 Extension tools

- positioning in DrawCosmeticCircle
- mishandling of points in execLineParallelPerpendicular

* [TD]Remove duplicate constexpr

* [TD]fix 2x Cosmetic arc tools

* [TD]refactor LineFormat out of Cosmetic

* [TD]move cosmetic appearance settings to LineFormat

* [TD]remove 2 unused methods

* [TD]apply format to blue line & circle tools

* [TD]fix ballon arrowhead does not rotate with view

* [TD]fix CosmeticCircle3Points

* [TD]allow multiple cosmetic object deletions

* [TD]fix extend/shorten centerline
2024-05-23 09:41:42 -04:00
Farley Runkel
9430ea9ee5 TechDraw: Refractor tracker action with proper enum 2024-04-22 18:21:49 +08:00
wandererfan
08612d4489 [TD]fix duplicate unscale of CosmeticVertex 2024-01-06 08:43:25 -05:00
wandererfan
023dd8ed8a [TD]fix location of CV on rotated views 2023-12-24 12:27:25 -05:00
wandererfan
6eae743361 [TD]rotate CosmeticVertex with View 2023-08-19 17:18:42 -04:00
wmayer
25beef481c TD: move to new style connect() 2023-02-01 01:33:34 +01:00
Uwe
7e70d28761 [TD] Task*, part 2/2: remove unused includes
- also some sorting
- also take care of PreCompiled.h
2022-12-07 19:49:05 +01:00
wandererfan
aa2b1b8392 [TD]CI clang warnings 2022-09-05 17:48:38 -04:00
Wanderer Fan
b467cd32f2 [TD]refactor scene/view/mdi
- move scene related functions out of mdiViewPage
  and QGVPage.
- route requests for scene/view/mdi through
  ViewProviderPage
2022-08-18 09:34:32 -04:00
berniev
f4ffd15864 Mod: redundant void 2 2022-08-08 10:27:50 +02:00
wmayer
781997984d TD: Use new-style syntax of connect()
When fixing clazy issues -Wclazy-fully-qualified-moc-types then old-style syntax of connect() may fail. Thus, replace it with the new-style syntax
2022-07-26 16:10:45 +02:00
Uwe
5486c9808d [TD] remove some more superfluous nullptr checks 2022-07-20 02:53:48 +02:00
Uwe
15ec3e2cda [TD] Gui: remove more superfluous nullptr checks 2022-07-19 03:40:32 +02:00
Benjamin Bræstrup Sayoc
04371d3fca [TechDraw] Rename icon filenames for consistency 2022-07-09 14:38:30 -04:00
Wanderer Fan
db89eec8e3 [TD]implement navigation styles 2022-06-24 10:03:02 -04:00
Wanderer Fan
92b124d7df [TD]fix icon in dialog 2022-06-06 18:47:51 -04:00
Kuzemko Alexsandr
700e6017e8 [TD] Add text to translate
This will fix https://github.com/FreeCAD/FreeCAD-translations/issues/47
2022-06-01 13:04:47 +02:00
Chris Hennes
84ae226ec6 TD: PR6497 move return statement to new line 2022-03-29 13:26:01 -05:00
Uwe
5757cdf2ad [TD] remove a single-header file 2022-03-25 04:11:53 +01:00
wmayer
e8f9c8a1d3 TD: modernize C++11
* use nullptr
2022-03-23 19:26:14 +01:00
Wanderer Fan
d4c5074ee5 [TD]remove redundant edits from 9 Task dialogs 2022-01-22 14:51:20 -05:00
Uwe
a3023ed0b9 [TD] some style unification
automatically done by MSVC
2022-01-03 23:30:43 +01:00
Benjamin Bræstrup Sayoc
2d14c0be8d Make it possible to do new Pick Points 2022-01-03 09:58:33 -05:00
Benjamin Bræstrup Sayoc
e483cc2b09 Use latest user input for Add Cosmetic Vertex 2022-01-03 09:58:33 -05:00
Tomas Pavlicek
2a1597cded TechDraw - Undo for Cosmetics Vertices and Lines 2021-08-11 10:07:02 +02:00
donovaly
691eaa6e8f [TD] make pointers to the UI std::unique_ptr
as noted in https://github.com/FreeCAD/FreeCAD/pull/4271#discussion_r554673632
the pointer to the UI should be a unique pointer.

This PR does this for all TD dialogs that don't already use a unique_ptr.
2021-01-19 19:24:27 +01:00
luz paz
ae71abd1cc TechDraw: Header uniformity and whitespace fixes 2020-11-14 16:59:51 +01:00
wmayer
983939b32d Coverity: Uninitialized scalar/pointer field 2020-07-20 17:34:30 +02:00
wandererfan
60adfc863f [TD]Handle ProjGroup in TaskCosmeticVertex 2020-04-28 09:11:28 -04:00
donovaly
ce5746f9d7 [TD] sanitize TaskCosVertex
- add missing unit (therefore switch to Gui::QuantitySpinBox)
- remove unused and confusing z-parameter
2020-03-28 20:54:54 -04:00
WandererFan
06357db88d [TD]sync icon names and menu entries
- contributed by @uwe
2020-02-03 07:20:52 -05:00
wandererfan
8940fa3593 [TD]Fix Tracker stays active on Cancel 2019-09-07 07:32:24 -04:00
wandererfan
6709fd849b [TD] fix context menu 2019-07-15 12:36:48 -04:00
wandererfan
fbfdb69c20 [TD]Py Cosmetic Vertex, Line, Circle Arc 2019-07-15 12:36:48 -04:00
wmayer
fe3b75683f move includes to repsect PCH option 2019-05-25 13:04:57 +02:00
wandererfan
108038df91 Add Midpoint and Quadrant Cosmetic Vertex 2019-05-24 19:38:02 -04:00
wandererfan
3f7570ad80 Initial version addCosmeticVertex 2019-05-24 19:38:02 -04:00