101 Commits

Author SHA1 Message Date
joshua
e26f7fdaaa refactor[deiagram editor]: mutualize code.
The features used to jump to linked element and xref now use the same
function.
2025-10-20 22:58:12 +02:00
Laurent Trinques
58339f9016 Fix copyright years 2025-10-17 09:58:39 +02:00
joshua
f83a5b3a79 Merge branch 'terminal_strip' 2025-10-15 23:30:54 +02:00
joshua
f0ec416a91 Terminal strip graphic item can display Xref of terminal 2025-10-03 21:49:21 +02:00
joshua
a121fbe530 Add undo / redo command
The undo/redo command of diagram editor is
shared to the terminal strip editor.
2025-07-01 23:37:16 +02:00
joshua
d711d8fb4a Terminal strip editor can now edit multiple project.
Before this this commit the terminal strip editor couldn't only work on
the first project opened into this editor, all other project opened
after couldn't be edited.
This is now past, terminal strip editor can now edit every project open
in QElectroTech.
2025-06-11 22:43:41 +02:00
joshua
3a6b4807db Fix crash.
Fix crash when :
1°-Open a project with terminal strip and open the terminal strip editor
2°-Close the terminal strip editor and the project (keep qelectrotech
open).
3°-redo step 1 and click on an item in the tree at left of the window,
qet crash.

Qet don't crash anymore but the terminal strip editor continue to work
with the terminal strip of the first opening (exactly the pointer of the
terminal strip) who don't exist anymore. Need more work.
2025-06-09 21:35:00 +02:00
joshua
2c1b840f9c Use same properties for every terminal level
Initially it was planned to have separate text configuration for every
terminal level. It's not useful, use same properties for every level is
sufficient and visually more consistent.
By consequent every QVector related to these properties was replaced by
a single value.
2025-03-12 21:48:18 +01:00
joshua
2d89d70682 Add possibility to adjust terminal text position
The bounding rectangle used to define the position of the terminal text
can be edited. The y position and height can now be edited. The width is
not editable because is always the width of the rectangle of the of the
terminal.
2025-03-12 21:10:16 +01:00
joshua
7747223dfa Terminal strip item font is editable
The font used in the terminal strip item can be edited
trough the terminal strip layout editor widget
2025-03-12 19:22:30 +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
Laurent Trinques
77bfe84a4c One year 2025-01-04 13:37:40 +01:00
plc-user
b3ac3c82af fixed indentations of the remaining *.cpp/*.h files 2024-05-02 08:39:27 +02:00
Laurent Trinques
e73cf633ce 2023->2024 2024-03-29 10:09:48 +01:00
joshua
258bfd7957 terminal strip Layout editor add help preview button 2023-09-20 08:25:58 +02:00
joshua
12b7c7c47c Terminal strip layout editor : add preview of terminal strip layout 2023-09-19 15:23:29 +02:00
joshua
45b8cb34f3 Fix minor gui wrong behavior 2023-03-10 20:19:12 +01:00
joshua
470e4a059b Add widget to edit terminal strip item layout
The widget is available in the project properties editor.
WIP
2023-02-21 21:44:28 +01:00
joshua
539e0a7a49 Merge branch 'terminal_strip'
* terminal_strip:
  Terminal strip item can saved / loaded to .qet file
  See previous commit...
  Move terminal strip drawer class in is own file
  Fix wrong use of QStringLiteral and QLatin1String
  Double click a TerminalStripItem open the editor
  Minor change about checkable QAction of QetDiagramEditor
  Minor : corrects a minor aesthetic defect when unbridge terminals
  Revamp code
  Add and move terminal strip item are now managed by undo command
  TerminalStripItem : Draw terminal bridge
  Terminal strip item can be added to diagram
  Minor : add QGIUtility namespace
2023-01-02 19:40:08 +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
d23a5bbdc7 Fix wrong use of QStringLiteral and QLatin1String 2022-12-02 18:26:56 +01:00
joshua
81640015e5 Double click a TerminalStripItem open the editor 2022-12-02 18:12:47 +01:00
joshua
7fede2277f Add and move terminal strip item are now managed by undo command 2022-11-08 19:20:32 +01:00
joshua
ff80453f2c Terminal strip item can be added to diagram
Initial commit about graphics item of a terminal strip, Work in
progress.
2022-08-27 21:24:25 +02:00
joshua
2a307a74da Improve execution time of some actions.
Improve the execution time when we add, change or remove
several terminals to/from terminal strip.
2022-06-23 21:36:24 +02:00
joshua
fa753449ad Minor : fix little gui defect
At opening of terminal strip editor window, click on free terminal
in the tree dock don't show up the free terminal table.
2022-06-22 18:56:22 +02:00
joshua
fe19b270f9 Improve opening time of terminal strip editor window
Need serious refactoring of codes who use the method
Element::actualLabel() and also actualLabel itself.
This part of code is crappy.
2022-06-22 17:34:05 +02:00
joshua
2e15372aab Display conductor number 2022-06-14 19:30:45 +02:00
joshua
baf412614c Remove terminal strip widget
Since this commit, the terminals can't be moved from the tree widget,
instead we need to use the "move in" widget to move one or several
selected terminals in the table view.
2022-05-04 18:38:45 +02:00
joshua
bce6a43427 Several terminals can be removed or moved from strip in one shot 2022-04-10 13:52:45 +02:00
joshua
898edb6c12 Minor fix : wrong variable name 2022-04-09 16:34:30 +02:00
joshua
6197d0215a Several real terminal can be added to terminal strip in one shot
User can select several real terminals in the free terminal editor
and add it with one operation on a terminal strip.
2022-04-08 20:48:32 +02:00
joshua
a38d97896d Minor : avoid unnecessary multiple function call
TerminalStripTreeDockWidget::on_m_tree_view_currentItemChanged
call setCurrentStrip only when current strip changed, and not every time
when user click in another item on the tree view.
2022-03-30 20:30:57 +02:00
joshua
c4b0c1435c The free terminal properties can be edited by batch. 2022-03-25 19:49:31 +01:00
joshua
a4445c411d Change made inside the free terminal table can be applied 2022-03-25 19:25:46 +01:00
joshua
e92bd36f9b Hide/show apply/reset buttons according to current displayed widget 2022-03-25 19:00:09 +01:00
joshua
8084fa8f29 Edited data of terminal strip can be applied 2022-03-23 21:18:22 +01:00
joshua
edfb23be23 Change terminal strip editor class
Change parent class from QDialog to QWidget.
Terminal strip editor is now embedded in TerminalStripEditorWindow.
2022-03-20 18:25:25 +01:00
joshua
b48ba939de Add free terminal editor widget 2022-03-16 22:44:08 +01:00
joshua
b1ad16d482 Add toolbar and buttons
Add 'add terminal strip' button.
Add 'remove terminal strip' button
Add 'reload' button
2022-03-16 18:58:36 +01:00
joshua
ceb54fbc6a Start to move terminal strip editor from QDialog to QMainWindow 2022-03-14 17:56:18 +01:00
joshua
9cbc3a2265 Add table widget and item model for free terminal
WIP, the change made in the table widget can't be applied.
2022-03-12 19:07:49 +01:00
joshua
0ff099fb52 Revamp code
Change the way to know who is the physical terminal of a real terminal
when we got only the real terminal.
2022-02-20 13:13:29 +01:00
joshua
05a2e4b37b Improve undo command when add/move/remove terminal in/from/to terminal strip 2022-02-19 12:34:38 +01:00
joshua
a028b774bf QTreeWidget "terminal explorer" : improve item text
In the QTreeWidget "terminal explorer", when the physical terminal is
composed by several real terminal, the text of the QTreeWidgetItem
display the label of each real terminal.
2022-02-06 15:05:24 +01:00
joshua
3a53c2d53b minor : remove unused code 2022-02-05 12:02:59 +01:00
joshua
826991e6d6 Improve how real terminals are grouped 2022-02-01 11:13:23 +01:00
joshua
bd635b8e43 Minor : don't push an undo command when change bridge color by the same color 2022-01-28 18:37:40 +01:00