1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-08-15 16:03:42 -04:00

Make rollup state a serializable object so that it can be dumped in JSON format for the API. Prerequisite tp #1050

This commit is contained in:
f4exb
2022-01-09 05:27:12 +01:00
parent e2fc5aa87c
commit 98b305f320
599 changed files with 6183 additions and 640 deletions
@@ -202,6 +202,7 @@ FileSourceGUI::FileSourceGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, Bas
m_channelMarker.setVisible(true); // activate signal on the last setting only
m_settings.setChannelMarker(&m_channelMarker);
m_settings.setRollupState(&m_rollupState);
m_deviceUISet->addChannelMarker(&m_channelMarker);
m_deviceUISet->addRollupWidget(this);
@@ -309,7 +310,7 @@ void FileSourceGUI::displaySettings()
ui->gainText->setText(tr("%1 dB").arg(m_settings.m_gainDB));
ui->interpolationFactor->setCurrentIndex(m_settings.m_log2Interp);
applyInterpolation();
restoreState(m_settings.m_rollupState);
restoreState(m_rollupState);
blockApplySettings(false);
}
@@ -361,7 +362,7 @@ void FileSourceGUI::onWidgetRolled(QWidget* widget, bool rollDown)
(void) widget;
(void) rollDown;
m_settings.m_rollupState = saveState();
saveState(m_rollupState);
applySettings();
}