X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=launcher%2Fsrc%2Fmain.cpp;fp=launcher%2Fsrc%2Fmain.cpp;h=7181a7858d1b70667e98cdcc7f2b545b099efa79;hb=3508d025b0046fffb337ffceb912947ef1dcf47d;hp=15ce0f65aa3148fd9c4c7fcf4f9badf3694dc98a;hpb=353da85004c72efb2bd6f117a15713b58e0df866;p=apps%2Flauncher.git diff --git a/launcher/src/main.cpp b/launcher/src/main.cpp index 15ce0f6..7181a78 100644 --- a/launcher/src/main.cpp +++ b/launcher/src/main.cpp @@ -30,6 +30,7 @@ #include "appinfo.h" #include "afm_user_daemon_proxy.h" #include "homescreenhandler.h" +#include "shortcutappmodel.h" #include "hmi-debug.h" // XXX: We want this DBus connection to be shared across the different @@ -88,6 +89,7 @@ int main(int argc, char *argv[]) // import C++ class to QML qmlRegisterType("AppModel", 1, 0, "ApplicationModel"); + qmlRegisterType("ShortcutAppModel", 1, 0, "ShortcutAppModel"); // DBus qDBusRegisterMetaType(); @@ -95,11 +97,12 @@ int main(int argc, char *argv[]) ApplicationLauncher *launcher = new ApplicationLauncher(); QLibWindowmanager* layoutHandler = new QLibWindowmanager(); + ShortcutAppModel* shortcutAppModel = new ShortcutAppModel(); if(layoutHandler->init(port,token) != 0){ exit(EXIT_FAILURE); } - AGLScreenInfo screenInfo(layoutHandler->get_scale_factor()); +// AGLScreenInfo screenInfo(layoutHandler->get_scale_factor()); if (layoutHandler->requestSurface(myname) != 0) { exit(EXIT_FAILURE); @@ -121,6 +124,7 @@ int main(int argc, char *argv[]) }); HomescreenHandler* homescreenHandler = new HomescreenHandler(); + QObject::connect(homescreenHandler, SIGNAL(updateShortcutList(QStringList)), shortcutAppModel, SLOT(shortcutUpdate(QStringList))); homescreenHandler->init(port, token.toStdString().c_str(), layoutHandler, myname); QUrl bindingAddress; @@ -148,7 +152,8 @@ int main(int argc, char *argv[]) engine.rootContext()->setContextProperty(QStringLiteral("layoutHandler"), layoutHandler); engine.rootContext()->setContextProperty(QStringLiteral("homescreenHandler"), homescreenHandler); engine.rootContext()->setContextProperty(QStringLiteral("launcher"), launcher); - engine.rootContext()->setContextProperty(QStringLiteral("screenInfo"), &screenInfo); +// engine.rootContext()->setContextProperty(QStringLiteral("screenInfo"), &screenInfo); + engine.rootContext()->setContextProperty(QStringLiteral("shortcutAppModel"), shortcutAppModel); engine.load(QUrl(QStringLiteral("qrc:/Launcher.qml"))); homescreenHandler->getRunnables();