mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-06-13 16:23:14 +02:00
Compare commits
111 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| dd3cee5d8e | |||
| 6dcb6ebcb7 | |||
| a9f5e2945b | |||
| 732d317e81 | |||
| 2b77964881 | |||
| 5702ed3d04 | |||
| a2c1c5515a | |||
| 8b66709ea3 | |||
| e6d995c190 | |||
| c1706cb055 | |||
| fe3ffd890b | |||
| 8b5a4cea0d | |||
| ca48684b39 | |||
| c4fd1efb4f | |||
| fc0dcb6ab0 | |||
| e02ad585a9 | |||
| 75cd943dbd | |||
| e6d3121a32 | |||
| 429726f463 | |||
| b9c9d0e31f | |||
| 7918cbb7ab | |||
| 1454a8d4e7 | |||
| 35018ba314 | |||
| 3bf4c852c9 | |||
| a118c33f80 | |||
| 326387895a | |||
| 566e7f7004 | |||
| 625e673385 | |||
| 1863329ca0 | |||
| e83424459c | |||
| 59253019ff | |||
| c66b873631 | |||
| b2a999cec5 | |||
| f1cb63cf0c | |||
| 4138b8998c | |||
| 24929861ba | |||
| fcd2f68f68 | |||
| f0b0af9a76 | |||
| 6a7f24a2af | |||
| 59e06a4087 | |||
| 3738c79ec6 | |||
| 4871aae59d | |||
| 8649d21298 | |||
| de41f29e6b | |||
| f1a8c00028 | |||
| e4f5e8c68a | |||
| 1649e8d28b | |||
| 5e3ca46133 | |||
| a162f158ad | |||
| 6aebbfeaa7 | |||
| 5d725f6d55 | |||
| 85d10fc0e6 | |||
| 1baf9db799 | |||
| 32c0e04c56 | |||
| 57b5819f07 | |||
| 7c5e0135a6 | |||
| 7d8734e192 | |||
| 30184bdd06 | |||
| 1062d217f0 | |||
| 6cad599664 | |||
| cbd309ec5a | |||
| 23c4ba2a3e | |||
| dd03f0eece | |||
| 491b8ce64c | |||
| 2d8dd2b480 | |||
| fda314d585 | |||
| f9073ca5fb | |||
| 36da291be6 | |||
| 4da78939d0 | |||
| a942f42927 | |||
| e9e2ea5b0e | |||
| 701265e393 | |||
| 073763d9bf | |||
| ca7dc28ecf | |||
| a70cc75504 | |||
| 6cc297def1 | |||
| 1baf9125dc | |||
| 78bae2dc60 | |||
| d0a10ef9af | |||
| c6bc23addc | |||
| 9a7da28fc5 | |||
| dd7f295f5c | |||
| 774b604b50 | |||
| e36df6f7d2 | |||
| 9076d9da80 | |||
| c7d6312997 | |||
| 5492cd3f71 | |||
| 9b4bbfbf0d | |||
| b20456d0d6 | |||
| 69338962bc | |||
| 78005f812a | |||
| 3479b98242 | |||
| f4f28b83bd | |||
| 4c8e7f4856 | |||
| ba1123cf73 | |||
| b3ac3c82af | |||
| e9448be986 | |||
| f72a2545bd | |||
| 206a48a15f | |||
| f33ea64b99 | |||
| 0d44933432 | |||
| fa68d545d0 | |||
| 171f2eab4e | |||
| ce86e18664 | |||
| 17030aaa80 | |||
| 09b1c0905e | |||
| b453832d46 | |||
| 109efa03d2 | |||
| 99a8b5f46d | |||
| d8b7fc3642 | |||
| 5f7f72f292 |
@@ -7,8 +7,6 @@
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Permission is not granted to use this software or any of the associated files
|
||||
as sample data for the purposes of building machine learning models.
|
||||
|
||||
Preamble
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ The main goal of the developers is to provide a libre, easy to use and effective
|
||||
The current stable version is 0.90 and was released on 2023.01.06.
|
||||
Once it has been officially released, the stable version is always frozen and is no longer developed.
|
||||
|
||||
New functionalities, bug and issue fixings are further made in the development version (currently 0.100), which can also be [downloaded](https://qelectrotech.org/download.html).
|
||||
New functionalities, bug and issue fixings are further made in the development version (currently 0.100), which can also be [downloaded](https://qelectrotech.org/download.php).
|
||||
|
||||
Users who want to test and take benefits from the last software implementations should use the development version. But... use it at your own risk, since things are sometimes broken or only partially implemented until they are done!
|
||||
|
||||
@@ -26,10 +26,7 @@ Users who want to test and take benefits from the last software implementations
|
||||
|
||||
The software is licensed under [GNU/GPL](https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html).
|
||||
You are free to use, copy, modify and redistribute it under the terms of the license.
|
||||
```txt
|
||||
Permission is not granted to use this software or any of the associated files
|
||||
as sample data for the purposes of building machine learning models.
|
||||
```
|
||||
|
||||
Like many other open source software, QElectroTech is provided as is, without any warranty.
|
||||
|
||||
### Development / technical choices
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
{
|
||||
"id": "org.qelectrotech.QElectroTech",
|
||||
"base-version": "5.15-22.08",
|
||||
"base-version": "5.15-23.08",
|
||||
"runtime": "org.kde.Platform",
|
||||
"runtime-version": "5.15-22.08",
|
||||
"runtime-version": "5.15-23.08",
|
||||
"sdk": "org.kde.Sdk",
|
||||
"command": "qelectrotech",
|
||||
"rename-desktop-file": "qelectrotech.desktop",
|
||||
|
||||
@@ -9,8 +9,6 @@ if [ ! -d "$to" ] && [ -d "$from" ]; then
|
||||
cp -av "$from/." "$to"
|
||||
fi
|
||||
|
||||
# link DXFtoQET so that QET finds it
|
||||
mkdir -p "$HOME/.qet"
|
||||
ln -snf "$SNAP/bin/DXFtoQET" "$HOME/.qet/DXFtoQET"
|
||||
|
||||
|
||||
exec "${@}"
|
||||
|
||||
@@ -29,7 +29,7 @@ apps:
|
||||
common-id: qelectrotech.desktop
|
||||
extensions:
|
||||
- kde-neon
|
||||
plugs: &plugs [opengl, unity7, home, removable-media, gsettings, network, cups-control]
|
||||
plugs: &plugs [opengl, unity7, home, removable-media, gsettings, network, cups-control, wayland, x11]
|
||||
environment: &env
|
||||
TCL_LIBRARY: $SNAP/usr/share/tcltk/tcl8.6
|
||||
HOME: $SNAP_USER_COMMON
|
||||
@@ -42,12 +42,6 @@ apps:
|
||||
plugs: *plugs
|
||||
environment: *env
|
||||
|
||||
dxf-to-qet:
|
||||
command: bin/DXFtoQET
|
||||
extensions:
|
||||
- kde-neon
|
||||
plugs: *plugs
|
||||
environment: *env
|
||||
|
||||
parts:
|
||||
launchers:
|
||||
@@ -77,15 +71,6 @@ parts:
|
||||
override-build: |
|
||||
rsync -a --ignore-existing /snap/kf5-5-110-qt-5-15-11-core22-sdk/current/ /
|
||||
|
||||
dxf-to-qet:
|
||||
after: [kde-sdk-setup]
|
||||
plugin: nil
|
||||
source: https://github.com/qelectrotech/DXFtoQET-2020.git
|
||||
override-build: |
|
||||
qmake "$CRAFT_PART_SRC/DXFtoQET.pro"
|
||||
make -j$(nproc)
|
||||
mkdir -p "$CRAFT_PART_INSTALL/bin"
|
||||
cp DXFtoQET "$CRAFT_PART_INSTALL/bin/"
|
||||
|
||||
qelectrotech:
|
||||
after: [kde-sdk-setup]
|
||||
@@ -96,7 +81,7 @@ parts:
|
||||
- git
|
||||
- libsqlite3-dev
|
||||
override-build: |
|
||||
displayed_version=$(cat sources/qetversion.cpp | grep "return QVersionNumber{ 0, "| head -n 1| cut -c32-40| sed -e 's/,/./g' -e 's/ //g')
|
||||
displayed_version=$(cat sources/qetversion.cpp | grep "return QVersionNumber{"| head -n 1| awk -F "{" '{ print $2 }' | awk -F "}" '{ print $1 }' | sed -e 's/,/./g' -e 's/ //g')
|
||||
snap_version="${displayed_version}-g$(git rev-parse --short=8 HEAD)"
|
||||
modified_displayed_version="${snap_version}.snap"
|
||||
sed -i -E "s|const QString displayedVersion =.*|const QString displayedVersion =\"$modified_displayed_version\";|" sources/qet.h
|
||||
@@ -111,7 +96,7 @@ parts:
|
||||
$SED_CMD usr/local/share/applications/qelectrotech.desktop
|
||||
|
||||
cleanup:
|
||||
after: [qelectrotech, dxf-to-qet, qet-tb-generator]
|
||||
after: [qelectrotech, qet-tb-generator]
|
||||
plugin: nil
|
||||
build-snaps: [kf5-5-110-qt-5-15-11-core22]
|
||||
override-prime: |
|
||||
|
||||
@@ -266,13 +266,13 @@ Section ""
|
||||
; write file associations registry keys
|
||||
WriteRegStr HKEY_CLASSES_ROOT "Applications\qelectrotech.exe\shell\open\command" "" "$\"$final_qet_exe$\" $\"%1$\""
|
||||
WriteRegStr HKEY_CLASSES_ROOT ".qet" "" "qet_diagram_file"
|
||||
WriteRegStr HKEY_CLASSES_ROOT "qet_diagram_file" "" "Schéma QET"
|
||||
WriteRegStr HKEY_CLASSES_ROOT "qet_diagram_file" "" "Diagram QET"
|
||||
WriteRegDWORD HKEY_CLASSES_ROOT "qet_diagram_file" "EditFlags" 0x00000000
|
||||
WriteRegDWORD HKEY_CLASSES_ROOT "qet_diagram_file" "BrowserFlags" 0x00000008
|
||||
WriteRegStr HKEY_CLASSES_ROOT "qet_diagram_file\DefaultIcon" "" "$final_project_ico"
|
||||
WriteRegStr HKEY_CLASSES_ROOT "qet_diagram_file\shell\open\command" "" "$\"$final_qet_exe$\" $\"%1$\""
|
||||
WriteRegStr HKEY_CLASSES_ROOT ".elmt" "" "qet_element_file"
|
||||
WriteRegStr HKEY_CLASSES_ROOT "qet_element_file" "" "Élément QET"
|
||||
WriteRegStr HKEY_CLASSES_ROOT "qet_element_file" "" "Element QET"
|
||||
WriteRegDWORD HKEY_CLASSES_ROOT "qet_element_file" "EditFlags" 0x00000000
|
||||
WriteRegDWORD HKEY_CLASSES_ROOT "qet_element_file" "BrowserFlags" 0x00000008
|
||||
WriteRegStr HKEY_CLASSES_ROOT "qet_element_file\DefaultIcon" "" "$final_element_ico"
|
||||
|
||||
@@ -258,6 +258,9 @@ set(QET_SRC_FILES
|
||||
${QET_DIR}/sources/dxf/dxftoelmt.cpp
|
||||
${QET_DIR}/sources/dxf/dxftoelmt.h
|
||||
|
||||
${QET_DIR}/sources/qet_elementscaler/qet_elementscaler.cpp
|
||||
${QET_DIR}/sources/qet_elementscaler/qet_elementscaler.h
|
||||
|
||||
${QET_DIR}/sources/editor/arceditor.cpp
|
||||
${QET_DIR}/sources/editor/arceditor.h
|
||||
${QET_DIR}/sources/editor/editorcommands.cpp
|
||||
|
||||
+1
-1
Submodule elements updated: 5052b6330e...01365becda
+513
-264
File diff suppressed because it is too large
Load Diff
+511
-262
File diff suppressed because it is too large
Load Diff
+513
-264
File diff suppressed because it is too large
Load Diff
+511
-262
File diff suppressed because it is too large
Load Diff
+511
-262
File diff suppressed because it is too large
Load Diff
Binary file not shown.
+542
-275
File diff suppressed because it is too large
Load Diff
+511
-262
File diff suppressed because it is too large
Load Diff
Binary file not shown.
+534
-265
File diff suppressed because it is too large
Load Diff
Binary file not shown.
+852
-602
File diff suppressed because it is too large
Load Diff
Binary file not shown.
+516
-265
File diff suppressed because it is too large
Load Diff
+511
-262
File diff suppressed because it is too large
Load Diff
+510
-261
File diff suppressed because it is too large
Load Diff
+512
-263
File diff suppressed because it is too large
Load Diff
+510
-261
File diff suppressed because it is too large
Load Diff
+510
-261
File diff suppressed because it is too large
Load Diff
+510
-261
File diff suppressed because it is too large
Load Diff
+511
-289
File diff suppressed because it is too large
Load Diff
Binary file not shown.
+594
-311
File diff suppressed because it is too large
Load Diff
+508
-259
File diff suppressed because it is too large
Load Diff
+510
-261
File diff suppressed because it is too large
Load Diff
+511
-262
File diff suppressed because it is too large
Load Diff
+513
-264
File diff suppressed because it is too large
Load Diff
+510
-261
File diff suppressed because it is too large
Load Diff
+509
-260
File diff suppressed because it is too large
Load Diff
+509
-260
File diff suppressed because it is too large
Load Diff
+510
-261
File diff suppressed because it is too large
Load Diff
+510
-261
File diff suppressed because it is too large
Load Diff
+510
-261
File diff suppressed because it is too large
Load Diff
@@ -89,7 +89,8 @@ A=$(git rev-list HEAD --count)
|
||||
HEAD=$(($A+473))
|
||||
|
||||
|
||||
VERSION=$(cat sources/qetversion.cpp | grep "return QVersionNumber{ 0, "| head -n 1| cut -c32-40| sed -e 's/,/./g' -e 's/ //g') #Find major, minor, and micro version numbers in sources/qetversion.cp
|
||||
VERSION=$(cat sources/qetversion.cpp | grep "return QVersionNumber{"| head -n 1| awk -F "{" '{ print $2 }' | awk -F "}" '{ print $1 }' | sed -e 's/,/./g' -e 's/ //g')
|
||||
#VERSION=$(cat sources/qetversion.cpp | grep "return QVersionNumber{ 0, "| head -n 1| cut -c25-35| sed -e 's/,/./g' -e 's/ //g') #Find major, minor, and micro version numbers in sources/qetversion.cp
|
||||
|
||||
# Dmg de la dernière revision déjà créé
|
||||
if [ -e "build-aux/mac-osx/${APPNAME} $VERSION r$HEAD.dmg" ] ; then
|
||||
|
||||
@@ -84,7 +84,8 @@ A=$(git rev-list HEAD --count)
|
||||
HEAD=$(($A+473))
|
||||
|
||||
|
||||
VERSION=$(cat sources/qetversion.cpp | grep "return QVersionNumber{ 0, "| head -n 1| cut -c32-40| sed -e 's/,/./g' -e 's/ //g') #Find major, minor, and micro version numbers in sources/qetversion.cp
|
||||
VERSION=$(cat sources/qetversion.cpp | grep "return QVersionNumber{"| head -n 1| awk -F "{" '{ print $2 }' | awk -F "}" '{ print $1 }' | sed -e 's/,/./g' -e 's/ //g')
|
||||
#VERSION=$(cat sources/qetversion.cpp | grep "return QVersionNumber{ 0, "| head -n 1| cut -c32-40| sed -e 's/,/./g' -e 's/ //g') #Find major, minor, and micro version numbers in sources/qetversion.cp
|
||||
|
||||
# Tarball de la dernière revision déjà créé
|
||||
if [ -e "build-aux/mac-osx/${APPNAME}-$VERSION-r$HEAD-arm64.zip" ] ; then
|
||||
|
||||
@@ -21,7 +21,9 @@ A=$(git rev-list HEAD --count)
|
||||
HEAD=$(($A+473))
|
||||
|
||||
#Find major, minor, and micro version numbers in sources/qetversion.cp
|
||||
tagName=$(cat sources/qetversion.cpp | grep "return QVersionNumber{ 0, "| head -n 1| cut -c32-40| sed -e 's/,/./g' -e 's/ //g') #Find major, minor, and micro version numbers in sources/qetversion.cp
|
||||
|
||||
tagName=$(cat sources/qetversion.cpp | grep "return QVersionNumber{"| head -n 1| awk -F "{" '{ print $2 }' | awk -F "}" '{ print $1 }' | sed -e 's/,/./g' -e 's/ //g')
|
||||
#tagName=$(cat sources/qetversion.cpp | grep "return QVersionNumber{ 0, "| head -n 1| cut -c32-40| sed -e 's/,/./g' -e 's/ //g') #Find major, minor, and micro version numbers in sources/qetversion.cp
|
||||
|
||||
rm -Rf build/
|
||||
mkdir build && cd build
|
||||
|
||||
@@ -31,7 +31,8 @@ if [ -z "$HEAD" ] ; then
|
||||
|
||||
fi
|
||||
|
||||
VERSION=$(cat sources/qetversion.cpp | grep "return QVersionNumber{ 0, "| head -n 1| cut -c32-40| sed -e 's/,/./g' -e 's/ //g') #Find major, minor, and micro version numbers in sources/qetversion.cp
|
||||
VERSION=$(cat sources/qetversion.cpp | grep "return QVersionNumber{"| head -n 1| awk -F "{" '{ print $2 }' | awk -F "}" '{ print $1 }' | sed -e 's/,/./g' -e 's/ //g')
|
||||
#VERSION=$(cat sources/qetversion.cpp | grep "return QVersionNumber{ 0, "| head -n 1| cut -c32-40| sed -e 's/,/./g' -e 's/ //g') #Find major, minor, and micro version numbers in sources/qetversion.cp
|
||||
|
||||
|
||||
#clean /var/cache/pbuilder/ .. / result/debs
|
||||
|
||||
@@ -16,7 +16,8 @@ git pull --recurse-submodules
|
||||
# get the number of the new revision
|
||||
GITCOMMIT=$(git rev-parse --short HEAD)
|
||||
|
||||
tagName=$(cat sources/qetversion.cpp | grep "return QVersionNumber{ 0, "| head -n 1| cut -c32-40| sed -e 's/,/./g' -e 's/ //g') #Find major, minor, and micro version numbers in sources/qetversion.cp
|
||||
tagName=$(cat sources/qetversion.cpp | grep "return QVersionNumber{"| head -n 1| awk -F "{" '{ print $2 }' | awk -F "}" '{ print $1 }' | sed -e 's/,/./g' -e 's/ //g')
|
||||
#tagName=$(cat sources/qetversion.cpp | grep "return QVersionNumber{ 0, "| head -n 1| cut -c32-40| sed -e 's/,/./g' -e 's/ //g') #Find major, minor, and micro version numbers in sources/qetversion.cp
|
||||
|
||||
cd ~
|
||||
flatpak-builder --force-clean --ccache --repo=qet_git/0.8-dev qet_git/build-dir qet_git/build-aux/flatpak/org.qelectrotech.QElectroTech.json --gpg-sign=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX --gpg-homedir=gpg
|
||||
|
||||
+4
-2
@@ -166,7 +166,8 @@ HEADERS += $$files(sources/*.h) \
|
||||
$$files(sources/TerminalStrip/GraphicsItem/*.h) \
|
||||
$$files(sources/TerminalStrip/GraphicsItem/properties/*.h) \
|
||||
$$files(sources/xml/*.h) \
|
||||
$$files(sources/dxf/*.h)
|
||||
$$files(sources/dxf/*.h) \
|
||||
$$files(sources/qet_elementscaler/*.h)
|
||||
|
||||
SOURCES += $$files(sources/*.cpp) \
|
||||
$$files(sources/editor/*.cpp) \
|
||||
@@ -208,7 +209,8 @@ SOURCES += $$files(sources/*.cpp) \
|
||||
$$files(sources/TerminalStrip/GraphicsItem/*.cpp) \
|
||||
$$files(sources/TerminalStrip/GraphicsItem/properties/*.cpp) \
|
||||
$$files(sources/xml/*.cpp) \
|
||||
$$files(sources/dxf/*.cpp)
|
||||
$$files(sources/dxf/*.cpp) \
|
||||
$$files(sources/qet_elementscaler/*.cpp)
|
||||
|
||||
# Needed for use promote QTreeWidget in terminalstripeditor.ui
|
||||
INCLUDEPATH += sources/TerminalStrip/ui
|
||||
|
||||
@@ -399,7 +399,7 @@ ElementsLocation ElementCollectionHandler::createDir(ElementsLocation &parent, c
|
||||
@brief ElementCollectionHandler::importFromProject
|
||||
Import the element represented by location to the embedded collection
|
||||
of project at the same path.
|
||||
location must represente an element owned by a project embedded collection
|
||||
location must represent an element owned by a project embedded collection
|
||||
@param project : project where copy the element
|
||||
@param location : location to copy
|
||||
@return true if import with success
|
||||
|
||||
@@ -713,7 +713,7 @@ void ElementsCollectionWidget::locationWasSaved(
|
||||
const ElementsLocation& location)
|
||||
{
|
||||
//Because this method update an item in the model, location must
|
||||
//represente an existing element (in file system of project)
|
||||
//represent an existing element (in file system of project)
|
||||
if (!location.exist())
|
||||
return;
|
||||
|
||||
|
||||
@@ -591,7 +591,7 @@ bool ElementsLocation::isWritable() const
|
||||
/**
|
||||
@brief ElementsLocation::projectCollection
|
||||
@return
|
||||
If this location represente a item in an embedded project collection,
|
||||
If this location represents an item in an embedded project collection,
|
||||
return this collection else return nullptr.
|
||||
*/
|
||||
XmlElementCollection *ElementsLocation::projectCollection() const
|
||||
|
||||
@@ -35,7 +35,17 @@ static int MAX_DND_PIXMAP_HEIGHT = 375;
|
||||
*/
|
||||
ElementsTreeView::ElementsTreeView(QWidget *parent) :
|
||||
QTreeView(parent)
|
||||
{}
|
||||
{
|
||||
// force du noir sur une alternance de blanc (comme le schema) et de gris
|
||||
// clair, avec du blanc sur bleu pas trop fonce pour la selection
|
||||
QPalette qp = palette();
|
||||
qp.setColor(QPalette::Text, Qt::black);
|
||||
qp.setColor(QPalette::Base, Qt::white);
|
||||
qp.setColor(QPalette::AlternateBase, QColor("#e8e8e8"));
|
||||
qp.setColor(QPalette::Highlight, QColor("#678db2"));
|
||||
qp.setColor(QPalette::HighlightedText, Qt::black);
|
||||
setPalette(qp);
|
||||
}
|
||||
|
||||
/**
|
||||
@brief ElementsTreeView::startDrag
|
||||
|
||||
@@ -223,7 +223,44 @@ namespace autonum
|
||||
str.replace("%{quantity}", dc.value("quantity").toString());
|
||||
str.replace("%{unity}", dc.value("unity").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("%{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}",
|
||||
dc.value("machine_manufacturer_reference").toString());
|
||||
str.replace("%{location}", dc.value("location").toString());
|
||||
|
||||
@@ -336,8 +336,6 @@ void projectDataBase::createElementNomenclatureView()
|
||||
"ei.location AS location,"
|
||||
"ei.comment AS comment,"
|
||||
"ei.function AS function,"
|
||||
"ei.auxiliary1 AS auxiliary1,"
|
||||
"ei.auxiliary2 AS auxiliary2,"
|
||||
"ei.description AS description,"
|
||||
"ei.designation AS designation,"
|
||||
"ei.manufacturer AS manufacturer,"
|
||||
@@ -346,6 +344,47 @@ void projectDataBase::createElementNomenclatureView()
|
||||
"ei.supplier AS supplier,"
|
||||
"ei.quantity AS quantity,"
|
||||
"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,"
|
||||
"e.type AS element_type,"
|
||||
"e.sub_type AS element_sub_type,"
|
||||
|
||||
@@ -45,7 +45,42 @@
|
||||
* quantity -> quantity of the element
|
||||
* unity -> unity of the 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
|
||||
* 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
|
||||
* supplier -> the supplier of the element
|
||||
* function -> the function of element
|
||||
|
||||
@@ -44,10 +44,22 @@ QByteArray dxfToElmt(const QString &file_path)
|
||||
|
||||
process_.start(program, arguments);
|
||||
|
||||
|
||||
if (process_.waitForFinished())
|
||||
{
|
||||
const auto byte_array{process_.readAll()};
|
||||
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.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;
|
||||
}
|
||||
else
|
||||
@@ -97,7 +109,7 @@ bool dxf2ElmtIsPresent(bool install_dialog, QWidget *parent)
|
||||
const bool exist{QFile::exists(dxf2ElmtBinaryPath())};
|
||||
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")};
|
||||
|
||||
ThirdPartyBinaryInstallDialog dialog_(string_,
|
||||
|
||||
@@ -47,6 +47,7 @@
|
||||
#include "../../newelementwizard.h"
|
||||
#include "../editorcommands.h"
|
||||
#include "../../dxf/dxftoelmt.h"
|
||||
#include "../../qet_elementscaler/qet_elementscaler.h"
|
||||
#include "../UndoCommand/openelmtcommand.h"
|
||||
|
||||
#include <QSettings>
|
||||
@@ -950,39 +951,6 @@ void QETElementEditor::writeSettings() const
|
||||
*/
|
||||
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_redo_action = m_elmt_scene -> undoStack().createRedoAction(this, tr("Refaire"));
|
||||
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_save_action -> setShortcut(QKeySequence::Save);
|
||||
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_deselect_all_action -> setShortcut(QKeySequence(tr("Ctrl+Shift+A")));
|
||||
ui->m_revert_selection_action -> setShortcut(QKeySequence(tr("Ctrl+I")));
|
||||
@@ -1010,8 +977,10 @@ void QETElementEditor::setupActions()
|
||||
|
||||
#ifndef Q_OS_MAC
|
||||
ui->m_delete_action -> setShortcut(QKeySequence(Qt::Key_Delete));
|
||||
ui->m_quit_action -> setShortcut(QKeySequence(tr("Ctrl+Q")));
|
||||
#else
|
||||
ui->m_delete_action -> setShortcut(QKeySequence(tr("Backspace")));
|
||||
ui->m_quit_action -> setShortcut(QKeySequence(tr("Ctrl+W")));
|
||||
#endif
|
||||
|
||||
//Depth action
|
||||
@@ -1313,22 +1282,22 @@ void QETElementEditor::on_m_open_from_file_action_triggered()
|
||||
openElement(user_filename);
|
||||
}
|
||||
|
||||
void QETElementEditor::on_m_open_dxf_action_triggered()
|
||||
void QETElementEditor::on_m_open_scaled_element_action_triggered()
|
||||
{
|
||||
#ifdef TODO_LIST
|
||||
# pragma message("@TODO Merge 'DXF to GET-2020' code in to Qet")
|
||||
# pragma message("https://github.com/qelectrotech/DXFtoQET-2020")
|
||||
# pragma message("@TODO Merge 'Element-Scaling' code into QET")
|
||||
# pragma message("https://github.com/plc-user/QET_ElementScaler")
|
||||
#endif
|
||||
#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)
|
||||
QString program = (QDir::homePath() + "/.qet/DXFtoQET.app");
|
||||
QString program = (QDir::homePath() + "/.qet/QET_ElementScaler.app");
|
||||
#else
|
||||
QString program = (QDir::homePath() + "/.qet/DXFtoQET");
|
||||
QString program = (QDir::homePath() + "/.qet/QET_ElementScaler");
|
||||
#endif
|
||||
QStringList arguments;
|
||||
QProcess *DXF = new QProcess(qApp);
|
||||
DXF -> start(program,arguments);
|
||||
QProcess *ES = new QProcess(qApp);
|
||||
ES -> start(program,arguments);
|
||||
}
|
||||
|
||||
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,
|
||||
QObject::tr("Importer un fichier dxf"),
|
||||
"/home",
|
||||
QDir::homePath(),
|
||||
"DXF (*.dxf)")};
|
||||
if (file_path.isEmpty()) {
|
||||
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));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -86,7 +86,7 @@ class QETElementEditor : public QMainWindow
|
||||
void on_m_new_action_triggered();
|
||||
void on_m_open_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();
|
||||
void on_m_reload_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_about_qt_action_triggered();
|
||||
void on_m_import_dxf_triggered();
|
||||
void on_m_import_scaled_element_triggered();
|
||||
|
||||
private:
|
||||
bool canClose();
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>800</width>
|
||||
<height>21</height>
|
||||
<height>22</height>
|
||||
</rect>
|
||||
</property>
|
||||
<widget class="QMenu" name="m_file_menu">
|
||||
@@ -35,8 +35,8 @@
|
||||
<addaction name="m_new_action"/>
|
||||
<addaction name="m_open_action"/>
|
||||
<addaction name="m_open_from_file_action"/>
|
||||
<addaction name="m_import_scaled_element"/>
|
||||
<addaction name="m_import_dxf"/>
|
||||
<addaction name="m_open_dxf_action"/>
|
||||
<addaction name="m_save_action"/>
|
||||
<addaction name="m_save_as_action"/>
|
||||
<addaction name="m_save_as_file_action"/>
|
||||
@@ -232,15 +232,6 @@
|
||||
<string>&Ouvrir depuis un fichier</string>
|
||||
</property>
|
||||
</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>&Lancer le plugin convertisseur DXF</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="m_save_action">
|
||||
<property name="icon">
|
||||
<iconset resource="../../../qelectrotech.qrc">
|
||||
@@ -283,7 +274,10 @@
|
||||
<normaloff>:/ico/16x16/application-exit.png</normaloff>:/ico/16x16/application-exit.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>&Quitter</string>
|
||||
<string>&Fermer cet éditeur</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Fermer cet éditeur</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="m_deselect_all_action">
|
||||
@@ -511,6 +505,15 @@
|
||||
<string>Importer un dxf</string>
|
||||
</property>
|
||||
</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>
|
||||
<resources>
|
||||
<include location="../../../qelectrotech.qrc"/>
|
||||
|
||||
@@ -219,9 +219,9 @@ void TerminalEditor::activeConnections(bool active)
|
||||
{
|
||||
if (active) {
|
||||
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),
|
||||
this, &TerminalEditor::posEdited);
|
||||
[this]() { TerminalEditor::posEdited(); ui->m_y_dsb->setFocus(); } ) ;
|
||||
m_editor_connections << connect(ui->m_orientation_cb, QOverload<int>::of(&QComboBox::activated),
|
||||
this, &TerminalEditor::orientationEdited);
|
||||
m_editor_connections << connect(ui->m_name_le, &QLineEdit::editingFinished,
|
||||
|
||||
@@ -117,6 +117,7 @@ void ExportPropertiesWidget::setPrintingMode(bool mode) {
|
||||
format -> setVisible(!mode);
|
||||
export_border -> setVisible(!mode);
|
||||
export_elements -> setVisible(!mode);
|
||||
draw_bg_transparent -> setVisible(!mode);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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
|
||||
@@ -2378,33 +2378,26 @@ void QETDiagramEditor::generateTerminalBlock()
|
||||
success = process->startDetached(QDir::homePath() + "/qet_tb_generator.exe", {("")});
|
||||
}
|
||||
|
||||
|
||||
|
||||
#elif defined(Q_OS_MACOS)
|
||||
if (openedProjects().count()){
|
||||
success = process->startDetached("/Library/Frameworks/Python.framework/Versions/3.11/bin/qet_tb_generator", {(QETDiagramEditor::currentProjectView()->project()->filePath())});
|
||||
}
|
||||
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())});
|
||||
}
|
||||
else {
|
||||
success = process->startDetached(QDir::homePath() + "/.qet/qet_tb_generator.app", {("")});
|
||||
}
|
||||
|
||||
|
||||
#else
|
||||
if (openedProjects().count()){
|
||||
success = process->startDetached("qet_tb_generator", {(QETDiagramEditor::currentProjectView()->project()->filePath())});
|
||||
}
|
||||
|
||||
else {
|
||||
success = process->startDetached("qet_tb_generator", {("")});
|
||||
}
|
||||
if (openedProjects().count()){
|
||||
success = process->startDetached(QDir::homePath() + "/.qet/qet_tb_generator", {(QETDiagramEditor::currentProjectView()->project()->filePath())});
|
||||
}
|
||||
else {
|
||||
success = process->startDetached(QDir::homePath() + "/.qet/qet_tb_generator", {("")});
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
#if defined(Q_OS_WIN32) || defined(Q_OS_WIN64)
|
||||
|
||||
@@ -1047,7 +1047,15 @@ QDomElement Conductor::toXml(QDomDocument &dom_document,
|
||||
dom_element.setAttribute("terminal1", table_adr_id.value(terminal1)); // for backward compatibility
|
||||
} else {
|
||||
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("terminalname1", terminal1->name());
|
||||
}
|
||||
|
||||
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
|
||||
} else {
|
||||
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("terminalname2", terminal2->name());
|
||||
}
|
||||
dom_element.setAttribute("freezeLabel", m_freeze_label? "true" : "false");
|
||||
|
||||
|
||||
@@ -744,6 +744,11 @@ QUuid Terminal::uuid() const
|
||||
return d->m_uuid;
|
||||
}
|
||||
|
||||
QString Terminal::name() const
|
||||
{
|
||||
return d->m_name;
|
||||
}
|
||||
|
||||
/**
|
||||
@brief Conductor::relatedPotentialTerminal
|
||||
Return terminal at the same potential from the same
|
||||
|
||||
@@ -74,6 +74,7 @@ class Terminal : public QGraphicsObject
|
||||
Diagram *diagram () const;
|
||||
Element *parentElement () const;
|
||||
QUuid uuid () const;
|
||||
QString name () const;
|
||||
|
||||
QList<Conductor *> conductors() const;
|
||||
Qet::Orientation orientation() const;
|
||||
|
||||
+113
-6
@@ -146,8 +146,6 @@ QStringList QETInformation::elementInfoKeys()
|
||||
ELMT_LOCATION,
|
||||
ELMT_COMMENT,
|
||||
ELMT_FUNCTION,
|
||||
ELMT_AUX1,
|
||||
ELMT_AUX2,
|
||||
ELMT_DESCRIPTION,
|
||||
ELMT_DESIGNATION,
|
||||
ELMT_MANUFACTURER,
|
||||
@@ -155,7 +153,43 @@ QStringList QETInformation::elementInfoKeys()
|
||||
ELMT_MACHINE_MANUFACTURER_REF,
|
||||
ELMT_SUPPLIER,
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -220,8 +254,6 @@ QString QETInformation::translatedInfoKey(const QString &info)
|
||||
else if (info == ELMT_LABEL) return QObject::tr("Label");
|
||||
else if (info == ELMT_COMMENT) return QObject::tr("Commentaire");
|
||||
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_DESIGNATION) return QObject::tr("Numéro d'article");
|
||||
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_TEXT) return QObject::tr("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();
|
||||
}
|
||||
|
||||
@@ -245,14 +313,53 @@ QStringList QETInformation::elementEditorElementInfoKeys()
|
||||
QStringList list = { ELMT_LABEL,
|
||||
ELMT_PLANT,
|
||||
ELMT_COMMENT,
|
||||
ELMT_FUNCTION,
|
||||
ELMT_DESCRIPTION,
|
||||
ELMT_DESIGNATION,
|
||||
ELMT_MANUFACTURER,
|
||||
ELMT_MANUFACTURER_REF,
|
||||
ELMT_MACHINE_MANUFACTURER_REF,
|
||||
ELMT_SUPPLIER,
|
||||
ELMT_QUANTITY,
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
#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.
|
||||
* Each information have 3 values :
|
||||
* #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_COMMENT = "comment";
|
||||
static QString ELMT_FUNCTION = "function";
|
||||
static QString ELMT_AUX1 = "auxiliary1";
|
||||
static QString ELMT_AUX2 = "auxiliary2";
|
||||
static QString ELMT_DESCRIPTION = "description";
|
||||
static QString ELMT_DESIGNATION = "designation";
|
||||
static QString ELMT_MANUFACTURER = "manufacturer";
|
||||
@@ -49,6 +47,43 @@ namespace QETInformation
|
||||
static QString ELMT_UNITY = "unity";
|
||||
static QString ELMT_PLANT = "plant";
|
||||
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 **/
|
||||
static QString COND_FUNCTION = "function";
|
||||
|
||||
@@ -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"));
|
||||
|
||||
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));
|
||||
});
|
||||
|
||||
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));
|
||||
});
|
||||
|
||||
|
||||
@@ -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, "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, "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, "Damian Caceres", "damiancaceresmoreno@yahoo.es", 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->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());
|
||||
}
|
||||
log_File.close();
|
||||
ui->m_log_textEdit->moveCursor(QTextCursor::End);
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
Copyright 2006-2024 The QElectroTech Team
|
||||
This file is part of QElectroTech.
|
||||
|
||||
|
||||
@@ -970,7 +970,7 @@ QModelIndex DynamicElementTextModel::indexFromGroup(
|
||||
/**
|
||||
@brief DynamicElementTextModel::indexIsText
|
||||
@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.
|
||||
*/
|
||||
bool DynamicElementTextModel::indexIsText(const QModelIndex &index) const
|
||||
@@ -1000,7 +1000,7 @@ bool DynamicElementTextModel::indexIsText(const QModelIndex &index) const
|
||||
/**
|
||||
@brief DynamicElementTextModel::indexIsGroup
|
||||
@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.
|
||||
*/
|
||||
bool DynamicElementTextModel::indexIsGroup(const QModelIndex &index) const
|
||||
|
||||
Reference in New Issue
Block a user