Commit Graph

37 Commits

Author SHA1 Message Date
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
plc-user 51225d5f59 element-editor: add rotation with smaller increments for "line", "polygon", "text" and "dynamic_text" with shortcut <Ctrl>+<Space> 2025-02-16 16:31:18 +01:00
plc-user bd3b39cea3 element-editor: fix rotation, add mirror, add flip for graphical primitives
Now that the problem with the translations of keyboard shortcuts has been resolved and rotation using the space bar works reliably in principle, I took a closer look at the rotation function itself in the element editor.

I noticed, for example, that arcs can be rotated at an angle of 15°. This doesn't really make sense, as the “arc” part doesn't have the “rotation” property. There is only width and height.
And somehow rotating arcs didn't work well: start- and span-angles weren't adjusted.

Lines and polygons can be rotated in 15° increments, which doesn't make much sense, if other parts that can only be rotated in 90° increments are selected at the same time.

To make a long story short:
I reworked the rotation functions of the graphical parts so that now all parts are rotated in 90° steps around the origin! This means that it is now possible to mark several parts and rotate them around the same point at the same time!

In addition, the functions for mirroring graphic parts at y-axis (shortcut "M") and flipping at x-axis (shortcut "F") have been implemented.

I have saved the text elements for later!
(or someone else)
2025-02-14 20:31:03 +01:00
Laurent Trinques 43f0107eb1 Revert "Try Clazy fix-its"
Segfault on old Qt versions!
This reverts commit dba7caed30.
2025-02-14 16:17:58 +01:00
Laurent Trinques dba7caed30 Try Clazy fix-its
clazy is a compiler plugin which allows clang to understand Qt
semantics. You get more than 50 Qt related compiler warnings, ranging
from unneeded memory allocations to misusage of API, including fix-its
for automatic refactoring.

https://invent.kde.org/sdk/clazy
2025-02-14 15:52:23 +01:00
plc-user 3d82aff4e7 FIX: shortcut for rotation in element-editor was hardcoded in UI 2025-02-12 15:35:45 +01:00
plc-user 38f5547228 use "positive logic" for conditional compiling 2025-02-11 14:43:18 +01:00
plc-user 317c90c769 do not hardcode translations for shortcuts: let the system do it for you! 2025-02-11 14:36:15 +01:00
plc-user 30a6221e45 remove unused function 2025-01-28 18:56:16 +01:00
plc-user 9f8287206b fix: "dxf2elmt" and "QET_ElementScaler" also read imported files from QETApp::documentDir() by default 2025-01-28 18:44:19 +01:00
Laurent Trinques 77bfe84a4c One year 2025-01-04 13:37:40 +01:00
Laurent Trinques 4138b8998c qetelementeditor: remove old plugin DXFtoQET 2024-09-29 14:33:14 +02:00
plc-user 85d10fc0e6 integrate "QET_ElementScaler" as external software 2024-08-19 09:19:28 +02:00
Laurent Trinques 774b604b50 Minor 2024-05-08 20:08:16 +02:00
Laurent Trinques c7d6312997 Try to fix bug #303 2024-05-08 19:18:48 +02:00
plc-user 0d44933432 correct more indentations / whitespace 2024-04-24 18:02:00 +02:00
Laurent Trinques e73cf633ce 2023->2024 2024-03-29 10:09:48 +01:00
joshua ff3b497da2 Element editor : minor fix
In the part list widget, the terminal name is empty if terminal haven't
got name.
Now "terminal" is always displayed and if the terminal have a name the
name is appended to "terminal".
Example :
if the terminal name is 24 then the the part list widget show "terminal
: 24"
2024-02-15 22:04:11 +01:00
Laurent Trinques a9f6583189 Fix URL 2023-11-09 13:46:45 +01:00
Martin Marmsoler 8bc4053d35 fix compilation 2023-10-12 21:37:04 +02:00
Martin Marmsoler e51ddbaa42 Give the user a possibility to set the maximum number of parts during import on an dxf file. Because sometimes the dxf file can contain more than 200 elements and the user is deleting some elements afterwards 2023-10-12 20:46:09 +02: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
joshua 5a497cd6b5 Element editor : improve code
Better use of signal partsAdded and partsRemoved
2022-07-26 16:17:47 +02:00
joshua cae7cbdbd8 Import dxf is managed by undo command 2022-07-24 20:58:00 +02:00
joshua 6e81451b46 Add import dxf feature
Use dxf2elmt to import dxf.
See https://github.com/antonioaja/dxf2elmt
2022-07-23 21:54:23 +02:00
joshua a2b73ea2bc Definitely fix the rotation problem :)
Only use space for every rotation
2022-05-25 21:47:31 +02:00
Laurent Trinques bf32219154 Fix previous workaround
Now the shortcut for the rotate action is key_space and use key_R to
rotate terminal on the fly before placing it in the drawing.
2022-05-25 17:39:49 +02:00
Laurent Trinques 6a669f1399 Fix previous workaround
Because strange behaviour with Qt::key_space if used for keyPressEvent
and also in shortcut.
Now the shortcut for the rotate action is ctrl + R and key_space to
rotate terminal on the fly before placing it in the drawing.
2022-05-25 13:47:22 +02:00
Adrien Allain ccfb46b354 Implemented QET coding style (replaced 4 space with tab) 2021-09-14 09:35:14 +02:00
Adrien Allain c640d96bca * Added the m_rotate_action to qetelementeditor.ui * Adding QAction to qetelementeditor.cpp and connecting it to new slot RotateElementsCommand defined in editorcommands.cpp
* Some types of elements need to specialize the setRotation method in order to behave correctly :
- PartTerminal needs to call setOrientation
- PartLine, PartRectangle and PartPolygon need a different rotation center.
2021-09-14 09:35:14 +02:00
joshua 09c0929040 Element editor gui fix
When select a primitive an unparented windows appear and can't be
deleted. Fix it.
2021-04-30 20:27:24 +02:00
joshua 8f85cacb06 QetElementEditor : Use elementData class 2021-02-21 19:40:33 +01:00
joshua a1779d1a7a Rewrite terminaleditor with ui file.
Write terminal editor with ui file.
The terminalData::type of a terminal can be edited with the terminal
editor.
2021-02-21 19:40:33 +01:00
joshua 24ec94d73e QetElementEditor : rewrite gui with ui file 2021-02-21 19:40:32 +01:00
joshua e1b98ce5b5 Revert "QetElementEditor : rewrite gui with ui file"
This reverts commit e3db2bc898.
2021-02-01 19:52:15 +01:00
joshua e3db2bc898 QetElementEditor : rewrite gui with ui file 2021-01-30 19:34:21 +01:00