New speed sign according to language
authorPhilippe Lelong <lelong.ph@meltemus.com>
Tue, 20 Dec 2016 16:45:37 +0000 (17:45 +0100)
committerJosé Bollo <jose.bollo@iot.bzh>
Tue, 20 Dec 2016 16:52:49 +0000 (17:52 +0100)
Force Home display at startup

Signed-off-by: Philippe Lelong <lelong.ph@meltemus.com>
HomeScreen/qml/Home.qml
HomeScreen/qml/ShortcutArea.qml
HomeScreen/qml/images/Home/B14-60.png [new file with mode: 0755]
HomeScreen/qml/images/Home/B14-90.png
HomeScreen/qml/images/Home/home.qrc
HomeScreen/src2/usermanagement.cpp

index c44919d..d8d8cc9 100644 (file)
@@ -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) {
index 33ec539..d5a13b5 100644 (file)
@@ -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 (executable)
index 0000000..012c314
Binary files /dev/null and b/HomeScreen/qml/images/Home/B14-60.png differ
index 702f8c6..155aea2 100755 (executable)
Binary files a/HomeScreen/qml/images/Home/B14-90.png and b/HomeScreen/qml/images/Home/B14-90.png differ
index 4a02101..e6e85b0 100644 (file)
@@ -19,7 +19,6 @@
         <file>HMI_AppLauncher_Radio_Inactive-01.png</file>
         <file>HMI_AppLauncher_Settings_Active-01.png</file>
         <file>HMI_AppLauncher_Settings_Inactive-01.png</file>
-        <file>B14-90.png</file>
         <file>visa.png</file>
         <file>french_flag.png</file>
         <file>us_flag.png</file>
@@ -28,5 +27,7 @@
         <file>Open Trunk.png</file>
         <file>Install App.png</file>
         <file>View Online.png</file>
+        <file>B14-60.png</file>
+        <file>B14-90.png</file>
     </qresource>
 </RCC>
index 9ea968f..ba2e743 100644 (file)
@@ -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\":\""