diff options
author | akashihi <akashihi@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2010-04-03 19:50:46 +0000 |
---|---|---|
committer | akashihi <akashihi@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2010-04-03 19:50:46 +0000 |
commit | b738da85db4ce9a5444b997a9ffb1aa085fc1c40 (patch) | |
tree | 7b44fdebcc640a7405c69a6bd1cbe745451973b3 | |
parent | 8433ae65a1597bef301f6bbfed74a1796f706668 (diff) | |
download | navit-svn-b738da85db4ce9a5444b997a9ffb1aa085fc1c40.tar.gz |
Add:gui/qml:Implemented "Stop navigation"
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit/navit@3125 ffa7fe5e-494d-0410-b361-a75ebd5db220
-rw-r--r-- | gui/qml/navitProxy.h | 3 | ||||
-rw-r--r-- | gui/qml/skins/navit/PageNavigation.qml | 6 |
2 files changed, 8 insertions, 1 deletions
diff --git a/gui/qml/navitProxy.h b/gui/qml/navitProxy.h index 3d9597e5..661bf82e 100644 --- a/gui/qml/navitProxy.h +++ b/gui/qml/navitProxy.h @@ -91,6 +91,9 @@ public slots: void setDestination() { navit_set_destination(this->object->nav,this->object->currentPoint->pc(),this->object->currentPoint->coordString().toStdString().c_str(),1); } + void stopNavigation() { + navit_set_destination(this->object->nav,NULL,NULL,0); + } QString getPosition() { struct attr attr; struct pcoord pc; diff --git a/gui/qml/skins/navit/PageNavigation.qml b/gui/qml/skins/navit/PageNavigation.qml index 4b8aa058..50000a07 100644 --- a/gui/qml/skins/navit/PageNavigation.qml +++ b/gui/qml/skins/navit/PageNavigation.qml @@ -13,6 +13,9 @@ Rectangle { if (navit.getDestination().length>0) { btnPoi.opacity=0.8; } + if (navit.getDestination().length>0 && navit.getDestination().length>0) { + btnStop.opacity=0.8; + } } @@ -48,7 +51,8 @@ Rectangle { opacity: 0; } ButtonIcon { - id: btnStop; text: "Stop"; icon: "gui_stop.svg"; onClicked: console.log("Implement me!"); + id: btnStop; text: "Stop"; icon: "gui_stop.svg"; onClicked: { navit.stopNavigation(); gui.backToPrevPage(); } + opacity: 0; } } |