mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-12 11:26:11 -05:00
NFM modulator: use ValueDialZ for channel delta frequency value dial
This commit is contained in:
parent
5c830f1028
commit
e23fa13d36
@ -211,25 +211,10 @@ void NFMModGUI::handleSourceMessages()
|
||||
}
|
||||
}
|
||||
|
||||
void NFMModGUI::on_deltaMinus_toggled(bool minus)
|
||||
void NFMModGUI::on_deltaFrequency_changed(qint64 value)
|
||||
{
|
||||
int deltaFrequency = m_channelMarker.getCenterFrequency();
|
||||
bool minusDelta = (deltaFrequency < 0);
|
||||
|
||||
if (minus ^ minusDelta) // sign change
|
||||
{
|
||||
m_channelMarker.setCenterFrequency(-deltaFrequency);
|
||||
}
|
||||
}
|
||||
|
||||
void NFMModGUI::on_deltaFrequency_changed(quint64 value)
|
||||
{
|
||||
if (ui->deltaMinus->isChecked()) {
|
||||
m_channelMarker.setCenterFrequency(-value);
|
||||
} else {
|
||||
m_channelMarker.setCenterFrequency(value);
|
||||
}
|
||||
}
|
||||
|
||||
void NFMModGUI::on_rfBW_currentIndexChanged(int index)
|
||||
{
|
||||
@ -410,7 +395,9 @@ NFMModGUI::NFMModGUI(PluginAPI* pluginAPI, DeviceSinkAPI *deviceAPI, QWidget* pa
|
||||
|
||||
connect(&m_pluginAPI->getMainWindow()->getMasterTimer(), SIGNAL(timeout()), this, SLOT(tick()));
|
||||
|
||||
ui->deltaFrequencyLabel->setText(QString("%1f").arg(QChar(0x94, 0x03)));
|
||||
ui->deltaFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold));
|
||||
ui->deltaFrequency->setValueRange(false, 7, -9999999, 9999999);
|
||||
|
||||
//m_channelMarker = new ChannelMarker(this);
|
||||
m_channelMarker.setColor(Qt::red);
|
||||
@ -468,8 +455,7 @@ void NFMModGUI::applySettings()
|
||||
48000,
|
||||
m_channelMarker.getCenterFrequency());
|
||||
|
||||
ui->deltaFrequency->setValue(abs(m_channelMarker.getCenterFrequency()));
|
||||
ui->deltaMinus->setChecked(m_channelMarker.getCenterFrequency() < 0);
|
||||
ui->deltaFrequency->setValue(m_channelMarker.getCenterFrequency());
|
||||
|
||||
m_nfmMod->configure(m_nfmMod->getInputMessageQueue(),
|
||||
m_rfBW[ui->rfBW->currentIndex()],
|
||||
|
@ -59,8 +59,7 @@ private slots:
|
||||
void viewChanged();
|
||||
void handleSourceMessages();
|
||||
|
||||
void on_deltaFrequency_changed(quint64 value);
|
||||
void on_deltaMinus_toggled(bool minus);
|
||||
void on_deltaFrequency_changed(qint64 value);
|
||||
void on_rfBW_currentIndexChanged(int index);
|
||||
void on_afBW_valueChanged(int value);
|
||||
void on_fmDev_valueChanged(int value);
|
||||
|
@ -76,26 +76,20 @@
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="deltaFrequencyLayout">
|
||||
<item>
|
||||
<widget class="QToolButton" name="deltaMinus">
|
||||
<property name="toolTip">
|
||||
<string>Frequency shift direction</string>
|
||||
<widget class="QLabel" name="deltaFrequencyLabel">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>16</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>...</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset>
|
||||
<selectedoff>:/plus.png</selectedoff>
|
||||
<selectedon>:/minus.png</selectedon>
|
||||
</iconset>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
<string>Df</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="ValueDial" name="deltaFrequency" native="true">
|
||||
<widget class="ValueDialZ" name="deltaFrequency" native="true">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Maximum" vsizetype="Maximum">
|
||||
<horstretch>0</horstretch>
|
||||
@ -750,12 +744,6 @@
|
||||
<header>gui/rollupwidget.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>ValueDial</class>
|
||||
<extends>QWidget</extends>
|
||||
<header>gui/valuedial.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>LevelMeterVU</class>
|
||||
<extends>QWidget</extends>
|
||||
@ -773,6 +761,12 @@
|
||||
<header>gui/cwkeyergui.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>ValueDialZ</class>
|
||||
<extends>QWidget</extends>
|
||||
<header>gui/valuedialz.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources>
|
||||
<include location="../../../sdrbase/resources/res.qrc"/>
|
||||
|
Loading…
Reference in New Issue
Block a user