mirror of https://github.com/f4exb/sdrangel.git
WFM modulator: applied new channel marker signal handling
This commit is contained in:
parent
2ef89f8765
commit
89f6fcb8b0
|
@ -110,8 +110,10 @@ bool WFMModGUI::handleMessage(const Message& message)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void WFMModGUI::channelMarkerChanged()
|
void WFMModGUI::channelMarkerChangedByCursor()
|
||||||
{
|
{
|
||||||
|
ui->deltaFrequency->setValue(m_channelMarker.getCenterFrequency());
|
||||||
|
m_settings.m_inputFrequencyOffset = m_channelMarker.getCenterFrequency();
|
||||||
applySettings();
|
applySettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -302,15 +304,22 @@ WFMModGUI::WFMModGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSam
|
||||||
ui->deltaFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold));
|
ui->deltaFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold));
|
||||||
ui->deltaFrequency->setValueRange(false, 7, -9999999, 9999999);
|
ui->deltaFrequency->setValueRange(false, 7, -9999999, 9999999);
|
||||||
|
|
||||||
|
m_channelMarker.blockSignals(true);
|
||||||
|
m_channelMarker.setColor(Qt::blue);
|
||||||
|
m_channelMarker.setBandwidth(125000);
|
||||||
|
m_channelMarker.setCenterFrequency(0);
|
||||||
m_channelMarker.setTitle("WFM Modulator");
|
m_channelMarker.setTitle("WFM Modulator");
|
||||||
m_channelMarker.setVisible(true);
|
m_channelMarker.setUDPAddress("127.0.0.1");
|
||||||
|
m_channelMarker.setUDPSendPort(9999);
|
||||||
connect(&m_channelMarker, SIGNAL(changed()), this, SLOT(channelMarkerChanged()));
|
m_channelMarker.blockSignals(false);
|
||||||
|
m_channelMarker.setVisible(true); // activate signal on the last setting only
|
||||||
|
|
||||||
m_deviceUISet->registerTxChannelInstance(WFMMod::m_channelID, this);
|
m_deviceUISet->registerTxChannelInstance(WFMMod::m_channelID, this);
|
||||||
m_deviceUISet->addChannelMarker(&m_channelMarker);
|
m_deviceUISet->addChannelMarker(&m_channelMarker);
|
||||||
m_deviceUISet->addRollupWidget(this);
|
m_deviceUISet->addRollupWidget(this);
|
||||||
|
|
||||||
|
connect(&m_channelMarker, SIGNAL(changedByCursor()), this, SLOT(channelMarkerChangedByCursor()));
|
||||||
|
|
||||||
ui->play->setEnabled(false);
|
ui->play->setEnabled(false);
|
||||||
ui->play->setChecked(false);
|
ui->play->setChecked(false);
|
||||||
ui->tone->setChecked(false);
|
ui->tone->setChecked(false);
|
||||||
|
@ -363,14 +372,16 @@ void WFMModGUI::displaySettings()
|
||||||
m_channelMarker.blockSignals(true);
|
m_channelMarker.blockSignals(true);
|
||||||
m_channelMarker.setCenterFrequency(m_settings.m_inputFrequencyOffset);
|
m_channelMarker.setCenterFrequency(m_settings.m_inputFrequencyOffset);
|
||||||
m_channelMarker.setBandwidth(m_settings.m_rfBandwidth);
|
m_channelMarker.setBandwidth(m_settings.m_rfBandwidth);
|
||||||
m_channelMarker.setColor(m_settings.m_rgbColor);
|
|
||||||
setTitleColor(m_settings.m_rgbColor);
|
|
||||||
m_channelMarker.blockSignals(false);
|
m_channelMarker.blockSignals(false);
|
||||||
|
m_channelMarker.setColor(m_settings.m_rgbColor); // activate signal on the last setting only
|
||||||
|
|
||||||
|
setTitleColor(m_settings.m_rgbColor);
|
||||||
setWindowTitle(m_channelMarker.getTitle());
|
setWindowTitle(m_channelMarker.getTitle());
|
||||||
|
|
||||||
blockApplySettings(true);
|
blockApplySettings(true);
|
||||||
|
|
||||||
|
ui->deltaFrequency->setValue(m_channelMarker.getCenterFrequency());
|
||||||
|
|
||||||
ui->rfBW->setCurrentIndex(WFMModSettings::getRFBWIndex(m_settings.m_rfBandwidth));
|
ui->rfBW->setCurrentIndex(WFMModSettings::getRFBWIndex(m_settings.m_rfBandwidth));
|
||||||
|
|
||||||
ui->afBWText->setText(QString("%1k").arg(m_settings.m_afBandwidth / 1000.0));
|
ui->afBWText->setText(QString("%1k").arg(m_settings.m_afBandwidth / 1000.0));
|
||||||
|
@ -393,16 +404,12 @@ void WFMModGUI::displaySettings()
|
||||||
|
|
||||||
void WFMModGUI::leaveEvent(QEvent*)
|
void WFMModGUI::leaveEvent(QEvent*)
|
||||||
{
|
{
|
||||||
blockApplySettings(true);
|
|
||||||
m_channelMarker.setHighlighted(false);
|
m_channelMarker.setHighlighted(false);
|
||||||
blockApplySettings(false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void WFMModGUI::enterEvent(QEvent*)
|
void WFMModGUI::enterEvent(QEvent*)
|
||||||
{
|
{
|
||||||
blockApplySettings(true);
|
|
||||||
m_channelMarker.setHighlighted(true);
|
m_channelMarker.setHighlighted(true);
|
||||||
blockApplySettings(false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void WFMModGUI::tick()
|
void WFMModGUI::tick()
|
||||||
|
|
|
@ -54,30 +54,8 @@ public:
|
||||||
virtual MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; }
|
virtual MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; }
|
||||||
virtual bool handleMessage(const Message& message);
|
virtual bool handleMessage(const Message& message);
|
||||||
|
|
||||||
private slots:
|
public slots:
|
||||||
void channelMarkerChanged();
|
void channelMarkerChangedByCursor();
|
||||||
void handleSourceMessages();
|
|
||||||
|
|
||||||
void on_deltaFrequency_changed(qint64 value);
|
|
||||||
void on_rfBW_currentIndexChanged(int index);
|
|
||||||
void on_afBW_valueChanged(int value);
|
|
||||||
void on_fmDev_valueChanged(int value);
|
|
||||||
void on_toneFrequency_valueChanged(int value);
|
|
||||||
void on_volume_valueChanged(int value);
|
|
||||||
void on_channelMute_toggled(bool checked);
|
|
||||||
void on_tone_toggled(bool checked);
|
|
||||||
void on_morseKeyer_toggled(bool checked);
|
|
||||||
void on_mic_toggled(bool checked);
|
|
||||||
void on_play_toggled(bool checked);
|
|
||||||
|
|
||||||
void on_playLoop_toggled(bool checked);
|
|
||||||
void on_navTimeSlider_valueChanged(int value);
|
|
||||||
void on_showFileDialog_clicked(bool checked);
|
|
||||||
|
|
||||||
void onWidgetRolled(QWidget* widget, bool rollDown);
|
|
||||||
|
|
||||||
void configureFileName();
|
|
||||||
void tick();
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::WFMModGUI* ui;
|
Ui::WFMModGUI* ui;
|
||||||
|
@ -121,6 +99,30 @@ private:
|
||||||
return (3*rfBW)/2;
|
return (3*rfBW)/2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private slots:
|
||||||
|
void handleSourceMessages();
|
||||||
|
|
||||||
|
void on_deltaFrequency_changed(qint64 value);
|
||||||
|
void on_rfBW_currentIndexChanged(int index);
|
||||||
|
void on_afBW_valueChanged(int value);
|
||||||
|
void on_fmDev_valueChanged(int value);
|
||||||
|
void on_toneFrequency_valueChanged(int value);
|
||||||
|
void on_volume_valueChanged(int value);
|
||||||
|
void on_channelMute_toggled(bool checked);
|
||||||
|
void on_tone_toggled(bool checked);
|
||||||
|
void on_morseKeyer_toggled(bool checked);
|
||||||
|
void on_mic_toggled(bool checked);
|
||||||
|
void on_play_toggled(bool checked);
|
||||||
|
|
||||||
|
void on_playLoop_toggled(bool checked);
|
||||||
|
void on_navTimeSlider_valueChanged(int value);
|
||||||
|
void on_showFileDialog_clicked(bool checked);
|
||||||
|
|
||||||
|
void onWidgetRolled(QWidget* widget, bool rollDown);
|
||||||
|
|
||||||
|
void configureFileName();
|
||||||
|
void tick();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* PLUGINS_CHANNELTX_MODWFM_WFMMODGUI_H_ */
|
#endif /* PLUGINS_CHANNELTX_MODWFM_WFMMODGUI_H_ */
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
|
|
||||||
const PluginDescriptor WFMModPlugin::m_pluginDescriptor = {
|
const PluginDescriptor WFMModPlugin::m_pluginDescriptor = {
|
||||||
QString("WFM Modulator"),
|
QString("WFM Modulator"),
|
||||||
QString("3.8.3"),
|
QString("3.8.4"),
|
||||||
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