#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
// import C++ class to QML
qmlRegisterType<ApplicationModel>("AppModel", 1, 0, "ApplicationModel");
+ qmlRegisterType<ShortcutAppModel>("ShortcutAppModel", 1, 0, "ShortcutAppModel");
// DBus
qDBusRegisterMetaType<AppInfo>();
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);
});
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;
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();