Commit Graph

49 Commits

Author SHA1 Message Date
wandererfan
f465729608 [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
78d995f2b8 TechDraw: fix typo in comment 2025-06-11 21:51:23 +02:00
Benjamin Bræstrup Sayoc
2438156b23 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
4e95213e0a TechDraw: centralize usertype constants 2025-05-25 20:42:02 +02:00
bofdahof
ba2c2ca5ad Console: rename PascalCase named methods to camelCase 2025-05-06 17:50:21 +02:00
tetektoza
354cef7463 TechDraw: Use static_cast when casting scene's child to TextField 2025-04-23 16:32:31 +02:00
tetektoza
bbcdb77003 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
8e7d3325b3 TechDraw: refactor click handles for editable fields
Fixes #19387
2025-04-14 10:46:09 -05:00
Benjamin Bræstrup Sayoc
9a8bdbaf9f TechDraw: Use QStringLiteral 2025-02-10 18:32:44 +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
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
50eb2b5513 [TD]show autofill value in dialog 2024-06-30 09:32:20 -04:00
wandererfan
1bc72ce3bb [TD]clean up editable field length and click area 2024-06-23 09:48:25 -04:00
pavltom
2f04fce75e [TechDraw] Issue #5903 - Autofill template information 2024-03-23 08:56:47 -04:00
wandererfan
b727b17c5e [TD]fix missing \ in regex 2024-01-12 09:23:38 -05:00
wandererfan
37c54b6708 [TD]template green squares to underline 2023-12-17 08:37:19 -05:00
Benjamin Bræstrup Sayoc
5d05acc87e [TechDraw] Simplify retrievement of user preferences
for all TechDraw files
2023-04-10 23:34:05 -04:00
wmayer
6fb167582a TD: move all XML query handling to a single function 2023-03-18 19:26:01 -04:00
Uwe
c947055821 [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
0a0902532d [TD] fix compilation with PCH after b18f1e5e
- also add includes to QtAll
2023-01-05 00:50:32 +01:00
wandererfan
0e402ae075 [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
75b8a4264d [TD] QGIL - QGIVE:remove unused includes
- also some sorting
2022-12-04 03:29:19 +01:00
wandererfan
1cf51ec1c3 [TD]fix embedded template file handling 2022-11-12 11:35:22 -05:00
wandererfan
aa2b1b8392 [TD]CI clang warnings 2022-09-05 17:48:38 -04:00
Benjamin Bræstrup Sayoc
71758ecf9b [TechDraw] Clean up precompile in Gui 2022-08-14 09:20:38 -04:00
Benjamin Bræstrup Sayoc
b498e85f43 [TechDraw] Remove uneeded redefinitions of inherited functions 2022-08-12 18:13:52 -04:00
berniev
f4ffd15864 Mod: redundant void 2 2022-08-08 10:27:50 +02:00
Wanderer Fan
db89eec8e3 [TD]implement navigation styles 2022-06-24 10:03:02 -04:00
wmayer
e8f9c8a1d3 TD: modernize C++11
* use nullptr
2022-03-23 19:26:14 +01:00
Tomas Pavlicek
c67ffc9f44 TechDraw - SVG changes via DOM manipulation instead of Regex replace 2019-10-06 07:31:34 -04:00
wandererfan
925145a8b7 Fix #3695 Frame toggle sync 2019-05-13 12:29:15 -04:00
wmayer
23bc00e1a1 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
d7ec2b1368 Replace Base::Exception with appropriate subclass 2018-11-14 19:42:10 +01:00
WandererFan
6fb1972875 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
31535e9b53 Add preference for Template edit dot size 2017-09-10 15:24:00 +02:00
Ian Rees
950ac44f9f TechDraw: Tidy, and fix Qt5 template text edition 2017-04-26 18:23:21 +12:00
WandererFan
f782719363 Feature Request 1880 - hide Template 2017-02-07 10:51:42 -02:00
WandererFan
fbe97ec247 Basic working HiResolution TD 2017-01-29 19:40:32 -05:00
wmayer
6148bf4df5 fix -Wextra & -Wdeprecated in TechDraw 2016-09-22 19:32:16 +02:00
WandererFan
9c99584682 Prevent creation of superflous QGItems for Text Fields 2016-08-12 10:01:16 +02:00
WandererFan
32e624c108 Handle non-latin1 chars in template 2016-08-12 10:01:16 +02:00
WandererFan
381c1e120e Qt item parenting and garbage collection
Remove dupl/obsolete code
2016-08-01 19:27:52 -03:00
WandererFan
27aafada9c Include file cleanup per cppclean analysis 2016-07-14 14:39:06 +02:00
WandererFan
3dec1bd3b6 Fix template field dialog multiple instances 2016-07-11 15:32:16 +02:00
WandererFan
5591161e82 dlgTemplateField parentage
cosmetic: move button box
2016-07-11 15:32:16 +02:00
WandererFan
87f62ce89e Handle malformed SVG in Template
Prevent invalid data input for Editable Text
2016-07-11 15:32:16 +02:00
WandererFan
60acf69557 Section face positioning/display 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