Commit Graph

37 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
bofdahof
ba2c2ca5ad Console: rename PascalCase named methods to camelCase 2025-05-06 17:50:21 +02:00
Benjamin Bræstrup Sayoc
37cd2bd03a TechDraw: remove unneeded state from QGCustomText 2025-03-13 13:42:02 +01:00
Benjamin Guest
4f56102978 TechDraw: Fix dimension alignment issue.
Fixes issue #19121 "dimension numbers placed lower than normal".

Problem:

QGCustomText has a new method `alignmentRect` which can optionally return a
`tightBoundingRect` instead of the regular `boundingRect`. The
`alignmentRect` is used for laying out the `QGIDatumLabel`, however
QGraphicsItemGroup's `childrenBoundingRect` use the childrens'
`boundingRect` and knows nothing of `alignmentRect`. The result is an
improperly sized label and frame and miss alignment. Additionally
`childrenBoundingRect` calculations includes hidden views, so even though
the `m_tolTextOver` and `m_tolTextUnder` are hidden they still affect
the bounding rect size.

Solution:

1. Implement new method `QGIDatumLabel::tightBoundingRect` this
   calculates the bounding rect using the subview's
   `aligmentRect` if there is text in the custom text.
2. Use `tightBoundingRect` in place of `boundingRect` to for the drawing of
   arrows and the exact dim frames.
3. This PR acknowledges that there are some edge case fonts that while not
   clipped may not interface perfectly with arrows and the exact dimension
   frame.
4. Fix vertical alignment of `m_tolTextOver` / `m_tolTextUnder`
5. Incorporate PR Review comments
2025-01-27 20:39:41 +01:00
WandererFan
dc25d51e80 [TD]Dimension font clipping (fix #11452) (#18771)
* [TD]separate alignment and rendering bounding rectangles

* [TD]use alignment rectangle (fix #11452)
2025-01-13 11:13:59 -06:00
Benjamin Bræstrup Sayoc
fa6c81d23e [TechDraw] Fix uncentered balloon label 2024-09-11 20:04:30 -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
Uwe
6dd2327711 [TD] QGC* - QGE:remove unused includes
- also some sorting
2022-12-04 02:16:43 +01:00
wandererfan
aa2b1b8392 [TD]CI clang warnings 2022-09-05 17:48:38 -04:00
Wanderer Fan
fdfc73fe93 [TD]remove precompiled from *.h 2022-08-14 09:20:38 -04:00
Benjamin Bræstrup Sayoc
71758ecf9b [TechDraw] Clean up precompile in Gui 2022-08-14 09:20:38 -04:00
berniev
f4ffd15864 Mod: redundant void 2 2022-08-08 10:27:50 +02:00
Benjamin Bræstrup Sayoc
c53661014a [TechDraw] Use function overloadin and avoid code repeat 2022-07-06 20:46:44 -04:00
wmayer
d21a60b294 All: modernize C++11
* replace deprecated headers
2022-03-23 22:44:18 +01:00
Aapo
514b41b1c2 [TD] GQIViedDimension.cpp, GQCustomText.cpp - Fix Dimension label unit positioning bug and too tight bounding rectangle. 2020-12-03 21:31:01 +01:00
Aapo
66d5bff409 [TD] Add comments and more transparent tolerance position adjustment calculation. 2020-12-01 14:37:39 +01:00
aapo-aapo
32f3e72682 Update src/Mod/TechDraw/Gui/QGCustomText.cpp by compacting boundingRect()
Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
2020-12-01 14:37:39 +01:00
Aapo
08179e3ce3 [TD] Make dimension number graphical layout more compact by making boundingRect() tighter for dimension number labels. 2020-12-01 14:37:39 +01:00
wmayer
4807fd3b33 PVS: V730 Not all members of a class are initialized inside the constructor 2020-07-18 10:59:27 +02:00
wandererfan
a3029fec74 [TD]Centralize preference getters 2020-04-24 11:13:49 -04:00
wandererfan
4ac6415828 [TD]refix Dim select area problem 2020-01-08 15:07:28 -05:00
wandererfan
b06a1470be [TD]Fix Dimension Color Regression
- still an issue where text looses select color if
  clicked while selected
2019-09-29 19:56:46 -04:00
wandererfan
70a64afa53 [TD]Clean up Welding Symbol creation 2019-08-22 17:11:55 -04:00
wandererfan
7cb2713e8c [TD]Welding Symbol creation 2019-08-22 17:11:55 -04:00
Tomas Pavlicek
3e7249318f TechDraw: Fix font size issues when exporting to SVG 2019-05-27 22:18:14 -04:00
wandererfan
428627cd89 Fix Dimension Text Color
- Dimension text did not respect Color property setting.
2019-02-14 21:14:11 +01:00
wandererfan
bb0bbeef9a Fix Detail highlight position for rotated DPGI
- highlight position calculation was not taking into account
  rotation of DPGI due to RotationVector property.
2018-12-19 10:30:30 -02:00
WandererFan
9c85b1aca3 Poistioning and Rotation for QGIVAnnotation 2017-11-12 19:08:32 -05:00
WandererFan
34a044b969 Fix Svg export page & text size in HiRez 2017-01-29 19:40:32 -05:00
WandererFan
504633b7fe Add 2nd page of preferences 2016-11-24 14:44:37 -02:00
WandererFan
ae9f1c5994 Create ViewSection from ViewPart
Property name changes
Touch section when View SymbolSection changes
2016-08-26 11:39:03 -03:00
WandererFan
498e37b39c Fix dimension highlighting problems
Derived all lines from PrimPath
2016-08-16 14:29:15 +02:00
WandererFan
dd543c22ef Get user prefs at time of use 2016-07-14 15:55:57 -04:00
WandererFan
82c86b24af Default font to Sans from osifont 2016-07-11 15:32:16 +02:00
WandererFan
d2763eebfc Working Face selection 2016-07-11 15:32:16 +02:00
WandererFan
ffbaf79f4a /QGI/QGraphicsItem/ 2016-07-11 15:32:16 +02:00
WandererFan
df13886349 Add Mod/TechDraw/Gui 2016-07-11 15:32:16 +02:00