X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=HomeScreen%2Fsrc%2Fmain.cpp;h=ac798a9fee169348337ad3c6b465153d3500bd4a;hb=f2b8bddb94a451c4bd822ef723a8b739236f4b4f;hp=a896c2e6e6c860fd2c69fa5ba0a88ec814bddab1;hpb=83cfbb9fe4bcc17f6b00c8a25aa3eb8c2c850ac0;p=staging%2FHomeScreen.git diff --git a/HomeScreen/src/main.cpp b/HomeScreen/src/main.cpp index a896c2e..ac798a9 100644 --- a/HomeScreen/src/main.cpp +++ b/HomeScreen/src/main.cpp @@ -16,20 +16,17 @@ #include "mainwindow.h" #include -#include -//#include +#include +#include +#include + +#include "../src2/applicationlauncher.h" +#include "../src2/statusbarmodel.h" +#include "layouthandler.h" +#include "../src2/applicationmodel.h" int main(int argc, char *argv[]) { - // allow only one instance of this application - /*QSharedMemory appInstance; - appInstance.setKey("HomeScreen"); - if (!appInstance.create(1)) - { - qDebug("Only one instance of the Home Screen App allowed!"); - exit(-1); - }*/ - QApplication a(argc, argv); // used for application settings (QSettings) @@ -43,20 +40,14 @@ int main(int argc, char *argv[]) qDBusRegisterMetaType(); qDBusRegisterMetaType >(); - MainWindow w; - w.show(); -#ifdef HAVE_IVI_LAYERMANAGEMENT_API - // the WindowManager positions the surface correctly -#else - w.move(0, 0); -#endif - -#ifdef __arm__ - qDebug("Running on ARM architecture"); -#endif -#ifdef __i386__ - qDebug("Running on x86 architecture"); -#endif + qmlRegisterType("HomeScreen", 1, 0, "ApplicationLauncher"); + qmlRegisterType("Home", 1, 0, "ApplicationModel"); + qmlRegisterType("HomeScreen", 1, 0, "StatusBarModel"); + qmlRegisterType("HomeScreen", 1, 0, "LayoutHandler"); + + + QQmlApplicationEngine engine; + engine.load(QUrl(QStringLiteral("qrc:/main.qml"))); return a.exec(); }