78 Commits

Author SHA1 Message Date
plc-user
43386aa14f unify calls to "setRotation" for element-primitives 2025-02-22 09:30:15 +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
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
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
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 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
Laurent Trinques
77bfe84a4c One year 2025-01-04 13:37:40 +01:00
Laurent Trinques
e73cf633ce 2023->2024 2024-03-29 10:09:48 +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
joshua
57695bbbea Element editor : improve code
Better use of signal partsAdded and partsRemoved
2022-07-26 17:03:18 +02:00
joshua
5a497cd6b5 Element editor : improve code
Better use of signal partsAdded and partsRemoved
2022-07-26 16:17:47 +02:00
Laurent Trinques
9a6e1d2a61 Editor commands: change the rotation with the space key on the keyboard
from 90° to 15° for more precision for part lines, polygons, texts, arcs
and circles.
2022-05-20 10:18:37 +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
8f85cacb06 QetElementEditor : Use elementData class 2021-02-21 19:40:33 +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 d04bccc384aa8b9dc16e4432ac72ccb787b2508b.
2021-02-06 19:00:48 +01:00
Laurent Trinques
d04bccc384 Update Copyright date 2021-02-06 18:33:42 +01:00
Simon De Backer
36dbe65457 Add TODO compile var + Fix doxygen issue
You can make your code warn on compile time for the TODO's
In order to do so, uncomment the following line. in pro file
DEFINES += TODO_LIST
2020-09-24 17:01:33 +02:00
Simon De Backer
5d92393ee7 Wrap code for better readability 2020-09-07 22:03:40 +02:00
Simon De Backer
331918d143 Wrap code for better readability 2020-08-20 21:58:23 +02:00
Simon De Backer
0c00d83b27 Fix some doxygen issues 2020-08-20 21:57:35 +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
d4ee161c07 Mod doc set style de same 2020-08-16 11:19:36 +02:00
Claveau Joshua
86766a9090 Element editor : a copied/pasted terminal part have a new uuid. 2020-08-12 15:45:48 +02:00
Simon De Backer
fe4552200b Add compiler message @TODO 2020-07-19 22:06:42 +02:00
Laurent Trinques
e10ae8ce2e Update Copyright date 2020-06-15 17:42:53 +02:00
Simon De Backer
20a739fa96 fix deprecated warning QList::swap() attempt 2
Use
QList::swapItemsAt()
instead.

This function was introduced in Qt 5.13.
2020-06-07 16:42:26 +02:00
Laurent Trinques
261abfa10b Revert "fix deprecated warning QList::swap()"
This reverts commit b5a33429df12a5ae5a1e21841faca612afea02cf.
2020-05-30 06:47:34 +02:00
Simon De Backer
b5a33429df fix deprecated warning QList::swap()
Use
QList::swapItemsAt()
instead.
2020-05-30 06:24:40 +02: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
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
24812944eb Forget qet.cpp and qet.h from previous comit.
Add new function for create QAction used for edit the depth of items.


git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5402 bfdf4180-ca20-0410-9c96-a3a8aa849046
2018-06-20 18:35:06 +00:00
blacksun
275f20fa61 Element editor : dynamic text field can be set with element info as source of text.
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5260 bfdf4180-ca20-0410-9c96-a3a8aa849046
2018-03-11 12:59:53 +00:00
blacksun
bb39413992 Element editor : element informations (manufacturer, reference etc...) can be created directly from the element editor. For that go to the widget "Element Property"
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5057 bfdf4180-ca20-0410-9c96-a3a8aa849046
2017-10-01 15:25:34 +00:00
scorpio810
9f9b127c04 Modernize-use-nullptr refactors code
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5008 bfdf4180-ca20-0410-9c96-a3a8aa849046
2017-08-05 02:06:59 +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
scorpio810
025fa64f67 Minor : update Copyright date
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4481 bfdf4180-ca20-0410-9c96-a3a8aa849046
2016-05-13 17:40:36 +00:00
blacksun
871d50c014 style editor : use QPropertyUndoCommand instead of ChangePartCommand.
Remove ChangePartCommand class.


git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4073 bfdf4180-ca20-0410-9c96-a3a8aa849046
2015-07-24 13:41:51 +00:00
blacksun
b32e1bf339 polygon editor : use QPropertyUndoCommand instead of ChangePartCommand
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4069 bfdf4180-ca20-0410-9c96-a3a8aa849046
2015-07-24 11:11:50 +00:00
blacksun
c885ce3d7a Element editor : add handler for modifie primitives
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4058 bfdf4180-ca20-0410-9c96-a3a8aa849046
2015-07-20 17:45:37 +00:00
scorpio810
81c684ca49 Merge Qt5 branch sources folder to trunk
-Cette ligne, et les suivantes ci-dessous, seront ignorées--

M    sources/aboutqet.cpp
M    sources/bordertitleblock.cpp
M    sources/conductorproperties.h
M    sources/configdialog.cpp
M    sources/configpages.cpp
M    sources/configpages.h
M    sources/createdxf.h
M    sources/diagram.cpp
M    sources/diagram.h
M    sources/diagramcommands.cpp
M    sources/diagramcommands.h
M    sources/diagramprintdialog.cpp
M    sources/diagramprintdialog.h
M    sources/diagramschooser.cpp
M    sources/diagramschooser.h
M    sources/diagramview.cpp
M    sources/diagramview.h
M    sources/dvevent/dveventaddimage.cpp
M    sources/dvevent/dveventaddshape.cpp
M    sources/editor/arceditor.cpp
M    sources/editor/arceditor.h
M    sources/editor/editorcommands.cpp
M    sources/editor/editorcommands.h
M    sources/editor/elementitemeditor.h
M    sources/editor/elementprimitivedecorator.cpp
M    sources/editor/elementscene.cpp
M    sources/editor/elementscene.h
M    sources/editor/elementview.cpp
M    sources/editor/ellipseeditor.cpp
M    sources/editor/ellipseeditor.h
M    sources/editor/esevent/eseventaddtext.cpp
M    sources/editor/esevent/eseventaddtextfield.cpp
M    sources/editor/esevent/eseventinterface.cpp
M    sources/editor/graphicspart/customelementpart.h
M    sources/editor/graphicspart/parttext.cpp
M    sources/editor/graphicspart/parttext.h
M    sources/editor/graphicspart/parttextfield.cpp
M    sources/editor/graphicspart/parttextfield.h
M    sources/editor/lineeditor.cpp
M    sources/editor/lineeditor.h
M    sources/editor/polygoneditor.cpp
M    sources/editor/qetelementeditor.cpp
M    sources/editor/qetelementeditor.h
M    sources/editor/rectangleeditor.cpp
M    sources/editor/rectangleeditor.h
M    sources/editor/styleeditor.cpp
M    sources/editor/styleeditor.h
M    sources/editor/terminaleditor.cpp
M    sources/editor/terminaleditor.h
M    sources/editor/texteditor.cpp
M    sources/editor/texteditor.h
M    sources/editor/textfieldeditor.cpp
M    sources/editor/textfieldeditor.h
M    sources/editor/ui/elementpropertieseditorwidget.cpp
M    sources/elementdefinition.cpp
M    sources/elementdeleter.cpp
M    sources/elementdeleter.h
M    sources/elementdialog.cpp
M    sources/elementscategorieslist.h
M    sources/elementscategorieswidget.cpp
M    sources/elementscategorieswidget.h
M    sources/elementscategory.cpp
M    sources/elementscategorydeleter.cpp
M    sources/elementscategorydeleter.h
M    sources/elementscategoryeditor.cpp
M    sources/elementscategoryeditor.h
M    sources/elementscollection.cpp
M    sources/elementscollectioncache.cpp
M    sources/elementspanel.cpp
M    sources/elementspanel.h
M    sources/elementspanelwidget.cpp
M    sources/elementspanelwidget.h
M    sources/elementtextsmover.h
M    sources/exportdialog.cpp
M    sources/exportdialog.h
M    sources/exportproperties.cpp
M    sources/exportpropertieswidget.cpp
M    sources/exportpropertieswidget.h
M    sources/genericpanel.cpp
M    sources/integrationmoveelementshandler.cpp
M    sources/integrationmoveelementshandler.h
M    sources/interactivemoveelementshandler.cpp
M    sources/nameslistwidget.cpp
M    sources/nameslistwidget.h
M    sources/newelementwizard.cpp
M    sources/newelementwizard.h
M    sources/nomenclature.cpp
M    sources/nomenclature.h
M    sources/projectconfigpages.cpp
M    sources/projectview.cpp
M    sources/projectview.h
M    sources/qet.cpp
M    sources/qetapp.cpp
M    sources/qetapp.h
M    sources/qetdiagrameditor.cpp
M    sources/qetdiagrameditor.h
M    sources/qetgraphicsitem/conductor.cpp
M    sources/qetgraphicsitem/conductortextitem.cpp
M    sources/qetgraphicsitem/customelement.cpp
M    sources/qetgraphicsitem/diagramimageitem.cpp
M    sources/qetgraphicsitem/diagramtextitem.cpp
M    sources/qetgraphicsitem/diagramtextitem.h
M    sources/qetgraphicsitem/element.cpp
M    sources/qetgraphicsitem/ghostelement.cpp
M    sources/qetgraphicsitem/qetshapeitem.cpp
M    sources/qetgraphicsitem/terminal.cpp
M    sources/qetgraphicsitem/terminal.h
M    sources/qeticons.cpp
M    sources/qeticons.h
M    sources/qetmainwindow.cpp
M    sources/qetmessagebox.cpp
M    sources/qetmessagebox.h
M    sources/qetprintpreviewdialog.cpp
M    sources/qetprintpreviewdialog.h
M    sources/qetproject.cpp
M    sources/qetsingleapplication.cpp
M    sources/qettabbar.h
M    sources/qfilenameedit.cpp
M    sources/qtextorientationspinboxwidget.cpp
M    sources/qtextorientationspinboxwidget.h
M    sources/qtextorientationwidget.cpp
M    sources/qtextorientationwidget.h
M    sources/richtext/richtexteditor.cpp
M    sources/richtext/richtexteditor_p.h
M    sources/richtext/ui_addlinkdialog.h
M    sources/titleblock/dimensionwidget.h
M    sources/titleblock/gridlayoutanimation.h
M    sources/titleblock/helpercell.h
M    sources/titleblock/integrationmovetemplateshandler.cpp
M    sources/titleblock/integrationmovetemplateshandler.h
M    sources/titleblock/qettemplateeditor.cpp
M    sources/titleblock/qettemplateeditor.h
M    sources/titleblock/templatecellsset.h
M    sources/titleblock/templatecellwidget.cpp
M    sources/titleblock/templatecellwidget.h
M    sources/titleblock/templatecommands.cpp
M    sources/titleblock/templatedeleter.cpp
M    sources/titleblock/templatedeleter.h
M    sources/titleblock/templatelocationchooser.cpp
M    sources/titleblock/templatelocationchooser.h
M    sources/titleblock/templatelocationsaver.cpp
M    sources/titleblock/templatelocationsaver.h
M    sources/titleblock/templatelogomanager.cpp
M    sources/titleblock/templatelogomanager.h
M    sources/titleblock/templateview.cpp
M    sources/titleblock/templatevisualcell.h
M    sources/titleblockcell.cpp
M    sources/titleblocktemplate.cpp
M    sources/treecoloranimation.h
M    sources/ui/conductorpropertieswidget.cpp
M    sources/ui/diagrampropertiesdialog.cpp
M    sources/ui/diagramselection.cpp
M    sources/ui/dialogautonum.cpp
M    sources/ui/dialogwaiting.cpp
M    sources/ui/elementpropertieswidget.cpp
M    sources/ui/elementselectorwidget.cpp
M    sources/ui/linksingleelementwidget.cpp
M    sources/ui/masterpropertieswidget.cpp
M    sources/ui/potentialtextsdialog.cpp
M    sources/ui/projectpropertiesdialog.cpp
M    sources/ui/selectautonumw.cpp
M    sources/ui/titleblockpropertieswidget.cpp
M    sources/ui/xrefpropertieswidget.cpp
M    sources/undocommand/changeelementinformationcommand.cpp


git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@3783 bfdf4180-ca20-0410-9c96-a3a8aa849046
2015-03-02 20:14:56 +00:00
scorpio810
eaff56b669 Update copyright date
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@3734 bfdf4180-ca20-0410-9c96-a3a8aa849046
2015-02-20 14:56:22 +00:00