aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilippe Lelong <lelong.ph@meltemus.com>2016-12-20 17:45:37 +0100
committerJosé Bollo <jose.bollo@iot.bzh>2016-12-20 17:52:49 +0100
commit14c2261b098fa4ecc27ec32b0bb356e35a3f02a0 (patch)
tree6edb7204345b7e7ef8a415703b697236be1d3178
parent8f71f12c3622466f813ea12b64ee34e8b4102341 (diff)
New speed sign according to language
Force Home display at startup Signed-off-by: Philippe Lelong <lelong.ph@meltemus.com>
-rw-r--r--HomeScreen/qml/Home.qml8
-rw-r--r--HomeScreen/qml/ShortcutArea.qml2
-rwxr-xr-xHomeScreen/qml/images/Home/B14-60.pngbin0 -> 53039 bytes
-rwxr-xr-xHomeScreen/qml/images/Home/B14-90.pngbin32719 -> 31604 bytes
-rw-r--r--HomeScreen/qml/images/Home/home.qrc3
-rw-r--r--HomeScreen/src2/usermanagement.cpp4
6 files changed, 12 insertions, 5 deletions
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
--- /dev/null
+++ b/HomeScreen/qml/images/Home/B14-60.png
Binary files differ
diff --git a/HomeScreen/qml/images/Home/B14-90.png b/HomeScreen/qml/images/Home/B14-90.png
index 702f8c6..155aea2 100755
--- a/HomeScreen/qml/images/Home/B14-90.png
+++ b/HomeScreen/qml/images/Home/B14-90.png
Binary files 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 @@
<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>
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\":\""