mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-26 09:48:45 -05:00
SSB mod: fixed span slider aspect and bulky low/high cut slider group
This commit is contained in:
parent
34ff36926e
commit
8d565f8187
@ -84,14 +84,14 @@ bool SSBModGUI::deserialize(const QByteArray& data)
|
|||||||
{
|
{
|
||||||
qDebug("SSBModGUI::deserialize");
|
qDebug("SSBModGUI::deserialize");
|
||||||
displaySettings();
|
displaySettings();
|
||||||
applyBandwidths(true); // does applySettings(true)
|
applyBandwidths(5 - ui->spanLog2->value(), true); // does applySettings(true)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_settings.resetToDefaults();
|
m_settings.resetToDefaults();
|
||||||
displaySettings();
|
displaySettings();
|
||||||
applyBandwidths(true); // does applySettings(true)
|
applyBandwidths(5 - ui->spanLog2->value(), true); // does applySettings(true)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -115,7 +115,7 @@ bool SSBModGUI::handleMessage(const Message& message)
|
|||||||
else if (DSPConfigureAudio::match(message))
|
else if (DSPConfigureAudio::match(message))
|
||||||
{
|
{
|
||||||
qDebug("SSBModGUI::handleMessage: DSPConfigureAudio: %d", m_ssbMod->getAudioSampleRate());
|
qDebug("SSBModGUI::handleMessage: DSPConfigureAudio: %d", m_ssbMod->getAudioSampleRate());
|
||||||
applyBandwidths(); // will update spectrum details with new sample rate
|
applyBandwidths(5 - ui->spanLog2->value()); // will update spectrum details with new sample rate
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else if (SSBMod::MsgConfigureSSBMod::match(message))
|
else if (SSBMod::MsgConfigureSSBMod::match(message))
|
||||||
@ -184,7 +184,7 @@ void SSBModGUI::on_flipSidebands_clicked(bool checked __attribute__((unused)))
|
|||||||
void SSBModGUI::on_dsb_toggled(bool dsb)
|
void SSBModGUI::on_dsb_toggled(bool dsb)
|
||||||
{
|
{
|
||||||
ui->flipSidebands->setEnabled(!dsb);
|
ui->flipSidebands->setEnabled(!dsb);
|
||||||
applyBandwidths();
|
applyBandwidths(5 - ui->spanLog2->value());
|
||||||
}
|
}
|
||||||
|
|
||||||
void SSBModGUI::on_audioBinaural_toggled(bool checked)
|
void SSBModGUI::on_audioBinaural_toggled(bool checked)
|
||||||
@ -201,21 +201,21 @@ void SSBModGUI::on_audioFlipChannels_toggled(bool checked)
|
|||||||
|
|
||||||
void SSBModGUI::on_spanLog2_valueChanged(int value)
|
void SSBModGUI::on_spanLog2_valueChanged(int value)
|
||||||
{
|
{
|
||||||
if ((value < 1) || (value > 5)) {
|
if ((value < 0) || (value > 4)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
applyBandwidths();
|
applyBandwidths(5 - value);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SSBModGUI::on_BW_valueChanged(int value __attribute__((unused)))
|
void SSBModGUI::on_BW_valueChanged(int value __attribute__((unused)))
|
||||||
{
|
{
|
||||||
applyBandwidths();
|
applyBandwidths(5 - ui->spanLog2->value());
|
||||||
}
|
}
|
||||||
|
|
||||||
void SSBModGUI::on_lowCut_valueChanged(int value __attribute__((unused)))
|
void SSBModGUI::on_lowCut_valueChanged(int value __attribute__((unused)))
|
||||||
{
|
{
|
||||||
applyBandwidths();
|
applyBandwidths(5 - ui->spanLog2->value());
|
||||||
}
|
}
|
||||||
|
|
||||||
void SSBModGUI::on_toneFrequency_valueChanged(int value)
|
void SSBModGUI::on_toneFrequency_valueChanged(int value)
|
||||||
@ -454,7 +454,7 @@ SSBModGUI::SSBModGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSam
|
|||||||
m_iconDSBLSB.addPixmap(QPixmap("://lsb.png"), QIcon::Normal, QIcon::Off);
|
m_iconDSBLSB.addPixmap(QPixmap("://lsb.png"), QIcon::Normal, QIcon::Off);
|
||||||
|
|
||||||
displaySettings();
|
displaySettings();
|
||||||
applyBandwidths(true); // does applySettings(true)
|
applyBandwidths(5 - ui->spanLog2->value(), true); // does applySettings(true)
|
||||||
}
|
}
|
||||||
|
|
||||||
SSBModGUI::~SSBModGUI()
|
SSBModGUI::~SSBModGUI()
|
||||||
@ -485,10 +485,9 @@ void SSBModGUI::applySettings(bool force)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void SSBModGUI::applyBandwidths(bool force)
|
void SSBModGUI::applyBandwidths(int spanLog2, bool force)
|
||||||
{
|
{
|
||||||
bool dsb = ui->dsb->isChecked();
|
bool dsb = ui->dsb->isChecked();
|
||||||
int spanLog2 = ui->spanLog2->value();
|
|
||||||
m_spectrumRate = m_ssbMod->getAudioSampleRate() / (1<<spanLog2);
|
m_spectrumRate = m_ssbMod->getAudioSampleRate() / (1<<spanLog2);
|
||||||
int bw = ui->BW->value();
|
int bw = ui->BW->value();
|
||||||
int lw = ui->lowCut->value();
|
int lw = ui->lowCut->value();
|
||||||
@ -646,7 +645,7 @@ void SSBModGUI::displaySettings()
|
|||||||
ui->BW->blockSignals(true);
|
ui->BW->blockSignals(true);
|
||||||
|
|
||||||
ui->dsb->setChecked(m_settings.m_dsb);
|
ui->dsb->setChecked(m_settings.m_dsb);
|
||||||
ui->spanLog2->setValue(m_settings.m_spanLog2);
|
ui->spanLog2->setValue(5 - m_settings.m_spanLog2);
|
||||||
|
|
||||||
ui->BW->setValue(roundf(m_settings.m_bandwidth/100.0));
|
ui->BW->setValue(roundf(m_settings.m_bandwidth/100.0));
|
||||||
s = QString::number(m_settings.m_bandwidth/1000.0, 'f', 1);
|
s = QString::number(m_settings.m_bandwidth/1000.0, 'f', 1);
|
||||||
|
@ -87,7 +87,7 @@ private:
|
|||||||
|
|
||||||
bool blockApplySettings(bool block);
|
bool blockApplySettings(bool block);
|
||||||
void applySettings(bool force = false);
|
void applySettings(bool force = false);
|
||||||
void applyBandwidths(bool force = false);
|
void applyBandwidths(int spanLog2, bool force = false);
|
||||||
void displaySettings();
|
void displaySettings();
|
||||||
void displayAGCPowerThreshold();
|
void displayAGCPowerThreshold();
|
||||||
void updateWithStreamData();
|
void updateWithStreamData();
|
||||||
|
@ -53,16 +53,7 @@
|
|||||||
<property name="spacing">
|
<property name="spacing">
|
||||||
<number>3</number>
|
<number>3</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="leftMargin">
|
<property name="margin">
|
||||||
<number>2</number>
|
|
||||||
</property>
|
|
||||||
<property name="topMargin">
|
|
||||||
<number>2</number>
|
|
||||||
</property>
|
|
||||||
<property name="rightMargin">
|
|
||||||
<number>2</number>
|
|
||||||
</property>
|
|
||||||
<property name="bottomMargin">
|
|
||||||
<number>2</number>
|
<number>2</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
@ -252,6 +243,18 @@
|
|||||||
<layout class="QHBoxLayout" name="spanLayout">
|
<layout class="QHBoxLayout" name="spanLayout">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="spanLabel">
|
<widget class="QLabel" name="spanLabel">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>50</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>50</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Span</string>
|
<string>Span</string>
|
||||||
</property>
|
</property>
|
||||||
@ -263,10 +266,92 @@
|
|||||||
<string>Spectrum display frequency span</string>
|
<string>Spectrum display frequency span</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="minimum">
|
<property name="minimum">
|
||||||
<number>1</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="maximum">
|
<property name="maximum">
|
||||||
<number>5</number>
|
<number>4</number>
|
||||||
|
</property>
|
||||||
|
<property name="pageStep">
|
||||||
|
<number>1</number>
|
||||||
|
</property>
|
||||||
|
<property name="value">
|
||||||
|
<number>2</number>
|
||||||
|
</property>
|
||||||
|
<property name="sliderPosition">
|
||||||
|
<number>2</number>
|
||||||
|
</property>
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="invertedAppearance">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="invertedControls">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="spanText">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>50</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>50</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>6.0k</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="lowCutLayout">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="lowCutLabel">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>50</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>50</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Low cut</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="TickedSlider" name="lowCut">
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>16777215</width>
|
||||||
|
<height>16</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Highpass filter cutoff frequency (SSB)</string>
|
||||||
|
</property>
|
||||||
|
<property name="minimum">
|
||||||
|
<number>-60</number>
|
||||||
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<number>60</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="pageStep">
|
<property name="pageStep">
|
||||||
<number>1</number>
|
<number>1</number>
|
||||||
@ -274,24 +359,33 @@
|
|||||||
<property name="value">
|
<property name="value">
|
||||||
<number>3</number>
|
<number>3</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="sliderPosition">
|
|
||||||
<number>3</number>
|
|
||||||
</property>
|
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Horizontal</enum>
|
<enum>Qt::Horizontal</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="invertedAppearance">
|
<property name="tickPosition">
|
||||||
<bool>true</bool>
|
<enum>QSlider::NoTicks</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="invertedControls">
|
<property name="tickInterval">
|
||||||
<bool>true</bool>
|
<number>5</number>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="spanText">
|
<widget class="QLabel" name="lowCutText">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>50</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>50</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>6.0k</string>
|
<string>0.3k</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="alignment">
|
<property name="alignment">
|
||||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||||
@ -522,85 +616,6 @@
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
|
||||||
<layout class="QHBoxLayout" name="lowCutLayout">
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="lowCutLabel">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>50</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>50</width>
|
|
||||||
<height>16777215</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Low cut</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="TickedSlider" name="lowCut">
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>16777215</width>
|
|
||||||
<height>16</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Highpass filter cutoff frequency (SSB)</string>
|
|
||||||
</property>
|
|
||||||
<property name="minimum">
|
|
||||||
<number>-60</number>
|
|
||||||
</property>
|
|
||||||
<property name="maximum">
|
|
||||||
<number>60</number>
|
|
||||||
</property>
|
|
||||||
<property name="pageStep">
|
|
||||||
<number>1</number>
|
|
||||||
</property>
|
|
||||||
<property name="value">
|
|
||||||
<number>3</number>
|
|
||||||
</property>
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="tickPosition">
|
|
||||||
<enum>QSlider::TicksAbove</enum>
|
|
||||||
</property>
|
|
||||||
<property name="tickInterval">
|
|
||||||
<number>5</number>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="lowCutText">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>50</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>50</width>
|
|
||||||
<height>16777215</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>0.3k</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="volumeLayout">
|
<layout class="QHBoxLayout" name="volumeLayout">
|
||||||
<item>
|
<item>
|
||||||
@ -1224,16 +1239,7 @@
|
|||||||
<property name="spacing">
|
<property name="spacing">
|
||||||
<number>2</number>
|
<number>2</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="leftMargin">
|
<property name="margin">
|
||||||
<number>3</number>
|
|
||||||
</property>
|
|
||||||
<property name="topMargin">
|
|
||||||
<number>3</number>
|
|
||||||
</property>
|
|
||||||
<property name="rightMargin">
|
|
||||||
<number>3</number>
|
|
||||||
</property>
|
|
||||||
<property name="bottomMargin">
|
|
||||||
<number>3</number>
|
<number>3</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
|
|
||||||
const PluginDescriptor SSBModPlugin::m_pluginDescriptor = {
|
const PluginDescriptor SSBModPlugin::m_pluginDescriptor = {
|
||||||
QString("SSB Modulator"),
|
QString("SSB Modulator"),
|
||||||
QString("3.14.2"),
|
QString("3.14.5"),
|
||||||
QString("(c) Edouard Griffiths, F4EXB"),
|
QString("(c) Edouard Griffiths, F4EXB"),
|
||||||
QString("https://github.com/f4exb/sdrangel"),
|
QString("https://github.com/f4exb/sdrangel"),
|
||||||
true,
|
true,
|
||||||
|
Loading…
Reference in New Issue
Block a user