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

Method beginProfileLoadRadioStateWriteHold

src/gui/MainWindow_Wiring.cpp:1077–1116  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1075}
1076
1077void MainWindow::beginProfileLoadRadioStateWriteHold(const QString& profileType,
1078 const QString& profileName)
1079{
1080 if (!profileLoadMayRebuildRadioTopology(profileType)) {
1081 qCDebug(lcProtocol).noquote()
1082 << "MainWindow: profile load does not require topology write hold"
1083 << QStringLiteral("type=%1").arg(profileType)
1084 << QStringLiteral("name=%1").arg(profileName);
1085 return;
1086 }
1087
1088 const qint64 untilMs = QDateTime::currentMSecsSinceEpoch() + kProfileLoadStateWriteHoldMs;
1089 m_profileLoadRadioStateWriteHoldUntilMs =
1090 std::max(m_profileLoadRadioStateWriteHoldUntilMs, untilMs);
1091 m_suppressStartupPanLayoutRearrange = false;
1092 m_layoutRestoreUntilMs = kPanLayoutRestoreWaitingForFirstPan;
1093 if (m_layoutRestoreTimer) {
1094 m_layoutRestoreTimer->stop();
1095 }
1096 if (m_bsAutoSaveTimer) {
1097 m_bsAutoSaveTimer->stop();
1098 }
1099 m_pendingProfileLoadPanDimensions.clear();
1100 m_profileLoadPendingFftYpixels.clear();
1101 m_profileLoadPanDimensionsSettlingUntilMs.clear();
1102 holdNoiseFloorAutoAdjustForProfileLoad(untilMs);
1103 if (m_panStack) {
1104 for (PanadapterApplet* applet : m_panStack->allApplets()) {
1105 if (applet && applet->spectrumWidget()) {
1106 applet->spectrumWidget()->clearDisplay();
1107 }
1108 }
1109 }
1110 setPanadapterConnectionAnimation(true, "Loading profile...");
1111
1112 qCInfo(lcProtocol).noquote()
1113 << "MainWindow: holding profile-owned radio state writes"
1114 << QStringLiteral("type=%1").arg(profileType)
1115 << QStringLiteral("name=%1").arg(profileName);
1116}
1117
1118bool MainWindow::profileLoadRadioStateWritesHeld() const
1119{

Callers

nothing calls this directly

Calls 6

allAppletsMethod · 0.80
spectrumWidgetMethod · 0.80
clearDisplayMethod · 0.80
stopMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected