Home screen translation changes
authorPhilippe Lelong <lelong.ph@meltemus.com>
Wed, 14 Dec 2016 10:58:20 +0000 (11:58 +0100)
committerJosé Bollo <jose.bollo@iot.bzh>
Fri, 16 Dec 2016 08:08:31 +0000 (09:08 +0100)
Signed-off-by: Philippe Lelong <lelong.ph@meltemus.com>
42 files changed:
HomeScreen/HomeScreen.pro
HomeScreen/qml/Home.qml
HomeScreen/qml/ShortcutArea.qml
HomeScreen/qml/ShortcutIcon.qml
HomeScreen/qml/StatusArea.qml
HomeScreen/qml/TopArea.qml
HomeScreen/qml/images/Home/B14-90.png [new file with mode: 0755]
HomeScreen/qml/images/Home/HMI_AppLauncher_Connectivity_Active-01.png
HomeScreen/qml/images/Home/HMI_AppLauncher_Connectivity_Inactive-01.png
HomeScreen/qml/images/Home/HMI_AppLauncher_Dashboard_Active-01.png
HomeScreen/qml/images/Home/HMI_AppLauncher_Dashboard_Inactive-01.png
HomeScreen/qml/images/Home/HMI_AppLauncher_HVAC_Active-01.png
HomeScreen/qml/images/Home/HMI_AppLauncher_HVAC_Inactive-01.png
HomeScreen/qml/images/Home/HMI_AppLauncher_Multimedia_Active-01.png
HomeScreen/qml/images/Home/HMI_AppLauncher_Multimedia_Inactive-01.png
HomeScreen/qml/images/Home/HMI_AppLauncher_Navigation_Active-01.png
HomeScreen/qml/images/Home/HMI_AppLauncher_Navigation_Inactive-01.png
HomeScreen/qml/images/Home/HMI_AppLauncher_POI_Active-01.png
HomeScreen/qml/images/Home/HMI_AppLauncher_POI_Inactive-01.png
HomeScreen/qml/images/Home/HMI_AppLauncher_Phone_Active-01.png
HomeScreen/qml/images/Home/HMI_AppLauncher_Phone_Inactive-01.png
HomeScreen/qml/images/Home/HMI_AppLauncher_Radio_Active-01.png
HomeScreen/qml/images/Home/HMI_AppLauncher_Radio_Inactive-01.png
HomeScreen/qml/images/Home/HMI_AppLauncher_Settings_Active-01.png
HomeScreen/qml/images/Home/HMI_AppLauncher_Settings_Inactive-01.png
HomeScreen/qml/images/Home/home.qrc
HomeScreen/qml/images/Shortcut/HMI_Shortcut_HVAC-01.png
HomeScreen/qml/images/Shortcut/HMI_Shortcut_HVAC_Active-01.png
HomeScreen/qml/images/Shortcut/HMI_Shortcut_Home-01.png
HomeScreen/qml/images/Shortcut/HMI_Shortcut_Home_Active-01.png
HomeScreen/qml/images/Shortcut/HMI_Shortcut_Multimedia-01.png
HomeScreen/qml/images/Shortcut/HMI_Shortcut_Multimedia_Active-01.png
HomeScreen/qml/images/Shortcut/HMI_Shortcut_Navigation-01.png
HomeScreen/qml/images/Shortcut/HMI_Shortcut_Navigation_Active-01.png
HomeScreen/qml/main.qml
HomeScreen/src/main.cpp
HomeScreen/src2/appinfo.cpp
HomeScreen/src2/appinfo.h
HomeScreen/src2/applicationmodel.cpp
HomeScreen/src2/applicationmodel.h
HomeScreen/src2/usermanagement.cpp [new file with mode: 0644]
HomeScreen/src2/usermanagement.h [new file with mode: 0644]

index b2afdd3..ac4f2d2 100644 (file)
@@ -23,11 +23,13 @@ include(../ivi_layermanagement_api.pri)
 SOURCES += \
     src/main.cpp \
     src/homescreencontrolinterface.cpp \
-    src/layouthandler.cpp
+    src/layouthandler.cpp \
+    src2/usermanagement.cpp
 
 HEADERS  += \
     src/homescreencontrolinterface.h \
-    src/layouthandler.h
+    src/layouthandler.h \
+    src2/usermanagement.h
 
 OTHER_FILES += \
     README.md
index 301fdbd..c4951fe 100644 (file)
@@ -22,6 +22,8 @@ import Home 1.0
 
 Item {
     id: root
+    property int pid: -1
+    signal languageChanged
 
     Image {
         anchors.fill: parent
@@ -29,8 +31,58 @@ Item {
         anchors.bottomMargin: -215
         source: './images/AGL_HMI_Background_Car-01.png'
     }
+    Image {
+        id: sign90
+        width: 200
+        height: 200
+        anchors.horizontalCenter: parent.horizontalCenter
+        anchors.top: parent.top
+        anchors.topMargin: 20
+        source: './images/B14-90.png'
+        visible: false
+    }
+    Item {
+        id: hello
+        anchors.horizontalCenter: parent.horizontalCenter
+        anchors.bottom: parent.bottom
+        anchors.bottomMargin: 40
+        visible: false
+        Text {
+            id: helloText
+            anchors.centerIn: parent
+            color: "white"
+            text: "Hello José!"
+            font.pixelSize: 40
+            font.family: "Roboto"
+            SequentialAnimation on font.letterSpacing {
+                id: animation1
+                loops: 1;
+                NumberAnimation { from: 0; to: 50; easing.type: Easing.InQuad; duration: 3000 }
+                onRunningChanged: {
+                    if(running)
+                        hello.visible = true
+                    else
+                        hello.visible = false
+                }
+            }
 
-    property int pid: -1
+            SequentialAnimation on opacity {
+                id: animation2
+                loops: 1;
+                NumberAnimation { from: 1; to: 0; duration: 2600 }
+                PauseAnimation { duration: 400 }
+            }
+        }
+    }
+    function showHello(helloString) {
+        helloText.text = helloString
+        animation1.running = true;
+        animation2.running = true;
+    }
+
+    function showSign90(show) {
+        sign90.visible = show
+    }
 
     GridView {
         anchors.centerIn: parent
@@ -46,6 +98,22 @@ Item {
             Image {
                 anchors.fill: parent
                 source: './images/HMI_AppLauncher_%1_%2-01.png'.arg(model.icon).arg(pressed ? 'Active' : 'Inactive')
+                Label {
+                    id: labelName
+                    anchors.horizontalCenter: parent.horizontalCenter
+                    horizontalAlignment: Text.AlignHCenter
+                    y: 257
+                    font.pixelSize: 32
+                    font.family: "Roboto"
+                    color: "white"
+                    text: '%1'.arg(model.name)
+                    function myChangeLanguage() {
+                        text = '%1'.arg(model.name)
+                    }
+                    Component.onCompleted: {
+                        root.languageChanged.connect(myChangeLanguage)
+                    }
+                }
             }
             onClicked: {
                 console.log("app is ", model.id)
index 9e71a94..6684982 100644 (file)
@@ -29,21 +29,37 @@ Item {
         ListElement {
             name: 'Home'
             application: 'home@0.1'
+            label: 'HOME'
         }
         ListElement {
             name: 'Multimedia'
             application: 'mediaplayer@0.1'
+            label: 'MULTIMEDIA'
         }
         ListElement {
             name: 'HVAC'
             application: 'hvac@0.1'
+            label: 'HVAC'
         }
         ListElement {
             name: 'Navigation'
             application: 'navigation@0.1'
+            label: 'NAVIGATION'
+        }
+    }
+    function languageChanged(lang) {
+        if(lang === "fr") {
+            applicationModel.setProperty(0, "label", 'ACCEUIL')
+            applicationModel.setProperty(1, "label", 'MULTIMÉDIA')
+            applicationModel.setProperty(2, "label", 'CLIMATISATION')
+            applicationModel.setProperty(3, "label", 'NAVIGATION')
+        } else {
+            applicationModel.setProperty(0, "label", 'HOME')
+            applicationModel.setProperty(1, "label", 'MULTIMEDIA')
+            applicationModel.setProperty(2, "label", 'HVAC')
+            applicationModel.setProperty(3, "label", 'NAVIGATION')
         }
     }
-
     property int currentIndex: -1 // TODO: to be moved to whereever right
     property int pid: -1
 
index 299f6a8..34ade01 100644 (file)
@@ -16,6 +16,7 @@
  */
 
 import QtQuick 2.2
+import QtQuick.Controls 1.0
 
 MouseArea {
     id: root
@@ -33,6 +34,16 @@ MouseArea {
         source: './images/Shortcut/HMI_Shortcut_%1_Active-01.png'.arg(root.name)
         opacity: 1.0 - icon.opacity
     }
+    Label {
+        id: labelName
+        anchors.horizontalCenter: parent.horizontalCenter
+        horizontalAlignment: Text.AlignHCenter
+        y: 155
+        font.pixelSize: 20
+        font.family: "Roboto"
+        color: "white"
+        text: '%1'.arg(model.label)
+    }
     states: [
         State {
             when: root.active
index 4ed969d..25c66d7 100644 (file)
@@ -24,6 +24,62 @@ Item {
     id: root
     width: 295
     height: 218
+    function languageChanged(lang) {
+        if(lang === "fr") {
+            labelTime.text = Qt.formatTime(now, 'HH:mm').toUpperCase()
+            labelTemperature.text = '18°C'
+            switch(now.getDay()) {
+            case 1:
+                labelDay.text = 'LUNDI'
+                break
+            case 2:
+                labelDay.text = 'MARDI'
+                break
+            case 3:
+                labelDay.text = 'MERCREDI'
+                break
+            case 4:
+                labelDay.text = 'JEUDI'
+                break
+            case 5:
+                labelDay.text = 'VENDREDI'
+                break
+            case 6:
+                labelDay.text = 'SAMEDI'
+                break
+            case 7:
+                labelDay.text = 'DIMANCHE'
+                break
+            }
+
+        } else {
+            labelTime.text = Qt.formatTime(now, 'h:mm ap').toUpperCase()
+            labelTemperature.text = '64°F'
+            switch(now.getDay()) {
+            case 1:
+                labelDay.text = 'MONDAY'
+                break
+            case 2:
+                labelDay.text = 'TUESDAY'
+                break
+            case 3:
+                labelDay.text = 'WEDNESDAY'
+                break
+            case 4:
+                labelDay.text = 'THURSDAY'
+                break
+            case 5:
+                labelDay.text = 'FRIDAY'
+                break
+            case 6:
+                labelDay.text = 'SATURDAY'
+                break
+            case 7:
+                labelDay.text = 'SUNDAY'
+                break
+            }
+        }
+    }
 
     property date now: new Date
     Timer {
@@ -43,11 +99,13 @@ Item {
                 anchors.margins: 40
                 spacing: 0
                 Label {
+                    id: labelDay
                     Layout.fillWidth: true
                     Layout.fillHeight: true
                     text: Qt.formatDate(now, 'dddd').toUpperCase()
                     font.family: 'Roboto'
-                    font.pixelSize: 13
+//                    font.pixelSize: 13
+                    font.pixelSize: 18
                     color: 'white'
                     verticalAlignment:  Text.AlignVCenter
 //                    Rectangle {
@@ -60,6 +118,7 @@ Item {
 //                    }
                 }
                 Label {
+                    id: labelTime
                     Layout.fillWidth: true
                     Layout.fillHeight: true
                     text: Qt.formatTime(now, 'h:mm ap').toUpperCase()
@@ -77,6 +136,7 @@ Item {
                         source: './images/Weather/WeatherIcons_Rain-01.png'
                     }
                     Label {
+                        id: labelTemperature
                         text: '64°F'
                         color: 'white'
                         font.family: 'Helvetica'
index fdf5a13..76430e2 100644 (file)
@@ -29,12 +29,14 @@ Image {
         spacing: 0
         ShortcutArea {
             id: shortcutArea
+            objectName: "ShortcutArea"
             Layout.fillWidth: true
             Layout.fillHeight: true
             Layout.preferredWidth: 785
         }
         StatusArea {
             id: statusArea
+            objectName: "StatusArea"
             Layout.fillWidth: true
             Layout.fillHeight: true
             Layout.preferredWidth: 295
diff --git a/HomeScreen/qml/images/Home/B14-90.png b/HomeScreen/qml/images/Home/B14-90.png
new file mode 100755 (executable)
index 0000000..702f8c6
Binary files /dev/null and b/HomeScreen/qml/images/Home/B14-90.png differ
index 888d0bd..b37a2d9 100644 (file)
Binary files a/HomeScreen/qml/images/Home/HMI_AppLauncher_Connectivity_Active-01.png and b/HomeScreen/qml/images/Home/HMI_AppLauncher_Connectivity_Active-01.png differ
index ab83b0e..c4b12a9 100644 (file)
Binary files a/HomeScreen/qml/images/Home/HMI_AppLauncher_Connectivity_Inactive-01.png and b/HomeScreen/qml/images/Home/HMI_AppLauncher_Connectivity_Inactive-01.png differ
index 11d39e5..d1fba09 100644 (file)
Binary files a/HomeScreen/qml/images/Home/HMI_AppLauncher_Dashboard_Active-01.png and b/HomeScreen/qml/images/Home/HMI_AppLauncher_Dashboard_Active-01.png differ
index 6c0b914..138ebf7 100644 (file)
Binary files a/HomeScreen/qml/images/Home/HMI_AppLauncher_Dashboard_Inactive-01.png and b/HomeScreen/qml/images/Home/HMI_AppLauncher_Dashboard_Inactive-01.png differ
index efc11e9..deeb402 100644 (file)
Binary files a/HomeScreen/qml/images/Home/HMI_AppLauncher_HVAC_Active-01.png and b/HomeScreen/qml/images/Home/HMI_AppLauncher_HVAC_Active-01.png differ
index b528376..92cd8a8 100644 (file)
Binary files a/HomeScreen/qml/images/Home/HMI_AppLauncher_HVAC_Inactive-01.png and b/HomeScreen/qml/images/Home/HMI_AppLauncher_HVAC_Inactive-01.png differ
index 1c99ac4..c1af827 100644 (file)
Binary files a/HomeScreen/qml/images/Home/HMI_AppLauncher_Multimedia_Active-01.png and b/HomeScreen/qml/images/Home/HMI_AppLauncher_Multimedia_Active-01.png differ
index 0bed61d..9a9c96a 100644 (file)
Binary files a/HomeScreen/qml/images/Home/HMI_AppLauncher_Multimedia_Inactive-01.png and b/HomeScreen/qml/images/Home/HMI_AppLauncher_Multimedia_Inactive-01.png differ
index e7ad085..e5bae8b 100644 (file)
Binary files a/HomeScreen/qml/images/Home/HMI_AppLauncher_Navigation_Active-01.png and b/HomeScreen/qml/images/Home/HMI_AppLauncher_Navigation_Active-01.png differ
index dd40750..cc9cb1a 100644 (file)
Binary files a/HomeScreen/qml/images/Home/HMI_AppLauncher_Navigation_Inactive-01.png and b/HomeScreen/qml/images/Home/HMI_AppLauncher_Navigation_Inactive-01.png differ
index 2df01d3..c52d5bb 100644 (file)
Binary files a/HomeScreen/qml/images/Home/HMI_AppLauncher_POI_Active-01.png and b/HomeScreen/qml/images/Home/HMI_AppLauncher_POI_Active-01.png differ
index ec62b87..d55e5fb 100644 (file)
Binary files a/HomeScreen/qml/images/Home/HMI_AppLauncher_POI_Inactive-01.png and b/HomeScreen/qml/images/Home/HMI_AppLauncher_POI_Inactive-01.png differ
index 2150581..7a079e2 100644 (file)
Binary files a/HomeScreen/qml/images/Home/HMI_AppLauncher_Phone_Active-01.png and b/HomeScreen/qml/images/Home/HMI_AppLauncher_Phone_Active-01.png differ
index 61dcedc..0de908b 100644 (file)
Binary files a/HomeScreen/qml/images/Home/HMI_AppLauncher_Phone_Inactive-01.png and b/HomeScreen/qml/images/Home/HMI_AppLauncher_Phone_Inactive-01.png differ
index 1aa5a01..8503ae2 100644 (file)
Binary files a/HomeScreen/qml/images/Home/HMI_AppLauncher_Radio_Active-01.png and b/HomeScreen/qml/images/Home/HMI_AppLauncher_Radio_Active-01.png differ
index 616983e..f8693c9 100644 (file)
Binary files a/HomeScreen/qml/images/Home/HMI_AppLauncher_Radio_Inactive-01.png and b/HomeScreen/qml/images/Home/HMI_AppLauncher_Radio_Inactive-01.png differ
index 1d13fd6..ff030ef 100644 (file)
Binary files a/HomeScreen/qml/images/Home/HMI_AppLauncher_Settings_Active-01.png and b/HomeScreen/qml/images/Home/HMI_AppLauncher_Settings_Active-01.png differ
index 027f1fe..15bdeb8 100644 (file)
Binary files a/HomeScreen/qml/images/Home/HMI_AppLauncher_Settings_Inactive-01.png and b/HomeScreen/qml/images/Home/HMI_AppLauncher_Settings_Inactive-01.png differ
index 7dde212..4a112ce 100644 (file)
@@ -19,5 +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>
     </qresource>
 </RCC>
index f5188f5..221fe60 100644 (file)
Binary files a/HomeScreen/qml/images/Shortcut/HMI_Shortcut_HVAC-01.png and b/HomeScreen/qml/images/Shortcut/HMI_Shortcut_HVAC-01.png differ
index abe92d2..cbd625a 100644 (file)
Binary files a/HomeScreen/qml/images/Shortcut/HMI_Shortcut_HVAC_Active-01.png and b/HomeScreen/qml/images/Shortcut/HMI_Shortcut_HVAC_Active-01.png differ
index 9aca151..3685d4a 100644 (file)
Binary files a/HomeScreen/qml/images/Shortcut/HMI_Shortcut_Home-01.png and b/HomeScreen/qml/images/Shortcut/HMI_Shortcut_Home-01.png differ
index 696168f..4c64670 100644 (file)
Binary files a/HomeScreen/qml/images/Shortcut/HMI_Shortcut_Home_Active-01.png and b/HomeScreen/qml/images/Shortcut/HMI_Shortcut_Home_Active-01.png differ
index 229860c..797d893 100644 (file)
Binary files a/HomeScreen/qml/images/Shortcut/HMI_Shortcut_Multimedia-01.png and b/HomeScreen/qml/images/Shortcut/HMI_Shortcut_Multimedia-01.png differ
index b0a023c..3d831bf 100644 (file)
Binary files a/HomeScreen/qml/images/Shortcut/HMI_Shortcut_Multimedia_Active-01.png and b/HomeScreen/qml/images/Shortcut/HMI_Shortcut_Multimedia_Active-01.png differ
index 34b0671..a58534c 100644 (file)
Binary files a/HomeScreen/qml/images/Shortcut/HMI_Shortcut_Navigation-01.png and b/HomeScreen/qml/images/Shortcut/HMI_Shortcut_Navigation-01.png differ
index 98e6146..99fbc23 100644 (file)
Binary files a/HomeScreen/qml/images/Shortcut/HMI_Shortcut_Navigation_Active-01.png and b/HomeScreen/qml/images/Shortcut/HMI_Shortcut_Navigation_Active-01.png differ
index 6a515fc..c97702d 100644 (file)
@@ -36,7 +36,7 @@ Window {
         anchors.centerIn: parent
         width: 1080
         height: 1920
-        scale: 1.0
+        scale: 1
         source: './images/AGL_HMI_Background_NoCar-01.png'
 
         ColumnLayout {
@@ -59,6 +59,7 @@ Window {
 
             Home {
                 id: appLauncherAreaLauncher
+                objectName: "Home"
                 Layout.fillWidth: true
                 Layout.fillHeight: true
                 Layout.preferredHeight: 1920 - 218 - 215
index dcad4c6..4d21394 100644 (file)
@@ -25,6 +25,7 @@
 #include "../src2/applicationlauncher.h"
 #include "../src2/statusbarmodel.h"
 #include "../src2/applicationmodel.h"
+#include "../src2/usermanagement.h"
 
 int main(int argc, char *argv[])
 {
@@ -46,7 +47,6 @@ int main(int argc, char *argv[])
     qmlRegisterType<StatusBarModel>("HomeScreen", 1, 0, "StatusBarModel");
 
     QQmlApplicationEngine engine;
-
     LayoutHandler* layoutHandler = new LayoutHandler();
 
     HomeScreenControlInterface* hsci = new HomeScreenControlInterface();
@@ -59,6 +59,10 @@ int main(int argc, char *argv[])
     engine.rootContext()->setContextProperty("layoutHandler", layoutHandler);
 
     engine.load(QUrl(QStringLiteral("qrc:/main.qml")));
-
+    QObject *home = engine.rootObjects().first()->findChild<QObject *>("Home");
+    QObject *shortcutArea = engine.rootObjects().first()->findChild<QObject *>("ShortcutArea");
+    QObject *statusArea = engine.rootObjects().first()->findChild<QObject *>("StatusArea");
+    UserManagement userManagement(home, shortcutArea, statusArea);
+    Q_UNUSED(userManagement);
     return a.exec();
 }
index 6b61632..4792b52 100644 (file)
@@ -108,6 +108,10 @@ QString AppInfo::name() const
 {
     return d->name;
 }
+void AppInfo::setName(const QString &name)
+{
+    d->name = name;
+}
 
 QString AppInfo::description() const
 {
index a800a80..a108d85 100644 (file)
@@ -56,6 +56,7 @@ public:
     friend QDBusArgument &operator <<(QDBusArgument &argument, const AppInfo &appInfo);
     friend const QDBusArgument &operator >>(const QDBusArgument &argument, AppInfo &appInfo);
 
+    void setName(const QString &name);
 private:
     class Private;
     QSharedDataPointer<Private> d;
index 2a16ace..136161a 100644 (file)
@@ -52,11 +52,36 @@ ApplicationModel::Private::Private(ApplicationModel *parent)
         data.append(AppInfo(QStringLiteral("POI"), QStringLiteral("POINT OF\nINTEREST"), QStringLiteral("poi@0.1")));
     }
 }
+void ApplicationModel::changeLanguage(const QString &lang)
+{ //todo: use QT translator instead of hardcoded strings.
+    if(lang == "fr") {
+        d->data[0].setName("CLIMATISATION");
+        d->data[1].setName("NAVIGATION");
+        d->data[2].setName("TÉLÉPHONE");
+        d->data[3].setName("RADIO");
+        d->data[4].setName("MULTIMÉDIA");
+        d->data[5].setName("CONNEXIONS");
+        d->data[6].setName("TABLEAU DE\nBORD");
+        d->data[7].setName("PARAMÈTRES");
+        d->data[8].setName("POINT D'INTÉRÊT");
+    } else {
+        d->data[0].setName("HVAC");
+        d->data[1].setName("NAVIGATION");
+        d->data[2].setName("PHONE");
+        d->data[3].setName("RADIO");
+        d->data[4].setName("MULTIMEDIA");
+        d->data[5].setName("CONNECTIVITY");
+        d->data[6].setName("DASHBOARD");
+        d->data[7].setName("SETTINGS");
+        d->data[8].setName("POINT OF\nINTEREST");
+    }
+}
 
 ApplicationModel::ApplicationModel(QObject *parent)
     : QAbstractListModel(parent)
     , d(new Private(this))
 {
+    setObjectName("ApplicationModel");
 }
 
 ApplicationModel::~ApplicationModel()
index bffc4c9..40741bd 100644 (file)
@@ -30,7 +30,7 @@ public:
 
     QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
     QHash<int, QByteArray> roleNames() const override;
-
+    void changeLanguage(const QString &lang);
 private:
     class Private;
     Private *d;
diff --git a/HomeScreen/src2/usermanagement.cpp b/HomeScreen/src2/usermanagement.cpp
new file mode 100644 (file)
index 0000000..bbbbac1
--- /dev/null
@@ -0,0 +1,34 @@
+#include "usermanagement.h"
+#include <QApplication>
+#include <QDebug>
+UserManagement::UserManagement(QObject *home, QObject *shortcutArea, QObject *statusArea) : QObject()
+{
+    this->home = home;
+    this->appModel = home->findChild<ApplicationModel *>("ApplicationModel");
+    this->shortcutArea = shortcutArea;
+    this->statusArea = statusArea;
+    this->currentLanguage = "en";
+    connect(&timerTest, SIGNAL(timeout()), this, SLOT(slot_timerTest()));
+    timerTest.setSingleShot(false);
+    timerTest.start(5000);
+}
+void UserManagement::slot_timerTest()
+{
+    if(currentLanguage == "fr")
+        currentLanguage = "en";
+    else
+        currentLanguage = "fr";
+    appModel->changeLanguage(currentLanguage);
+    QMetaObject::invokeMethod(home, "languageChanged");
+    QMetaObject::invokeMethod(shortcutArea, "languageChanged", Q_ARG(QVariant, currentLanguage));
+    QMetaObject::invokeMethod(statusArea, "languageChanged", Q_ARG(QVariant, currentLanguage));
+    if(currentLanguage == "fr") {
+        QLocale::setDefault(QLocale("fr_FR"));
+        QMetaObject::invokeMethod(home, "showSign90", Q_ARG(QVariant, true));
+        QMetaObject::invokeMethod(home, "showHello", Q_ARG(QVariant, "Bonjour José!"));
+    } else {
+        QLocale::setDefault(QLocale("en_US"));
+        QMetaObject::invokeMethod(home, "showSign90", Q_ARG(QVariant, false));
+        QMetaObject::invokeMethod(home, "showHello", Q_ARG(QVariant, "Hello José!"));
+    }
+}
diff --git a/HomeScreen/src2/usermanagement.h b/HomeScreen/src2/usermanagement.h
new file mode 100644 (file)
index 0000000..804df22
--- /dev/null
@@ -0,0 +1,26 @@
+#ifndef USERMANAGEMENT_H
+#define USERMANAGEMENT_H
+
+#include <QObject>
+#include "applicationmodel.h"
+#include <QTimer>
+class UserManagement : public QObject
+{
+    Q_OBJECT
+public:
+    explicit UserManagement(QObject *home, QObject *shortcutArea, QObject *statusArea);
+
+signals:
+
+public slots:
+    void slot_timerTest();
+private:
+    QObject *home;
+    QObject *shortcutArea;
+    QObject *statusArea;
+    ApplicationModel *appModel;
+    QTimer timerTest;
+    QString currentLanguage;
+};
+
+#endif // USERMANAGEMENT_H