added some initializer classes
This commit is contained in:
parent
81e90dddec
commit
1f6ecd3319
6 changed files with 85 additions and 3 deletions
|
@ -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 \
|
||||
|
|
24
ScStwLibraries/headers/scstwlibraries.h
Normal file
24
ScStwLibraries/headers/scstwlibraries.h
Normal file
|
@ -0,0 +1,24 @@
|
|||
#ifndef SCSTWLIBRARIES_H
|
||||
#define SCSTWLIBRARIES_H
|
||||
|
||||
#include <QObject>
|
||||
#include <QQmlApplicationEngine>
|
||||
#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
|
13
ScStwLibraries/sources/scstwlibraries.cpp
Normal file
13
ScStwLibraries/sources/scstwlibraries.cpp
Normal file
|
@ -0,0 +1,13 @@
|
|||
#include "../headers/scstwlibraries.h"
|
||||
|
||||
ScStwLibraries::ScStwLibraries(QObject *parent) : QObject(parent)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void ScStwLibraries::init() {
|
||||
qmlRegisterType<ScStwRace>("de.itsblue.ScStw", 2, 0, "ScStwRace");
|
||||
qmlRegisterType<ScStwTimer>("de.itsblue.ScStw", 2, 0, "ScStwTimer");
|
||||
qmlRegisterType<ScStw>("de.itsblue.ScStw", 2, 0, "ScStw");
|
||||
qmlRegisterType<ScStwClient>("de.itsblue.ScStw", 2, 0, "ScStwClient");
|
||||
}
|
|
@ -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 \
|
||||
|
|
25
ScStwStyling/headers/scstwstyling.h
Normal file
25
ScStwStyling/headers/scstwstyling.h
Normal file
|
@ -0,0 +1,25 @@
|
|||
#ifndef SCSTWSTYLING_H
|
||||
#define SCSTWSTYLING_H
|
||||
|
||||
#include <QObject>
|
||||
#include <QQmlApplicationEngine>
|
||||
|
||||
#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
|
12
ScStwStyling/sources/scstwstyling.cpp
Normal file
12
ScStwStyling/sources/scstwstyling.cpp
Normal file
|
@ -0,0 +1,12 @@
|
|||
#include "../headers/scstwstyling.h"
|
||||
|
||||
ScStwStyling::ScStwStyling(QObject *parent) : QObject(parent)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void ScStwStyling::init(QQmlApplicationEngine *engine) {
|
||||
qmlRegisterUncreatableType<ScStwAppTheme>("de.itsblue.ScStw.styling", 2, 0, "ScStwAppTheme", "The ScStwAppTheme has to be managed by a ScStwAppTheme manager and is therefore not creatable");
|
||||
qmlRegisterType<ScStwAppThemeManager>("de.itsblue.ScStw.styling", 2, 0, "ScStwAppThemeManager");
|
||||
engine->addImportPath(":/lib");
|
||||
}
|
Reference in a new issue