Commit Graph

51 Commits

Author SHA1 Message Date
Markus Reitböck
0019739095 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
luzpaz
9d806694ff TechDraw: remove trailing whitespace 2025-08-30 22:10:14 -05:00
wandererfan
ba4475bf9c [TD]fix editable fields click handles
- click handles were displayed when view frames were displayed,
  and when printing or exporting.
- now, click indication is only shown on mouse over.
2025-08-11 11:05:47 -05:00
Luz Paz
775194b5b9 TechDraw: fix typo in comment 2025-06-11 21:51:23 +02:00
Benjamin Bræstrup Sayoc
9709fc43de TechDraw: fix incorrect click handles of editable labels (#21131)
Fixes #20964:
- When `text` element doesn't have id
- When `text` element has transform attribute
2025-05-29 08:30:59 -04:00
Benjamin Bræstrup Sayoc
9af522c085 TechDraw: centralize usertype constants 2025-05-25 20:42:02 +02:00
bofdahof
998f4e4d45 Console: rename PascalCase named methods to camelCase 2025-05-06 17:50:21 +02:00
tetektoza
5243c4a664 TechDraw: Use static_cast when casting scene's child to TextField 2025-04-23 16:32:31 +02:00
tetektoza
b4214fdde6 TechDraw: Return text fields directly as childs of QGISVGTemplate
As the title says. I've noticed during reproducing of #18921, that
after in `PagePrinter::renderPage` we call `setTemplateMarkers`
twice, which results in deleting `childItems` allocated memory
(in `setTemplateMarkers`->`setMarkers`->`updateView`->`clearClickHandles`),
and then we are calling `setTemplateMarkers` (also in `PagePrinter::renderPage`) second time,
accessing `textFields` in `setMarkers` method, which still contain hanging pointers
from the previous deallocation. This results in segfaults as we iterate through `textFields`.

So, instead of keeping sychronization between childs of QGISVGTemplate
and textFields vector - this patch removes this variable at all and uses
childs directly to return text fields.
2025-04-23 16:32:31 +02:00
Benjamin Bræstrup Sayoc
393ab112e5 TechDraw: refactor click handles for editable fields
Fixes #19387
2025-04-14 10:46:09 -05:00
Benjamin Bræstrup Sayoc
835905f76e TechDraw: Use QStringLiteral 2025-02-10 18:32:44 +01:00
Benjamin Nauck
dd6aa9f3c7 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
Ladislav Michl
0ee3c9f8e6 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
f53fd6d474 [TD]show autofill value in dialog 2024-06-30 09:32:20 -04:00
wandererfan
7b71753214 [TD]clean up editable field length and click area 2024-06-23 09:48:25 -04:00
pavltom
aac48eb2f9 [TechDraw] Issue #5903 - Autofill template information 2024-03-23 08:56:47 -04:00
wandererfan
3ba0c3d795 [TD]fix missing \ in regex 2024-01-12 09:23:38 -05:00
wandererfan
26a72236f9 [TD]template green squares to underline 2023-12-17 08:37:19 -05:00
Benjamin Bræstrup Sayoc
15fe52a04b [TechDraw] Simplify retrievement of user preferences
for all TechDraw files
2023-04-10 23:34:05 -04:00
wmayer
c585a9f430 TD: move all XML query handling to a single function 2023-03-18 19:26:01 -04:00
Uwe
f8db7e9187 [TD] remove unused headers (#8155)
* [TD] remove unused headers

- also some sorting
- also improve readability by not using an abbreviation (we consistently don't abbreviate class names)
2023-01-09 14:55:22 +01:00
Uwe
b2ab8edba4 [TD] fix compilation with PCH after d63ac0f7
- also add includes to QtAll
2023-01-05 00:50:32 +01:00
wandererfan
d63ac0f7f6 [TD]add light text on dark page mode
- some visually impaired users need white graphics on
  dark page.

- revise Annotation dialog to respect dark style
2023-01-03 17:41:33 -05:00
Uwe
98a0172700 [TD] QGIL - QGIVE:remove unused includes
- also some sorting
2022-12-04 03:29:19 +01:00
wandererfan
9c9013810e [TD]fix embedded template file handling 2022-11-12 11:35:22 -05:00
wandererfan
acf17905ed [TD]CI clang warnings 2022-09-05 17:48:38 -04:00
Benjamin Bræstrup Sayoc
aa9a667506 [TechDraw] Clean up precompile in Gui 2022-08-14 09:20:38 -04:00
Benjamin Bræstrup Sayoc
9905e17ba1 [TechDraw] Remove uneeded redefinitions of inherited functions 2022-08-12 18:13:52 -04:00
berniev
da9ebc572f Mod: redundant void 2 2022-08-08 10:27:50 +02:00
Wanderer Fan
9894964eb6 [TD]implement navigation styles 2022-06-24 10:03:02 -04:00
wmayer
a99be14233 TD: modernize C++11
* use nullptr
2022-03-23 19:26:14 +01:00
Tomas Pavlicek
cf721089a9 TechDraw - SVG changes via DOM manipulation instead of Regex replace 2019-10-06 07:31:34 -04:00
wandererfan
d42c79c146 Fix #3695 Frame toggle sync 2019-05-13 12:29:15 -04:00
wmayer
93f0d1bec9 PVS: V1024 The 'file' stream is checked for EOF before reading from it, but is not checked after reading. Potential use of invalid data 2019-03-13 13:34:45 +01:00
wmayer
b0247d184e Replace Base::Exception with appropriate subclass 2018-11-14 19:42:10 +01:00
WandererFan
0a7340b9e9 Fix hidden click handles on Templates
- on some Templates, the green click handles for
  editing text were being painted under the Template
  and were not visible.
2018-02-07 19:05:25 +01:00
WandererFan
9379574016 Add preference for Template edit dot size 2017-09-10 15:24:00 +02:00
Ian Rees
6368b2f822 TechDraw: Tidy, and fix Qt5 template text edition 2017-04-26 18:23:21 +12:00
WandererFan
18cd5b5166 Feature Request 1880 - hide Template 2017-02-07 10:51:42 -02:00
WandererFan
f68cbc83e3 Basic working HiResolution TD 2017-01-29 19:40:32 -05:00
wmayer
c457fc468c fix -Wextra & -Wdeprecated in TechDraw 2016-09-22 19:32:16 +02:00
WandererFan
d8ccf14ec3 Prevent creation of superflous QGItems for Text Fields 2016-08-12 10:01:16 +02:00
WandererFan
3eb9037ada Handle non-latin1 chars in template 2016-08-12 10:01:16 +02:00
WandererFan
40fa4e0d40 Qt item parenting and garbage collection
Remove dupl/obsolete code
2016-08-01 19:27:52 -03:00
WandererFan
19968205d2 Include file cleanup per cppclean analysis 2016-07-14 14:39:06 +02:00
WandererFan
2ac560e7b0 Fix template field dialog multiple instances 2016-07-11 15:32:16 +02:00
WandererFan
277a00dc3c dlgTemplateField parentage
cosmetic: move button box
2016-07-11 15:32:16 +02:00
WandererFan
1b7b6d96aa Handle malformed SVG in Template
Prevent invalid data input for Editable Text
2016-07-11 15:32:16 +02:00
WandererFan
8cbd6d0b23 Section face positioning/display 2016-07-11 15:32:16 +02:00
WandererFan
a9d6f1568b /QGI/QGraphicsItem/ 2016-07-11 15:32:16 +02:00