mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-06-12 06:43:14 +02:00
Compare commits
151 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 77bfe84a4c | |||
| e053acb065 | |||
| b5d57086bc | |||
| b456bedaa3 | |||
| db18095cfb | |||
| 3438ba9ab3 | |||
| 1078496bb1 | |||
| 711353bb58 | |||
| dd7955e50e | |||
| 7a617e72bd | |||
| e73aa3b84d | |||
| 8e0c3f4252 | |||
| 27474b0822 | |||
| d6dcc85157 | |||
| b2dc6ba738 | |||
| 31ed09f185 | |||
| 3992c60c45 | |||
| fef351df8b | |||
| fa322af060 | |||
| 34cc26a325 | |||
| ba14c6112e | |||
| cb8256bd48 | |||
| 3dd512b587 | |||
| 31c0267cd5 | |||
| 88b2955b00 | |||
| 46378ca2a7 | |||
| c7481011e8 | |||
| 15d9708c46 | |||
| 3b32daf15d | |||
| 0a658d5d61 | |||
| a140c5ad39 | |||
| 4894284520 | |||
| efc8745bc7 | |||
| 406af16e94 | |||
| e3e48d3966 | |||
| 0e646aed0b | |||
| 52d56c18a2 | |||
| d3f132adc6 | |||
| 7b50f10749 | |||
| 64bb2308d8 | |||
| 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 |
+1
-1
@@ -146,7 +146,7 @@ install(DIRECTORY elements DESTINATION share/qelectrotech)
|
||||
install(DIRECTORY examples DESTINATION share/qelectrotech)
|
||||
install(DIRECTORY titleblocks DESTINATION share/qelectrotech)
|
||||
install(FILES LICENSE ELEMENTS.LICENSE CREDIT README ChangeLog DESTINATION share/doc/qelectrotech)
|
||||
install(FILES misc/qelectrotech.desktop DESTINATION share/applications)
|
||||
install(FILES misc/org.qelectrotech.qelectrotech.desktop DESTINATION share/applications)
|
||||
install(FILES misc/qelectrotech.xml DESTINATION share/mime/packages)
|
||||
install(FILES misc/qelectrotech.appdata.xml DESTINATION ${QET_APPDATA_PATH})
|
||||
install(FILES ${QM_FILES} DESTINATION ${QET_LANG_PATH})
|
||||
|
||||
@@ -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,11 +1,11 @@
|
||||
{
|
||||
"id": "org.qelectrotech.QElectroTech",
|
||||
"base-version": "5.15-22.08",
|
||||
"base-version": "5.15-23.08",
|
||||
"runtime": "org.kde.Platform",
|
||||
"runtime-version": "5.15-22.08",
|
||||
"runtime-version": "5.15-23.08",
|
||||
"sdk": "org.kde.Sdk",
|
||||
"command": "qelectrotech",
|
||||
"rename-desktop-file": "qelectrotech.desktop",
|
||||
"rename-desktop-file": "org.qelectrotech.qelectrotech.desktop",
|
||||
"rename-appdata-file": "qelectrotech.appdata.xml",
|
||||
"rename-icon": "qelectrotech",
|
||||
"copy-icon": true,
|
||||
|
||||
@@ -9,8 +9,6 @@ if [ ! -d "$to" ] && [ -d "$from" ]; then
|
||||
cp -av "$from/." "$to"
|
||||
fi
|
||||
|
||||
# link DXFtoQET so that QET finds it
|
||||
mkdir -p "$HOME/.qet"
|
||||
ln -snf "$SNAP/bin/DXFtoQET" "$HOME/.qet/DXFtoQET"
|
||||
|
||||
|
||||
exec "${@}"
|
||||
|
||||
@@ -29,7 +29,7 @@ apps:
|
||||
common-id: qelectrotech.desktop
|
||||
extensions:
|
||||
- kde-neon
|
||||
plugs: &plugs [opengl, unity7, home, removable-media, gsettings, network, cups-control]
|
||||
plugs: &plugs [opengl, unity7, home, removable-media, gsettings, network, cups-control, wayland, x11]
|
||||
environment: &env
|
||||
TCL_LIBRARY: $SNAP/usr/share/tcltk/tcl8.6
|
||||
HOME: $SNAP_USER_COMMON
|
||||
@@ -42,13 +42,7 @@ apps:
|
||||
plugs: *plugs
|
||||
environment: *env
|
||||
|
||||
dxf-to-qet:
|
||||
command: bin/DXFtoQET
|
||||
extensions:
|
||||
- kde-neon
|
||||
plugs: *plugs
|
||||
environment: *env
|
||||
|
||||
|
||||
parts:
|
||||
launchers:
|
||||
plugin: dump
|
||||
@@ -77,16 +71,7 @@ parts:
|
||||
override-build: |
|
||||
rsync -a --ignore-existing /snap/kf5-5-110-qt-5-15-11-core22-sdk/current/ /
|
||||
|
||||
dxf-to-qet:
|
||||
after: [kde-sdk-setup]
|
||||
plugin: nil
|
||||
source: https://github.com/qelectrotech/DXFtoQET-2020.git
|
||||
override-build: |
|
||||
qmake "$CRAFT_PART_SRC/DXFtoQET.pro"
|
||||
make -j$(nproc)
|
||||
mkdir -p "$CRAFT_PART_INSTALL/bin"
|
||||
cp DXFtoQET "$CRAFT_PART_INSTALL/bin/"
|
||||
|
||||
|
||||
qelectrotech:
|
||||
after: [kde-sdk-setup]
|
||||
plugin: nil
|
||||
@@ -96,7 +81,7 @@ parts:
|
||||
- git
|
||||
- libsqlite3-dev
|
||||
override-build: |
|
||||
displayed_version=$(cat sources/qetversion.cpp | grep "return QVersionNumber{ 0, "| head -n 1| cut -c32-40| sed -e 's/,/./g' -e 's/ //g')
|
||||
displayed_version=$(cat sources/qetversion.cpp | grep "return QVersionNumber{"| head -n 1| awk -F "{" '{ print $2 }' | awk -F "}" '{ print $1 }' | sed -e 's/,/./g' -e 's/ //g')
|
||||
snap_version="${displayed_version}-g$(git rev-parse --short=8 HEAD)"
|
||||
modified_displayed_version="${snap_version}.snap"
|
||||
sed -i -E "s|const QString displayedVersion =.*|const QString displayedVersion =\"$modified_displayed_version\";|" sources/qet.h
|
||||
@@ -108,10 +93,10 @@ parts:
|
||||
craftctl default
|
||||
# patch desktop file with correct icon path
|
||||
SED_CMD="sed -i -E s|^Icon=(.*)|Icon=\${SNAP}/usr/local/share/icons/hicolor/128x128/apps/\1.png|g"
|
||||
$SED_CMD usr/local/share/applications/qelectrotech.desktop
|
||||
$SED_CMD usr/local/share/applications/org.qelectrotech.qelectrotech.desktop
|
||||
|
||||
cleanup:
|
||||
after: [qelectrotech, dxf-to-qet, qet-tb-generator]
|
||||
after: [qelectrotech, qet-tb-generator]
|
||||
plugin: nil
|
||||
build-snaps: [kf5-5-110-qt-5-15-11-core22]
|
||||
override-prime: |
|
||||
|
||||
@@ -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...62e471ff0e
+513
-264
File diff suppressed because it is too large
Load Diff
Binary file not shown.
+868
-591
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.
+543
-276
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
Binary file not shown.
+582
-312
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
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Copyright 2006-2024 The QElectroTech Team -->
|
||||
<!-- Copyright 2006-2025 The QElectroTech Team -->
|
||||
<application>
|
||||
<id type="desktop">qelectrotech.desktop</id>
|
||||
<metadata_license>MIT</metadata_license>
|
||||
|
||||
@@ -33,7 +33,7 @@ my $no = '[no]';
|
||||
my $todo = 'TODO';
|
||||
|
||||
our $default_language = 'fr';
|
||||
our @misc_desktop_files = qw(misc/qelectrotech.desktop);
|
||||
our @misc_desktop_files = qw(misc/org.qelectrotech.qelectrotech.desktop);
|
||||
our @misc_xml_files = qw(misc/qelectrotech.xml);
|
||||
our @readme_files = qw(CREDIT README INSTALL ELEMENTS.LICENSE build-aux/linux/fedora/README.elements);
|
||||
our @ordered_languages = qw(fr en es pt cs pl ca de it ar sl hr el nl be ru ro da pt_BR hu sr tr nb ja mn uk zh);
|
||||
|
||||
@@ -21,7 +21,9 @@ A=$(git rev-list HEAD --count)
|
||||
HEAD=$(($A+473))
|
||||
|
||||
#Find major, minor, and micro version numbers in sources/qetversion.cp
|
||||
tagName=$(cat sources/qetversion.cpp | grep "return QVersionNumber{ 0, "| head -n 1| cut -c32-40| sed -e 's/,/./g' -e 's/ //g') #Find major, minor, and micro version numbers in sources/qetversion.cp
|
||||
|
||||
tagName=$(cat sources/qetversion.cpp | grep "return QVersionNumber{"| head -n 1| awk -F "{" '{ print $2 }' | awk -F "}" '{ print $1 }' | sed -e 's/,/./g' -e 's/ //g')
|
||||
#tagName=$(cat sources/qetversion.cpp | grep "return QVersionNumber{ 0, "| head -n 1| cut -c32-40| sed -e 's/,/./g' -e 's/ //g') #Find major, minor, and micro version numbers in sources/qetversion.cp
|
||||
|
||||
rm -Rf build/
|
||||
mkdir build && cd build
|
||||
@@ -37,9 +39,9 @@ rm -Rf qelectrotech/usr/share/{elements,examples,titleblocks,lang,man,doc}
|
||||
cp ../build/qelectrotech qelectrotech/usr/bin/
|
||||
cp -r ../{elements,examples,titleblocks,lang,man} qelectrotech/usr/share/
|
||||
|
||||
./linuxdeployqt-continuous-x86_64.AppImage qelectrotech/usr/share/qelectrotech.desktop -appimage -bundle-non-qt-libs -verbose=1 -extra-plugins=iconengines
|
||||
./linuxdeployqt-continuous-x86_64.AppImage qelectrotech/usr/share/org.qelectrotech.qelectrotech.desktop -appimage -bundle-non-qt-libs -verbose=1 -extra-plugins=iconengines
|
||||
rm qelectrotech/AppRun
|
||||
sed -i 's/'"QElectroTech_*.*/QElectroTech_$tagName-r$HEAD"'/' qelectrotech/qelectrotech.desktop
|
||||
sed -i 's/'"QElectroTech_*.*/QElectroTech_$tagName-r$HEAD"'/' qelectrotech/org.qelectrotech.qelectrotech.desktop
|
||||
cp AppRun qelectrotech/
|
||||
rm QElectroTech_*.AppImage
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
+5
-3
@@ -166,7 +166,8 @@ HEADERS += $$files(sources/*.h) \
|
||||
$$files(sources/TerminalStrip/GraphicsItem/*.h) \
|
||||
$$files(sources/TerminalStrip/GraphicsItem/properties/*.h) \
|
||||
$$files(sources/xml/*.h) \
|
||||
$$files(sources/dxf/*.h)
|
||||
$$files(sources/dxf/*.h) \
|
||||
$$files(sources/qet_elementscaler/*.h)
|
||||
|
||||
SOURCES += $$files(sources/*.cpp) \
|
||||
$$files(sources/editor/*.cpp) \
|
||||
@@ -208,7 +209,8 @@ SOURCES += $$files(sources/*.cpp) \
|
||||
$$files(sources/TerminalStrip/GraphicsItem/*.cpp) \
|
||||
$$files(sources/TerminalStrip/GraphicsItem/properties/*.cpp) \
|
||||
$$files(sources/xml/*.cpp) \
|
||||
$$files(sources/dxf/*.cpp)
|
||||
$$files(sources/dxf/*.cpp) \
|
||||
$$files(sources/qet_elementscaler/*.cpp)
|
||||
|
||||
# Needed for use promote QTreeWidget in terminalstripeditor.ui
|
||||
INCLUDEPATH += sources/TerminalStrip/ui
|
||||
@@ -279,7 +281,7 @@ mime_package.path = $$join(INSTALL_PREFIX,,,$${QET_MIME_PACKAGE_PATH})
|
||||
mime_package.files = misc/qelectrotech.xml
|
||||
|
||||
desktop.path = $$join(INSTALL_PREFIX,,,$${QET_DESKTOP_PATH})
|
||||
desktop.files = misc/qelectrotech.desktop
|
||||
desktop.files = misc/org.qelectrotech.qelectrotech.desktop
|
||||
|
||||
appdata.path = $$join(INSTALL_PREFIX,,,$${QET_APPDATA_PATH})
|
||||
appdata.files = misc/qelectrotech.appdata.xml
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2006-2024 The QElectroTech Team
|
||||
Copyright 2006-2025 The QElectroTech Team
|
||||
This file is part of QElectroTech.
|
||||
|
||||
QElectroTech is free software: you can redistribute it and/or modify
|
||||
@@ -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
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2006-2024 The QElectroTech Team
|
||||
Copyright 2006-2025 The QElectroTech Team
|
||||
This file is part of QElectroTech.
|
||||
|
||||
QElectroTech is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2006-2024 The QElectroTech Team
|
||||
Copyright 2006-2025 The QElectroTech Team
|
||||
This file is part of QElectroTech.
|
||||
|
||||
QElectroTech is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2006-2024 The QElectroTech Team
|
||||
Copyright 2006-2025 The QElectroTech Team
|
||||
This file is part of QElectroTech.
|
||||
|
||||
QElectroTech is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2006-2024 The QElectroTech Team
|
||||
Copyright 2006-2025 The QElectroTech Team
|
||||
This file is part of QElectroTech.
|
||||
|
||||
QElectroTech is free software: you can redistribute it and/or modify
|
||||
@@ -111,10 +111,10 @@ QStringList ElementsCollectionModel::mimeTypes() const
|
||||
@return
|
||||
*/
|
||||
bool ElementsCollectionModel::canDropMimeData(const QMimeData *data,
|
||||
Qt::DropAction action,
|
||||
int row,
|
||||
int column,
|
||||
const QModelIndex &parent) const
|
||||
Qt::DropAction action,
|
||||
int row,
|
||||
int column,
|
||||
const QModelIndex &parent) const
|
||||
{
|
||||
if (!(QStandardItemModel::canDropMimeData(data,
|
||||
action,
|
||||
@@ -258,9 +258,9 @@ bool ElementsCollectionModel::dropMimeData(const QMimeData *data,
|
||||
@param projects : list of projects to load
|
||||
*/
|
||||
void ElementsCollectionModel::loadCollections(bool common_collection,
|
||||
bool company_collection,
|
||||
bool custom_collection,
|
||||
QList<QETProject *> projects)
|
||||
bool company_collection,
|
||||
bool custom_collection,
|
||||
QList<QETProject *> projects)
|
||||
{
|
||||
m_items_list_to_setUp.clear();
|
||||
|
||||
@@ -313,8 +313,8 @@ void ElementsCollectionModel::addCommonCollection(bool set_data)
|
||||
{
|
||||
FileElementCollectionItem *feci = new FileElementCollectionItem();
|
||||
if (feci->setRootPath(QETApp::commonElementsDirN(),
|
||||
set_data,
|
||||
m_hide_element)) {
|
||||
set_data,
|
||||
m_hide_element)) {
|
||||
invisibleRootItem()->appendRow(feci);
|
||||
if (set_data)
|
||||
feci->setUpData();
|
||||
@@ -324,41 +324,41 @@ void ElementsCollectionModel::addCommonCollection(bool set_data)
|
||||
}
|
||||
|
||||
/**
|
||||
@brief ElementsCollectionModel::addCompanyCollection
|
||||
Add the company elements collection to this model
|
||||
@param set_data
|
||||
@brief ElementsCollectionModel::addCompanyCollection
|
||||
Add the company elements collection to this model
|
||||
@param set_data
|
||||
*/
|
||||
void ElementsCollectionModel::addCompanyCollection(bool set_data)
|
||||
{
|
||||
FileElementCollectionItem *feci = new FileElementCollectionItem();
|
||||
if (feci->setRootPath(QETApp::companyElementsDirN(),
|
||||
set_data,
|
||||
m_hide_element)) {
|
||||
invisibleRootItem()->appendRow(feci);
|
||||
if (set_data)
|
||||
feci->setUpData();
|
||||
}
|
||||
else
|
||||
delete feci;
|
||||
FileElementCollectionItem *feci = new FileElementCollectionItem();
|
||||
if (feci->setRootPath(QETApp::companyElementsDirN(),
|
||||
set_data,
|
||||
m_hide_element)) {
|
||||
invisibleRootItem()->appendRow(feci);
|
||||
if (set_data)
|
||||
feci->setUpData();
|
||||
}
|
||||
else
|
||||
delete feci;
|
||||
}
|
||||
|
||||
/**
|
||||
@brief ElementsCollectionModel::addCustomCollection
|
||||
Add the custom elements collection to this model
|
||||
@param set_data
|
||||
@brief ElementsCollectionModel::addCustomCollection
|
||||
Add the custom elements collection to this model
|
||||
@param set_data
|
||||
*/
|
||||
void ElementsCollectionModel::addCustomCollection(bool set_data)
|
||||
{
|
||||
FileElementCollectionItem *feci = new FileElementCollectionItem();
|
||||
if (feci->setRootPath(QETApp::customElementsDirN(),
|
||||
set_data,
|
||||
m_hide_element)) {
|
||||
invisibleRootItem()->appendRow(feci);
|
||||
if (set_data)
|
||||
feci->setUpData();
|
||||
}
|
||||
else
|
||||
delete feci;
|
||||
FileElementCollectionItem *feci = new FileElementCollectionItem();
|
||||
if (feci->setRootPath(QETApp::customElementsDirN(),
|
||||
set_data,
|
||||
m_hide_element)) {
|
||||
invisibleRootItem()->appendRow(feci);
|
||||
if (set_data)
|
||||
feci->setUpData();
|
||||
}
|
||||
else
|
||||
delete feci;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -579,9 +579,9 @@ QModelIndex ElementsCollectionModel::indexFromLocation(
|
||||
{
|
||||
QList <ElementCollectionItem *> child_list;
|
||||
|
||||
for (int i=0 ; i<rowCount() ; i++){
|
||||
for (int i=0 ; i<rowCount() ; i++){
|
||||
child_list.append(static_cast<ElementCollectionItem *>(item(i)));
|
||||
}
|
||||
}
|
||||
|
||||
foreach(ElementCollectionItem *eci, child_list) {
|
||||
|
||||
@@ -590,8 +590,8 @@ QModelIndex ElementsCollectionModel::indexFromLocation(
|
||||
if (eci->type() == FileElementCollectionItem::Type) {
|
||||
if (FileElementCollectionItem *feci = static_cast<FileElementCollectionItem *>(eci)) {
|
||||
if ( (location.isCommonCollection() && feci->isCommonCollection()) ||
|
||||
(location.isCompanyCollection() && feci->isCompanyCollection()) ||
|
||||
(location.isCustomCollection() && !feci->isCommonCollection()) ) {
|
||||
(location.isCompanyCollection() && feci->isCompanyCollection()) ||
|
||||
(location.isCustomCollection() && !feci->isCommonCollection()) ) {
|
||||
match_eci = feci->itemAtPath(location.collectionPath(false));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2006-2024 The QElectroTech Team
|
||||
Copyright 2006-2025 The QElectroTech Team
|
||||
This file is part of QElectroTech.
|
||||
|
||||
QElectroTech is free software: you can redistribute it and/or modify
|
||||
@@ -42,11 +42,11 @@ class ElementsCollectionModel : public QStandardItemModel
|
||||
bool canDropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent) const override;
|
||||
bool dropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent) override;
|
||||
|
||||
void loadCollections(bool common_collection, bool company_collection, bool custom_collection, QList<QETProject *> projects);
|
||||
void loadCollections(bool common_collection, bool company_collection, bool custom_collection, QList<QETProject *> projects);
|
||||
|
||||
void addCommonCollection(bool set_data = true);
|
||||
void addCompanyCollection(bool set_data = true);
|
||||
void addCustomCollection(bool set_data = true);
|
||||
void addCommonCollection(bool set_data = true);
|
||||
void addCompanyCollection(bool set_data = true);
|
||||
void addCustomCollection(bool set_data = true);
|
||||
void addLocation(const ElementsLocation& location);
|
||||
|
||||
void addProject(QETProject *project, bool set_data = true);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2006-2024 The QElectroTech Team
|
||||
Copyright 2006-2025 The QElectroTech Team
|
||||
This file is part of QElectroTech.
|
||||
|
||||
QElectroTech is free software: you can redistribute it and/or modify
|
||||
@@ -96,7 +96,7 @@ void ElementsCollectionWidget::addProject(QETProject *project)
|
||||
m_progress_bar->show();
|
||||
m_tree_view->setDisabled(true);
|
||||
QList <QETProject *> prj; prj.append(project);
|
||||
m_model->loadCollections(false, false, false, prj);
|
||||
m_model->loadCollections(false, false, false, prj);
|
||||
}
|
||||
else {
|
||||
m_waiting_project.append(project);
|
||||
@@ -148,26 +148,26 @@ void ElementsCollectionWidget::setUpAction()
|
||||
m_open_dir = new QAction(QET::Icons::FolderOpen,
|
||||
tr("Ouvrir le dossier correspondant"), this);
|
||||
m_edit_element = new QAction(QET::Icons::ElementEdit,
|
||||
tr("Éditer l'élément"), this);
|
||||
tr("Éditer l'élément"), this);
|
||||
m_delete_element = new QAction(QET::Icons::ElementDelete,
|
||||
tr("Supprimer l'élément"), this);
|
||||
tr("Supprimer l'élément"), this);
|
||||
m_delete_dir = new QAction(QET::Icons::FolderDelete,
|
||||
tr("Supprimer le dossier"), this);
|
||||
m_reload = new QAction(QET::Icons::ViewRefresh,
|
||||
tr("Recharger les collections"), this);
|
||||
tr("Recharger les collections"), this);
|
||||
m_edit_dir = new QAction(QET::Icons::FolderEdit,
|
||||
tr("Éditer le dossier"), this);
|
||||
m_new_directory = new QAction(QET::Icons::FolderNew,
|
||||
tr("Nouveau dossier"), this);
|
||||
tr("Nouveau dossier"), this);
|
||||
m_new_element = new QAction(QET::Icons::ElementNew,
|
||||
tr("Nouvel élément"), this);
|
||||
tr("Nouvel élément"), this);
|
||||
m_show_this_dir = new QAction(QET::Icons::FolderOnlyThis,
|
||||
tr("Afficher uniquement ce dossier"),
|
||||
this);
|
||||
tr("Afficher uniquement ce dossier"),
|
||||
this);
|
||||
m_show_all_dir = new QAction(QET::Icons::FolderShowAll,
|
||||
tr("Afficher tous les dossiers"), this);
|
||||
tr("Afficher tous les dossiers"), this);
|
||||
m_dir_propertie = new QAction(QET::Icons::FolderProperties,
|
||||
tr("Propriété du dossier"), this);
|
||||
tr("Propriété du dossier"), this);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -385,10 +385,10 @@ void ElementsCollectionWidget::deleteElement()
|
||||
|
||||
ElementsLocation loc(eci->collectionPath());
|
||||
if (! (loc.isElement()
|
||||
&& loc.exist()
|
||||
&& loc.isFileSystem()
|
||||
&& (loc.collectionPath().startsWith("company://")
|
||||
|| loc.collectionPath().startsWith("custom://"))) ) return;
|
||||
&& loc.exist()
|
||||
&& loc.isFileSystem()
|
||||
&& (loc.collectionPath().startsWith("company://")
|
||||
|| loc.collectionPath().startsWith("custom://"))) ) return;
|
||||
|
||||
if (QET::QetMessageBox::question(
|
||||
this,
|
||||
@@ -401,8 +401,8 @@ void ElementsCollectionWidget::deleteElement()
|
||||
if (file.remove())
|
||||
{
|
||||
m_model->removeRows(m_index_at_context_menu.row(),
|
||||
1,
|
||||
m_index_at_context_menu.parent());
|
||||
1,
|
||||
m_index_at_context_menu.parent());
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -429,10 +429,10 @@ void ElementsCollectionWidget::deleteDirectory()
|
||||
|
||||
ElementsLocation loc (eci->collectionPath());
|
||||
if (! (loc.isDirectory()
|
||||
&& loc.exist()
|
||||
&& loc.isFileSystem()
|
||||
&& (loc.collectionPath().startsWith("company://")
|
||||
|| loc.collectionPath().startsWith("custom://"))) ) return;
|
||||
&& loc.exist()
|
||||
&& loc.isFileSystem()
|
||||
&& (loc.collectionPath().startsWith("company://")
|
||||
|| loc.collectionPath().startsWith("custom://"))) ) return;
|
||||
|
||||
if (QET::QetMessageBox::question(
|
||||
this,
|
||||
@@ -446,8 +446,8 @@ void ElementsCollectionWidget::deleteDirectory()
|
||||
if (dir.removeRecursively())
|
||||
{
|
||||
m_model->removeRows(m_index_at_context_menu.row(),
|
||||
1,
|
||||
m_index_at_context_menu.parent());
|
||||
1,
|
||||
m_index_at_context_menu.parent());
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -529,7 +529,7 @@ void ElementsCollectionWidget::newElement()
|
||||
elmt_wizard.exec();
|
||||
|
||||
foreach (QETElementEditor *element_editor,
|
||||
QETApp::instance()->elementEditors())
|
||||
QETApp::instance()->elementEditors())
|
||||
connect(element_editor,
|
||||
&QETElementEditor::saveToLocation,
|
||||
this,
|
||||
@@ -666,7 +666,7 @@ void ElementsCollectionWidget::reload()
|
||||
this,
|
||||
&ElementsCollectionWidget::loadingFinished);
|
||||
|
||||
m_new_model->loadCollections(true, true, true, project_list);
|
||||
m_new_model->loadCollections(true, true, true, project_list);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -713,7 +713,7 @@ void ElementsCollectionWidget::locationWasSaved(
|
||||
const ElementsLocation& location)
|
||||
{
|
||||
//Because this method update an item in the model, location must
|
||||
//represente an existing element (in file system of project)
|
||||
//represent an existing element (in file system of project)
|
||||
if (!location.exist())
|
||||
return;
|
||||
|
||||
@@ -781,13 +781,13 @@ void ElementsCollectionWidget::search()
|
||||
QModelIndexList match_index;
|
||||
for (QString txt : text_list) {
|
||||
match_index << m_model->match(m_showed_index.isValid()
|
||||
? m_model->index(0,0,m_showed_index)
|
||||
: m_model->index(0,0),
|
||||
Qt::UserRole+1,
|
||||
QVariant(txt),
|
||||
-1,
|
||||
Qt::MatchContains
|
||||
| Qt::MatchRecursive);
|
||||
? m_model->index(0,0,m_showed_index)
|
||||
: m_model->index(0,0),
|
||||
Qt::UserRole+1,
|
||||
QVariant(txt),
|
||||
-1,
|
||||
Qt::MatchContains
|
||||
| Qt::MatchRecursive);
|
||||
}
|
||||
|
||||
for(QModelIndex index : match_index)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2006-2024 The QElectroTech Team
|
||||
Copyright 2006-2025 The QElectroTech Team
|
||||
This file is part of QElectroTech.
|
||||
|
||||
QElectroTech is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2006-2024 The QElectroTech Team
|
||||
Copyright 2006-2025 The QElectroTech Team
|
||||
This file is part of QElectroTech.
|
||||
|
||||
QElectroTech is free software: you can redistribute it and/or modify
|
||||
@@ -293,17 +293,17 @@ void ElementsLocation::setPath(const QString &path)
|
||||
else if (path.startsWith("common://") || path.startsWith("company://") || path.startsWith("custom://"))
|
||||
{
|
||||
QString p;
|
||||
if (path.startsWith("common://"))
|
||||
{
|
||||
tmp_path.remove("common://");
|
||||
p = QETApp::commonElementsDirN() + "/" + tmp_path;
|
||||
}
|
||||
else if (path.startsWith("company://"))
|
||||
{
|
||||
tmp_path.remove("company://");
|
||||
p = QETApp::companyElementsDirN() + "/" + tmp_path;
|
||||
}
|
||||
else
|
||||
if (path.startsWith("common://"))
|
||||
{
|
||||
tmp_path.remove("common://");
|
||||
p = QETApp::commonElementsDirN() + "/" + tmp_path;
|
||||
}
|
||||
else if (path.startsWith("company://"))
|
||||
{
|
||||
tmp_path.remove("company://");
|
||||
p = QETApp::companyElementsDirN() + "/" + tmp_path;
|
||||
}
|
||||
else
|
||||
{
|
||||
tmp_path.remove("custom://");
|
||||
p = QETApp::customElementsDirN() + "/" + tmp_path;
|
||||
@@ -319,19 +319,19 @@ void ElementsLocation::setPath(const QString &path)
|
||||
if(path_.endsWith(".elmt"))
|
||||
{
|
||||
m_file_system_path = path_;
|
||||
if (path_.startsWith(QETApp::commonElementsDirN()))
|
||||
{
|
||||
path_.remove(QETApp::commonElementsDirN()+="/");
|
||||
path_.prepend("common://");
|
||||
m_collection_path = path_;
|
||||
}
|
||||
else if (path_.startsWith(QETApp::companyElementsDirN()))
|
||||
{
|
||||
path_.remove(QETApp::companyElementsDirN()+="/");
|
||||
path_.prepend("company://");
|
||||
m_collection_path = path_;
|
||||
}
|
||||
else if (path_.startsWith(QETApp::customElementsDirN()))
|
||||
if (path_.startsWith(QETApp::commonElementsDirN()))
|
||||
{
|
||||
path_.remove(QETApp::commonElementsDirN()+="/");
|
||||
path_.prepend("common://");
|
||||
m_collection_path = path_;
|
||||
}
|
||||
else if (path_.startsWith(QETApp::companyElementsDirN()))
|
||||
{
|
||||
path_.remove(QETApp::companyElementsDirN()+="/");
|
||||
path_.prepend("company://");
|
||||
m_collection_path = path_;
|
||||
}
|
||||
else if (path_.startsWith(QETApp::customElementsDirN()))
|
||||
{
|
||||
path_.remove(QETApp::customElementsDirN()+="/");
|
||||
path_.prepend("custom://");
|
||||
@@ -341,19 +341,19 @@ void ElementsLocation::setPath(const QString &path)
|
||||
else
|
||||
{
|
||||
m_file_system_path = path_;
|
||||
if (path_.startsWith(QETApp::commonElementsDirN()))
|
||||
{
|
||||
path_.remove(QETApp::commonElementsDirN()+="/");
|
||||
path_.prepend("common://");
|
||||
m_collection_path = path_;
|
||||
}
|
||||
else if (path_.startsWith(QETApp::companyElementsDirN()))
|
||||
{
|
||||
path_.remove(QETApp::companyElementsDirN()+="/");
|
||||
path_.prepend("company://");
|
||||
m_collection_path = path_;
|
||||
}
|
||||
else if (path_.startsWith(QETApp::customElementsDirN()))
|
||||
if (path_.startsWith(QETApp::commonElementsDirN()))
|
||||
{
|
||||
path_.remove(QETApp::commonElementsDirN()+="/");
|
||||
path_.prepend("common://");
|
||||
m_collection_path = path_;
|
||||
}
|
||||
else if (path_.startsWith(QETApp::companyElementsDirN()))
|
||||
{
|
||||
path_.remove(QETApp::companyElementsDirN()+="/");
|
||||
path_.prepend("company://");
|
||||
m_collection_path = path_;
|
||||
}
|
||||
else if (path_.startsWith(QETApp::customElementsDirN()))
|
||||
{
|
||||
path_.remove(QETApp::customElementsDirN()+="/");
|
||||
path_.prepend("custom://");
|
||||
@@ -501,23 +501,23 @@ bool ElementsLocation::isFileSystem() const
|
||||
}
|
||||
|
||||
/**
|
||||
@brief ElementsLocation::isCommonCollection
|
||||
@return
|
||||
True if this location represent an item from the common collection
|
||||
@brief ElementsLocation::isCommonCollection
|
||||
@return
|
||||
True if this location represent an item from the common collection
|
||||
*/
|
||||
bool ElementsLocation::isCommonCollection() const
|
||||
{
|
||||
return fileSystemPath().startsWith(QETApp::commonElementsDirN());
|
||||
return fileSystemPath().startsWith(QETApp::commonElementsDirN());
|
||||
}
|
||||
|
||||
/**
|
||||
@brief ElementsLocation::isCompanyCollection
|
||||
@return
|
||||
True if this location represent an item from the company collection
|
||||
@brief ElementsLocation::isCompanyCollection
|
||||
@return
|
||||
True if this location represent an item from the company collection
|
||||
*/
|
||||
bool ElementsLocation::isCompanyCollection() const
|
||||
{
|
||||
return fileSystemPath().startsWith(QETApp::companyElementsDirN());
|
||||
return fileSystemPath().startsWith(QETApp::companyElementsDirN());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -591,7 +591,7 @@ bool ElementsLocation::isWritable() const
|
||||
/**
|
||||
@brief ElementsLocation::projectCollection
|
||||
@return
|
||||
If this location represente a item in an embedded project collection,
|
||||
If this location represents an item in an embedded project collection,
|
||||
return this collection else return nullptr.
|
||||
*/
|
||||
XmlElementCollection *ElementsLocation::projectCollection() const
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2006-2024 The QElectroTech Team
|
||||
Copyright 2006-2025 The QElectroTech Team
|
||||
This file is part of QElectroTech.
|
||||
|
||||
QElectroTech is free software: you can redistribute it and/or modify
|
||||
@@ -75,9 +75,9 @@ class ElementsLocation
|
||||
bool isElement() const;
|
||||
bool isDirectory() const;
|
||||
bool isFileSystem() const;
|
||||
bool isCommonCollection() const;
|
||||
bool isCompanyCollection() const;
|
||||
bool isCustomCollection() const;
|
||||
bool isCommonCollection() const;
|
||||
bool isCompanyCollection() const;
|
||||
bool isCustomCollection() const;
|
||||
bool isProject() const;
|
||||
bool exist() const;
|
||||
bool isWritable() const;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2006-2024 The QElectroTech Team
|
||||
Copyright 2006-2025 The QElectroTech Team
|
||||
This file is part of QElectroTech.
|
||||
|
||||
QElectroTech is free software: you can redistribute it and/or modify
|
||||
@@ -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
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2006-2024 The QElectroTech Team
|
||||
Copyright 2006-2025 The QElectroTech Team
|
||||
This file is part of QElectroTech.
|
||||
|
||||
QElectroTech is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2006-2024 The QElectroTech Team
|
||||
Copyright 2006-2025 The QElectroTech Team
|
||||
This file is part of QElectroTech.
|
||||
|
||||
QElectroTech is free software: you can redistribute it and/or modify
|
||||
@@ -41,8 +41,8 @@ FileElementCollectionItem::FileElementCollectionItem()
|
||||
@return true if path exist.
|
||||
*/
|
||||
bool FileElementCollectionItem::setRootPath(const QString& path,
|
||||
bool set_data,
|
||||
bool hide_element)
|
||||
bool set_data,
|
||||
bool hide_element)
|
||||
{
|
||||
QDir dir(path);
|
||||
if (dir.exists())
|
||||
@@ -120,11 +120,11 @@ QString FileElementCollectionItem::localName()
|
||||
|
||||
else if (isDir()) {
|
||||
if (isCollectionRoot()) {
|
||||
if (m_path == QETApp::commonElementsDirN())
|
||||
setText(QObject::tr("Collection QET"));
|
||||
else if (m_path == QETApp::companyElementsDirN())
|
||||
setText(QObject::tr("Collection Company"));
|
||||
else if (m_path == QETApp::customElementsDirN())
|
||||
if (m_path == QETApp::commonElementsDirN())
|
||||
setText(QObject::tr("Collection QET"));
|
||||
else if (m_path == QETApp::companyElementsDirN())
|
||||
setText(QObject::tr("Collection Company"));
|
||||
else if (m_path == QETApp::customElementsDirN())
|
||||
setText(QObject::tr("Collection utilisateur"));
|
||||
else
|
||||
setText(QObject::tr("Collection inconnue"));
|
||||
@@ -221,29 +221,29 @@ QString FileElementCollectionItem::collectionPath() const
|
||||
bool FileElementCollectionItem::isCollectionRoot() const
|
||||
{
|
||||
if (m_path == QETApp::commonElementsDirN()
|
||||
|| m_path == QETApp::companyElementsDirN()
|
||||
|| m_path == QETApp::customElementsDirN())
|
||||
return true;
|
||||
|| m_path == QETApp::companyElementsDirN()
|
||||
|| m_path == QETApp::customElementsDirN())
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
@brief FileElementCollectionItem::isCommonCollection
|
||||
@return True if this item represent the common collection
|
||||
@brief FileElementCollectionItem::isCommonCollection
|
||||
@return True if this item represent the common collection
|
||||
*/
|
||||
bool FileElementCollectionItem::isCommonCollection() const
|
||||
{
|
||||
return fileSystemPath().startsWith(QETApp::commonElementsDirN());
|
||||
return fileSystemPath().startsWith(QETApp::commonElementsDirN());
|
||||
}
|
||||
|
||||
/**
|
||||
@brief FileElementCollectionItem::isCompanyCollection
|
||||
@return True if this item represent the company collection
|
||||
@brief FileElementCollectionItem::isCompanyCollection
|
||||
@return True if this item represent the company collection
|
||||
*/
|
||||
bool FileElementCollectionItem::isCompanyCollection() const
|
||||
{
|
||||
return fileSystemPath().startsWith(QETApp::companyElementsDirN());
|
||||
return fileSystemPath().startsWith(QETApp::companyElementsDirN());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -347,8 +347,8 @@ void FileElementCollectionItem::setUpIcon()
|
||||
@param hide_element
|
||||
*/
|
||||
void FileElementCollectionItem::setPathName(const QString& path_name,
|
||||
bool set_data,
|
||||
bool hide_element)
|
||||
bool set_data,
|
||||
bool hide_element)
|
||||
{
|
||||
m_path = path_name;
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2006-2024 The QElectroTech Team
|
||||
Copyright 2006-2025 The QElectroTech Team
|
||||
This file is part of QElectroTech.
|
||||
|
||||
QElectroTech is free software: you can redistribute it and/or modify
|
||||
@@ -47,9 +47,9 @@ class FileElementCollectionItem : public ElementCollectionItem
|
||||
QString name() const override;
|
||||
QString collectionPath() const override;
|
||||
bool isCollectionRoot() const override;
|
||||
bool isCommonCollection() const;
|
||||
bool isCompanyCollection() const;
|
||||
bool isCustomCollection() const;
|
||||
bool isCommonCollection() const;
|
||||
bool isCompanyCollection() const;
|
||||
bool isCustomCollection() const;
|
||||
void addChildAtPath(const QString &collection_name) override;
|
||||
|
||||
void setUpData() override;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2006-2024 The QElectroTech Team
|
||||
Copyright 2006-2025 The QElectroTech Team
|
||||
This file is part of QElectroTech.
|
||||
|
||||
QElectroTech is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2006-2024 The QElectroTech Team
|
||||
Copyright 2006-2025 The QElectroTech Team
|
||||
This file is part of QElectroTech.
|
||||
|
||||
QElectroTech is free software: you can redistribute it and/or modify
|
||||
@@ -23,7 +23,7 @@
|
||||
#include <QDialog>
|
||||
|
||||
namespace Ui {
|
||||
class RenameDialog;
|
||||
class RenameDialog;
|
||||
}
|
||||
|
||||
class RenameDialog : public QDialog
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2006-2024 The QElectroTech Team
|
||||
Copyright 2006-2025 The QElectroTech Team
|
||||
This file is part of QElectroTech.
|
||||
|
||||
QElectroTech is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2006-2024 The QElectroTech Team
|
||||
Copyright 2006-2025 The QElectroTech Team
|
||||
This file is part of QElectroTech.
|
||||
|
||||
QElectroTech is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2006-2024 The QElectroTech Team
|
||||
Copyright 2006-2025 The QElectroTech Team
|
||||
This file is part of QElectroTech.
|
||||
|
||||
QElectroTech is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2006-2024 The QElectroTech Team
|
||||
Copyright 2006-2025 The QElectroTech Team
|
||||
This file is part of QElectroTech.
|
||||
|
||||
QElectroTech is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2006-2024 The QElectroTech Team
|
||||
Copyright 2006-2025 The QElectroTech Team
|
||||
This file is part of QElectroTech.
|
||||
|
||||
QElectroTech is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2006-2024 The QElectroTech Team
|
||||
Copyright 2006-2025 The QElectroTech Team
|
||||
This file is part of QElectroTech.
|
||||
|
||||
QElectroTech is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2006-2024 The QElectroTech Team
|
||||
Copyright 2006-2025 The QElectroTech Team
|
||||
This file is part of QElectroTech.
|
||||
|
||||
QElectroTech is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2006-2024 The QElectroTech Team
|
||||
Copyright 2006-2025 The QElectroTech Team
|
||||
This file is part of QElectroTech.
|
||||
|
||||
QElectroTech is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2006-2024 The QElectroTech Team
|
||||
Copyright 2006-2025 The QElectroTech Team
|
||||
This file is part of QElectroTech.
|
||||
|
||||
QElectroTech is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2006-2024 The QElectroTech Team
|
||||
Copyright 2006-2025 The QElectroTech Team
|
||||
This file is part of QElectroTech.
|
||||
|
||||
QElectroTech is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2006-2024 The QElectroTech Team
|
||||
Copyright 2006-2025 The QElectroTech Team
|
||||
This file is part of QElectroTech.
|
||||
|
||||
QElectroTech is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2006-2024 The QElectroTech Team
|
||||
Copyright 2006-2025 The QElectroTech Team
|
||||
This file is part of QElectroTech.
|
||||
|
||||
QElectroTech is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2006-2024 The QElectroTech Team
|
||||
Copyright 2006-2025 The QElectroTech Team
|
||||
This file is part of QElectroTech.
|
||||
|
||||
QElectroTech is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2006-2024 The QElectroTech Team
|
||||
Copyright 2006-2025 The QElectroTech Team
|
||||
This file is part of QElectroTech.
|
||||
|
||||
QElectroTech is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2006-2024 The QElectroTech Team
|
||||
Copyright 2006-2025 The QElectroTech Team
|
||||
This file is part of QElectroTech.
|
||||
|
||||
QElectroTech is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2006-2024 The QElectroTech Team
|
||||
Copyright 2006-2025 The QElectroTech Team
|
||||
This file is part of QElectroTech.
|
||||
|
||||
QElectroTech is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2006-2024 The QElectroTech Team
|
||||
Copyright 2006-2025 The QElectroTech Team
|
||||
This file is part of QElectroTech.
|
||||
|
||||
QElectroTech is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2006-2024 The QElectroTech Team
|
||||
Copyright 2006-2025 The QElectroTech Team
|
||||
This file is part of QElectroTech.
|
||||
|
||||
QElectroTech is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2006-2024 The QElectroTech Team
|
||||
Copyright 2006-2025 The QElectroTech Team
|
||||
This file is part of QElectroTech.
|
||||
|
||||
QElectroTech is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2006-2024 The QElectroTech Team
|
||||
Copyright 2006-2025 The QElectroTech Team
|
||||
This file is part of QElectroTech.
|
||||
|
||||
QElectroTech is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2006-2024 The QElectroTech Team
|
||||
Copyright 2006-2025 The QElectroTech Team
|
||||
This file is part of QElectroTech.
|
||||
|
||||
QElectroTech is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2006-2024 The QElectroTech Team
|
||||
Copyright 2006-2025 The QElectroTech Team
|
||||
This file is part of QElectroTech.
|
||||
|
||||
QElectroTech is free software: you can redistribute it and/or modify
|
||||
@@ -195,10 +195,10 @@ QRectF QetGraphicsHandlerUtility::mirrorRectForPosAtIndex(
|
||||
*/
|
||||
QRectF QetGraphicsHandlerUtility::rectForArc(const QRectF &rect, qreal start_angle, qreal span_angle)
|
||||
{
|
||||
QPainterPath path;
|
||||
path.arcMoveTo(rect, start_angle);
|
||||
path.arcTo(rect, start_angle, span_angle);
|
||||
return path.boundingRect();
|
||||
QPainterPath path;
|
||||
path.arcMoveTo(rect, start_angle);
|
||||
path.arcTo(rect, start_angle, span_angle);
|
||||
return path.boundingRect();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2006-2024 The QElectroTech Team
|
||||
Copyright 2006-2025 The QElectroTech Team
|
||||
This file is part of QElectroTech.
|
||||
|
||||
QElectroTech is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2006-2024 The QElectroTech Team
|
||||
Copyright 2006-2025 The QElectroTech Team
|
||||
This file is part of QElectroTech.
|
||||
|
||||
QElectroTech is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2006-2024 The QElectroTech Team
|
||||
Copyright 2006-2025 The QElectroTech Team
|
||||
This file is part of QElectroTech.
|
||||
|
||||
QElectroTech is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2006-2024 The QElectroTech Team
|
||||
Copyright 2006-2025 The QElectroTech Team
|
||||
This file is part of QElectroTech.
|
||||
|
||||
QElectroTech is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2006-2024 The QElectroTech Team
|
||||
Copyright 2006-2025 The QElectroTech Team
|
||||
This file is part of QElectroTech.
|
||||
|
||||
QElectroTech is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2006-2024 The QElectroTech Team
|
||||
Copyright 2006-2025 The QElectroTech Team
|
||||
This file is part of QElectroTech.
|
||||
|
||||
QElectroTech is free software: you can redistribute it and/or modify
|
||||
@@ -124,7 +124,7 @@ void ReplaceConductorDialog::setProperties(const ConductorProperties &properties
|
||||
ui->m_pen_cb ->setChecked (m_properties.singleLineProperties.isPen());
|
||||
ui->m_phase_cb ->setChecked (m_properties.singleLineProperties.phasesCount());
|
||||
ui->m_phase_slider->setValue (m_properties.singleLineProperties.phasesCount());
|
||||
|
||||
|
||||
updatePreview(false);
|
||||
}
|
||||
|
||||
@@ -252,7 +252,7 @@ void ReplaceConductorDialog::setColorButton2(const QColor &color)
|
||||
|
||||
void ReplaceConductorDialog::on_m_erase_formula_cb_clicked()
|
||||
{
|
||||
ui->m_formula_le->setText(ui->m_erase_formula_cb->isChecked()
|
||||
ui->m_formula_le->setText(ui->m_erase_formula_cb->isChecked()
|
||||
? SearchAndReplaceWorker::eraseText()
|
||||
: QString());
|
||||
ui->m_formula_le->setDisabled(ui->m_erase_formula_cb->isChecked());
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2006-2024 The QElectroTech Team
|
||||
Copyright 2006-2025 The QElectroTech Team
|
||||
This file is part of QElectroTech.
|
||||
|
||||
QElectroTech is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2006-2024 The QElectroTech Team
|
||||
Copyright 2006-2025 The QElectroTech Team
|
||||
This file is part of QElectroTech.
|
||||
|
||||
QElectroTech is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2006-2024 The QElectroTech Team
|
||||
Copyright 2006-2025 The QElectroTech Team
|
||||
This file is part of QElectroTech.
|
||||
|
||||
QElectroTech is free software: you can redistribute it and/or modify
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user