summaryrefslogtreecommitdiffstats
path: root/app/Shift.qml
diff options
context:
space:
mode:
Diffstat (limited to 'app/Shift.qml')
-rw-r--r--app/Shift.qml9
1 files changed, 5 insertions, 4 deletions
diff --git a/app/Shift.qml b/app/Shift.qml
index 60a0f0f..7d2d017 100644
--- a/app/Shift.qml
+++ b/app/Shift.qml
@@ -21,7 +21,8 @@ import QtWebSockets 1.0
Row {
property real percent: 1
property var carshift: [
- "images/meters/tacho_shift_N.svg", "images/meters/tacho_shift_D.svg"
+ "images/meters/tacho_shift_N.svg", "images/meters/tacho_shift_D.svg",
+ "images/meters/tacho_shift_P.svg", "images/meters/tacho_shift_R.svg"
]
property var wheelshift: [
@@ -36,16 +37,16 @@ Row {
fillMode: Image.PreserveAspectFit
smooth: true
asynchronous: true
- source: wshift === 0 ? carshift[0] : carshift[1]
+ source: wshift == "N" ? carshift[0] : ( wshift == "P" ? carshift[2] : ( wshift == "R" ? carshift[3] : carshift[1]))
}
Image {
- visible: wshift > 0
+ visible: (wshift == "D1" || wshift == "D2"||wshift == "D3"||wshift == "D4"||wshift == "D5"||wshift == "D6")
width: percent*sourceSize.width
height: percent*sourceSize.height
fillMode: Image.PreserveAspectFit
smooth: true
asynchronous: true
- source: (wshift > 0 && wshift <= wheelshift.length) ? wheelshift[wshift-1] : wheelshift[0]
+ source: (wshift == "D1") ? wheelshift[0] : ((wshift == "D2") ? wheelshift[1] : ((wshift == "D3") ? wheelshift[2] : ((wshift == "D4") ? wheelshift[3] : ((wshift == "D5") ? wheelshift[4] : wheelshift[5] ))))
}
}