Signed-off-by: Philippe Lelong <lelong.ph@meltemus.com>
anchors.horizontalCenter: parent.horizontalCenter
anchors.top: parent.top
anchors.topMargin: 20
anchors.horizontalCenter: parent.horizontalCenter
anchors.top: parent.top
anchors.topMargin: 20
- source: './images/B14-90.png'
+ source: './images/sign.png'
+ Label {
+ id: speedLimit
+ anchors.horizontalCenter: parent.horizontalCenter
+ anchors.verticalCenter: parent.verticalCenter
+ horizontalAlignment: Text.AlignHCenter
+ color: "black"
+ text: "50"
+ font.pixelSize: 90
+ font.family: "Roboto"
+ font.bold: true
+ visible: false
+ }
}
Image {
id: flagLanguage
}
Image {
id: flagLanguage
animation2.running = true;
}
animation2.running = true;
}
- function showSign90(show) {
+ function showSign90(show, speed, unit) {
+ if(show) {
+ if(speed.length > 2)
+ speedLimit.font.pixelSize = 60
+ else
+ speedLimit.font.pixelSize = 90
+ speedLimit.text = speed
+ }
+ sign90.source = './images/B14-90.png'
+ speedLimit.visible = false
}
function showVisa(show, num) {
}
function showVisa(show, num) {
<file>Open Trunk.png</file>
<file>Install App.png</file>
<file>View Online.png</file>
<file>Open Trunk.png</file>
<file>Install App.png</file>
<file>View Online.png</file>
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, "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")));
+ bool noSpeedLimit = true;
foreach(const QString &s, user.graphActions) {
foreach(const QString &s, user.graphActions) {
- if(!s.contains("Exceed"))
+ if(!s.contains("Exceed")) {
+ } else {
+ noSpeedLimit = false;
+ QStringList speed = s.split(" ");
+ if(speed.size() == 3)
+ QMetaObject::invokeMethod(home, "showSign90", Q_ARG(QVariant, true),
+ Q_ARG(QVariant, speed.at(1)), Q_ARG(QVariant, speed.at(2)));
+ }
+ if(noSpeedLimit)
+ QMetaObject::invokeMethod(home, "showSign90", Q_ARG(QVariant, false),
+ Q_ARG(QVariant, QString()), Q_ARG(QVariant, QString()));
QString type = user.policy;
if(user.graphPreferredLanguage == "fr") {
if(type == "Owner")
QString type = user.policy;
if(user.graphPreferredLanguage == "fr") {
if(type == "Owner")
#ifndef USERMANAGEMENT_H
#define USERMANAGEMENT_H
#ifndef USERMANAGEMENT_H
#define USERMANAGEMENT_H
-//#define REAL_SERVER "ws://localhost:1212/api?token=hello"
+#define REAL_SERVER "ws://localhost:1212/api?token=hello"
#include <QObject>
#include "applicationmodel.h"
#include <QObject>
#include "applicationmodel.h"