added some initializer classes
This commit is contained in:
parent
0cb51aecf6
commit
1d70b2637d
3 changed files with 8 additions and 13 deletions
|
@ -3,10 +3,12 @@ CONFIG += ordered console
|
||||||
|
|
||||||
SUBDIRS += \
|
SUBDIRS += \
|
||||||
ScStwLibraries \
|
ScStwLibraries \
|
||||||
|
ScStwStyling \
|
||||||
ScStwMonitorSrc
|
ScStwMonitorSrc
|
||||||
|
|
||||||
ScStwMonitorSrc.depends = Qt-Secret
|
ScStwMonitorSrc.depends = Qt-Secret
|
||||||
ScStwLibraries.file = shared-libraries/ScStwLibraries/ScStwLibraries.pro
|
ScStwLibraries.file = shared-libraries/ScStwLibraries/ScStwLibraries.pro
|
||||||
|
ScStwStyling.file = shared-libraries/ScStwStyling/ScStwStyling.pro
|
||||||
|
|
||||||
contains(QMAKE_CXX, .*raspbian.*arm.*):{
|
contains(QMAKE_CXX, .*raspbian.*arm.*):{
|
||||||
GLOBAL_TARGET_PATH = "/home/pi/ScStwMonitor"
|
GLOBAL_TARGET_PATH = "/home/pi/ScStwMonitor"
|
||||||
|
|
|
@ -29,7 +29,7 @@ RESOURCES += \
|
||||||
|
|
||||||
# include submodules
|
# include submodules
|
||||||
include($$PWD/../shared-libraries/ScStwLibraries/ScStwLibraries.pri)
|
include($$PWD/../shared-libraries/ScStwLibraries/ScStwLibraries.pri)
|
||||||
#include($$PWD/../shared-libraries/ScStwStyling/ScStwStyling.pri)
|
include($$PWD/../shared-libraries/ScStwStyling/ScStwStyling.pri)
|
||||||
|
|
||||||
# Additional import path used to resolve QML modules in Qt Creator's code model
|
# Additional import path used to resolve QML modules in Qt Creator's code model
|
||||||
QML_IMPORT_PATH =
|
QML_IMPORT_PATH =
|
||||||
|
|
|
@ -5,10 +5,8 @@
|
||||||
#include <QRect>
|
#include <QRect>
|
||||||
#include <QScreen>
|
#include <QScreen>
|
||||||
|
|
||||||
#include <scstwrace.h>
|
#include <scstwlibraries.h>
|
||||||
#include <scstwtimer.h>
|
#include <scstwstyling.h>
|
||||||
#include <ScStw.hpp>
|
|
||||||
#include <scstwclient.h>
|
|
||||||
|
|
||||||
#include "headers/scstwmonitorbackend.h"
|
#include "headers/scstwmonitorbackend.h"
|
||||||
#if defined(Q_OS_IOS)
|
#if defined(Q_OS_IOS)
|
||||||
|
@ -25,17 +23,12 @@ int main(int argc, char *argv[])
|
||||||
app.setOrganizationDomain("itsblue.de");
|
app.setOrganizationDomain("itsblue.de");
|
||||||
|
|
||||||
qmlRegisterType<ScStwMonitorBackend>("de.itsblue.ScStwMonitor", 2, 0, "ScStwMonitorBackend");
|
qmlRegisterType<ScStwMonitorBackend>("de.itsblue.ScStwMonitor", 2, 0, "ScStwMonitorBackend");
|
||||||
// setup speed backend and App themes
|
|
||||||
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");
|
|
||||||
//qmlRegisterUncreatableType<ScStwAppTheme>("de.itsblue.ScStw", 2, 0, "ScStwAppTheme", "The ScStwAppTheme has to be managed by a ScStwAppTheme manager and is therefore not creatable");
|
|
||||||
//qmlRegisterType<ScStwAppThemeManager>("de.itsblue.ScStw", 2, 0, "ScStwAppThemeManager");
|
|
||||||
|
|
||||||
|
|
||||||
QQmlApplicationEngine engine;
|
QQmlApplicationEngine engine;
|
||||||
|
|
||||||
|
ScStwLibraries::init();
|
||||||
|
ScStwStyling::init(&engine);
|
||||||
|
|
||||||
QSize size = app.screens().first()->size();
|
QSize size = app.screens().first()->size();
|
||||||
engine.rootContext()->setContextProperty("XscreenHeight", size.height());
|
engine.rootContext()->setContextProperty("XscreenHeight", size.height());
|
||||||
engine.rootContext()->setContextProperty("XscreenWidth", size.width());
|
engine.rootContext()->setContextProperty("XscreenWidth", size.width());
|
||||||
|
|
Reference in a new issue