1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-06-02 06:04:39 -04:00

SoapySDR support: interface for all generic GUI elements

This commit is contained in:
f4exb
2018-11-01 10:06:27 +01:00
parent d5ce833668
commit f79e6bc3ab
9 changed files with 108 additions and 18 deletions
@@ -34,7 +34,8 @@ SoapySDRInputGui::SoapySDRInputGui(DeviceUISet *deviceUISet, QWidget* parent) :
m_sampleSource(0),
m_sampleRate(0),
m_deviceCenterFrequency(0),
m_lastEngineState(DSPDeviceSourceEngine::StNotStarted)
m_lastEngineState(DSPDeviceSourceEngine::StNotStarted),
m_sampleRateGUI(0)
{
m_sampleSource = (SoapySDRInput*) m_deviceUISet->m_deviceSourceAPI->getSampleSource();
ui->setupUi(this);
@@ -85,6 +86,8 @@ void SoapySDRInputGui::createRangesControl(const SoapySDR::RangeList& rangeList,
rangeGUI->addItem(QString("%1").arg(QString::number(it.minimum()/1000.0, 'f', 0)), it.minimum());
}
m_sampleRateGUI = rangeGUI;
connect(m_sampleRateGUI, SIGNAL(valueChanged(double)), this, SLOT(sampleRateChanged(double)));
// QHBoxLayout *layout = new QHBoxLayout();
// QLabel *rangeLabel = new QLabel();
// rangeLabel->setText(text);
@@ -121,6 +124,9 @@ void SoapySDRInputGui::createRangesControl(const SoapySDR::RangeList& rangeList,
}
rangeGUI->reset();
m_sampleRateGUI = rangeGUI;
connect(m_sampleRateGUI, SIGNAL(valueChanged(double)), this, SLOT(sampleRateChanged(double)));
}
}
@@ -164,4 +170,7 @@ bool SoapySDRInputGui::handleMessage(const Message& message __attribute__((unuse
return false;
}
void SoapySDRInputGui::sampleRateChanged(double sampleRate)
{
qDebug("SoapySDRInputGui::sampleRateChanged: %lf", sampleRate);
}