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

Method onEditAccepted

Components/BookmarkManagerDialog.cpp:134–154  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

132}
133
134void
135BookmarkManagerDialog::onEditAccepted(void)
136{
137 BookmarkInfo newInfo;
138 newInfo.frequency = this->editDialog->frequency();
139 newInfo.name = this->editDialog->name();
140 newInfo.color = this->editDialog->color();
141 newInfo.lowFreqCut = -this->editDialog->bandwidth() / 2;
142 newInfo.highFreqCut = this->editDialog->bandwidth() / 2;
143 newInfo.modulation = editDialog->modulation();
144
145 if (this->editingFrequency == newInfo.frequency) {
146 Suscan::Singleton::get_instance()->replaceBookmark(newInfo);
147
148 } else {
149 Suscan::Singleton::get_instance()->removeBookmark(this->editingFrequency);
150 Suscan::Singleton::get_instance()->registerBookmark(newInfo);
151 }
152
153 this->notifyChanged();
154}
155
156void
157BookmarkManagerDialog::onEditBookmark(QModelIndex index)

Callers

nothing calls this directly

Calls 9

notifyChangedMethod · 0.95
frequencyMethod · 0.80
bandwidthMethod · 0.80
modulationMethod · 0.80
replaceBookmarkMethod · 0.80
removeBookmarkMethod · 0.80
registerBookmarkMethod · 0.80
nameMethod · 0.45
colorMethod · 0.45

Tested by

no test coverage detected