Compare commits

..

1 Commits

Author SHA1 Message Date
Laurent Trinques f4ac69a805 Revert "some minor changes" 2024-04-10 14:31:01 +02:00
604 changed files with 11688 additions and 19262 deletions
+1 -1
View File
@@ -146,7 +146,7 @@ install(DIRECTORY elements DESTINATION share/qelectrotech)
install(DIRECTORY examples DESTINATION share/qelectrotech) install(DIRECTORY examples DESTINATION share/qelectrotech)
install(DIRECTORY titleblocks DESTINATION share/qelectrotech) install(DIRECTORY titleblocks DESTINATION share/qelectrotech)
install(FILES LICENSE ELEMENTS.LICENSE CREDIT README ChangeLog DESTINATION share/doc/qelectrotech) install(FILES LICENSE ELEMENTS.LICENSE CREDIT README ChangeLog DESTINATION share/doc/qelectrotech)
install(FILES misc/org.qelectrotech.qelectrotech.desktop DESTINATION share/applications) install(FILES misc/qelectrotech.desktop DESTINATION share/applications)
install(FILES misc/qelectrotech.xml DESTINATION share/mime/packages) install(FILES misc/qelectrotech.xml DESTINATION share/mime/packages)
install(FILES misc/qelectrotech.appdata.xml DESTINATION ${QET_APPDATA_PATH}) install(FILES misc/qelectrotech.appdata.xml DESTINATION ${QET_APPDATA_PATH})
install(FILES ${QM_FILES} DESTINATION ${QET_LANG_PATH}) install(FILES ${QM_FILES} DESTINATION ${QET_LANG_PATH})
+2
View File
@@ -7,6 +7,8 @@
Everyone is permitted to copy and distribute verbatim copies Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed. of this license document, but changing it is not allowed.
Permission is not granted to use this software or any of the associated files
as sample data for the purposes of building machine learning models.
Preamble Preamble
+5 -2
View File
@@ -18,7 +18,7 @@ The main goal of the developers is to provide a libre, easy to use and effective
The current stable version is 0.90 and was released on 2023.01.06. The current stable version is 0.90 and was released on 2023.01.06.
Once it has been officially released, the stable version is always frozen and is no longer developed. Once it has been officially released, the stable version is always frozen and is no longer developed.
New functionalities, bug and issue fixings are further made in the development version (currently 0.100), which can also be [downloaded](https://qelectrotech.org/download.php). 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).
Users who want to test and take benefits from the last software implementations should use the development version. But... use it at your own risk, since things are sometimes broken or only partially implemented until they are done! Users who want to test and take benefits from the last software implementations should use the development version. But... use it at your own risk, since things are sometimes broken or only partially implemented until they are done!
@@ -26,7 +26,10 @@ Users who want to test and take benefits from the last software implementations
The software is licensed under [GNU/GPL](https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html). The software is licensed under [GNU/GPL](https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html).
You are free to use, copy, modify and redistribute it under the terms of the license. You are free to use, copy, modify and redistribute it under the terms of the license.
```txt
Permission is not granted to use this software or any of the associated files
as sample data for the purposes of building machine learning models.
```
Like many other open source software, QElectroTech is provided as is, without any warranty. Like many other open source software, QElectroTech is provided as is, without any warranty.
### Development / technical choices ### Development / technical choices
@@ -1,11 +1,11 @@
{ {
"id": "org.qelectrotech.QElectroTech", "id": "org.qelectrotech.QElectroTech",
"base-version": "5.15-23.08", "base-version": "5.15-22.08",
"runtime": "org.kde.Platform", "runtime": "org.kde.Platform",
"runtime-version": "5.15-23.08", "runtime-version": "5.15-22.08",
"sdk": "org.kde.Sdk", "sdk": "org.kde.Sdk",
"command": "qelectrotech", "command": "qelectrotech",
"rename-desktop-file": "org.qelectrotech.qelectrotech.desktop", "rename-desktop-file": "qelectrotech.desktop",
"rename-appdata-file": "qelectrotech.appdata.xml", "rename-appdata-file": "qelectrotech.appdata.xml",
"rename-icon": "qelectrotech", "rename-icon": "qelectrotech",
"copy-icon": true, "copy-icon": true,
@@ -9,6 +9,8 @@ if [ ! -d "$to" ] && [ -d "$from" ]; then
cp -av "$from/." "$to" cp -av "$from/." "$to"
fi fi
# link DXFtoQET so that QET finds it
mkdir -p "$HOME/.qet"
ln -snf "$SNAP/bin/DXFtoQET" "$HOME/.qet/DXFtoQET"
exec "${@}" exec "${@}"
+19 -4
View File
@@ -29,7 +29,7 @@ apps:
common-id: qelectrotech.desktop common-id: qelectrotech.desktop
extensions: extensions:
- kde-neon - kde-neon
plugs: &plugs [opengl, unity7, home, removable-media, gsettings, network, cups-control, wayland, x11] plugs: &plugs [opengl, unity7, home, removable-media, gsettings, network, cups-control]
environment: &env environment: &env
TCL_LIBRARY: $SNAP/usr/share/tcltk/tcl8.6 TCL_LIBRARY: $SNAP/usr/share/tcltk/tcl8.6
HOME: $SNAP_USER_COMMON HOME: $SNAP_USER_COMMON
@@ -42,6 +42,12 @@ apps:
plugs: *plugs plugs: *plugs
environment: *env environment: *env
dxf-to-qet:
command: bin/DXFtoQET
extensions:
- kde-neon
plugs: *plugs
environment: *env
parts: parts:
launchers: launchers:
@@ -71,6 +77,15 @@ parts:
override-build: | override-build: |
rsync -a --ignore-existing /snap/kf5-5-110-qt-5-15-11-core22-sdk/current/ / rsync -a --ignore-existing /snap/kf5-5-110-qt-5-15-11-core22-sdk/current/ /
dxf-to-qet:
after: [kde-sdk-setup]
plugin: nil
source: https://github.com/qelectrotech/DXFtoQET-2020.git
override-build: |
qmake "$CRAFT_PART_SRC/DXFtoQET.pro"
make -j$(nproc)
mkdir -p "$CRAFT_PART_INSTALL/bin"
cp DXFtoQET "$CRAFT_PART_INSTALL/bin/"
qelectrotech: qelectrotech:
after: [kde-sdk-setup] after: [kde-sdk-setup]
@@ -81,7 +96,7 @@ parts:
- git - git
- libsqlite3-dev - libsqlite3-dev
override-build: | override-build: |
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') displayed_version=$(cat sources/qetversion.cpp | grep "return QVersionNumber{ 0, "| head -n 1| cut -c32-40| sed -e 's/,/./g' -e 's/ //g')
snap_version="${displayed_version}-g$(git rev-parse --short=8 HEAD)" snap_version="${displayed_version}-g$(git rev-parse --short=8 HEAD)"
modified_displayed_version="${snap_version}.snap" modified_displayed_version="${snap_version}.snap"
sed -i -E "s|const QString displayedVersion =.*|const QString displayedVersion =\"$modified_displayed_version\";|" sources/qet.h sed -i -E "s|const QString displayedVersion =.*|const QString displayedVersion =\"$modified_displayed_version\";|" sources/qet.h
@@ -93,10 +108,10 @@ parts:
craftctl default craftctl default
# patch desktop file with correct icon path # patch desktop file with correct icon path
SED_CMD="sed -i -E s|^Icon=(.*)|Icon=\${SNAP}/usr/local/share/icons/hicolor/128x128/apps/\1.png|g" SED_CMD="sed -i -E s|^Icon=(.*)|Icon=\${SNAP}/usr/local/share/icons/hicolor/128x128/apps/\1.png|g"
$SED_CMD usr/local/share/applications/org.qelectrotech.qelectrotech.desktop $SED_CMD usr/local/share/applications/qelectrotech.desktop
cleanup: cleanup:
after: [qelectrotech, qet-tb-generator] after: [qelectrotech, dxf-to-qet, qet-tb-generator]
plugin: nil plugin: nil
build-snaps: [kf5-5-110-qt-5-15-11-core22] build-snaps: [kf5-5-110-qt-5-15-11-core22]
override-prime: | override-prime: |
+2 -2
View File
@@ -266,13 +266,13 @@ Section ""
; write file associations registry keys ; write file associations registry keys
WriteRegStr HKEY_CLASSES_ROOT "Applications\qelectrotech.exe\shell\open\command" "" "$\"$final_qet_exe$\" $\"%1$\"" WriteRegStr HKEY_CLASSES_ROOT "Applications\qelectrotech.exe\shell\open\command" "" "$\"$final_qet_exe$\" $\"%1$\""
WriteRegStr HKEY_CLASSES_ROOT ".qet" "" "qet_diagram_file" WriteRegStr HKEY_CLASSES_ROOT ".qet" "" "qet_diagram_file"
WriteRegStr HKEY_CLASSES_ROOT "qet_diagram_file" "" "Diagram QET" WriteRegStr HKEY_CLASSES_ROOT "qet_diagram_file" "" "Schéma QET"
WriteRegDWORD HKEY_CLASSES_ROOT "qet_diagram_file" "EditFlags" 0x00000000 WriteRegDWORD HKEY_CLASSES_ROOT "qet_diagram_file" "EditFlags" 0x00000000
WriteRegDWORD HKEY_CLASSES_ROOT "qet_diagram_file" "BrowserFlags" 0x00000008 WriteRegDWORD HKEY_CLASSES_ROOT "qet_diagram_file" "BrowserFlags" 0x00000008
WriteRegStr HKEY_CLASSES_ROOT "qet_diagram_file\DefaultIcon" "" "$final_project_ico" WriteRegStr HKEY_CLASSES_ROOT "qet_diagram_file\DefaultIcon" "" "$final_project_ico"
WriteRegStr HKEY_CLASSES_ROOT "qet_diagram_file\shell\open\command" "" "$\"$final_qet_exe$\" $\"%1$\"" WriteRegStr HKEY_CLASSES_ROOT "qet_diagram_file\shell\open\command" "" "$\"$final_qet_exe$\" $\"%1$\""
WriteRegStr HKEY_CLASSES_ROOT ".elmt" "" "qet_element_file" WriteRegStr HKEY_CLASSES_ROOT ".elmt" "" "qet_element_file"
WriteRegStr HKEY_CLASSES_ROOT "qet_element_file" "" "Element QET" WriteRegStr HKEY_CLASSES_ROOT "qet_element_file" "" "Élément QET"
WriteRegDWORD HKEY_CLASSES_ROOT "qet_element_file" "EditFlags" 0x00000000 WriteRegDWORD HKEY_CLASSES_ROOT "qet_element_file" "EditFlags" 0x00000000
WriteRegDWORD HKEY_CLASSES_ROOT "qet_element_file" "BrowserFlags" 0x00000008 WriteRegDWORD HKEY_CLASSES_ROOT "qet_element_file" "BrowserFlags" 0x00000008
WriteRegStr HKEY_CLASSES_ROOT "qet_element_file\DefaultIcon" "" "$final_element_ico" WriteRegStr HKEY_CLASSES_ROOT "qet_element_file\DefaultIcon" "" "$final_element_ico"
-3
View File
@@ -258,9 +258,6 @@ set(QET_SRC_FILES
${QET_DIR}/sources/dxf/dxftoelmt.cpp ${QET_DIR}/sources/dxf/dxftoelmt.cpp
${QET_DIR}/sources/dxf/dxftoelmt.h ${QET_DIR}/sources/dxf/dxftoelmt.h
${QET_DIR}/sources/qet_elementscaler/qet_elementscaler.cpp
${QET_DIR}/sources/qet_elementscaler/qet_elementscaler.h
${QET_DIR}/sources/editor/arceditor.cpp ${QET_DIR}/sources/editor/arceditor.cpp
${QET_DIR}/sources/editor/arceditor.h ${QET_DIR}/sources/editor/arceditor.h
${QET_DIR}/sources/editor/editorcommands.cpp ${QET_DIR}/sources/editor/editorcommands.cpp
+264 -513
View File
File diff suppressed because it is too large Load Diff
BIN
View File
Binary file not shown.
+591 -868
View File
File diff suppressed because it is too large Load Diff
+264 -513
View File
File diff suppressed because it is too large Load Diff
+262 -511
View File
File diff suppressed because it is too large Load Diff
+262 -511
View File
File diff suppressed because it is too large Load Diff
BIN
View File
Binary file not shown.
+276 -543
View File
File diff suppressed because it is too large Load Diff
+262 -511
View File
File diff suppressed because it is too large Load Diff
BIN
View File
Binary file not shown.
+265 -534
View File
File diff suppressed because it is too large Load Diff
BIN
View File
Binary file not shown.
+602 -852
View File
File diff suppressed because it is too large Load Diff
BIN
View File
Binary file not shown.
+265 -516
View File
File diff suppressed because it is too large Load Diff
+262 -511
View File
File diff suppressed because it is too large Load Diff
+261 -510
View File
File diff suppressed because it is too large Load Diff
+263 -512
View File
File diff suppressed because it is too large Load Diff
+261 -510
View File
File diff suppressed because it is too large Load Diff
+261 -510
View File
File diff suppressed because it is too large Load Diff
+261 -510
View File
File diff suppressed because it is too large Load Diff
+289 -511
View File
File diff suppressed because it is too large Load Diff
BIN
View File
Binary file not shown.
+311 -594
View File
File diff suppressed because it is too large Load Diff
+259 -508
View File
File diff suppressed because it is too large Load Diff
BIN
View File
Binary file not shown.
+312 -582
View File
File diff suppressed because it is too large Load Diff
+262 -511
View File
File diff suppressed because it is too large Load Diff
+264 -513
View File
File diff suppressed because it is too large Load Diff
+261 -510
View File
File diff suppressed because it is too large Load Diff
+275 -524
View File
File diff suppressed because it is too large Load Diff
+275 -524
View File
File diff suppressed because it is too large Load Diff
+261 -510
View File
File diff suppressed because it is too large Load Diff
+261 -510
View File
File diff suppressed because it is too large Load Diff
+261 -510
View File
File diff suppressed because it is too large Load Diff
+1 -2
View File
@@ -89,8 +89,7 @@ A=$(git rev-list HEAD --count)
HEAD=$(($A+473)) HEAD=$(($A+473))
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
#VERSION=$(cat sources/qetversion.cpp | grep "return QVersionNumber{ 0, "| head -n 1| cut -c25-35| sed -e 's/,/./g' -e 's/ //g') #Find major, minor, and micro version numbers in sources/qetversion.cp
# Dmg de la dernière revision déjà créé # Dmg de la dernière revision déjà créé
if [ -e "build-aux/mac-osx/${APPNAME} $VERSION r$HEAD.dmg" ] ; then if [ -e "build-aux/mac-osx/${APPNAME} $VERSION r$HEAD.dmg" ] ; then
+1 -2
View File
@@ -84,8 +84,7 @@ A=$(git rev-list HEAD --count)
HEAD=$(($A+473)) HEAD=$(($A+473))
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
#VERSION=$(cat sources/qetversion.cpp | grep "return QVersionNumber{ 0, "| head -n 1| cut -c32-40| sed -e 's/,/./g' -e 's/ //g') #Find major, minor, and micro version numbers in sources/qetversion.cp
# Tarball de la dernière revision déjà créé # Tarball de la dernière revision déjà créé
if [ -e "build-aux/mac-osx/${APPNAME}-$VERSION-r$HEAD-arm64.zip" ] ; then if [ -e "build-aux/mac-osx/${APPNAME}-$VERSION-r$HEAD-arm64.zip" ] ; then
+1 -1
View File
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright 2006-2025 The QElectroTech Team --> <!-- Copyright 2006-2024 The QElectroTech Team -->
<application> <application>
<id type="desktop">qelectrotech.desktop</id> <id type="desktop">qelectrotech.desktop</id>
<metadata_license>MIT</metadata_license> <metadata_license>MIT</metadata_license>
+1 -1
View File
@@ -33,7 +33,7 @@ my $no = '[no]';
my $todo = 'TODO'; my $todo = 'TODO';
our $default_language = 'fr'; our $default_language = 'fr';
our @misc_desktop_files = qw(misc/org.qelectrotech.qelectrotech.desktop); our @misc_desktop_files = qw(misc/qelectrotech.desktop);
our @misc_xml_files = qw(misc/qelectrotech.xml); our @misc_xml_files = qw(misc/qelectrotech.xml);
our @readme_files = qw(CREDIT README INSTALL ELEMENTS.LICENSE build-aux/linux/fedora/README.elements); our @readme_files = qw(CREDIT README INSTALL ELEMENTS.LICENSE build-aux/linux/fedora/README.elements);
our @ordered_languages = qw(fr en es pt cs pl ca de it ar sl hr el nl be ru ro da pt_BR hu sr tr nb ja mn uk zh); our @ordered_languages = qw(fr en es pt cs pl ca de it ar sl hr el nl be ru ro da pt_BR hu sr tr nb ja mn uk zh);
+3 -5
View File
@@ -21,9 +21,7 @@ A=$(git rev-list HEAD --count)
HEAD=$(($A+473)) HEAD=$(($A+473))
#Find major, minor, and micro version numbers in sources/qetversion.cp #Find major, minor, and micro version numbers in sources/qetversion.cp
tagName=$(cat sources/qetversion.cpp | grep "return QVersionNumber{ 0, "| head -n 1| cut -c32-40| sed -e 's/,/./g' -e 's/ //g') #Find major, minor, and micro version numbers in sources/qetversion.cp
tagName=$(cat sources/qetversion.cpp | grep "return QVersionNumber{"| head -n 1| awk -F "{" '{ print $2 }' | awk -F "}" '{ print $1 }' | sed -e 's/,/./g' -e 's/ //g')
#tagName=$(cat sources/qetversion.cpp | grep "return QVersionNumber{ 0, "| head -n 1| cut -c32-40| sed -e 's/,/./g' -e 's/ //g') #Find major, minor, and micro version numbers in sources/qetversion.cp
rm -Rf build/ rm -Rf build/
mkdir build && cd build mkdir build && cd build
@@ -39,9 +37,9 @@ rm -Rf qelectrotech/usr/share/{elements,examples,titleblocks,lang,man,doc}
cp ../build/qelectrotech qelectrotech/usr/bin/ cp ../build/qelectrotech qelectrotech/usr/bin/
cp -r ../{elements,examples,titleblocks,lang,man} qelectrotech/usr/share/ cp -r ../{elements,examples,titleblocks,lang,man} qelectrotech/usr/share/
./linuxdeployqt-continuous-x86_64.AppImage qelectrotech/usr/share/org.qelectrotech.qelectrotech.desktop -appimage -bundle-non-qt-libs -verbose=1 -extra-plugins=iconengines ./linuxdeployqt-continuous-x86_64.AppImage qelectrotech/usr/share/qelectrotech.desktop -appimage -bundle-non-qt-libs -verbose=1 -extra-plugins=iconengines
rm qelectrotech/AppRun rm qelectrotech/AppRun
sed -i 's/'"QElectroTech_*.*/QElectroTech_$tagName-r$HEAD"'/' qelectrotech/org.qelectrotech.qelectrotech.desktop sed -i 's/'"QElectroTech_*.*/QElectroTech_$tagName-r$HEAD"'/' qelectrotech/qelectrotech.desktop
cp AppRun qelectrotech/ cp AppRun qelectrotech/
rm QElectroTech_*.AppImage rm QElectroTech_*.AppImage
+1 -2
View File
@@ -31,8 +31,7 @@ if [ -z "$HEAD" ] ; then
fi fi
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
#VERSION=$(cat sources/qetversion.cpp | grep "return QVersionNumber{ 0, "| head -n 1| cut -c32-40| sed -e 's/,/./g' -e 's/ //g') #Find major, minor, and micro version numbers in sources/qetversion.cp
#clean /var/cache/pbuilder/ .. / result/debs #clean /var/cache/pbuilder/ .. / result/debs
+1 -2
View File
@@ -16,8 +16,7 @@ git pull --recurse-submodules
# get the number of the new revision # get the number of the new revision
GITCOMMIT=$(git rev-parse --short HEAD) GITCOMMIT=$(git rev-parse --short HEAD)
tagName=$(cat sources/qetversion.cpp | grep "return QVersionNumber{"| 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
#tagName=$(cat sources/qetversion.cpp | grep "return QVersionNumber{ 0, "| head -n 1| cut -c32-40| sed -e 's/,/./g' -e 's/ //g') #Find major, minor, and micro version numbers in sources/qetversion.cp
cd ~ cd ~
flatpak-builder --force-clean --ccache --repo=qet_git/0.8-dev qet_git/build-dir qet_git/build-aux/flatpak/org.qelectrotech.QElectroTech.json --gpg-sign=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX --gpg-homedir=gpg flatpak-builder --force-clean --ccache --repo=qet_git/0.8-dev qet_git/build-dir qet_git/build-aux/flatpak/org.qelectrotech.QElectroTech.json --gpg-sign=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX --gpg-homedir=gpg
+3 -5
View File
@@ -166,8 +166,7 @@ HEADERS += $$files(sources/*.h) \
$$files(sources/TerminalStrip/GraphicsItem/*.h) \ $$files(sources/TerminalStrip/GraphicsItem/*.h) \
$$files(sources/TerminalStrip/GraphicsItem/properties/*.h) \ $$files(sources/TerminalStrip/GraphicsItem/properties/*.h) \
$$files(sources/xml/*.h) \ $$files(sources/xml/*.h) \
$$files(sources/dxf/*.h) \ $$files(sources/dxf/*.h)
$$files(sources/qet_elementscaler/*.h)
SOURCES += $$files(sources/*.cpp) \ SOURCES += $$files(sources/*.cpp) \
$$files(sources/editor/*.cpp) \ $$files(sources/editor/*.cpp) \
@@ -209,8 +208,7 @@ SOURCES += $$files(sources/*.cpp) \
$$files(sources/TerminalStrip/GraphicsItem/*.cpp) \ $$files(sources/TerminalStrip/GraphicsItem/*.cpp) \
$$files(sources/TerminalStrip/GraphicsItem/properties/*.cpp) \ $$files(sources/TerminalStrip/GraphicsItem/properties/*.cpp) \
$$files(sources/xml/*.cpp) \ $$files(sources/xml/*.cpp) \
$$files(sources/dxf/*.cpp) \ $$files(sources/dxf/*.cpp)
$$files(sources/qet_elementscaler/*.cpp)
# Needed for use promote QTreeWidget in terminalstripeditor.ui # Needed for use promote QTreeWidget in terminalstripeditor.ui
INCLUDEPATH += sources/TerminalStrip/ui INCLUDEPATH += sources/TerminalStrip/ui
@@ -281,7 +279,7 @@ mime_package.path = $$join(INSTALL_PREFIX,,,$${QET_MIME_PACKAGE_PATH})
mime_package.files = misc/qelectrotech.xml mime_package.files = misc/qelectrotech.xml
desktop.path = $$join(INSTALL_PREFIX,,,$${QET_DESKTOP_PATH}) desktop.path = $$join(INSTALL_PREFIX,,,$${QET_DESKTOP_PATH})
desktop.files = misc/org.qelectrotech.qelectrotech.desktop desktop.files = misc/qelectrotech.desktop
appdata.path = $$join(INSTALL_PREFIX,,,$${QET_APPDATA_PATH}) appdata.path = $$join(INSTALL_PREFIX,,,$${QET_APPDATA_PATH})
appdata.files = misc/qelectrotech.appdata.xml appdata.files = misc/qelectrotech.appdata.xml
@@ -1,5 +1,5 @@
/* /*
Copyright 2006-2025 The QElectroTech Team Copyright 2006-2024 The QElectroTech Team
This file is part of QElectroTech. This file is part of QElectroTech.
QElectroTech is free software: you can redistribute it and/or modify QElectroTech is free software: you can redistribute it and/or modify
@@ -399,7 +399,7 @@ ElementsLocation ElementCollectionHandler::createDir(ElementsLocation &parent, c
@brief ElementCollectionHandler::importFromProject @brief ElementCollectionHandler::importFromProject
Import the element represented by location to the embedded collection Import the element represented by location to the embedded collection
of project at the same path. of project at the same path.
location must represent an element owned by a project embedded collection location must represente an element owned by a project embedded collection
@param project : project where copy the element @param project : project where copy the element
@param location : location to copy @param location : location to copy
@return true if import with success @return true if import with success
@@ -1,5 +1,5 @@
/* /*
Copyright 2006-2025 The QElectroTech Team Copyright 2006-2024 The QElectroTech Team
This file is part of QElectroTech. This file is part of QElectroTech.
QElectroTech is free software: you can redistribute it and/or modify QElectroTech is free software: you can redistribute it and/or modify
@@ -1,5 +1,5 @@
/* /*
Copyright 2006-2025 The QElectroTech Team Copyright 2006-2024 The QElectroTech Team
This file is part of QElectroTech. This file is part of QElectroTech.
QElectroTech is free software: you can redistribute it and/or modify QElectroTech is free software: you can redistribute it and/or modify
@@ -1,5 +1,5 @@
/* /*
Copyright 2006-2025 The QElectroTech Team Copyright 2006-2024 The QElectroTech Team
This file is part of QElectroTech. This file is part of QElectroTech.
QElectroTech is free software: you can redistribute it and/or modify QElectroTech is free software: you can redistribute it and/or modify
@@ -1,5 +1,5 @@
/* /*
Copyright 2006-2025 The QElectroTech Team Copyright 2006-2024 The QElectroTech Team
This file is part of QElectroTech. This file is part of QElectroTech.
QElectroTech is free software: you can redistribute it and/or modify QElectroTech is free software: you can redistribute it and/or modify
@@ -111,10 +111,10 @@ QStringList ElementsCollectionModel::mimeTypes() const
@return @return
*/ */
bool ElementsCollectionModel::canDropMimeData(const QMimeData *data, bool ElementsCollectionModel::canDropMimeData(const QMimeData *data,
Qt::DropAction action, Qt::DropAction action,
int row, int row,
int column, int column,
const QModelIndex &parent) const const QModelIndex &parent) const
{ {
if (!(QStandardItemModel::canDropMimeData(data, if (!(QStandardItemModel::canDropMimeData(data,
action, action,
@@ -258,9 +258,9 @@ bool ElementsCollectionModel::dropMimeData(const QMimeData *data,
@param projects : list of projects to load @param projects : list of projects to load
*/ */
void ElementsCollectionModel::loadCollections(bool common_collection, void ElementsCollectionModel::loadCollections(bool common_collection,
bool company_collection, bool company_collection,
bool custom_collection, bool custom_collection,
QList<QETProject *> projects) QList<QETProject *> projects)
{ {
m_items_list_to_setUp.clear(); m_items_list_to_setUp.clear();
@@ -313,8 +313,8 @@ void ElementsCollectionModel::addCommonCollection(bool set_data)
{ {
FileElementCollectionItem *feci = new FileElementCollectionItem(); FileElementCollectionItem *feci = new FileElementCollectionItem();
if (feci->setRootPath(QETApp::commonElementsDirN(), if (feci->setRootPath(QETApp::commonElementsDirN(),
set_data, set_data,
m_hide_element)) { m_hide_element)) {
invisibleRootItem()->appendRow(feci); invisibleRootItem()->appendRow(feci);
if (set_data) if (set_data)
feci->setUpData(); feci->setUpData();
@@ -324,41 +324,41 @@ void ElementsCollectionModel::addCommonCollection(bool set_data)
} }
/** /**
@brief ElementsCollectionModel::addCompanyCollection @brief ElementsCollectionModel::addCompanyCollection
Add the company elements collection to this model Add the company elements collection to this model
@param set_data @param set_data
*/ */
void ElementsCollectionModel::addCompanyCollection(bool set_data) void ElementsCollectionModel::addCompanyCollection(bool set_data)
{ {
FileElementCollectionItem *feci = new FileElementCollectionItem(); FileElementCollectionItem *feci = new FileElementCollectionItem();
if (feci->setRootPath(QETApp::companyElementsDirN(), if (feci->setRootPath(QETApp::companyElementsDirN(),
set_data, set_data,
m_hide_element)) { m_hide_element)) {
invisibleRootItem()->appendRow(feci); invisibleRootItem()->appendRow(feci);
if (set_data) if (set_data)
feci->setUpData(); feci->setUpData();
} }
else else
delete feci; delete feci;
} }
/** /**
@brief ElementsCollectionModel::addCustomCollection @brief ElementsCollectionModel::addCustomCollection
Add the custom elements collection to this model Add the custom elements collection to this model
@param set_data @param set_data
*/ */
void ElementsCollectionModel::addCustomCollection(bool set_data) void ElementsCollectionModel::addCustomCollection(bool set_data)
{ {
FileElementCollectionItem *feci = new FileElementCollectionItem(); FileElementCollectionItem *feci = new FileElementCollectionItem();
if (feci->setRootPath(QETApp::customElementsDirN(), if (feci->setRootPath(QETApp::customElementsDirN(),
set_data, set_data,
m_hide_element)) { m_hide_element)) {
invisibleRootItem()->appendRow(feci); invisibleRootItem()->appendRow(feci);
if (set_data) if (set_data)
feci->setUpData(); feci->setUpData();
} }
else else
delete feci; delete feci;
} }
/** /**
@@ -579,9 +579,9 @@ QModelIndex ElementsCollectionModel::indexFromLocation(
{ {
QList <ElementCollectionItem *> child_list; 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))); child_list.append(static_cast<ElementCollectionItem *>(item(i)));
} }
foreach(ElementCollectionItem *eci, child_list) { foreach(ElementCollectionItem *eci, child_list) {
@@ -590,8 +590,8 @@ QModelIndex ElementsCollectionModel::indexFromLocation(
if (eci->type() == FileElementCollectionItem::Type) { if (eci->type() == FileElementCollectionItem::Type) {
if (FileElementCollectionItem *feci = static_cast<FileElementCollectionItem *>(eci)) { if (FileElementCollectionItem *feci = static_cast<FileElementCollectionItem *>(eci)) {
if ( (location.isCommonCollection() && feci->isCommonCollection()) || if ( (location.isCommonCollection() && feci->isCommonCollection()) ||
(location.isCompanyCollection() && feci->isCompanyCollection()) || (location.isCompanyCollection() && feci->isCompanyCollection()) ||
(location.isCustomCollection() && !feci->isCommonCollection()) ) { (location.isCustomCollection() && !feci->isCommonCollection()) ) {
match_eci = feci->itemAtPath(location.collectionPath(false)); match_eci = feci->itemAtPath(location.collectionPath(false));
} }
} }
@@ -1,5 +1,5 @@
/* /*
Copyright 2006-2025 The QElectroTech Team Copyright 2006-2024 The QElectroTech Team
This file is part of QElectroTech. This file is part of QElectroTech.
QElectroTech is free software: you can redistribute it and/or modify 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 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; 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 addCommonCollection(bool set_data = true);
void addCompanyCollection(bool set_data = true); void addCompanyCollection(bool set_data = true);
void addCustomCollection(bool set_data = true); void addCustomCollection(bool set_data = true);
void addLocation(const ElementsLocation& location); void addLocation(const ElementsLocation& location);
void addProject(QETProject *project, bool set_data = true); void addProject(QETProject *project, bool set_data = true);
@@ -1,5 +1,5 @@
/* /*
Copyright 2006-2025 The QElectroTech Team Copyright 2006-2024 The QElectroTech Team
This file is part of QElectroTech. This file is part of QElectroTech.
QElectroTech is free software: you can redistribute it and/or modify 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_progress_bar->show();
m_tree_view->setDisabled(true); m_tree_view->setDisabled(true);
QList <QETProject *> prj; prj.append(project); QList <QETProject *> prj; prj.append(project);
m_model->loadCollections(false, false, false, prj); m_model->loadCollections(false, false, false, prj);
} }
else { else {
m_waiting_project.append(project); m_waiting_project.append(project);
@@ -148,26 +148,26 @@ void ElementsCollectionWidget::setUpAction()
m_open_dir = new QAction(QET::Icons::FolderOpen, m_open_dir = new QAction(QET::Icons::FolderOpen,
tr("Ouvrir le dossier correspondant"), this); tr("Ouvrir le dossier correspondant"), this);
m_edit_element = new QAction(QET::Icons::ElementEdit, 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, 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, m_delete_dir = new QAction(QET::Icons::FolderDelete,
tr("Supprimer le dossier"), this); tr("Supprimer le dossier"), this);
m_reload = new QAction(QET::Icons::ViewRefresh, 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, m_edit_dir = new QAction(QET::Icons::FolderEdit,
tr("Éditer le dossier"), this); tr("Éditer le dossier"), this);
m_new_directory = new QAction(QET::Icons::FolderNew, m_new_directory = new QAction(QET::Icons::FolderNew,
tr("Nouveau dossier"), this); tr("Nouveau dossier"), this);
m_new_element = new QAction(QET::Icons::ElementNew, 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, m_show_this_dir = new QAction(QET::Icons::FolderOnlyThis,
tr("Afficher uniquement ce dossier"), tr("Afficher uniquement ce dossier"),
this); this);
m_show_all_dir = new QAction(QET::Icons::FolderShowAll, 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, 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()); ElementsLocation loc(eci->collectionPath());
if (! (loc.isElement() if (! (loc.isElement()
&& loc.exist() && loc.exist()
&& loc.isFileSystem() && loc.isFileSystem()
&& (loc.collectionPath().startsWith("company://") && (loc.collectionPath().startsWith("company://")
|| loc.collectionPath().startsWith("custom://"))) ) return; || loc.collectionPath().startsWith("custom://"))) ) return;
if (QET::QetMessageBox::question( if (QET::QetMessageBox::question(
this, this,
@@ -401,8 +401,8 @@ void ElementsCollectionWidget::deleteElement()
if (file.remove()) if (file.remove())
{ {
m_model->removeRows(m_index_at_context_menu.row(), m_model->removeRows(m_index_at_context_menu.row(),
1, 1,
m_index_at_context_menu.parent()); m_index_at_context_menu.parent());
} }
else else
{ {
@@ -429,10 +429,10 @@ void ElementsCollectionWidget::deleteDirectory()
ElementsLocation loc (eci->collectionPath()); ElementsLocation loc (eci->collectionPath());
if (! (loc.isDirectory() if (! (loc.isDirectory()
&& loc.exist() && loc.exist()
&& loc.isFileSystem() && loc.isFileSystem()
&& (loc.collectionPath().startsWith("company://") && (loc.collectionPath().startsWith("company://")
|| loc.collectionPath().startsWith("custom://"))) ) return; || loc.collectionPath().startsWith("custom://"))) ) return;
if (QET::QetMessageBox::question( if (QET::QetMessageBox::question(
this, this,
@@ -446,8 +446,8 @@ void ElementsCollectionWidget::deleteDirectory()
if (dir.removeRecursively()) if (dir.removeRecursively())
{ {
m_model->removeRows(m_index_at_context_menu.row(), m_model->removeRows(m_index_at_context_menu.row(),
1, 1,
m_index_at_context_menu.parent()); m_index_at_context_menu.parent());
} }
else else
{ {
@@ -529,7 +529,7 @@ void ElementsCollectionWidget::newElement()
elmt_wizard.exec(); elmt_wizard.exec();
foreach (QETElementEditor *element_editor, foreach (QETElementEditor *element_editor,
QETApp::instance()->elementEditors()) QETApp::instance()->elementEditors())
connect(element_editor, connect(element_editor,
&QETElementEditor::saveToLocation, &QETElementEditor::saveToLocation,
this, this,
@@ -666,7 +666,7 @@ void ElementsCollectionWidget::reload()
this, this,
&ElementsCollectionWidget::loadingFinished); &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) const ElementsLocation& location)
{ {
//Because this method update an item in the model, location must //Because this method update an item in the model, location must
//represent an existing element (in file system of project) //represente an existing element (in file system of project)
if (!location.exist()) if (!location.exist())
return; return;
@@ -781,13 +781,13 @@ void ElementsCollectionWidget::search()
QModelIndexList match_index; QModelIndexList match_index;
for (QString txt : text_list) { for (QString txt : text_list) {
match_index << m_model->match(m_showed_index.isValid() match_index << m_model->match(m_showed_index.isValid()
? m_model->index(0,0,m_showed_index) ? m_model->index(0,0,m_showed_index)
: m_model->index(0,0), : m_model->index(0,0),
Qt::UserRole+1, Qt::UserRole+1,
QVariant(txt), QVariant(txt),
-1, -1,
Qt::MatchContains Qt::MatchContains
| Qt::MatchRecursive); | Qt::MatchRecursive);
} }
for(QModelIndex index : match_index) for(QModelIndex index : match_index)
@@ -1,5 +1,5 @@
/* /*
Copyright 2006-2025 The QElectroTech Team Copyright 2006-2024 The QElectroTech Team
This file is part of QElectroTech. This file is part of QElectroTech.
QElectroTech is free software: you can redistribute it and/or modify QElectroTech is free software: you can redistribute it and/or modify
+47 -47
View File
@@ -1,5 +1,5 @@
/* /*
Copyright 2006-2025 The QElectroTech Team Copyright 2006-2024 The QElectroTech Team
This file is part of QElectroTech. This file is part of QElectroTech.
QElectroTech is free software: you can redistribute it and/or modify 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://")) else if (path.startsWith("common://") || path.startsWith("company://") || path.startsWith("custom://"))
{ {
QString p; QString p;
if (path.startsWith("common://")) if (path.startsWith("common://"))
{ {
tmp_path.remove("common://"); tmp_path.remove("common://");
p = QETApp::commonElementsDirN() + "/" + tmp_path; p = QETApp::commonElementsDirN() + "/" + tmp_path;
} }
else if (path.startsWith("company://")) else if (path.startsWith("company://"))
{ {
tmp_path.remove("company://"); tmp_path.remove("company://");
p = QETApp::companyElementsDirN() + "/" + tmp_path; p = QETApp::companyElementsDirN() + "/" + tmp_path;
} }
else else
{ {
tmp_path.remove("custom://"); tmp_path.remove("custom://");
p = QETApp::customElementsDirN() + "/" + tmp_path; p = QETApp::customElementsDirN() + "/" + tmp_path;
@@ -319,19 +319,19 @@ void ElementsLocation::setPath(const QString &path)
if(path_.endsWith(".elmt")) if(path_.endsWith(".elmt"))
{ {
m_file_system_path = path_; m_file_system_path = path_;
if (path_.startsWith(QETApp::commonElementsDirN())) if (path_.startsWith(QETApp::commonElementsDirN()))
{ {
path_.remove(QETApp::commonElementsDirN()+="/"); path_.remove(QETApp::commonElementsDirN()+="/");
path_.prepend("common://"); path_.prepend("common://");
m_collection_path = path_; m_collection_path = path_;
} }
else if (path_.startsWith(QETApp::companyElementsDirN())) else if (path_.startsWith(QETApp::companyElementsDirN()))
{ {
path_.remove(QETApp::companyElementsDirN()+="/"); path_.remove(QETApp::companyElementsDirN()+="/");
path_.prepend("company://"); path_.prepend("company://");
m_collection_path = path_; m_collection_path = path_;
} }
else if (path_.startsWith(QETApp::customElementsDirN())) else if (path_.startsWith(QETApp::customElementsDirN()))
{ {
path_.remove(QETApp::customElementsDirN()+="/"); path_.remove(QETApp::customElementsDirN()+="/");
path_.prepend("custom://"); path_.prepend("custom://");
@@ -341,19 +341,19 @@ void ElementsLocation::setPath(const QString &path)
else else
{ {
m_file_system_path = path_; m_file_system_path = path_;
if (path_.startsWith(QETApp::commonElementsDirN())) if (path_.startsWith(QETApp::commonElementsDirN()))
{ {
path_.remove(QETApp::commonElementsDirN()+="/"); path_.remove(QETApp::commonElementsDirN()+="/");
path_.prepend("common://"); path_.prepend("common://");
m_collection_path = path_; m_collection_path = path_;
} }
else if (path_.startsWith(QETApp::companyElementsDirN())) else if (path_.startsWith(QETApp::companyElementsDirN()))
{ {
path_.remove(QETApp::companyElementsDirN()+="/"); path_.remove(QETApp::companyElementsDirN()+="/");
path_.prepend("company://"); path_.prepend("company://");
m_collection_path = path_; m_collection_path = path_;
} }
else if (path_.startsWith(QETApp::customElementsDirN())) else if (path_.startsWith(QETApp::customElementsDirN()))
{ {
path_.remove(QETApp::customElementsDirN()+="/"); path_.remove(QETApp::customElementsDirN()+="/");
path_.prepend("custom://"); path_.prepend("custom://");
@@ -501,23 +501,23 @@ bool ElementsLocation::isFileSystem() const
} }
/** /**
@brief ElementsLocation::isCommonCollection @brief ElementsLocation::isCommonCollection
@return @return
True if this location represent an item from the common collection True if this location represent an item from the common collection
*/ */
bool ElementsLocation::isCommonCollection() const bool ElementsLocation::isCommonCollection() const
{ {
return fileSystemPath().startsWith(QETApp::commonElementsDirN()); return fileSystemPath().startsWith(QETApp::commonElementsDirN());
} }
/** /**
@brief ElementsLocation::isCompanyCollection @brief ElementsLocation::isCompanyCollection
@return @return
True if this location represent an item from the company collection True if this location represent an item from the company collection
*/ */
bool ElementsLocation::isCompanyCollection() const 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 @brief ElementsLocation::projectCollection
@return @return
If this location represents an item in an embedded project collection, If this location represente a item in an embedded project collection,
return this collection else return nullptr. return this collection else return nullptr.
*/ */
XmlElementCollection *ElementsLocation::projectCollection() const XmlElementCollection *ElementsLocation::projectCollection() const
@@ -1,5 +1,5 @@
/* /*
Copyright 2006-2025 The QElectroTech Team Copyright 2006-2024 The QElectroTech Team
This file is part of QElectroTech. This file is part of QElectroTech.
QElectroTech is free software: you can redistribute it and/or modify QElectroTech is free software: you can redistribute it and/or modify
@@ -75,9 +75,9 @@ class ElementsLocation
bool isElement() const; bool isElement() const;
bool isDirectory() const; bool isDirectory() const;
bool isFileSystem() const; bool isFileSystem() const;
bool isCommonCollection() const; bool isCommonCollection() const;
bool isCompanyCollection() const; bool isCompanyCollection() const;
bool isCustomCollection() const; bool isCustomCollection() const;
bool isProject() const; bool isProject() const;
bool exist() const; bool exist() const;
bool isWritable() const; bool isWritable() const;
@@ -1,5 +1,5 @@
/* /*
Copyright 2006-2025 The QElectroTech Team Copyright 2006-2024 The QElectroTech Team
This file is part of QElectroTech. This file is part of QElectroTech.
QElectroTech is free software: you can redistribute it and/or modify QElectroTech is free software: you can redistribute it and/or modify
@@ -35,17 +35,7 @@ static int MAX_DND_PIXMAP_HEIGHT = 375;
*/ */
ElementsTreeView::ElementsTreeView(QWidget *parent) : ElementsTreeView::ElementsTreeView(QWidget *parent) :
QTreeView(parent) QTreeView(parent)
{ {}
// force du noir sur une alternance de blanc (comme le schema) et de gris
// clair, avec du blanc sur bleu pas trop fonce pour la selection
QPalette qp = palette();
qp.setColor(QPalette::Text, Qt::black);
qp.setColor(QPalette::Base, Qt::white);
qp.setColor(QPalette::AlternateBase, QColor("#e8e8e8"));
qp.setColor(QPalette::Highlight, QColor("#678db2"));
qp.setColor(QPalette::HighlightedText, Qt::black);
setPalette(qp);
}
/** /**
@brief ElementsTreeView::startDrag @brief ElementsTreeView::startDrag
@@ -1,5 +1,5 @@
/* /*
Copyright 2006-2025 The QElectroTech Team Copyright 2006-2024 The QElectroTech Team
This file is part of QElectroTech. This file is part of QElectroTech.
QElectroTech is free software: you can redistribute it and/or modify QElectroTech is free software: you can redistribute it and/or modify
@@ -1,5 +1,5 @@
/* /*
Copyright 2006-2025 The QElectroTech Team Copyright 2006-2024 The QElectroTech Team
This file is part of QElectroTech. This file is part of QElectroTech.
QElectroTech is free software: you can redistribute it and/or modify QElectroTech is free software: you can redistribute it and/or modify
@@ -41,8 +41,8 @@ FileElementCollectionItem::FileElementCollectionItem()
@return true if path exist. @return true if path exist.
*/ */
bool FileElementCollectionItem::setRootPath(const QString& path, bool FileElementCollectionItem::setRootPath(const QString& path,
bool set_data, bool set_data,
bool hide_element) bool hide_element)
{ {
QDir dir(path); QDir dir(path);
if (dir.exists()) if (dir.exists())
@@ -120,11 +120,11 @@ QString FileElementCollectionItem::localName()
else if (isDir()) { else if (isDir()) {
if (isCollectionRoot()) { if (isCollectionRoot()) {
if (m_path == QETApp::commonElementsDirN()) if (m_path == QETApp::commonElementsDirN())
setText(QObject::tr("Collection QET")); setText(QObject::tr("Collection QET"));
else if (m_path == QETApp::companyElementsDirN()) else if (m_path == QETApp::companyElementsDirN())
setText(QObject::tr("Collection Company")); setText(QObject::tr("Collection Company"));
else if (m_path == QETApp::customElementsDirN()) else if (m_path == QETApp::customElementsDirN())
setText(QObject::tr("Collection utilisateur")); setText(QObject::tr("Collection utilisateur"));
else else
setText(QObject::tr("Collection inconnue")); setText(QObject::tr("Collection inconnue"));
@@ -221,29 +221,29 @@ QString FileElementCollectionItem::collectionPath() const
bool FileElementCollectionItem::isCollectionRoot() const bool FileElementCollectionItem::isCollectionRoot() const
{ {
if (m_path == QETApp::commonElementsDirN() if (m_path == QETApp::commonElementsDirN()
|| m_path == QETApp::companyElementsDirN() || m_path == QETApp::companyElementsDirN()
|| m_path == QETApp::customElementsDirN()) || m_path == QETApp::customElementsDirN())
return true; return true;
else else
return false; return false;
} }
/** /**
@brief FileElementCollectionItem::isCommonCollection @brief FileElementCollectionItem::isCommonCollection
@return True if this item represent the common collection @return True if this item represent the common collection
*/ */
bool FileElementCollectionItem::isCommonCollection() const bool FileElementCollectionItem::isCommonCollection() const
{ {
return fileSystemPath().startsWith(QETApp::commonElementsDirN()); return fileSystemPath().startsWith(QETApp::commonElementsDirN());
} }
/** /**
@brief FileElementCollectionItem::isCompanyCollection @brief FileElementCollectionItem::isCompanyCollection
@return True if this item represent the company collection @return True if this item represent the company collection
*/ */
bool FileElementCollectionItem::isCompanyCollection() const bool FileElementCollectionItem::isCompanyCollection() const
{ {
return fileSystemPath().startsWith(QETApp::companyElementsDirN()); return fileSystemPath().startsWith(QETApp::companyElementsDirN());
} }
/** /**
@@ -347,8 +347,8 @@ void FileElementCollectionItem::setUpIcon()
@param hide_element @param hide_element
*/ */
void FileElementCollectionItem::setPathName(const QString& path_name, void FileElementCollectionItem::setPathName(const QString& path_name,
bool set_data, bool set_data,
bool hide_element) bool hide_element)
{ {
m_path = path_name; m_path = path_name;
@@ -1,5 +1,5 @@
/* /*
Copyright 2006-2025 The QElectroTech Team Copyright 2006-2024 The QElectroTech Team
This file is part of QElectroTech. This file is part of QElectroTech.
QElectroTech is free software: you can redistribute it and/or modify QElectroTech is free software: you can redistribute it and/or modify
@@ -47,9 +47,9 @@ class FileElementCollectionItem : public ElementCollectionItem
QString name() const override; QString name() const override;
QString collectionPath() const override; QString collectionPath() const override;
bool isCollectionRoot() const override; bool isCollectionRoot() const override;
bool isCommonCollection() const; bool isCommonCollection() const;
bool isCompanyCollection() const; bool isCompanyCollection() const;
bool isCustomCollection() const; bool isCustomCollection() const;
void addChildAtPath(const QString &collection_name) override; void addChildAtPath(const QString &collection_name) override;
void setUpData() override; void setUpData() override;
@@ -1,5 +1,5 @@
/* /*
Copyright 2006-2025 The QElectroTech Team Copyright 2006-2024 The QElectroTech Team
This file is part of QElectroTech. This file is part of QElectroTech.
QElectroTech is free software: you can redistribute it and/or modify QElectroTech is free software: you can redistribute it and/or modify
+2 -2
View File
@@ -1,5 +1,5 @@
/* /*
Copyright 2006-2025 The QElectroTech Team Copyright 2006-2024 The QElectroTech Team
This file is part of QElectroTech. This file is part of QElectroTech.
QElectroTech is free software: you can redistribute it and/or modify QElectroTech is free software: you can redistribute it and/or modify
@@ -23,7 +23,7 @@
#include <QDialog> #include <QDialog>
namespace Ui { namespace Ui {
class RenameDialog; class RenameDialog;
} }
class RenameDialog : public QDialog class RenameDialog : public QDialog
@@ -1,5 +1,5 @@
/* /*
Copyright 2006-2025 The QElectroTech Team Copyright 2006-2024 The QElectroTech Team
This file is part of QElectroTech. This file is part of QElectroTech.
QElectroTech is free software: you can redistribute it and/or modify QElectroTech is free software: you can redistribute it and/or modify
@@ -1,5 +1,5 @@
/* /*
Copyright 2006-2025 The QElectroTech Team Copyright 2006-2024 The QElectroTech Team
This file is part of QElectroTech. This file is part of QElectroTech.
QElectroTech is free software: you can redistribute it and/or modify QElectroTech is free software: you can redistribute it and/or modify
@@ -1,5 +1,5 @@
/* /*
Copyright 2006-2025 The QElectroTech Team Copyright 2006-2024 The QElectroTech Team
This file is part of QElectroTech. This file is part of QElectroTech.
QElectroTech is free software: you can redistribute it and/or modify QElectroTech is free software: you can redistribute it and/or modify
@@ -1,5 +1,5 @@
/* /*
Copyright 2006-2025 The QElectroTech Team Copyright 2006-2024 The QElectroTech Team
This file is part of QElectroTech. This file is part of QElectroTech.
QElectroTech is free software: you can redistribute it and/or modify QElectroTech is free software: you can redistribute it and/or modify
+1 -1
View File
@@ -1,5 +1,5 @@
/* /*
Copyright 2006-2025 The QElectroTech Team Copyright 2006-2024 The QElectroTech Team
This file is part of QElectroTech. This file is part of QElectroTech.
QElectroTech is free software: you can redistribute it and/or modify QElectroTech is free software: you can redistribute it and/or modify
+1 -1
View File
@@ -1,5 +1,5 @@
/* /*
Copyright 2006-2025 The QElectroTech Team Copyright 2006-2024 The QElectroTech Team
This file is part of QElectroTech. This file is part of QElectroTech.
QElectroTech is free software: you can redistribute it and/or modify QElectroTech is free software: you can redistribute it and/or modify
+1 -1
View File
@@ -1,5 +1,5 @@
/* /*
Copyright 2006-2025 The QElectroTech Team Copyright 2006-2024 The QElectroTech Team
This file is part of QElectroTech. This file is part of QElectroTech.
QElectroTech is free software: you can redistribute it and/or modify QElectroTech is free software: you can redistribute it and/or modify
+1 -1
View File
@@ -1,5 +1,5 @@
/* /*
Copyright 2006-2025 The QElectroTech Team Copyright 2006-2024 The QElectroTech Team
This file is part of QElectroTech. This file is part of QElectroTech.
QElectroTech is free software: you can redistribute it and/or modify QElectroTech is free software: you can redistribute it and/or modify
+1 -1
View File
@@ -1,5 +1,5 @@
/* /*
Copyright 2006-2025 The QElectroTech Team Copyright 2006-2024 The QElectroTech Team
This file is part of QElectroTech. This file is part of QElectroTech.
QElectroTech is free software: you can redistribute it and/or modify QElectroTech is free software: you can redistribute it and/or modify
+1 -1
View File
@@ -1,5 +1,5 @@
/* /*
Copyright 2006-2025 The QElectroTech Team Copyright 2006-2024 The QElectroTech Team
This file is part of QElectroTech. This file is part of QElectroTech.
QElectroTech is free software: you can redistribute it and/or modify QElectroTech is free software: you can redistribute it and/or modify
@@ -1,5 +1,5 @@
/* /*
Copyright 2006-2025 The QElectroTech Team Copyright 2006-2024 The QElectroTech Team
This file is part of QElectroTech. This file is part of QElectroTech.
QElectroTech is free software: you can redistribute it and/or modify QElectroTech is free software: you can redistribute it and/or modify
@@ -1,5 +1,5 @@
/* /*
Copyright 2006-2025 The QElectroTech Team Copyright 2006-2024 The QElectroTech Team
This file is part of QElectroTech. This file is part of QElectroTech.
QElectroTech is free software: you can redistribute it and/or modify QElectroTech is free software: you can redistribute it and/or modify
@@ -1,5 +1,5 @@
/* /*
Copyright 2006-2025 The QElectroTech Team Copyright 2006-2024 The QElectroTech Team
This file is part of QElectroTech. This file is part of QElectroTech.
QElectroTech is free software: you can redistribute it and/or modify QElectroTech is free software: you can redistribute it and/or modify
@@ -1,5 +1,5 @@
/* /*
Copyright 2006-2025 The QElectroTech Team Copyright 2006-2024 The QElectroTech Team
This file is part of QElectroTech. This file is part of QElectroTech.
QElectroTech is free software: you can redistribute it and/or modify QElectroTech is free software: you can redistribute it and/or modify
@@ -1,5 +1,5 @@
/* /*
Copyright 2006-2025 The QElectroTech Team Copyright 2006-2024 The QElectroTech Team
This file is part of QElectroTech. This file is part of QElectroTech.
QElectroTech is free software: you can redistribute it and/or modify QElectroTech is free software: you can redistribute it and/or modify
@@ -1,5 +1,5 @@
/* /*
Copyright 2006-2025 The QElectroTech Team Copyright 2006-2024 The QElectroTech Team
This file is part of QElectroTech. This file is part of QElectroTech.
QElectroTech is free software: you can redistribute it and/or modify QElectroTech is free software: you can redistribute it and/or modify
@@ -1,5 +1,5 @@
/* /*
Copyright 2006-2025 The QElectroTech Team Copyright 2006-2024 The QElectroTech Team
This file is part of QElectroTech. This file is part of QElectroTech.
QElectroTech is free software: you can redistribute it and/or modify QElectroTech is free software: you can redistribute it and/or modify
@@ -1,5 +1,5 @@
/* /*
Copyright 2006-2025 The QElectroTech Team Copyright 2006-2024 The QElectroTech Team
This file is part of QElectroTech. This file is part of QElectroTech.
QElectroTech is free software: you can redistribute it and/or modify QElectroTech is free software: you can redistribute it and/or modify
+1 -1
View File
@@ -1,5 +1,5 @@
/* /*
Copyright 2006-2025 The QElectroTech Team Copyright 2006-2024 The QElectroTech Team
This file is part of QElectroTech. This file is part of QElectroTech.
QElectroTech is free software: you can redistribute it and/or modify QElectroTech is free software: you can redistribute it and/or modify
@@ -1,5 +1,5 @@
/* /*
Copyright 2006-2025 The QElectroTech Team Copyright 2006-2024 The QElectroTech Team
This file is part of QElectroTech. This file is part of QElectroTech.
QElectroTech is free software: you can redistribute it and/or modify QElectroTech is free software: you can redistribute it and/or modify
@@ -1,5 +1,5 @@
/* /*
Copyright 2006-2025 The QElectroTech Team Copyright 2006-2024 The QElectroTech Team
This file is part of QElectroTech. This file is part of QElectroTech.
QElectroTech is free software: you can redistribute it and/or modify QElectroTech is free software: you can redistribute it and/or modify
@@ -1,5 +1,5 @@
/* /*
Copyright 2006-2025 The QElectroTech Team Copyright 2006-2024 The QElectroTech Team
This file is part of QElectroTech. This file is part of QElectroTech.
QElectroTech is free software: you can redistribute it and/or modify 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) QRectF QetGraphicsHandlerUtility::rectForArc(const QRectF &rect, qreal start_angle, qreal span_angle)
{ {
QPainterPath path; QPainterPath path;
path.arcMoveTo(rect, start_angle); path.arcMoveTo(rect, start_angle);
path.arcTo(rect, start_angle, span_angle); path.arcTo(rect, start_angle, span_angle);
return path.boundingRect(); return path.boundingRect();
} }
/** /**
@@ -1,5 +1,5 @@
/* /*
Copyright 2006-2025 The QElectroTech Team Copyright 2006-2024 The QElectroTech Team
This file is part of QElectroTech. This file is part of QElectroTech.
QElectroTech is free software: you can redistribute it and/or modify QElectroTech is free software: you can redistribute it and/or modify
@@ -1,5 +1,5 @@
/* /*
Copyright 2006-2025 The QElectroTech Team Copyright 2006-2024 The QElectroTech Team
This file is part of QElectroTech. This file is part of QElectroTech.
QElectroTech is free software: you can redistribute it and/or modify QElectroTech is free software: you can redistribute it and/or modify
@@ -1,5 +1,5 @@
/* /*
Copyright 2006-2025 The QElectroTech Team Copyright 2006-2024 The QElectroTech Team
This file is part of QElectroTech. This file is part of QElectroTech.
QElectroTech is free software: you can redistribute it and/or modify QElectroTech is free software: you can redistribute it and/or modify
@@ -1,5 +1,5 @@
/* /*
Copyright 2006-2025 The QElectroTech Team Copyright 2006-2024 The QElectroTech Team
This file is part of QElectroTech. This file is part of QElectroTech.
QElectroTech is free software: you can redistribute it and/or modify QElectroTech is free software: you can redistribute it and/or modify
@@ -1,5 +1,5 @@
/* /*
Copyright 2006-2025 The QElectroTech Team Copyright 2006-2024 The QElectroTech Team
This file is part of QElectroTech. This file is part of QElectroTech.
QElectroTech is free software: you can redistribute it and/or modify QElectroTech is free software: you can redistribute it and/or modify
@@ -1,5 +1,5 @@
/* /*
Copyright 2006-2025 The QElectroTech Team Copyright 2006-2024 The QElectroTech Team
This file is part of QElectroTech. This file is part of QElectroTech.
QElectroTech is free software: you can redistribute it and/or modify QElectroTech is free software: you can redistribute it and/or modify
@@ -252,7 +252,7 @@ void ReplaceConductorDialog::setColorButton2(const QColor &color)
void ReplaceConductorDialog::on_m_erase_formula_cb_clicked() 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() ? SearchAndReplaceWorker::eraseText()
: QString()); : QString());
ui->m_formula_le->setDisabled(ui->m_erase_formula_cb->isChecked()); ui->m_formula_le->setDisabled(ui->m_erase_formula_cb->isChecked());
@@ -1,5 +1,5 @@
/* /*
Copyright 2006-2025 The QElectroTech Team Copyright 2006-2024 The QElectroTech Team
This file is part of QElectroTech. This file is part of QElectroTech.
QElectroTech is free software: you can redistribute it and/or modify QElectroTech is free software: you can redistribute it and/or modify
@@ -1,5 +1,5 @@
/* /*
Copyright 2006-2025 The QElectroTech Team Copyright 2006-2024 The QElectroTech Team
This file is part of QElectroTech. This file is part of QElectroTech.
QElectroTech is free software: you can redistribute it and/or modify QElectroTech is free software: you can redistribute it and/or modify
@@ -1,5 +1,5 @@
/* /*
Copyright 2006-2025 The QElectroTech Team Copyright 2006-2024 The QElectroTech Team
This file is part of QElectroTech. This file is part of QElectroTech.
QElectroTech is free software: you can redistribute it and/or modify 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