MCPcopy Create free account
hub / github.com/BatchDrake/SigDigger / onRemoveBookmark

Method onRemoveBookmark

Components/BookmarkManagerDialog.cpp:116–132  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

114}
115
116void
117BookmarkManagerDialog::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
134void
135BookmarkManagerDialog::onEditAccepted(void)

Callers

nothing calls this directly

Calls 3

notifyRemovalStartMethod · 0.80
removeBookmarkMethod · 0.80
notifyRemovalFinishMethod · 0.80

Tested by

no test coverage detected