| 114 | } |
| 115 | |
| 116 | void |
| 117 | BookmarkManagerDialog::onRemoveBookmark(QModelIndex index) |
| 118 | { |
| 119 | auto map = &Suscan::Singleton::get_instance()->getBookmarkMap(); |
| 120 | |
| 121 | if (this->ui->bookmarkView->model() == this->proxy) |
| 122 | index = this->proxy->mapToSource(index); |
| 123 | |
| 124 | int row = index.row(); |
| 125 | |
| 126 | if (row >= 0 && row < map->count()) { |
| 127 | Suscan::Bookmark bm = (*map)[map->keys().at(row)]; |
| 128 | this->model->notifyRemovalStart(row); |
| 129 | Suscan::Singleton::get_instance()->removeBookmark(bm.info.frequency); |
| 130 | this->model->notifyRemovalFinish(); |
| 131 | } |
| 132 | } |
| 133 | |
| 134 | void |
| 135 | BookmarkManagerDialog::onEditAccepted(void) |
nothing calls this directly
no test coverage detected