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

Method onEditBookmark

Components/BookmarkManagerDialog.cpp:156–179  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

154}
155
156void
157BookmarkManagerDialog::onEditBookmark(QModelIndex index)
158{
159 auto map = &Suscan::Singleton::get_instance()->getBookmarkMap();
160
161 if (this->ui->bookmarkView->model() == this->proxy)
162 index = this->proxy->mapToSource(index);
163
164 int row = index.row();
165
166 if (row >= 0 && row < map->count()) {
167 Suscan::Bookmark bm = (*map)[map->keys().at(row)];
168
169 this->editingFrequency = bm.info.frequency;
170
171 this->editDialog->setNameHint(bm.info.name);
172 this->editDialog->setFrequencyHint(this->editingFrequency);
173 this->editDialog->setColorHint(bm.info.color);
174 this->editDialog->setBandwidthHint(bm.info.bandwidth());
175 this->editDialog->setModulationHint(bm.info.modulation);
176
177 this->editDialog->show();
178 }
179}
180
181void
182BookmarkManagerDialog::onCellActivated(QModelIndex const &index)

Callers

nothing calls this directly

Calls 6

setNameHintMethod · 0.80
setFrequencyHintMethod · 0.80
setColorHintMethod · 0.80
setBandwidthHintMethod · 0.80
bandwidthMethod · 0.80
setModulationHintMethod · 0.80

Tested by

no test coverage detected