git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@3084
ffa7fe5e-494d-0410-b361-
a75ebd5db220
return "Success";
}
}
+ QString Delete(QString bookmark) {
+ struct attr attr;
+ navit_get_attr(this->object->nav, attr_bookmarks, &attr, NULL);
+ if (!bookmarks_del_bookmark(attr.u.bookmarks, bookmark.toLocal8Bit().constData()) ) {
+ return "Failed!";
+ } else {
+ return "Success";
+ }
+ }
void setPoint(QString bookmark) {
struct attr attr;
struct item* item;
Item {
id: wrapper
width: list.width; height: 20
- Column {
- x: 5; y: 5
- Text { text: itemName; color: "White" }
- }
- MouseRegion {
- id:delegateMouse
+ Text { id: txtItem; text: itemName; color: "White"
+ width: list.width-imgDelete.width
+ MouseRegion {
+ id:delegateMouse
anchors.fill: parent
onClicked: bookmarkClick(itemId,itemIcon,itemName,itemPath);
- }
+ }
+
+ }
+ Image {
+ id: imgDelete; source: gui.iconPath+"gui_inactive.svg"; anchors.right: wrapper.right;anchors.rightMargin: 5;
+ width: 20; height: 20
+
+ MouseRegion {
+ id:delegateMouseDelete
+ anchors.fill: parent
+ onClicked: { bookmarks.Delete(itemId); bookmarks.getAttrList(""); }
+ }
+ }
}
}