aboutsummaryrefslogtreecommitdiffstats
path: root/app/ImgDestinationDirection.qml
diff options
context:
space:
mode:
Diffstat (limited to 'app/ImgDestinationDirection.qml')
-rw-r--r--[-rwxr-xr-x]app/ImgDestinationDirection.qml126
1 files changed, 69 insertions, 57 deletions
diff --git a/app/ImgDestinationDirection.qml b/app/ImgDestinationDirection.qml
index e6c36d5..b5528dd 100755..100644
--- a/app/ImgDestinationDirection.qml
+++ b/app/ImgDestinationDirection.qml
@@ -2,82 +2,94 @@ import QtQuick 2.0
Item {
id: img_destination_direction
+ width: 100
+ height: 100
+ visible: false
- width: childrenRect.width
- height: childrenRect.height
+ Rectangle {
+ width: parent.width
+ height: parent.height
+ color: "#a0a0a0"
- function settleState() {
- if(img_destination_direction.state == "1"){
- img_destination_direction.state = "2";
- } else if(img_destination_direction.state == "2"){
- img_destination_direction.state = "3";
- } else if(img_destination_direction.state == "3"){
- img_destination_direction.state = "4";
- } else if(img_destination_direction.state == "4"){
- img_destination_direction.state = "5";
- } else if(img_destination_direction.state == "5"){
- img_destination_direction.state = "6";
- } else if(img_destination_direction.state == "6"){
- img_destination_direction.state = "7";
- } else if(img_destination_direction.state == "7"){
- img_destination_direction.state = "8";
- } else if(img_destination_direction.state == "8"){
- img_destination_direction.state = "9";
- } else {
- img_destination_direction.state = "1";
- }
- }
-
- Image {
- id: direction
- x: 0
- y: 0
- width: 100
- height: 100
- source: "images/1_uturn.png"
-
- MouseArea {
- anchors.fill: parent
- onClicked: { settleState() }
- }
- }
+ Image {
+ id: direction
+ anchors.fill: parent
+ anchors.margins: 1
+ source: "images/SW_Patern_3.bmp"
+ }
+ }
states: [
- State {
- name: "1"
- PropertyChanges { target: direction; source: "images/1_uturn.png" }
+ State {
+ name: "0" // NoDirection
+ PropertyChanges { target: img_destination_direction; visible: true }
+ PropertyChanges { target: direction; source: "images/SW_Patern_3.bmp" }
+ },
+ State {
+ name: "1" // DirectionForward
+ PropertyChanges { target: img_destination_direction; visible: true }
+ PropertyChanges { target: direction; source: "images/5_straight.png" }
},
State {
- name: "2"
- PropertyChanges { target: direction; source: "images/2_sharp_right.png" }
+ name: "2" // DirectionBearRight
+ PropertyChanges { target: img_destination_direction; visible: true }
+ PropertyChanges { target: direction; source: "images/11_2_bear_right_112px-Signal_C117a.svg.png" }
},
State {
- name: "3"
- PropertyChanges { target: direction; source: "images/3_right.png" }
+ name: "3" // DirectionLightRight
+ PropertyChanges { target: img_destination_direction; visible: true }
+ PropertyChanges { target: direction; source: "images/4_slight_right.png" }
},
State {
- name: "4"
- PropertyChanges { target: direction; source: "images/4_slight_right.png" }
+ name: "4" // DirectionRight
+ PropertyChanges { target: img_destination_direction; visible: true }
+ PropertyChanges { target: direction; source: "images/3_right.png" }
},
State {
- name: "5"
- PropertyChanges { target: direction; source: "images/5_straight.png" }
+ name: "5" // DirectionHardRight
+ PropertyChanges { target: img_destination_direction; visible: true }
+ PropertyChanges { target: direction; source: "images/2_sharp_right.png" }
},
State {
- name: "6"
- PropertyChanges { target: direction; source: "images/6_slight_left.png" }
+ name: "6" // DirectionUTurnRight
+ PropertyChanges { target: img_destination_direction; visible: true }
+ //PropertyChanges { target: direction; source: "images/1_uturn.png" }
+ PropertyChanges { target: direction; source: "images/9_7_uturn_left.png" } // no u-turn right in CES2019
},
State {
- name: "7"
- PropertyChanges { target: direction; source: "images/7_left.png" }
+ name: "7" // DirectionUTurnLeft
+ PropertyChanges { target: img_destination_direction; visible: true }
+ PropertyChanges { target: direction; source: "images/9_7_uturn_left.png" }
},
State {
- name: "8"
- PropertyChanges { target: direction; source: "images/8_sharp_left.png" }
+ name: "8" // DirectionHardLeft
+ PropertyChanges { target: img_destination_direction; visible: true }
+ PropertyChanges { target: direction; source: "images/8_sharp_left.png" }
},
State {
- name: "9"
- PropertyChanges { target: direction; source: "images/Dest_Flag.jpg" }
- }
+ name: "9" // DirectionLeft
+ PropertyChanges { target: img_destination_direction; visible: true }
+ PropertyChanges { target: direction; source: "images/7_left.png" }
+ },
+ State {
+ name: "10" // DirectionLightLeft
+ PropertyChanges { target: img_destination_direction; visible: true }
+ PropertyChanges { target: direction; source: "images/6_slight_left.png" }
+ },
+ State {
+ name: "11" // DirectionBearLeft
+ PropertyChanges { target: img_destination_direction; visible: true }
+ PropertyChanges { target: direction; source: "images/10_11_bear_left_112px-Signal_C117a.svg.png" }
+ },
+ State {
+ name: "12" // arrived at your destination
+ PropertyChanges { target: img_destination_direction; visible: true }
+ PropertyChanges { target: direction; source: "images/Dest_Flag.jpg" }
+ },
+ State {
+ name: "invisible"
+ PropertyChanges { target: img_destination_direction; visible: false }
+ }
+
]
}