diff options
author | Scott Murray <scott.murray@konsulko.com> | 2017-02-28 19:21:44 -0500 |
---|---|---|
committer | Scott Murray <scott.murray@konsulko.com> | 2017-02-28 19:21:44 -0500 |
commit | 632e86c88bd34725cceec27c1b4b03b07fca0f63 (patch) | |
tree | 36be17f725b458afbe56176d4aa63e2c46502c67 /app/TirePressure.qml | |
parent | 4a52273df6c792a94a514637cc94e7137910a323 (diff) |
Import latest code from CES2017 repodab_3.99.1dab/3.99.13.99.1
Change-Id: I5f97d0f3d11899fc78943f806f55b685c1cce9a5
Signed-off-by: Scott Murray <scott.murray@konsulko.com>
Diffstat (limited to 'app/TirePressure.qml')
-rw-r--r-- | app/TirePressure.qml | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/app/TirePressure.qml b/app/TirePressure.qml new file mode 100644 index 0000000..b390eac --- /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: '#66FF99' + 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 + } + } + ] +} |