mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-26 01:39:05 -05:00
Save/restore scope settings
This commit is contained in:
parent
b0ba1c33a9
commit
6f291ac399
@ -462,6 +462,7 @@ AISDemodGUI::AISDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, Baseban
|
||||
|
||||
setTitleColor(m_channelMarker.getColor());
|
||||
m_settings.setChannelMarker(&m_channelMarker);
|
||||
m_settings.setScopeGUI(ui->scopeGUI);
|
||||
|
||||
m_deviceUISet->addChannelMarker(&m_channelMarker);
|
||||
m_deviceUISet->addRollupWidget(this);
|
||||
|
@ -24,7 +24,8 @@
|
||||
#include "aisdemodsettings.h"
|
||||
|
||||
AISDemodSettings::AISDemodSettings() :
|
||||
m_channelMarker(0)
|
||||
m_channelMarker(0),
|
||||
m_scopeGUI(0)
|
||||
{
|
||||
resetToDefaults();
|
||||
}
|
||||
@ -85,6 +86,7 @@ QByteArray AISDemodSettings::serialize() const
|
||||
s.writeU32(18, m_reverseAPIPort);
|
||||
s.writeU32(19, m_reverseAPIDeviceIndex);
|
||||
s.writeU32(20, m_reverseAPIChannelIndex);
|
||||
s.writeBlob(21, m_scopeGUI->serialize());
|
||||
|
||||
for (int i = 0; i < AISDEMOD_MESSAGE_COLUMNS; i++)
|
||||
s.writeS32(100 + i, m_messageColumnIndexes[i]);
|
||||
@ -146,6 +148,12 @@ bool AISDemodSettings::deserialize(const QByteArray& data)
|
||||
d.readU32(20, &utmp, 0);
|
||||
m_reverseAPIChannelIndex = utmp > 99 ? 99 : utmp;
|
||||
|
||||
if (m_scopeGUI)
|
||||
{
|
||||
d.readBlob(21, &bytetmp);
|
||||
m_scopeGUI->deserialize(bytetmp);
|
||||
}
|
||||
|
||||
for (int i = 0; i < AISDEMOD_MESSAGE_COLUMNS; i++)
|
||||
d.readS32(100 + i, &m_messageColumnIndexes[i], i);
|
||||
for (int i = 0; i < AISDEMOD_MESSAGE_COLUMNS; i++)
|
||||
|
@ -56,6 +56,7 @@ struct AISDemodSettings
|
||||
uint16_t m_reverseAPIPort;
|
||||
uint16_t m_reverseAPIDeviceIndex;
|
||||
uint16_t m_reverseAPIChannelIndex;
|
||||
Serializable *m_scopeGUI;
|
||||
|
||||
int m_messageColumnIndexes[AISDEMOD_MESSAGE_COLUMNS];//!< How the columns are ordered in the table
|
||||
int m_messageColumnSizes[AISDEMOD_MESSAGE_COLUMNS]; //!< Size of the columns in the table
|
||||
@ -63,6 +64,7 @@ struct AISDemodSettings
|
||||
AISDemodSettings();
|
||||
void resetToDefaults();
|
||||
void setChannelMarker(Serializable *channelMarker) { m_channelMarker = channelMarker; }
|
||||
void setScopeGUI(Serializable *scopeGUI) { m_scopeGUI = scopeGUI; }
|
||||
QByteArray serialize() const;
|
||||
bool deserialize(const QByteArray& data);
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user