Changeset View
Changeset View
Standalone View
Standalone View
src/main.cpp
Show All 20 Lines | |||||
21 | #include <QGuiApplication> | 21 | #include <QGuiApplication> | ||
22 | #else | 22 | #else | ||
23 | #include <QApplication> | 23 | #include <QApplication> | ||
24 | #endif | 24 | #endif | ||
25 | #include <QQmlApplicationEngine> | 25 | #include <QQmlApplicationEngine> | ||
26 | #include <QtQml> | 26 | #include <QtQml> | ||
27 | #include <QUrl> | 27 | #include <QUrl> | ||
28 | #include <QColor> | 28 | #include <QColor> | ||
29 | #include "InfoData.h" | ||||
29 | 30 | | |||
30 | #ifdef Q_OS_ANDROID | 31 | #ifdef Q_OS_ANDROID | ||
31 | #include <QtAndroid> | 32 | #include <QtAndroid> | ||
32 | 33 | | |||
33 | // WindowManager.LayoutParams | 34 | // WindowManager.LayoutParams | ||
34 | #define FLAG_TRANSLUCENT_STATUS 0x04000000 | 35 | #define FLAG_TRANSLUCENT_STATUS 0x04000000 | ||
35 | #define FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS 0x80000000 | 36 | #define FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS 0x80000000 | ||
36 | // View | 37 | // View | ||
Show All 11 Lines | |||||
48 | #else | 49 | #else | ||
49 | QApplication app(argc, argv); | 50 | QApplication app(argc, argv); | ||
50 | #endif | 51 | #endif | ||
51 | 52 | | |||
52 | //Extra debug if needed | 53 | //Extra debug if needed | ||
53 | //qputenv("QML_IMPORT_TRACE", "1"); | 54 | //qputenv("QML_IMPORT_TRACE", "1"); | ||
54 | QQmlApplicationEngine engine; | 55 | QQmlApplicationEngine engine; | ||
55 | 56 | | |||
57 | qmlRegisterType<InfoData>("Data", 1, 0, "InfoData"); | ||||
58 | | ||||
56 | //we want different main files on desktop or mobile | 59 | //we want different main files on desktop or mobile | ||
57 | //very small difference as they as they are subclasses of the same thing | 60 | //very small difference as they as they are subclasses of the same thing | ||
58 | if (qEnvironmentVariableIsSet("QT_QUICK_CONTROLS_MOBILE") && | 61 | if (qEnvironmentVariableIsSet("QT_QUICK_CONTROLS_MOBILE") && | ||
59 | (QString::fromLatin1(qgetenv("QT_QUICK_CONTROLS_MOBILE")) == QStringLiteral("1") || | 62 | (QString::fromLatin1(qgetenv("QT_QUICK_CONTROLS_MOBILE")) == QStringLiteral("1") || | ||
60 | QString::fromLatin1(qgetenv("QT_QUICK_CONTROLS_MOBILE")) == QStringLiteral("true"))) { | 63 | QString::fromLatin1(qgetenv("QT_QUICK_CONTROLS_MOBILE")) == QStringLiteral("true"))) { | ||
61 | engine.load(QUrl(QStringLiteral("qrc:///contents/ui/mobileApp.qml"))); | 64 | engine.load(QUrl(QStringLiteral("qrc:///contents/ui/mobileApp.qml"))); | ||
62 | } else { | 65 | } else { | ||
63 | engine.load(QUrl(QStringLiteral("qrc:///contents/ui/BaseApp.qml"))); | 66 | engine.load(QUrl(QStringLiteral("qrc:///contents/ui/BaseApp.qml"))); | ||
Show All 19 Lines |