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