mirror of
https://github.com/f4exb/sdrangel.git
synced 2026-06-03 06:24:48 -04:00
SoapySDR support: GUI component to deal with interval ranges
This commit is contained in:
@@ -22,6 +22,7 @@
|
||||
|
||||
#include "ui_soapysdrinputgui.h"
|
||||
#include "discreterangegui.h"
|
||||
#include "intervalrangegui.h"
|
||||
#include "soapysdrinputgui.h"
|
||||
|
||||
SoapySDRInputGui::SoapySDRInputGui(DeviceUISet *deviceUISet, QWidget* parent) :
|
||||
@@ -43,7 +44,7 @@ SoapySDRInputGui::SoapySDRInputGui(DeviceUISet *deviceUISet, QWidget* parent) :
|
||||
m_sampleSource->getFrequencyRange(f_min, f_max);
|
||||
ui->centerFrequency->setValueRange(7, f_min/1000, f_max/1000);
|
||||
|
||||
createRangesControl(m_sampleSource->getRateRanges(), "Sample Rate", "kS/s");
|
||||
createRangesControl(m_sampleSource->getRateRanges(), "SR", "kS/s");
|
||||
}
|
||||
|
||||
SoapySDRInputGui::~SoapySDRInputGui()
|
||||
@@ -109,6 +110,18 @@ void SoapySDRInputGui::createRangesControl(const SoapySDR::RangeList& rangeList,
|
||||
// //window->setStyleSheet("background-color:black;");
|
||||
// window->setLayout(layout);
|
||||
}
|
||||
else if (rangeInterval)
|
||||
{
|
||||
IntervalRangeGUI *rangeGUI = new IntervalRangeGUI(ui->scrollAreaWidgetContents);
|
||||
rangeGUI->setLabel(text);
|
||||
rangeGUI->setUnits(unit);
|
||||
|
||||
for (const auto &it : rangeList) {
|
||||
rangeGUI->addInterval(it.minimum(), it.maximum());
|
||||
}
|
||||
|
||||
rangeGUI->reset();
|
||||
}
|
||||
}
|
||||
|
||||
void SoapySDRInputGui::setName(const QString& name)
|
||||
|
||||
Reference in New Issue
Block a user