1 |
import Qt 4.7
|
2 |
import "pagenavigation.js" as Navit
|
3 |
|
4 |
Rectangle {
|
5 |
id: page
|
6 |
|
7 |
width: gui.width; height: gui.height
|
8 |
color: "Black"
|
9 |
opacity: 0
|
10 |
|
11 |
function pageOpen() {
|
12 |
if (point.pointType!="Bookmark") {
|
13 |
btnAddBookmark.opacity=1;
|
14 |
}
|
15 |
if (point.pointType!="MapPoint") {
|
16 |
btnView.opacity=1;
|
17 |
}
|
18 |
if (point.pointType!="Position") {
|
19 |
btnPosition.opacity=1;
|
20 |
}
|
21 |
if (point.pointType!="Destination") {
|
22 |
btnDestination.opacity=1;
|
23 |
}
|
24 |
page.opacity = 1;
|
25 |
}
|
26 |
|
27 |
Component.onCompleted: pageOpen();
|
28 |
|
29 |
Behavior on opacity {
|
30 |
NumberAnimation { id: opacityAnimation; duration: 300; alwaysRunToEnd: true }
|
31 |
}
|
32 |
|
33 |
Text {
|
34 |
id: infoTxt;
|
35 |
text: point.coordString; color: "White"; font.pointSize: gui.height/20;
|
36 |
anchors.top:parent.top;anchors.horizontalCenter:parent.horizontalCenter
|
37 |
}
|
38 |
Text {
|
39 |
id: nameTxt;
|
40 |
text: point.pointName; color: "White"; font.pointSize: gui.height/20;
|
41 |
anchors.top:infoTxt.bottom;anchors.topMargin: 5;anchors.horizontalCenter:parent.horizontalCenter
|
42 |
}
|
43 |
|
44 |
ButtonIcon {
|
45 |
id: btnView; text: "View on map"; icon: "gui_maps.svg"; onClicked: { navit.setCenter(); gui.backToMap(); }
|
46 |
opacity: 0
|
47 |
anchors.top: nameTxt.bottom;anchors.topMargin:gui.height/32
|
48 |
anchors.left:page.left;anchors.leftMargin: gui.height/6
|
49 |
}
|
50 |
ButtonIcon {
|
51 |
id: btnPosition; text: "Set as\nposition"; icon: "gui_active.svg"; onClicked: { navit.setPosition(); gui.backToMap() }
|
52 |
opacity: 0
|
53 |
anchors.top: nameTxt.bottom;anchors.topMargin:gui.height/32
|
54 |
anchors.left:btnView.right;anchors.leftMargin: gui.height/6
|
55 |
}
|
56 |
ButtonIcon {
|
57 |
id: btnDestination; text: "Set as\ndestination"; icon: "gui_active.svg"; onClicked: { route.addDestination(); gui.backToMap() }
|
58 |
opacity: 0
|
59 |
anchors.top: nameTxt.bottom;anchors.topMargin:gui.height/32
|
60 |
anchors.left:btnPosition.right;anchors.leftMargin: gui.height/6
|
61 |
}
|
62 |
ButtonIcon {
|
63 |
id: btnAddBookmark; text: "Add as\na bookmark"; icon: "gui_active.svg"; onClicked: Navit.load("PageBookmarksAdd.qml");
|
64 |
opacity: 0
|
65 |
anchors.top: nameTxt.bottom;anchors.topMargin:gui.height/32
|
66 |
anchors.left:btnDestination.right;anchors.leftMargin: gui.height/6
|
67 |
}
|
68 |
Grid {
|
69 |
columns: 4;rows: 1
|
70 |
anchors.horizontalCenter: parent.horizontalCenter;
|
71 |
anchors.top: btnDestination.bottom;anchors.topMargin:gui.height/32
|
72 |
spacing: gui.height/6
|
73 |
ButtonIcon {
|
74 |
id: btnBookmarks; text: "Bookmarks"; icon: "gui_bookmark.svg"; onClicked: {bookmarks.moveRoot(); Navit.load("PageBookmarks.qml"); }
|
75 |
}
|
76 |
ButtonIcon {
|
77 |
id: btnPOI; text: "Nearest\nPOIs"; icon: "attraction.svg"; onClicked: Navit.load("PagePoi.qml");
|
78 |
}
|
79 |
ButtonIcon {
|
80 |
id: btnSearch; text: "Address\nSearch"; icon: "gui_town.svg"; onClicked: Navit.load("PageSearch.qml");
|
81 |
}
|
82 |
ButtonIcon {
|
83 |
id: btnInfo; text: "Point\ninformation"; icon: "gui_menu.svg"; onClicked: Navit.load("PagePointInfo.qml");
|
84 |
}
|
85 |
}
|
86 |
|
87 |
Cellar {anchors.bottom: page.bottom; anchors.horizontalCenter: page.horizontalCenter; width: page.width }
|
88 |
}
|