mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-23 00:18:37 -05:00
TCP source, UDP sink: removed rollup widget save/restore state during serialization/deserialization and make methods protected in rollup widget
This commit is contained in:
parent
dabe952b40
commit
58a17f421c
@ -65,7 +65,6 @@ void TCPSrcGUI::resetToDefaults()
|
|||||||
QByteArray TCPSrcGUI::serialize() const
|
QByteArray TCPSrcGUI::serialize() const
|
||||||
{
|
{
|
||||||
SimpleSerializer s(1);
|
SimpleSerializer s(1);
|
||||||
s.writeBlob(1, saveState());
|
|
||||||
s.writeS32(2, m_channelMarker.getCenterFrequency());
|
s.writeS32(2, m_channelMarker.getCenterFrequency());
|
||||||
s.writeS32(3, m_sampleFormat);
|
s.writeS32(3, m_sampleFormat);
|
||||||
s.writeReal(4, m_outputSampleRate);
|
s.writeReal(4, m_outputSampleRate);
|
||||||
@ -96,8 +95,6 @@ bool TCPSrcGUI::deserialize(const QByteArray& data)
|
|||||||
blockApplySettings(true);
|
blockApplySettings(true);
|
||||||
m_channelMarker.blockSignals(true);
|
m_channelMarker.blockSignals(true);
|
||||||
|
|
||||||
d.readBlob(1, &bytetmp);
|
|
||||||
restoreState(bytetmp);
|
|
||||||
d.readS32(2, &s32tmp, 0);
|
d.readS32(2, &s32tmp, 0);
|
||||||
m_channelMarker.setCenterFrequency(s32tmp);
|
m_channelMarker.setCenterFrequency(s32tmp);
|
||||||
d.readS32(3, &s32tmp, TCPSrc::FormatSSB);
|
d.readS32(3, &s32tmp, TCPSrc::FormatSSB);
|
||||||
|
@ -79,7 +79,6 @@ void UDPSinkGUI::resetToDefaults()
|
|||||||
QByteArray UDPSinkGUI::serialize() const
|
QByteArray UDPSinkGUI::serialize() const
|
||||||
{
|
{
|
||||||
SimpleSerializer s(1);
|
SimpleSerializer s(1);
|
||||||
s.writeBlob(1, saveState());
|
|
||||||
s.writeS32(2, m_channelMarker.getCenterFrequency());
|
s.writeS32(2, m_channelMarker.getCenterFrequency());
|
||||||
s.writeS32(3, m_sampleFormat);
|
s.writeS32(3, m_sampleFormat);
|
||||||
s.writeReal(4, m_inputSampleRate);
|
s.writeReal(4, m_inputSampleRate);
|
||||||
@ -116,8 +115,6 @@ bool UDPSinkGUI::deserialize(const QByteArray& data)
|
|||||||
blockApplySettings(true);
|
blockApplySettings(true);
|
||||||
m_channelMarker.blockSignals(true);
|
m_channelMarker.blockSignals(true);
|
||||||
|
|
||||||
d.readBlob(1, &bytetmp);
|
|
||||||
restoreState(bytetmp);
|
|
||||||
d.readBlob(6, &bytetmp);
|
d.readBlob(6, &bytetmp);
|
||||||
m_channelMarker.deserialize(bytetmp);
|
m_channelMarker.deserialize(bytetmp);
|
||||||
|
|
||||||
|
@ -9,10 +9,6 @@ class SDRANGEL_API RollupWidget : public QWidget {
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
RollupWidget(QWidget* parent = NULL);
|
RollupWidget(QWidget* parent = NULL);
|
||||||
|
|
||||||
QByteArray saveState(int version = 0) const;
|
|
||||||
bool restoreState(const QByteArray& state, int version = 0);
|
|
||||||
|
|
||||||
void setTitleColor(const QColor& c);
|
void setTitleColor(const QColor& c);
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
@ -27,6 +23,9 @@ protected:
|
|||||||
|
|
||||||
int arrangeRollups();
|
int arrangeRollups();
|
||||||
|
|
||||||
|
QByteArray saveState(int version = 0) const;
|
||||||
|
bool restoreState(const QByteArray& state, int version = 0);
|
||||||
|
|
||||||
void paintEvent(QPaintEvent*);
|
void paintEvent(QPaintEvent*);
|
||||||
int paintRollup(QWidget* rollup, int pos, QPainter* p, bool last, const QColor& frame);
|
int paintRollup(QWidget* rollup, int pos, QPainter* p, bool last, const QColor& frame);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user