summaryrefslogtreecommitdiffstats
path: root/app/TirePressure.qml
diff options
context:
space:
mode:
authorzheng_wenlong <wenlong_zheng@nexty-ele.com>2019-04-05 16:25:31 +0900
committerzheng_wenlong <wenlong_zheng@nexty-ele.com>2019-04-10 09:30:15 +0900
commit008e2c6e164d5ec5b93d68ba649ca1d9c8f28079 (patch)
treed8ed4442448a4c20c5d5610b05ddbd8377fa0e0f /app/TirePressure.qml
Add demo3 dashboard source code. [Patch Set 2] Update LICENSE file. BUG-AGL: SPEC-2261 Change-Id: Iccd58c03317dfe961fac2f42a8d719d4e70bbfcd Signed-off-by: zheng_wenlong <wenlong_zheng@nexty-ele.com>
Diffstat (limited to 'app/TirePressure.qml')
-rw-r--r--app/TirePressure.qml62
1 files changed, 62 insertions, 0 deletions
diff --git a/app/TirePressure.qml b/app/TirePressure.qml
new file mode 100644
index 0000000..437cf2f
--- /dev/null
+++ b/app/TirePressure.qml
@@ -0,0 +1,62 @@
+import QtQuick 2.6
+import QtQuick.Controls 2.0
+
+Image {
+ id: root
+ width: sourceSize.width
+ height: sourceSize.height
+ property bool mirror: false
+ property alias title: title.text
+ property alias pressure: pressure.text
+
+ Label {
+ id: title
+ anchors.bottom: pressure.top
+ font.pixelSize: 24
+ }
+
+ Label {
+ id: pressure
+ anchors.bottom: parent.bottom
+ anchors.bottomMargin: 55
+ anchors.leftMargin: 140
+ anchors.rightMargin: 140
+ color: '#00ADDC'
+ font.pixelSize: 20
+ }
+
+ states: [
+ State {
+ name: 'left'
+ when: !mirror
+ PropertyChanges {
+ target: root
+ source: './images/HMI_Dashboard_LeftTire.svg'
+ }
+ AnchorChanges {
+ target: title
+ anchors.right: pressure.right
+ }
+ AnchorChanges {
+ target: pressure
+ anchors.right: parent.right
+ }
+ },
+ State {
+ name: 'right'
+ when: mirror
+ PropertyChanges {
+ target: root
+ source: './images/HMI_Dashboard_RightTire.svg'
+ }
+ AnchorChanges {
+ target: title
+ anchors.left: pressure.left
+ }
+ AnchorChanges {
+ target: pressure
+ anchors.left: parent.left
+ }
+ }
+ ]
+}