From: Philippe Lelong Date: Tue, 20 Dec 2016 16:45:37 +0000 (+0100) Subject: New speed sign according to language X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?p=staging%2FHomeScreen.git;a=commitdiff_plain;h=14c2261b098fa4ecc27ec32b0bb356e35a3f02a0 New speed sign according to language Force Home display at startup Signed-off-by: Philippe Lelong --- diff --git a/HomeScreen/qml/Home.qml b/HomeScreen/qml/Home.qml index c44919d..d8d8cc9 100644 --- a/HomeScreen/qml/Home.qml +++ b/HomeScreen/qml/Home.qml @@ -119,8 +119,14 @@ Item { animation2.running = true; } - function showSign90(show) { + function showSign90(show, lang) { sign90.visible = show + if(show) { + if(lang === 'fr') + sign90.source = './images/B14-90.png' + else + sign90.source = './images/B14-60.png' + } } function showVisa(show, num) { diff --git a/HomeScreen/qml/ShortcutArea.qml b/HomeScreen/qml/ShortcutArea.qml index 33ec539..d5a13b5 100644 --- a/HomeScreen/qml/ShortcutArea.qml +++ b/HomeScreen/qml/ShortcutArea.qml @@ -115,9 +115,9 @@ Item { } } Component.onCompleted: { - root.currentIndex = 0 appLauncherAreaLauncher.visible = true applicationArea.visible = false layoutHandler.hideAppLayer() + launcher.current = '' } } diff --git a/HomeScreen/qml/images/Home/B14-60.png b/HomeScreen/qml/images/Home/B14-60.png new file mode 100755 index 0000000..012c314 Binary files /dev/null and b/HomeScreen/qml/images/Home/B14-60.png differ diff --git a/HomeScreen/qml/images/Home/B14-90.png b/HomeScreen/qml/images/Home/B14-90.png index 702f8c6..155aea2 100755 Binary files a/HomeScreen/qml/images/Home/B14-90.png and b/HomeScreen/qml/images/Home/B14-90.png differ diff --git a/HomeScreen/qml/images/Home/home.qrc b/HomeScreen/qml/images/Home/home.qrc index 4a02101..e6e85b0 100644 --- a/HomeScreen/qml/images/Home/home.qrc +++ b/HomeScreen/qml/images/Home/home.qrc @@ -19,7 +19,6 @@ HMI_AppLauncher_Radio_Inactive-01.png HMI_AppLauncher_Settings_Active-01.png HMI_AppLauncher_Settings_Inactive-01.png - B14-90.png visa.png french_flag.png us_flag.png @@ -28,5 +27,7 @@ Open Trunk.png Install App.png View Online.png + B14-60.png + B14-90.png diff --git a/HomeScreen/src2/usermanagement.cpp b/HomeScreen/src2/usermanagement.cpp index 9ea968f..ba2e743 100644 --- a/HomeScreen/src2/usermanagement.cpp +++ b/HomeScreen/src2/usermanagement.cpp @@ -54,7 +54,7 @@ void UserManagement::setUser(const User &user) QMetaObject::invokeMethod(home, "languageChanged"); QMetaObject::invokeMethod(shortcutArea, "languageChanged", Q_ARG(QVariant, user.graphPreferredLanguage)); QMetaObject::invokeMethod(statusArea, "languageChanged", Q_ARG(QVariant, user.graphPreferredLanguage)); - QMetaObject::invokeMethod(home, "showSign90", Q_ARG(QVariant, !user.graphActions.contains("Exceed 100 Kph"))); + QMetaObject::invokeMethod(home, "showSign90", Q_ARG(QVariant, !user.graphActions.contains("Exceed 100 Kph")), Q_ARG(QVariant, user.graphPreferredLanguage)); QStringList t; foreach(const QString &s, user.graphActions) { if(!s.contains("Exceed")) @@ -258,7 +258,7 @@ void UserManagement::onServerNewConnection() } void UserManagement::processTextMessage(QString message) { - QString clientDetails_1 = "{\"postal_address\":\"201 Mission Street\",\"loc\":\"37.7914374,-122.3950694\",\"graphActions\":\"Install App,Update Software,Exceed 100 Kph,Open Trunk,View Online\"" + QString clientDetails_1 = "{\"postal_address\":\"201 Mission Street\",\"loc\":\"37.7914374,-122.3950694\",\"graphActions\":\"Install App,Update Software,Open Trunk,View Online\"" ",\"country\":\"USA\",\"mail\":\"bjensen@example.com\",\"city\":\"San Francisco\",\"graphEmail\":" "\"bjensen@example.com\",\"graphPreferredLanguage\":\"en\",\"ccNumberMasked\":\"-111\",\"ccExpYear\"" ":\"19\",\"ccExpMonth\":\"01\",\"description\":\"Original description\",\"groups\":[],\"last_name\":\""