summaryrefslogtreecommitdiffstats
path: root/app/Dashboard.qml
diff options
context:
space:
mode:
Diffstat (limited to 'app/Dashboard.qml')
-rw-r--r--app/Dashboard.qml53
1 files changed, 16 insertions, 37 deletions
diff --git a/app/Dashboard.qml b/app/Dashboard.qml
index 091234d..fd56521 100644
--- a/app/Dashboard.qml
+++ b/app/Dashboard.qml
@@ -18,15 +18,10 @@ import QtQuick 2.6
import QtQuick.Layouts 1.1
import QtQuick.Controls 2.0
import QtWebSockets 1.0
-import Translator 1.0
ApplicationWindow {
id: root
- Translator {
- id: translator
- }
-
WebSocket {
property string api_str: "api/canivi"
property string verb_str: "subscribe"
@@ -114,8 +109,8 @@ ApplicationWindow {
anchors.rightMargin: -20
anchors.top: car.top
anchors.topMargin: 150
- title: translator.translate(qsTr('LEFT FRONT TIRE'), translator.language)
- pressure: translator.translate(qsTr('%1 PSI').arg(23.1), translator.language)
+ title: 'LEFT FRONT TIRE'
+ pressure: '23.1 PSI'
}
TirePressure {
@@ -123,8 +118,8 @@ ApplicationWindow {
anchors.rightMargin: -20
anchors.bottom: car.bottom
anchors.bottomMargin: 120
- title: translator.translate(qsTr('LEFT REAR TIRE'), translator.language)
- pressure: translator.translate(qsTr('%1 PSI').arg(31.35), translator.language)
+ title: 'LEFT REAR TIRE'
+ pressure: '31.35 PSI'
}
TirePressure {
@@ -133,8 +128,8 @@ ApplicationWindow {
anchors.leftMargin: -20
anchors.top: car.top
anchors.topMargin: 150
- title: translator.translate(qsTr('RIGHT FRONT TIRE'), translator.language)
- pressure: translator.translate(qsTr('%1 PSI').arg(24.2), translator.language)
+ title: 'RIGHT FRONT TIRE'
+ pressure: '24.2 PSI'
}
TirePressure {
@@ -143,8 +138,8 @@ ApplicationWindow {
anchors.leftMargin: -20
anchors.bottom : car.bottom
anchors.bottomMargin: 120
- title: translator.translate(qsTr('RIGHT REAR TIRE'), translator.language)
- pressure: translator.translate(qsTr('%1 PSI').arg(33.0), translator.language)
+ title: 'RIGHT REAR TIRE'
+ pressure: '33.0 PSI'
}
RowLayout {
@@ -165,7 +160,7 @@ ApplicationWindow {
anchors.left: parent.left
anchors.top: parent.bottom
anchors.topMargin: 10
- text: translator.translate(qsTr('(RPM)'), translator.language)
+ text: '(RPM)'
font.pixelSize: 26
}
}
@@ -195,7 +190,7 @@ ApplicationWindow {
Layout.fillHeight: true
verticalAlignment: Label.AlignVCenter
horizontalAlignment: Label.AlignRight
- text: translator.translate(qsTr('LEVEL:'), translator.language)
+ text: 'LEVEL:'
font.pixelSize: 24
}
Label {
@@ -204,7 +199,7 @@ ApplicationWindow {
Layout.fillHeight: true
verticalAlignment: Label.AlignVCenter
horizontalAlignment: Label.AlignLeft
- text: translator.translate(qsTr('%1 GALLONS').arg(9), translator.language)
+ text: '9 GALLONS'
font.pixelSize: 24
color: '#66FF99'
}
@@ -214,7 +209,7 @@ ApplicationWindow {
Layout.fillHeight: true
verticalAlignment: Label.AlignVCenter
horizontalAlignment: Label.AlignRight
- text: translator.translate(qsTr('RANGE:'), translator.language)
+ text: 'RANGE:'
font.pixelSize: 24
}
Label {
@@ -223,7 +218,7 @@ ApplicationWindow {
Layout.fillHeight: true
verticalAlignment: Label.AlignVCenter
horizontalAlignment: Label.AlignLeft
- text: translator.translate(qsTr('%1 MI').arg(9), translator.language)
+ text: '229 MI'
font.pixelSize: 24
color: '#66FF99'
}
@@ -233,7 +228,7 @@ ApplicationWindow {
Layout.fillHeight: true
verticalAlignment: Label.AlignVCenter
horizontalAlignment: Label.AlignRight
- text: translator.translate(qsTr('AVG:'), translator.language)
+ text: 'AVG:'
font.pixelSize: 24
}
Label {
@@ -242,7 +237,7 @@ ApplicationWindow {
Layout.fillHeight: true
verticalAlignment: Label.AlignVCenter
horizontalAlignment: Label.AlignLeft
- text: translator.translate(qsTr('%1 MPG').arg(25.5), translator.language)
+ text: '25.5 MPG'
font.pixelSize: 24
color: '#66FF99'
}
@@ -253,25 +248,9 @@ ApplicationWindow {
anchors.left: parent.left
anchors.top: parent.bottom
anchors.topMargin: 10
- text: translator.translate(qsTr('FUEL'), translator.language)
+ text: 'FUEL'
font.pixelSize: 26
}
}
}
-
- RowLayout {
-// visible: false
- anchors.left: parent.left
- anchors.bottom: parent.bottom
- anchors.right: parent.right
- Repeater {
- model: ['C', 'fr_FR', 'ja_JP', 'zh_CN']
-
- Button {
- text: model.modelData
- onClicked: translator.language = model.modelData
- Layout.fillWidth: true
- }
- }
- }
}