\r
Item {\r
id: img_destination_direction\r
+ width: 100\r
+ height: 100\r
+ visible: false\r
\r
- width: childrenRect.width\r
- height: childrenRect.height\r
+ Rectangle {\r
+ width: parent.width\r
+ height: parent.height\r
+ color: "#a0a0a0"\r
\r
- function settleState() {\r
- if(img_destination_direction.state == "1"){\r
- img_destination_direction.state = "2";\r
- } else if(img_destination_direction.state == "2"){\r
- img_destination_direction.state = "3";\r
- } else if(img_destination_direction.state == "3"){\r
- img_destination_direction.state = "4";\r
- } else if(img_destination_direction.state == "4"){\r
- img_destination_direction.state = "5";\r
- } else if(img_destination_direction.state == "5"){\r
- img_destination_direction.state = "6";\r
- } else if(img_destination_direction.state == "6"){\r
- img_destination_direction.state = "7";\r
- } else if(img_destination_direction.state == "7"){\r
- img_destination_direction.state = "8";\r
- } else if(img_destination_direction.state == "8"){\r
- img_destination_direction.state = "9";\r
- } else {\r
- img_destination_direction.state = "1";\r
- }\r
- }\r
-\r
- Image {\r
- id: direction\r
- x: 0\r
- y: 0\r
- width: 100\r
- height: 100\r
- source: "images/1_uturn.png"\r
-\r
- MouseArea {\r
- anchors.fill: parent\r
- onClicked: { settleState() }\r
- }\r
- }\r
+ Image {\r
+ id: direction\r
+ anchors.fill: parent\r
+ anchors.margins: 1\r
+ source: "images/SW_Patern_3.bmp"\r
+ }\r
+ }\r
\r
states: [\r
- State {\r
- name: "1"\r
- PropertyChanges { target: direction; source: "images/1_uturn.png" }\r
+ State {\r
+ name: "0" // NoDirection\r
+ PropertyChanges { target: img_destination_direction; visible: true }\r
+ PropertyChanges { target: direction; source: "images/SW_Patern_3.bmp" }\r
+ },\r
+ State {\r
+ name: "1" // DirectionForward\r
+ PropertyChanges { target: img_destination_direction; visible: true }\r
+ PropertyChanges { target: direction; source: "images/5_straight.png" }\r
},\r
State {\r
- name: "2"\r
- PropertyChanges { target: direction; source: "images/2_sharp_right.png" }\r
+ name: "2" // DirectionBearRight\r
+ PropertyChanges { target: img_destination_direction; visible: true }\r
+ PropertyChanges { target: direction; source: "images/11_2_bear_right_112px-Signal_C117a.svg.png" }\r
},\r
State {\r
- name: "3"\r
- PropertyChanges { target: direction; source: "images/3_right.png" }\r
+ name: "3" // DirectionLightRight\r
+ PropertyChanges { target: img_destination_direction; visible: true }\r
+ PropertyChanges { target: direction; source: "images/4_slight_right.png" }\r
},\r
State {\r
- name: "4"\r
- PropertyChanges { target: direction; source: "images/4_slight_right.png" }\r
+ name: "4" // DirectionRight\r
+ PropertyChanges { target: img_destination_direction; visible: true }\r
+ PropertyChanges { target: direction; source: "images/3_right.png" }\r
},\r
State {\r
- name: "5"\r
- PropertyChanges { target: direction; source: "images/5_straight.png" }\r
+ name: "5" // DirectionHardRight\r
+ PropertyChanges { target: img_destination_direction; visible: true }\r
+ PropertyChanges { target: direction; source: "images/2_sharp_right.png" }\r
},\r
State {\r
- name: "6"\r
- PropertyChanges { target: direction; source: "images/6_slight_left.png" }\r
+ name: "6" // DirectionUTurnRight\r
+ PropertyChanges { target: img_destination_direction; visible: true }\r
+ //PropertyChanges { target: direction; source: "images/1_uturn.png" }\r
+ PropertyChanges { target: direction; source: "images/9_7_uturn_left.png" } // no u-turn right in CES2019\r
},\r
State {\r
- name: "7"\r
- PropertyChanges { target: direction; source: "images/7_left.png" }\r
+ name: "7" // DirectionUTurnLeft\r
+ PropertyChanges { target: img_destination_direction; visible: true }\r
+ PropertyChanges { target: direction; source: "images/9_7_uturn_left.png" }\r
},\r
State {\r
- name: "8"\r
- PropertyChanges { target: direction; source: "images/8_sharp_left.png" }\r
+ name: "8" // DirectionHardLeft\r
+ PropertyChanges { target: img_destination_direction; visible: true }\r
+ PropertyChanges { target: direction; source: "images/8_sharp_left.png" }\r
},\r
State {\r
- name: "9"\r
- PropertyChanges { target: direction; source: "images/Dest_Flag.jpg" }\r
- }\r
+ name: "9" // DirectionLeft\r
+ PropertyChanges { target: img_destination_direction; visible: true }\r
+ PropertyChanges { target: direction; source: "images/7_left.png" }\r
+ },\r
+ State {\r
+ name: "10" // DirectionLightLeft\r
+ PropertyChanges { target: img_destination_direction; visible: true }\r
+ PropertyChanges { target: direction; source: "images/6_slight_left.png" }\r
+ },\r
+ State {\r
+ name: "11" // DirectionBearLeft\r
+ PropertyChanges { target: img_destination_direction; visible: true }\r
+ PropertyChanges { target: direction; source: "images/10_11_bear_left_112px-Signal_C117a.svg.png" }\r
+ },\r
+ State {\r
+ name: "12" // arrived at your destination\r
+ PropertyChanges { target: img_destination_direction; visible: true }\r
+ PropertyChanges { target: direction; source: "images/Dest_Flag.jpg" }\r
+ },\r
+ State {\r
+ name: "invisible"\r
+ PropertyChanges { target: img_destination_direction; visible: false }\r
+ }\r
+\r
]\r
}\r