git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@3126
ffa7fe5e-494d-0410-b361-
a75ebd5db220
void setPosition() {
navit_set_position(this->object->nav,this->object->currentPoint->pc());
}
+ void setCenter() {
+ navit_set_center(this->object->nav,this->object->currentPoint->pc(),1);
+ }
protected:
int getAttrFunc(enum attr_type type, struct attr* attr, struct attr_iter* iter) { return navit_get_attr(this->object->nav, type, attr, iter); }
int setAttrFunc(struct attr* attr) {return navit_set_attr(this->object->nav,attr); }
anchors.bottom: parent.verticalCenter; anchors.bottomMargin: gui.height/16;
spacing: gui.width/12
ButtonIcon {
- id: btnView; text: "View on map"; icon: "gui_maps.svg"; onClicked: console.log("Implement me!");
+ id: btnView; text: "View position\non map"; icon: "gui_maps.svg"; onClicked: { navit.getPosition();navit.setCenter();gui.backToMap(); }
}
ButtonIcon {
id: btnRoadbook; text: "Roadbook"; icon: "gui_log.svg"; onClicked: console.log("Implement me!");
anchors.bottom: parent.verticalCenter; anchors.bottomMargin: gui.height/16;
spacing: gui.width/12
ButtonIcon {
- id: btnView; text: "View on map"; icon: "gui_maps.svg"; onClicked: console.log("Implement me!");
+ id: btnView; text: "View on map"; icon: "gui_maps.svg"; onClicked: { navit.setCenter(); gui.backToMap(); }
opacity: 0
}
ButtonIcon {