#include <QGuiApplication>
#include <QCommandLineParser>
+#include <QtCore/QUrlQuery>
#include <QtGui/QGuiApplication>
#include <QtQml/QQmlApplicationEngine>
#include <QtQml/QQmlContext>
#include <bluetooth.h>
#include "applicationlauncher.h"
#include "statusbarmodel.h"
-#include "afm_user_daemon_proxy.h"
#include "mastervolume.h"
#include "homescreenhandler.h"
#include "hmi-debug.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?
-org::AGL::afm::user *afm_user_daemon_proxy;
-
-namespace {
-
-struct Cleanup {
- static inline void cleanup(org::AGL::afm::user *p) {
- delete p;
- afm_user_daemon_proxy = Q_NULLPTR;
- }
-};
-
-void noOutput(QtMsgType, const QMessageLogContext &, const QString &)
-{
-}
-
-}
+#include "chromecontroller.h"
int main(int argc, char *argv[])
{
QGuiApplication a(argc, argv);
- // use launch process
- QScopedPointer<org::AGL::afm::user, Cleanup> afm_user_daemon_proxy(new org::AGL::afm::user("org.AGL.afm.user",
- "/org/AGL/afm/user",
- QDBusConnection::sessionBus(),
- 0));
- ::afm_user_daemon_proxy = afm_user_daemon_proxy.data();
-
QCoreApplication::setOrganizationDomain("LinuxFoundation");
QCoreApplication::setOrganizationName("AutomotiveGradeLinux");
QCoreApplication::setApplicationName("HomeScreen");
// 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();
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")));