| 154 | } |
| 155 | |
| 156 | void |
| 157 | BookmarkManagerDialog::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 | |
| 181 | void |
| 182 | BookmarkManagerDialog::onCellActivated(QModelIndex const &index) |
nothing calls this directly
no test coverage detected