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

TestSource: fixed some GUI issues

This commit is contained in:
f4exb 2018-01-18 01:09:42 +01:00
parent 7c185ac268
commit 9a488f9f97
2 changed files with 4 additions and 6 deletions

View File

@ -44,8 +44,6 @@ TestSourceGui::TestSourceGui(DeviceUISet *deviceUISet, QWidget* parent) :
m_doApplySettings(true),
m_forceSettings(true),
m_sampleSource(0),
m_sampleRate(0),
m_centerFrequency(0),
m_tickCount(0),
m_lastEngineState((DSPDeviceSourceEngine::State)-1)
{
@ -98,12 +96,12 @@ void TestSourceGui::resetToDefaults()
qint64 TestSourceGui::getCenterFrequency() const
{
return m_centerFrequency;
return m_settings.m_centerFrequency;
}
void TestSourceGui::setCenterFrequency(qint64 centerFrequency)
{
m_centerFrequency = centerFrequency;
m_settings.m_centerFrequency = centerFrequency;
displaySettings();
sendSettings();
}
@ -329,6 +327,7 @@ void TestSourceGui::updateFrequencyShiftLimit()
void TestSourceGui::displaySettings()
{
blockApplySettings(true);
ui->sampleSize->blockSignals(true);
ui->centerFrequency->setValue(m_settings.m_centerFrequency / 1000);
ui->decimation->setCurrentIndex(m_settings.m_log2Decim);
@ -350,6 +349,7 @@ void TestSourceGui::displaySettings()
int qBiasPercent = roundf(m_settings.m_qFactor * 100.0f);
ui->qBiasText->setText(QString(tr("%1 %").arg(qBiasPercent)));
ui->sampleSize->blockSignals(false);
blockApplySettings(false);
}

View File

@ -61,8 +61,6 @@ private:
bool m_doApplySettings;
bool m_forceSettings;
DeviceSampleSource* m_sampleSource;
int m_sampleRate;
quint64 m_centerFrequency;
std::size_t m_tickCount;
int m_deviceSampleRate;
quint64 m_deviceCenterFrequency; //!< Center frequency in device