diff --git a/CMakeLists.txt b/CMakeLists.txt
index 657c2f874..9d506bbe6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -45,11 +45,12 @@ endif()
include(cmake/paths_compilation_installation.cmake)
include(cmake/start_options.cmake)
include(cmake/developer_options.cmake)
-include(cmake/git_update_submodules.cmake)
+#include(cmake/git_update_submodules.cmake)
include(cmake/git_last_commit_sha.cmake)
include(cmake/fetch_kdeaddons.cmake)
include(cmake/fetch_singleapplication.cmake)
include(cmake/fetch_pugixml.cmake)
+include(cmake/fetch_elements.cmake)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
@@ -57,11 +58,8 @@ set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC_SEARCH_PATHS ${QET_DIR}/sources/ui)
-# als laatse
include(cmake/define_definitions.cmake)
-find_package(KF6WidgetsAddons REQUIRED)
-
qt_add_executable(
${PROJECT_NAME}
${QET_RES_FILES}
@@ -89,7 +87,6 @@ target_link_libraries(
SQLite::SQLite3
${KF6_PRIVATE_LIBRARIES}
${QET_PRIVATE_LIBRARIES}
- KF6::WidgetsAddons
)
target_include_directories(
@@ -121,7 +118,6 @@ target_include_directories(
${QET_DIR}/sources/NameList
${QET_DIR}/sources/NameList/ui
${QET_DIR}/sources/utils
- ${QET_DIR}/pugixml/src
${QET_DIR}/sources/dataBase
${QET_DIR}/sources/dataBase/ui
${QET_DIR}/sources/factory/ui
diff --git a/SingleApplication b/SingleApplication
deleted file mode 160000
index cbe496bc0..000000000
--- a/SingleApplication
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit cbe496bc01e6515f9692824bf36d5136e8208c85
diff --git a/cmake/fetch_kdeaddons.cmake b/cmake/fetch_kdeaddons.cmake
index fc8bd76e4..380151403 100644
--- a/cmake/fetch_kdeaddons.cmake
+++ b/cmake/fetch_kdeaddons.cmake
@@ -1,4 +1,4 @@
-# Copyright 2006 The QElectroTech Team
+# Copyright 2006-2026 The QElectroTech Team
# This file is part of QElectroTech.
#
# QElectroTech is free software: you can redistribute it and/or modify
@@ -14,25 +14,22 @@
# You should have received a copy of the GNU General Public License
# along with QElectroTech. If not, see .
-message(STATUS "fetch_kdeaddons")
-
-if(BUILD_WITH_KF6)
- option(BUILD_KF6 "Build KF6 libraries, use system ones otherwise" OFF)
+option(BUILD_KF6 "Build KF6 libraries, use system ones otherwise" OFF)
+if(BUILD_KF6)
block(PROPAGATE KF6_GIT_TAG)
- set(BUILD_TESTING OFF)
- set(KDE_SKIP_TEST_SETTINGS ON)
- set(BUILD_DESIGNERPLUGIN OFF)
- set(KCOREADDONS_USE_QML OFF)
- set(BUILD_QCH OFF)
- set(BUILD_SHARED_LIBS OFF)
- find_package(ECM 6.8.0 REQUIRED NO_MODULE)
- list(APPEND CMAKE_MODULE_PATH ${ECM_MODULE_PATH})
+ message(STATUS " - fetch_kdeaddons")
+ set(KDE_SKIP_TEST_SETTINGS ON)
+ set(KCOREADDONS_USE_QML OFF)
+ set(KWIDGETSADDONS_USE_QML OFF)
+ set(BUILD_TESTING OFF)
+ set(BUILD_DESIGNERPLUGIN OFF)
+ set(BUILD_QCH OFF)
+ set(BUILD_SHARED_LIBS OFF)
- if(BUILD_KF6)
Include(FetchContent)
if(NOT DEFINED KF6_GIT_TAG)
- set(KF6_GIT_TAG v6.8.0)
+ set(KF6_GIT_TAG v6.22.0)
endif()
FetchContent_Declare(
@@ -40,21 +37,19 @@ if(BUILD_WITH_KF6)
GIT_REPOSITORY https://invent.kde.org/frameworks/kcoreaddons.git
GIT_TAG ${KF6_GIT_TAG})
FetchContent_MakeAvailable(kcoreaddons)
- get_target_property(kca_version KF6::CoreAddons VERSION)
- else()
- find_package(KF6CoreAddons REQUIRED)
- set(kca_version ${KF6CoreAddons_VERSION})
- endif()
-
- get_target_property(kwa_type KF6::CoreAddons TYPE)
-
- message(NOTICE "ecm version : " ${ECM_VERSION})
- message(NOTICE "kcoreaddons library : " ${kca_type})
- message(NOTICE "kcoreaddons version : " ${kca_version})
+ FetchContent_Declare(
+ kwidgetsaddons
+ GIT_REPOSITORY https://invent.kde.org/frameworks/kwidgetsaddons.git
+ GIT_TAG ${KF6_GIT_TAG})
+ FetchContent_MakeAvailable(kwidgetsaddons)
endblock()
-
- set(KF6_PRIVATE_LIBRARIES
- KF6::CoreAddons
- )
+else()
+ find_package(KF6CoreAddons REQUIRED)
+ find_package(KF6WidgetsAddons REQUIRED)
endif()
+
+set(KF6_PRIVATE_LIBRARIES
+ KF6::CoreAddons
+ KF6::WidgetsAddons
+)
diff --git a/cmake/fetch_pugixml.cmake b/cmake/fetch_pugixml.cmake
index 68fb092eb..b04e0ea3b 100644
--- a/cmake/fetch_pugixml.cmake
+++ b/cmake/fetch_pugixml.cmake
@@ -1,4 +1,4 @@
-# Copyright 2006 The QElectroTech Team
+# Copyright 2006-2026 The QElectroTech Team
# This file is part of QElectroTech.
#
# QElectroTech is free software: you can redistribute it and/or modify
@@ -14,14 +14,10 @@
# You should have received a copy of the GNU General Public License
# along with QElectroTech. If not, see .
-message(" - fetch_pugixml")
-
-Include(FetchContent)
-
-option(BUILD_PUGIXML "Build pugixml library, use system one otherwise" YES)
-
+option(BUILD_PUGIXML "Build pugixml library, use system one otherwise" OFF)
if(BUILD_PUGIXML)
-
+ Include(FetchContent)
+ message(" - fetch pugixml")
FetchContent_Declare(
pugixml
GIT_REPOSITORY https://github.com/zeux/pugixml.git
diff --git a/cmake/fetch_singleapplication.cmake b/cmake/fetch_singleapplication.cmake
index c01cc408c..bddf32dec 100644
--- a/cmake/fetch_singleapplication.cmake
+++ b/cmake/fetch_singleapplication.cmake
@@ -1,4 +1,4 @@
-# Copyright 2006 The QElectroTech Team
+# Copyright 2006-2026 The QElectroTech Team
# This file is part of QElectroTech.
#
# QElectroTech is free software: you can redistribute it and/or modify
@@ -16,9 +16,6 @@
message(" - fetch_singleapplication")
-# https://github.com/itay-grudev/SingleApplication/issues/18
-#qmake
-#DEFINES += QAPPLICATION_CLASS=QGuiApplication
set(QAPPLICATION_CLASS QApplication)
Include(FetchContent)
@@ -26,6 +23,6 @@ Include(FetchContent)
FetchContent_Declare(
SingleApplication
GIT_REPOSITORY https://github.com/itay-grudev/SingleApplication.git
- GIT_TAG v3.2.0)
+ GIT_TAG v3.5.4)
FetchContent_MakeAvailable(SingleApplication)
diff --git a/cmake/qet_compilation_vars.cmake b/cmake/qet_compilation_vars.cmake
index 227a62026..f12cc2f6d 100644
--- a/cmake/qet_compilation_vars.cmake
+++ b/cmake/qet_compilation_vars.cmake
@@ -421,10 +421,6 @@ set(QET_SRC_FILES
${QET_DIR}/sources/PropertiesEditor/propertieseditorwidget.cpp
${QET_DIR}/sources/PropertiesEditor/propertieseditorwidget.h
- ${QET_DIR}/pugixml/src/pugiconfig.hpp
- ${QET_DIR}/pugixml/src/pugixml.cpp
- ${QET_DIR}/pugixml/src/pugixml.hpp
-
${QET_DIR}/sources/qetgraphicsitem/conductor.cpp
${QET_DIR}/sources/qetgraphicsitem/conductor.h
${QET_DIR}/sources/qetgraphicsitem/conductortextitem.cpp
diff --git a/pugixml b/pugixml
deleted file mode 160000
index 5a1892b32..000000000
--- a/pugixml
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit 5a1892b321a38997e3e359069aea3fa35d49a5c6
diff --git a/sources/ElementsCollection/elementslocation.h b/sources/ElementsCollection/elementslocation.h
index 1cb91b88c..3c2ca3192 100644
--- a/sources/ElementsCollection/elementslocation.h
+++ b/sources/ElementsCollection/elementslocation.h
@@ -20,7 +20,7 @@
#include "../NameList/nameslist.h"
#include "../diagramcontext.h"
-#include "pugixml/src/pugixml.hpp"
+#include "pugixml.hpp"
#include
#include
diff --git a/sources/NameList/nameslist.h b/sources/NameList/nameslist.h
index 69596f77e..bc539be02 100644
--- a/sources/NameList/nameslist.h
+++ b/sources/NameList/nameslist.h
@@ -17,7 +17,7 @@
*/
#ifndef NAMES_LIST_H
#define NAMES_LIST_H
-#include "pugixml/src/pugixml.hpp"
+#include "pugixml.hpp"
#include
/**
diff --git a/sources/diagramcontext.h b/sources/diagramcontext.h
index a10444661..d97151117 100644
--- a/sources/diagramcontext.h
+++ b/sources/diagramcontext.h
@@ -17,7 +17,7 @@
*/
#ifndef DIAGRAM_CONTEXT_H
#define DIAGRAM_CONTEXT_H
-#include "pugixml/src/pugixml.hpp"
+#include "pugixml.hpp"
#include
#include
diff --git a/sources/print/projectprintwindow.cpp b/sources/print/projectprintwindow.cpp
index 7eb7a554f..5f01c602f 100644
--- a/sources/print/projectprintwindow.cpp
+++ b/sources/print/projectprintwindow.cpp
@@ -190,25 +190,28 @@ ProjectPrintWindow::~ProjectPrintWindow()
*/
void ProjectPrintWindow::requestPaint()
{
- #if QT_VERSION >= QT_VERSION_CHECK(5, 6, 0)
- #ifdef Q_OS_WIN
- #ifdef QT_DEBUG
- qDebug() << "--";
- qDebug() << "DiagramPrintDialog::print printer_->resolution() before " << m_printer->resolution();
- qDebug() << "DiagramPrintDialog::print screennumber " << QApplication::desktop()->screenNumber();
- #endif
+#if QT_VERSION >= QT_VERSION_CHECK(5, 6, 0)
+#ifdef Q_OS_WIN
+ auto screen = this->screen();
+ if(screen)
+ {
+#ifdef QT_DEBUG
+ qDebug() << "--";
+ qDebug() << "DiagramPrintDialog::print printer_->resolution() before " << m_printer->resolution();
+ qDebug() << "DiagramPrintDialog::print screennumber " << screen->name();
+#endif
- QScreen *srn = QApplication::screens().at(QApplication::desktop()->screenNumber());
- qreal dotsPerInch = (qreal)srn->logicalDotsPerInch();
- m_printer->setResolution(dotsPerInch);
+ qreal dotsPerInch = (qreal)screen->logicalDotsPerInch();
+ m_printer->setResolution(dotsPerInch);
- #ifdef QT_DEBUG
- qDebug() << "DiagramPrintDialog::print dotsPerInch " << dotsPerInch;
- qDebug() << "DiagramPrintDialog::print printer_->resolution() after" << m_printer->resolution();
- qDebug() << "--";
- #endif
- #endif
- #endif
+#ifdef QT_DEBUG
+ qDebug() << "DiagramPrintDialog::print dotsPerInch " << dotsPerInch;
+ qDebug() << "DiagramPrintDialog::print printer_->resolution() after" << m_printer->resolution();
+ qDebug() << "--";
+#endif
+ }
+#endif
+#endif
if (!m_project->diagrams().count()) {
return;
@@ -265,9 +268,9 @@ void ProjectPrintWindow::printDiagram(Diagram *diagram, bool fit_page, QPainter
#if TODO_LIST
#pragma message("@TODO remove code for QT 6 or later")
#endif
- qDebug()<<"Help code for QT 6 or later";
- auto printed_rect = full_page ? printer->paperRect(QPrinter::Millimeter) :
- printer->pageRect(QPrinter::Millimeter);
+ qDebug()<<"Help code for QT 6 or later";
+ auto printed_rect = full_page ? printer->paperRect(QPrinter::Millimeter) :
+ printer->pageRect(QPrinter::Millimeter);
#endif
auto used_width = printed_rect.width();
auto used_height = printed_rect.height();
@@ -341,7 +344,7 @@ QRect ProjectPrintWindow::diagramRect(Diagram *diagram, const ExportProperties &
diagram_rect.setHeight(diagram_rect.height() - titleblock_height);
}
- //Adjust the border of diagram to 1px (width of the line)
+ //Adjust the border of diagram to 1px (width of the line)
diagram_rect.adjust(0,0,1,1);
return (diagram_rect.toAlignedRect());
@@ -356,7 +359,7 @@ QRect ProjectPrintWindow::diagramRect(Diagram *diagram, const ExportProperties &
* with the orientation and the paper format used by the actual printer
*/
int ProjectPrintWindow::horizontalPagesCount(
- Diagram *diagram, const ExportProperties &option, bool full_page) const
+ Diagram *diagram, const ExportProperties &option, bool full_page) const
{
QRect printable_area;
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 1) // ### Qt 6: remove
@@ -385,7 +388,7 @@ int ProjectPrintWindow::horizontalPagesCount(
* with the orientation and paper format used by the actual printer
*/
int ProjectPrintWindow::verticalPagesCount(
- Diagram *diagram, const ExportProperties &option, bool full_page) const
+ Diagram *diagram, const ExportProperties &option, bool full_page) const
{
QRect printable_area;
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 1) // ### Qt 6: remove
@@ -511,7 +514,7 @@ void ProjectPrintWindow::loadPageSetupForCurrentPrinter()
QString value = settings.value("orientation", "landscape").toString();
m_printer->setPageOrientation(
value == "landscape" ? QPageLayout::Landscape :
- QPageLayout::Portrait);
+ QPageLayout::Portrait);
}
if (settings.contains("papersize"))
{
@@ -780,9 +783,9 @@ void ProjectPrintWindow::print()
void ProjectPrintWindow::on_m_date_cb_userDateChanged(const QDate &date)
{
auto index = ui->m_date_from_cb->currentIndex();
- // 0 = all date
- // 1 = from the date
- // 2 = at the date
+ // 0 = all date
+ // 1 = from the date
+ // 2 = at the date
if (index) { on_m_uncheck_all_clicked(); }
else { on_m_check_all_pb_clicked(); }
@@ -792,7 +795,7 @@ void ProjectPrintWindow::on_m_date_cb_userDateChanged(const QDate &date)
{
auto diagram_date = diagram->border_and_titleblock.date();
if ( (index == 1 && diagram_date >= date) ||
- (index == 2 && diagram_date == date) )
+ (index == 2 && diagram_date == date) )
m_diagram_list_hash.value(diagram)->setChecked(true);
}