merge github
[apps/navigation.git] / app / BtnPresentPosition.qml
1 import QtQuick 2.0\r
2 import QtQuick.Controls 1.5\r
3 \r
4 Item {\r
5     id: btn_present_position\r
6 \r
7     Button {\r
8         id: btn_present_position_\r
9                 width: 100\r
10                 height: 100\r
11         visible: false\r
12 \r
13         function present_position_clicked() {\r
14             map.center = map.currentpostion\r
15 //            map.zoomLevel = root.default_zoom_level\r
16             btn_present_position.state = "Flowing"\r
17         }\r
18         onClicked: { present_position_clicked() }\r
19 \r
20         Image {\r
21             id: image_present_position\r
22             width: 48\r
23             height: 92\r
24             anchors.verticalCenter: parent.verticalCenter\r
25             anchors.horizontalCenter: parent.horizontalCenter\r
26             source: "images/207px-Car_icon_top.svg.png"\r
27         }\r
28     }\r
29     states: [\r
30         State{\r
31             name: "Flowing"\r
32             PropertyChanges { target: btn_present_position_; visible: false }\r
33         },\r
34         State{\r
35             name: "Optional"\r
36             PropertyChanges { target: btn_present_position_; visible: true }\r
37         }\r
38     ]\r
39 \r
40 }\r