596 Commits

Author SHA1 Message Date
joshua
1607c7f5dc Minor : improve behavior when rotate terminal part.
iIn the element editor, every rotation is made around the center of the
scene, this is usefull when rotate several part but less when only one
need to be rotated, especially when it is the terminal part and we only
want to change the orientation.
This commit solve it. Now when only a terminal part is selected, the
terminal don't rotate around the center of the scene but change the
orientation.

The rotation, flip and mirror of parts are good features but always
rotate around the center of the scene and if the parts are far from the
center of the scene the behavior look inappropriate from the POV of user
(because parts move far from original position and can out of the view).
A good new features should be to solve it (rotate around the center of
the bounding rect of the selection) and probably extract the function
rotate/flip/mirror from the parts class and create a new class with for
only goal to calculate and apply these modifiaction trough an undo
command.
2025-07-15 22:47:33 +02:00
plc-user
c7ed744481 Include some fonts to QElectroTech
- include Liberation-Fonts and osifont
  (thanks elevatormind!)
- use "Liberation Sans" as default-font
- adjust License-Tab in About-Form
- Bugfix: When selecting a font, the current
  font is highlighted in dialog
- adjust some whitespace and English comments
2025-05-18 14:15:20 +02:00
plc-user
c1559d2a99 Fix signal for KColorButton 2025-03-28 20:16:37 +01:00
plc-user
eeb453f120 only calculate grid-point-size, when min != max 2025-03-13 20:46:04 +01:00
plc-user
0804d3524a improvement: ajust size of grid-dots with zoom-factor
Introduced additional spinboxes in config-page for
setting min- and max-size of grid-dots separately for
diagram- and element-editor.
That assures maximal flexibility for setting the grids.
Don't want the grid-dots to change over zooming-levels?
Set min- and max-values to the same number.
Preset-values for all min-/max-values is "1".
If the adjustable range of 1 to 5 is not sufficient, it
can be easily adjusted. Only need feedback for this.
2025-03-07 20:16:21 +01:00
plc-user
45afd9af0e element-editor: fix jumping positions when rotate, mirror or flip 2025-03-07 07:43:20 +01:00
plc-user
9044d532ac corrected English comments 2025-03-06 08:07:49 +01:00
plc-user
ef0fa6e7ac same change for polygons as for other primitives to support Qt5 & Qt6 2025-03-05 09:49:16 +01:00
plc-user
4009e6aaab simplify and use the same code for Qt5 & Qt6
When reading and comparing Qt5-docs and Qt6-docs, I read,
that there are no differences in the functions!
So it is not necessary to have the differentiation
between the Qt-Versions.
Code compiles without errors or warnings for Qt5 and Qt6.
2025-03-02 18:56:34 +01:00
plc-user
6111d8ca2c only write author-information, if available 2025-02-28 21:08:12 +01:00
plc-user
a36de7de74 implement variable point-size of grid 2025-02-28 16:33:24 +01:00
plc-user
43386aa14f unify calls to "setRotation" for element-primitives 2025-02-22 09:30:15 +01:00
plc-user
c2a2e5f5eb minor: whitespace and comments 2025-02-17 19:45:53 +01:00
plc-user
dc836248f0 element editor: add mirror and flip for “text”
Maybe not (yet) perfect, but it looks pretty good to me!

Why am I doing this to myself?
All this crap with fonts and stuff!
It's been crap for as long as I can remember.
2025-02-17 19:39:53 +01:00
plc-user
0f647a5c38 fix: do not add "kindInformations" for thumbnail-elements 2025-02-17 09:48:51 +01:00
plc-user
67112bf8e5 fix typo in enum-entry and comments 2025-02-17 09:33: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
3fc5469aee element-editor: add mirror and flip for "dynamic_text" 2025-02-16 16:15:46 +01:00
plc-user
6fdc243552 fix indention - no code-change 2025-02-16 15:43:58 +01:00
plc-user
da109b1522 element-editor: add rotation-functions to "text" and "dynamic_text" 2025-02-16 15:42:33 +01:00
plc-user
2aeae1fe46 use Qt-functions to rotate lines and polygons 2025-02-16 15:28:15 +01:00
plc-user
da0951d5a0 fix typo in variable-name (mixture of French and English) 2025-02-15 20:36:21 +01:00
plc-user
007ce79cee BugFix: Flip and Mirror of terminals 2025-02-15 09:13:56 +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
plc-user
4d5af028be menu: move "About QElectroTech" in Help-Menu to bottom
If the version number of QElectroTech is requested in the forum in case of error messages or anomalies, the Qt version used is very often stated because the entry “About QElectroTech” does not appear very prominently in the help menu: The entry “About Qt” is used much more frequently because it appears eye-catchingly as the lowest entry. However, specifying the Qt version is often not helpful for troubleshooting: We need the QET version!
That's why I'm moving the “About QElectroTech” entry to the bottom, so that it is easier to see and find!
2025-02-14 19:47:19 +01:00
plc-user
3471140b64 fix typo in fuction-name (looked like a mixture of French and English) 2025-02-14 16:47:39 +01:00
Laurent Trinques
43f0107eb1 Revert "Try Clazy fix-its"
Segfault on old Qt versions!
This reverts commit dba7caed3035585af4b301ed87bd4131dcac994c.
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
4808b04a31 fix movement of element, when origin is outside of graphics
When saving an element it is checked, if the origin (0/0)
is inside the graphical parts. If outside, the element is
moved by integer values for x- and y-offset before saving.
Old calculation for offset could lead to "strange" new
values for positions.

Additionally: fix typos and English comments
2025-02-11 11:46:36 +01:00
plc-user
29aee8e80c copy-and-paste: set paste-position to meaningful values 2025-02-10 18:33:49 +01:00
plc-user
717b257fa0 added English comments 2025-02-10 18:26:14 +01:00
plc-user
13f432571d comments: fixed typos and added English comments 2025-02-09 17:51:15 +01:00
plc-user
a20d02f5f0 element-editor: remove leading and trailing whitespace from author-info 2025-02-09 12:43:35 +01:00
plc-user
1fc33aa1ba element-editor: limit decimal places for sizes and positions to two, when saving file 2025-02-09 12:33:24 +01:00
plc-user
706eba6612 fix typos and whitespace 2025-02-09 12:25:09 +01:00
plc-user
1698e062ab remove dead code (local variables that were never used) 2025-02-01 08:52:07 +01:00
plc-user
3051c225bb minor: typos, witespace, comments 2025-02-01 08:49:12 +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
Achim
3438ba9ab3 composite text of report element corrected
In the ElementEditor, incorrect variables were displayed for
CompositeText in ReportElements.  This is corrected here
2024-12-31 21:58:42 +01:00
Achim
7a617e72bd a few small corrections 2024-12-31 08:40:56 +01:00
Achim
e73aa3b84d ComboBox change sorting
alphabetical sorting in the ComboBox changed according to the order in
the elementInfoKeys list
2024-12-31 08:40:03 +01:00
Laurent Trinques
31ed09f185 Revert "Try to fix https://github.com/qelectrotech/qelectrotech-source-mirror/"
This reverts commit 3992c60c45adfbbbecca119e1e505e9d3f0bc0d7.
2024-12-22 16:17:32 +01:00
Laurent Trinques
3992c60c45 Try to fix https://github.com/qelectrotech/qelectrotech-source-mirror/
pull/314
2024-12-22 14:25:30 +01:00
Laurent Trinques
34cc26a325
Revert "ElementEditor elmt_info_cb sorting changed" 2024-12-21 12:59:43 +01:00
Achim
15d9708c46 a few small corrections 2024-12-16 16:00:50 +01:00