summaryrefslogtreecommitdiffstats
path: root/demo3/horizontal/dashboard/app/TirePressure.qml
diff options
context:
space:
mode:
authorzheng_wenlong <wenlong_zheng@nexty-ele.com>2018-11-14 12:41:11 +0900
committerzheng_wenlong <wenlong_zheng@nexty-ele.com>2018-11-14 12:41:11 +0900
commit2cdd42fba2645f9578cb1055e501ecc4644da36d (patch)
tree7224fb979a94a59533bb1cd9dd45319815f206f0 /demo3/horizontal/dashboard/app/TirePressure.qml
parent5f9be1b9c8e6a4b6d25d64e6f5ec28deb0525854 (diff)
Add dashboard for horizontal mode
Add dashboard for horizontal mode. Change-Id: I216d7be177a46b8664aa5655b7fad022f9904e5d Signed-off-by: zheng_wenlong <wenlong_zheng@nexty-ele.com>
Diffstat (limited to 'demo3/horizontal/dashboard/app/TirePressure.qml')
-rw-r--r--demo3/horizontal/dashboard/app/TirePressure.qml62
1 files changed, 62 insertions, 0 deletions
diff --git a/demo3/horizontal/dashboard/app/TirePressure.qml b/demo3/horizontal/dashboard/app/TirePressure.qml
new file mode 100644
index 0000000..437cf2f
--- /dev/null
+++ b/demo3/horizontal/dashboard/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
+ }
+ }
+ ]
+}