diff --git a/plugins/channelrx/udpsrc/udpsrcgui.cpp b/plugins/channelrx/udpsrc/udpsrcgui.cpp index ed85416f2..1da030d4c 100644 --- a/plugins/channelrx/udpsrc/udpsrcgui.cpp +++ b/plugins/channelrx/udpsrc/udpsrcgui.cpp @@ -246,8 +246,9 @@ UDPSrcGUI::UDPSrcGUI(PluginAPI* pluginAPI, DeviceSourceAPI *deviceAPI, QWidget* ui->fmDeviation->setEnabled(false); - ui->deltaFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold)); - ui->deltaFrequency->setValueRange(7, 0U, 9999999U); + ui->deltaFrequencyLabel->setText(QString("%1f").arg(QChar(0x94, 0x03))); + ui->deltaFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold)); + ui->deltaFrequency->setValueRange(false, 7, -9999999, 9999999); ui->glSpectrum->setCenterFrequency(0); ui->glSpectrum->setSampleRate(ui->sampleRate->text().toInt()); @@ -357,8 +358,7 @@ void UDPSrcGUI::applySettings() int boost = ui->boost->value(); setTitleColor(m_channelMarker.getColor()); - ui->deltaFrequency->setValue(abs(m_channelMarker.getCenterFrequency())); - ui->deltaMinus->setChecked(m_channelMarker.getCenterFrequency() < 0); + ui->deltaFrequency->setValue(m_channelMarker.getCenterFrequency()); ui->sampleRate->setText(QString("%1").arg(outputSampleRate, 0)); ui->rfBandwidth->setText(QString("%1").arg(rfBandwidth, 0)); //ui->udpAddress->setText(m_udpAddress); @@ -438,24 +438,9 @@ void UDPSrcGUI::applySettings() } } -void UDPSrcGUI::on_deltaMinus_toggled(bool minus) +void UDPSrcGUI::on_deltaFrequency_changed(qint64 value) { - int deltaFrequency = m_channelMarker.getCenterFrequency(); - bool minusDelta = (deltaFrequency < 0); - - if (minus ^ minusDelta) // sign change - { - m_channelMarker.setCenterFrequency(-deltaFrequency); - } -} - -void UDPSrcGUI::on_deltaFrequency_changed(quint64 value) -{ - if (ui->deltaMinus->isChecked()) { - m_channelMarker.setCenterFrequency(-value); - } else { - m_channelMarker.setCenterFrequency(value); - } + m_channelMarker.setCenterFrequency(value); } void UDPSrcGUI::on_sampleFormat_currentIndexChanged(int index) diff --git a/plugins/channelrx/udpsrc/udpsrcgui.h b/plugins/channelrx/udpsrc/udpsrcgui.h index b9efc76e3..44a179c88 100644 --- a/plugins/channelrx/udpsrc/udpsrcgui.h +++ b/plugins/channelrx/udpsrc/udpsrcgui.h @@ -59,8 +59,7 @@ public: private slots: void channelMarkerChanged(); - void on_deltaFrequency_changed(quint64 value); - void on_deltaMinus_toggled(bool minus); + void on_deltaFrequency_changed(qint64 value); void on_sampleFormat_currentIndexChanged(int index); void on_sampleRate_textEdited(const QString& arg1); void on_rfBandwidth_textEdited(const QString& arg1); diff --git a/plugins/channelrx/udpsrc/udpsrcgui.ui b/plugins/channelrx/udpsrc/udpsrcgui.ui index e729bce73..9d01ee4f7 100644 --- a/plugins/channelrx/udpsrc/udpsrcgui.ui +++ b/plugins/channelrx/udpsrc/udpsrcgui.ui @@ -181,29 +181,20 @@ 2 - - - Frequency shift direction + + + + 16 + 16777215 + - ... - - - - :/plus.png - :/minus.png - - - - true - - - false + Df - + 0 @@ -570,12 +561,6 @@
gui/rollupwidget.h
1 - - ValueDial - QWidget -
gui/valuedial.h
- 1 -
GLSpectrum QWidget @@ -588,6 +573,12 @@
gui/glspectrumgui.h
1
+ + ValueDialZ + QWidget +
gui/valuedialz.h
+ 1 +
sampleFormat