aboutsummaryrefslogtreecommitdiffstats
path: root/HomeScreenNG/main.cpp
diff options
context:
space:
mode:
authorTasuku Suzuki <tasuku.suzuki@qt.io>2016-12-02 11:19:51 +0900
committerTasuku Suzuki <tasuku.suzuki@qt.io>2016-12-02 13:14:55 +0900
commit6bf5bbd0ab5abab05305667a516c069c7c5556f4 (patch)
treef2cf3278c383771ff1b40dae2c72b0f08fdd69ef /HomeScreenNG/main.cpp
parent505ec164e5174ddd838c0cac1e3e828930cb3b50 (diff)
WIP: add Qt Quick HomeScreen UI
Change-Id: I2be964f6d9e76df616169d7b2654d17ae9446687 Signed-off-by: Tasuku Suzuki <tasuku.suzuki@qt.io>
Diffstat (limited to 'HomeScreenNG/main.cpp')
-rw-r--r--HomeScreenNG/main.cpp26
1 files changed, 26 insertions, 0 deletions
diff --git a/HomeScreenNG/main.cpp b/HomeScreenNG/main.cpp
new file mode 100644
index 0000000..dad4c7d
--- /dev/null
+++ b/HomeScreenNG/main.cpp
@@ -0,0 +1,26 @@
+#include <QtGui/QGuiApplication>
+#include <QtGui/QWindow>
+#include <QtQml/QQmlApplicationEngine>
+#include <QtQml/qqml.h>
+#include <QtCore/QDebug>
+
+#include "applicationlauncher.h"
+#include "statusbarmodel.h"
+
+int main(int argc, char *argv[])
+{
+ QCoreApplication::setOrganizationDomain(QStringLiteral("automotivelinux.org"));
+ QCoreApplication::setOrganizationName(QStringLiteral("AutomotiveGradeLinux"));
+ QCoreApplication::setApplicationName(QStringLiteral("HomeScreen"));
+ QCoreApplication::setApplicationVersion(QStringLiteral("0.0.1"));
+
+ QGuiApplication app(argc, argv);
+
+ qmlRegisterType<ApplicationLauncher>("HomeScreen", 1, 0, "ApplicationLauncher");
+ qmlRegisterType<StatusBarModel>("HomeScreen", 1, 0, "StatusBarModel");
+
+ QQmlApplicationEngine engine;
+ engine.load(QUrl(QStringLiteral("qrc:/main.qml")));
+
+ return app.exec();
+}