summaryrefslogtreecommitdiff
path: root/navit/gui/qml/skins
diff options
context:
space:
mode:
authorakashihi <akashihi@ffa7fe5e-494d-0410-b361-a75ebd5db220>2010-06-24 11:45:49 +0000
committerakashihi <akashihi@ffa7fe5e-494d-0410-b361-a75ebd5db220>2010-06-24 11:45:49 +0000
commitb3626c80a90837207ea2584db701a02fa040235e (patch)
treeb54c953a98a89f99f7f9c77a5344220ea45151fd /navit/gui/qml/skins
parentac31b18e214e131dc255707ee97ba6043e5c66f2 (diff)
downloadnavit-b3626c80a90837207ea2584db701a02fa040235e.tar.gz
Fix:gui/qml:Items, related to route, are showed only when the route is
available git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@3393 ffa7fe5e-494d-0410-b361-a75ebd5db220
Diffstat (limited to 'navit/gui/qml/skins')
-rw-r--r--navit/gui/qml/skins/navit/PageRoute.qml42
1 files changed, 37 insertions, 5 deletions
diff --git a/navit/gui/qml/skins/navit/PageRoute.qml b/navit/gui/qml/skins/navit/PageRoute.qml
index d6fdf4eaf..45d29f690 100644
--- a/navit/gui/qml/skins/navit/PageRoute.qml
+++ b/navit/gui/qml/skins/navit/PageRoute.qml
@@ -9,11 +9,14 @@ Rectangle {
function pageOpen() {
page.opacity = 1;
- if (navit.getDestination().length>0) {
+ if (navit.getPosition().length>0) {
btnPoi.opacity=0.8;
}
- if (navit.getDestination().length>0 && navit.getDestination().length>0) {
+ if (navit.getDestination().length>0 && navit.getPosition().length>0) {
btnStop.opacity=0.8;
+ btnRouteView.opacity=0.8;
+ btnRouteBook.opacity=0.8;
+ btnRouteHeight.opacity=0.8;
}
}
@@ -24,19 +27,48 @@ Rectangle {
NumberAnimation { id: opacityAnimation; duration: 300; alwaysRunToEnd: true }
}
+ Text {
+ id: statusTxt;
+ text: route.getAttr("route_status"); color: "White"; font.pointSize: gui.height/20;
+ anchors.top:parent.top;anchors.left:parent.left;anchors.topMargin: gui.height/20;anchors.leftMargin: gui.height/20;
+ }
+ Text {
+ id: timeLabel;
+ text: "Time to drive route: "; color: "White"; font.pointSize: gui.height/20;
+ anchors.top:statusTxt.top;anchors.left:statusTxt.right;anchors.leftMargin: gui.height/20;
+ }
+ Text {
+ id: timeTxt;
+ text: route.getAttr("destination_time"); color: "White"; font.pointSize: gui.height/20;
+ anchors.top:timeLabel.top;anchors.left:timeLabel.right;anchors.leftMargin: gui.height/20;
+ }
+ Text {
+ id: lengthLabel;
+ text: "Route length: "; color: "White"; font.pointSize: gui.height/20;
+ anchors.top:timeTxt.top;anchors.left:timeTxt.right;anchors.leftMargin: gui.height/20;
+ }
+ Text {
+ id: lengthTxt;
+ text: route.getAttr("destination_length"); color: "White"; font.pointSize: gui.height/20;
+ anchors.top:lengthLabel.top;anchors.left:lengthLabel.right;anchors.leftMargin: gui.height/20;
+ }
+
Grid {
columns: 3;rows: 1
anchors.horizontalCenter: parent.horizontalCenter;
anchors.bottom: parent.verticalCenter; anchors.bottomMargin: gui.height/16;
spacing: gui.width/12
ButtonIcon {
- id: btnRouteview; text: "View route"; icon: "gui_town.svg"; onClicked: { navit.command("zoom_to_route()"), gui.backToMap(); }
+ id: btnRouteView; text: "View route"; icon: "gui_town.svg"; onClicked: { navit.command("zoom_to_route()"), gui.backToMap(); }
+ opacity: 0;
}
ButtonIcon {
- id: btnRoadbook; text: "Roadbook"; icon: "gui_log.svg"; onClicked: console.log("Implement me!");
+ id: btnRouteBook; text: "Roadbook"; icon: "gui_log.svg"; onClicked: console.log("Implement me!");
+ opacity: 0;
}
ButtonIcon {
- id: btnSettings; text: "Height profile"; icon: "peak.svg"; onClicked: console.log("Implement me!");
+ id: btnRouteHeight; text: "Height profile"; icon: "peak.svg"; onClicked: console.log("Implement me!");
+ opacity: 0;
}
}