1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-09-27 15:26:33 -04:00

UDP sink plugin: implemented new rollup menu behavior

This commit is contained in:
f4exb 2017-08-23 23:44:50 +02:00
parent 0c0bf2e094
commit e2ce645c74
2 changed files with 13 additions and 2 deletions

View File

@ -227,6 +227,7 @@ UDPSinkGUI::UDPSinkGUI(PluginAPI* pluginAPI, DeviceSinkAPI *deviceAPI, QWidget*
m_tickCount(0),
m_channelMarker(this),
m_basicSettingsShown(false),
m_bcsw(0),
m_doApplySettings(true)
{
ui->setupUi(this);
@ -278,6 +279,7 @@ UDPSinkGUI::UDPSinkGUI(PluginAPI* pluginAPI, DeviceSinkAPI *deviceAPI, QWidget*
UDPSinkGUI::~UDPSinkGUI()
{
if (m_bcsw) delete m_bcsw;
m_deviceAPI->removeChannelInstance(this);
m_deviceAPI->removeThreadedSource(m_threadedChannelizer);
delete m_threadedChannelizer;
@ -546,8 +548,15 @@ void UDPSinkGUI::onMenuDoubleClicked()
if (!m_basicSettingsShown)
{
m_basicSettingsShown = true;
BasicChannelSettingsWidget* bcsw = new BasicChannelSettingsWidget(&m_channelMarker, this);
bcsw->show();
m_bcsw = new BasicChannelSettingsWidget(&m_channelMarker, this);
m_bcsw->show();
}
else
{
m_basicSettingsShown = false;
m_bcsw->hide();
delete m_bcsw;
m_bcsw = 0;
}
}

View File

@ -31,6 +31,7 @@ class ThreadedBasebandSampleSource;
class UpChannelizer;
class UDPSink;
class SpectrumVis;
class BasicChannelSettingsWidget;
namespace Ui {
class UDPSinkGUI;
@ -96,6 +97,7 @@ private:
QString m_udpAddress;
int m_udpPort;
bool m_basicSettingsShown;
BasicChannelSettingsWidget *m_bcsw;
bool m_doApplySettings;
explicit UDPSinkGUI(PluginAPI* pluginAPI, DeviceSinkAPI *deviceAPI, QWidget* parent = NULL);