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 examples DESTINATION share/qelectrotech)
install(DIRECTORY titleblocks DESTINATION share/qelectrotech) install(DIRECTORY titleblocks DESTINATION share/qelectrotech)
install(FILES LICENSE ELEMENTS.LICENSE CREDIT README ChangeLog DESTINATION share/doc/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.xml DESTINATION share/mime/packages)
install(FILES misc/qelectrotech.appdata.xml DESTINATION ${QET_APPDATA_PATH}) install(FILES misc/qelectrotech.appdata.xml DESTINATION ${QET_APPDATA_PATH})
install(FILES ${QM_FILES} DESTINATION ${QET_LANG_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 Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed. 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 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. 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. 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! 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). 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. 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. Like many other open source software, QElectroTech is provided as is, without any warranty.
### Development / technical choices ### Development / technical choices
@@ -1,11 +1,11 @@
{ {
"id": "org.qelectrotech.QElectroTech", "id": "org.qelectrotech.QElectroTech",
"base-version": "5.15-22.08", "base-version": "5.15-23.08",
"runtime": "org.kde.Platform", "runtime": "org.kde.Platform",
"runtime-version": "5.15-22.08", "runtime-version": "5.15-23.08",
"sdk": "org.kde.Sdk", "sdk": "org.kde.Sdk",
"command": "qelectrotech", "command": "qelectrotech",
"rename-desktop-file": "qelectrotech.desktop", "rename-desktop-file": "org.qelectrotech.qelectrotech.desktop",
"rename-appdata-file": "qelectrotech.appdata.xml", "rename-appdata-file": "qelectrotech.appdata.xml",
"rename-icon": "qelectrotech", "rename-icon": "qelectrotech",
"copy-icon": true, "copy-icon": true,
@@ -9,8 +9,6 @@ if [ ! -d "$to" ] && [ -d "$from" ]; then
cp -av "$from/." "$to" cp -av "$from/." "$to"
fi fi
# link DXFtoQET so that QET finds it
mkdir -p "$HOME/.qet"
ln -snf "$SNAP/bin/DXFtoQET" "$HOME/.qet/DXFtoQET"
exec "${@}" exec "${@}"
+4 -19
View File
@@ -29,7 +29,7 @@ apps:
common-id: qelectrotech.desktop common-id: qelectrotech.desktop
extensions: extensions:
- kde-neon - 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 environment: &env
TCL_LIBRARY: $SNAP/usr/share/tcltk/tcl8.6 TCL_LIBRARY: $SNAP/usr/share/tcltk/tcl8.6
HOME: $SNAP_USER_COMMON HOME: $SNAP_USER_COMMON
@@ -42,12 +42,6 @@ apps:
plugs: *plugs plugs: *plugs
environment: *env environment: *env
dxf-to-qet:
command: bin/DXFtoQET
extensions:
- kde-neon
plugs: *plugs
environment: *env
parts: parts:
launchers: launchers:
@@ -77,15 +71,6 @@ parts:
override-build: | override-build: |
rsync -a --ignore-existing /snap/kf5-5-110-qt-5-15-11-core22-sdk/current/ / 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: qelectrotech:
after: [kde-sdk-setup] after: [kde-sdk-setup]
@@ -96,7 +81,7 @@ parts:
- git - git
- libsqlite3-dev - libsqlite3-dev
override-build: | 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)" snap_version="${displayed_version}-g$(git rev-parse --short=8 HEAD)"
modified_displayed_version="${snap_version}.snap" modified_displayed_version="${snap_version}.snap"
sed -i -E "s|const QString displayedVersion =.*|const QString displayedVersion =\"$modified_displayed_version\";|" sources/qet.h sed -i -E "s|const QString displayedVersion =.*|const QString displayedVersion =\"$modified_displayed_version\";|" sources/qet.h
@@ -108,10 +93,10 @@ parts:
craftctl default craftctl default
# patch desktop file with correct icon path # 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="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: cleanup:
after: [qelectrotech, dxf-to-qet, qet-tb-generator] after: [qelectrotech, qet-tb-generator]
plugin: nil plugin: nil
build-snaps: [kf5-5-110-qt-5-15-11-core22] build-snaps: [kf5-5-110-qt-5-15-11-core22]
override-prime: | override-prime: |
+2 -2
View File
@@ -266,13 +266,13 @@ Section ""
; write file associations registry keys ; write file associations registry keys
WriteRegStr HKEY_CLASSES_ROOT "Applications\qelectrotech.exe\shell\open\command" "" "$\"$final_qet_exe$\" $\"%1$\"" 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" "" "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" "EditFlags" 0x00000000
WriteRegDWORD HKEY_CLASSES_ROOT "qet_diagram_file" "BrowserFlags" 0x00000008 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\DefaultIcon" "" "$final_project_ico"
WriteRegStr HKEY_CLASSES_ROOT "qet_diagram_file\shell\open\command" "" "$\"$final_qet_exe$\" $\"%1$\"" 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 ".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" "EditFlags" 0x00000000
WriteRegDWORD HKEY_CLASSES_ROOT "qet_element_file" "BrowserFlags" 0x00000008 WriteRegDWORD HKEY_CLASSES_ROOT "qet_element_file" "BrowserFlags" 0x00000008
WriteRegStr HKEY_CLASSES_ROOT "qet_element_file\DefaultIcon" "" "$final_element_ico" 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.cpp
${QET_DIR}/sources/dxf/dxftoelmt.h ${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.cpp
${QET_DIR}/sources/editor/arceditor.h ${QET_DIR}/sources/editor/arceditor.h
${QET_DIR}/sources/editor/editorcommands.cpp ${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)) 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éé # Dmg de la dernière revision déjà créé
if [ -e "build-aux/mac-osx/${APPNAME} $VERSION r$HEAD.dmg" ] ; then 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)) 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éé # Tarball de la dernière revision déjà créé
if [ -e "build-aux/mac-osx/${APPNAME}-$VERSION-r$HEAD-arm64.zip" ] ; then 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'; my $todo = 'TODO';
our $default_language = 'fr'; 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 @misc_xml_files = qw(misc/qelectrotech.xml);
our @readme_files = qw(CREDIT README INSTALL ELEMENTS.LICENSE build-aux/linux/fedora/README.elements); 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); 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)) HEAD=$(($A+473))
#Find major, minor, and micro version numbers in sources/qetversion.cp #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/ rm -Rf build/
mkdir build && cd 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 ../build/qelectrotech qelectrotech/usr/bin/
cp -r ../{elements,examples,titleblocks,lang,man} qelectrotech/usr/share/ 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 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/ cp AppRun qelectrotech/
rm QElectroTech_*.AppImage rm QElectroTech_*.AppImage
+2 -1
View File
@@ -31,7 +31,8 @@ if [ -z "$HEAD" ] ; then
fi 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 #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 # get the number of the new revision
GITCOMMIT=$(git rev-parse --short HEAD) 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 ~ 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 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/*.h) \
$$files(sources/TerminalStrip/GraphicsItem/properties/*.h) \ $$files(sources/TerminalStrip/GraphicsItem/properties/*.h) \
$$files(sources/xml/*.h) \ $$files(sources/xml/*.h) \
$$files(sources/dxf/*.h) $$files(sources/dxf/*.h) \
$$files(sources/qet_elementscaler/*.h)
SOURCES += $$files(sources/*.cpp) \ SOURCES += $$files(sources/*.cpp) \
$$files(sources/editor/*.cpp) \ $$files(sources/editor/*.cpp) \
@@ -208,7 +209,8 @@ SOURCES += $$files(sources/*.cpp) \
$$files(sources/TerminalStrip/GraphicsItem/*.cpp) \ $$files(sources/TerminalStrip/GraphicsItem/*.cpp) \
$$files(sources/TerminalStrip/GraphicsItem/properties/*.cpp) \ $$files(sources/TerminalStrip/GraphicsItem/properties/*.cpp) \
$$files(sources/xml/*.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 # Needed for use promote QTreeWidget in terminalstripeditor.ui
INCLUDEPATH += sources/TerminalStrip/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 mime_package.files = misc/qelectrotech.xml
desktop.path = $$join(INSTALL_PREFIX,,,$${QET_DESKTOP_PATH}) 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.path = $$join(INSTALL_PREFIX,,,$${QET_APPDATA_PATH})
appdata.files = misc/qelectrotech.appdata.xml appdata.files = misc/qelectrotech.appdata.xml
@@ -399,7 +399,7 @@ ElementsLocation ElementCollectionHandler::createDir(ElementsLocation &parent, c
@brief ElementCollectionHandler::importFromProject @brief ElementCollectionHandler::importFromProject
Import the element represented by location to the embedded collection Import the element represented by location to the embedded collection
of project at the same path. 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 project : project where copy the element
@param location : location to copy @param location : location to copy
@return true if import with success @return true if import with success
@@ -713,7 +713,7 @@ void ElementsCollectionWidget::locationWasSaved(
const ElementsLocation& location) const ElementsLocation& location)
{ {
//Because this method update an item in the model, location must //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()) if (!location.exist())
return; return;
@@ -591,7 +591,7 @@ bool ElementsLocation::isWritable() const
/** /**
@brief ElementsLocation::projectCollection @brief ElementsLocation::projectCollection
@return @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. return this collection else return nullptr.
*/ */
XmlElementCollection *ElementsLocation::projectCollection() const XmlElementCollection *ElementsLocation::projectCollection() const
@@ -35,7 +35,17 @@ static int MAX_DND_PIXMAP_HEIGHT = 375;
*/ */
ElementsTreeView::ElementsTreeView(QWidget *parent) : ElementsTreeView::ElementsTreeView(QWidget *parent) :
QTreeView(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 @brief ElementsTreeView::startDrag
+37
View File
@@ -223,7 +223,44 @@ namespace autonum
str.replace("%{quantity}", dc.value("quantity").toString()); str.replace("%{quantity}", dc.value("quantity").toString());
str.replace("%{unity}", dc.value("unity").toString()); str.replace("%{unity}", dc.value("unity").toString());
str.replace("%{auxiliary1}", dc.value("auxiliary1").toString()); str.replace("%{auxiliary1}", dc.value("auxiliary1").toString());
str.replace("%{description_auxiliary1}", dc.value("description_auxiliary1").toString());
str.replace("%{designation_auxiliary1}", dc.value("designation_auxiliary1").toString());
str.replace("%{manufacturer_auxiliary1}", dc.value("manufacturer_auxiliary1").toString());
str.replace("%{manufacturer_reference_auxiliary1}", dc.value("manufacturer_reference_auxiliary1").toString());
str.replace("%{supplier_auxiliary1}", dc.value("supplier_auxiliary1").toString());
str.replace("%{quantity_auxiliary1}", dc.value("quantity_auxiliary1").toString());
str.replace("%{unity_auxiliary1}", dc.value("unity_auxiliary1").toString());
str.replace("%{auxiliary2}", dc.value("auxiliary2").toString()); str.replace("%{auxiliary2}", dc.value("auxiliary2").toString());
str.replace("%{description_auxiliary2}", dc.value("description_auxiliary2").toString());
str.replace("%{designation_auxiliary2}", dc.value("designation_auxiliary2").toString());
str.replace("%{manufacturer_auxiliary2}", dc.value("manufacturer_auxiliary2").toString());
str.replace("%{manufacturer_reference_auxiliary2}", dc.value("manufacturer_reference_auxiliary2").toString());
str.replace("%{supplier_auxiliary2}", dc.value("supplier_auxiliary2").toString());
str.replace("%{quantity_auxiliary2}", dc.value("quantity_auxiliary2").toString());
str.replace("%{unity_auxiliary2}", dc.value("unity_auxiliary2").toString());
str.replace("%{auxiliary3}", dc.value("auxiliary3").toString());
str.replace("%{description_auxiliary3}", dc.value("description_auxiliary3").toString());
str.replace("%{designation_auxiliary3}", dc.value("designation_auxiliary3").toString());
str.replace("%{manufacturer_auxiliary3}", dc.value("manufacturer_auxiliary3").toString());
str.replace("%{manufacturer_reference_auxiliary3}", dc.value("manufacturer_reference_auxiliary3").toString());
str.replace("%{supplier_auxiliary3}", dc.value("supplier_auxiliary3").toString());
str.replace("%{quantity_auxiliary3}", dc.value("quantity_auxiliary3").toString());
str.replace("%{unity_auxiliary3}", dc.value("unity_auxiliary3").toString());
str.replace("%{auxiliary4}", dc.value("auxiliary4").toString());
str.replace("%{description_auxiliary4}", dc.value("description_auxiliary4").toString());
str.replace("%{designation_auxiliary4}", dc.value("designation_auxiliary4").toString());
str.replace("%{manufacturer_auxiliary4}", dc.value("manufacturer_auxiliary4").toString());
str.replace("%{manufacturer_reference_auxiliary4}", dc.value("manufacturer_reference_auxiliary4").toString());
str.replace("%{supplier_auxiliary4}", dc.value("supplier_auxiliary4").toString());
str.replace("%{quantity_auxiliary4}", dc.value("quantity_auxiliary4").toString());
str.replace("%{unity_auxiliary4}", dc.value("unity_auxiliary4").toString());
str.replace("%{machine_manufacturer_reference}", str.replace("%{machine_manufacturer_reference}",
dc.value("machine_manufacturer_reference").toString()); dc.value("machine_manufacturer_reference").toString());
str.replace("%{location}", dc.value("location").toString()); str.replace("%{location}", dc.value("location").toString());
+27 -1
View File
@@ -226,7 +226,7 @@ void SelectAutonumW::on_buttonBox_clicked(QAbstractButton *button)
)); ));
break; break;
} }
else else if (m_edited_type == 1)
{ {
QMessageBox::information ( QMessageBox::information (
this, this,
@@ -252,6 +252,32 @@ void SelectAutonumW::on_buttonBox_clicked(QAbstractButton *button)
)); ));
break; break;
} }
else
{
QMessageBox::information (
this,
tr("Element Autonumérotation",
"title window"),
tr("C'est ici que vous pouvez définir la manière dont seront numérotés les nouveaux elements.\n"
"-Une numérotation est composée d'une variable minimum.\n"
"-Vous pouvez ajouter ou supprimer une variable de numérotation par le biais des boutons - et +.\n"
"-Une variable de numérotation comprend : un type, une valeur et une incrémentation.\n"
"\n-les types \"Chiffre 1\", \"Chiffre 01\" et \"Chiffre 001\", représentent un type numérique défini dans le champ \"Valeur\", "
"qui s'incrémente à chaque nouveau conducteur de la valeur du champ \"Incrémentation\".\n"
"-\"Chiffre 01\" et \"Chiffre 001\", sont respectivement représentés sur le schéma par deux et trois digits minimum.\n"
"Si le chiffre défini dans le champ Valeur possède moins de digits que le type choisi,"
"celui-ci sera précédé par un ou deux 0 afin de respecter son type.\n"
"\n-Le type \"Texte\", représente un texte fixe.\nLe champ \"Incrémentation\" n'est pas utilisé.\n"
"\n-Le type \"N° folio\" représente le n° du folio en cours.\nLes autres champs ne sont pas utilisés.\n"
"\n-Le type \"Folio\" représente le nom du folio en cours.\nLes autres champs ne sont pas utilisés.",
"help dialog about the element autonumerotation"
));
break;
}
//apply the context in the diagram displayed by @diagram_chooser. //apply the context in the diagram displayed by @diagram_chooser.
case QDialogButtonBox::ApplyRole: case QDialogButtonBox::ApplyRole:
applyEnable(false); applyEnable(false);
+41 -2
View File
@@ -336,8 +336,6 @@ void projectDataBase::createElementNomenclatureView()
"ei.location AS location," "ei.location AS location,"
"ei.comment AS comment," "ei.comment AS comment,"
"ei.function AS function," "ei.function AS function,"
"ei.auxiliary1 AS auxiliary1,"
"ei.auxiliary2 AS auxiliary2,"
"ei.description AS description," "ei.description AS description,"
"ei.designation AS designation," "ei.designation AS designation,"
"ei.manufacturer AS manufacturer," "ei.manufacturer AS manufacturer,"
@@ -346,6 +344,47 @@ void projectDataBase::createElementNomenclatureView()
"ei.supplier AS supplier," "ei.supplier AS supplier,"
"ei.quantity AS quantity," "ei.quantity AS quantity,"
"ei.unity AS unity," "ei.unity AS unity,"
"ei.auxiliary1 AS auxiliary1,"
"ei.description_auxiliary1 AS description_auxiliary1,"
"ei.designation_auxiliary1 AS designation_auxiliary1,"
"ei.manufacturer_auxiliary1 AS manufacturer_auxiliary1,"
"ei.manufacturer_reference_auxiliary1 AS manufacturer_reference_auxiliary1,"
"ei.machine_manufacturer_reference_auxiliary1 AS machine_manufacturer_reference_auxiliary1,"
"ei.supplier_auxiliary1 AS supplier_auxiliary1,"
"ei.quantity_auxiliary1 AS quantity_auxiliary1,"
"ei.unity_auxiliary1 AS unity_auxiliary1,"
"ei.auxiliary2 AS auxiliary2,"
"ei.description_auxiliary2 AS description_auxiliary2,"
"ei.designation_auxiliary2 AS designation_auxiliary2,"
"ei.manufacturer_auxiliary2 AS manufacturer_auxiliary2,"
"ei.manufacturer_reference_auxiliary2 AS manufacturer_reference_auxiliary2,"
"ei.machine_manufacturer_reference_auxiliary2 AS machine_manufacturer_reference_auxiliary2,"
"ei.supplier_auxiliary2 AS supplier_auxiliary2,"
"ei.quantity_auxiliary2 AS quantity_auxiliary2,"
"ei.unity_auxiliary2 AS unity_auxiliary2,"
"ei.auxiliary3 AS auxiliary3,"
"ei.description_auxiliary3 AS description_auxiliary3,"
"ei.designation_auxiliary3 AS designation_auxiliary3,"
"ei.manufacturer_auxiliary3 AS manufacturer_auxiliary3,"
"ei.manufacturer_reference_auxiliary3 AS manufacturer_reference_auxiliary3,"
"ei.machine_manufacturer_reference_auxiliary3 AS machine_manufacturer_reference_auxiliary3,"
"ei.supplier_auxiliary3 AS supplier_auxiliary3,"
"ei.quantity_auxiliary3 AS quantity_auxiliary3,"
"ei.unity_auxiliary3 AS unity_auxiliary3,"
"ei.auxiliary4 AS auxiliary4,"
"ei.description_auxiliary4 AS description_auxiliary4,"
"ei.designation_auxiliary4 AS designation_auxiliary4,"
"ei.manufacturer_auxiliary4 AS manufacturer_auxiliary4,"
"ei.manufacturer_reference_auxiliary4 AS manufacturer_reference_auxiliary4,"
"ei.machine_manufacturer_reference_auxiliary4 AS machine_manufacturer_reference_auxiliary4,"
"ei.supplier_auxiliary4 AS supplier_auxiliary4,"
"ei.quantity_auxiliary4 AS quantity_auxiliary4,"
"ei.unity_auxiliary4 AS unity_auxiliary4,"
"d.pos AS diagram_position," "d.pos AS diagram_position,"
"e.type AS element_type," "e.type AS element_type,"
"e.sub_type AS element_sub_type," "e.sub_type AS element_sub_type,"
+35
View File
@@ -45,7 +45,42 @@
* quantity -> quantity of the element * quantity -> quantity of the element
* unity -> unity of the element * unity -> unity of the element
* auxiliary1 -> auxiliary 1 of element * auxiliary1 -> auxiliary 1 of element
* description_auxiliary1
* designation_auxiliary1
* manufacturer_auxiliary1
* manufacturer_reference_auxiliary1
* machine_manufacturer_reference_auxiliary1
* supplier_auxiliary1
* quantity_auxiliary1
* unity_auxiliary1
* auxiliary2 -> auxiliary 2 of element * auxiliary2 -> auxiliary 2 of element
* description_auxiliary2
* designation_auxiliary2
* manufacturer_auxiliary2
* manufacturer_reference_auxiliary2
* machine_manufacturer_reference_auxiliary2
* supplier_auxiliary2
* quantity_auxiliary2
* unity_auxiliary2
* auxiliary3 -> auxiliary 1 of element
* description_auxiliary3
* designation_auxiliary3
* manufacturer_auxiliary3
* manufacturer_reference_auxiliary3
* machine_manufacturer_reference_auxiliary3
* supplier_auxiliary3
* quantity_auxiliary3
* unity_auxiliary3
* auxiliary4 -> auxiliary 1 of element
* description_auxiliary4
* designation_auxiliary4
* manufacturer_auxiliary4
* manufacturer_reference_auxiliary4
* machine_manufacturer_reference_auxiliary4
* supplier_auxiliary4
* quantity_auxiliary4
* unity_auxiliary4
*
* machine_manufacturer_reference -> reference of the machine manufacturer * machine_manufacturer_reference -> reference of the machine manufacturer
* supplier -> the supplier of the element * supplier -> the supplier of the element
* function -> the function of element * function -> the function of element
+14 -2
View File
@@ -44,10 +44,22 @@ QByteArray dxfToElmt(const QString &file_path)
process_.start(program, arguments); process_.start(program, arguments);
if (process_.waitForFinished()) if (process_.waitForFinished())
{ {
const auto byte_array{process_.readAll()}; const auto byte_array{process_.readAllStandardOutput()};
const auto error_output{process_.readAllStandardError()};
process_.close(); process_.close();
if (error_output.length() > 0) {
// inform the user about log-output via QMessageBox
QMessageBox msgBox;
msgBox.setIcon(QMessageBox::Critical);
msgBox.setText(QObject::tr("Dxf2elmt: \nError: Make sure the file %1 is a valid .dxf file").arg(file_path));
msgBox.setInformativeText (QObject::tr("See details here:"));
msgBox.setDetailedText(error_output);
msgBox.exec();
}
return byte_array; return byte_array;
} }
else else
@@ -97,7 +109,7 @@ bool dxf2ElmtIsPresent(bool install_dialog, QWidget *parent)
const bool exist{QFile::exists(dxf2ElmtBinaryPath())}; const bool exist{QFile::exists(dxf2ElmtBinaryPath())};
if (!exist && install_dialog) if (!exist && install_dialog)
{ {
auto string_{QStringLiteral("L'import dxf nécessite le logiciel dxf2elmt. \n" auto string_{QObject::tr("L'import dxf nécessite le logiciel dxf2elmt.\n"
"Veuillez télécharger celui-ci en suivant le lien ci dessous et le dézipper dans le dossier d'installation")}; "Veuillez télécharger celui-ci en suivant le lien ci dessous et le dézipper dans le dossier d'installation")};
ThirdPartyBinaryInstallDialog dialog_(string_, ThirdPartyBinaryInstallDialog dialog_(string_,
@@ -176,6 +176,7 @@ qreal PartTerminal::rotation() const {
case Qet::South : return 180; case Qet::South : return 180;
case Qet::West : return 270; case Qet::West : return 270;
} }
return 0;
} }
/** /**
+35 -43
View File
@@ -47,6 +47,7 @@
#include "../../newelementwizard.h" #include "../../newelementwizard.h"
#include "../editorcommands.h" #include "../editorcommands.h"
#include "../../dxf/dxftoelmt.h" #include "../../dxf/dxftoelmt.h"
#include "../../qet_elementscaler/qet_elementscaler.h"
#include "../UndoCommand/openelmtcommand.h" #include "../UndoCommand/openelmtcommand.h"
#include <QSettings> #include <QSettings>
@@ -950,39 +951,6 @@ void QETElementEditor::writeSettings() const
*/ */
void QETElementEditor::setupActions() void QETElementEditor::setupActions()
{ {
#if defined(Q_OS_WIN32) || defined(Q_OS_WIN64)
ui->m_open_dxf_action -> setStatusTip(tr("To install the plugin DXFtoQET\nVisit https://download.qelectrotech.org/qet/builds/dxf_to_elmt/\n"
"\n"
">> Install on Windows\n"
"Put DXFtoQET.exe binary on C:\\Users\\user_name\\AppData\\Roaming\\qet\\ directory \n"
));
#elif defined(Q_OS_MAC)
ui->m_open_dxf_action -> setStatusTip(tr("To install the plugin DXFtoQET\nVisit https://download.qelectrotech.org/qet/builds/dxf_to_elmt/\n"
"\n"
">> Install on macOSX\n"
"Put DXFtoQET.app binary on /Users/user_name/.qet/ directory \n"
));
#else
ui->m_open_dxf_action -> setStatusTip(tr("To install the plugin DXFtoQET\nVisit https://download.qelectrotech.org/qet/builds/dxf_to_elmt/\n"
"\n"
">> Install on Linux\n"
"Put DXFtoQET binary on your /home/user_name/.qet/ directory\n"
"make it executable : chmod +x ./DXFtoQET\n"
));
#endif
ui->m_open_dxf_action -> setWhatsThis (tr("To install the plugin DXFtoQET\nVisit https://download.qelectrotech.org/qet/builds/dxf_to_elmt/\n"
"\n"
">> Install on Linux\n"
"Put DXFtoQET binary on your /home/user_name/.qet/ directory\n"
"make it executable : chmod +x ./DXFtoQET\n"
">> Install on Windows\n"
"Put DXFtoQET.exe binary on C:\\Users\\user_name\\AppData\\Roaming\\qet\\ directory \n"
"\n"
">> Install on macOSX\n"
"Put DXFtoQET.app binary on /Users/user_name/.qet/ directory \n"
));
m_undo_action = m_elmt_scene -> undoStack().createUndoAction(this, tr("Annuler")); m_undo_action = m_elmt_scene -> undoStack().createUndoAction(this, tr("Annuler"));
m_redo_action = m_elmt_scene -> undoStack().createRedoAction(this, tr("Refaire")); m_redo_action = m_elmt_scene -> undoStack().createRedoAction(this, tr("Refaire"));
m_undo_action -> setIcon(QET::Icons::EditUndo); m_undo_action -> setIcon(QET::Icons::EditUndo);
@@ -997,7 +965,6 @@ void QETElementEditor::setupActions()
ui->m_open_from_file_action -> setShortcut(tr("Ctrl+Shift+O")); ui->m_open_from_file_action -> setShortcut(tr("Ctrl+Shift+O"));
ui->m_save_action -> setShortcut(QKeySequence::Save); ui->m_save_action -> setShortcut(QKeySequence::Save);
ui->m_save_as_file_action -> setShortcut(tr("Ctrl+Shift+S")); ui->m_save_as_file_action -> setShortcut(tr("Ctrl+Shift+S"));
ui->m_quit_action -> setShortcut(QKeySequence(tr("Ctrl+Q")));
ui->m_select_all_act -> setShortcut(QKeySequence::SelectAll); ui->m_select_all_act -> setShortcut(QKeySequence::SelectAll);
ui->m_deselect_all_action -> setShortcut(QKeySequence(tr("Ctrl+Shift+A"))); ui->m_deselect_all_action -> setShortcut(QKeySequence(tr("Ctrl+Shift+A")));
ui->m_revert_selection_action -> setShortcut(QKeySequence(tr("Ctrl+I"))); ui->m_revert_selection_action -> setShortcut(QKeySequence(tr("Ctrl+I")));
@@ -1010,8 +977,10 @@ void QETElementEditor::setupActions()
#ifndef Q_OS_MAC #ifndef Q_OS_MAC
ui->m_delete_action -> setShortcut(QKeySequence(Qt::Key_Delete)); ui->m_delete_action -> setShortcut(QKeySequence(Qt::Key_Delete));
ui->m_quit_action -> setShortcut(QKeySequence(tr("Ctrl+Q")));
#else #else
ui->m_delete_action -> setShortcut(QKeySequence(tr("Backspace"))); ui->m_delete_action -> setShortcut(QKeySequence(tr("Backspace")));
ui->m_quit_action -> setShortcut(QKeySequence(tr("Ctrl+W")));
#endif #endif
//Depth action //Depth action
@@ -1313,22 +1282,22 @@ void QETElementEditor::on_m_open_from_file_action_triggered()
openElement(user_filename); openElement(user_filename);
} }
void QETElementEditor::on_m_open_dxf_action_triggered() void QETElementEditor::on_m_open_scaled_element_action_triggered()
{ {
#ifdef TODO_LIST #ifdef TODO_LIST
# pragma message("@TODO Merge 'DXF to GET-2020' code in to Qet") # pragma message("@TODO Merge 'Element-Scaling' code into QET")
# pragma message("https://github.com/qelectrotech/DXFtoQET-2020") # pragma message("https://github.com/plc-user/QET_ElementScaler")
#endif #endif
#if defined(Q_OS_WIN32) || defined(Q_OS_WIN64) #if defined(Q_OS_WIN32) || defined(Q_OS_WIN64)
QString program = (QDir::homePath() + "/Application Data/qet/DXFtoQET.exe"); QString program = (QDir::homePath() + "/Application Data/qet/QET_ElementScaler.exe");
#elif defined(Q_OS_MAC) #elif defined(Q_OS_MAC)
QString program = (QDir::homePath() + "/.qet/DXFtoQET.app"); QString program = (QDir::homePath() + "/.qet/QET_ElementScaler.app");
#else #else
QString program = (QDir::homePath() + "/.qet/DXFtoQET"); QString program = (QDir::homePath() + "/.qet/QET_ElementScaler");
#endif #endif
QStringList arguments; QStringList arguments;
QProcess *DXF = new QProcess(qApp); QProcess *ES = new QProcess(qApp);
DXF -> start(program,arguments); ES -> start(program,arguments);
} }
bool QETElementEditor::on_m_save_as_file_action_triggered() bool QETElementEditor::on_m_save_as_file_action_triggered()
@@ -1503,7 +1472,7 @@ void QETElementEditor::on_m_import_dxf_triggered()
{ {
QString file_path{QFileDialog::getOpenFileName(this, QString file_path{QFileDialog::getOpenFileName(this,
QObject::tr("Importer un fichier dxf"), QObject::tr("Importer un fichier dxf"),
"/home", QDir::homePath(),
"DXF (*.dxf)")}; "DXF (*.dxf)")};
if (file_path.isEmpty()) { if (file_path.isEmpty()) {
return; return;
@@ -1523,3 +1492,26 @@ void QETElementEditor::on_m_import_dxf_triggered()
} }
} }
void QETElementEditor::on_m_import_scaled_element_triggered()
{
if (ElementScalerIsPresent(true, this))
{
QString file_path{QFileDialog::getOpenFileName(this,
tr("Importer un élément à redimensionner"),
QDir::homePath(),
tr("Éléments QElectroTech (*.elmt)"))};
if (file_path.isEmpty()) {
return;
}
const QByteArray array_{ElementScaler(file_path, this)};
if (array_.isEmpty()) {
return;
}
QDomDocument xml_;
xml_.setContent(array_);
m_elmt_scene->undoStack().push(new OpenElmtCommand(xml_, m_elmt_scene));
}
}
+2 -1
View File
@@ -86,7 +86,7 @@ class QETElementEditor : public QMainWindow
void on_m_new_action_triggered(); void on_m_new_action_triggered();
void on_m_open_action_triggered(); void on_m_open_action_triggered();
void on_m_open_from_file_action_triggered(); void on_m_open_from_file_action_triggered();
void on_m_open_dxf_action_triggered(); void on_m_open_scaled_element_action_triggered();
bool on_m_save_as_file_action_triggered(); bool on_m_save_as_file_action_triggered();
void on_m_reload_action_triggered(); void on_m_reload_action_triggered();
void on_m_quit_action_triggered(); void on_m_quit_action_triggered();
@@ -111,6 +111,7 @@ class QETElementEditor : public QMainWindow
void on_m_donate_action_triggered(); void on_m_donate_action_triggered();
void on_m_about_qt_action_triggered(); void on_m_about_qt_action_triggered();
void on_m_import_dxf_triggered(); void on_m_import_dxf_triggered();
void on_m_import_scaled_element_triggered();
private: private:
bool canClose(); bool canClose();
+15 -12
View File
@@ -25,7 +25,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>800</width> <width>800</width>
<height>21</height> <height>22</height>
</rect> </rect>
</property> </property>
<widget class="QMenu" name="m_file_menu"> <widget class="QMenu" name="m_file_menu">
@@ -35,8 +35,8 @@
<addaction name="m_new_action"/> <addaction name="m_new_action"/>
<addaction name="m_open_action"/> <addaction name="m_open_action"/>
<addaction name="m_open_from_file_action"/> <addaction name="m_open_from_file_action"/>
<addaction name="m_import_scaled_element"/>
<addaction name="m_import_dxf"/> <addaction name="m_import_dxf"/>
<addaction name="m_open_dxf_action"/>
<addaction name="m_save_action"/> <addaction name="m_save_action"/>
<addaction name="m_save_as_action"/> <addaction name="m_save_as_action"/>
<addaction name="m_save_as_file_action"/> <addaction name="m_save_as_file_action"/>
@@ -232,15 +232,6 @@
<string>&amp;Ouvrir depuis un fichier</string> <string>&amp;Ouvrir depuis un fichier</string>
</property> </property>
</action> </action>
<action name="m_open_dxf_action">
<property name="icon">
<iconset resource="../../../qelectrotech.qrc">
<normaloff>:/ico/16x16/run-dxf.png</normaloff>:/ico/16x16/run-dxf.png</iconset>
</property>
<property name="text">
<string>&amp;Lancer le plugin convertisseur DXF</string>
</property>
</action>
<action name="m_save_action"> <action name="m_save_action">
<property name="icon"> <property name="icon">
<iconset resource="../../../qelectrotech.qrc"> <iconset resource="../../../qelectrotech.qrc">
@@ -283,7 +274,10 @@
<normaloff>:/ico/16x16/application-exit.png</normaloff>:/ico/16x16/application-exit.png</iconset> <normaloff>:/ico/16x16/application-exit.png</normaloff>:/ico/16x16/application-exit.png</iconset>
</property> </property>
<property name="text"> <property name="text">
<string>&amp;Quitter</string> <string>&amp;Fermer cet éditeur</string>
</property>
<property name="toolTip">
<string>Fermer cet éditeur</string>
</property> </property>
</action> </action>
<action name="m_deselect_all_action"> <action name="m_deselect_all_action">
@@ -511,6 +505,15 @@
<string>Importer un dxf</string> <string>Importer un dxf</string>
</property> </property>
</action> </action>
<action name="m_import_scaled_element">
<property name="icon">
<iconset resource="../../../qelectrotech.qrc">
<normaloff>:/ico/22x22/folder-open.png</normaloff>:/ico/22x22/folder-open.png</iconset>
</property>
<property name="text">
<string>importer un élément à redimensionner</string>
</property>
</action>
</widget> </widget>
<resources> <resources>
<include location="../../../qelectrotech.qrc"/> <include location="../../../qelectrotech.qrc"/>
+2 -2
View File
@@ -219,9 +219,9 @@ void TerminalEditor::activeConnections(bool active)
{ {
if (active) { if (active) {
m_editor_connections << connect(ui->m_x_dsb, QOverload<qreal>::of(&QDoubleSpinBox::valueChanged), m_editor_connections << connect(ui->m_x_dsb, QOverload<qreal>::of(&QDoubleSpinBox::valueChanged),
this, &TerminalEditor::posEdited); [this]() { TerminalEditor::posEdited(); ui->m_x_dsb->setFocus();} ) ;
m_editor_connections << connect(ui->m_y_dsb, QOverload<qreal>::of(&QDoubleSpinBox::valueChanged), m_editor_connections << connect(ui->m_y_dsb, QOverload<qreal>::of(&QDoubleSpinBox::valueChanged),
this, &TerminalEditor::posEdited); [this]() { TerminalEditor::posEdited(); ui->m_y_dsb->setFocus(); } ) ;
m_editor_connections << connect(ui->m_orientation_cb, QOverload<int>::of(&QComboBox::activated), m_editor_connections << connect(ui->m_orientation_cb, QOverload<int>::of(&QComboBox::activated),
this, &TerminalEditor::orientationEdited); this, &TerminalEditor::orientationEdited);
m_editor_connections << connect(ui->m_name_le, &QLineEdit::editingFinished, m_editor_connections << connect(ui->m_name_le, &QLineEdit::editingFinished,
+1 -1
View File
@@ -356,7 +356,7 @@ void TextEditor::setUpWidget(QWidget *parent)
&TextEditor::on_m_color_pb_changed); &TextEditor::on_m_color_pb_changed);
gridLayout->addWidget(m_color_pb, 2, 5, 1, 1); gridLayout->addWidget(m_color_pb, 2, 5, 1, 1);
#endif #endif
QLabel *label_5 = new QLabel(parent); QLabel *label_5 = new QLabel(parent);
label_5->setObjectName(QString::fromUtf8("label_5")); label_5->setObjectName(QString::fromUtf8("label_5"));
+1
View File
@@ -117,6 +117,7 @@ void ExportPropertiesWidget::setPrintingMode(bool mode) {
format -> setVisible(!mode); format -> setVisible(!mode);
export_border -> setVisible(!mode); export_border -> setVisible(!mode);
export_elements -> setVisible(!mode); export_elements -> setVisible(!mode);
draw_bg_transparent -> setVisible(!mode);
} }
/** /**
-3
View File
@@ -271,9 +271,6 @@ void MachineInfo::init_get_cpu_info_linux()
QString linuxGPURAMOutput = linuxgpuRAM.readAllStandardOutput(); QString linuxGPURAMOutput = linuxgpuRAM.readAllStandardOutput();
pc.gpu.RAM=QString(linuxGPURAMOutput.toLocal8Bit().constData()); pc.gpu.RAM=QString(linuxGPURAMOutput.toLocal8Bit().constData());
linuxgpuRAM.close(); linuxgpuRAM.close();
} }
/** /**
+7
View File
@@ -362,6 +362,7 @@ QString ElementData::masterTypeToString(ElementData::MasterType type)
case ElementData::Commutator: case ElementData::Commutator:
return QStringLiteral("commutator"); return QStringLiteral("commutator");
} }
return QStringLiteral("coil");
} }
ElementData::MasterType ElementData::masterTypeFromString(const QString &string) ElementData::MasterType ElementData::masterTypeFromString(const QString &string)
@@ -394,6 +395,7 @@ QString ElementData::slaveTypeToString(ElementData::SlaveType type)
case ElementData::delayOnOff: case ElementData::delayOnOff:
return QStringLiteral("delayOnOff"); return QStringLiteral("delayOnOff");
} }
return QStringLiteral("simple");
} }
ElementData::SlaveType ElementData::slaveTypeFromString(const QString &string) ElementData::SlaveType ElementData::slaveTypeFromString(const QString &string)
@@ -428,6 +430,7 @@ QString ElementData::slaveStateToString(ElementData::SlaveState type)
case Other: case Other:
return QStringLiteral("Other"); return QStringLiteral("Other");
} }
return QStringLiteral("NO");
} }
ElementData::SlaveState ElementData::slaveStateFromString(const QString &string) ElementData::SlaveState ElementData::slaveStateFromString(const QString &string)
@@ -462,6 +465,7 @@ QString ElementData::terminalTypeToString(ElementData::TerminalType type)
case ElementData::TTGround: case ElementData::TTGround:
return QStringLiteral("ground"); return QStringLiteral("ground");
} }
return QStringLiteral("generic");
} }
ElementData::TerminalType ElementData::terminalTypeFromString(const QString &string) ElementData::TerminalType ElementData::terminalTypeFromString(const QString &string)
@@ -498,6 +502,7 @@ QString ElementData::translatedTerminalType(ElementData::TerminalType type)
case ElementData::TTGround: case ElementData::TTGround:
return QObject::tr("Terre", "ground terminal element type"); return QObject::tr("Terre", "ground terminal element type");
} }
return QObject::tr("Générique", "generic terminal element type");
} }
QString ElementData::terminalFunctionToString(ElementData::TerminalFunction function) QString ElementData::terminalFunctionToString(ElementData::TerminalFunction function)
@@ -510,6 +515,7 @@ QString ElementData::terminalFunctionToString(ElementData::TerminalFunction func
case ElementData::TFNeutral: case ElementData::TFNeutral:
return QStringLiteral("neutral"); return QStringLiteral("neutral");
} }
return QStringLiteral("generic");
} }
ElementData::TerminalFunction ElementData::terminalFunctionFromString(const QString &string) ElementData::TerminalFunction ElementData::terminalFunctionFromString(const QString &string)
@@ -535,6 +541,7 @@ QString ElementData::translatedTerminalFunction(ElementData::TerminalFunction fu
case TFPhase : return QObject::tr("Phase", "phase terminal element function" ); case TFPhase : return QObject::tr("Phase", "phase terminal element function" );
case TFNeutral : return QObject::tr("Neutre", "neutral terminal element function"); case TFNeutral : return QObject::tr("Neutre", "neutral terminal element function");
} }
return QObject::tr("Générique", "generic terminal element function");
} }
void ElementData::kindInfoFromXml(const QDomElement &xml_element) void ElementData::kindInfoFromXml(const QDomElement &xml_element)
+1
View File
@@ -172,6 +172,7 @@ QString TerminalData::typeToString(TerminalData::Type type)
case Outer : case Outer :
return QString("Outer"); return QString("Outer");
} }
return QString("Generic");
} }
/** /**
@@ -0,0 +1,165 @@
/*
Copyright 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 "qet_elementscaler.h"
#include "../ui/thirdpartybinaryinstalldialog.h"
#include <QFile>
#include <QProcess>
#include <QInputDialog>
#include <QMessageBox>
#include <QDir>
/**
* @brief QET_ElementScaler
* Return the scaled element from @a file_path.
* The returned value is a QByteArray, instead of a
* QDomDocument or QString, to let user do what he/she wants.
* If something goes wrong the QByteArray returned is empty.
* @param file_path
* @return
*/
QByteArray ElementScaler(const QString &file_path, QWidget *parent)
{
if (!ElementScalerIsPresent(false)) {
return QByteArray();
}
bool ok;
double fx = QInputDialog::getDouble(parent, QObject::tr("Entrer le facteur d'échelle"),
QObject::tr("Facteur X:"), 1.0, 0.1, 100, 5, &ok,
Qt::WindowFlags());
QString sFactorX = "1.0";
if (ok)
sFactorX = (QString::number(fx, 'f', 5));
else
return QByteArray();
double fy = QInputDialog::getDouble(parent, QObject::tr("Entrer le facteur d'échelle"),
QObject::tr("Facteur Y:"), fx, 0.1, 100, 5, &ok,
Qt::WindowFlags());
QString sFactorY = "1.0";
if (ok)
sFactorY = (QString::number(fy, 'f', 5));
else
return QByteArray();
const QStringList items{QObject::tr("sans"),
QObject::tr("horizontal"),
QObject::tr("vertical"),
QObject::tr("horizontal + vertical")};
QString item = QInputDialog::getItem(parent,
QObject::tr("Retourner l'élément :"),
QObject::tr("direction"), items, 0, false, &ok);
int8_t mirrorIndex = 0;
if (ok && !item.isEmpty()) {
mirrorIndex = items.indexOf(item, 0);
}
else
return QByteArray();
QProcess process_;
const QString program{ElementScalerBinaryPath()};
QStringList arguments{QStringLiteral("-x"), sFactorX,
QStringLiteral("-y"), sFactorY};
switch (mirrorIndex) {
case 1: arguments << QStringLiteral("--FlipHorizontal");
break;
case 2: arguments << QStringLiteral("--FlipVertical");
break;
case 3: arguments << QStringLiteral("--FlipHorizontal")
<< QStringLiteral("--FlipVertical");
break;
}
arguments << QStringLiteral("-o") << QStringLiteral("-f") << file_path;
process_.start(program, arguments);
if (process_.waitForFinished())
{
const auto byte_array{process_.readAllStandardOutput()};
const auto error_output{process_.readAllStandardError()};
process_.close();
if (error_output.length() > 0) {
// inform the user about log-output via QMessageBox
QMessageBox msgBox;
msgBox.setText(QObject::tr("QET_ElementScaler: \nadditional information about %1 import / scaling").arg(file_path));
msgBox.setInformativeText(QObject::tr("See details here:"));
msgBox.setDetailedText(error_output);
msgBox.exec();
}
return byte_array;
}
else
{
//If something went wrong we return an empty QByteArray
return QByteArray();
}
}
QString ElementScalerDirPath()
{
#if defined(Q_OS_WIN32) || defined(Q_OS_WIN64)
return (QDir::homePath() + QStringLiteral("/Application Data/qet/binary"));
#elif defined(Q_OS_MACOS)
return (QDir::homePath() + QStringLiteral("/.qet/binary"));
#else
return (QDir::homePath() + QStringLiteral("/.qet/binary"));
#endif
}
/**
* @brief ElementScalerBinaryPath
* @return the path to the QET_ElementScaler program
*/
QString ElementScalerBinaryPath()
{
#if defined(Q_OS_WIN32) || defined(Q_OS_WIN64)
return ElementScalerDirPath() + QStringLiteral("/QET_ElementScaler.exe");
#elif defined(Q_OS_MACOS)
return ElementScalerDirPath() + QStringLiteral("/./QET_ElementScaler");
#else
return ElementScalerDirPath() + QStringLiteral("/QET_ElementScaler");
#endif
}
/**
* @brief ElementScalerIsPresent
* Return true if QET_ElementScaler is present in the system
* @param install_dialog
* True to display a dialog with the explanations
* of how to install the QET_ElementScaler program
* if not present in the system.
* @return
*/
bool ElementScalerIsPresent(bool install_dialog, QWidget *parent)
{
const bool exist{QFile::exists(ElementScalerBinaryPath())};
if (!exist && install_dialog)
{
auto string_{QObject::tr("Le logiciel QET_ElementScaler est nécessaire pour mettre les éléments à l'échelle.\n"
"Veuillez télécharger celui-ci en suivant le lien ci dessous et le dézipper dans le dossier d'installation")};
ThirdPartyBinaryInstallDialog dialog_(string_,
QStringLiteral("https://github.com/plc-user/QET_ElementScaler/releases"),
ElementScalerDirPath(),
parent);
dialog_.exec();
}
return exist;
}
@@ -0,0 +1,30 @@
/*
Copyright 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 QET_ELEMENTSCALER_H
#define QET_ELEMENTSCALER_H
#include <QByteArray>
class QWidget;
QByteArray ElementScaler(const QString &file_path, QWidget *parent);
QString ElementScalerDirPath();
QString ElementScalerBinaryPath();
bool ElementScalerIsPresent(bool install_dialog = true, QWidget *parent = nullptr);
#endif // QET_ELEMENTSCALER_H
+7 -12
View File
@@ -1558,7 +1558,9 @@ void QETDiagramEditor::slot_updateActions()
m_csv_export -> setEnabled(editable_project); m_csv_export -> setEnabled(editable_project);
m_project_export_conductor_num-> setEnabled(opened_project); m_project_export_conductor_num-> setEnabled(opened_project);
m_terminal_strip_dialog -> setEnabled(editable_project); m_terminal_strip_dialog -> setEnabled(editable_project);
#ifdef QET_EXPORT_PROJECT_DB
m_export_project_db -> setEnabled(editable_project); m_export_project_db -> setEnabled(editable_project);
#endif
m_project_terminalBloc -> setEnabled(editable_project); m_project_terminalBloc -> setEnabled(editable_project);
@@ -2378,33 +2380,26 @@ void QETDiagramEditor::generateTerminalBlock()
success = process->startDetached(QDir::homePath() + "/qet_tb_generator.exe", {("")}); success = process->startDetached(QDir::homePath() + "/qet_tb_generator.exe", {("")});
} }
#elif defined(Q_OS_MACOS) #elif defined(Q_OS_MACOS)
if (openedProjects().count()){ if (openedProjects().count()){
success = process->startDetached("/Library/Frameworks/Python.framework/Versions/3.11/bin/qet_tb_generator", {(QETDiagramEditor::currentProjectView()->project()->filePath())}); success = process->startDetached("/Library/Frameworks/Python.framework/Versions/3.11/bin/qet_tb_generator", {(QETDiagramEditor::currentProjectView()->project()->filePath())});
} }
else { else {
success = process->startDetached("/Library/Frameworks/Python.framework/Versions/3.11/bin/qet_tb_generator", {("")});
}
if (openedProjects().count()){
success = process->startDetached(QDir::homePath() + "/.qet/qet_tb_generator.app", {(QETDiagramEditor::currentProjectView()->project()->filePath())}); success = process->startDetached(QDir::homePath() + "/.qet/qet_tb_generator.app", {(QETDiagramEditor::currentProjectView()->project()->filePath())});
} }
else {
success = process->startDetached(QDir::homePath() + "/.qet/qet_tb_generator.app", {("")});
}
#else #else
if (openedProjects().count()){ if (openedProjects().count()){
success = process->startDetached("qet_tb_generator", {(QETDiagramEditor::currentProjectView()->project()->filePath())}); success = process->startDetached("qet_tb_generator", {(QETDiagramEditor::currentProjectView()->project()->filePath())});
} }
else { else {
success = process->startDetached("qet_tb_generator", {("")});
}
if (openedProjects().count()){
success = process->startDetached(QDir::homePath() + "/.qet/qet_tb_generator", {(QETDiagramEditor::currentProjectView()->project()->filePath())}); success = process->startDetached(QDir::homePath() + "/.qet/qet_tb_generator", {(QETDiagramEditor::currentProjectView()->project()->filePath())});
} }
else {
success = process->startDetached(QDir::homePath() + "/.qet/qet_tb_generator", {("")});
}
#endif #endif
#if defined(Q_OS_WIN32) || defined(Q_OS_WIN64) #if defined(Q_OS_WIN32) || defined(Q_OS_WIN64)
+16
View File
@@ -1047,7 +1047,15 @@ QDomElement Conductor::toXml(QDomDocument &dom_document,
dom_element.setAttribute("terminal1", table_adr_id.value(terminal1)); // for backward compatibility dom_element.setAttribute("terminal1", table_adr_id.value(terminal1)); // for backward compatibility
} else { } else {
dom_element.setAttribute("element1", terminal1->parentElement()->uuid().toString()); dom_element.setAttribute("element1", terminal1->parentElement()->uuid().toString());
dom_element.setAttribute("element1_label", terminal1->parentElement()->actualLabel());
if (terminal1->parentElement()->linkedElements().isEmpty()) {
//
} else {
dom_element.setAttribute("element1_linked", terminal1->parentElement()->linkedElements().last()->actualLabel());
}
dom_element.setAttribute("element1_name", terminal1->parentElement()->name());
dom_element.setAttribute("terminal1", terminal1->uuid().toString()); dom_element.setAttribute("terminal1", terminal1->uuid().toString());
dom_element.setAttribute("terminalname1", terminal1->name());
} }
if (terminal2->uuid().isNull()) { if (terminal2->uuid().isNull()) {
@@ -1055,7 +1063,15 @@ QDomElement Conductor::toXml(QDomDocument &dom_document,
dom_element.setAttribute("terminal2", table_adr_id.value(terminal2)); // for backward compatibility dom_element.setAttribute("terminal2", table_adr_id.value(terminal2)); // for backward compatibility
} else { } else {
dom_element.setAttribute("element2", terminal2->parentElement()->uuid().toString()); dom_element.setAttribute("element2", terminal2->parentElement()->uuid().toString());
dom_element.setAttribute("element2_label", terminal2->parentElement()->actualLabel());
if (terminal2->parentElement()->linkedElements().isEmpty()) {
//
} else {
dom_element.setAttribute("element2_linked", terminal2->parentElement()->linkedElements().last()->actualLabel());
}
dom_element.setAttribute("element2_name", terminal2->parentElement()->name());
dom_element.setAttribute("terminal2", terminal2->uuid().toString()); dom_element.setAttribute("terminal2", terminal2->uuid().toString());
dom_element.setAttribute("terminalname2", terminal2->name());
} }
dom_element.setAttribute("freezeLabel", m_freeze_label? "true" : "false"); dom_element.setAttribute("freezeLabel", m_freeze_label? "true" : "false");
+5
View File
@@ -744,6 +744,11 @@ QUuid Terminal::uuid() const
return d->m_uuid; return d->m_uuid;
} }
QString Terminal::name() const
{
return d->m_name;
}
/** /**
@brief Conductor::relatedPotentialTerminal @brief Conductor::relatedPotentialTerminal
Return terminal at the same potential from the same Return terminal at the same potential from the same
+1
View File
@@ -74,6 +74,7 @@ class Terminal : public QGraphicsObject
Diagram *diagram () const; Diagram *diagram () const;
Element *parentElement () const; Element *parentElement () const;
QUuid uuid () const; QUuid uuid () const;
QString name () const;
QList<Conductor *> conductors() const; QList<Conductor *> conductors() const;
Qet::Orientation orientation() const; Qet::Orientation orientation() const;
+113 -6
View File
@@ -146,8 +146,6 @@ QStringList QETInformation::elementInfoKeys()
ELMT_LOCATION, ELMT_LOCATION,
ELMT_COMMENT, ELMT_COMMENT,
ELMT_FUNCTION, ELMT_FUNCTION,
ELMT_AUX1,
ELMT_AUX2,
ELMT_DESCRIPTION, ELMT_DESCRIPTION,
ELMT_DESIGNATION, ELMT_DESIGNATION,
ELMT_MANUFACTURER, ELMT_MANUFACTURER,
@@ -155,7 +153,43 @@ QStringList QETInformation::elementInfoKeys()
ELMT_MACHINE_MANUFACTURER_REF, ELMT_MACHINE_MANUFACTURER_REF,
ELMT_SUPPLIER, ELMT_SUPPLIER,
ELMT_QUANTITY, ELMT_QUANTITY,
ELMT_UNITY }; ELMT_UNITY,
ELMT_AUX1,
ELMT_DESCRIPTION_AUX1,
ELMT_DESIGNATION_AUX1,
ELMT_MANUFACTURER_AUX1,
ELMT_MANUFACTURER_REF_AUX1,
ELMT_MACHINE_MANUFACTURER_REF_AUX1,
ELMT_SUPPLIER_AUX1,
ELMT_QUANTITY_AUX1,
ELMT_UNITY_AUX1,
ELMT_AUX2,
ELMT_DESCRIPTION_AUX2,
ELMT_DESIGNATION_AUX2,
ELMT_MANUFACTURER_AUX2,
ELMT_MANUFACTURER_REF_AUX2,
ELMT_MACHINE_MANUFACTURER_REF_AUX2,
ELMT_SUPPLIER_AUX2,
ELMT_QUANTITY_AUX2,
ELMT_UNITY_AUX2,
ELMT_AUX3,
ELMT_DESCRIPTION_AUX3,
ELMT_DESIGNATION_AUX3,
ELMT_MANUFACTURER_AUX3,
ELMT_MANUFACTURER_REF_AUX3,
ELMT_MACHINE_MANUFACTURER_REF_AUX3,
ELMT_SUPPLIER_AUX3,
ELMT_QUANTITY_AUX3,
ELMT_UNITY_AUX3,
ELMT_AUX4,
ELMT_DESCRIPTION_AUX4,
ELMT_DESIGNATION_AUX4,
ELMT_MANUFACTURER_AUX4,
ELMT_MANUFACTURER_REF_AUX4,
ELMT_MACHINE_MANUFACTURER_REF_AUX4,
ELMT_SUPPLIER_AUX4,
ELMT_QUANTITY_AUX4,
ELMT_UNITY_AUX4, };
return list; return list;
} }
@@ -220,8 +254,6 @@ QString QETInformation::translatedInfoKey(const QString &info)
else if (info == ELMT_LABEL) return QObject::tr("Label"); else if (info == ELMT_LABEL) return QObject::tr("Label");
else if (info == ELMT_COMMENT) return QObject::tr("Commentaire"); else if (info == ELMT_COMMENT) return QObject::tr("Commentaire");
else if (info == ELMT_FUNCTION) return QObject::tr("Fonction"); else if (info == ELMT_FUNCTION) return QObject::tr("Fonction");
else if (info == ELMT_AUX1) return QObject::tr("Bloc auxiliaire 1");
else if (info == ELMT_AUX2) return QObject::tr("Bloc auxiliaire 2");
else if (info == ELMT_DESCRIPTION) return QObject::tr("Description textuelle"); else if (info == ELMT_DESCRIPTION) return QObject::tr("Description textuelle");
else if (info == ELMT_DESIGNATION) return QObject::tr("Numéro d'article"); else if (info == ELMT_DESIGNATION) return QObject::tr("Numéro d'article");
else if (info == ELMT_MANUFACTURER) return QObject::tr("Fabricant"); else if (info == ELMT_MANUFACTURER) return QObject::tr("Fabricant");
@@ -237,6 +269,42 @@ QString QETInformation::translatedInfoKey(const QString &info)
else if (info == COND_SECTION) return QObject::tr("Section du fil"); else if (info == COND_SECTION) return QObject::tr("Section du fil");
else if (info == COND_TEXT) return QObject::tr("Texte"); else if (info == COND_TEXT) return QObject::tr("Texte");
else if (info == COND_FORMULA) return QObject::tr("Formule du texte"); else if (info == COND_FORMULA) return QObject::tr("Formule du texte");
else if (info == ELMT_AUX1) return QObject::tr("Bloc auxiliaire 1");
else if (info == ELMT_DESCRIPTION_AUX1) return QObject::tr("Description textuelle auxiliaire 1");
else if (info == ELMT_DESIGNATION_AUX1) return QObject::tr("Numéro d'article auxiliaire 1");
else if (info == ELMT_MANUFACTURER_AUX1) return QObject::tr("Fabricant auxiliaire 1");
else if (info == ELMT_MANUFACTURER_REF_AUX1) return QObject::tr("Numéro de commande auxiliaire 1");
else if (info == ELMT_MACHINE_MANUFACTURER_REF_AUX1) return QObject::tr("Numéro interne auxiliaire 1");
else if (info == ELMT_SUPPLIER_AUX1) return QObject::tr("Fournisseur auxiliaire 1");
else if (info == ELMT_QUANTITY_AUX1) return QObject::tr("Quantité auxiliaire 1");
else if (info == ELMT_UNITY_AUX1) return QObject::tr("Unité auxiliaire 1");
else if (info == ELMT_AUX2) return QObject::tr("Bloc auxiliaire 2");
else if (info == ELMT_DESCRIPTION_AUX2) return QObject::tr("Description textuelle auxiliaire 2");
else if (info == ELMT_DESIGNATION_AUX2) return QObject::tr("Numéro d'article auxiliaire 2");
else if (info == ELMT_MANUFACTURER_AUX2) return QObject::tr("Fabricant auxiliaire 2");
else if (info == ELMT_MANUFACTURER_REF_AUX2) return QObject::tr("Numéro de commande auxiliaire 2");
else if (info == ELMT_MACHINE_MANUFACTURER_REF_AUX2) return QObject::tr("Numéro interne auxiliaire 2");
else if (info == ELMT_SUPPLIER_AUX2) return QObject::tr("Fournisseur auxiliaire 2");
else if (info == ELMT_QUANTITY_AUX2) return QObject::tr("Quantité auxiliaire 2");
else if (info == ELMT_UNITY_AUX2) return QObject::tr("Unité auxiliaire 2");
else if (info == ELMT_AUX3) return QObject::tr("Bloc auxiliaire 3");
else if (info == ELMT_DESCRIPTION_AUX3) return QObject::tr("Description textuelle auxiliaire 3");
else if (info == ELMT_DESIGNATION_AUX3) return QObject::tr("Numéro d'article auxiliaire 3");
else if (info == ELMT_MANUFACTURER_AUX3) return QObject::tr("Fabricant auxiliaire 3");
else if (info == ELMT_MANUFACTURER_REF_AUX3) return QObject::tr("Numéro de commande auxiliaire 3");
else if (info == ELMT_MACHINE_MANUFACTURER_REF_AUX3) return QObject::tr("Numéro interne auxiliaire 3");
else if (info == ELMT_SUPPLIER_AUX3) return QObject::tr("Fournisseur auxiliaire 3");
else if (info == ELMT_QUANTITY_AUX3) return QObject::tr("Quantité auxiliaire 3");
else if (info == ELMT_UNITY_AUX3) return QObject::tr("Unité auxiliaire 3");
else if (info == ELMT_AUX4) return QObject::tr("Bloc auxiliaire 4");
else if (info == ELMT_DESCRIPTION_AUX4) return QObject::tr("Description textuelle auxiliaire 4");
else if (info == ELMT_DESIGNATION_AUX4) return QObject::tr("Numéro d'article auxiliaire 4");
else if (info == ELMT_MANUFACTURER_AUX4) return QObject::tr("Fabricant auxiliaire 4");
else if (info == ELMT_MANUFACTURER_REF_AUX4) return QObject::tr("Numéro de commande auxiliaire 4");
else if (info == ELMT_MACHINE_MANUFACTURER_REF_AUX4) return QObject::tr("Numéro interne auxiliaire 4");
else if (info == ELMT_SUPPLIER_AUX4) return QObject::tr("Fournisseur auxiliaire 4");
else if (info == ELMT_QUANTITY_AUX4) return QObject::tr("Quantité auxiliaire 4");
else if (info == ELMT_UNITY_AUX4) return QObject::tr("Unité auxiliaire 4");
else return QString(); else return QString();
} }
@@ -245,14 +313,53 @@ QStringList QETInformation::elementEditorElementInfoKeys()
QStringList list = { ELMT_LABEL, QStringList list = { ELMT_LABEL,
ELMT_PLANT, ELMT_PLANT,
ELMT_COMMENT, ELMT_COMMENT,
ELMT_FUNCTION,
ELMT_DESCRIPTION, ELMT_DESCRIPTION,
ELMT_DESIGNATION, ELMT_DESIGNATION,
ELMT_MANUFACTURER, ELMT_MANUFACTURER,
ELMT_MANUFACTURER_REF, ELMT_MANUFACTURER_REF,
ELMT_MACHINE_MANUFACTURER_REF,
ELMT_SUPPLIER, ELMT_SUPPLIER,
ELMT_QUANTITY, ELMT_QUANTITY,
ELMT_UNITY, ELMT_UNITY,
ELMT_MACHINE_MANUFACTURER_REF}; ELMT_LOCATION,
ELMT_PLANT,
ELMT_AUX1,
ELMT_DESCRIPTION_AUX1,
ELMT_DESIGNATION_AUX1,
ELMT_MANUFACTURER_AUX1,
ELMT_MANUFACTURER_REF_AUX1,
ELMT_MACHINE_MANUFACTURER_REF_AUX1,
ELMT_SUPPLIER_AUX1,
ELMT_QUANTITY_AUX1,
ELMT_UNITY_AUX1,
ELMT_AUX2,
ELMT_DESCRIPTION_AUX2,
ELMT_DESIGNATION_AUX2,
ELMT_MANUFACTURER_AUX2,
ELMT_MANUFACTURER_REF_AUX2,
ELMT_MACHINE_MANUFACTURER_REF_AUX2,
ELMT_SUPPLIER_AUX2,
ELMT_QUANTITY_AUX2,
ELMT_UNITY_AUX2,
ELMT_AUX3,
ELMT_DESCRIPTION_AUX3,
ELMT_DESIGNATION_AUX3,
ELMT_MANUFACTURER_AUX3,
ELMT_MANUFACTURER_REF_AUX3,
ELMT_MACHINE_MANUFACTURER_REF_AUX3,
ELMT_SUPPLIER_AUX3,
ELMT_QUANTITY_AUX3,
ELMT_UNITY_AUX3,
ELMT_AUX4,
ELMT_DESCRIPTION_AUX4,
ELMT_DESIGNATION_AUX4,
ELMT_MANUFACTURER_AUX4,
ELMT_MANUFACTURER_REF_AUX4,
ELMT_MACHINE_MANUFACTURER_REF_AUX4,
ELMT_SUPPLIER_AUX4,
ELMT_QUANTITY_AUX4,
ELMT_UNITY_AUX4 };
return list; return list;
} }
+38 -3
View File
@@ -22,7 +22,7 @@
#include <QHash> #include <QHash>
/** /**
* Inside this namespace you will fin all information used in QElectrotech for * Inside this namespace you will find all information used in QElectrotech for
* element, conductor and diagram. * element, conductor and diagram.
* Each information have 3 values : * Each information have 3 values :
* #1 the info key = the key of an information as a QString used in the code (example : label) * #1 the info key = the key of an information as a QString used in the code (example : label)
@@ -37,8 +37,6 @@ namespace QETInformation
static QString ELMT_FORMULA = "formula"; static QString ELMT_FORMULA = "formula";
static QString ELMT_COMMENT = "comment"; static QString ELMT_COMMENT = "comment";
static QString ELMT_FUNCTION = "function"; static QString ELMT_FUNCTION = "function";
static QString ELMT_AUX1 = "auxiliary1";
static QString ELMT_AUX2 = "auxiliary2";
static QString ELMT_DESCRIPTION = "description"; static QString ELMT_DESCRIPTION = "description";
static QString ELMT_DESIGNATION = "designation"; static QString ELMT_DESIGNATION = "designation";
static QString ELMT_MANUFACTURER = "manufacturer"; static QString ELMT_MANUFACTURER = "manufacturer";
@@ -49,6 +47,43 @@ namespace QETInformation
static QString ELMT_UNITY = "unity"; static QString ELMT_UNITY = "unity";
static QString ELMT_PLANT = "plant"; static QString ELMT_PLANT = "plant";
static QString ELMT_LOCATION = "location"; static QString ELMT_LOCATION = "location";
static QString ELMT_AUX1 = "auxiliary1";
static QString ELMT_DESCRIPTION_AUX1 = "description_auxiliary1";
static QString ELMT_DESIGNATION_AUX1 = "designation_auxiliary1 ";
static QString ELMT_MANUFACTURER_AUX1 = "manufacturer_auxiliary1";
static QString ELMT_MANUFACTURER_REF_AUX1 = "manufacturer_reference_auxiliary1";
static QString ELMT_MACHINE_MANUFACTURER_REF_AUX1 = "machine_manufacturer_reference_auxiliary1 ";
static QString ELMT_SUPPLIER_AUX1 = "supplier_auxiliary1 ";
static QString ELMT_QUANTITY_AUX1 = "quantity_auxiliary1 ";
static QString ELMT_UNITY_AUX1 = "unity_auxiliary1";
static QString ELMT_AUX2 = "auxiliary2";
static QString ELMT_DESCRIPTION_AUX2 = "description_auxiliary2";
static QString ELMT_DESIGNATION_AUX2 = "designation_auxiliary2 ";
static QString ELMT_MANUFACTURER_AUX2 = "manufacturer_auxiliary2";
static QString ELMT_MANUFACTURER_REF_AUX2 = "manufacturer_reference_auxiliary2";
static QString ELMT_MACHINE_MANUFACTURER_REF_AUX2 = "machine_manufacturer_reference_auxiliary2";
static QString ELMT_SUPPLIER_AUX2 = "supplier_auxiliary2 ";
static QString ELMT_QUANTITY_AUX2 = "quantity_auxiliary2 ";
static QString ELMT_UNITY_AUX2 = "unity_auxiliary2";
static QString ELMT_AUX3 = "auxiliary3";
static QString ELMT_DESCRIPTION_AUX3 = "description_auxiliary3";
static QString ELMT_DESIGNATION_AUX3 = "designation_auxiliary3 ";
static QString ELMT_MANUFACTURER_AUX3 = "manufacturer_auxiliary3";
static QString ELMT_MANUFACTURER_REF_AUX3 = "manufacturer_reference_auxiliary3";
static QString ELMT_MACHINE_MANUFACTURER_REF_AUX3 = "machine_manufacturer_reference_auxiliary3 ";
static QString ELMT_SUPPLIER_AUX3 = "supplier_auxiliary3 ";
static QString ELMT_QUANTITY_AUX3 = "quantity_auxiliary3 ";
static QString ELMT_UNITY_AUX3 = "unity_auxiliary3";
static QString ELMT_AUX4 = "auxiliary4";
static QString ELMT_DESCRIPTION_AUX4 = "description_auxiliary4";
static QString ELMT_DESIGNATION_AUX4 = "designation_auxiliary4 ";
static QString ELMT_MANUFACTURER_AUX4 = "manufacturer_auxiliary4";
static QString ELMT_MANUFACTURER_REF_AUX4 = "manufacturer_reference_auxiliary4";
static QString ELMT_MACHINE_MANUFACTURER_REF_AUX4 = "machine_manufacturer_reference_auxiliary4 ";
static QString ELMT_SUPPLIER_AUX4 = "supplier_auxiliary4 ";
static QString ELMT_QUANTITY_AUX4 = "quantity_auxiliary4 ";
static QString ELMT_UNITY_AUX4 = "unity_auxiliary4";
/** Default information related to conductor **/ /** Default information related to conductor **/
static QString COND_FUNCTION = "function"; static QString COND_FUNCTION = "function";
+2 -2
View File
@@ -115,12 +115,12 @@ void QETMainWindow::initCommonActions()
upgrade_M -> setStatusTip(tr("Lance le navigateur par défaut vers le dépot Nightly en ligne de QElectroTech", "status bar tip")); upgrade_M -> setStatusTip(tr("Lance le navigateur par défaut vers le dépot Nightly en ligne de QElectroTech", "status bar tip"));
connect(upgrade_, &QAction::triggered, [](bool) { connect(upgrade_, &QAction::triggered, [](bool) {
QString link = "https://qelectrotech.org/download_windows_QET.html"; QString link = "https://qelectrotech.org/download_windows.php";
QDesktopServices::openUrl(QUrl(link)); QDesktopServices::openUrl(QUrl(link));
}); });
connect(upgrade_M, &QAction::triggered, [](bool) { connect(upgrade_M, &QAction::triggered, [](bool) {
QString link = "https://qelectrotech.org/download_mac_QET.html"; QString link = "https://qelectrotech.org/download_mac.php";
QDesktopServices::openUrl(QUrl(link)); QDesktopServices::openUrl(QUrl(link));
}); });
+1 -1
View File
@@ -510,7 +510,7 @@ void QETProject::setDefaultTitleBlockProperties(const TitleBlockProperties &titl
collection = QETApp::commonTitleBlockTemplatesCollection(); collection = QETApp::commonTitleBlockTemplatesCollection();
break; break;
case QET::Company : case QET::Company :
// collection = QETApp::companyTitleBlockTemplatesCollection(); collection = QETApp::companyTitleBlockTemplatesCollection();
break; break;
case QET::Custom : case QET::Custom :
collection = QETApp::customTitleBlockTemplatesCollection(); collection = QETApp::customTitleBlockTemplatesCollection();
+3 -1
View File
@@ -91,7 +91,7 @@ void AboutQETDialog::setAuthors()
addAuthor(ui->m_author_label, "Ronny Desmedt", "r.desmedt@live.be", tr("Convertisseur DXF")); addAuthor(ui->m_author_label, "Ronny Desmedt", "r.desmedt@live.be", tr("Convertisseur DXF"));
addAuthor(ui->m_author_label, "Raul Roda", "raulroda8@gmail.com", tr("Plugin Bornier")); addAuthor(ui->m_author_label, "Raul Roda", "raulroda8@gmail.com", tr("Plugin Bornier"));
addAuthor(ui->m_author_label, "Abhishek Bansal", "abhishek@qelectrotech.org", tr("Développement")); addAuthor(ui->m_author_label, "Abhishek Bansal", "abhishek@qelectrotech.org", tr("Développement"));
addAuthor(ui->m_author_label, "Simon De Backer", "debacker@qelectrotech.org", tr("Développement")); addAuthor(ui->m_author_label, "Simon De Backer", "debacker@qelectrotech.org", tr("Développement"));
addAuthor(ui->m_author_label, "David Varley", "David.Varley@cborn.com", tr("Développement")); addAuthor(ui->m_author_label, "David Varley", "David.Varley@cborn.com", tr("Développement"));
addAuthor(ui->m_author_label, "Damian Caceres", "damiancaceresmoreno@yahoo.es", tr("Développement")); addAuthor(ui->m_author_label, "Damian Caceres", "damiancaceresmoreno@yahoo.es", tr("Développement"));
addAuthor(ui->m_author_label, "Martin Marmsoler", "martin.marmsoler@gmail.com", tr("Développement")); addAuthor(ui->m_author_label, "Martin Marmsoler", "martin.marmsoler@gmail.com", tr("Développement"));
@@ -218,6 +218,7 @@ void AboutQETDialog::setLoginfo()
{ {
ui->m_log_comboBox->addItem(fileInfo.absoluteFilePath()); ui->m_log_comboBox->addItem(fileInfo.absoluteFilePath());
} }
ui->m_log_comboBox->setCurrentIndex(ui->m_log_comboBox->count() - 1);
} }
/** /**
@@ -263,4 +264,5 @@ void AboutQETDialog::on_m_log_comboBox_currentTextChanged(const QString &arg1)
ui->m_log_textEdit->setPlainText(log_File.readAll()); ui->m_log_textEdit->setPlainText(log_File.readAll());
} }
log_File.close(); log_File.close();
ui->m_log_textEdit->moveCursor(QTextCursor::End);
} }
+1
View File
@@ -57,6 +57,7 @@ NewDiagramPage::NewDiagramPage(QETProject *project,
// default titleblock properties // default titleblock properties
QList <TitleBlockTemplatesCollection *> c; QList <TitleBlockTemplatesCollection *> c;
c << QETApp::commonTitleBlockTemplatesCollection() c << QETApp::commonTitleBlockTemplatesCollection()
<< QETApp::companyTitleBlockTemplatesCollection()
<< QETApp::customTitleBlockTemplatesCollection(); << QETApp::customTitleBlockTemplatesCollection();
if (m_project) c << m_project->embeddedTitleBlockTemplatesCollection(); if (m_project) c << m_project->embeddedTitleBlockTemplatesCollection();
ipw = new TitleBlockPropertiesWidget( ipw = new TitleBlockPropertiesWidget(
@@ -1,4 +1,4 @@
/* /*
Copyright 2006-2024 The QElectroTech Team Copyright 2006-2024 The QElectroTech Team
This file is part of QElectroTech. This file is part of QElectroTech.
+2 -2
View File
@@ -970,7 +970,7 @@ QModelIndex DynamicElementTextModel::indexFromGroup(
/** /**
@brief DynamicElementTextModel::indexIsText @brief DynamicElementTextModel::indexIsText
@param index @param index
@return True if index represente a text, both for the column 0 and 1. @return True if index represents a text, both for the column 0 and 1.
Return false if index is a child of an index associated to a text. Return false if index is a child of an index associated to a text.
*/ */
bool DynamicElementTextModel::indexIsText(const QModelIndex &index) const bool DynamicElementTextModel::indexIsText(const QModelIndex &index) const
@@ -1000,7 +1000,7 @@ bool DynamicElementTextModel::indexIsText(const QModelIndex &index) const
/** /**
@brief DynamicElementTextModel::indexIsGroup @brief DynamicElementTextModel::indexIsGroup
@param index @param index
@return True if index represente a group, both for the column 0 and 1. @return True if index represents a group, both for the column 0 and 1.
Return false if index is a child of an index associated to a group. Return false if index is a child of an index associated to a group.
*/ */
bool DynamicElementTextModel::indexIsGroup(const QModelIndex &index) const bool DynamicElementTextModel::indexIsGroup(const QModelIndex &index) const
+1 -1
View File
@@ -49,7 +49,7 @@ TitleBlockPropertiesWidget::TitleBlockPropertiesWidget(
/** /**
@brief TitleBlockPropertiesWidget::TitleBlockPropertiesWidget @brief TitleBlockPropertiesWidget::TitleBlockPropertiesWidget
default constructor with tempalte list default constructor with template list
@param tbt_collection template list @param tbt_collection template list
@param titleblock properties to edit @param titleblock properties to edit
@param current_date if true, display the radio button "current date" @param current_date if true, display the radio button "current date"