diff --git a/ScStwLibraries/ScStwLibraries.pro b/ScStwLibraries/ScStwLibraries.pro index aa6cfca..9e65997 100644 --- a/ScStwLibraries/ScStwLibraries.pro +++ b/ScStwLibraries/ScStwLibraries.pro @@ -1,5 +1,9 @@ QT -= gui -QT += network multimedia +QT += network multimedia quick + +CONFIG(contains(QMAKE_LFLAGS_CONSOLE)){ +message("this is console") +} TEMPLATE = lib DEFINES += SCSTWLIBRARIES_LIBRARY @@ -20,6 +24,7 @@ DEFINES += QT_DEPRECATED_WARNINGS SOURCES += \ sources/ScStw.cpp \ sources/scstwclient.cpp \ + sources/scstwlibraries.cpp \ sources/scstwrace.cpp \ sources/scstwremotemonitorrace.cpp \ sources/scstwsoundplayer.cpp \ @@ -28,6 +33,7 @@ SOURCES += \ HEADERS += \ headers/ScStw.hpp \ headers/ScStwLibraries_global.h \ + headers/scstwlibraries.h \ headers/scstwrace.h \ headers/scstwclient.h \ headers/scstwremotemonitorrace.h \ diff --git a/ScStwLibraries/headers/scstwlibraries.h b/ScStwLibraries/headers/scstwlibraries.h new file mode 100644 index 0000000..3a4f4ab --- /dev/null +++ b/ScStwLibraries/headers/scstwlibraries.h @@ -0,0 +1,24 @@ +#ifndef SCSTWLIBRARIES_H +#define SCSTWLIBRARIES_H + +#include +#include +#include "scstwclient.h" +#include "scstwtimer.h" +#include "scstwrace.h" + +class ScStwLibraries : public QObject +{ + Q_OBJECT + +public: + static void init(); + +private: + explicit ScStwLibraries(QObject *parent = nullptr); + +signals: + +}; + +#endif // SCSTWLIBRARIES_H diff --git a/ScStwLibraries/sources/scstwlibraries.cpp b/ScStwLibraries/sources/scstwlibraries.cpp new file mode 100644 index 0000000..06598f2 --- /dev/null +++ b/ScStwLibraries/sources/scstwlibraries.cpp @@ -0,0 +1,13 @@ +#include "../headers/scstwlibraries.h" + +ScStwLibraries::ScStwLibraries(QObject *parent) : QObject(parent) +{ + +} + +void ScStwLibraries::init() { + qmlRegisterType("de.itsblue.ScStw", 2, 0, "ScStwRace"); + qmlRegisterType("de.itsblue.ScStw", 2, 0, "ScStwTimer"); + qmlRegisterType("de.itsblue.ScStw", 2, 0, "ScStw"); + qmlRegisterType("de.itsblue.ScStw", 2, 0, "ScStwClient"); +} diff --git a/ScStwStyling/ScStwStyling.pro b/ScStwStyling/ScStwStyling.pro index 2ad5850..5ccc3de 100644 --- a/ScStwStyling/ScStwStyling.pro +++ b/ScStwStyling/ScStwStyling.pro @@ -18,11 +18,13 @@ DEFINES += QT_DEPRECATED_WARNINGS SOURCES += \ sources/scstwapptheme.cpp \ - sources/scstwappthememanager.cpp + sources/scstwappthememanager.cpp \ + sources/scstwstyling.cpp HEADERS += \ headers/scstwapptheme.h \ - headers/scstwappthememanager.h + headers/scstwappthememanager.h \ + headers/scstwstyling.h RESOURCES += \ resources/qml/ScStwStylingQml.qrc \ diff --git a/ScStwStyling/headers/scstwstyling.h b/ScStwStyling/headers/scstwstyling.h new file mode 100644 index 0000000..174bb89 --- /dev/null +++ b/ScStwStyling/headers/scstwstyling.h @@ -0,0 +1,25 @@ +#ifndef SCSTWSTYLING_H +#define SCSTWSTYLING_H + +#include +#include + +#include "scstwapptheme.h" +#include "scstwappthememanager.h" + + +class ScStwStyling : public QObject +{ + Q_OBJECT + +public: + static void init(QQmlApplicationEngine *engine); + +private: + explicit ScStwStyling(QObject *parent = nullptr); + +signals: + +}; + +#endif // SCSTWSTYLING_H diff --git a/ScStwStyling/sources/scstwstyling.cpp b/ScStwStyling/sources/scstwstyling.cpp new file mode 100644 index 0000000..181c004 --- /dev/null +++ b/ScStwStyling/sources/scstwstyling.cpp @@ -0,0 +1,12 @@ +#include "../headers/scstwstyling.h" + +ScStwStyling::ScStwStyling(QObject *parent) : QObject(parent) +{ + +} + +void ScStwStyling::init(QQmlApplicationEngine *engine) { + qmlRegisterUncreatableType("de.itsblue.ScStw.styling", 2, 0, "ScStwAppTheme", "The ScStwAppTheme has to be managed by a ScStwAppTheme manager and is therefore not creatable"); + qmlRegisterType("de.itsblue.ScStw.styling", 2, 0, "ScStwAppThemeManager"); + engine->addImportPath(":/lib"); +}