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

Method removePanadapter

src/gui/PanadapterStack.cpp:126–155  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

124}
125
126void PanadapterStack::removePanadapter(const QString& panId)
127{
128 // Close floating window if this pan is floating
129 if (auto* fw = m_floatingWindows.take(panId)) {
130 fw->setShuttingDown(true);
131 // Don't takeApplet — the applet will be deleted below
132 // just disconnect and hide the window
133 fw->disconnect();
134 fw->hide();
135 fw->deleteLater();
136 }
137
138 auto* applet = m_pans.take(panId);
139 if (!applet) return;
140
141 delete applet;
142
143 // If active was removed, switch to first remaining
144 if (m_activePanId == panId) {
145 if (!m_pans.isEmpty())
146 setActivePan(m_pans.firstKey());
147 else
148 m_activePanId.clear();
149 }
150
151 // Update multi-pan mode decorations
152 bool multi = m_pans.size() > 1;
153 for (auto* a : m_pans)
154 a->setMultiPanMode(multi);
155}
156
157void PanadapterStack::rekey(const QString& oldId, const QString& newId)
158{

Callers 3

applyPanLayoutMethod · 0.45
wirePanadapterMethod · 0.45
wirePanLifecycleMethod · 0.45

Calls 6

setMultiPanModeMethod · 0.80
setShuttingDownMethod · 0.45
disconnectMethod · 0.45
isEmptyMethod · 0.45
clearMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected