Mod Cmake en preprocessor

This commit is contained in:
Simon De Backer 2020-12-09 15:28:43 +01:00
parent 4de9c1d922
commit d0c129478e
78 changed files with 589 additions and 327 deletions

View File

@ -41,10 +41,14 @@ project(qelectrotech
HOMEPAGE_URL "https://qelectrotech.org/"
LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
SET(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(QET_DIR ${PROJECT_SOURCE_DIR})
@ -57,8 +61,37 @@ message("PROJECT_SOURCE_DIR: " ${PROJECT_SOURCE_DIR})
message("QET_DIR: " ${QET_DIR})
message("GIT_COMMIT_SHA: " ${GIT_COMMIT_SHA})
find_package(KF5WidgetsAddons)
Include(FetchContent)
find_package(KF5CoreAddons)
#---ToDo why you don't work :/
#FetchContent_Declare(
# kcoreaddons
# GIT_REPOSITORY https://invent.kde.org/frameworks/kcoreaddons.git
# GIT_TAG v5.76.0)
#FetchContent_MakeAvailable(kcoreaddons)
#___ToDo
#find_package(KF5WidgetsAddons)
FetchContent_Declare(
kwidgetsaddons
GIT_REPOSITORY https://invent.kde.org/frameworks/kwidgetsaddons.git
GIT_TAG v5.76.0)
FetchContent_MakeAvailable(kwidgetsaddons)
set(QET_COMPONENTS
Widgets
Concurrent
Xml
Svg
Network
Sql
PrintSupport
LinguistTools)
find_package(
QT
@ -66,28 +99,51 @@ find_package(
Qt6
Qt5
COMPONENTS
Widgets
Concurrent
Xml
Svg
Network
Sql
PrintSupport
${QET_COMPONENTS}
REQUIRED
)
find_package(
Qt${QT_VERSION_MAJOR}
COMPONENTS
Widgets
Concurrent
Xml
Svg
Network
Sql
PrintSupport
REQUIRED
)
${QET_COMPONENTS}
REQUIRED)
qt5_create_translation(
QM_FILES
${QET_DIR}/lang/qet_ca.ts
${QET_DIR}/lang/qet_de.ts
${QET_DIR}/lang/qet_es.ts
${QET_DIR}/lang/qet_fr.ts
${QET_DIR}/lang/qet_it.ts
${QET_DIR}/lang/qet_mn.ts
${QET_DIR}/lang/qet_pt_br.ts
${QET_DIR}/lang/qet_ru.ts
${QET_DIR}/lang/qet_sr.ts
${QET_DIR}/lang/qet_zh.ts
${QET_DIR}/lang/qet_be.ts
${QET_DIR}/lang/qet_da.ts
${QET_DIR}/lang/qet_en.ts
${QET_DIR}/lang/qet_fi.ts
${QET_DIR}/lang/qet_hu.ts
${QET_DIR}/lang/qet_nl.ts
${QET_DIR}/lang/qet_pl.ts
${QET_DIR}/lang/qet_ro.ts
${QET_DIR}/lang/qet_sk.ts
${QET_DIR}/lang/qet_ar.ts
${QET_DIR}/lang/qet_cs.ts
${QET_DIR}/lang/qet_el.ts
${QET_DIR}/lang/qet_hr.ts
${QET_DIR}/lang/qet_ja.ts
${QET_DIR}/lang/qet_nb.ts
${QET_DIR}/lang/qet_no.ts
${QET_DIR}/lang/qet_pt.ts
${QET_DIR}/lang/qet_sl.ts
${QET_DIR}/lang/qet_tr.ts)
message("QT_VERSION_MAJOR :" ${QT_VERSION_MAJOR})
set(QET_SRC_FILES
${QET_DIR}/sources/borderproperties.cpp
${QET_DIR}/sources/borderproperties.h
@ -598,63 +654,77 @@ set(QET_SRC_FILES
${QET_DIR}/sources/utils/qetutils.cpp
${QET_DIR}/sources/utils/qetutils.h
)
if(DEFINED ENV{ok_simon})
add_executable(
${PROJECT_NAME}
${QET_SRC_FILES}
)
target_link_libraries(
${PROJECT_NAME}
PUBLIC
Qt${QT_VERSION_MAJOR}::Xml
Qt${QT_VERSION_MAJOR}::Svg
Qt${QT_VERSION_MAJOR}::Network
Qt${QT_VERSION_MAJOR}::Sql
Qt${QT_VERSION_MAJOR}::PrintSupport
KF5::WidgetsAddons
KF5::CoreAddons
PRIVATE
Qt${QT_VERSION_MAJOR}::Widgets
Qt${QT_VERSION_MAJOR}::Concurrent)
target_include_directories(
${PROJECT_NAME}
PRIVATE
${PROJECT_SOURCE_DIR}/sources/titleblock
${PROJECT_SOURCE_DIR}/sources/ui
${PROJECT_SOURCE_DIR}/sources/qetgraphicsitem
${PROJECT_SOURCE_DIR}/sources/qetgraphicsitem/ViewItem
${PROJECT_SOURCE_DIR}/sources/qetgraphicsitem/ViewItem/ui
${PROJECT_SOURCE_DIR}/sources/richtext
${PROJECT_SOURCE_DIR}/sources/factory
${PROJECT_SOURCE_DIR}/sources/properties
${PROJECT_SOURCE_DIR}/sources/dvevent
${PROJECT_SOURCE_DIR}/sources/editor
${PROJECT_SOURCE_DIR}/sources/editor/esevent
${PROJECT_SOURCE_DIR}/sources/editor/graphicspart
${PROJECT_SOURCE_DIR}/sources/editor/ui
${PROJECT_SOURCE_DIR}/sources/editor/UndoCommand
${PROJECT_SOURCE_DIR}/sources/undocommand
${PROJECT_SOURCE_DIR}/sources/diagramevent
${PROJECT_SOURCE_DIR}/sources/ElementsCollection
${PROJECT_SOURCE_DIR}/sources/ElementsCollection/ui
${PROJECT_SOURCE_DIR}/sources/autoNum
${PROJECT_SOURCE_DIR}/sources/autoNum/ui
${PROJECT_SOURCE_DIR}/sources/ui/configpage
${PROJECT_SOURCE_DIR}/sources/SearchAndReplace
${PROJECT_SOURCE_DIR}/sources/SearchAndReplace/ui
${PROJECT_SOURCE_DIR}/sources/NameList
${PROJECT_SOURCE_DIR}/sources/NameList/ui
${PROJECT_SOURCE_DIR}/sources/utils
${PROJECT_SOURCE_DIR}/sources/pugixml
${PROJECT_SOURCE_DIR}/sources/dataBase
${PROJECT_SOURCE_DIR}/sources/dataBase/ui
${PROJECT_SOURCE_DIR}/sources/factory/ui
${PROJECT_SOURCE_DIR}/sources/print
)
else()
message("ok_simon is not set, assuming QET WILL_FAIL to COMPILE")
endif()
#add_executable(
# ${PROJECT_NAME}
# ${QET_SRC_FILES}
# ${QM_FILES}
# )
#target_link_libraries(
# ${PROJECT_NAME}
# PUBLIC
# PRIVATE
# Qt${QT_VERSION_MAJOR}::Xml
# Qt${QT_VERSION_MAJOR}::Svg
# Qt${QT_VERSION_MAJOR}::Network
# Qt${QT_VERSION_MAJOR}::Sql
# Qt${QT_VERSION_MAJOR}::PrintSupport
# Qt${QT_VERSION_MAJOR}::Widgets
# Qt${QT_VERSION_MAJOR}::Concurrent
# KF5::WidgetsAddons
# KF5::CoreAddons)
#target_link_libraries(
# ${PROJECT_NAME}
# PUBLIC
# PRIVATE
# KF5::WidgetsAddons
# KF5::CoreAddons
# Qt5::Gui
# Qt5::Xml
# Qt5::Svg
# Qt5::Network
# Qt5::Sql
# Qt5::Widgets
# Qt5::Concurrent)
# target_include_directories(
# ${PROJECT_NAME}
# PRIVATE
# ${QET_DIR}/sources/titleblock
# ${QET_DIR}/sources/ui
# ${QET_DIR}/sources/qetgraphicsitem
# ${QET_DIR}/sources/qetgraphicsitem/ViewItem
# ${QET_DIR}/sources/qetgraphicsitem/ViewItem/ui
# ${QET_DIR}/sources/richtext
# ${QET_DIR}/sources/factory
# ${QET_DIR}/sources/properties
# ${QET_DIR}/sources/dvevent
# ${QET_DIR}/sources/editor
# ${QET_DIR}/sources/editor/esevent
# ${QET_DIR}/sources/editor/graphicspart
# ${QET_DIR}/sources/editor/ui
# ${QET_DIR}/sources/editor/UndoCommand
# ${QET_DIR}/sources/undocommand
# ${QET_DIR}/sources/diagramevent
# ${QET_DIR}/sources/ElementsCollection
# ${QET_DIR}/sources/ElementsCollection/ui
# ${QET_DIR}/sources/autoNum
# ${QET_DIR}/sources/autoNum/ui
# ${QET_DIR}/sources/ui/configpage
# ${QET_DIR}/sources/SearchAndReplace
# ${QET_DIR}/sources/SearchAndReplace/ui
# ${QET_DIR}/sources/NameList
# ${QET_DIR}/sources/NameList/ui
# ${QET_DIR}/sources/utils
# ${QET_DIR}/sources/pugixml
# ${QET_DIR}/sources/dataBase
# ${QET_DIR}/sources/dataBase/ui
# ${QET_DIR}/sources/factory/ui
# ${QET_DIR}/sources/print
# )
# Add sub directories

View File

@ -16,12 +16,14 @@
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
*/
#include "elementcollectionhandler.h"
#include "../qetproject.h"
#include "../qetxml.h"
#include "renamedialog.h"
#include "xmlelementcollection.h"
#include "qetproject.h"
#include "qetxml.h"
#include <QFile>
#include <QDir>
#include <QFile>
/******************************************************/

View File

@ -16,13 +16,15 @@
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
*/
#include "elementslocation.h"
#include "qetapp.h"
#include "xmlelementcollection.h"
#include "qetproject.h"
#include "elementscollectioncache.h"
#include "elementpicturefactory.h"
#include "../elementscollectioncache.h"
#include "../qetapp.h"
#include "../qetproject.h"
#include "../qetxml.h"
#include "element.h"
#include "qetxml.h"
#include "elementpicturefactory.h"
#include "xmlelementcollection.h"
#include <QPicture>
// make this class usable with QVariant

View File

@ -18,10 +18,10 @@
#include "elementstreeview.h"
#include "../qetgraphicsitem/element.h"
#include "../qeticons.h"
#include "elementcollectionitem.h"
#include "elementfactory.h"
#include "elementslocation.h"
#include "qeticons.h"
#include <QDrag>
#include <QStandardItemModel>

View File

@ -17,9 +17,10 @@
*/
#include "fileelementcollectionitem.h"
#include "../qetapp.h"
#include "../qeticons.h"
#include "elementslocation.h"
#include "qetapp.h"
#include "qeticons.h"
#include <QDir>

View File

@ -18,8 +18,9 @@
#ifndef RENAMEDIALOG_H
#define RENAMEDIALOG_H
#include "../qet.h"
#include <QDialog>
#include "qet.h"
namespace Ui {
class RenameDialog;

View File

@ -15,11 +15,12 @@
You should have received a copy of the GNU General Public License
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
*/
#include "qetproject.h"
#include "xmlelementcollection.h"
#include "qeticons.h"
#include "xmlprojectelementcollectionitem.h"
#include "../qeticons.h"
#include "../qetproject.h"
#include "xmlelementcollection.h"
/**
@brief XmlProjectElementCollectionItem::XmlProjectElementCollectionItem
Constructor

View File

@ -16,9 +16,10 @@
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
*/
#include "replaceadvanceddialog.h"
#include "../qetapp.h"
#include "../qetinformation.h"
#include "ui_replaceadvanceddialog.h"
#include "qetapp.h"
#include "qetinformation.h"
#include <QAbstractButton>

View File

@ -16,12 +16,13 @@
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
*/
#include "replaceelementdialog.h"
#include "ui_replaceelementdialog.h"
#include "replaceelementdialog.h"
#include "../qetapp.h"
#include "../qetinformation.h"
#include "elementinfopartwidget.h"
#include "qetapp.h"
#include "replaceelementdialog.h"
#include "searchandreplaceworker.h"
#include "qetinformation.h"
#include "ui_replaceelementdialog.h"
#include <QAbstractButton>

View File

@ -16,9 +16,10 @@
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
*/
#include "elementquerywidget.h"
#include "../qetapp.h"
#include "../qetinformation.h"
#include "ui_elementquerywidget.h"
#include "qetapp.h"
#include "qetinformation.h"
#include <QRegularExpression>

View File

@ -16,9 +16,10 @@
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
*/
#include "summaryquerywidget.h"
#include "../qetapp.h"
#include "../qetinformation.h"
#include "ui_summaryquerywidget.h"
#include "qetapp.h"
#include "qetinformation.h"
#include <QListWidgetItem>

View File

@ -16,7 +16,9 @@
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
*/
#include "dveventinterface.h"
#include "diagramview.h"
#include "../diagramview.h"
#include <QMouseEvent>
DVEventInterface::DVEventInterface(DiagramView *dv) :

View File

@ -16,10 +16,11 @@
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
*/
#include "arceditor.h"
#include "styleeditor.h"
#include "partarc.h"
#include "QPropertyUndoCommand/qpropertyundocommand.h"
#include "../QPropertyUndoCommand/qpropertyundocommand.h"
#include "elementscene.h"
#include "partarc.h"
#include "styleeditor.h"
/**
Constructeur

View File

@ -17,11 +17,11 @@
*/
#ifndef EDITOR_COMMANDS_H
#define EDITOR_COMMANDS_H
#include "../qgimanager.h"
#include "customelementpart.h"
#include "elementview.h"
#include "elementscene.h"
#include "elementcontent.h"
#include "qgimanager.h"
#include "elementscene.h"
#include "elementview.h"
/**
@brief The ElementEditionCommand class

View File

@ -16,15 +16,17 @@
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
*/
#include "elementprimitivedecorator.h"
#include "elementscene.h"
#include "../QetGraphicsItemModeler/qetgraphicshandleritem.h"
#include "../qet.h"
#include "customelementpart.h"
#include "editorcommands.h"
#include "qet.h"
#include <QPainter>
#include <QGraphicsSceneHoverEvent>
#include <QStyleOptionGraphicsItem>
#include "elementscene.h"
#include <QGraphicsScene>
#include "QetGraphicsItemModeler/qetgraphicshandleritem.h"
#include <QGraphicsSceneHoverEvent>
#include <QPainter>
#include <QStyleOptionGraphicsItem>
/**
Constructor

View File

@ -18,8 +18,9 @@
#ifndef ELEMENTPRIMITIVEDECORATOR_H
#define ELEMENTPRIMITIVEDECORATOR_H
#include "../qet.h"
#include <QGraphicsObject>
#include "qet.h"
class ElementEditionCommand;
class ElementScene;

View File

@ -16,9 +16,10 @@
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
*/
#include "elementview.h"
#include "qetelementeditor.h"
#include "qetapp.h"
#include "../qetapp.h"
#include "pastepartscommand.h"
#include "qetelementeditor.h"
/**
Constructeur
@param scene ElementScene visualisee par cette ElementView

View File

@ -16,8 +16,9 @@
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
*/
#include "customelementgraphicpart.h"
#include "../QPropertyUndoCommand/qpropertyundocommand.h"
#include "elementscene.h"
#include "QPropertyUndoCommand/qpropertyundocommand.h"
#include <QRegularExpression>

View File

@ -18,7 +18,7 @@
#ifndef CUSTOM_ELEMENT_PART_H
#define CUSTOM_ELEMENT_PART_H
#include "qet.h"
#include "../qet.h"
class CustomElement;
class ElementPrimitiveDecorator;

View File

@ -16,11 +16,11 @@
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
*/
#include "partarc.h"
#include "QPropertyUndoCommand/qpropertyundocommand.h"
#include "elementscene.h"
#include "QetGraphicsItemModeler/qetgraphicshandleritem.h"
#include "QetGraphicsItemModeler/qetgraphicshandlerutility.h"
#include "../QPropertyUndoCommand/qpropertyundocommand.h"
#include "../QetGraphicsItemModeler/qetgraphicshandleritem.h"
#include "../QetGraphicsItemModeler/qetgraphicshandlerutility.h"
#include "elementscene.h"
/**
@brief PartArc::PartArc

View File

@ -16,13 +16,14 @@
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
*/
#include "partdynamictextfield.h"
#include "QPropertyUndoCommand/qpropertyundocommand.h"
#include "qetapp.h"
#include "../QPropertyUndoCommand/qpropertyundocommand.h"
#include "../qetapp.h"
#include "elementscene.h"
#include <QGraphicsSceneMouseEvent>
#include <QFont>
#include <QColor>
#include <QFont>
#include <QGraphicsSceneMouseEvent>
PartDynamicTextField::PartDynamicTextField(QETElementEditor *editor, QGraphicsItem *parent) :
QGraphicsTextItem(parent),

View File

@ -16,10 +16,11 @@
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
*/
#include "partellipse.h"
#include "QPropertyUndoCommand/qpropertyundocommand.h"
#include "../QPropertyUndoCommand/qpropertyundocommand.h"
#include "../QetGraphicsItemModeler/qetgraphicshandleritem.h"
#include "../QetGraphicsItemModeler/qetgraphicshandlerutility.h"
#include "elementscene.h"
#include "QetGraphicsItemModeler/qetgraphicshandleritem.h"
#include "QetGraphicsItemModeler/qetgraphicshandlerutility.h"
/**
@brief PartEllipse::PartEllipse

View File

@ -16,11 +16,12 @@
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
*/
#include "partline.h"
#include <cmath>
#include "elementscene.h"
#include "QPropertyUndoCommand/qpropertyundocommand.h"
#include "QetGraphicsItemModeler/qetgraphicshandleritem.h"
#include "../QPropertyUndoCommand/qpropertyundocommand.h"
#include "../QetGraphicsItemModeler/qetgraphicshandleritem.h"
#include "elementscene.h"
#include <cmath>
/**
@brief PartLine::PartLine

View File

@ -18,8 +18,8 @@
#ifndef PART_LINE_H
#define PART_LINE_H
#include "../qet.h"
#include "customelementgraphicpart.h"
#include "qet.h"
class QPropertyUndoCommand;
class QetGraphicsHandlerItem;

View File

@ -16,13 +16,13 @@
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
*/
#include "partpolygon.h"
#include "QPropertyUndoCommand/qpropertyundocommand.h"
#include "elementscene.h"
#include "QetGraphicsItemModeler/qetgraphicshandleritem.h"
#include "qetelementeditor.h"
#include "qeticons.h"
#include "QetGraphicsItemModeler/qetgraphicshandlerutility.h"
#include "../QPropertyUndoCommand/qpropertyundocommand.h"
#include "../QetGraphicsItemModeler/qetgraphicshandleritem.h"
#include "../QetGraphicsItemModeler/qetgraphicshandlerutility.h"
#include "../qeticons.h"
#include "elementscene.h"
#include "qetelementeditor.h"
/**
@brief PartPolygon::PartPolygon

View File

@ -16,10 +16,11 @@
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
*/
#include "partrectangle.h"
#include "../QPropertyUndoCommand/qpropertyundocommand.h"
#include "../QetGraphicsItemModeler/qetgraphicshandleritem.h"
#include "../QetGraphicsItemModeler/qetgraphicshandlerutility.h"
#include "elementscene.h"
#include "QPropertyUndoCommand/qpropertyundocommand.h"
#include "QetGraphicsItemModeler/qetgraphicshandleritem.h"
#include "QetGraphicsItemModeler/qetgraphicshandlerutility.h"
/**
@brief PartRectangle::PartRectangle

View File

@ -16,11 +16,12 @@
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
*/
#include "parttext.h"
#include "texteditor.h"
#include "../QPropertyUndoCommand/qpropertyundocommand.h"
#include "../qetapp.h"
#include "elementprimitivedecorator.h"
#include "elementscene.h"
#include "qetapp.h"
#include "QPropertyUndoCommand/qpropertyundocommand.h"
#include "texteditor.h"
/**
Constructeur

View File

@ -17,9 +17,10 @@
*/
#ifndef PART_TEXT_H
#define PART_TEXT_H
#include <QtWidgets>
#include "../qetapp.h"
#include "customelementpart.h"
#include "qetapp.h"
#include <QtWidgets>
class TextEditor;
class ElementPrimitiveDecorator;

View File

@ -16,18 +16,19 @@
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
*/
#include "qetelementeditor.h"
#include "qet.h"
#include "qetapp.h"
#include "../elementdialog.h"
#include "../newelementwizard.h"
#include "../qet.h"
#include "../qetapp.h"
#include "../qeticons.h"
#include "../qetmessagebox.h"
#include "../recentfiles.h"
#include "customelementpart.h"
#include "editorcommands.h"
#include "elementitemeditor.h"
#include "elementscene.h"
#include "elementview.h"
#include "customelementpart.h"
#include "newelementwizard.h"
#include "elementitemeditor.h"
#include "elementdialog.h"
#include "recentfiles.h"
#include "qeticons.h"
#include "qetmessagebox.h"
#include "editorcommands.h"
// editeurs de primitives
#include "arceditor.h"

View File

@ -16,13 +16,15 @@
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
*/
#include "styleeditor.h"
#include "../QPropertyUndoCommand/qpropertyundocommand.h"
#include "../qeticons.h"
#include "customelementgraphicpart.h"
#include "QPropertyUndoCommand/qpropertyundocommand.h"
#include "qeticons.h"
#include <QComboBox>
#include <QCheckBox>
#include <QVBoxLayout>
#include <QComboBox>
#include <QLabel>
#include <QVBoxLayout>
/**
Constructeur

View File

@ -16,14 +16,16 @@
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
*/
#include "terminaleditor.h"
#include "../QPropertyUndoCommand/qpropertyundocommand.h"
#include "../qeticons.h"
#include "partterminal.h"
#include "qeticons.h"
#include "QPropertyUndoCommand/qpropertyundocommand.h"
#include <QDoubleSpinBox>
#include <QComboBox>
#include <QVBoxLayout>
#include <QDoubleSpinBox>
#include <QHBoxLayout>
#include <QLabel>
#include <QVBoxLayout>
/**
@brief TerminalEditor::TerminalEditor

View File

@ -16,20 +16,21 @@
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
*/
#include "dynamictextfieldeditor.h"
#include "ui_dynamictextfieldeditor.h"
#include "../QPropertyUndoCommand/qpropertyundocommand.h"
#include "../qetapp.h"
#include "../qetinformation.h"
#include "alignmenttextdialog.h"
#include "compositetexteditdialog.h"
#include "customelementpart.h"
#include "partdynamictextfield.h"
#include "QPropertyUndoCommand/qpropertyundocommand.h"
#include "qetelementeditor.h"
#include "qetapp.h"
#include "compositetexteditdialog.h"
#include "alignmenttextdialog.h"
#include "qetinformation.h"
#include <assert.h>
#include "ui_dynamictextfieldeditor.h"
#include <QPointer>
#include <QGraphicsItem>
#include <QColorDialog>
#include <QGraphicsItem>
#include <QPointer>
#include <assert.h>
DynamicTextFieldEditor::DynamicTextFieldEditor(
QETElementEditor *editor, PartDynamicTextField *text_field, QWidget *parent) :

View File

@ -16,9 +16,10 @@
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
*/
#include "elementpropertieseditorwidget.h"
#include "../qetapp.h"
#include "../qetinformation.h"
#include "ui_elementpropertieseditorwidget.h"
#include "qetapp.h"
#include "qetinformation.h"
#include <QItemDelegate>

View File

@ -18,9 +18,10 @@
#ifndef ELEMENTPROPERTIESEDITORWIDGET_H
#define ELEMENTPROPERTIESEDITORWIDGET_H
#include <QDialog>
#include "../diagramcontext.h"
#include <QAbstractButton>
#include "diagramcontext.h"
#include <QDialog>
namespace Ui {
class ElementPropertiesEditorWidget;

View File

@ -16,11 +16,12 @@
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
*/
#include "ellipseeditor.h"
#include "ui_ellipseeditor.h"
#include "../QPropertyUndoCommand/qpropertyundocommand.h"
#include "elementscene.h"
#include "partellipse.h"
#include "styleeditor.h"
#include "QPropertyUndoCommand/qpropertyundocommand.h"
#include "elementscene.h"
#include "ui_ellipseeditor.h"
/**
* @brief EllipseEditor::EllipseEditor

View File

@ -16,13 +16,14 @@
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
*/
#include "lineeditor.h"
#include "ui_lineeditor.h"
#include "../QPropertyUndoCommand/qpropertyundocommand.h"
#include "../qeticons.h"
#include "elementitemeditor.h"
#include "styleeditor.h"
#include "partline.h"
#include "QPropertyUndoCommand/qpropertyundocommand.h"
#include "elementscene.h"
#include "qeticons.h"
#include "partline.h"
#include "styleeditor.h"
#include "ui_lineeditor.h"
/**
@brief LineEditor::LineEditor

View File

@ -16,12 +16,13 @@
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
*/
#include "polygoneditor.h"
#include "ui_polygoneditor.h"
#include "partpolygon.h"
#include "../QPropertyUndoCommand/qpropertyundocommand.h"
#include "../qetmessagebox.h"
#include "elementscene.h"
#include "qetmessagebox.h"
#include "partpolygon.h"
#include "styleeditor.h"
#include "QPropertyUndoCommand/qpropertyundocommand.h"
#include "ui_polygoneditor.h"
/**
@brief PolygonEditor::PolygonEditor

View File

@ -16,12 +16,13 @@
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
*/
#include "rectangleeditor.h"
#include "ui_rectangleeditor.h"
#include "styleeditor.h"
#include "partrectangle.h"
#include "QPropertyUndoCommand/qpropertyundocommand.h"
#include "../QPropertyUndoCommand/qpropertyundocommand.h"
#include "../qeticons.h"
#include "elementscene.h"
#include "qeticons.h"
#include "partrectangle.h"
#include "styleeditor.h"
#include "ui_rectangleeditor.h"
/**
@brief RectangleEditor::RectangleEditor

View File

@ -16,9 +16,11 @@
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
*/
#include "texteditor.h"
#include "ui_texteditor.h"
#include "../QPropertyUndoCommand/qpropertyundocommand.h"
#include "parttext.h"
#include "QPropertyUndoCommand/qpropertyundocommand.h"
#include "ui_texteditor.h"
#include <cassert>
/**

View File

@ -18,9 +18,9 @@
#ifndef ADDTABLEDIALOG_H
#define ADDTABLEDIALOG_H
#include <QDialog>
#include "../qetapp.h"
#include "qetapp.h"
#include <QDialog>
namespace Ui {
class AddTableDialog;

View File

@ -18,9 +18,9 @@
#ifndef PROJECTPRINTWINDOW_H
#define PROJECTPRINTWINDOW_H
#include <QMainWindow>
#include "../exportproperties.h"
#include "exportproperties.h"
#include <QMainWindow>
#include <QPrinter>
namespace Ui {

View File

@ -1,11 +1,11 @@
#ifndef TERMINALDATA_H
#define TERMINALDATA_H
#include "../qet.h"
#include "propertiesinterface.h"
#include "qet.h"
#include <QUuid>
#include <QPointF>
#include <QUuid>
class QGraphicsObject;

View File

@ -15,11 +15,12 @@
You should have received a copy of the GNU General Public License
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
*/
#include <QMetaEnum>
#include <QHash>
#include "xrefproperties.h"
#include "qetapp.h"
#include "../qetapp.h"
#include <QHash>
#include <QMetaEnum>
/**
@brief XRefProperties::XRefProperties

View File

@ -18,10 +18,10 @@
#ifndef QETGRAPHICSHEADERITEM_H
#define QETGRAPHICSHEADERITEM_H
#include "qetapp.h"
#include "../qetapp.h"
#include <QGraphicsObject>
#include <QFont>
#include <QGraphicsObject>
#include <QMargins>
class QAbstractItemModel;

View File

@ -18,11 +18,11 @@
#include "qetgraphicstableitem.h"
#include "../../QPropertyUndoCommand/qpropertyundocommand.h"
#include "../../createdxf.h"
#include "../../diagram.h"
#include "../../elementprovider.h"
#include "../../qetxml.h"
#include "../../utils/qetutils.h"
#include "createdxf.h"
#include "elementprovider.h"
#include "projectdbmodel.h"
#include "qetgraphicsheaderitem.h"

View File

@ -18,9 +18,10 @@
#ifndef GRAPHICSTABLEPROPERTIESEDITOR_H
#define GRAPHICSTABLEPROPERTIESEDITOR_H
#include "PropertiesEditor/propertieseditorwidget.h"
#include <QPointer>
#include "../PropertiesEditor/propertieseditorwidget.h"
#include <QButtonGroup>
#include <QPointer>
namespace Ui {
class GraphicsTablePropertiesEditor;

View File

@ -18,7 +18,7 @@
#ifndef PROJECTDBMODELPROPERTIESWIDGET_H
#define PROJECTDBMODELPROPERTIESWIDGET_H
#include "PropertiesEditor/propertieseditorwidget.h"
#include "../PropertiesEditor/propertieseditorwidget.h"
class ProjectDBModel;

View File

@ -17,18 +17,18 @@
*/
#include "../qetgraphicsitem/conductor.h"
#include "../QPropertyUndoCommand/qpropertyundocommand.h"
#include "../autoNum/numerotationcontextcommands.h"
#include "../conductorautonumerotation.h"
#include "../conductorsegment.h"
#include "../conductorsegmentprofile.h"
#include "../diagram.h"
#include "../diagramcommands.h"
#include "../qetdiagrameditor.h"
#include "../qetgraphicsitem/terminal.h"
#include "QPropertyUndoCommand/qpropertyundocommand.h"
#include "conductorautonumerotation.h"
#include "conductorpropertiesdialog.h"
#include "conductorsegment.h"
#include "conductorsegmentprofile.h"
#include "conductortextitem.h"
#include "diagramcommands.h"
#include "element.h"
#include "qetdiagrameditor.h"
#include <QMultiHash>
#include <QtDebug>

View File

@ -18,8 +18,8 @@
#include "conductortextitem.h"
#include "../diagram.h"
#include "../diagramcommands.h"
#include "../qetgraphicsitem/conductor.h"
#include "diagramcommands.h"
/**
Constructeur

View File

@ -18,11 +18,11 @@
#ifndef CROSSREFITEM_H
#define CROSSREFITEM_H
#include <QGraphicsObject>
#include <QPicture>
#include <QMultiMap>
#include "../properties/xrefproperties.h"
#include"properties/xrefproperties.h"
#include <QGraphicsObject>
#include <QMultiMap>
#include <QPicture>
class Element;
class DynamicElementTextItem;

View File

@ -18,8 +18,8 @@
#ifndef SLAVEELEMENT_H
#define SLAVEELEMENT_H
#include "../../properties/xrefproperties.h"
#include "element.h"
#include"properties/xrefproperties.h"
class SlaveElement : public Element
{

View File

@ -17,8 +17,9 @@
*/
#ifndef TITLEBLOCK_SLASH_HELPER_CELL_H
#define TITLEBLOCK_SLASH_HELPER_CELL_H
#include "../qet.h"
#include <QtWidgets>
#include "qet.h"
/**
This class implements a helper widget for cells that indicate the length of

View File

@ -16,8 +16,9 @@
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
*/
#include "integrationmovetemplateshandler.h"
#include "../qetmessagebox.h"
#include "templatescollection.h"
#include "qetmessagebox.h"
/**
Constructor

View File

@ -16,16 +16,16 @@
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
*/
#include "qettemplateeditor.h"
#include "qetmessagebox.h"
#include "qeticons.h"
#include "qetapp.h"
#include "qetproject.h"
#include "../qetapp.h"
#include "../qeticons.h"
#include "../qetmessagebox.h"
#include "../qetproject.h"
#include "templatecellwidget.h"
#include "templatecommands.h"
#include "templateview.h"
#include "templatelocationsaver.h"
#include "templatelogomanager.h"
#include "templatecellwidget.h"
#include "templateview.h"
/**
@param parent parent QWidget of this window

View File

@ -16,12 +16,13 @@
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
*/
#include <QMultiMap>
#include "templatecellsset.h"
#include "templatevisualcell.h"
#include "../titleblockcell.h"
#include "templateview.h"
#include "titleblockcell.h"
#include "templatevisualcell.h"
#include <QMultiMap>
/**
Constructor

View File

@ -17,8 +17,9 @@
*/
#ifndef TITLEBLOCK_SLASH_TEMPLATE_CELL_WIDGET_H
#define TITLEBLOCK_SLASH_TEMPLATE_CELL_WIDGET_H
#include "../qet.h"
#include <QtWidgets>
#include "qet.h"
class ModifyTitleBlockCellCommand;
class TitleBlockTemplate;
class TitleBlockCell;

View File

@ -16,10 +16,11 @@
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
*/
#include "templatecommands.h"
#include "templatevisualcell.h"
#include "templateview.h"
#include "titleblockcell.h"
#include "../titleblockcell.h"
#include "dimension.h"
#include "templateview.h"
#include "templatevisualcell.h"
#define TITLEBLOCK_DEFAULT_ROW_HEIGHT TitleBlockDimension(25)
#define TITLEBLOCK_DEFAULT_COL_WIDTH TitleBlockDimension(50)

View File

@ -18,11 +18,12 @@
#ifndef TITLEBLOCK_SLASH_TEMPLATE_COMMANDS_H
#define TITLEBLOCK_SLASH_TEMPLATE_COMMANDS_H
#define MODIFY_TITLE_BLOCK_CELL_COMMAND_ID 6378
#include <QtCore>
#include <QUndoCommand>
#include "../titleblockcell.h"
#include "dimension.h"
#include "templatecellsset.h"
#include "titleblockcell.h"
#include <QUndoCommand>
#include <QtCore>
class TitleBlockTemplateView;
class TitleBlockTemplate;

View File

@ -16,8 +16,9 @@
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
*/
#include "templatedeleter.h"
#include "qetmessagebox.h"
#include "qetproject.h"
#include "../qetmessagebox.h"
#include "../qetproject.h"
/**
Constructor
@param tbt_location Location of the title block template to be deleted

View File

@ -16,8 +16,9 @@
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
*/
#include "templatelogomanager.h"
#include "titleblocktemplate.h"
#include "qeticons.h"
#include "../qeticons.h"
#include "../titleblocktemplate.h"
#include <QStandardPaths>

View File

@ -16,14 +16,15 @@
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
*/
#include "templateview.h"
#include "templatevisualcell.h"
#include "../qeticons.h"
#include "dimensionwidget.h"
#include "gridlayoutanimation.h"
#include "helpercell.h"
#include "splittedhelpercell.h"
#include "templatecommands.h"
#include "templatecellsset.h"
#include "dimensionwidget.h"
#include "qeticons.h"
#include "templatecommands.h"
#include "templatevisualcell.h"
#define ROW_OFFSET 2
#define COL_OFFSET 1
#define DEFAULT_PREVIEW_WIDTH 600

View File

@ -17,8 +17,9 @@
*/
#ifndef TITLEBLOCK_SLASH_TEMPLATE_VIEW_H
#define TITLEBLOCK_SLASH_TEMPLATE_VIEW_H
#include "../titleblocktemplate.h"
#include <QGraphicsView>
#include "titleblocktemplate.h"
class HelperCell;
class SplittedHelperCell;
class TitleBlockTemplateCommand;

View File

@ -18,7 +18,7 @@
#include "templatevisualcell.h"
#include "../diagramcontext.h"
#include "titleblocktemplate.h"
#include "../titleblocktemplate.h"
/**
Constructor

View File

@ -17,10 +17,11 @@
*/
#ifndef TITLEBLOCK_SLASH_QET_TEMPLATE_VISUAL_CELL_H
#define TITLEBLOCK_SLASH_QET_TEMPLATE_VISUAL_CELL_H
#include "../qet.h"
#include <QtWidgets>
#include "qet.h"
class TitleBlockTemplate;
#include "titleblockcell.h"
#include "../titleblockcell.h"
/**
This class implements a preview widget for cells that compose a title

View File

@ -16,10 +16,12 @@
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
*/
#include "aboutqetdialog.h"
#include "../machine_info.h"
#include "../qet.h"
#include "../qetapp.h"
#include "ui_aboutqetdialog.h"
#include "qet.h"
#include "qetapp.h"
#include "machine_info.h"
#include <QDate>
/**

View File

@ -18,7 +18,8 @@
#ifndef ABSTRACTELEMENTPROPERTIESEDITORWIDGET_H
#define ABSTRACTELEMENTPROPERTIESEDITORWIDGET_H
#include "PropertiesEditor/propertieseditorwidget.h"
#include "../PropertiesEditor/propertieseditorwidget.h"
#include <QPointer>
class Element;

View File

@ -16,13 +16,14 @@
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
*/
#include "generalconfigurationpage.h"
#include "ui_generalconfigurationpage.h"
#include "qeticons.h"
#include "qetapp.h"
#include <QSettings>
#include <QFontDialog>
#include "../qetapp.h"
#include "../qeticons.h"
#include "ui_generalconfigurationpage.h"
#include <QFileDialog>
#include <QFontDialog>
#include <QSettings>
/**
@brief GeneralConfigurationPage::GeneralConfigurationPage

View File

@ -18,8 +18,9 @@
#ifndef GENERALCONFIGURATIONPAGE_H
#define GENERALCONFIGURATIONPAGE_H
#include "../configpage.h"
#include <QWidget>
#include "configpage.h"
namespace Ui {
class GeneralConfigurationPage;

View File

@ -18,7 +18,7 @@
#ifndef IMAGEPROPERTIESWIDGET_H
#define IMAGEPROPERTIESWIDGET_H
#include "PropertiesEditor/propertieseditorwidget.h"
#include "../PropertiesEditor/propertieseditorwidget.h"
class DiagramImageItem;

View File

@ -18,7 +18,8 @@
#ifndef INDITEXTPROPERTIESWIDGET_H
#define INDITEXTPROPERTIESWIDGET_H
#include "PropertiesEditor/propertieseditorwidget.h"
#include "../PropertiesEditor/propertieseditorwidget.h"
#include <QPointer>
class IndependentTextItem;

View File

@ -16,13 +16,15 @@
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
*/
#include "masterpropertieswidget.h"
#include "../diagram.h"
#include "../diagramposition.h"
#include "../elementprovider.h"
#include "element.h"
#include "linkelementcommand.h"
#include "ui_masterpropertieswidget.h"
#include <QListWidgetItem>
#include <diagramposition.h>
#include <elementprovider.h>
#include <diagram.h>
#include <element.h>
#include <linkelementcommand.h>
/**
@brief MasterPropertiesWidget::MasterPropertiesWidget

View File

@ -18,7 +18,7 @@
#ifndef SHAPEGRAPHICSITEMPROPERTIESWIDGET_H
#define SHAPEGRAPHICSITEMPROPERTIESWIDGET_H
#include "PropertiesEditor/propertieseditorwidget.h"
#include "../PropertiesEditor/propertieseditorwidget.h"
namespace Ui {
class ShapeGraphicsItemPropertiesWidget;

View File

@ -18,10 +18,10 @@
#include "rotatetextscommand.h"
#include "../diagram.h"
#include "../diagramcontent.h"
#include "../qetapp.h"
#include "../qtextorientationspinboxwidget.h"
#include "conductortextitem.h"
#include "diagramcontent.h"
#include "diagramtextitem.h"
#include "elementtextitemgroup.h"

View File

@ -16,7 +16,9 @@
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
*/
#include "macosxopenevent.h"
#include "singleapplication.h"
#include "SingleApplication/singleapplication.h"
#include <QFileOpenEvent>
/**

View File

@ -20,13 +20,26 @@ message("_____________________________________________________________________")
project(C_unittests LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
SET(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
if(DEFINED ENV{QET_DIR})
set(QET_DIR "../..")
set(QET_COMPONENTS
Widgets
Concurrent
Xml
Svg
Network
Sql
PrintSupport
LinguistTools)
message("QET_DIR is not set, assuming QET is ../..")
endif()
@ -34,16 +47,21 @@ message("PROJECT_NAME: " ${PROJECT_NAME})
message("PROJECT_SOURCE_DIR: " ${PROJECT_SOURCE_DIR})
message("QET_DIR: " ${QET_DIR})
SET(CMAKE_CXX_STANDARD 17)
find_package(
QT
NAMES
Qt6
Qt5
COMPONENTS
${QET_COMPONENTS}
REQUIRED
)
find_package(Qt5Gui REQUIRED)
find_package(Qt5Xml REQUIRED)
find_package(Qt5Svg REQUIRED)
find_package(Qt5Sql REQUIRED)
find_package(Qt5Concurrent REQUIRED)
find_package(Qt5Widgets REQUIRED)
find_package(KF5WidgetsAddons)
find_package(KF5CoreAddons)
find_package(
Qt${QT_VERSION_MAJOR}
COMPONENTS
${QET_COMPONENTS}
REQUIRED)
Include(FetchContent)
@ -54,19 +72,30 @@ FetchContent_Declare(
FetchContent_MakeAvailable(Catch2)
find_package(KF5CoreAddons REQUIRED)
#---ToDo why you don't work :/
#FetchContent_Declare(
# kcoreaddons
# GIT_REPOSITORY https://invent.kde.org/frameworks/kcoreaddons.git
# GIT_TAG v5.76.0)
#FetchContent_MakeAvailable(kcoreaddons)
#___ToDo
FetchContent_Declare(
kwidgetsaddons
GIT_REPOSITORY https://invent.kde.org/frameworks/kwidgetsaddons.git
GIT_TAG v5.76.0)
FetchContent_MakeAvailable(kwidgetsaddons)
add_executable(
${PROJECT_NAME}
tst_My_test.cpp
src/borderproperties_test.cpp
src/qet_test.cpp
main.cpp
${QET_DIR}/sources/borderproperties.cpp
${QET_DIR}/sources/borderproperties.h
${QET_DIR}/sources/qet.cpp
${QET_DIR}/sources/qet.h
${QET_DIR}/sources/qeticons.cpp
${QET_DIR}/sources/qeticons.h)
)
target_link_libraries(
${PROJECT_NAME}
@ -79,6 +108,7 @@ target_link_libraries(
Qt5::Xml
Qt5::Svg
Qt5::Sql
Qt5::Network
Qt5::Widgets
Qt5::Concurrent)

View File

@ -20,13 +20,26 @@ message("_____________________________________________________________________")
project(G_unitmocktests LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
SET(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
if(DEFINED ENV{QET_DIR})
set(QET_DIR "../..")
set(QET_COMPONENTS
Widgets
Concurrent
Xml
Svg
Network
Sql
PrintSupport
LinguistTools)
message("QET_DIR is not set, assuming QET is ../..")
endif()
@ -34,16 +47,21 @@ message("PROJECT_NAME: " ${PROJECT_NAME})
message("PROJECT_SOURCE_DIR: " ${PROJECT_SOURCE_DIR})
message("QET_DIR: " ${QET_DIR})
SET(CMAKE_CXX_STANDARD 17)
find_package(
QT
NAMES
Qt6
Qt5
COMPONENTS
${QET_COMPONENTS}
REQUIRED
)
find_package(Qt5Gui REQUIRED)
find_package(Qt5Xml REQUIRED)
find_package(Qt5Svg REQUIRED)
find_package(Qt5Sql REQUIRED)
find_package(Qt5Concurrent REQUIRED)
find_package(Qt5Widgets REQUIRED)
find_package(KF5WidgetsAddons)
find_package(KF5CoreAddons)
find_package(
Qt${QT_VERSION_MAJOR}
COMPONENTS
${QET_COMPONENTS}
REQUIRED)
Include(FetchContent)
@ -54,6 +72,22 @@ FetchContent_Declare(
FetchContent_MakeAvailable(GTest)
find_package(KF5CoreAddons REQUIRED)
#---ToDo why you don't work :/
#FetchContent_Declare(
# kcoreaddons
# GIT_REPOSITORY https://invent.kde.org/frameworks/kcoreaddons.git
# GIT_TAG v5.76.0)
#FetchContent_MakeAvailable(kcoreaddons)
#___ToDo
FetchContent_Declare(
kwidgetsaddons
GIT_REPOSITORY https://invent.kde.org/frameworks/kwidgetsaddons.git
GIT_TAG v5.76.0)
FetchContent_MakeAvailable(kwidgetsaddons)
add_executable(
${PROJECT_NAME}
tst_My_test.cpp
@ -70,6 +104,7 @@ target_link_libraries(
Qt5::Xml
Qt5::Svg
Qt5::Sql
Qt5::Network
Qt5::Widgets
Qt5::Concurrent)

View File

@ -20,13 +20,26 @@ message("_____________________________________________________________________")
project(G_unittests LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
SET(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
if(DEFINED ENV{QET_DIR})
set(QET_DIR "../..")
set(QET_COMPONENTS
Widgets
Concurrent
Xml
Svg
Network
Sql
PrintSupport
LinguistTools)
message("QET_DIR is not set, assuming QET is ../..")
endif()
@ -34,16 +47,21 @@ message("PROJECT_NAME: " ${PROJECT_NAME})
message("PROJECT_SOURCE_DIR: " ${PROJECT_SOURCE_DIR})
message("QET_DIR: " ${QET_DIR})
SET(CMAKE_CXX_STANDARD 17)
find_package(
QT
NAMES
Qt6
Qt5
COMPONENTS
${QET_COMPONENTS}
REQUIRED
)
find_package(Qt5Gui REQUIRED)
find_package(Qt5Xml REQUIRED)
find_package(Qt5Svg REQUIRED)
find_package(Qt5Sql REQUIRED)
find_package(Qt5Concurrent REQUIRED)
find_package(Qt5Widgets REQUIRED)
find_package(KF5WidgetsAddons)
find_package(KF5CoreAddons)
find_package(
Qt${QT_VERSION_MAJOR}
COMPONENTS
${QET_COMPONENTS}
REQUIRED)
Include(FetchContent)
@ -54,10 +72,27 @@ FetchContent_Declare(
FetchContent_MakeAvailable(GTest)
find_package(KF5CoreAddons REQUIRED)
#---ToDo why you don't work :/
#FetchContent_Declare(
# kcoreaddons
# GIT_REPOSITORY https://invent.kde.org/frameworks/kcoreaddons.git
# GIT_TAG v5.76.0)
#FetchContent_MakeAvailable(kcoreaddons)
#___ToDo
FetchContent_Declare(
kwidgetsaddons
GIT_REPOSITORY https://invent.kde.org/frameworks/kwidgetsaddons.git
GIT_TAG v5.76.0)
FetchContent_MakeAvailable(kwidgetsaddons)
add_executable(
${PROJECT_NAME}
tst_My_test.cpp
main.cpp)
main.cpp
)
target_link_libraries(
${PROJECT_NAME}
@ -70,6 +105,7 @@ target_link_libraries(
Qt5::Xml
Qt5::Svg
Qt5::Sql
Qt5::Network
Qt5::Widgets
Qt5::Concurrent)

View File

@ -20,13 +20,26 @@ message("_____________________________________________________________________")
project(qt_unittests LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
SET(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
if(DEFINED ENV{QET_DIR})
set(QET_DIR "../..")
set(QET_COMPONENTS
Widgets
Concurrent
Xml
Svg
Network
Sql
PrintSupport
LinguistTools)
message("QET_DIR is not set, assuming QET is ../..")
endif()
@ -35,24 +48,40 @@ message("PROJECT_SOURCE_DIR: " ${PROJECT_SOURCE_DIR})
message("QET_DIR: " ${QET_DIR})
find_package(Qt5Test REQUIRED)
find_package(Qt5Gui REQUIRED)
find_package(Qt5Xml REQUIRED)
find_package(Qt5Svg REQUIRED)
find_package(Qt5Sql REQUIRED)
find_package(Qt5Concurrent REQUIRED)
find_package(Qt5Widgets REQUIRED)
find_package(KF5WidgetsAddons)
find_package(KF5CoreAddons)
find_package(
QT
NAMES
Qt6
Qt5
COMPONENTS
${QET_COMPONENTS}
REQUIRED
)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
find_package(
Qt${QT_VERSION_MAJOR}
COMPONENTS
${QET_COMPONENTS}
REQUIRED)
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
Include(FetchContent)
SET(CMAKE_CXX_STANDARD 17)
find_package(KF5CoreAddons REQUIRED)
#---ToDo why you don't work :/
#FetchContent_Declare(
# kcoreaddons
# GIT_REPOSITORY https://invent.kde.org/frameworks/kcoreaddons.git
# GIT_TAG v5.76.0)
#___ToDo
FetchContent_Declare(
kwidgetsaddons
GIT_REPOSITORY https://invent.kde.org/frameworks/kwidgetsaddons.git
GIT_TAG v5.76.0)
#FetchContent_MakeAvailable(kcoreaddons)
FetchContent_MakeAvailable(kwidgetsaddons)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
enable_testing()
add_executable(${PROJECT_NAME} tst_mytest.cpp)
@ -62,13 +91,13 @@ target_link_libraries(
${PROJECT_NAME}
PRIVATE
Qt5::Test
KF5::WidgetsAddons
KF5::CoreAddons
KF5::WidgetsAddons
Qt5::Gui
Qt5::Xml
Qt5::Svg
Qt5::Sql
Qt5::Network
Qt5::Widgets
Qt5::Concurrent
)
Qt5::Concurrent)