From 4efe67714e60e2ab86acf1edee500373f6820954 Mon Sep 17 00:00:00 2001 From: Scott Murray Date: Tue, 7 Jun 2022 15:25:07 -0400 Subject: Add VIS vehicle signal support Use the new VehicleSignals API from libqtappfw to replace the previous signal-composer usage. Additionally, the default units for the vehicle speed and odometer have been switched to kilometers with switching driven by the appropriate VSS schema value. The units in the translated text labels have been left alone for now, if the Qt demo lifetime is extended this may be revisited. Bug-AGL: SPEC-4409 Signed-off-by: Scott Murray Change-Id: Ie04dc429b02adb7d763d2e5a3bfea0a5a1932b92 (cherry picked from commit f694b1f1222a58bdb3d1990fda9184fe51754af7) --- app/main.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'app/main.cpp') diff --git a/app/main.cpp b/app/main.cpp index ec7b4a1..2327b05 100644 --- a/app/main.cpp +++ b/app/main.cpp @@ -17,6 +17,8 @@ #include #include +#include +#include #include "translator.h" @@ -28,6 +30,9 @@ int main(int argc, char *argv[]) app.setDesktopFileName("dashboard"); QQmlApplicationEngine engine; + QQmlContext *context = engine.rootContext(); + VehicleSignalsConfig vsConfig("dashboard"); + context->setContextProperty("VehicleSignals", new VehicleSignals(vsConfig)); qmlRegisterType("Translator", 1, 0, "Translator"); engine.load(QUrl(QStringLiteral("qrc:/Dashboard.qml"))); -- cgit 1.2.3-korg