From 0349f05f5885987952a2d8de03983b36722b264e Mon Sep 17 00:00:00 2001 From: Naveen Bobbili Date: Sun, 28 Apr 2019 20:51:16 -0700 Subject: Add push to talk support to homescreen Reworked version of Alexa specific changes from ICS to add push to talk button for voice services to homescreen media area. v2: change config.xml to audiomixer v3: reworked to not be Alexa specific: - Now use the default voiceagent if available, instead of hard-coding Alexa usage - The Alexa logo for the button has been replaced with a generic microphone icon derived from the radio application's launcher icon. This is a placeholder until a new icon is provided by LF graphics team. Meeting any Amazon requirements around Alexa chrome is now envisioned as being provided for with a TBD voiceagent API enhancement. - The QML for the PTT button has been moved to MediaAreaBlank.qml, which seems a more logical location for it ATM. It is likely that the MediaArea QML should be simplified in a future change, as it currently contains a signficant amount of unused code. - The PTT button has been moved to the left hand side of the media area, as this seems more sensible if demonstrating driver usage. - The delay on fade-out of the master volume slider has been lowered to 3 seconds from 5, with the PTT button present it started seeming excessive during testing. - Some extra debug messages have been added to make tracking the voiceagent state more straightforward. Bug-AGL: SPEC-2764, Signed-off-by: Naveen Bobbili Signed-off-by: Jan-Simon Moeller Signed-off-by: Scott Murray Change-Id: I398bf7aebc5c9b459b1fce94511eee3698c08347 --- homescreen/homescreen.pro | 12 +- homescreen/qml/MediaArea.qml | 4 +- homescreen/qml/MediaAreaBlank.qml | 18 +- homescreen/qml/SpeechChrome.qml | 120 ++++++++ homescreen/qml/images/SpeechChrome/bar.png | Bin 0 -> 23826 bytes .../qml/images/SpeechChrome/push_to_talk.svg | 322 +++++++++++++++++++++ .../qml/images/SpeechChrome/speechchrome.qrc | 6 + homescreen/qml/main.qml | 2 +- homescreen/qml/qml.qrc | 1 + homescreen/src/aglsocketwrapper.cpp | 90 ++++++ homescreen/src/aglsocketwrapper.h | 35 +++ homescreen/src/chromecontroller.cpp | 159 ++++++++++ homescreen/src/chromecontroller.h | 42 +++ homescreen/src/constants.h | 42 +++ homescreen/src/main.cpp | 4 + package/config.xml | 1 + 16 files changed, 848 insertions(+), 10 deletions(-) create mode 100644 homescreen/qml/SpeechChrome.qml create mode 100644 homescreen/qml/images/SpeechChrome/bar.png create mode 100644 homescreen/qml/images/SpeechChrome/push_to_talk.svg create mode 100644 homescreen/qml/images/SpeechChrome/speechchrome.qrc create mode 100644 homescreen/src/aglsocketwrapper.cpp create mode 100644 homescreen/src/aglsocketwrapper.h create mode 100644 homescreen/src/chromecontroller.cpp create mode 100644 homescreen/src/chromecontroller.h create mode 100644 homescreen/src/constants.h diff --git a/homescreen/homescreen.pro b/homescreen/homescreen.pro index 8baa90d..773271e 100644 --- a/homescreen/homescreen.pro +++ b/homescreen/homescreen.pro @@ -30,14 +30,19 @@ SOURCES += \ src/statusbarserver.cpp \ src/applicationlauncher.cpp \ src/mastervolume.cpp \ - src/homescreenhandler.cpp + src/homescreenhandler.cpp \ + src/aglsocketwrapper.cpp \ + src/chromecontroller.cpp HEADERS += \ src/statusbarmodel.h \ src/statusbarserver.h \ src/applicationlauncher.h \ src/mastervolume.h \ - src/homescreenhandler.h + src/homescreenhandler.h \ + src/aglsocketwrapper.h \ + src/chromecontroller.h \ + src/constants.h OTHER_FILES += \ README.md @@ -49,4 +54,5 @@ RESOURCES += \ qml/images/Shortcut/shortcut.qrc \ qml/images/Status/status.qrc \ qml/images/images.qrc \ - qml/qml.qrc + qml/qml.qrc \ + qml/images/SpeechChrome/speechchrome.qrc \ No newline at end of file diff --git a/homescreen/qml/MediaArea.qml b/homescreen/qml/MediaArea.qml index 0447589..3b6d18a 100644 --- a/homescreen/qml/MediaArea.qml +++ b/homescreen/qml/MediaArea.qml @@ -20,8 +20,8 @@ import QtQuick.Controls 2.0 StackView { id: root - width: 1080 - height: 215 + width: parent.width + height: parent.height initialItem: blank diff --git a/homescreen/qml/MediaAreaBlank.qml b/homescreen/qml/MediaAreaBlank.qml index ebddb0c..60d0c92 100644 --- a/homescreen/qml/MediaAreaBlank.qml +++ b/homescreen/qml/MediaAreaBlank.qml @@ -22,8 +22,8 @@ import AGL.Demo.Controls 1.0 import MasterVolume 1.0 Image { - width: 1080 - height: 215 + width: parent.width + height: parent.height source: './images/Utility_Logo_Background-01.svg' property bool displayVolume: false; @@ -40,14 +40,14 @@ Image { } Image { - id: logo_image + id: logo_image anchors.centerIn: parent source: './images/Utility_Logo_Grey-01.svg' } Timer { id: volume_timer - interval: 5000; running: false; repeat: false + interval: 3000; running: false; repeat: false onTriggered: displayVolume = false } @@ -56,11 +56,13 @@ Image { PropertyChanges { target: master_volume; opacity: 1.0 } PropertyChanges { target: slider; enabled: true } PropertyChanges { target: logo_image; opacity: 0.0 } + PropertyChanges { target: speech_chrome; visible: false } }, State { when: !displayVolume; PropertyChanges { target: master_volume; opacity: 0.0 } PropertyChanges { target: slider; enabled: false } PropertyChanges { target: logo_image; opacity: 1.0 } + PropertyChanges { target: speech_chrome; visible: speech_chrome.agentPresent } } ] @@ -121,4 +123,12 @@ Image { } } } + + SpeechChrome { + id: speech_chrome + anchors.left: parent.left + anchors.right: parent.right + anchors.bottom: parent.bottom + height: parent.height + } } diff --git a/homescreen/qml/SpeechChrome.qml b/homescreen/qml/SpeechChrome.qml new file mode 100644 index 0000000..911d481 --- /dev/null +++ b/homescreen/qml/SpeechChrome.qml @@ -0,0 +1,120 @@ +import QtQuick 2.0 +import SpeechChrome 1.0 + +Item { + id: root + + clip: true + + property bool agentPresent: speechChromeController.agentPresent + + visible: agentPresent + + Image { + id: chromeBarImage + + anchors.top: parent.top + source: "./images/SpeechChrome/bar.png" + + Behavior on x { + NumberAnimation { duration: 250 } + } + Behavior on opacity { + NumberAnimation { duration: 250 } + } + } + + Image { + id: pushToTalk + + height: parent.height * 0.80 + width: height + + anchors.left: parent.left + anchors.leftMargin: parent.width / 128 + anchors.verticalCenter: parent.verticalCenter + source: "./images/SpeechChrome/push_to_talk.svg" + + MouseArea { + anchors.fill: parent + onPressed: speechChromeController.pushToTalk() + } + + Behavior on opacity { + NumberAnimation { duration: 250 } + } + } + + states: [ + State { + name: "Idle" + when: speechChromeController.chromeState == SpeechChromeController.Idle + PropertyChanges { + target: chromeBarImage + opacity: 0.0 + x: 0 + } + PropertyChanges { + target: pushToTalk + opacity: 1.0 + enabled: true + } + }, + State { + name: "Listening" + when: speechChromeController.chromeState == SpeechChromeController.Listening + PropertyChanges { + target: chromeBarImage + opacity: 1.0 + x: 0 + } + PropertyChanges { + target: pushToTalk + opacity: 0.0 + enabled: false + } + }, + State { + name: "Thinking" + when: speechChromeController.chromeState == SpeechChromeController.Thinking + PropertyChanges { + target: chromeBarImage + opacity: 1.0 + x: root.width - chromeBarImage.width + } + PropertyChanges { + target: pushToTalk + opacity: 0.0 + enabled: false + } + }, + State { + name: "Speaking" + when: speechChromeController.chromeState == SpeechChromeController.Speaking + PropertyChanges { + target: chromeBarImage + opacity: 1.0 + x: (root.width - chromeBarImage.width) * 0.5 + } + PropertyChanges { + target: pushToTalk + opacity: 0.0 + enabled: false + } + }, + State { + name: "MicrophoneOff" + when: speechChromeController.chromeState == SpeechChromeController.MicrophoneOff + PropertyChanges { + target: chromeBarImage + opacity: 0.0 + x: 0 + } + PropertyChanges { + target: pushToTalk + opacity: 1.0 + enabled: true + } + } + ] +} diff --git a/homescreen/qml/images/SpeechChrome/bar.png b/homescreen/qml/images/SpeechChrome/bar.png new file mode 100644 index 0000000..caabde1 Binary files /dev/null and b/homescreen/qml/images/SpeechChrome/bar.png differ diff --git a/homescreen/qml/images/SpeechChrome/push_to_talk.svg b/homescreen/qml/images/SpeechChrome/push_to_talk.svg new file mode 100644 index 0000000..0c775a1 --- /dev/null +++ b/homescreen/qml/images/SpeechChrome/push_to_talk.svg @@ -0,0 +1,322 @@ + + + +image/svg+xml \ No newline at end of file diff --git a/homescreen/qml/images/SpeechChrome/speechchrome.qrc b/homescreen/qml/images/SpeechChrome/speechchrome.qrc new file mode 100644 index 0000000..42357f1 --- /dev/null +++ b/homescreen/qml/images/SpeechChrome/speechchrome.qrc @@ -0,0 +1,6 @@ + + + bar.png + push_to_talk.svg + + diff --git a/homescreen/qml/main.qml b/homescreen/qml/main.qml index 7d40276..233ee4f 100644 --- a/homescreen/qml/main.qml +++ b/homescreen/qml/main.qml @@ -99,7 +99,7 @@ Window { } } - Timer { + Timer { id:notificationTimer interval: 3000 running: false diff --git a/homescreen/qml/qml.qrc b/homescreen/qml/qml.qrc index e60ea63..d901481 100644 --- a/homescreen/qml/qml.qrc +++ b/homescreen/qml/qml.qrc @@ -10,5 +10,6 @@ StatusArea.qml TopArea.qml IconItem.qml + SpeechChrome.qml diff --git a/homescreen/src/aglsocketwrapper.cpp b/homescreen/src/aglsocketwrapper.cpp new file mode 100644 index 0000000..8352660 --- /dev/null +++ b/homescreen/src/aglsocketwrapper.cpp @@ -0,0 +1,90 @@ +#include "aglsocketwrapper.h" +#include "constants.h" + +#include +#include +#include +#include +#include + +#include + +namespace { +enum MessageTypes { + Call = 2, + Success = 3, + Error = 4, + Event = 5 +}; +} + +AglSocketWrapper::AglSocketWrapper(QObject *parent) : + QObject(parent) + , m_socket(new QWebSocket(QString(), QWebSocketProtocol::VersionLatest, this)) +{ + connect(m_socket, &QWebSocket::connected, this, &AglSocketWrapper::connected); + connect(m_socket, &QWebSocket::disconnected, this, &AglSocketWrapper::disconnected); + connect(m_socket, QOverload::of(&QWebSocket::error), + [](QAbstractSocket::SocketError error) -> void { + qWarning() << "AglSocketWrapper internal socket error" << error; + }); + connect(m_socket, &QWebSocket::textMessageReceived, + this, [this](const QString &msg) -> void { + const QJsonDocument doc = QJsonDocument::fromJson(msg.toUtf8()); + if (doc.isArray()) { + const QJsonArray msgArray = doc.array(); + if (msgArray.count() >= 3) { + const int msgType = msgArray.at(0).toInt(); + switch (msgType) { + case Success: + case Error: { + auto callbackIt = m_callbacks.find( msgArray.at(1).toString()); + if (callbackIt != m_callbacks.constEnd()) { + (*callbackIt)(msgType == Success, msgArray.at(2)); + m_callbacks.erase(callbackIt); + } + } + break; + case Event: { + const QJsonObject eventObj = msgArray.at(2).toObject(); + emit eventReceived(msgArray.at(1).toString(), eventObj.value(vshl::DATA_TAG)); + } + break; + default: + break; + } + return; + } + } + qWarning() << "Unsupported message format:" << msg; + }); +} + +void AglSocketWrapper::open(const QUrl &url) +{ + m_socket->open(url); +} + +void AglSocketWrapper::close() +{ + m_socket->close(); +} + +void AglSocketWrapper::apiCall(const QString &api, const QString &verb, const QJsonValue &args, + AglSocketWrapper::ApiCallback callback) +{ + const QString id = QUuid::createUuid().toString(); + if (callback) + m_callbacks.insert(id, callback); + + QJsonArray callData; + callData.append(Call); + callData.append(id); + callData.append(api + QLatin1String("/") + verb); + callData.append(args); + + const QString msg = QLatin1String(QJsonDocument(callData).toJson(QJsonDocument::Compact)); + m_socket->sendTextMessage(msg); + + qDebug() << Q_FUNC_INFO << "Data sent:" << msg; +} diff --git a/homescreen/src/aglsocketwrapper.h b/homescreen/src/aglsocketwrapper.h new file mode 100644 index 0000000..4807cd5 --- /dev/null +++ b/homescreen/src/aglsocketwrapper.h @@ -0,0 +1,35 @@ +#ifndef AGLSOCKETWRAPPER_H +#define AGLSOCKETWRAPPER_H + +#include +#include +#include +#include + +#include + +class QWebSocket; +class AglSocketWrapper : public QObject +{ + Q_OBJECT +public: + explicit AglSocketWrapper(QObject *parent = nullptr); + + void open(const QUrl &url); + void close(); + + using ApiCallback = std::function; + void apiCall(const QString &api, const QString &verb, const QJsonValue &args = QJsonValue(), + ApiCallback callback = nullptr); + +signals: + void connected(); + void disconnected(); + void eventReceived(const QString &eventName, const QJsonValue &data); + +private: + QWebSocket *m_socket; + QMap m_callbacks; +}; + +#endif // AGLSOCKETWRAPPER_H diff --git a/homescreen/src/chromecontroller.cpp b/homescreen/src/chromecontroller.cpp new file mode 100644 index 0000000..b604dae --- /dev/null +++ b/homescreen/src/chromecontroller.cpp @@ -0,0 +1,159 @@ +#include "chromecontroller.h" +#include "aglsocketwrapper.h" +#include "constants.h" + +#include +#include +#include + +ChromeController::ChromeController(const QUrl &bindingUrl, QObject *parent) : + QObject(parent) + , m_aglSocket(new AglSocketWrapper(this)) +{ + //Alexa voice agent subscription---------------------------------------------------------------- + { + connect(m_aglSocket, &AglSocketWrapper::connected, + this, [this]() -> void { + m_aglSocket->apiCall(vshl::API, vshl::VOICE_AGENT_ENUMERATION_VERB, QJsonValue(), + [this](bool result, const QJsonValue &data) -> void { + qDebug() << (vshl::API + QLatin1String(":") + vshl::VOICE_AGENT_ENUMERATION_VERB) + << "result: " << result << " val: " << data; + if (!result) { + qWarning() << "Failed to enumerate voice agents"; + return; + } + + QJsonObject dataObj = data.toObject(); + auto objIt = dataObj.find(vshl::RESPONSE_TAG); + if (objIt == dataObj.constEnd()) { + qWarning() << "Voice agent enumeration response tag missing." + << dataObj; + return; + } + + // Get default voice agent + dataObj = objIt.value().toObject(); + QJsonObject responseObj = dataObj; + objIt = dataObj.find(vshl::DEFAULT_TAG); + if (objIt == dataObj.constEnd()) { + qWarning() << "Voice agent enumeration default agent tag missing." + << dataObj; + return; + } + QString agentId = objIt.value().toString(); + if (agentId.isEmpty()) { + qWarning() << "Default voice agent not found"; + return; + } + qDebug() << (vshl::API + QLatin1String(":") + vshl::VOICE_AGENT_ENUMERATION_VERB) << "default: " << agentId; + + objIt = dataObj.find(vshl::AGENTS_TAG); + if (objIt == dataObj.constEnd()) { + qWarning() << "Voice agent enumeration agents tag missing." + << dataObj; + return; + } + + // Sanity check that the default agent is actually listed + bool agentFound = false; + const QJsonArray agents = objIt.value().toArray(); + for (const QJsonValue &agent : agents) { + const QJsonObject agentObj = agent.toObject(); + auto agentIt = agentObj.find(vshl::ID_TAG); + if (agentIt == agentObj.constEnd()) + continue; + if (agentId.compare(agentIt.value().toString()) == 0) { + agentFound = true; + break; + } + } + if (!agentFound) { + qWarning() << "Default voice agent configuration not found"; + return; + } + m_agentPresent = true; + emit agentPresentChanged(); + + //Voice agent subscription------------------------------------------------------ + { + m_voiceAgentId = agentId; + const QJsonObject args { + { vshl::VOICE_AGENT_ID_ARG, agentId }, + { vshl::VOICE_AGENT_EVENTS_ARG, vshl::VOICE_AGENT_EVENTS_ARRAY } + }; + m_aglSocket->apiCall(vshl::API, vshl::SUBSCRIBE_VERB, args, + [](bool result, const QJsonValue &data) -> void { + qDebug() << (vshl::API + QLatin1String(":") + vshl::SUBSCRIBE_VERB) + << "result: " << result << " val: " << data; + }); + } + //------------------------------------------------------------------------------ + }); + }); + } + //----------------------------------------------------------------------------------------------< + + //Socket connection management------------------------------------------------------------------ + { + auto connectToBinding = [bindingUrl, this]() -> void { + m_aglSocket->open(bindingUrl); + qDebug() << "Connecting to:" << bindingUrl; + }; + connect(m_aglSocket, &AglSocketWrapper::disconnected, this, [connectToBinding]() -> void { + QTimer::singleShot(2500, connectToBinding); + }); + connectToBinding(); + } + //---------------------------------------------------------------------------------------------- + + //Speech chrome state change event handling----------------------------------------------------- + { + connect(m_aglSocket, &AglSocketWrapper::eventReceived, + this, [this](const QString &eventName, const QJsonValue &data) -> void { + if (eventName.compare(vshl::VOICE_DIALOG_STATE_EVENT + m_voiceAgentId) == 0) { + const QJsonObject dataObj = QJsonDocument::fromJson(data.toString().toUtf8()).object(); + auto objIt = dataObj.find(vshl::STATE_TAG); + if (objIt == dataObj.constEnd()) { + qWarning() << "Voice dialog state event state missing."; + return; + } + const QString stateStr = objIt.value().toString(); + if (stateStr.compare(vshl::VOICE_DIALOG_IDLE) == 0) { + setChromeState(Idle); + } else if (stateStr.compare(vshl::VOICE_DIALOG_LISTENING) == 0) { + setChromeState(Listening); + } else if (stateStr.compare(vshl::VOICE_DIALOG_THINKING) == 0) { + setChromeState(Thinking); + } else if (stateStr.compare(vshl::VOICE_DIALOG_SPEAKING) == 0) { + setChromeState(Speaking); + } else if (stateStr.compare(vshl::VOICE_DIALOG_MICROPHONEOFF) == 0) { + setChromeState(MicrophoneOff); + } + } + }); + } + //---------------------------------------------------------------------------------------------- +} + +void ChromeController::pushToTalk() +{ + m_aglSocket->apiCall(vshl::API, vshl::TAP_TO_TALK_VERB, QJsonValue(), + [](bool result, const QJsonValue &data) -> void { + qDebug() << (vshl::API + QLatin1String(":") + vshl::TAP_TO_TALK_VERB) + << "result: " << result << " val: " << data; + }); +} + +void ChromeController::setChromeState(ChromeController::ChromeState state) +{ + const char* ChromeStateNames[MicrophoneOff + 1] = { "Idle", "Listening", "Thinking", "Speaking", "MicrophoneOff" }; + + if (m_chromeState != state) { + m_chromeState = state; + emit chromeStateChanged(); + if(state <= MicrophoneOff) + qDebug() << "new state = " << ChromeStateNames[state]; + else + qDebug() << "new state = " << state; + } +} diff --git a/homescreen/src/chromecontroller.h b/homescreen/src/chromecontroller.h new file mode 100644 index 0000000..2a76002 --- /dev/null +++ b/homescreen/src/chromecontroller.h @@ -0,0 +1,42 @@ +#pragma once + +#include +#include + +class AglSocketWrapper; +class ChromeController : public QObject +{ + Q_OBJECT + + Q_PROPERTY(bool agentPresent READ agentPresent NOTIFY agentPresentChanged) + Q_PROPERTY(int chromeState READ chromeState NOTIFY chromeStateChanged) + +public: + enum ChromeState { + Idle = 0, + Listening, + Thinking, + Speaking, + MicrophoneOff + }; + Q_ENUM(ChromeState) + + explicit ChromeController(const QUrl &bindingUrl, QObject *parent = nullptr); + bool agentPresent() const { return m_agentPresent; } + int chromeState() const { return m_chromeState; } + +public slots: + void pushToTalk(); + +signals: + void agentPresentChanged(); + void chromeStateChanged(); + +private: + void setChromeState(ChromeState state); + + AglSocketWrapper *m_aglSocket; + QString m_voiceAgentId; + bool m_agentPresent = false; + ChromeState m_chromeState = Idle; +}; diff --git a/homescreen/src/constants.h b/homescreen/src/constants.h new file mode 100644 index 0000000..a43bf6d --- /dev/null +++ b/homescreen/src/constants.h @@ -0,0 +1,42 @@ +#ifndef CONSTANTS_H +#define CONSTANTS_H + +#include +#include +#include + +namespace vshl { +const QString API = QLatin1String("vshl-core"); +const QString VOICE_AGENT_ENUMERATION_VERB = QLatin1String("enumerateVoiceAgents"); +const QString SUBSCRIBE_VERB = QLatin1String("subscribe"); +const QString TAP_TO_TALK_VERB = QLatin1String("startListening"); + +const QString ALEXA_AGENT_NAME = QLatin1String("Alexa"); + +const QString DATA_TAG = QLatin1String("data"); +const QString RESPONSE_TAG = QLatin1String("response"); +const QString AGENTS_TAG = QLatin1String("agents"); +const QString DEFAULT_TAG = QLatin1String("default"); +const QString NAME_TAG = QLatin1String("name"); +const QString ID_TAG = QLatin1String("id"); +const QString STATE_TAG = QLatin1String("state"); + +const QString VOICE_AGENT_ID_ARG = QLatin1String("va_id"); +const QString VOICE_AGENT_EVENTS_ARG = QLatin1String("events"); +const QString VOICE_AGENT_ACTIONS_ARG = QLatin1String("actions"); + +const QJsonArray VOICE_AGENT_EVENTS_ARRAY = { + QLatin1String("voice_authstate_event"), + QLatin1String("voice_dialogstate_event"), + QLatin1String("voice_connectionstate_event") +}; + +const QString VOICE_DIALOG_STATE_EVENT = QLatin1String("vshl-core/voice_dialogstate_event#"); +const QString VOICE_DIALOG_IDLE = QLatin1String("IDLE"); +const QString VOICE_DIALOG_LISTENING = QLatin1String("LISTENING"); +const QString VOICE_DIALOG_THINKING = QLatin1String("THINKING"); +const QString VOICE_DIALOG_SPEAKING = QLatin1String("SPEAKING"); +const QString VOICE_DIALOG_MICROPHONEOFF = QLatin1String("MICROPHONEOFF"); +} + +#endif // CONSTANTS_H 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("HomeScreen", 1, 0, "ApplicationLauncher"); qmlRegisterType("HomeScreen", 1, 0, "StatusBarModel"); qmlRegisterType("MasterVolume", 1, 0, "MasterVolume"); + qmlRegisterUncreatableType("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"))); diff --git a/package/config.xml b/package/config.xml index 3ebe39b..441cc8d 100644 --- a/package/config.xml +++ b/package/config.xml @@ -13,6 +13,7 @@ + -- cgit 1.2.3-korg