MCPcopy Create free account
hub / github.com/aethersdr/AetherSDR / onAdd

Method onAdd

src/gui/MemoryDialog.cpp:857–884  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

855}
856
857void MemoryDialog::onAdd()
858{
859 const auto slices = m_model->slices();
860 if (slices.isEmpty())
861 return;
862
863 SliceModel* active = nullptr;
864 for (auto* candidate : slices) {
865 if (candidate && candidate->isActive()) {
866 active = candidate;
867 break;
868 }
869 }
870 if (!active)
871 active = slices.first();
872 if (!active)
873 return;
874
875 createMemoryFromSlice(m_model, active, QString(), this,
876 [this](int code, const QString&, int memoryIndex) {
877 if (code != 0 || memoryIndex < 0)
878 return;
879
880 m_pendingEditMemoryIndex = memoryIndex;
881 m_pendingEditRetries = 3;
882 populateTable();
883 });
884}
885
886void MemoryDialog::onExport()
887{

Callers

nothing calls this directly

Calls 4

createMemoryFromSliceFunction · 0.85
slicesMethod · 0.80
isEmptyMethod · 0.45
isActiveMethod · 0.45

Tested by

no test coverage detected