1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-12-17 23:28:50 -05:00

Removed UDP address and port from Channel marker

This commit is contained in:
f4exb 2018-03-30 19:06:27 +02:00
parent e0356a39a5
commit 53beb8a92d
18 changed files with 0 additions and 200 deletions

View File

@ -230,8 +230,6 @@ AMDemodGUI::AMDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandS
m_channelMarker.setBandwidth(5000);
m_channelMarker.setCenterFrequency(0);
m_channelMarker.setTitle("AM Demodulator");
m_channelMarker.setUDPAddress("127.0.0.1");
m_channelMarker.setUDPSendPort(9999);
m_channelMarker.blockSignals(false);
m_channelMarker.setVisible(true); // activate signal on the last setting only

View File

@ -357,8 +357,6 @@ BFMDemodGUI::BFMDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, Baseban
m_channelMarker.setBandwidth(12500);
m_channelMarker.setCenterFrequency(0);
m_channelMarker.setTitle("Broadcast FM Demod");
m_channelMarker.setUDPAddress("127.0.0.1");
m_channelMarker.setUDPSendPort(9999);
m_channelMarker.blockSignals(false);
m_channelMarker.setVisible(true); // activate signal on the last setting only

View File

@ -256,8 +256,6 @@ void DSDDemodGUI::onMenuDialogCalled(const QPoint &p)
dialog.exec();
m_settings.m_inputFrequencyOffset = m_channelMarker.getCenterFrequency();
m_settings.m_udpAddress = m_channelMarker.getUDPAddress(),
m_settings.m_udpPort = m_channelMarker.getUDPSendPort(),
m_settings.m_rgbColor = m_channelMarker.getColor().rgb();
m_settings.m_title = m_channelMarker.getTitle();
@ -328,8 +326,6 @@ DSDDemodGUI::DSDDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, Baseban
m_channelMarker.setBandwidth(10000);
m_channelMarker.setCenterFrequency(0);
m_channelMarker.setTitle("DSD Demodulator");
m_channelMarker.setUDPAddress("127.0.0.1");
m_channelMarker.setUDPSendPort(9999);
m_channelMarker.blockSignals(false);
m_channelMarker.setVisible(true); // activate signal on the last setting only

View File

@ -293,8 +293,6 @@ NFMDemodGUI::NFMDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, Baseban
m_channelMarker.setBandwidth(5000);
m_channelMarker.setCenterFrequency(0);
m_channelMarker.setTitle("NFM Demodulator");
m_channelMarker.setUDPAddress("127.0.0.1");
m_channelMarker.setUDPSendPort(9999);
m_channelMarker.blockSignals(false);
m_channelMarker.setVisible(true); // activate signal on the last setting only

View File

@ -287,8 +287,6 @@ SSBDemodGUI::SSBDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, Baseban
m_channelMarker.setBandwidth(6000);
m_channelMarker.setCenterFrequency(0);
m_channelMarker.setTitle("SSB Demodulator");
m_channelMarker.setUDPAddress("127.0.0.1");
m_channelMarker.setUDPSendPort(9999);
m_channelMarker.blockSignals(false);
m_channelMarker.setVisible(true); // activate signal on the last setting only

View File

@ -190,8 +190,6 @@ WFMDemodGUI::WFMDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, Baseban
m_channelMarker.setBandwidth(WFMDemodSettings::getRFBW(4));
m_channelMarker.setCenterFrequency(0);
m_channelMarker.setTitle("WFM Demodulator");
m_channelMarker.setUDPAddress("127.0.0.1");
m_channelMarker.setUDPSendPort(9999);
m_channelMarker.setColor(m_settings.m_rgbColor);
m_channelMarker.blockSignals(false);
m_channelMarker.setVisible(true); // activate signal on the last setting only

View File

@ -171,9 +171,6 @@ UDPSrcGUI::UDPSrcGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSam
m_channelMarker.setBandwidth(16000);
m_channelMarker.setCenterFrequency(0);
m_channelMarker.setTitle("UDP Sample Source");
m_channelMarker.setUDPAddress("127.0.0.1");
m_channelMarker.setUDPSendPort(9999);
m_channelMarker.setUDPReceivePort(9998);
m_channelMarker.setColor(m_settings.m_rgbColor);
m_channelMarker.blockSignals(false);
m_channelMarker.setVisible(true); // activate signal on the last setting only
@ -221,7 +218,6 @@ void UDPSrcGUI::displaySettings()
setTitleColor(m_settings.m_rgbColor);
setWindowTitle(m_channelMarker.getTitle());
displayUDPAddress();
ui->deltaFrequency->setValue(m_channelMarker.getCenterFrequency());
@ -249,13 +245,6 @@ void UDPSrcGUI::displaySettings()
ui->gainText->setText(tr("%1").arg(ui->gain->value()/10.0, 0, 'f', 1));
ui->glSpectrum->setSampleRate(m_settings.m_outputSampleRate);
displayUDPAddress();
}
void UDPSrcGUI::displayUDPAddress()
{
ui->addressText->setText(tr("%1:%2/%3").arg(m_channelMarker.getUDPAddress()).arg(m_channelMarker.getUDPSendPort()).arg(m_channelMarker.getUDPReceivePort()));
}
void UDPSrcGUI::setSampleFormatIndex(const UDPSrcSettings::SampleFormat& sampleFormat)
@ -552,14 +541,11 @@ void UDPSrcGUI::onMenuDialogCalled(const QPoint &p)
m_settings.m_inputFrequencyOffset = m_channelMarker.getCenterFrequency();
m_settings.m_udpAddress = m_channelMarker.getUDPAddress(),
m_settings.m_udpPort = m_channelMarker.getUDPSendPort(),
m_settings.m_rgbColor = m_channelMarker.getColor().rgb();
m_settings.m_title = m_channelMarker.getTitle();
setWindowTitle(m_settings.m_title);
setTitleColor(m_settings.m_rgbColor);
displayUDPAddress();
applySettingsImmediate();
}

View File

@ -85,7 +85,6 @@ private:
void applySettings(bool force = false);
void applySettingsImmediate(bool force = false);
void displaySettings();
void displayUDPAddress();
void setSampleFormat(int index);
void setSampleFormatIndex(const UDPSrcSettings::SampleFormat& sampleFormat);

View File

@ -296,8 +296,6 @@ AMModGUI::AMModGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSampl
m_channelMarker.setBandwidth(5000);
m_channelMarker.setCenterFrequency(0);
m_channelMarker.setTitle("AM Modulator");
m_channelMarker.setUDPAddress("127.0.0.1");
m_channelMarker.setUDPSendPort(9999);
m_channelMarker.blockSignals(false);
m_channelMarker.setVisible(true); // activate signal on the last setting only

View File

@ -616,8 +616,6 @@ ATVModGUI::ATVModGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSam
m_channelMarker.setBandwidth(5000);
m_channelMarker.setCenterFrequency(0);
m_channelMarker.setTitle("ATV Modulator");
m_channelMarker.setUDPAddress("127.0.0.1");
m_channelMarker.setUDPSendPort(9999);
m_channelMarker.blockSignals(false);
m_channelMarker.setVisible(true); // activate signal on the last setting only

View File

@ -334,8 +334,6 @@ NFMModGUI::NFMModGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSam
m_channelMarker.setBandwidth(12500);
m_channelMarker.setCenterFrequency(0);
m_channelMarker.setTitle("NFM Modulator");
m_channelMarker.setUDPAddress("127.0.0.1");
m_channelMarker.setUDPSendPort(9999);
m_channelMarker.blockSignals(false);
m_channelMarker.setVisible(true); // activate signal on the last setting only

View File

@ -133,8 +133,6 @@ void SSBModGUI::channelMarkerChangedByCursor()
void SSBModGUI::channelMarkerUpdate()
{
m_settings.m_rgbColor = m_channelMarker.getColor().rgb();
m_settings.m_udpAddress = m_channelMarker.getUDPAddress();
m_settings.m_udpPort = m_channelMarker.getUDPReceivePort();
displaySettings();
applySettings();
}
@ -401,8 +399,6 @@ SSBModGUI::SSBModGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSam
m_channelMarker.setSidebands(ChannelMarker::usb);
m_channelMarker.setCenterFrequency(0);
m_channelMarker.setTitle("SSB Modulator");
m_channelMarker.setUDPAddress("127.0.0.1");
m_channelMarker.setUDPSendPort(9999);
m_channelMarker.blockSignals(false);
m_channelMarker.setVisible(true);

View File

@ -313,8 +313,6 @@ WFMModGUI::WFMModGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSam
m_channelMarker.setBandwidth(125000);
m_channelMarker.setCenterFrequency(0);
m_channelMarker.setTitle("WFM Modulator");
m_channelMarker.setUDPAddress("127.0.0.1");
m_channelMarker.setUDPSendPort(9999);
m_channelMarker.blockSignals(false);
m_channelMarker.setVisible(true); // activate signal on the last setting only

View File

@ -194,8 +194,6 @@ void UDPSinkGUI::displaySettings()
m_channelMarker.blockSignals(true);
m_channelMarker.setCenterFrequency(m_settings.m_inputFrequencyOffset);
m_channelMarker.setBandwidth(m_settings.m_rfBandwidth);
m_channelMarker.setUDPAddress(m_settings.m_udpAddress);
m_channelMarker.setUDPReceivePort(m_settings.m_udpPort); // activate signal on the last setting only
m_channelMarker.blockSignals(false);
m_channelMarker.setColor(m_settings.m_rgbColor);
@ -429,8 +427,6 @@ void UDPSinkGUI::onMenuDialogCalled(const QPoint &p)
dialog.exec();
m_settings.m_inputFrequencyOffset = m_channelMarker.getCenterFrequency();
m_settings.m_udpAddress = m_channelMarker.getUDPAddress(),
m_settings.m_udpPort = m_channelMarker.getUDPReceivePort(),
m_settings.m_rgbColor = m_channelMarker.getColor().rgb();
setWindowTitle(m_channelMarker.getTitle());

View File

@ -37,14 +37,11 @@ ChannelMarker::ChannelMarker(QObject* parent) :
m_highlighted(false),
m_color(m_colorTable[m_nextColor]),
m_movable(true),
m_udpReceivePort(9999),
m_udpSendPort(9998),
m_fScaleDisplayType(FScaleDisplay_freq)
{
++m_nextColor;
if(m_colorTable[m_nextColor] == 0)
m_nextColor = 0;
setUDPAddress("127.0.0.1");
}
void ChannelMarker::emitChangedByAPI()
@ -118,36 +115,11 @@ void ChannelMarker::setColor(const QColor& color)
emit changedByAPI();
}
void ChannelMarker::setUDPAddress(const QString& udpAddress)
{
m_udpAddress = udpAddress;
m_displayAddressReceive = QString(tr("%1:%2").arg(getUDPAddress()).arg(getUDPSendPort()));
m_displayAddressReceive = QString(tr("%1:%2").arg(getUDPAddress()).arg(getUDPReceivePort()));
emit changedByAPI();
}
void ChannelMarker::setUDPReceivePort(quint16 port)
{
m_udpReceivePort = port;
m_displayAddressReceive = QString(tr("%1:%2").arg(getUDPAddress()).arg(getUDPReceivePort()));
emit changedByAPI();
}
void ChannelMarker::setUDPSendPort(quint16 port)
{
m_udpSendPort = port;
m_displayAddressSend = QString(tr("%1:%2").arg(getUDPAddress()).arg(getUDPSendPort()));
emit changedByAPI();
}
void ChannelMarker::resetToDefaults()
{
setTitle("Channel");
setCenterFrequency(0);
setColor(Qt::white);
setUDPAddress("127.0.0.1");
setUDPSendPort(9999);
setUDPReceivePort(9999);
setFrequencyScaleDisplayType(FScaleDisplay_freq);
}
@ -157,9 +129,6 @@ QByteArray ChannelMarker::serialize() const
s.writeS32(1, getCenterFrequency());
s.writeU32(2, getColor().rgb());
s.writeString(3, getTitle());
s.writeString(4, getUDPAddress());
s.writeU32(5, (quint32) getUDPReceivePort());
s.writeU32(6, (quint32) getUDPSendPort());
s.writeS32(7, (int) getFrequencyScaleDisplayType());
return s.final();
}
@ -189,12 +158,6 @@ bool ChannelMarker::deserialize(const QByteArray& data)
}
d.readString(3, &strtmp, "Channel");
setTitle(strtmp);
d.readString(4, &strtmp, "127.0.0.1");
setUDPAddress(strtmp);
d.readU32(5, &u32tmp, 9999);
setUDPReceivePort(u32tmp);
d.readU32(6, &u32tmp, 9999);
setUDPSendPort(u32tmp);
d.readS32(7, &tmp, 0);
if ((tmp >= 0) && (tmp < FScaleDisplay_none)) {
setFrequencyScaleDisplayType((frequencyScaleDisplay_t) tmp);

View File

@ -66,15 +66,6 @@ public:
void setMovable(bool movable) { m_movable = movable; }
bool getMovable() const { return m_movable; }
void setUDPAddress(const QString& udpAddress);
const QString& getUDPAddress() const { return m_udpAddress; }
void setUDPReceivePort(quint16 port);
quint16 getUDPReceivePort() const { return m_udpReceivePort; }
void setUDPSendPort(quint16 port);
quint16 getUDPSendPort() const { return m_udpSendPort; }
void setFrequencyScaleDisplayType(frequencyScaleDisplay_t type) { m_fScaleDisplayType = type; }
frequencyScaleDisplay_t getFrequencyScaleDisplayType() const { return m_fScaleDisplayType; }
@ -100,9 +91,6 @@ protected:
bool m_highlighted;
QColor m_color;
bool m_movable;
QString m_udpAddress;
quint16 m_udpReceivePort;
quint16 m_udpSendPort;
frequencyScaleDisplay_t m_fScaleDisplayType;
void resetToDefaults();

View File

@ -14,9 +14,6 @@ BasicChannelSettingsDialog::BasicChannelSettingsDialog(ChannelMarker* marker, QW
ui->setupUi(this);
ui->title->setText(m_channelMarker->getTitle());
m_color = m_channelMarker->getColor();
ui->udpAddress->setText(m_channelMarker->getUDPAddress());
ui->udpPortReceive->setText(QString("%1").arg(m_channelMarker->getUDPReceivePort()));
ui->udpPortSend->setText(QString("%1").arg(m_channelMarker->getUDPSendPort()));
ui->fScaleDisplayType->setCurrentIndex((int) m_channelMarker->getFrequencyScaleDisplayType());
paintColor();
}
@ -56,28 +53,8 @@ void BasicChannelSettingsDialog::accept()
m_channelMarker->setColor(m_color);
}
m_channelMarker->setUDPAddress(ui->udpAddress->text());
bool ok;
int udpPort = ui->udpPortReceive->text().toInt(&ok);
if((!ok) || (udpPort < 1024) || (udpPort > 65535))
{
udpPort = 9999;
}
m_channelMarker->setUDPReceivePort(udpPort);
udpPort = ui->udpPortSend->text().toInt(&ok);
if((!ok) || (udpPort < 1024) || (udpPort > 65535))
{
udpPort = 9999;
}
m_channelMarker->setFrequencyScaleDisplayType((ChannelMarker::frequencyScaleDisplay_t) ui->fScaleDisplayType->currentIndex());
m_channelMarker->blockSignals(false);
m_channelMarker->setUDPSendPort(udpPort); // activate signal on the last setting only
m_hasChanged = true;
QDialog::accept();

View File

@ -89,16 +89,6 @@
<string>Title</string>
</property>
</item>
<item>
<property name="text">
<string>AdSnd</string>
</property>
</item>
<item>
<property name="text">
<string>AdRcv</string>
</property>
</item>
</widget>
</item>
<item>
@ -116,79 +106,6 @@
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="udpAddressLayout">
<item>
<widget class="QLabel" name="udpAddressLabel">
<property name="text">
<string>Addr</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="udpAddress">
<property name="toolTip">
<string>UDP address</string>
</property>
<property name="inputMask">
<string>000.000.000.000</string>
</property>
<property name="text">
<string>127.0.0.1</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="udpPortReceiveLabel">
<property name="text">
<string>Recv</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="udpPortReceive">
<property name="maximumSize">
<size>
<width>60</width>
<height>16777215</height>
</size>
</property>
<property name="toolTip">
<string>UDP port</string>
</property>
<property name="inputMask">
<string>00000</string>
</property>
<property name="text">
<string>9999</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="udpPortSendLabel">
<property name="text">
<string>Send</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="udpPortSend">
<property name="maximumSize">
<size>
<width>60</width>
<height>16777215</height>
</size>
</property>
<property name="inputMask">
<string>00000</string>
</property>
<property name="text">
<string>9998</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QDialogButtonBox" name="buttonBox">
<property name="orientation">