Beat Hangartner
5cad0c6159
Keep the text resize handles working after a scene change
...
A scene drops the event filters of an item that leaves it. The handles
installed theirs once, in the constructor, and only if the text was in
a scene: after the text was removed and added back (undoing a delete
does that), or when the handles were made before the text was in a
scene, they no longer reacted, and a drag moved the text instead.
TextResizeHandles now installs the filters again whenever it enters a
scene.
Tests: dragAfterLeavingTheScene, dragWhenCreatedOutsideAScene (both
fail before).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com >
2026-10-06 09:46:17 +02:00
Beat Hangartner
010e44ab8a
Add corner handles to change the width of a text box
...
TextResizeHandles puts four handles at the corners of a selected text
(any QGraphicsTextItem with a qreal "textWidth" property, -1 = automatic
width). Dragging one changes the width: the opposite corner stays in
place in scene coordinates, for any rotation and rotation point, the
text wraps and the height follows it. Vertical mouse movements are
ignored, the width never goes below the longest word and is rounded to
whole pixels, and a click without a move changes nothing.
Double-clicking a handle goes back to the automatic width.
The handles are a child of the text, so they follow it when it moves,
rotates or is zoomed (as for the symbol text handles, #1002 ). The width
is changed live; the owner makes it undoable with TextResizeCommand,
which sets the width then the position on both undo and redo -- a text
may move itself when its width changes, so two property commands would
restore them in the wrong order.
The geometry is header-only (textresize.h). Nothing uses the handles
yet: the follow-up changes add them to free texts and to text fields in
the element editor.
Test: tst_textresizehandles, on a plain QGraphicsTextItem.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com >
2026-10-05 17:53:38 +02:00
Laurent Trinques
4044d04cc5
One year
Auto-build doxygen docs / doxygen (push) Has been cancelled
Auto-build doxygen docs / deploy (push) Has been cancelled
2026-01-16 15:24:35 +01:00
Laurent Trinques
77bfe84a4c
One year
2025-01-04 13:37:40 +01:00
plc-user
fa68d545d0
correct more indentations / whitespace
2024-04-24 14:14:40 +02:00
Laurent Trinques
e73cf633ce
2023->2024
2024-03-29 10:09:48 +01:00
joshua
092b18cefd
Fix wrong calculation of the bounding rect of an arc
2023-01-27 19:39:53 +01:00
Laurent Trinques
9afef79629
Update Copyright date
2023-01-01 17:05:57 +01:00
luz paz
1994235bc5
Fix various typos in source documentation and comments (cont.)
...
Found via `codespell`
2022-12-04 20:46:32 +01:00
Ole Carlsen
c17492183f
Danish translation updated
2022-11-24 17:54:18 +01:00
joshua
1a75eb19d0
Graphics item handler is bigger when overred
2022-01-04 18:41:46 +01:00
joshua
ae9faa2192
Add toolbar widget for edit size of handler in diagram editor.
...
Add a combo box in the tool bar of diagram editor
to quickly change the size of the graphics handler item.
The sarto commit :D
NOTE
only available for diagram editor, element editor will
come later.
2022-01-03 21:01:25 +01:00
joshua
11b8ef927b
Revert "Merge branch 'XMLPropertiesNew'"
...
**Break a lot of thing.**
This reverts commit 1db1800572 , reversing
changes made to 4c563821e8 .
2021-03-11 19:52:50 +01:00
Martin
ea364f9c4e
merge
2021-02-23 17:35:55 +01:00
Laurent Trinques
ef58f34c14
Update Copyright date
2021-02-20 12:13:46 +01:00
joshua
2513961cd6
Revert "Update Copyright date"
...
This reverts commit d04bccc384 .
2021-02-06 19:00:48 +01:00
Laurent Trinques
d04bccc384
Update Copyright date
2021-02-06 18:33:42 +01:00
Martin Marmsoler
12e301b887
replace 4 spaces by a tab
2020-10-20 08:54:56 +02:00
Martin Marmsoler
f3097fc537
rebase XMLProperties_New ( c0d9bf9) to master
2020-10-20 08:54:14 +02:00
Martin Marmsoler
73b394527d
replace tabs by 4 spaces
2020-10-20 08:53:43 +02:00
Claveau Joshua
89f9f47174
Remove unused code
2020-09-20 11:40:18 +02:00
Claveau Joshua
726b300999
Fix bug N°202 : Wrong bounding rect for primitive arc.
...
https://qelectrotech.org/bugtracker/view.php?id=202
2020-09-11 19:11:14 +02:00
Simon De Backer
5d92393ee7
Wrap code for better readability
2020-09-07 22:03:40 +02:00
Simon De Backer
88686b3cbf
Wrap code for better readability
2020-08-20 17:45:24 +02:00
Simon De Backer
d1c91a7fc2
Fix some doxygen issues
2020-08-20 17:44:59 +02:00
Simon De Backer
99abc165d6
Wrap code for better readability
2020-08-18 20:08:32 +02:00
Simon De Backer
790cdc5229
Fix some doxygen issues (~100)
2020-08-18 20:07:55 +02:00
Simon De Backer
e9fcd385d5
Improve code style, Wrap code for better readability
2020-08-16 14:22:12 +02:00
Simon De Backer
d4ee161c07
Mod doc set style de same
2020-08-16 11:19:36 +02:00
Simon De Backer
90417ae509
Fix Copyright indentation
2020-08-16 09:40:14 +02:00
Laurent Trinques
e10ae8ce2e
Update Copyright date
2020-06-15 17:42:53 +02:00
Claveau Joshua
fd2c210f49
Add QetGraphicsTableItem + entry "add nomenclature" in project menu
2020-02-02 16:33:19 +01:00
scorpio810
3ed7a4e63b
Minor : update Copyright date
...
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5705 bfdf4180-ca20-0410-9c96-a3a8aa849046
2019-01-13 16:56:12 +00:00
scorpio810
30bee81432
Revert r5449 and disable r5452 momentary : Load time from elements is
...
very slow
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5461 bfdf4180-ca20-0410-9c96-a3a8aa849046
2018-07-30 15:24:29 +00:00
scorpio810
b97b01d63c
Apply clang-tidy's modernize-use-auto
...
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5449 bfdf4180-ca20-0410-9c96-a3a8aa849046
2018-07-19 16:27:20 +00:00
scorpio810
e4b1ba9797
Apply clang-tidy's performance-unnecessary-value-param, performance-for-
...
range-copy
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5448 bfdf4180-ca20-0410-9c96-a3a8aa849046
2018-07-19 14:14:31 +00:00
blacksun
eeb49d5a18
QetShapeItem : rounded rect is saved in the .qet file
...
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5437 bfdf4180-ca20-0410-9c96-a3a8aa849046
2018-07-14 11:10:23 +00:00
blacksun
0306bace46
QETshapeItem rectangle can have rounded corner.
...
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5436 bfdf4180-ca20-0410-9c96-a3a8aa849046
2018-07-12 10:01:34 +00:00
blacksun
57e5ccd943
Mutualize code
...
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5427 bfdf4180-ca20-0410-9c96-a3a8aa849046
2018-07-03 14:25:46 +00:00
blacksun
3ff5b00953
Minor code refactoring
...
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5417 bfdf4180-ca20-0410-9c96-a3a8aa849046
2018-06-29 07:55:48 +00:00
scorpio810
989d2877ee
Minor
...
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5079 bfdf4180-ca20-0410-9c96-a3a8aa849046
2017-10-12 12:52:26 +00:00
blacksun
9e9739bb4d
Improve the previous comit
...
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5077 bfdf4180-ca20-0410-9c96-a3a8aa849046
2017-10-11 18:44:45 +00:00
scorpio810
8dbd96d334
QetGraphicsHandlerItem reduce hoover size
...
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5075 bfdf4180-ca20-0410-9c96-a3a8aa849046
2017-10-11 15:37:40 +00:00
scorpio810
31f36b8625
Modernize-use-override refactors code
...
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5009 bfdf4180-ca20-0410-9c96-a3a8aa849046
2017-08-05 02:10:01 +00:00
blacksun
618683d962
Toatly revamp of the handlers use to modify primitves, shapes and conductors.
...
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5001 bfdf4180-ca20-0410-9c96-a3a8aa849046
2017-08-02 15:26:14 +00:00
scorpio810
41659fa6fd
Revert r4900
...
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4902 bfdf4180-ca20-0410-9c96-a3a8aa849046
2017-02-05 16:18:50 +00:00
scorpio810
6422dd096f
Replace foreach function by for, please try and report problem
...
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4900 bfdf4180-ca20-0410-9c96-a3a8aa849046
2017-02-04 21:43:23 +00:00
scorpio810
54c85db29c
Minor update Copyright year
...
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4860 bfdf4180-ca20-0410-9c96-a3a8aa849046
2017-01-20 10:55:49 +00:00
blacksun
bd4a472b7d
Element editor : add new handler for arc to resize angle with mouse.
...
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4722 bfdf4180-ca20-0410-9c96-a3a8aa849046
2016-09-25 08:14:29 +00:00
blacksun
b71d3a4c7d
Element editor : graphic part
...
Diagram editor : shape item
Gain a new way to be resized: mirror resizing. Click on the item for switch the resize mode
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4583 bfdf4180-ca20-0410-9c96-a3a8aa849046
2016-07-19 17:12:30 +00:00