Commit Graph

3091 Commits

Author SHA1 Message Date
joshua 7c6fca2aac Ungroup terminal is now managed by undo stack 2021-10-09 14:45:54 +02:00
joshua c6e3e385ff Clear code 2021-10-09 12:08:18 +02:00
joshua 089f260d9b Group terminals together is now managed by undo stack 2021-10-09 11:58:10 +02:00
joshua 828424cae8 Level terminals can be disassembled 2021-10-04 21:26:51 +02:00
joshua dca643f7aa Multi-level terminal can be created. 2021-10-03 13:22:21 +02:00
Peter Keresztes Schmidt de80d10f5e Build fix for non-C++17 compatible systems
std::variant/std::visit was only introduced with C++17. Remove its usage.
We don't even need it in these cases since QColor has an implicit constructor accepting Qt::GlobalColor.

Follow-up for b69c7b1027
2021-09-23 21:50:37 +02:00
joshua 1699ad9dd8 Add a push button to automatically reorder the terminal strip 2021-09-22 23:02:33 +02:00
Peter Keresztes Schmidt e9a5fded5c DiagramContextWidget: Fix verification of keys 2021-09-22 21:54:00 +02:00
Peter Keresztes Schmidt a8d42b0f9a Add MSVC support to MachineInfo 2021-09-22 21:53:21 +02:00
Peter Keresztes Schmidt b69c7b1027 Refactor deeply nested statements
Compilation using MSVC fails with a C1061 error since MSVC has a hard limit on block nesting.
Refactor the code in question to use map lookups instead.
2021-09-22 21:53:21 +02:00
joshua 377f8b1521 Overridden properties of terminal elements are now saved/loaded from project
The overridden properties of terminal elements made in the terminal
strip dialog are now saved and loaded from/to the project file.
2021-09-20 18:34:48 +02:00
joshua 67dbc798aa Minor 2021-09-20 18:21:23 +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 37e74b397e Use RealTerminalData struct instead of TerminalStripIndex class 2021-09-12 12:49:12 +02:00
joshua 8c554e875d Use QLatin1String 2021-09-10 23:43:36 +02:00
joshua 5ef073b6c1 Merge branch 'terminal_strip' into merge_confli_master_terminal_strip
* terminal_strip:
  User can edit the label of terminal inside the terminal strip editor
  Code refactoring
  Double click on Xref cell show the terminal in the diagram
  terminal function can be edited, edted value is applied to element
  Table widget : led and type is editable
  Minor gui change
  Remove position section of terminalStripModel
2021-09-10 23:31:26 +02:00
joshua 895417c98c Revert "Revert "Add terminalStripModel class""
This reverts commit 4615e6d060.
2021-09-10 23:30:49 +02:00
joshua 374805d6ab Revert "Revert "Merge branch 'master' of ssh://git.tuxfamily.org/gitroot/qet/qet into terminal_strip""
This reverts commit bb26954bd4.
2021-09-10 23:30:20 +02:00
joshua b08c2bd90b User can edit the label of terminal inside the terminal strip editor 2021-09-10 21:01:03 +02:00
joshua a765fe24be Bug fix : in some condition element are not loaded when open a project
If an element are overwrite by a modified element and the terminals of
the modified element are moved, the old element is not loaded because
some terminal are not found.
This commit remove the checking of not found terminal because it's
useless now.
2021-09-07 22:23:43 +02:00
joshua 4dd2dc259f Code refactoring 2021-08-23 20:44:53 +02:00
joshua f3811d3035 Add annex project 2021-08-20 17:41:08 +02:00
joshua 5288cd8c8b Add tab "annex project" to about qelectrotech dialog
The goal is to list annex project of QElectroTech.
2021-08-20 17:31:37 +02:00
joshua 80601a415a Double click on Xref cell show the terminal in the diagram 2021-08-17 20:49:48 +02:00
joshua cc6f66ad11 terminal function can be edited, edted value is applied to element 2021-07-17 13:44:44 +02:00
joshua 30dc34ebe1 Table widget : led and type is editable
But not applied yet to the terminal strip
2021-07-13 12:27:08 +02:00
joshua efed7ab5c0 Minor gui change 2021-07-12 19:16:01 +02:00
joshua 52e884b793 Minor fix : slave Xref item is not updated when variable %F is used 2021-06-28 21:31:15 +02:00
joshua 5912a99c16 Minor fix : master XRef is not updated when variable %F is used 2021-06-28 21:24:28 +02:00
joshua 8f051fc612 Remove table useless qetgraphicstableitem when model is reseted
When the model of a qetgraphicstableitem is reseted (for exemple when
the sql query is modified) we check if there is useless tables (table
with 0 row displayed) and remove it.
2021-06-24 19:46:18 +02:00
joshua bd96faa14f Fix crash
When a qetgraphicstable is deleted, the next and previous table is not
aware about the deletion and keep a dangled pointer of the deleted table
who cause a segfault.
2021-06-24 19:15:24 +02:00
joshua f410fbf7e2 Remove position section of terminalStripModel 2021-06-07 21:56:27 +02:00
joshua bb26954bd4 Revert "Merge branch 'master' of ssh://git.tuxfamily.org/gitroot/qet/qet into terminal_strip"
This reverts commit 364bce618c, reversing
changes made to efb4a8dd71.
2021-06-07 20:00:52 +02:00
joshua 4615e6d060 Revert "Add terminalStripModel class"
This reverts commit a1e18d2bba.
2021-06-07 19:45:45 +02:00
joshua a1e18d2bba Add terminalStripModel class 2021-06-07 19:26:41 +02:00
joshua 6660caa70f Merge branch 'master' into terminal_strip 2021-05-21 19:18:16 +02:00
joshua fdbfca9a8c Change ElementData enum
Change enum value 'ground' from enum 'function' to enum 'type'
2021-05-21 19:15:26 +02:00
joshua c1fdc1adaa Fix xrefproperties bug
Change only slave Xrefproperties is not applied due to overload operator
== who don't compare the formula string of slave.
2021-05-15 18:58:26 +02:00
joshua 789e195ace Fix include path from previous commit 2021-05-14 19:50:30 +02:00
joshua 3220a58b96 Move file 2021-05-14 19:37:36 +02:00
joshua 21c35bc744 Minor improvement at element picture creation
Call once the uuid() method of element location instead of four (and so
parse once time the xml) to store the uuid/picture and uuid/primitive to
hash.
2021-05-14 16:15:49 +02:00
joshua fd9ab47041 Load project from xml is a little more faster
Like previous commit, in the method loadDiadrams() we call the method
diagramAdded(), in this method we call rebuildDiagramsMap()
updateAllTabsTitle() and these methods operate a loop for each existing
DiagramView.

Now loadDiagrams don't call diagramAdded (which must be used only when
user add a diagram during the use of QElectroTech) but make operations
itself and when all DiagramView are added, call rebuildDiagramsMap()
updateAllTabsTitle() only once.
2021-05-14 15:47:10 +02:00
joshua 0aea48bdaa Open project is a litle more faster
In the methods readDiagramsXml we call addDiagram for each diagrams
loaded from xml, inside the addDiagram method we call the method
updateDiagramsFolioData() and to finish this method operate a loop for
each existing diagram.

Then when we load a project from xml of
10 folios, loop inside updateDiagramsFolioData() is called 55 time.
50 folios, loop inside updateDiagramsFolioData() is called 1275 time.
100 folios, loop inside updateDiagramsFolioData() is called 5050 time.

Now instead of call addDiagram, we add diagram directly inside the
methods readDiagramsXml and call the method updateDiagramsFolioData()
only once when all diagrams are loaded.
2021-05-14 13:38:59 +02:00
joshua ffabeb9caa Avoid excessive debug outputs
Avoid excessive debug outputs when terminal type doesn't exist (99.99%
of actual elements collections).
2021-05-13 20:48:56 +02:00
joshua 507c1b4f73 Minor gui behavior improvement 2021-05-11 18:46:12 +02:00
joshua 580ebe8b97 Terminal strip can now be edited and managed by undo command 2021-05-11 18:20:46 +02:00
joshua e0579b3040 Add widgets to edit terminal strip data (WIP) 2021-05-11 18:20:46 +02:00
joshua ded4ea555f Terminal element can be removed from a terminal strip 2021-05-11 18:20:46 +02:00
joshua f07f4cb150 Fix drag and drop bug 2021-05-11 18:20:46 +02:00