aboutsummaryrefslogtreecommitdiffstats
path: root/homescreen/src/main.cpp
diff options
context:
space:
mode:
authorNaveen Bobbili <nbobbili@amazon.com>2019-04-28 20:51:16 -0700
committerJan-Simon Möller <jsmoeller@linuxfoundation.org>2019-06-24 14:14:42 +0200
commit9f02e451dd2f91c217d73c8029bb939b3a211672 (patch)
treed79eb0f93e835746169b3a96454cf8da70c0c037 /homescreen/src/main.cpp
parent2509e623a5f95a612a715818f15daddf2ca77f12 (diff)
Code commit by ICS team to add Alexa Voice Chrome to Homescreen App.sandbox/jsmoeller/speechdemo
Change-Id: I2052e345baaf4306e8e3f27a01bc6940f4d27d88 Signed-off-by: Naveen Bobbili <nbobbili@amazon.com>
Diffstat (limited to 'homescreen/src/main.cpp')
-rw-r--r--homescreen/src/main.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/homescreen/src/main.cpp b/homescreen/src/main.cpp
index 5f283fb..5c819f9 100644
--- a/homescreen/src/main.cpp
+++ b/homescreen/src/main.cpp
@@ -32,6 +32,7 @@
#include "mastervolume.h"
#include "homescreenhandler.h"
#include "hmi-debug.h"
+#include "chromecontroller.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?
@@ -91,6 +92,8 @@ int main(int argc, char *argv[])
// qmlRegisterType<ApplicationLauncher>("HomeScreen", 1, 0, "ApplicationLauncher");
qmlRegisterType<StatusBarModel>("HomeScreen", 1, 0, "StatusBarModel");
qmlRegisterType<MasterVolume>("MasterVolume", 1, 0, "MasterVolume");
+ qmlRegisterUncreatableType<ChromeController>("SpeechChrome", 1, 0, "SpeechChromeController",
+ QLatin1String("SpeechChromeController is uncreatable."));
ApplicationLauncher *launcher = new ApplicationLauncher();
QLibWindowmanager* layoutHandler = new QLibWindowmanager();
@@ -140,6 +143,7 @@ int main(int argc, char *argv[])
engine.rootContext()->setContextProperty("launcher", launcher);
engine.rootContext()->setContextProperty("weather", new Weather(bindingAddress));
engine.rootContext()->setContextProperty("bluetooth", new Bluetooth(bindingAddress, engine.rootContext()));
+ engine.rootContext()->setContextProperty("speechChromeController", new ChromeController(bindingAddress, &engine));
engine.rootContext()->setContextProperty("screenInfo", &screenInfo);
engine.load(QUrl(QStringLiteral("qrc:/main.qml")));