From: Bocklage, Jens Date: Mon, 12 Dec 2016 16:02:32 +0000 (+0100) Subject: Integrate HomeScreen D-Bus API X-Git-Tag: 3.0.0~33 X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?p=staging%2FHomeScreen.git;a=commitdiff_plain;h=3b66010c1f381f397e827209727742daf642e7fd Integrate HomeScreen D-Bus API This was lost when integrating the new QML HMI Signed-off-by: Bocklage, Jens --- diff --git a/HomeScreen/qml/main.qml b/HomeScreen/qml/main.qml index 143d649..6a515fc 100644 --- a/HomeScreen/qml/main.qml +++ b/HomeScreen/qml/main.qml @@ -31,10 +31,6 @@ Window { id: launcher } - LayoutHandler { - id: layoutHandler - } - Image { id: container anchors.centerIn: parent diff --git a/HomeScreen/src/main.cpp b/HomeScreen/src/main.cpp index ac798a9..3cf8e8c 100644 --- a/HomeScreen/src/main.cpp +++ b/HomeScreen/src/main.cpp @@ -18,12 +18,14 @@ #include #include #include +#include #include #include "../src2/applicationlauncher.h" #include "../src2/statusbarmodel.h" #include "layouthandler.h" #include "../src2/applicationmodel.h" +#include "homescreencontrolinterface.h" int main(int argc, char *argv[]) { @@ -43,10 +45,21 @@ int main(int argc, char *argv[]) qmlRegisterType("HomeScreen", 1, 0, "ApplicationLauncher"); qmlRegisterType("Home", 1, 0, "ApplicationModel"); qmlRegisterType("HomeScreen", 1, 0, "StatusBarModel"); - qmlRegisterType("HomeScreen", 1, 0, "LayoutHandler"); - QQmlApplicationEngine engine; + + LayoutHandler* layoutHandler = new LayoutHandler(); + + HomeScreenControlInterface* hsci = new HomeScreenControlInterface(); + QObject::connect(hsci, SIGNAL(newRequestGetAllSurfacesOfProcess(int)), layoutHandler, SLOT(requestGetAllSurfacesOfProcess(int))); + 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))); + QObject::connect(hsci, SIGNAL(newRequestRenderSurfaceToAreaAllowed(int, int)), layoutHandler, SLOT(requestRenderSurfaceToAreaAllowed(int,int))); + QObject::connect(hsci, SIGNAL(newRequestSurfaceIdToFullScreen(int)), layoutHandler, SLOT(requestSurfaceIdToFullScreen(int))); + + engine.rootContext()->setContextProperty("layoutHandler", layoutHandler); + engine.load(QUrl(QStringLiteral("qrc:/main.qml"))); return a.exec();