From 1d70b2637d1e6014685fd8e7dcd0c6e816cb9002 Mon Sep 17 00:00:00 2001 From: Dorian Zedler Date: Sun, 24 May 2020 15:03:35 +0200 Subject: [PATCH] added some initializer classes --- ScStwMonitor.pro | 2 ++ ScStwMonitorSrc/ScStwMonitorSrc.pro | 2 +- ScStwMonitorSrc/main.cpp | 17 +++++------------ 3 files changed, 8 insertions(+), 13 deletions(-) diff --git a/ScStwMonitor.pro b/ScStwMonitor.pro index 0d46679..52a6a7d 100644 --- a/ScStwMonitor.pro +++ b/ScStwMonitor.pro @@ -3,10 +3,12 @@ CONFIG += ordered console SUBDIRS += \ ScStwLibraries \ + ScStwStyling \ ScStwMonitorSrc ScStwMonitorSrc.depends = Qt-Secret ScStwLibraries.file = shared-libraries/ScStwLibraries/ScStwLibraries.pro +ScStwStyling.file = shared-libraries/ScStwStyling/ScStwStyling.pro contains(QMAKE_CXX, .*raspbian.*arm.*):{ GLOBAL_TARGET_PATH = "/home/pi/ScStwMonitor" diff --git a/ScStwMonitorSrc/ScStwMonitorSrc.pro b/ScStwMonitorSrc/ScStwMonitorSrc.pro index 489a945..88ddfa4 100755 --- a/ScStwMonitorSrc/ScStwMonitorSrc.pro +++ b/ScStwMonitorSrc/ScStwMonitorSrc.pro @@ -29,7 +29,7 @@ RESOURCES += \ # include submodules 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 QML_IMPORT_PATH = diff --git a/ScStwMonitorSrc/main.cpp b/ScStwMonitorSrc/main.cpp index ab55a3e..5cfbf24 100755 --- a/ScStwMonitorSrc/main.cpp +++ b/ScStwMonitorSrc/main.cpp @@ -5,10 +5,8 @@ #include #include -#include -#include -#include -#include +#include +#include #include "headers/scstwmonitorbackend.h" #if defined(Q_OS_IOS) @@ -25,17 +23,12 @@ int main(int argc, char *argv[]) app.setOrganizationDomain("itsblue.de"); qmlRegisterType("de.itsblue.ScStwMonitor", 2, 0, "ScStwMonitorBackend"); - // setup speed backend and App themes - 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"); - //qmlRegisterUncreatableType("de.itsblue.ScStw", 2, 0, "ScStwAppTheme", "The ScStwAppTheme has to be managed by a ScStwAppTheme manager and is therefore not creatable"); - //qmlRegisterType("de.itsblue.ScStw", 2, 0, "ScStwAppThemeManager"); - QQmlApplicationEngine engine; + ScStwLibraries::init(); + ScStwStyling::init(&engine); + QSize size = app.screens().first()->size(); engine.rootContext()->setContextProperty("XscreenHeight", size.height()); engine.rootContext()->setContextProperty("XscreenWidth", size.width());