Compare commits

..

132 Commits

Author SHA1 Message Date
Laurent Trinques 34cc26a325 Revert "ElementEditor elmt_info_cb sorting changed" 2024-12-21 12:59:43 +01:00
Laurent Trinques ba14c6112e Merge pull request #316 from plc-user/master
Fix typo and some whitespace
2024-12-19 16:22:45 +01:00
Laurent Trinques cb8256bd48 Add de binary translation, thanks ChuckNr11 for update translation 2024-12-19 10:52:13 +01:00
Laurent Trinques 3dd512b587 Merge pull request #314 from ChuckNr11/master
ElementEditor elmt_info_cb sorting changed
2024-12-19 10:41:58 +01:00
Laurent Trinques 31c0267cd5 Merge pull request #315 from plc-user/master
Fix missing company-titleblocks in properties-dialog
2024-12-19 09:58:37 +01:00
plc-user 88b2955b00 Fix typo and some whitespace 2024-12-18 16:48:11 +01:00
plc-user 46378ca2a7 Fix missing company-titleblocks in properties-dialog 2024-12-18 15:18:34 +01:00
Achim c7481011e8 german language file adapted 2024-12-16 16:01:37 +01:00
Achim 15d9708c46 a few small corrections 2024-12-16 16:00:50 +01:00
Achim 3b32daf15d ComboBox change sorting
alphabetical sorting in the ComboBox changed according to the order in
the elementInfoKeys list
2024-12-16 15:55:16 +01:00
ChuckNr11 0a658d5d61 Merge branch 'qelectrotech:master' into master 2024-12-15 22:17:14 +01:00
Laurent Trinques a140c5ad39 Update CMakeLists.txt
Publish Edge Snap / publish_amd64 (push) Failing after 15s
2024-12-15 15:05:23 +01:00
Laurent Trinques 4894284520 Fix segfault due to calling method of uninitialized object, thanks
ladmanj

https://github.com/qelectrotech/qelectrotech-source-mirror/issues/311
2024-12-15 14:41:34 +01:00
Laurent Trinques efc8745bc7 Update packaging_script_AppImage.sh 2024-12-15 09:35:26 +01:00
Laurent Trinques 406af16e94 Update org.qelectrotech.QElectroTech.json 2024-12-15 09:32:16 +01:00
Laurent Trinques e3e48d3966 Fix snapcraft.yaml
Publish Edge Snap / publish_amd64 (push) Failing after 14s
2024-12-14 16:09:07 +01:00
Laurent Trinques 0e646aed0b Update translations_stat.pl
Publish Edge Snap / publish_amd64 (push) Failing after 16s
2024-12-14 14:25:35 +01:00
Laurent Trinques 52d56c18a2 Try to fix icon on Wayland 2024-12-14 13:31:42 +01:00
Laurent Trinques d3f132adc6 Try to fix icon on Wayland 2024-12-14 13:28:17 +01:00
Achim 7b50f10749 ElementEditor elmt_info_cb sorting changed
alphabetical sorting in the ComboBox changed according to the order in
the elementInfoKeys list
2024-12-08 19:36:22 +01:00
Laurent Trinques 64bb2308d8 git submodule update --remote elements
Publish Edge Snap / publish_amd64 (push) Failing after 15s
2024-12-07 17:05:23 +01:00
Laurent Trinques dd3cee5d8e Merge pull request #313 from plc-user/master
Publish Edge Snap / publish_amd64 (push) Failing after 15s
fix typos and whitespace
2024-11-24 08:15:23 +01:00
plc-user 6dcb6ebcb7 fix typos and whitespace 2024-11-23 21:17:39 +01:00
Laurent Trinques a9f5e2945b Update qetmainwindow.cpp
Publish Edge Snap / publish_amd64 (push) Failing after 21s
2024-11-23 16:01:39 +01:00
Laurent Trinques 732d317e81 Update qetmainwindow.cpp
Fix download url
2024-11-23 13:17:57 +01:00
Laurent Trinques 2b77964881 git submodule update --remote elements
Publish Edge Snap / publish_amd64 (push) Failing after 17s
2024-11-17 12:00:00 +01:00
Laurent Trinques 5702ed3d04 Merge pull request #312 from Arusekk/dark-mode-collections
Force light mode in collections like projects
2024-11-17 11:24:07 +01:00
Arkadiusz Kozdra a2c1c5515a Force light mode in collections like projects 2024-11-16 10:03:29 +01:00
Laurent Trinques 8b66709ea3 Update en, fr translations 2024-11-03 14:59:37 +01:00
Laurent Trinques e6d995c190 Update *ts files 2024-11-03 14:42:35 +01:00
Laurent Trinques c1706cb055 Add new variables to elementInfoKeys
aux1, aux2, aux3, aux4
See:
https://qelectrotech.org/forum/viewtopic.php?pid=20558#p20558
2024-11-03 14:40:24 +01:00
Laurent Trinques fe3ffd890b Update snapcraft.yaml 2024-10-31 11:15:50 +01:00
Laurent Trinques 8b5a4cea0d Update translations *ts files 2024-10-18 16:37:29 +02:00
Laurent Trinques ca48684b39 Update Polish translation, thanks Pawel 2024-10-13 14:28:27 +02:00
Laurent Trinques c4fd1efb4f Minor 2024-10-13 10:02:49 +02:00
Laurent Trinques fc0dcb6ab0 Improve message box 2024-10-13 09:55:24 +02:00
Laurent Trinques e02ad585a9 Minor 2024-10-10 11:42:37 +02:00
Laurent Trinques 75cd943dbd Update *TS files 2024-10-10 11:06:28 +02:00
Laurent Trinques e6d3121a32 Uniformise MessageBox
Add QObjet for translate box message
2024-10-10 10:57:09 +02:00
Laurent Trinques 429726f463 Merge pull request #310 from plc-user/master
About QET: improvements in usability
2024-10-08 16:30:40 +02:00
plc-user b9c9d0e31f About-Dialog - Log: Scroll to most recent log-entry 2024-10-08 12:48:02 +02:00
plc-user 7918cbb7ab remove unneeded #include 2024-10-08 12:21:45 +02:00
plc-user 1454a8d4e7 About-Dialog - Log: Show most recent log file by default 2024-10-08 12:10:10 +02:00
Laurent Trinques 35018ba314 Merge pull request #308 from plc-user/master
use MessageBox to inform user about additional info when importing scaled element
2024-10-06 16:35:14 +02:00
plc-user 3bf4c852c9 use MessageBox to inform user about additional info when importing scaled element 2024-10-06 16:15:08 +02:00
Laurent Trinques a118c33f80 add messageBox to inform user when dxf2elmt can't convert DXF file 2024-10-06 14:30:31 +02:00
Laurent Trinques 326387895a Update qetdiagrameditor.cpp 2024-10-06 06:29:24 +02:00
Laurent Trinques 566e7f7004 Update qetdiagrameditor.cpp 2024-10-06 06:18:48 +02:00
Laurent Trinques 625e673385 Update qetdiagrameditor.cpp 2024-10-05 14:34:20 +02:00
Laurent Trinques 1863329ca0 Typo 2024-10-05 13:47:08 +02:00
Laurent Trinques e83424459c Try to fix false positive message box warning when launching process-
>startDetached("qet_tb_generator")
Launch program "qet_tb_generator" by QET only when an project was open
2024-10-05 13:41:20 +02:00
Laurent Trinques 59253019ff Update snapcraft.yaml 2024-09-30 06:13:24 +02:00
Laurent Trinques c66b873631 Update qelectrotech-launch 2024-09-29 15:21:20 +02:00
Laurent Trinques b2a999cec5 Update snapcraft.yaml 2024-09-29 14:38:39 +02:00
Laurent Trinques f1cb63cf0c Snap elementeditor: remove old plugin DXFtoQET 2024-09-29 14:37:25 +02:00
Laurent Trinques 4138b8998c qetelementeditor: remove old plugin DXFtoQET 2024-09-29 14:33:14 +02:00
Laurent Trinques 24929861ba Improve 2024-09-29 13:11:40 +02:00
Laurent Trinques fcd2f68f68 dxftoelmt: add Print standard error and filepath to the log file 2024-09-29 12:54:47 +02:00
Laurent Trinques f0b0af9a76 git submodule update --remote elements 2024-09-27 16:22:47 +02:00
Laurent Trinques 6a7f24a2af git submodule update --remote elements 2024-08-29 11:34:02 +02:00
Laurent Trinques 59e06a4087 Update Polish translation, thanks Pawel 2024-08-28 13:38:17 +02:00
Laurent Trinques 3738c79ec6 Merge pull request #304 from plc-user/master
make text for missing software "dxf2elmt" translatable
2024-08-21 09:09:43 +02:00
Laurent Trinques 4871aae59d revert Try to improve Unable to run the app on OSX 2024-08-20 18:55:47 +02:00
plc-user 8649d21298 fix French translation 2024-08-20 16:46:10 +02:00
plc-user de41f29e6b make text for missing software "dxf2elmt" translatable 2024-08-20 16:31:21 +02:00
Laurent Trinques f1a8c00028 Update *TS files 2024-08-20 12:43:36 +02:00
Laurent Trinques e4f5e8c68a Merge pull request #303 from plc-user/master
QET_ElementScaler: fix error for Qt 5.9 and added mirroring
2024-08-20 12:38:01 +02:00
plc-user 1649e8d28b QET_ElementScaler: fix for "cancel" 2024-08-20 11:48:41 +02:00
plc-user 5e3ca46133 QET_ElementScaler: fix error for Qt 5.9 and added mirroring 2024-08-20 11:38:29 +02:00
Laurent Trinques a162f158ad Update *Ts files 2024-08-20 00:51:31 +02:00
Laurent Trinques 6aebbfeaa7 Merge pull request #302 from plc-user/master
integrate "QET_ElementScaler" as external software
2024-08-20 00:34:07 +02:00
plc-user 5d725f6d55 fix typo 2024-08-19 09:48:11 +02:00
plc-user 85d10fc0e6 integrate "QET_ElementScaler" as external software 2024-08-19 09:19:28 +02:00
Laurent Trinques 1baf9db799 Typo 2024-08-07 12:42:39 +02:00
Laurent Trinques 32c0e04c56 Try to improve Unable to run the app on OSX
https://qelectrotech.org/bugtracker/view.php?id=290
2024-08-07 09:13:14 +02:00
Laurent Trinques 57b5819f07 Revert 2024-07-28 01:54:27 +02:00
Laurent Trinques 7c5e0135a6 Add to drag and drop the multiple selection in collections
See:https://qelectrotech.org/forum/viewtopic.php?pid=20125#p20125
2024-07-27 16:37:39 +02:00
Laurent Trinques 7d8734e192 Update README.md 2024-07-22 12:33:37 +02:00
Laurent Trinques 30184bdd06 Merge pull request #300 from plc-user/master
move code into else-clause to avoid possible crashes
2024-07-15 14:04:58 +02:00
plc-user 1062d217f0 move code into else-clause to avoid possible crashes 2024-07-15 00:01:20 +02:00
Laurent Trinques 6cad599664 git submodule update --remote elements 2024-07-06 08:19:19 +02:00
Laurent Trinques cbd309ec5a
Fix :
Add element1_linked element2_linked informations to terminal-name
connected in qet-file
2024-06-30 15:02:42 +02:00
Laurent Trinques 23c4ba2a3e Fix segfault in previous commit 2024-06-21 17:48:57 +02:00
Laurent Trinques dd03f0eece Add elements informations to terminal-name connected in qet-file 2024-06-21 15:28:57 +02:00
Laurent Trinques 491b8ce64c git submodule update --remote elements 2024-06-19 06:00:27 +02:00
Laurent Trinques 2d8dd2b480 git submodule update --remote elements 2024-06-17 06:41:57 +02:00
Laurent Trinques fda314d585 Merge pull request #297 from plc-user/master
add terminal-names to connection in qet-file
2024-06-17 06:21:17 +02:00
plc-user f9073ca5fb add terminal-names to connection in qet-file 2024-06-16 15:53:09 +02:00
Laurent Trinques 36da291be6 Merge pull request #296 from plc-user/master
fix: editing SpinBoxes with keyboard lose focus
2024-06-09 15:59:24 +02:00
plc-user 4da78939d0 fix: editing SpinBoxes with keyboard lose focus 2024-06-09 15:26:18 +02:00
Laurent Trinques a942f42927 git submodule update --remote elements 2024-06-05 17:05:31 +02:00
Laurent Trinques e9e2ea5b0e Try to fix bug #307 2024-06-02 17:02:53 +02:00
Laurent Trinques 701265e393 Revert 2024-06-01 12:39:59 +02:00
Laurent Trinques 073763d9bf Try to fix bug #307 2024-06-01 12:27:26 +02:00
Laurent Trinques ca7dc28ecf Merge pull request #295 from joseyspain/master
Spanish lang update
2024-05-20 06:11:57 +02:00
Josey a70cc75504 Spanish lang update
Hi, more spanish updates. Regards, Josey
2024-05-19 21:05:36 +02:00
Laurent Trinques 6cc297def1 Merge pull request #294 from joseyspain/master
More spanish translations.Josey
2024-05-14 07:33:23 +02:00
Josey 1baf9125dc More spanish translations.Josey
More spanish translations. Josey
2024-05-13 21:28:08 +02:00
Laurent Trinques 78bae2dc60 Merge pull request #293 from plc-user/master
update German and English translations
2024-05-13 06:11:58 +02:00
plc-user d0a10ef9af modified accelerators in English translation to avoid doubles... 2024-05-12 12:00:09 +02:00
plc-user c6bc23addc update German translations 2024-05-12 11:56:22 +02:00
Laurent Trinques 9a7da28fc5 Add spanish translation, thanks Josey 2024-05-12 07:49:17 +02:00
Laurent Trinques dd7f295f5c Add spanish translation, thanks Josey 2024-05-11 19:16:18 +02:00
Laurent Trinques 774b604b50 Minor 2024-05-08 20:08:16 +02:00
Laurent Trinques e36df6f7d2 git submodule update --remote elements 2024-05-08 19:36:53 +02:00
Laurent Trinques 9076d9da80 Update TS files 2024-05-08 19:35:15 +02:00
Laurent Trinques c7d6312997 Try to fix bug #303 2024-05-08 19:18:48 +02:00
Laurent Trinques 5492cd3f71 Update org.qelectrotech.QElectroTech.json 2024-05-08 14:06:12 +02:00
Laurent Trinques 9b4bbfbf0d Merge pull request #292 from plc-user/master
hide SVG background checkbox in print preferences
2024-05-06 20:25:37 +02:00
plc-user b20456d0d6 hide SVG background checkbox in print preferences 2024-05-06 11:21:42 +02:00
Laurent Trinques 69338962bc revert Update snapcraft.yaml 2024-05-05 20:46:37 +02:00
Laurent Trinques 78005f812a Update snapcraft.yaml 2024-05-05 16:30:12 +02:00
Laurent Trinques 3479b98242 Update snapcraft.yaml 2024-05-05 16:02:41 +02:00
Laurent Trinques f4f28b83bd git submodule update --remote elements 2024-05-05 05:56:25 +02:00
Laurent Trinques 4c8e7f4856 git submodule update --remote elements 2024-05-03 15:54:33 +02:00
Laurent Trinques ba1123cf73 Merge pull request #291 from plc-user/master
fixed indentations of the remaining *.cpp/*.h files
2024-05-03 08:59:48 +02:00
plc-user b3ac3c82af fixed indentations of the remaining *.cpp/*.h files 2024-05-02 08:39:27 +02:00
Laurent Trinques e9448be986 Update README.md 2024-05-01 13:15:54 +02:00
Laurent Trinques f72a2545bd Update LICENSE 2024-05-01 13:15:06 +02:00
Laurent Trinques 206a48a15f Merge pull request #289 from plc-user/master
correct more indentations / whitespace
2024-04-24 18:59:36 +02:00
plc-user f33ea64b99 correct more indentations / whitespace (too many tabs) 2024-04-24 18:21:12 +02:00
plc-user 0d44933432 correct more indentations / whitespace 2024-04-24 18:02:00 +02:00
plc-user fa68d545d0 correct more indentations / whitespace 2024-04-24 14:14:40 +02:00
Laurent Trinques 171f2eab4e git submodule update --remote elements 2024-04-21 12:45:50 +02:00
Laurent Trinques ce86e18664 git submodule update --remote elements 2024-04-14 13:39:02 +02:00
Laurent Trinques 17030aaa80 Update packaging_script_Flatpak.sh 2024-04-11 15:57:13 +02:00
Laurent Trinques 09b1c0905e Update packaging_script_AppImage.sh 2024-04-11 15:56:13 +02:00
Laurent Trinques b453832d46 Update packaging_script_Debian_Ubuntu_Windows.sh 2024-04-11 15:54:48 +02:00
Laurent Trinques 109efa03d2 Update MacQetDeploy.sh 2024-04-11 15:53:19 +02:00
Laurent Trinques 99a8b5f46d Update MacQetDeploy_arm64.sh 2024-04-11 15:51:51 +02:00
Laurent Trinques d8b7fc3642 Merge pull request #288 from plc-user/master
update German and English translations
2024-04-10 15:32:49 +02:00
plc-user 5f7f72f292 update German and English translations 2024-04-10 15:21:48 +02:00
191 changed files with 18270 additions and 10742 deletions
+1 -1
View File
@@ -146,7 +146,7 @@ install(DIRECTORY elements DESTINATION share/qelectrotech)
install(DIRECTORY examples DESTINATION share/qelectrotech)
install(DIRECTORY titleblocks DESTINATION share/qelectrotech)
install(FILES LICENSE ELEMENTS.LICENSE CREDIT README ChangeLog DESTINATION share/doc/qelectrotech)
install(FILES misc/qelectrotech.desktop DESTINATION share/applications)
install(FILES misc/org.qelectrotech.qelectrotech.desktop DESTINATION share/applications)
install(FILES misc/qelectrotech.xml DESTINATION share/mime/packages)
install(FILES misc/qelectrotech.appdata.xml DESTINATION ${QET_APPDATA_PATH})
install(FILES ${QM_FILES} DESTINATION ${QET_LANG_PATH})
-2
View File
@@ -7,8 +7,6 @@
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Permission is not granted to use this software or any of the associated files
as sample data for the purposes of building machine learning models.
Preamble
+2 -5
View File
@@ -18,7 +18,7 @@ The main goal of the developers is to provide a libre, easy to use and effective
The current stable version is 0.90 and was released on 2023.01.06.
Once it has been officially released, the stable version is always frozen and is no longer developed.
New functionalities, bug and issue fixings are further made in the development version (currently 0.100), which can also be [downloaded](https://qelectrotech.org/download.html).
New functionalities, bug and issue fixings are further made in the development version (currently 0.100), which can also be [downloaded](https://qelectrotech.org/download.php).
Users who want to test and take benefits from the last software implementations should use the development version. But... use it at your own risk, since things are sometimes broken or only partially implemented until they are done!
@@ -26,10 +26,7 @@ Users who want to test and take benefits from the last software implementations
The software is licensed under [GNU/GPL](https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html).
You are free to use, copy, modify and redistribute it under the terms of the license.
```txt
Permission is not granted to use this software or any of the associated files
as sample data for the purposes of building machine learning models.
```
Like many other open source software, QElectroTech is provided as is, without any warranty.
### Development / technical choices
@@ -1,11 +1,11 @@
{
"id": "org.qelectrotech.QElectroTech",
"base-version": "5.15-22.08",
"base-version": "5.15-23.08",
"runtime": "org.kde.Platform",
"runtime-version": "5.15-22.08",
"runtime-version": "5.15-23.08",
"sdk": "org.kde.Sdk",
"command": "qelectrotech",
"rename-desktop-file": "qelectrotech.desktop",
"rename-desktop-file": "org.qelectrotech.qelectrotech.desktop",
"rename-appdata-file": "qelectrotech.appdata.xml",
"rename-icon": "qelectrotech",
"copy-icon": true,
@@ -9,8 +9,6 @@ if [ ! -d "$to" ] && [ -d "$from" ]; then
cp -av "$from/." "$to"
fi
# link DXFtoQET so that QET finds it
mkdir -p "$HOME/.qet"
ln -snf "$SNAP/bin/DXFtoQET" "$HOME/.qet/DXFtoQET"
exec "${@}"
+6 -21
View File
@@ -29,7 +29,7 @@ apps:
common-id: qelectrotech.desktop
extensions:
- kde-neon
plugs: &plugs [opengl, unity7, home, removable-media, gsettings, network, cups-control]
plugs: &plugs [opengl, unity7, home, removable-media, gsettings, network, cups-control, wayland, x11]
environment: &env
TCL_LIBRARY: $SNAP/usr/share/tcltk/tcl8.6
HOME: $SNAP_USER_COMMON
@@ -42,13 +42,7 @@ apps:
plugs: *plugs
environment: *env
dxf-to-qet:
command: bin/DXFtoQET
extensions:
- kde-neon
plugs: *plugs
environment: *env
parts:
launchers:
plugin: dump
@@ -77,16 +71,7 @@ parts:
override-build: |
rsync -a --ignore-existing /snap/kf5-5-110-qt-5-15-11-core22-sdk/current/ /
dxf-to-qet:
after: [kde-sdk-setup]
plugin: nil
source: https://github.com/qelectrotech/DXFtoQET-2020.git
override-build: |
qmake "$CRAFT_PART_SRC/DXFtoQET.pro"
make -j$(nproc)
mkdir -p "$CRAFT_PART_INSTALL/bin"
cp DXFtoQET "$CRAFT_PART_INSTALL/bin/"
qelectrotech:
after: [kde-sdk-setup]
plugin: nil
@@ -96,7 +81,7 @@ parts:
- git
- libsqlite3-dev
override-build: |
displayed_version=$(cat sources/qetversion.cpp | grep "return QVersionNumber{ 0, "| head -n 1| cut -c32-40| sed -e 's/,/./g' -e 's/ //g')
displayed_version=$(cat sources/qetversion.cpp | grep "return QVersionNumber{"| head -n 1| awk -F "{" '{ print $2 }' | awk -F "}" '{ print $1 }' | sed -e 's/,/./g' -e 's/ //g')
snap_version="${displayed_version}-g$(git rev-parse --short=8 HEAD)"
modified_displayed_version="${snap_version}.snap"
sed -i -E "s|const QString displayedVersion =.*|const QString displayedVersion =\"$modified_displayed_version\";|" sources/qet.h
@@ -108,10 +93,10 @@ parts:
craftctl default
# patch desktop file with correct icon path
SED_CMD="sed -i -E s|^Icon=(.*)|Icon=\${SNAP}/usr/local/share/icons/hicolor/128x128/apps/\1.png|g"
$SED_CMD usr/local/share/applications/qelectrotech.desktop
$SED_CMD usr/local/share/applications/org.qelectrotech.qelectrotech.desktop
cleanup:
after: [qelectrotech, dxf-to-qet, qet-tb-generator]
after: [qelectrotech, qet-tb-generator]
plugin: nil
build-snaps: [kf5-5-110-qt-5-15-11-core22]
override-prime: |
+2 -2
View File
@@ -266,13 +266,13 @@ Section ""
; write file associations registry keys
WriteRegStr HKEY_CLASSES_ROOT "Applications\qelectrotech.exe\shell\open\command" "" "$\"$final_qet_exe$\" $\"%1$\""
WriteRegStr HKEY_CLASSES_ROOT ".qet" "" "qet_diagram_file"
WriteRegStr HKEY_CLASSES_ROOT "qet_diagram_file" "" "Schéma QET"
WriteRegStr HKEY_CLASSES_ROOT "qet_diagram_file" "" "Diagram QET"
WriteRegDWORD HKEY_CLASSES_ROOT "qet_diagram_file" "EditFlags" 0x00000000
WriteRegDWORD HKEY_CLASSES_ROOT "qet_diagram_file" "BrowserFlags" 0x00000008
WriteRegStr HKEY_CLASSES_ROOT "qet_diagram_file\DefaultIcon" "" "$final_project_ico"
WriteRegStr HKEY_CLASSES_ROOT "qet_diagram_file\shell\open\command" "" "$\"$final_qet_exe$\" $\"%1$\""
WriteRegStr HKEY_CLASSES_ROOT ".elmt" "" "qet_element_file"
WriteRegStr HKEY_CLASSES_ROOT "qet_element_file" "" "Élément QET"
WriteRegStr HKEY_CLASSES_ROOT "qet_element_file" "" "Element QET"
WriteRegDWORD HKEY_CLASSES_ROOT "qet_element_file" "EditFlags" 0x00000000
WriteRegDWORD HKEY_CLASSES_ROOT "qet_element_file" "BrowserFlags" 0x00000008
WriteRegStr HKEY_CLASSES_ROOT "qet_element_file\DefaultIcon" "" "$final_element_ico"
+3
View File
@@ -258,6 +258,9 @@ set(QET_SRC_FILES
${QET_DIR}/sources/dxf/dxftoelmt.cpp
${QET_DIR}/sources/dxf/dxftoelmt.h
${QET_DIR}/sources/qet_elementscaler/qet_elementscaler.cpp
${QET_DIR}/sources/qet_elementscaler/qet_elementscaler.h
${QET_DIR}/sources/editor/arceditor.cpp
${QET_DIR}/sources/editor/arceditor.h
${QET_DIR}/sources/editor/editorcommands.cpp
+513 -264
View File
File diff suppressed because it is too large Load Diff
+511 -262
View File
File diff suppressed because it is too large Load Diff
+513 -264
View File
File diff suppressed because it is too large Load Diff
+511 -262
View File
File diff suppressed because it is too large Load Diff
+511 -262
View File
File diff suppressed because it is too large Load Diff
BIN
View File
Binary file not shown.
+542 -275
View File
File diff suppressed because it is too large Load Diff
+511 -262
View File
File diff suppressed because it is too large Load Diff
BIN
View File
Binary file not shown.
+534 -265
View File
File diff suppressed because it is too large Load Diff
BIN
View File
Binary file not shown.
+852 -602
View File
File diff suppressed because it is too large Load Diff
BIN
View File
Binary file not shown.
+516 -265
View File
File diff suppressed because it is too large Load Diff
+511 -262
View File
File diff suppressed because it is too large Load Diff
+510 -261
View File
File diff suppressed because it is too large Load Diff
+512 -263
View File
File diff suppressed because it is too large Load Diff
+510 -261
View File
File diff suppressed because it is too large Load Diff
+510 -261
View File
File diff suppressed because it is too large Load Diff
+510 -261
View File
File diff suppressed because it is too large Load Diff
+511 -289
View File
File diff suppressed because it is too large Load Diff
BIN
View File
Binary file not shown.
+594 -311
View File
File diff suppressed because it is too large Load Diff
+508 -259
View File
File diff suppressed because it is too large Load Diff
+510 -261
View File
File diff suppressed because it is too large Load Diff
+511 -262
View File
File diff suppressed because it is too large Load Diff
+513 -264
View File
File diff suppressed because it is too large Load Diff
+510 -261
View File
File diff suppressed because it is too large Load Diff
+509 -260
View File
File diff suppressed because it is too large Load Diff
+509 -260
View File
File diff suppressed because it is too large Load Diff
+510 -261
View File
File diff suppressed because it is too large Load Diff
+510 -261
View File
File diff suppressed because it is too large Load Diff
+510 -261
View File
File diff suppressed because it is too large Load Diff
+2 -1
View File
@@ -89,7 +89,8 @@ A=$(git rev-list HEAD --count)
HEAD=$(($A+473))
VERSION=$(cat sources/qetversion.cpp | grep "return QVersionNumber{ 0, "| head -n 1| cut -c32-40| sed -e 's/,/./g' -e 's/ //g') #Find major, minor, and micro version numbers in sources/qetversion.cp
VERSION=$(cat sources/qetversion.cpp | grep "return QVersionNumber{"| head -n 1| awk -F "{" '{ print $2 }' | awk -F "}" '{ print $1 }' | sed -e 's/,/./g' -e 's/ //g')
#VERSION=$(cat sources/qetversion.cpp | grep "return QVersionNumber{ 0, "| head -n 1| cut -c25-35| sed -e 's/,/./g' -e 's/ //g') #Find major, minor, and micro version numbers in sources/qetversion.cp
# Dmg de la dernière revision déjà créé
if [ -e "build-aux/mac-osx/${APPNAME} $VERSION r$HEAD.dmg" ] ; then
+2 -1
View File
@@ -84,7 +84,8 @@ A=$(git rev-list HEAD --count)
HEAD=$(($A+473))
VERSION=$(cat sources/qetversion.cpp | grep "return QVersionNumber{ 0, "| head -n 1| cut -c32-40| sed -e 's/,/./g' -e 's/ //g') #Find major, minor, and micro version numbers in sources/qetversion.cp
VERSION=$(cat sources/qetversion.cpp | grep "return QVersionNumber{"| head -n 1| awk -F "{" '{ print $2 }' | awk -F "}" '{ print $1 }' | sed -e 's/,/./g' -e 's/ //g')
#VERSION=$(cat sources/qetversion.cpp | grep "return QVersionNumber{ 0, "| head -n 1| cut -c32-40| sed -e 's/,/./g' -e 's/ //g') #Find major, minor, and micro version numbers in sources/qetversion.cp
# Tarball de la dernière revision déjà créé
if [ -e "build-aux/mac-osx/${APPNAME}-$VERSION-r$HEAD-arm64.zip" ] ; then
+1 -1
View File
@@ -33,7 +33,7 @@ my $no = '[no]';
my $todo = 'TODO';
our $default_language = 'fr';
our @misc_desktop_files = qw(misc/qelectrotech.desktop);
our @misc_desktop_files = qw(misc/org.qelectrotech.qelectrotech.desktop);
our @misc_xml_files = qw(misc/qelectrotech.xml);
our @readme_files = qw(CREDIT README INSTALL ELEMENTS.LICENSE build-aux/linux/fedora/README.elements);
our @ordered_languages = qw(fr en es pt cs pl ca de it ar sl hr el nl be ru ro da pt_BR hu sr tr nb ja mn uk zh);
+5 -3
View File
@@ -21,7 +21,9 @@ A=$(git rev-list HEAD --count)
HEAD=$(($A+473))
#Find major, minor, and micro version numbers in sources/qetversion.cp
tagName=$(cat sources/qetversion.cpp | grep "return QVersionNumber{ 0, "| head -n 1| cut -c32-40| sed -e 's/,/./g' -e 's/ //g') #Find major, minor, and micro version numbers in sources/qetversion.cp
tagName=$(cat sources/qetversion.cpp | grep "return QVersionNumber{"| head -n 1| awk -F "{" '{ print $2 }' | awk -F "}" '{ print $1 }' | sed -e 's/,/./g' -e 's/ //g')
#tagName=$(cat sources/qetversion.cpp | grep "return QVersionNumber{ 0, "| head -n 1| cut -c32-40| sed -e 's/,/./g' -e 's/ //g') #Find major, minor, and micro version numbers in sources/qetversion.cp
rm -Rf build/
mkdir build && cd build
@@ -37,9 +39,9 @@ rm -Rf qelectrotech/usr/share/{elements,examples,titleblocks,lang,man,doc}
cp ../build/qelectrotech qelectrotech/usr/bin/
cp -r ../{elements,examples,titleblocks,lang,man} qelectrotech/usr/share/
./linuxdeployqt-continuous-x86_64.AppImage qelectrotech/usr/share/qelectrotech.desktop -appimage -bundle-non-qt-libs -verbose=1 -extra-plugins=iconengines
./linuxdeployqt-continuous-x86_64.AppImage qelectrotech/usr/share/org.qelectrotech.qelectrotech.desktop -appimage -bundle-non-qt-libs -verbose=1 -extra-plugins=iconengines
rm qelectrotech/AppRun
sed -i 's/'"QElectroTech_*.*/QElectroTech_$tagName-r$HEAD"'/' qelectrotech/qelectrotech.desktop
sed -i 's/'"QElectroTech_*.*/QElectroTech_$tagName-r$HEAD"'/' qelectrotech/org.qelectrotech.qelectrotech.desktop
cp AppRun qelectrotech/
rm QElectroTech_*.AppImage
+2 -1
View File
@@ -31,7 +31,8 @@ if [ -z "$HEAD" ] ; then
fi
VERSION=$(cat sources/qetversion.cpp | grep "return QVersionNumber{ 0, "| head -n 1| cut -c32-40| sed -e 's/,/./g' -e 's/ //g') #Find major, minor, and micro version numbers in sources/qetversion.cp
VERSION=$(cat sources/qetversion.cpp | grep "return QVersionNumber{"| head -n 1| awk -F "{" '{ print $2 }' | awk -F "}" '{ print $1 }' | sed -e 's/,/./g' -e 's/ //g')
#VERSION=$(cat sources/qetversion.cpp | grep "return QVersionNumber{ 0, "| head -n 1| cut -c32-40| sed -e 's/,/./g' -e 's/ //g') #Find major, minor, and micro version numbers in sources/qetversion.cp
#clean /var/cache/pbuilder/ .. / result/debs
+2 -1
View File
@@ -16,7 +16,8 @@ git pull --recurse-submodules
# get the number of the new revision
GITCOMMIT=$(git rev-parse --short HEAD)
tagName=$(cat sources/qetversion.cpp | grep "return QVersionNumber{ 0, "| head -n 1| cut -c32-40| sed -e 's/,/./g' -e 's/ //g') #Find major, minor, and micro version numbers in sources/qetversion.cp
tagName=$(cat sources/qetversion.cpp | grep "return QVersionNumber{"| head -n 1| awk -F "{" '{ print $2 }' | awk -F "}" '{ print $1 }' | sed -e 's/,/./g' -e 's/ //g')
#tagName=$(cat sources/qetversion.cpp | grep "return QVersionNumber{ 0, "| head -n 1| cut -c32-40| sed -e 's/,/./g' -e 's/ //g') #Find major, minor, and micro version numbers in sources/qetversion.cp
cd ~
flatpak-builder --force-clean --ccache --repo=qet_git/0.8-dev qet_git/build-dir qet_git/build-aux/flatpak/org.qelectrotech.QElectroTech.json --gpg-sign=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX --gpg-homedir=gpg
+5 -3
View File
@@ -166,7 +166,8 @@ HEADERS += $$files(sources/*.h) \
$$files(sources/TerminalStrip/GraphicsItem/*.h) \
$$files(sources/TerminalStrip/GraphicsItem/properties/*.h) \
$$files(sources/xml/*.h) \
$$files(sources/dxf/*.h)
$$files(sources/dxf/*.h) \
$$files(sources/qet_elementscaler/*.h)
SOURCES += $$files(sources/*.cpp) \
$$files(sources/editor/*.cpp) \
@@ -208,7 +209,8 @@ SOURCES += $$files(sources/*.cpp) \
$$files(sources/TerminalStrip/GraphicsItem/*.cpp) \
$$files(sources/TerminalStrip/GraphicsItem/properties/*.cpp) \
$$files(sources/xml/*.cpp) \
$$files(sources/dxf/*.cpp)
$$files(sources/dxf/*.cpp) \
$$files(sources/qet_elementscaler/*.cpp)
# Needed for use promote QTreeWidget in terminalstripeditor.ui
INCLUDEPATH += sources/TerminalStrip/ui
@@ -279,7 +281,7 @@ mime_package.path = $$join(INSTALL_PREFIX,,,$${QET_MIME_PACKAGE_PATH})
mime_package.files = misc/qelectrotech.xml
desktop.path = $$join(INSTALL_PREFIX,,,$${QET_DESKTOP_PATH})
desktop.files = misc/qelectrotech.desktop
desktop.files = misc/org.qelectrotech.qelectrotech.desktop
appdata.path = $$join(INSTALL_PREFIX,,,$${QET_APPDATA_PATH})
appdata.files = misc/qelectrotech.appdata.xml
@@ -399,7 +399,7 @@ ElementsLocation ElementCollectionHandler::createDir(ElementsLocation &parent, c
@brief ElementCollectionHandler::importFromProject
Import the element represented by location to the embedded collection
of project at the same path.
location must represente an element owned by a project embedded collection
location must represent an element owned by a project embedded collection
@param project : project where copy the element
@param location : location to copy
@return true if import with success
@@ -111,10 +111,10 @@ QStringList ElementsCollectionModel::mimeTypes() const
@return
*/
bool ElementsCollectionModel::canDropMimeData(const QMimeData *data,
Qt::DropAction action,
int row,
int column,
const QModelIndex &parent) const
Qt::DropAction action,
int row,
int column,
const QModelIndex &parent) const
{
if (!(QStandardItemModel::canDropMimeData(data,
action,
@@ -258,9 +258,9 @@ bool ElementsCollectionModel::dropMimeData(const QMimeData *data,
@param projects : list of projects to load
*/
void ElementsCollectionModel::loadCollections(bool common_collection,
bool company_collection,
bool custom_collection,
QList<QETProject *> projects)
bool company_collection,
bool custom_collection,
QList<QETProject *> projects)
{
m_items_list_to_setUp.clear();
@@ -313,8 +313,8 @@ void ElementsCollectionModel::addCommonCollection(bool set_data)
{
FileElementCollectionItem *feci = new FileElementCollectionItem();
if (feci->setRootPath(QETApp::commonElementsDirN(),
set_data,
m_hide_element)) {
set_data,
m_hide_element)) {
invisibleRootItem()->appendRow(feci);
if (set_data)
feci->setUpData();
@@ -324,41 +324,41 @@ void ElementsCollectionModel::addCommonCollection(bool set_data)
}
/**
@brief ElementsCollectionModel::addCompanyCollection
Add the company elements collection to this model
@param set_data
@brief ElementsCollectionModel::addCompanyCollection
Add the company elements collection to this model
@param set_data
*/
void ElementsCollectionModel::addCompanyCollection(bool set_data)
{
FileElementCollectionItem *feci = new FileElementCollectionItem();
if (feci->setRootPath(QETApp::companyElementsDirN(),
set_data,
m_hide_element)) {
invisibleRootItem()->appendRow(feci);
if (set_data)
feci->setUpData();
}
else
delete feci;
FileElementCollectionItem *feci = new FileElementCollectionItem();
if (feci->setRootPath(QETApp::companyElementsDirN(),
set_data,
m_hide_element)) {
invisibleRootItem()->appendRow(feci);
if (set_data)
feci->setUpData();
}
else
delete feci;
}
/**
@brief ElementsCollectionModel::addCustomCollection
Add the custom elements collection to this model
@param set_data
@brief ElementsCollectionModel::addCustomCollection
Add the custom elements collection to this model
@param set_data
*/
void ElementsCollectionModel::addCustomCollection(bool set_data)
{
FileElementCollectionItem *feci = new FileElementCollectionItem();
if (feci->setRootPath(QETApp::customElementsDirN(),
set_data,
m_hide_element)) {
invisibleRootItem()->appendRow(feci);
if (set_data)
feci->setUpData();
}
else
delete feci;
FileElementCollectionItem *feci = new FileElementCollectionItem();
if (feci->setRootPath(QETApp::customElementsDirN(),
set_data,
m_hide_element)) {
invisibleRootItem()->appendRow(feci);
if (set_data)
feci->setUpData();
}
else
delete feci;
}
/**
@@ -579,9 +579,9 @@ QModelIndex ElementsCollectionModel::indexFromLocation(
{
QList <ElementCollectionItem *> child_list;
for (int i=0 ; i<rowCount() ; i++){
for (int i=0 ; i<rowCount() ; i++){
child_list.append(static_cast<ElementCollectionItem *>(item(i)));
}
}
foreach(ElementCollectionItem *eci, child_list) {
@@ -590,8 +590,8 @@ QModelIndex ElementsCollectionModel::indexFromLocation(
if (eci->type() == FileElementCollectionItem::Type) {
if (FileElementCollectionItem *feci = static_cast<FileElementCollectionItem *>(eci)) {
if ( (location.isCommonCollection() && feci->isCommonCollection()) ||
(location.isCompanyCollection() && feci->isCompanyCollection()) ||
(location.isCustomCollection() && !feci->isCommonCollection()) ) {
(location.isCompanyCollection() && feci->isCompanyCollection()) ||
(location.isCustomCollection() && !feci->isCommonCollection()) ) {
match_eci = feci->itemAtPath(location.collectionPath(false));
}
}
@@ -42,11 +42,11 @@ class ElementsCollectionModel : public QStandardItemModel
bool canDropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent) const override;
bool dropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent) override;
void loadCollections(bool common_collection, bool company_collection, bool custom_collection, QList<QETProject *> projects);
void loadCollections(bool common_collection, bool company_collection, bool custom_collection, QList<QETProject *> projects);
void addCommonCollection(bool set_data = true);
void addCompanyCollection(bool set_data = true);
void addCustomCollection(bool set_data = true);
void addCommonCollection(bool set_data = true);
void addCompanyCollection(bool set_data = true);
void addCustomCollection(bool set_data = true);
void addLocation(const ElementsLocation& location);
void addProject(QETProject *project, bool set_data = true);
@@ -96,7 +96,7 @@ void ElementsCollectionWidget::addProject(QETProject *project)
m_progress_bar->show();
m_tree_view->setDisabled(true);
QList <QETProject *> prj; prj.append(project);
m_model->loadCollections(false, false, false, prj);
m_model->loadCollections(false, false, false, prj);
}
else {
m_waiting_project.append(project);
@@ -148,26 +148,26 @@ void ElementsCollectionWidget::setUpAction()
m_open_dir = new QAction(QET::Icons::FolderOpen,
tr("Ouvrir le dossier correspondant"), this);
m_edit_element = new QAction(QET::Icons::ElementEdit,
tr("Éditer l'élément"), this);
tr("Éditer l'élément"), this);
m_delete_element = new QAction(QET::Icons::ElementDelete,
tr("Supprimer l'élément"), this);
tr("Supprimer l'élément"), this);
m_delete_dir = new QAction(QET::Icons::FolderDelete,
tr("Supprimer le dossier"), this);
m_reload = new QAction(QET::Icons::ViewRefresh,
tr("Recharger les collections"), this);
tr("Recharger les collections"), this);
m_edit_dir = new QAction(QET::Icons::FolderEdit,
tr("Éditer le dossier"), this);
m_new_directory = new QAction(QET::Icons::FolderNew,
tr("Nouveau dossier"), this);
tr("Nouveau dossier"), this);
m_new_element = new QAction(QET::Icons::ElementNew,
tr("Nouvel élément"), this);
tr("Nouvel élément"), this);
m_show_this_dir = new QAction(QET::Icons::FolderOnlyThis,
tr("Afficher uniquement ce dossier"),
this);
tr("Afficher uniquement ce dossier"),
this);
m_show_all_dir = new QAction(QET::Icons::FolderShowAll,
tr("Afficher tous les dossiers"), this);
tr("Afficher tous les dossiers"), this);
m_dir_propertie = new QAction(QET::Icons::FolderProperties,
tr("Propriété du dossier"), this);
tr("Propriété du dossier"), this);
}
/**
@@ -385,10 +385,10 @@ void ElementsCollectionWidget::deleteElement()
ElementsLocation loc(eci->collectionPath());
if (! (loc.isElement()
&& loc.exist()
&& loc.isFileSystem()
&& (loc.collectionPath().startsWith("company://")
|| loc.collectionPath().startsWith("custom://"))) ) return;
&& loc.exist()
&& loc.isFileSystem()
&& (loc.collectionPath().startsWith("company://")
|| loc.collectionPath().startsWith("custom://"))) ) return;
if (QET::QetMessageBox::question(
this,
@@ -401,8 +401,8 @@ void ElementsCollectionWidget::deleteElement()
if (file.remove())
{
m_model->removeRows(m_index_at_context_menu.row(),
1,
m_index_at_context_menu.parent());
1,
m_index_at_context_menu.parent());
}
else
{
@@ -429,10 +429,10 @@ void ElementsCollectionWidget::deleteDirectory()
ElementsLocation loc (eci->collectionPath());
if (! (loc.isDirectory()
&& loc.exist()
&& loc.isFileSystem()
&& (loc.collectionPath().startsWith("company://")
|| loc.collectionPath().startsWith("custom://"))) ) return;
&& loc.exist()
&& loc.isFileSystem()
&& (loc.collectionPath().startsWith("company://")
|| loc.collectionPath().startsWith("custom://"))) ) return;
if (QET::QetMessageBox::question(
this,
@@ -446,8 +446,8 @@ void ElementsCollectionWidget::deleteDirectory()
if (dir.removeRecursively())
{
m_model->removeRows(m_index_at_context_menu.row(),
1,
m_index_at_context_menu.parent());
1,
m_index_at_context_menu.parent());
}
else
{
@@ -529,7 +529,7 @@ void ElementsCollectionWidget::newElement()
elmt_wizard.exec();
foreach (QETElementEditor *element_editor,
QETApp::instance()->elementEditors())
QETApp::instance()->elementEditors())
connect(element_editor,
&QETElementEditor::saveToLocation,
this,
@@ -666,7 +666,7 @@ void ElementsCollectionWidget::reload()
this,
&ElementsCollectionWidget::loadingFinished);
m_new_model->loadCollections(true, true, true, project_list);
m_new_model->loadCollections(true, true, true, project_list);
}
/**
@@ -713,7 +713,7 @@ void ElementsCollectionWidget::locationWasSaved(
const ElementsLocation& location)
{
//Because this method update an item in the model, location must
//represente an existing element (in file system of project)
//represent an existing element (in file system of project)
if (!location.exist())
return;
@@ -781,13 +781,13 @@ void ElementsCollectionWidget::search()
QModelIndexList match_index;
for (QString txt : text_list) {
match_index << m_model->match(m_showed_index.isValid()
? m_model->index(0,0,m_showed_index)
: m_model->index(0,0),
Qt::UserRole+1,
QVariant(txt),
-1,
Qt::MatchContains
| Qt::MatchRecursive);
? m_model->index(0,0,m_showed_index)
: m_model->index(0,0),
Qt::UserRole+1,
QVariant(txt),
-1,
Qt::MatchContains
| Qt::MatchRecursive);
}
for(QModelIndex index : match_index)
+46 -46
View File
@@ -293,17 +293,17 @@ void ElementsLocation::setPath(const QString &path)
else if (path.startsWith("common://") || path.startsWith("company://") || path.startsWith("custom://"))
{
QString p;
if (path.startsWith("common://"))
{
tmp_path.remove("common://");
p = QETApp::commonElementsDirN() + "/" + tmp_path;
}
else if (path.startsWith("company://"))
{
tmp_path.remove("company://");
p = QETApp::companyElementsDirN() + "/" + tmp_path;
}
else
if (path.startsWith("common://"))
{
tmp_path.remove("common://");
p = QETApp::commonElementsDirN() + "/" + tmp_path;
}
else if (path.startsWith("company://"))
{
tmp_path.remove("company://");
p = QETApp::companyElementsDirN() + "/" + tmp_path;
}
else
{
tmp_path.remove("custom://");
p = QETApp::customElementsDirN() + "/" + tmp_path;
@@ -319,19 +319,19 @@ void ElementsLocation::setPath(const QString &path)
if(path_.endsWith(".elmt"))
{
m_file_system_path = path_;
if (path_.startsWith(QETApp::commonElementsDirN()))
{
path_.remove(QETApp::commonElementsDirN()+="/");
path_.prepend("common://");
m_collection_path = path_;
}
else if (path_.startsWith(QETApp::companyElementsDirN()))
{
path_.remove(QETApp::companyElementsDirN()+="/");
path_.prepend("company://");
m_collection_path = path_;
}
else if (path_.startsWith(QETApp::customElementsDirN()))
if (path_.startsWith(QETApp::commonElementsDirN()))
{
path_.remove(QETApp::commonElementsDirN()+="/");
path_.prepend("common://");
m_collection_path = path_;
}
else if (path_.startsWith(QETApp::companyElementsDirN()))
{
path_.remove(QETApp::companyElementsDirN()+="/");
path_.prepend("company://");
m_collection_path = path_;
}
else if (path_.startsWith(QETApp::customElementsDirN()))
{
path_.remove(QETApp::customElementsDirN()+="/");
path_.prepend("custom://");
@@ -341,19 +341,19 @@ void ElementsLocation::setPath(const QString &path)
else
{
m_file_system_path = path_;
if (path_.startsWith(QETApp::commonElementsDirN()))
{
path_.remove(QETApp::commonElementsDirN()+="/");
path_.prepend("common://");
m_collection_path = path_;
}
else if (path_.startsWith(QETApp::companyElementsDirN()))
{
path_.remove(QETApp::companyElementsDirN()+="/");
path_.prepend("company://");
m_collection_path = path_;
}
else if (path_.startsWith(QETApp::customElementsDirN()))
if (path_.startsWith(QETApp::commonElementsDirN()))
{
path_.remove(QETApp::commonElementsDirN()+="/");
path_.prepend("common://");
m_collection_path = path_;
}
else if (path_.startsWith(QETApp::companyElementsDirN()))
{
path_.remove(QETApp::companyElementsDirN()+="/");
path_.prepend("company://");
m_collection_path = path_;
}
else if (path_.startsWith(QETApp::customElementsDirN()))
{
path_.remove(QETApp::customElementsDirN()+="/");
path_.prepend("custom://");
@@ -501,23 +501,23 @@ bool ElementsLocation::isFileSystem() const
}
/**
@brief ElementsLocation::isCommonCollection
@return
True if this location represent an item from the common collection
@brief ElementsLocation::isCommonCollection
@return
True if this location represent an item from the common collection
*/
bool ElementsLocation::isCommonCollection() const
{
return fileSystemPath().startsWith(QETApp::commonElementsDirN());
return fileSystemPath().startsWith(QETApp::commonElementsDirN());
}
/**
@brief ElementsLocation::isCompanyCollection
@return
True if this location represent an item from the company collection
@brief ElementsLocation::isCompanyCollection
@return
True if this location represent an item from the company collection
*/
bool ElementsLocation::isCompanyCollection() const
{
return fileSystemPath().startsWith(QETApp::companyElementsDirN());
return fileSystemPath().startsWith(QETApp::companyElementsDirN());
}
/**
@@ -591,7 +591,7 @@ bool ElementsLocation::isWritable() const
/**
@brief ElementsLocation::projectCollection
@return
If this location represente a item in an embedded project collection,
If this location represents an item in an embedded project collection,
return this collection else return nullptr.
*/
XmlElementCollection *ElementsLocation::projectCollection() const
@@ -75,9 +75,9 @@ class ElementsLocation
bool isElement() const;
bool isDirectory() const;
bool isFileSystem() const;
bool isCommonCollection() const;
bool isCompanyCollection() const;
bool isCustomCollection() const;
bool isCommonCollection() const;
bool isCompanyCollection() const;
bool isCustomCollection() const;
bool isProject() const;
bool exist() const;
bool isWritable() const;
@@ -35,7 +35,17 @@ static int MAX_DND_PIXMAP_HEIGHT = 375;
*/
ElementsTreeView::ElementsTreeView(QWidget *parent) :
QTreeView(parent)
{}
{
// force du noir sur une alternance de blanc (comme le schema) et de gris
// clair, avec du blanc sur bleu pas trop fonce pour la selection
QPalette qp = palette();
qp.setColor(QPalette::Text, Qt::black);
qp.setColor(QPalette::Base, Qt::white);
qp.setColor(QPalette::AlternateBase, QColor("#e8e8e8"));
qp.setColor(QPalette::Highlight, QColor("#678db2"));
qp.setColor(QPalette::HighlightedText, Qt::black);
setPalette(qp);
}
/**
@brief ElementsTreeView::startDrag
@@ -41,8 +41,8 @@ FileElementCollectionItem::FileElementCollectionItem()
@return true if path exist.
*/
bool FileElementCollectionItem::setRootPath(const QString& path,
bool set_data,
bool hide_element)
bool set_data,
bool hide_element)
{
QDir dir(path);
if (dir.exists())
@@ -120,11 +120,11 @@ QString FileElementCollectionItem::localName()
else if (isDir()) {
if (isCollectionRoot()) {
if (m_path == QETApp::commonElementsDirN())
setText(QObject::tr("Collection QET"));
else if (m_path == QETApp::companyElementsDirN())
setText(QObject::tr("Collection Company"));
else if (m_path == QETApp::customElementsDirN())
if (m_path == QETApp::commonElementsDirN())
setText(QObject::tr("Collection QET"));
else if (m_path == QETApp::companyElementsDirN())
setText(QObject::tr("Collection Company"));
else if (m_path == QETApp::customElementsDirN())
setText(QObject::tr("Collection utilisateur"));
else
setText(QObject::tr("Collection inconnue"));
@@ -221,29 +221,29 @@ QString FileElementCollectionItem::collectionPath() const
bool FileElementCollectionItem::isCollectionRoot() const
{
if (m_path == QETApp::commonElementsDirN()
|| m_path == QETApp::companyElementsDirN()
|| m_path == QETApp::customElementsDirN())
return true;
|| m_path == QETApp::companyElementsDirN()
|| m_path == QETApp::customElementsDirN())
return true;
else
return false;
}
/**
@brief FileElementCollectionItem::isCommonCollection
@return True if this item represent the common collection
@brief FileElementCollectionItem::isCommonCollection
@return True if this item represent the common collection
*/
bool FileElementCollectionItem::isCommonCollection() const
{
return fileSystemPath().startsWith(QETApp::commonElementsDirN());
return fileSystemPath().startsWith(QETApp::commonElementsDirN());
}
/**
@brief FileElementCollectionItem::isCompanyCollection
@return True if this item represent the company collection
@brief FileElementCollectionItem::isCompanyCollection
@return True if this item represent the company collection
*/
bool FileElementCollectionItem::isCompanyCollection() const
{
return fileSystemPath().startsWith(QETApp::companyElementsDirN());
return fileSystemPath().startsWith(QETApp::companyElementsDirN());
}
/**
@@ -347,8 +347,8 @@ void FileElementCollectionItem::setUpIcon()
@param hide_element
*/
void FileElementCollectionItem::setPathName(const QString& path_name,
bool set_data,
bool hide_element)
bool set_data,
bool hide_element)
{
m_path = path_name;
@@ -47,9 +47,9 @@ class FileElementCollectionItem : public ElementCollectionItem
QString name() const override;
QString collectionPath() const override;
bool isCollectionRoot() const override;
bool isCommonCollection() const;
bool isCompanyCollection() const;
bool isCustomCollection() const;
bool isCommonCollection() const;
bool isCompanyCollection() const;
bool isCustomCollection() const;
void addChildAtPath(const QString &collection_name) override;
void setUpData() override;
+1 -1
View File
@@ -23,7 +23,7 @@
#include <QDialog>
namespace Ui {
class RenameDialog;
class RenameDialog;
}
class RenameDialog : public QDialog
@@ -195,10 +195,10 @@ QRectF QetGraphicsHandlerUtility::mirrorRectForPosAtIndex(
*/
QRectF QetGraphicsHandlerUtility::rectForArc(const QRectF &rect, qreal start_angle, qreal span_angle)
{
QPainterPath path;
path.arcMoveTo(rect, start_angle);
path.arcTo(rect, start_angle, span_angle);
return path.boundingRect();
QPainterPath path;
path.arcMoveTo(rect, start_angle);
path.arcTo(rect, start_angle, span_angle);
return path.boundingRect();
}
/**
@@ -124,7 +124,7 @@ void ReplaceConductorDialog::setProperties(const ConductorProperties &properties
ui->m_pen_cb ->setChecked (m_properties.singleLineProperties.isPen());
ui->m_phase_cb ->setChecked (m_properties.singleLineProperties.phasesCount());
ui->m_phase_slider->setValue (m_properties.singleLineProperties.phasesCount());
updatePreview(false);
}
@@ -252,7 +252,7 @@ void ReplaceConductorDialog::setColorButton2(const QColor &color)
void ReplaceConductorDialog::on_m_erase_formula_cb_clicked()
{
ui->m_formula_le->setText(ui->m_erase_formula_cb->isChecked()
ui->m_formula_le->setText(ui->m_erase_formula_cb->isChecked()
? SearchAndReplaceWorker::eraseText()
: QString());
ui->m_formula_le->setDisabled(ui->m_erase_formula_cb->isChecked());
@@ -1,19 +1,19 @@
/*
Copyright 2006-2024 The QElectroTech Team
This file is part of QElectroTech.
QElectroTech is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
QElectroTech is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
Copyright 2006-2024 The QElectroTech Team
This file is part of QElectroTech.
QElectroTech is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
QElectroTech is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
*/
#include "demoterminalstrip.h"
@@ -21,132 +21,132 @@ namespace TerminalStripDrawer
{
/*========= DemoBridge =========*/
class DemoBridge : public AbstractBridgeInterface
{
public:
DemoBridge(const QUuid &uuid) :
m_uuid { uuid } {}
class DemoBridge : public AbstractBridgeInterface
{
public:
DemoBridge(const QUuid &uuid) :
m_uuid { uuid } {}
QUuid uuid() const override {
return m_uuid;
}
QUuid uuid() const override {
return m_uuid;
}
private:
const QUuid m_uuid;
};
private:
const QUuid m_uuid;
};
class DemoRealTerminal : public AbstractRealTerminalInterface
{
public:
DemoRealTerminal(const QString &label, const QUuid &bridge) :
m_label { label },
m_bridge { bridge }
{}
class DemoRealTerminal : public AbstractRealTerminalInterface
{
public:
DemoRealTerminal(const QString &label, const QUuid &bridge) :
m_label { label },
m_bridge { bridge }
{}
QString label() const override {
return m_label;
}
QString label() const override {
return m_label;
}
bool isBridged() const override {
return true;
}
bool isBridged() const override {
return true;
}
DemoBridge *bridge() const override {
return new DemoBridge { m_bridge };
}
DemoBridge *bridge() const override {
return new DemoBridge { m_bridge };
}
private:
QString m_label;
QUuid m_bridge;
};
private:
QString m_label;
QUuid m_bridge;
};
class DemoPhysicalTerminal : public AbstractPhysicalTerminalInterface
{
public:
DemoPhysicalTerminal(QVector<QSharedPointer<AbstractRealTerminalInterface>> real_terminals) :
m_real_terminals { real_terminals}
{}
class DemoPhysicalTerminal : public AbstractPhysicalTerminalInterface
{
public:
DemoPhysicalTerminal(QVector<QSharedPointer<AbstractRealTerminalInterface>> real_terminals) :
m_real_terminals { real_terminals}
{}
QVector<QSharedPointer<AbstractRealTerminalInterface>> realTerminals() const override {
return m_real_terminals;
}
QVector<QSharedPointer<AbstractRealTerminalInterface>> realTerminals() const override {
return m_real_terminals;
}
private:
QVector<QSharedPointer<AbstractRealTerminalInterface>> m_real_terminals;
};
private:
QVector<QSharedPointer<AbstractRealTerminalInterface>> m_real_terminals;
};
/*========= DemoTerminalStrip =========*/
/**
* @brief DemoTerminalStrip::DemoTerminalStrip
*/
DemoTerminalStrip::DemoTerminalStrip()
{
build();
}
/**
* @brief DemoTerminalStrip::DemoTerminalStrip
*/
DemoTerminalStrip::DemoTerminalStrip()
{
build();
}
QVector<QSharedPointer<AbstractPhysicalTerminalInterface> > DemoTerminalStrip::physicalTerminal() const
{
return m_physical_terminal;
}
QVector<QSharedPointer<AbstractPhysicalTerminalInterface> > DemoTerminalStrip::physicalTerminal() const
{
return m_physical_terminal;
}
void DemoTerminalStrip::build()
{
QUuid lvl_1 = QUuid::createUuid();
QUuid lvl_2 = QUuid::createUuid();
QUuid lvl_3 = QUuid::createUuid();
QUuid lvl_4 = QUuid::createUuid();
void DemoTerminalStrip::build()
{
QUuid lvl_1 = QUuid::createUuid();
QUuid lvl_2 = QUuid::createUuid();
QUuid lvl_3 = QUuid::createUuid();
QUuid lvl_4 = QUuid::createUuid();
QVector <QSharedPointer<AbstractRealTerminalInterface>> real_terminals_vector;
QVector <QSharedPointer<AbstractRealTerminalInterface>> real_terminals_vector;
real_terminals_vector << QSharedPointer<AbstractRealTerminalInterface> {
new DemoRealTerminal( QStringLiteral("24vdc"),
lvl_1)};
real_terminals_vector << QSharedPointer<AbstractRealTerminalInterface> {
new DemoRealTerminal( QStringLiteral("0vdc"),
lvl_2)};
real_terminals_vector << QSharedPointer<AbstractRealTerminalInterface> {
new DemoRealTerminal( QStringLiteral("signal"),
lvl_3)};
real_terminals_vector << QSharedPointer<AbstractRealTerminalInterface> {
new DemoRealTerminal( QStringLiteral("teach"),
lvl_4)};
m_physical_terminal << QSharedPointer<AbstractPhysicalTerminalInterface> {
new DemoPhysicalTerminal {real_terminals_vector}};
real_terminals_vector << QSharedPointer<AbstractRealTerminalInterface> {
new DemoRealTerminal( QStringLiteral("24vdc"),
lvl_1)};
real_terminals_vector << QSharedPointer<AbstractRealTerminalInterface> {
new DemoRealTerminal( QStringLiteral("0vdc"),
lvl_2)};
real_terminals_vector << QSharedPointer<AbstractRealTerminalInterface> {
new DemoRealTerminal( QStringLiteral("signal"),
lvl_3)};
real_terminals_vector << QSharedPointer<AbstractRealTerminalInterface> {
new DemoRealTerminal( QStringLiteral("teach"),
lvl_4)};
m_physical_terminal << QSharedPointer<AbstractPhysicalTerminalInterface> {
new DemoPhysicalTerminal {real_terminals_vector}};
real_terminals_vector.clear();
real_terminals_vector << QSharedPointer<AbstractRealTerminalInterface> {
new DemoRealTerminal( QStringLiteral("24vdc"),
lvl_1)};
real_terminals_vector << QSharedPointer<AbstractRealTerminalInterface> {
new DemoRealTerminal( QStringLiteral("0vdc"),
lvl_2)};
real_terminals_vector << QSharedPointer<AbstractRealTerminalInterface> {
new DemoRealTerminal( QStringLiteral("signal"),
lvl_3)};
real_terminals_vector << QSharedPointer<AbstractRealTerminalInterface> {
new DemoRealTerminal( QStringLiteral("teach"),
lvl_4)};
m_physical_terminal << QSharedPointer<AbstractPhysicalTerminalInterface> {
new DemoPhysicalTerminal {real_terminals_vector}};
real_terminals_vector.clear();
real_terminals_vector << QSharedPointer<AbstractRealTerminalInterface> {
new DemoRealTerminal( QStringLiteral("24vdc"),
lvl_1)};
real_terminals_vector << QSharedPointer<AbstractRealTerminalInterface> {
new DemoRealTerminal( QStringLiteral("0vdc"),
lvl_2)};
real_terminals_vector << QSharedPointer<AbstractRealTerminalInterface> {
new DemoRealTerminal( QStringLiteral("signal"),
lvl_3)};
real_terminals_vector << QSharedPointer<AbstractRealTerminalInterface> {
new DemoRealTerminal( QStringLiteral("teach"),
lvl_4)};
m_physical_terminal << QSharedPointer<AbstractPhysicalTerminalInterface> {
new DemoPhysicalTerminal {real_terminals_vector}};
real_terminals_vector.clear();
real_terminals_vector << QSharedPointer<AbstractRealTerminalInterface> {
new DemoRealTerminal( QStringLiteral("24vdc"),
lvl_1)};
real_terminals_vector << QSharedPointer<AbstractRealTerminalInterface> {
new DemoRealTerminal( QStringLiteral("0vdc"),
lvl_2)};
real_terminals_vector << QSharedPointer<AbstractRealTerminalInterface> {
new DemoRealTerminal( QStringLiteral("signal"),
lvl_3)};
real_terminals_vector << QSharedPointer<AbstractRealTerminalInterface> {
new DemoRealTerminal( QStringLiteral("teach"),
lvl_4)};
m_physical_terminal << QSharedPointer<AbstractPhysicalTerminalInterface> {
new DemoPhysicalTerminal {real_terminals_vector}};
}
real_terminals_vector.clear();
real_terminals_vector << QSharedPointer<AbstractRealTerminalInterface> {
new DemoRealTerminal( QStringLiteral("24vdc"),
lvl_1)};
real_terminals_vector << QSharedPointer<AbstractRealTerminalInterface> {
new DemoRealTerminal( QStringLiteral("0vdc"),
lvl_2)};
real_terminals_vector << QSharedPointer<AbstractRealTerminalInterface> {
new DemoRealTerminal( QStringLiteral("signal"),
lvl_3)};
real_terminals_vector << QSharedPointer<AbstractRealTerminalInterface> {
new DemoRealTerminal( QStringLiteral("teach"),
lvl_4)};
m_physical_terminal << QSharedPointer<AbstractPhysicalTerminalInterface> {
new DemoPhysicalTerminal {real_terminals_vector}};
}
}
@@ -1,19 +1,19 @@
/*
Copyright 2006-2024 The QElectroTech Team
This file is part of QElectroTech.
QElectroTech is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
QElectroTech is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
Copyright 2006-2024 The QElectroTech Team
This file is part of QElectroTech.
QElectroTech is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
QElectroTech is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef DEMOTERMINALSTRIP_H
#define DEMOTERMINALSTRIP_H
@@ -24,25 +24,25 @@ namespace TerminalStripDrawer {
class DemoTerminalStrip : public AbstractTerminalStripInterface
{
public:
DemoTerminalStrip();
public:
DemoTerminalStrip();
QString installation() const override {
return QStringLiteral("=INST");
}
QString location() const override {
return QStringLiteral("+LOC" );
}
QString name() const override {
return QStringLiteral("X1");
}
QVector<QSharedPointer<AbstractPhysicalTerminalInterface>> physicalTerminal() const override;
QString installation() const override {
return QStringLiteral("=INST");
}
QString location() const override {
return QStringLiteral("+LOC" );
}
QString name() const override {
return QStringLiteral("X1");
}
QVector<QSharedPointer<AbstractPhysicalTerminalInterface>> physicalTerminal() const override;
private:
void build();
private:
void build();
private:
QVector<QSharedPointer<AbstractPhysicalTerminalInterface>> m_physical_terminal;
private:
QVector<QSharedPointer<AbstractPhysicalTerminalInterface>> m_physical_terminal;
};
} //End namespace TerminalStripDrawer
@@ -83,8 +83,8 @@ class TerminalStripLayoutPattern
int m_bridge_point_d{5};
QVector<int> m_bridge_point_y_offset{50,70,90,110};
QUuid m_uuid{QUuid::createUuid()};
QString m_name;
QUuid m_uuid{QUuid::createUuid()};
QString m_name;
private:
void updateHeaderTextOption();
@@ -1,19 +1,19 @@
/*
Copyright 2006-2024 The QElectroTech Team
This file is part of QElectroTech.
QElectroTech is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
QElectroTech is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
Copyright 2006-2024 The QElectroTech Team
This file is part of QElectroTech.
QElectroTech is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
QElectroTech is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
*/
#include "terminalstriplayoutshandler.h"
@@ -22,11 +22,11 @@
TerminalStripLayoutsHandler::TerminalStripLayoutsHandler()
{
m_default_layout = QSharedPointer<TerminalStripLayoutPattern>::create();
m_default_layout->m_name = QObject::tr("Disposition par défaut");
m_default_layout = QSharedPointer<TerminalStripLayoutPattern>::create();
m_default_layout->m_name = QObject::tr("Disposition par défaut");
}
QSharedPointer<TerminalStripLayoutPattern> TerminalStripLayoutsHandler::defaultLayout()
{
return m_default_layout;
return m_default_layout;
}
@@ -1,19 +1,19 @@
/*
Copyright 2006-2024 The QElectroTech Team
This file is part of QElectroTech.
QElectroTech is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
QElectroTech is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
Copyright 2006-2024 The QElectroTech Team
This file is part of QElectroTech.
QElectroTech is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
QElectroTech is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef TERMINALSTRIPLAYOUTSHANDLER_H
#define TERMINALSTRIPLAYOUTSHANDLER_H
@@ -29,13 +29,13 @@
*/
class TerminalStripLayoutsHandler
{
public:
TerminalStripLayoutsHandler();
QSharedPointer<TerminalStripLayoutPattern> defaultLayout();
public:
TerminalStripLayoutsHandler();
QSharedPointer<TerminalStripLayoutPattern> defaultLayout();
private:
QSet<QSharedPointer<TerminalStripLayoutPattern>> m_layout_set;
QSharedPointer<TerminalStripLayoutPattern> m_default_layout;
private:
QSet<QSharedPointer<TerminalStripLayoutPattern>> m_layout_set;
QSharedPointer<TerminalStripLayoutPattern> m_default_layout;
};
#endif // TERMINALSTRIPLAYOUTSHANDLER_H
@@ -1,19 +1,19 @@
/*
Copyright 2006-2024 The QElectroTech Team
This file is part of QElectroTech.
QElectroTech is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
QElectroTech is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
Copyright 2006-2024 The QElectroTech Team
This file is part of QElectroTech.
QElectroTech is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
QElectroTech is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
*/
#include "terminalstripdrawer.h"
#include <QPainter>
@@ -26,9 +26,9 @@ namespace TerminalStripDrawer {
* @param pattern
*/
TerminalStripDrawer::TerminalStripDrawer(QSharedPointer<AbstractTerminalStripInterface> strip,
QSharedPointer<TerminalStripLayoutPattern> layout) :
m_strip { strip },
m_pattern { layout }
QSharedPointer<TerminalStripLayoutPattern> layout) :
m_strip { strip },
m_pattern { layout }
{}
void TerminalStripDrawer::setStrip(QSharedPointer<AbstractTerminalStripInterface> strip)
@@ -42,248 +42,248 @@ void TerminalStripDrawer::setStrip(QSharedPointer<AbstractTerminalStripInterface
*/
void TerminalStripDrawer::paint(QPainter *painter)
{
if (m_strip && m_pattern)
{
//To draw text, QPainter need a Qrect. Instead of create an instance
//for each text, we re-use the same instance of QRect.
QRect text_rect;
painter->save();
if (m_strip && m_pattern)
{
//To draw text, QPainter need a Qrect. Instead of create an instance
//for each text, we re-use the same instance of QRect.
QRect text_rect;
painter->save();
auto pen_{painter->pen()};
pen_.setColor(Qt::black);
pen_.setWidth(1);
auto pen_{painter->pen()};
pen_.setColor(Qt::black);
pen_.setWidth(1);
auto brush_ = painter->brush();
brush_.setColor(Qt::white);
auto brush_ = painter->brush();
brush_.setColor(Qt::white);
painter->setPen(pen_);
painter->setBrush(brush_);
painter->setPen(pen_);
painter->setBrush(brush_);
if (m_preview_draw)
{
painter->save();
painter->setPen(Qt::blue);
painter->drawRect(boundingRect());
painter->restore();
}
if (m_preview_draw)
{
painter->save();
painter->setPen(Qt::blue);
painter->drawRect(boundingRect());
painter->restore();
}
//Draw header
painter->drawRect(m_pattern->m_header_rect);
//Draw header
painter->drawRect(m_pattern->m_header_rect);
//Draw the header text
painter->save();
//Draw the header text
painter->save();
if (m_pattern->m_header_text_orientation == Qt::Horizontal)
{
text_rect.setRect(0,m_pattern->m_header_rect.y(),m_pattern->m_header_rect.width(),m_pattern->m_header_rect.height());
}
else
{
painter->translate(m_pattern->m_header_rect.bottomLeft());
painter->rotate(270);
text_rect.setRect(0,0,m_pattern->m_header_rect.height(),m_pattern->m_header_rect.width());
}
if (m_pattern->m_header_text_orientation == Qt::Horizontal)
{
text_rect.setRect(0,m_pattern->m_header_rect.y(),m_pattern->m_header_rect.width(),m_pattern->m_header_rect.height());
}
else
{
painter->translate(m_pattern->m_header_rect.bottomLeft());
painter->rotate(270);
text_rect.setRect(0,0,m_pattern->m_header_rect.height(),m_pattern->m_header_rect.width());
}
const auto text_{m_strip->installation() + " " + m_strip->location() + " " + m_strip->name()};
painter->drawText(text_rect, text_, m_pattern->headerTextOption());
painter->restore();
const auto text_{m_strip->installation() + " " + m_strip->location() + " " + m_strip->name()};
painter->drawText(text_rect, text_, m_pattern->headerTextOption());
painter->restore();
//Move painter pos to next drawing
painter->translate(m_pattern->m_header_rect.width(),0);
//Move painter pos to next drawing
painter->translate(m_pattern->m_header_rect.width(),0);
int x_offset{m_pattern->m_header_rect.width()};
int x_offset{m_pattern->m_header_rect.width()};
//Draw spacer
painter->drawRect(m_pattern->m_spacer_rect);
//Move painter pos to next drawing
painter->translate(m_pattern->m_spacer_rect.width(),0);
x_offset += m_pattern->m_spacer_rect.width();
//Draw spacer
painter->drawRect(m_pattern->m_spacer_rect);
//Move painter pos to next drawing
painter->translate(m_pattern->m_spacer_rect.width(),0);
x_offset += m_pattern->m_spacer_rect.width();
//Draw terminals
const auto terminals_text_rect{m_pattern->m_terminals_text_rect};
const auto terminals_text_orientation{m_pattern->m_terminals_text_orientation};
const auto terminals_text_option{m_pattern->terminalsTextOption()};
QRect terminal_rect;
//Draw terminals
const auto terminals_text_rect{m_pattern->m_terminals_text_rect};
const auto terminals_text_orientation{m_pattern->m_terminals_text_orientation};
const auto terminals_text_option{m_pattern->terminalsTextOption()};
QRect terminal_rect;
QHash<QUuid, QVector<QPointF>> bridges_anchor_points;
QHash<QUuid, QVector<QPointF>> bridges_anchor_points;
//Loop over physical terminals
for (const auto &physical_t : m_strip->physicalTerminal())
{
//Get the good offset according to how many level have the current physical terminal
const QVector<QSharedPointer<AbstractRealTerminalInterface>> real_terminal_vector{physical_t->realTerminals()};
const auto real_t_count{real_terminal_vector.size()};
const auto offset_{4 - real_t_count};
//Loop over physical terminals
for (const auto &physical_t : m_strip->physicalTerminal())
{
//Get the good offset according to how many level have the current physical terminal
const QVector<QSharedPointer<AbstractRealTerminalInterface>> real_terminal_vector{physical_t->realTerminals()};
const auto real_t_count{real_terminal_vector.size()};
const auto offset_{4 - real_t_count};
//Loop over real terminals
for (auto i=0 ; i<real_t_count ; ++i)
{
const auto index_ = offset_ + i;
if (index_ >= 4) {
break;
}
//Loop over real terminals
for (auto i=0 ; i<real_t_count ; ++i)
{
const auto index_ = offset_ + i;
if (index_ >= 4) {
break;
}
terminal_rect = m_pattern->m_terminal_rect[index_];
//Draw terminal rect
painter->drawRect(terminal_rect);
//Draw a stronger line if the current terminal have level
//and the current level is the first
if (real_t_count > 1 && i == 0)
{
painter->save();
pen_ = painter->pen();
pen_.setWidth(4);
pen_.setCapStyle(Qt::FlatCap);
painter->setPen(pen_);
const auto p1 { terminal_rect.topLeft() };
//We can't use terminal_rect.bottomLeft for p2 because
//the returned value deviate from the true value
//(see Qt documentation about QRect)
const QPoint p2 { p1.x(), p1.y() + terminal_rect.height() };
painter->drawLine(p1, p2);
painter->restore();
}
terminal_rect = m_pattern->m_terminal_rect[index_];
//Draw terminal rect
painter->drawRect(terminal_rect);
//Draw a stronger line if the current terminal have level
//and the current level is the first
if (real_t_count > 1 && i == 0)
{
painter->save();
pen_ = painter->pen();
pen_.setWidth(4);
pen_.setCapStyle(Qt::FlatCap);
painter->setPen(pen_);
const auto p1 { terminal_rect.topLeft() };
//We can't use terminal_rect.bottomLeft for p2 because
//the returned value deviate from the true value
//(see Qt documentation about QRect)
const QPoint p2 { p1.x(), p1.y() + terminal_rect.height() };
painter->drawLine(p1, p2);
painter->restore();
}
//Draw text
painter->save();
if (terminals_text_orientation[index_] == Qt::Horizontal)
{
text_rect = terminals_text_rect[index_];
}
else
{
const auto rect_{terminals_text_rect[index_]};
painter->translate(rect_.bottomLeft());
painter->rotate(270);
text_rect.setRect(0, 0, rect_.height(), terminal_rect.width());
}
//Draw text
painter->save();
if (terminals_text_orientation[index_] == Qt::Horizontal)
{
text_rect = terminals_text_rect[index_];
}
else
{
const auto rect_{terminals_text_rect[index_]};
painter->translate(rect_.bottomLeft());
painter->rotate(270);
text_rect.setRect(0, 0, rect_.height(), terminal_rect.width());
}
const auto shared_real_terminal{real_terminal_vector[i]};
painter->drawText(text_rect,
shared_real_terminal ? shared_real_terminal->label() : QLatin1String(),
terminals_text_option[index_]);
const auto shared_real_terminal{real_terminal_vector[i]};
painter->drawText(text_rect,
shared_real_terminal ? shared_real_terminal->label() : QLatin1String(),
terminals_text_option[index_]);
if (m_preview_draw)
{
painter->setPen(Qt::blue);
painter->drawRect(text_rect);
}
if (m_preview_draw)
{
painter->setPen(Qt::blue);
painter->drawRect(text_rect);
}
painter->restore();
painter->restore();
//Add bridge anchor
if (shared_real_terminal->isBridged())
{
painter->save();
if (QScopedPointer<AbstractBridgeInterface> bridge_ {
shared_real_terminal->bridge() })
{
const auto x_anchor{terminal_rect.width()/2};
const auto y_anchor {m_pattern->m_bridge_point_y_offset[index_]};
const auto radius_anchor{m_pattern->m_bridge_point_d/2};
//Add bridge anchor
if (shared_real_terminal->isBridged())
{
painter->save();
if (QScopedPointer<AbstractBridgeInterface> bridge_ {
shared_real_terminal->bridge() })
{
const auto x_anchor{terminal_rect.width()/2};
const auto y_anchor {m_pattern->m_bridge_point_y_offset[index_]};
const auto radius_anchor{m_pattern->m_bridge_point_d/2};
painter->setBrush(Qt::SolidPattern);
painter->drawEllipse(QPointF(x_anchor, y_anchor),
radius_anchor, radius_anchor);
painter->setBrush(Qt::SolidPattern);
painter->drawEllipse(QPointF(x_anchor, y_anchor),
radius_anchor, radius_anchor);
auto anchor_points{bridges_anchor_points.value(bridge_->uuid())};
anchor_points.append(QPointF(x_offset + x_anchor, y_anchor));
bridges_anchor_points.insert(bridge_->uuid(), anchor_points);
}
painter->restore();
}
auto anchor_points{bridges_anchor_points.value(bridge_->uuid())};
anchor_points.append(QPointF(x_offset + x_anchor, y_anchor));
bridges_anchor_points.insert(bridge_->uuid(), anchor_points);
}
painter->restore();
}
//Move painter pos to next drawing
painter->translate(terminal_rect.width(),0);
x_offset += terminal_rect.width();
}
}
painter->restore();
//Move painter pos to next drawing
painter->translate(terminal_rect.width(),0);
x_offset += terminal_rect.width();
}
}
painter->restore();
//Draw the bridges
for (const auto &points_ : qAsConst(bridges_anchor_points))
{
painter->save();
auto pen_{painter->pen()};
pen_.setWidth(2);
painter->setPen(pen_);
painter->drawPolyline(QPolygonF{points_});
painter->restore();
}
}
//Draw the bridges
for (const auto &points_ : qAsConst(bridges_anchor_points))
{
painter->save();
auto pen_{painter->pen()};
pen_.setWidth(2);
painter->setPen(pen_);
painter->drawPolyline(QPolygonF{points_});
painter->restore();
}
}
}
QRectF TerminalStripDrawer::boundingRect() const
{
return QRect{0, 0, width(), height()};;
return QRect{0, 0, width(), height()};;
}
void TerminalStripDrawer::setLayout(QSharedPointer<TerminalStripLayoutPattern> layout)
{
m_pattern = layout;
m_pattern = layout;
}
bool TerminalStripDrawer::haveLayout() const
{
return !m_pattern.isNull();
return !m_pattern.isNull();
}
void TerminalStripDrawer::setPreviewDraw(bool draw) {
m_preview_draw = draw;
m_preview_draw = draw;
}
int TerminalStripDrawer::height() const
{
if (m_pattern)
{
auto height_{m_pattern->m_header_rect.y() + m_pattern->m_header_rect.height()};
if (m_pattern)
{
auto height_{m_pattern->m_header_rect.y() + m_pattern->m_header_rect.height()};
height_ = std::max(height_, m_pattern->m_spacer_rect.y() + m_pattern->m_spacer_rect.height());
height_ = std::max(height_, m_pattern->m_spacer_rect.y() + m_pattern->m_spacer_rect.height());
for (const auto &rect : m_pattern->m_terminal_rect) {
height_ = std::max(height_, rect.y() + rect.height());
}
for (const auto &rect : m_pattern->m_terminal_rect) {
height_ = std::max(height_, rect.y() + rect.height());
}
return height_;
}
return height_;
}
return 0;
return 0;
}
int TerminalStripDrawer::width() const
{
if (m_pattern)
{
int width_{m_pattern->m_header_rect.width() + m_pattern->m_spacer_rect.width()};
if (m_pattern)
{
int width_{m_pattern->m_header_rect.width() + m_pattern->m_spacer_rect.width()};
if (m_strip)
{
//Loop over physical terminals
for (const auto &physical_t : m_strip->physicalTerminal())
{
//Get the good offset according to how many level have the current physical terminal
const QVector<QSharedPointer<AbstractRealTerminalInterface>> real_terminal_vector{physical_t->realTerminals()};
const auto real_t_count{real_terminal_vector.size()};
const auto offset_{4 - real_t_count};
if (m_strip)
{
//Loop over physical terminals
for (const auto &physical_t : m_strip->physicalTerminal())
{
//Get the good offset according to how many level have the current physical terminal
const QVector<QSharedPointer<AbstractRealTerminalInterface>> real_terminal_vector{physical_t->realTerminals()};
const auto real_t_count{real_terminal_vector.size()};
const auto offset_{4 - real_t_count};
//Loop over real terminals
for (auto i=0 ; i<real_t_count ; ++i)
{
const auto index_ = offset_ + i;
if (index_ >= 4) {
break;
}
//Loop over real terminals
for (auto i=0 ; i<real_t_count ; ++i)
{
const auto index_ = offset_ + i;
if (index_ >= 4) {
break;
}
width_ += m_pattern->m_terminal_rect[index_].width();
}
}
}
width_ += m_pattern->m_terminal_rect[index_].width();
}
}
}
return width_;
}
return width_;
}
return 0;
return 0;
}
} //End namespace TerminalStripDrawer
@@ -1,19 +1,19 @@
/*
Copyright 2006-2024 The QElectroTech Team
This file is part of QElectroTech.
QElectroTech is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
QElectroTech is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
Copyright 2006-2024 The QElectroTech Team
This file is part of QElectroTech.
QElectroTech is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
QElectroTech is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef TERMINALSTRIPDRAWER_H
#define TERMINALSTRIPDRAWER_H
@@ -27,67 +27,67 @@ class TerminalStrip;
namespace TerminalStripDrawer
{
class AbstractBridgeInterface
{
public:
AbstractBridgeInterface() {}
virtual ~AbstractBridgeInterface() {}
virtual QUuid uuid() const = 0;
};
class AbstractBridgeInterface
{
public:
AbstractBridgeInterface() {}
virtual ~AbstractBridgeInterface() {}
virtual QUuid uuid() const = 0;
};
class AbstractRealTerminalInterface
{
public:
AbstractRealTerminalInterface() {}
virtual ~AbstractRealTerminalInterface() {}
virtual QString label() const = 0;
virtual bool isBridged() const = 0;
virtual AbstractBridgeInterface* bridge() const = 0;
};
class AbstractRealTerminalInterface
{
public:
AbstractRealTerminalInterface() {}
virtual ~AbstractRealTerminalInterface() {}
virtual QString label() const = 0;
virtual bool isBridged() const = 0;
virtual AbstractBridgeInterface* bridge() const = 0;
};
class AbstractPhysicalTerminalInterface
{
public:
AbstractPhysicalTerminalInterface() {}
virtual ~AbstractPhysicalTerminalInterface() {}
virtual QVector<QSharedPointer<AbstractRealTerminalInterface>> realTerminals() const = 0;
};
class AbstractPhysicalTerminalInterface
{
public:
AbstractPhysicalTerminalInterface() {}
virtual ~AbstractPhysicalTerminalInterface() {}
virtual QVector<QSharedPointer<AbstractRealTerminalInterface>> realTerminals() const = 0;
};
class AbstractTerminalStripInterface
{
public:
AbstractTerminalStripInterface() {}
virtual ~AbstractTerminalStripInterface() {}
virtual QString installation() const = 0;
virtual QString location() const = 0;
virtual QString name() const = 0;
virtual QVector<QSharedPointer<AbstractPhysicalTerminalInterface>> physicalTerminal() const = 0;
};
class AbstractTerminalStripInterface
{
public:
AbstractTerminalStripInterface() {}
virtual ~AbstractTerminalStripInterface() {}
virtual QString installation() const = 0;
virtual QString location() const = 0;
virtual QString name() const = 0;
virtual QVector<QSharedPointer<AbstractPhysicalTerminalInterface>> physicalTerminal() const = 0;
};
class TerminalStripDrawer
{
public:
TerminalStripDrawer(QSharedPointer<AbstractTerminalStripInterface> strip = QSharedPointer<AbstractTerminalStripInterface> { nullptr },
QSharedPointer<TerminalStripLayoutPattern> layout = QSharedPointer<TerminalStripLayoutPattern>());
class TerminalStripDrawer
{
public:
TerminalStripDrawer(QSharedPointer<AbstractTerminalStripInterface> strip = QSharedPointer<AbstractTerminalStripInterface> { nullptr },
QSharedPointer<TerminalStripLayoutPattern> layout = QSharedPointer<TerminalStripLayoutPattern>());
void setStrip(QSharedPointer<AbstractTerminalStripInterface> strip);
void paint(QPainter *painter);
QRectF boundingRect() const;
void setStrip(QSharedPointer<AbstractTerminalStripInterface> strip);
void paint(QPainter *painter);
QRectF boundingRect() const;
void setLayout(QSharedPointer<TerminalStripLayoutPattern> layout);
bool haveLayout() const;
void setLayout(QSharedPointer<TerminalStripLayoutPattern> layout);
bool haveLayout() const;
void setPreviewDraw(bool draw = true);
void setPreviewDraw(bool draw = true);
private:
int height() const;
int width() const;
private:
int height() const;
int width() const;
private:
QSharedPointer <AbstractTerminalStripInterface> m_strip;
QSharedPointer<TerminalStripLayoutPattern> m_pattern;
bool m_preview_draw { false };
};
private:
QSharedPointer <AbstractTerminalStripInterface> m_strip;
QSharedPointer<TerminalStripLayoutPattern> m_pattern;
bool m_preview_draw { false };
};
}
#endif // TERMINALSTRIPDRAWER_H
@@ -1,17 +1,17 @@
/*
Copyright 2006-2022 The QElectroTech Team
This file is part of QElectroTech.
QElectroTech is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
QElectroTech is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -26,35 +26,35 @@
#include "trueterminalstrip.h"
TerminalStripItem::TerminalStripItem(QPointer<TerminalStrip> strip,
QGraphicsItem *parent) :
QetGraphicsItem { parent },
m_strip { strip },
m_drawer { QSharedPointer<TerminalStripDrawer::TrueTerminalStrip> {
QGraphicsItem *parent) :
QetGraphicsItem { parent },
m_strip { strip },
m_drawer { QSharedPointer<TerminalStripDrawer::TrueTerminalStrip> {
new TerminalStripDrawer::TrueTerminalStrip { strip }}
}
{
setFlags(QGraphicsItem::ItemIsMovable | QGraphicsItem::ItemIsSelectable);
setAcceptHoverEvents(true);
setDefaultLayout();
setAcceptHoverEvents(true);
setDefaultLayout();
}
TerminalStripItem::TerminalStripItem(QGraphicsItem *parent) :
QetGraphicsItem { parent }
QetGraphicsItem { parent }
{
setFlags(QGraphicsItem::ItemIsMovable | QGraphicsItem::ItemIsSelectable);
setAcceptHoverEvents(true);
setFlags(QGraphicsItem::ItemIsMovable | QGraphicsItem::ItemIsSelectable);
setAcceptHoverEvents(true);
}
void TerminalStripItem::setTerminalStrip(TerminalStrip *strip)
{
m_strip = strip;
m_drawer.setStrip(QSharedPointer<TerminalStripDrawer::TrueTerminalStrip> {
new TerminalStripDrawer::TrueTerminalStrip { strip }});
m_pending_strip_uuid = QUuid();
m_strip = strip;
m_drawer.setStrip(QSharedPointer<TerminalStripDrawer::TrueTerminalStrip> {
new TerminalStripDrawer::TrueTerminalStrip { strip }});
m_pending_strip_uuid = QUuid();
if (!m_drawer.haveLayout()) {
setDefaultLayout();
}
if (!m_drawer.haveLayout()) {
setDefaultLayout();
}
}
/**
@@ -62,7 +62,7 @@ void TerminalStripItem::setTerminalStrip(TerminalStrip *strip)
* @return The strip drawed by this item
*/
QPointer<TerminalStrip> TerminalStripItem::terminalStrip() const {
return m_strip;
return m_strip;
}
void TerminalStripItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
@@ -91,42 +91,42 @@ QRectF TerminalStripItem::boundingRect() const
* @return usual name of this item
*/
QString TerminalStripItem::name() const {
return tr("plan de bornes");
return tr("plan de bornes");
}
void TerminalStripItem::mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event)
{
Q_UNUSED (event);
Q_UNUSED (event);
if (m_strip) {
TerminalStripEditorWindow::edit(m_strip);
}
if (m_strip) {
TerminalStripEditorWindow::edit(m_strip);
}
}
void TerminalStripItem::refreshPending()
{
if (!m_pending_strip_uuid.isNull()
&& diagram()
&& diagram()->project())
{
for (const auto &strip_ : diagram()->project()->terminalStrip()) {
if (strip_->uuid() == m_pending_strip_uuid) {
setTerminalStrip(strip_);
m_pending_strip_uuid = QUuid();
break;
}
}
}
if (!m_pending_strip_uuid.isNull()
&& diagram()
&& diagram()->project())
{
for (const auto &strip_ : diagram()->project()->terminalStrip()) {
if (strip_->uuid() == m_pending_strip_uuid) {
setTerminalStrip(strip_);
m_pending_strip_uuid = QUuid();
break;
}
}
}
}
void TerminalStripItem::setLayout(QSharedPointer<TerminalStripLayoutPattern> layout)
{
m_drawer.setLayout(layout);
m_drawer.setLayout(layout);
}
void TerminalStripItem::setDefaultLayout()
{
if (m_strip && m_strip->project()) {
m_drawer.setLayout(m_strip->project()->projectPropertiesHandler().terminalStripLayoutHandler().defaultLayout());
}
if (m_strip && m_strip->project()) {
m_drawer.setLayout(m_strip->project()->projectPropertiesHandler().terminalStripLayoutHandler().defaultLayout());
}
}
@@ -28,16 +28,16 @@ class TerminalStrip;
class TerminalStripItem : public QetGraphicsItem
{
friend class TerminalStripItemXml;
friend class TerminalStripItemXml;
Q_OBJECT
public:
TerminalStripItem(QPointer<TerminalStrip> strip, QGraphicsItem *parent = nullptr);
TerminalStripItem(QGraphicsItem *parent = nullptr);
TerminalStripItem(QGraphicsItem *parent = nullptr);
void setTerminalStrip(TerminalStrip *strip);
QPointer<TerminalStrip> terminalStrip() const;
void setTerminalStrip(TerminalStrip *strip);
QPointer<TerminalStrip> terminalStrip() const;
enum {Type = UserType + 1011};
int type() const override {return Type;}
@@ -46,17 +46,17 @@ class TerminalStripItem : public QetGraphicsItem
QRectF boundingRect() const override;
QString name() const override;
void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event) override;
void refreshPending();
void setLayout(QSharedPointer<TerminalStripLayoutPattern> layout);
void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event) override;
void refreshPending();
void setLayout(QSharedPointer<TerminalStripLayoutPattern> layout);
private:
void setDefaultLayout();
private:
void setDefaultLayout();
private:
QPointer<TerminalStrip> m_strip;
TerminalStripDrawer::TerminalStripDrawer m_drawer;
QUuid m_pending_strip_uuid;
TerminalStripDrawer::TerminalStripDrawer m_drawer;
QUuid m_pending_strip_uuid;
};
@@ -1,19 +1,19 @@
/*
Copyright 2006-2024 The QElectroTech Team
This file is part of QElectroTech.
QElectroTech is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
QElectroTech is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
Copyright 2006-2024 The QElectroTech Team
This file is part of QElectroTech.
QElectroTech is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
QElectroTech is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
*/
#include "trueterminalstrip.h"
#include "../physicalterminal.h"
@@ -25,109 +25,109 @@
namespace TerminalStripDrawer
{
/**
* @brief TrueTerminalStrip::TrueTerminalStrip
* Constructor, this class don't take ownership of @a strip
* @param strip
*/
TrueTerminalStrip::TrueTerminalStrip(TerminalStrip *strip) :
m_strip { strip }
{}
/**
* @brief TrueTerminalStrip::TrueTerminalStrip
* Constructor, this class don't take ownership of @a strip
* @param strip
*/
TrueTerminalStrip::TrueTerminalStrip(TerminalStrip *strip) :
m_strip { strip }
{}
QString TrueTerminalStrip::installation() const
{
if (m_strip) {
return m_strip->installation();
} else {
return QString();
}
}
QString TrueTerminalStrip::installation() const
{
if (m_strip) {
return m_strip->installation();
} else {
return QString();
}
}
QString TrueTerminalStrip::location() const
{
if (m_strip) {
return m_strip->location();
} else {
return QString();
}
}
QString TrueTerminalStrip::location() const
{
if (m_strip) {
return m_strip->location();
} else {
return QString();
}
}
QString TrueTerminalStrip::name() const
{
if (m_strip) {
return m_strip->name();
} else {
return QString();
}
}
QString TrueTerminalStrip::name() const
{
if (m_strip) {
return m_strip->name();
} else {
return QString();
}
}
QVector<QSharedPointer<AbstractPhysicalTerminalInterface>> TrueTerminalStrip::physicalTerminal() const
{
QVector<QSharedPointer<AbstractPhysicalTerminalInterface>> vector_;
if (m_strip) {
for (const auto &phy : m_strip->physicalTerminal()) {
vector_.append(QSharedPointer<AbstractPhysicalTerminalInterface>{ new TruePhysicalTerminal(phy) });
}
}
QVector<QSharedPointer<AbstractPhysicalTerminalInterface>> TrueTerminalStrip::physicalTerminal() const
{
QVector<QSharedPointer<AbstractPhysicalTerminalInterface>> vector_;
if (m_strip) {
for (const auto &phy : m_strip->physicalTerminal()) {
vector_.append(QSharedPointer<AbstractPhysicalTerminalInterface>{ new TruePhysicalTerminal(phy) });
}
}
return vector_;
}
return vector_;
}
TruePhysicalTerminal::TruePhysicalTerminal(QSharedPointer<PhysicalTerminal> physical) :
m_physical { physical }
{}
TruePhysicalTerminal::TruePhysicalTerminal(QSharedPointer<PhysicalTerminal> physical) :
m_physical { physical }
{}
QVector<QSharedPointer<AbstractRealTerminalInterface>> TruePhysicalTerminal::realTerminals() const
{
QVector<QSharedPointer<AbstractRealTerminalInterface>> vector_;
if (m_physical) {
for (const auto &real_ : m_physical->realTerminals()) {
vector_.append(QSharedPointer<AbstractRealTerminalInterface> { new TrueRealTerminal{ real_ }});
}
}
QVector<QSharedPointer<AbstractRealTerminalInterface>> TruePhysicalTerminal::realTerminals() const
{
QVector<QSharedPointer<AbstractRealTerminalInterface>> vector_;
if (m_physical) {
for (const auto &real_ : m_physical->realTerminals()) {
vector_.append(QSharedPointer<AbstractRealTerminalInterface> { new TrueRealTerminal{ real_ }});
}
}
return vector_;
}
return vector_;
}
TrueRealTerminal::TrueRealTerminal(QSharedPointer<RealTerminal> real) :
m_real { real }
{}
TrueRealTerminal::TrueRealTerminal(QSharedPointer<RealTerminal> real) :
m_real { real }
{}
QString TrueRealTerminal::label() const
{
if (m_real) {
return m_real->label();
} else {
return QString();
}
}
QString TrueRealTerminal::label() const
{
if (m_real) {
return m_real->label();
} else {
return QString();
}
}
bool TrueRealTerminal::isBridged() const
{
if (m_real) {
return m_real->isBridged();
} else {
return false;
}
}
bool TrueRealTerminal::isBridged() const
{
if (m_real) {
return m_real->isBridged();
} else {
return false;
}
}
//Return a raw pointer, the pointer is not managed by this class
AbstractBridgeInterface* TrueRealTerminal::bridge() const
{
return new TrueBridge(m_real->bridge());
}
//Return a raw pointer, the pointer is not managed by this class
AbstractBridgeInterface* TrueRealTerminal::bridge() const
{
return new TrueBridge(m_real->bridge());
}
TrueBridge::TrueBridge(QSharedPointer<TerminalStripBridge> bridge) :
m_bridge { bridge }
{}
TrueBridge::TrueBridge(QSharedPointer<TerminalStripBridge> bridge) :
m_bridge { bridge }
{}
QUuid TrueBridge::uuid() const
{
if (m_bridge) {
return m_bridge->uuid();
} else {
return QUuid();
}
}
QUuid TrueBridge::uuid() const
{
if (m_bridge) {
return m_bridge->uuid();
} else {
return QUuid();
}
}
}
@@ -1,19 +1,19 @@
/*
Copyright 2006-2024 The QElectroTech Team
This file is part of QElectroTech.
QElectroTech is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
QElectroTech is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
Copyright 2006-2024 The QElectroTech Team
This file is part of QElectroTech.
QElectroTech is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
QElectroTech is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef TRUETERMINALSTRIP_H
#define TRUETERMINALSTRIP_H
@@ -27,51 +27,51 @@ class TerminalStripBridge;
namespace TerminalStripDrawer
{
class TrueTerminalStrip : public AbstractTerminalStripInterface
{
public:
TrueTerminalStrip(TerminalStrip *strip);
class TrueTerminalStrip : public AbstractTerminalStripInterface
{
public:
TrueTerminalStrip(TerminalStrip *strip);
QString installation() const override;
QString location() const override;
QString name() const override;
QString installation() const override;
QString location() const override;
QString name() const override;
QVector<QSharedPointer<AbstractPhysicalTerminalInterface>> physicalTerminal() const override;
private:
QPointer<TerminalStrip> m_strip;
};
private:
QPointer<TerminalStrip> m_strip;
};
class TruePhysicalTerminal : public AbstractPhysicalTerminalInterface
{
public:
TruePhysicalTerminal(QSharedPointer<PhysicalTerminal> physical);
QVector<QSharedPointer<AbstractRealTerminalInterface>> realTerminals() const override;
class TruePhysicalTerminal : public AbstractPhysicalTerminalInterface
{
public:
TruePhysicalTerminal(QSharedPointer<PhysicalTerminal> physical);
QVector<QSharedPointer<AbstractRealTerminalInterface>> realTerminals() const override;
private:
QSharedPointer<PhysicalTerminal> m_physical;
};
private:
QSharedPointer<PhysicalTerminal> m_physical;
};
class TrueRealTerminal : public AbstractRealTerminalInterface
{
public:
TrueRealTerminal(QSharedPointer<RealTerminal> real);
QString label() const override;
bool isBridged() const override;
AbstractBridgeInterface* bridge() const override;
class TrueRealTerminal : public AbstractRealTerminalInterface
{
public:
TrueRealTerminal(QSharedPointer<RealTerminal> real);
QString label() const override;
bool isBridged() const override;
AbstractBridgeInterface* bridge() const override;
private:
QSharedPointer<RealTerminal> m_real;
};
private:
QSharedPointer<RealTerminal> m_real;
};
class TrueBridge : public AbstractBridgeInterface
{
public:
TrueBridge(QSharedPointer<TerminalStripBridge> bridge);
QUuid uuid() const override;
class TrueBridge : public AbstractBridgeInterface
{
public:
TrueBridge(QSharedPointer<TerminalStripBridge> bridge);
QUuid uuid() const override;
private:
QSharedPointer<TerminalStripBridge> m_bridge;
};
private:
QSharedPointer<TerminalStripBridge> m_bridge;
};
}
#endif // TRUETERMINALSTRIP_H
@@ -1,19 +1,19 @@
/*
Copyright 2006-2024 The QElectroTech Team
This file is part of QElectroTech.
Copyright 2006-2024 The QElectroTech Team
This file is part of QElectroTech.
QElectroTech is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
QElectroTech is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
QElectroTech is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
QElectroTech is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
You should have received a copy of the GNU General Public License
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
*/
#include "addterminalstripcommand.h"
#include "../../qetproject.h"
@@ -35,22 +35,22 @@ AddTerminalStripCommand::AddTerminalStripCommand(TerminalStrip *strip,
m_strip(strip),
m_project(project)
{
setText(QObject::tr("Ajouter un groupe de bornes"));
setText(QObject::tr("Ajouter un groupe de bornes"));
}
AddTerminalStripCommand::~AddTerminalStripCommand()
{}
void AddTerminalStripCommand::undo() {
if (m_project && m_strip) {
m_project->removeTerminalStrip(m_strip);
}
if (m_project && m_strip) {
m_project->removeTerminalStrip(m_strip);
}
}
void AddTerminalStripCommand::redo() {
if (m_project && m_strip) {
m_project->addTerminalStrip(m_strip);
}
if (m_project && m_strip) {
m_project->addTerminalStrip(m_strip);
}
}
RemoveTerminalStripCommand::RemoveTerminalStripCommand(TerminalStrip *strip,
@@ -1,19 +1,19 @@
/*
Copyright 2006-2024 The QElectroTech Team
This file is part of QElectroTech.
Copyright 2006-2024 The QElectroTech Team
This file is part of QElectroTech.
QElectroTech is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
QElectroTech is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
QElectroTech is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
QElectroTech is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
You should have received a copy of the GNU General Public License
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef ADDTERMINALSTRIPCOMMAND_H
#define ADDTERMINALSTRIPCOMMAND_H
@@ -28,16 +28,16 @@ class Element;
class AddTerminalStripCommand : public QUndoCommand
{
public:
public:
AddTerminalStripCommand(TerminalStrip *strip, QETProject *project, QUndoCommand *parent = nullptr);
~AddTerminalStripCommand() override;
~AddTerminalStripCommand() override;
void undo() override;
void redo() override;
private:
QPointer<TerminalStrip> m_strip;
QPointer<QETProject> m_project;
private:
QPointer<TerminalStrip> m_strip;
QPointer<QETProject> m_project;
};
class RemoveTerminalStripCommand : public QUndoCommand
@@ -1,19 +1,19 @@
/*
Copyright 2006-2024 The QElectroTech Team
This file is part of QElectroTech.
Copyright 2006-2024 The QElectroTech Team
This file is part of QElectroTech.
QElectroTech is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
QElectroTech is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
QElectroTech is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
QElectroTech is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
You should have received a copy of the GNU General Public License
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
*/
#include "addterminaltostripcommand.h"
#include "../../qetgraphicsitem/terminalelement.h"
@@ -72,7 +72,7 @@ void AddTerminalToStripCommand::undo()
{
if (m_new_strip) {
m_new_strip->removeTerminals(m_terminal);
}
}
}
/**
@@ -83,7 +83,7 @@ void AddTerminalToStripCommand::redo()
{
if (m_new_strip) {
m_new_strip->addTerminals(m_terminal);
}
}
}
/**
@@ -1,19 +1,19 @@
/*
Copyright 2006-2024 The QElectroTech Team
This file is part of QElectroTech.
Copyright 2006-2024 The QElectroTech Team
This file is part of QElectroTech.
QElectroTech is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
QElectroTech is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
QElectroTech is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
QElectroTech is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
You should have received a copy of the GNU General Public License
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef ADDTERMINALTOSTRIPCOMMAND_H
#define ADDTERMINALTOSTRIPCOMMAND_H
@@ -36,17 +36,17 @@ class PhysicalTerminal;
*/
class AddTerminalToStripCommand : public QUndoCommand
{
public:
public:
AddTerminalToStripCommand(QSharedPointer<RealTerminal> terminal, TerminalStrip *strip, QUndoCommand *parent = nullptr);
AddTerminalToStripCommand(QVector<QSharedPointer<RealTerminal>> terminals, TerminalStrip *strip, QUndoCommand *parent = nullptr);
~AddTerminalToStripCommand() override;
~AddTerminalToStripCommand() override;
void undo() override;
void redo() override;
void undo() override;
void redo() override;
private:
private:
QVector<QSharedPointer<RealTerminal>> m_terminal;
QPointer<TerminalStrip> m_new_strip;
QPointer<TerminalStrip> m_new_strip;
};
/**
@@ -1,19 +1,19 @@
/*
Copyright 2006-2024 The QElectroTech Team
This file is part of QElectroTech.
Copyright 2006-2024 The QElectroTech Team
This file is part of QElectroTech.
QElectroTech is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
QElectroTech is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
QElectroTech is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
QElectroTech is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
You should have received a copy of the GNU General Public License
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
*/
#include "bridgeterminalscommand.h"
#include "../terminalstripbridge.h"
@@ -58,18 +58,18 @@ UnBridgeTerminalsCommand::UnBridgeTerminalsCommand(TerminalStrip *strip,
if (strip->canUnBridge(real_terminal))
{
m_bridge = strip->isBridged(real_terminal.first());
m_bridge = strip->isBridged(real_terminal.first());
//If bridge have one more terminals than @real_terminal
//that mean every terminals of the bridge must be unbridged by this undo command,
//else the single terminal who's not umbridged by this undo command
//continue to have a bridge (to nothing) and this nowhere bridge is visible
//in the terminal strip graphic item and terminal strip editor dialog.
if (m_bridge->realTerminals().size() == real_terminal.size() + 1) {
m_terminals = m_bridge->realTerminals();
} else {
m_terminals = real_terminal;
}
//If bridge have one more terminals than @real_terminal
//that mean every terminals of the bridge must be unbridged by this undo command,
//else the single terminal who's not umbridged by this undo command
//continue to have a bridge (to nothing) and this nowhere bridge is visible
//in the terminal strip graphic item and terminal strip editor dialog.
if (m_bridge->realTerminals().size() == real_terminal.size() + 1) {
m_terminals = m_bridge->realTerminals();
} else {
m_terminals = real_terminal;
}
}
}
@@ -1,19 +1,19 @@
/*
Copyright 2006-2024 The QElectroTech Team
This file is part of QElectroTech.
Copyright 2006-2024 The QElectroTech Team
This file is part of QElectroTech.
QElectroTech is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
QElectroTech is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
QElectroTech is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
QElectroTech is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
You should have received a copy of the GNU General Public License
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef BRIDGETERMINALSCOMMAND_H
#define BRIDGETERMINALSCOMMAND_H
@@ -1,19 +1,19 @@
/*
Copyright 2006-2024 The QElectroTech Team
This file is part of QElectroTech.
Copyright 2006-2024 The QElectroTech Team
This file is part of QElectroTech.
QElectroTech is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
QElectroTech is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
QElectroTech is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
QElectroTech is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
You should have received a copy of the GNU General Public License
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
*/
#include "changeterminallevel.h"
#include "../realterminal.h"
@@ -1,19 +1,19 @@
/*
Copyright 2006-2024 The QElectroTech Team
This file is part of QElectroTech.
Copyright 2006-2024 The QElectroTech Team
This file is part of QElectroTech.
QElectroTech is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
QElectroTech is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
QElectroTech is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
QElectroTech is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
You should have received a copy of the GNU General Public License
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef CHANGETERMINALLEVEL_H
#define CHANGETERMINALLEVEL_H
@@ -1,19 +1,19 @@
/*
Copyright 2006-2024 The QElectroTech Team
This file is part of QElectroTech.
Copyright 2006-2024 The QElectroTech Team
This file is part of QElectroTech.
QElectroTech is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
QElectroTech is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
QElectroTech is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
QElectroTech is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
You should have received a copy of the GNU General Public License
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
*/
#include "changeterminalstripcolor.h"
#include "../terminalstripbridge.h"
@@ -1,19 +1,19 @@
/*
Copyright 2006-2024 The QElectroTech Team
This file is part of QElectroTech.
Copyright 2006-2024 The QElectroTech Team
This file is part of QElectroTech.
QElectroTech is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
QElectroTech is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
QElectroTech is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
QElectroTech is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
You should have received a copy of the GNU General Public License
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef CHANGETERMINALSTRIPCOLOR_H
#define CHANGETERMINALSTRIPCOLOR_H
@@ -1,19 +1,19 @@
/*
Copyright 2006-2024 The QElectroTech Team
This file is part of QElectroTech.
Copyright 2006-2024 The QElectroTech Team
This file is part of QElectroTech.
QElectroTech is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
QElectroTech is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
QElectroTech is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
QElectroTech is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
You should have received a copy of the GNU General Public License
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
*/
#include "changeterminalstripdata.h"
@@ -1,19 +1,19 @@
/*
Copyright 2006-2024 The QElectroTech Team
This file is part of QElectroTech.
Copyright 2006-2024 The QElectroTech Team
This file is part of QElectroTech.
QElectroTech is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
QElectroTech is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
QElectroTech is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
QElectroTech is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
You should have received a copy of the GNU General Public License
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef CHANGETERMINALSTRIPDATA_H
#define CHANGETERMINALSTRIPDATA_H
@@ -27,15 +27,15 @@
*/
class ChangeTerminalStripData : public QUndoCommand
{
public:
ChangeTerminalStripData(TerminalStrip *strip, const TerminalStripData &data, QUndoCommand *parent = nullptr);
public:
ChangeTerminalStripData(TerminalStrip *strip, const TerminalStripData &data, QUndoCommand *parent = nullptr);
void undo() override;
void redo() override;
void undo() override;
void redo() override;
private:
QPointer<TerminalStrip> m_strip;
TerminalStripData m_old_data, m_new_data;
private:
QPointer<TerminalStrip> m_strip;
TerminalStripData m_old_data, m_new_data;
};
#endif // CHANGETERMINALSTRIPDATA_H
@@ -1,19 +1,19 @@
/*
Copyright 2006-2024 The QElectroTech Team
This file is part of QElectroTech.
Copyright 2006-2024 The QElectroTech Team
This file is part of QElectroTech.
QElectroTech is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
QElectroTech is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
QElectroTech is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
QElectroTech is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
You should have received a copy of the GNU General Public License
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
*/
#include "groupterminalscommand.h"
#include "../physicalterminal.h"
@@ -1,19 +1,19 @@
/*
Copyright 2006-2024 The QElectroTech Team
This file is part of QElectroTech.
Copyright 2006-2024 The QElectroTech Team
This file is part of QElectroTech.
QElectroTech is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
QElectroTech is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
QElectroTech is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
QElectroTech is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
You should have received a copy of the GNU General Public License
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef GROUPTERMINALSCOMMAND_H
#define GROUPTERMINALSCOMMAND_H
@@ -1,19 +1,19 @@
/*
Copyright 2006-2024 The QElectroTech Team
This file is part of QElectroTech.
Copyright 2006-2024 The QElectroTech Team
This file is part of QElectroTech.
QElectroTech is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
QElectroTech is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
QElectroTech is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
QElectroTech is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
You should have received a copy of the GNU General Public License
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
*/
#include "sortterminalstripcommand.h"
#include "../terminalstrip.h"
@@ -1,19 +1,19 @@
/*
Copyright 2006-2024 The QElectroTech Team
This file is part of QElectroTech.
Copyright 2006-2024 The QElectroTech Team
This file is part of QElectroTech.
QElectroTech is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
QElectroTech is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
QElectroTech is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
QElectroTech is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
You should have received a copy of the GNU General Public License
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef SORTTERMINALSTRIPCOMMAND_H
#define SORTTERMINALSTRIPCOMMAND_H
+1 -1
View File
@@ -976,7 +976,7 @@ QDomElement TerminalStrip::toXml(QDomDocument &parent_document)
root_elmt.appendChild(m_data.toXml(parent_document));
//Undrawed terminals
auto xml_layout = parent_document.createElement(QStringLiteral("layout"));
auto xml_layout = parent_document.createElement(QStringLiteral("layout"));
for (auto &phy_t : m_physical_terminals) {
xml_layout.appendChild(phy_t->toXml(parent_document));
+23 -23
View File
@@ -1,19 +1,19 @@
/*
Copyright 2006-2024 The QElectroTech Team
This file is part of QElectroTech.
Copyright 2006-2024 The QElectroTech Team
This file is part of QElectroTech.
QElectroTech is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
QElectroTech is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
QElectroTech is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
QElectroTech is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
You should have received a copy of the GNU General Public License
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
*/
#include "terminalstripdata.h"
#include "../qetxml.h"
@@ -34,7 +34,7 @@ QDomElement TerminalStripData::toXml(QDomDocument &xml_document) const
root_elmt.setAttribute(QStringLiteral("uuid"), m_uuid.toString());
auto info_elmt = xml_document.createElement(QStringLiteral("informations"));
auto info_elmt = xml_document.createElement(QStringLiteral("informations"));
root_elmt.appendChild(info_elmt);
if (!m_installation.isEmpty()) {
@@ -65,23 +65,23 @@ bool TerminalStripData::fromXml(const QDomElement &xml_element)
return false;
}
#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
m_uuid = QUuid::fromString(xml_element.attribute(QStringLiteral("uuid")));
m_uuid = QUuid::fromString(xml_element.attribute(QStringLiteral("uuid")));
#else
m_uuid = QUuid(xml_element.attribute(QStringLiteral("uuid")));
#endif
for (auto &xml_info :
QETXML::findInDomElement(xml_element.firstChildElement(QStringLiteral("informations")),
QStringLiteral("information")))
QETXML::findInDomElement(xml_element.firstChildElement(QStringLiteral("informations")),
QStringLiteral("information")))
{
auto name = xml_info.attribute(QStringLiteral("name"));
auto name = xml_info.attribute(QStringLiteral("name"));
auto value = xml_info.text();
if (name == QLatin1String("installation")) { m_installation = value;}
else if (name == QLatin1String("location")) {m_location = value;}
else if (name == QLatin1String("name")) {m_name = value;}
else if (name == QLatin1String("comment")) {m_comment = value;}
else if (name == QLatin1String("description")) {m_description = value;}
if (name == QLatin1String("installation")) { m_installation = value;}
else if (name == QLatin1String("location")) {m_location = value;}
else if (name == QLatin1String("name")) {m_name = value;}
else if (name == QLatin1String("comment")) {m_comment = value;}
else if (name == QLatin1String("description")) {m_description = value;}
}
return true;
@@ -101,7 +101,7 @@ TerminalStripData &TerminalStripData::operator=(const TerminalStripData &other)
QDomElement TerminalStripData::infoToXml(QDomDocument &xml_doc, const QString &name, const QString &value)
{
auto xml_elmt = xml_doc.createElement(QStringLiteral("information"));
auto xml_elmt = xml_doc.createElement(QStringLiteral("information"));
xml_elmt.setAttribute(QStringLiteral("name"), name);
xml_elmt.appendChild(xml_doc.createTextNode(value));
+12 -12
View File
@@ -1,19 +1,19 @@
/*
Copyright 2006-2024 The QElectroTech Team
This file is part of QElectroTech.
Copyright 2006-2024 The QElectroTech Team
This file is part of QElectroTech.
QElectroTech is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
QElectroTech is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
QElectroTech is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
QElectroTech is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
You should have received a copy of the GNU General Public License
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef TERMINALSTRIPDATA_H
#define TERMINALSTRIPDATA_H
@@ -1,19 +1,19 @@
/*
Copyright 2006-2024 The QElectroTech Team
This file is part of QElectroTech.
Copyright 2006-2024 The QElectroTech Team
This file is part of QElectroTech.
QElectroTech is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
QElectroTech is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
QElectroTech is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
QElectroTech is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
You should have received a copy of the GNU General Public License
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
*/
#include "terminalstripprojectconfigpage.h"
#include "../../../qeticons.h"
@@ -23,26 +23,26 @@
#include <QVBoxLayout>
TerminalStripProjectConfigPage::TerminalStripProjectConfigPage(QETProject *project,
QWidget *parent) :
ProjectConfigPage { project, parent }
QWidget *parent) :
ProjectConfigPage { project, parent }
{
initWidgets();
initWidgets();
}
QString TerminalStripProjectConfigPage::title() const {
return tr("Plan de bornes");
return tr("Plan de bornes");
}
QIcon TerminalStripProjectConfigPage::icon() const {
return QET::Icons::TerminalStrip;
return QET::Icons::TerminalStrip;
}
void TerminalStripProjectConfigPage::initWidgets()
{
m_layout_editor = new TerminalStripLayoutEditor{ project()->projectPropertiesHandler().terminalStripLayoutHandler().defaultLayout(),
this };
m_layout_editor = new TerminalStripLayoutEditor{ project()->projectPropertiesHandler().terminalStripLayoutHandler().defaultLayout(),
this };
auto v_layout = new QVBoxLayout { this };
v_layout->addWidget(m_layout_editor);
setLayout(v_layout);
auto v_layout = new QVBoxLayout { this };
v_layout->addWidget(m_layout_editor);
setLayout(v_layout);
}
@@ -1,19 +1,19 @@
/*
Copyright 2006-2024 The QElectroTech Team
This file is part of QElectroTech.
Copyright 2006-2024 The QElectroTech Team
This file is part of QElectroTech.
QElectroTech is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
QElectroTech is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
QElectroTech is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
QElectroTech is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
You should have received a copy of the GNU General Public License
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef TERMINALSTRIPPROJECTCONFIGPAGE_H
#define TERMINALSTRIPPROJECTCONFIGPAGE_H
@@ -24,23 +24,23 @@ class TerminalStripLayoutEditor;
class TerminalStripProjectConfigPage : public ProjectConfigPage
{
Q_OBJECT
public:
TerminalStripProjectConfigPage(QETProject *project, QWidget *parent = nullptr);
Q_OBJECT
public:
TerminalStripProjectConfigPage(QETProject *project, QWidget *parent = nullptr);
QString title() const override;
QIcon icon() const override;
QString title() const override;
QIcon icon() const override;
void applyProjectConf() override {}
void applyProjectConf() override {}
protected:
void initWidgets() override;
void initLayout() override{}
void readValuesFromProject() override {}
void adjustReadOnly() override {}
protected:
void initWidgets() override;
void initLayout() override{}
void readValuesFromProject() override {}
void adjustReadOnly() override {}
private:
TerminalStripLayoutEditor *m_layout_editor { nullptr };
private:
TerminalStripLayoutEditor *m_layout_editor { nullptr };
};
#endif // TERMINALSTRIPPROJECTCONFIGPAGE_H
+12 -12
View File
@@ -1,19 +1,19 @@
/*
Copyright 2006-2024 The QElectroTech Team
This file is part of QElectroTech.
Copyright 2006-2024 The QElectroTech Team
This file is part of QElectroTech.
QElectroTech is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
QElectroTech is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
QElectroTech is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
QElectroTech is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
You should have received a copy of the GNU General Public License
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
*/
#include "freeterminaleditor.h"
#include "ui_freeterminaleditor.h"
+12 -12
View File
@@ -1,19 +1,19 @@
/*
Copyright 2006-2024 The QElectroTech Team
This file is part of QElectroTech.
Copyright 2006-2024 The QElectroTech Team
This file is part of QElectroTech.
QElectroTech is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
QElectroTech is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
QElectroTech is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
QElectroTech is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
You should have received a copy of the GNU General Public License
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef FREETERMINALEDITOR_H
#define FREETERMINALEDITOR_H
+14 -14
View File
@@ -1,19 +1,19 @@
/*
Copyright 2006-2024 The QElectroTech Team
This file is part of QElectroTech.
Copyright 2006-2024 The QElectroTech Team
This file is part of QElectroTech.
QElectroTech is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
QElectroTech is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
QElectroTech is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
QElectroTech is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
You should have received a copy of the GNU General Public License
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
*/
#include <QComboBox>
@@ -333,7 +333,7 @@ QWidget *FreeTerminalModelDelegate::createEditor(QWidget *parent, const QStyleOp
{
if (index.column() == TYPE_CELL) {
auto qcb = new QComboBox(parent);
qcb->setObjectName(QStringLiteral("terminal_type"));
qcb->setObjectName(QStringLiteral("terminal_type"));
qcb->addItem(ElementData::translatedTerminalType(ElementData::TTGeneric), ElementData::TTGeneric);
qcb->addItem(ElementData::translatedTerminalType(ElementData::TTFuse), ElementData::TTFuse);
qcb->addItem(ElementData::translatedTerminalType(ElementData::TTSectional), ElementData::TTSectional);
@@ -344,7 +344,7 @@ QWidget *FreeTerminalModelDelegate::createEditor(QWidget *parent, const QStyleOp
}
if (index.column() == FUNCTION_CELL) {
auto qcb = new QComboBox(parent);
qcb->setObjectName(QStringLiteral("terminal_function"));
qcb->setObjectName(QStringLiteral("terminal_function"));
qcb->addItem(ElementData::translatedTerminalFunction(ElementData::TFGeneric), ElementData::TFGeneric);
qcb->addItem(ElementData::translatedTerminalFunction(ElementData::TFPhase), ElementData::TFPhase);
qcb->addItem(ElementData::translatedTerminalFunction(ElementData::TFNeutral), ElementData::TFNeutral);
+12 -12
View File
@@ -1,19 +1,19 @@
/*
Copyright 2006-2024 The QElectroTech Team
This file is part of QElectroTech.
Copyright 2006-2024 The QElectroTech Team
This file is part of QElectroTech.
QElectroTech is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
QElectroTech is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
QElectroTech is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
QElectroTech is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
You should have received a copy of the GNU General Public License
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef FREETERMINALMODEL_H
#define FREETERMINALMODEL_H
+12 -12
View File
@@ -1,19 +1,19 @@
/*
Copyright 2006-2024 The QElectroTech Team
This file is part of QElectroTech.
Copyright 2006-2024 The QElectroTech Team
This file is part of QElectroTech.
QElectroTech is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
QElectroTech is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
QElectroTech is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
QElectroTech is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
You should have received a copy of the GNU General Public License
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef MODELTERMINALDATA_H
#define MODELTERMINALDATA_H
@@ -1,19 +1,19 @@
/*
Copyright 2006-2024 The QElectroTech Team
This file is part of QElectroTech.
Copyright 2006-2024 The QElectroTech Team
This file is part of QElectroTech.
QElectroTech is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
QElectroTech is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
QElectroTech is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
QElectroTech is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
You should have received a copy of the GNU General Public License
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
*/
#include "terminalstripcreatordialog.h"
#include "ui_terminalstripcreatordialog.h"

Some files were not shown because too many files have changed in this diff Show More