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

Method syncBookmarks

Suscan/Library.cpp:682–706  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

680}
681
682void
683Singleton::syncBookmarks(void)
684{
685 ConfigContext ctx("bookmarks");
686 Object list = ctx.listObject();
687
688 // Sync all modified configurations
689 for (auto p : this->bookmarks.keys()) {
690 if (this->bookmarks[p].entry == -1) {
691 try {
692 Object obj(SUSCAN_OBJECT_TYPE_OBJECT);
693
694 obj.set("name", this->bookmarks[p].info.name.toStdString());
695 obj.set("frequency", static_cast<double>(this->bookmarks[p].info.frequency));
696 obj.set("color", this->bookmarks[p].info.color.name().toStdString());
697 obj.set("low_freq_cut", this->bookmarks[p].info.lowFreqCut);
698 obj.set("high_freq_cut", this->bookmarks[p].info.highFreqCut);
699 obj.set("modulation", this->bookmarks[p].info.modulation.toStdString());
700
701 list.append(std::move(obj));
702 } catch (Suscan::Exception const &) {
703 }
704 }
705 }
706}
707
708void
709Singleton::killBackgroundTaskController(void)

Callers 1

syncMethod · 0.95

Calls 4

listObjectMethod · 0.80
appendMethod · 0.80
setMethod · 0.45
nameMethod · 0.45

Tested by

no test coverage detected