From 67e93f6d4029d295d046b9b20f6350549778ff19 Mon Sep 17 00:00:00 2001 From: f4exb Date: Sun, 24 Sep 2017 03:12:27 +0200 Subject: [PATCH] RTLSDR tranverter mode implemented --- plugins/samplesource/rtlsdr/rtlsdrgui.cpp | 1 + plugins/samplesource/rtlsdr/rtlsdrgui.ui | 2 +- sdrbase/gui/transverterbutton.cpp | 11 +++++++++++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/plugins/samplesource/rtlsdr/rtlsdrgui.cpp b/plugins/samplesource/rtlsdr/rtlsdrgui.cpp index 059b53589..9e23c9e0d 100644 --- a/plugins/samplesource/rtlsdr/rtlsdrgui.cpp +++ b/plugins/samplesource/rtlsdr/rtlsdrgui.cpp @@ -234,6 +234,7 @@ void RTLSDRGui::displaySettings() ui->decim->setCurrentIndex(m_settings.m_log2Decim); ui->fcPos->setCurrentIndex((int) m_settings.m_fcPos); ui->checkBox->setChecked(m_settings.m_noModMode); + ui->agc->setChecked(m_settings.m_agc); } void RTLSDRGui::sendSettings() diff --git a/plugins/samplesource/rtlsdr/rtlsdrgui.ui b/plugins/samplesource/rtlsdr/rtlsdrgui.ui index a6126a86f..7f294acca 100644 --- a/plugins/samplesource/rtlsdr/rtlsdrgui.ui +++ b/plugins/samplesource/rtlsdr/rtlsdrgui.ui @@ -307,7 +307,7 @@ - Transverter frequency translation toggle + Transverter frequency translation dialog X diff --git a/sdrbase/gui/transverterbutton.cpp b/sdrbase/gui/transverterbutton.cpp index 99f1d3c2a..8f1edd1b1 100644 --- a/sdrbase/gui/transverterbutton.cpp +++ b/sdrbase/gui/transverterbutton.cpp @@ -26,6 +26,7 @@ TransverterButton::TransverterButton(QWidget* parent) : m_deltaFrequency(0), m_deltaFrequencyActive(false) { + setObjectName("TransverterButton"); connect(this, SIGNAL(clicked()), this, SLOT(onClicked())); } @@ -41,4 +42,14 @@ void TransverterButton::updateState() setToolTip(tr("Transverter frequency translation dialog. Delta frequency %1 MHz %2") .arg(m_deltaFrequency/1000000.0) .arg(m_deltaFrequencyActive ? "enabled" : "disabled")); + + if(m_deltaFrequencyActive) + { + setStyleSheet("TransverterButton { background:rgb(128, 70, 0); }"); + } + else + { + setStyleSheet("TransverterButton { background:rgb(48, 48, 48); }"); + } + }