X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=homescreen%2Fsrc%2Fmain.cpp;h=641c38f0ff6be85e9431270b00d90e6b9ba86333;hb=25461276ebc1d5e9e765a99ff44ee8e4edd144e5;hp=215e7c6c899fd3581096fb08ae80acc8d9a99e33;hpb=79e0139fb399b5af1342783ed6abb61aff6e28dd;p=apps%2Fhomescreen.git diff --git a/homescreen/src/main.cpp b/homescreen/src/main.cpp index 215e7c6..641c38f 100644 --- a/homescreen/src/main.cpp +++ b/homescreen/src/main.cpp @@ -26,10 +26,9 @@ #include "applicationlauncher.h" #include "statusbarmodel.h" #include "applicationmodel.h" +#include "usermanagement.h" #include "appinfo.h" #include "afm_user_daemon_proxy.h" -#include "mastervolume.h" -#include "paclient.h" // XXX: We want this DBus connection to be shared across the different // QML objects, is there another way to do this, a nice way, perhaps? @@ -79,26 +78,18 @@ int main(int argc, char *argv[]) qInstallMessageHandler(noOutput); } - // Fire up PA client QThread - QThread* pat = new QThread; - PaClient* client = new PaClient(); - client->moveToThread(pat); - pat->start(); - qDBusRegisterMetaType(); qDBusRegisterMetaType >(); qmlRegisterType("HomeScreen", 1, 0, "ApplicationLauncher"); qmlRegisterType("Home", 1, 0, "ApplicationModel"); qmlRegisterType("HomeScreen", 1, 0, "StatusBarModel"); - qmlRegisterType("MasterVolume", 1, 0, "MasterVolume"); QQmlApplicationEngine engine; LayoutHandler* layoutHandler = new LayoutHandler(); HomeScreenControlInterface* hsci = new HomeScreenControlInterface(); - QObject::connect(hsci, SIGNAL(newRequestGetSurfaceStatus(int)), layoutHandler, SLOT(requestGetSurfaceStatus(int))); QObject::connect(hsci, SIGNAL(newRequestsToBeVisibleApp(int)), layoutHandler, SLOT(makeMeVisible(int))); QObject::connect(hsci, SIGNAL(newRequestRenderSurfaceToArea(int, int)), layoutHandler, SLOT(requestRenderSurfaceToArea(int,int))); @@ -108,15 +99,7 @@ int main(int argc, char *argv[]) engine.rootContext()->setContextProperty("layoutHandler", layoutHandler); engine.load(QUrl(QStringLiteral("qrc:/main.qml"))); - - QList mobjs = engine.rootObjects(); - MasterVolume *mv = mobjs.first()->findChild("mv"); - engine.rootContext()->setContextProperty("MasterVolume", mv); - QObject::connect(mv, SIGNAL(sliderVolumeChanged(int)), client, SLOT(incDecVolume(int))); - QObject::connect(client, SIGNAL(volumeExternallyChanged(int)), mv, SLOT(changeExternalVolume(int))); - - // Initalize PA client - client->init(); - + UserManagement userManagement(engine.rootObjects().first()); + Q_UNUSED(userManagement); return a.exec(); }