summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBocklage, Jens <Jens_Bocklage@mentor.com>2016-12-12 17:02:32 +0100
committerBocklage, Jens <Jens_Bocklage@mentor.com>2016-12-12 17:02:32 +0100
commit3b66010c1f381f397e827209727742daf642e7fd (patch)
treec5de4829acc2491ca323673032e71a09edb7d8ed
parent7515965e55e112a4228764614bcdd3811ae44dd7 (diff)
Integrate HomeScreen D-Bus API
This was lost when integrating the new QML HMI Signed-off-by: Bocklage, Jens <Jens_Bocklage@mentor.com>
-rw-r--r--HomeScreen/qml/main.qml4
-rw-r--r--HomeScreen/src/main.cpp17
2 files changed, 15 insertions, 6 deletions
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 <QApplication>
#include <QtGui/QGuiApplication>
#include <QtQml/QQmlApplicationEngine>
+#include <QtQml/QQmlContext>
#include <QtQml/qqml.h>
#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<ApplicationLauncher>("HomeScreen", 1, 0, "ApplicationLauncher");
qmlRegisterType<ApplicationModel>("Home", 1, 0, "ApplicationModel");
qmlRegisterType<StatusBarModel>("HomeScreen", 1, 0, "StatusBarModel");
- qmlRegisterType<LayoutHandler>("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();