8 #include "ui_nfmdemodgui.h" 87 qDebug(
"NFMDemodGUI::handleMessage: NFMDemod::MsgConfigureNFMDemod");
133 qDebug() <<
"NFMDemodGUI::on_rfBW_currentIndexChanged" << index;
143 ui->afBWText->setText(QString(
"%1 k").
arg(value));
150 ui->volumeText->setText(QString(
"%1").
arg(value / 10.0, 0,
'f', 1));
157 ui->squelchGateText->setText(QString(
"%1").
arg(value * 10.0f, 0,
'f', 0));
166 ui->squelchText->setText(QString(
"%1").
arg((-
ui->squelch->value()) / 1.0, 0,
'f', 0));
167 ui->squelchText->setToolTip(tr(
"Squelch AF balance threshold (%)"));
168 ui->squelch->setToolTip(tr(
"Squelch AF balance threshold (%)"));
172 ui->squelchText->setText(QString(
"%1").
arg(
ui->squelch->value() / 1.0, 0,
'f', 0));
173 ui->squelchText->setToolTip(tr(
"Squelch power threshold (dB)"));
174 ui->squelch->setToolTip(tr(
"Squelch power threshold (dB)"));
182 if (
ui->deltaSquelch->isChecked())
184 ui->squelchText->setText(QString(
"%1").
arg(-value / 1.0, 0,
'f', 0));
185 ui->squelchText->setToolTip(tr(
"Squelch AF balance threshold (%)"));
186 ui->squelch->setToolTip(tr(
"Squelch AF balance threshold (%)"));
190 ui->squelchText->setText(QString(
"%1").
arg(value / 1.0, 0,
'f', 0));
191 ui->squelchText->setToolTip(tr(
"Squelch power threshold (dB)"));
192 ui->squelch->setToolTip(tr(
"Squelch power threshold (dB)"));
275 setAttribute(Qt::WA_DeleteOnClose,
true);
278 connect(
this, SIGNAL(customContextMenuRequested(
const QPoint &)),
this, SLOT(
onMenuDialogCalled(
const QPoint &)));
286 connect(audioMuteRightClickEnabler, SIGNAL(rightClick(
const QPoint &)),
this, SLOT(
audioSelect()));
299 ui->ctcss->addItem(
"--");
301 for (
int i=0;
i<ctcss_nbTones;
i++)
303 ui->ctcss->addItem(QString(
"%1").
arg(ctcss_tones[
i]));
308 ui->audioMute->setStyleSheet(
"QToolButton { background:rgb(79,79,79); }");
310 ui->deltaFrequencyLabel->setText(QString(
"%1f").
arg(QChar(0x94, 0x03)));
312 ui->deltaFrequency->setValueRange(
false, 7, -9999999, 9999999);
332 QChar delta = QChar(0x94, 0x03);
333 ui->deltaSquelch->setText(delta);
352 qDebug() <<
"NFMDemodGUI::applySettings";
396 ui->squelchText->setToolTip(tr(
"Squelch AF balance threshold (%)"));
397 ui->squelch->setToolTip(tr(
"Squelch AF balance threshold (%)"));
402 ui->squelchText->setToolTip(tr(
"Squelch power threshold (dB)"));
403 ui->squelch->setToolTip(tr(
"Squelch power threshold (dB)"));
429 ui->ctcssText->setText(
"--");
433 ui->ctcssText->setText(QString(
"%1").
arg(ctcssFreq));
444 qDebug(
"NFMDemodGUI::audioSelect");
457 double magsqAvg, magsqPeak;
463 ui->channelPowerMeter->levelChanged(
464 (100.0f + powDbAvg) / 100.0f,
465 (100.0f + powDbPeak) / 100.0f,
469 ui->channelPower->setText(tr(
"%1 dB").
arg(powDbAvg, 0,
'f', 1));
477 ui->audioMute->setStyleSheet(
"QToolButton { background-color : green; }");
479 ui->audioMute->setStyleSheet(
"QToolButton { background:rgb(79,79,79); }");
static MainWindow * getInstance()
const QString & getReverseAPIAddress() const
uint16_t m_reverseAPIPort
void setCtcssFreq(Real ctcssFreq)
bool deserialize(const QByteArray &data)
void getMagSqLevels(double &avg, double &peak, int &nbSamples)
int getCenterFrequency() const
void on_highPassFilter_toggled(bool checked)
static int getFMDev(int index)
void push(Message *message, bool emitSignal=true)
Push message onto queue.
const Real * getCtcssToneSet(int &nbTones) const
void onMenuDialogCalled(const QPoint &p)
static double dbPower(double magsq, double floor=1e-12)
MessageQueue * getInputMessageQueue()
Get the queue for asynchronous inbound communication.
void blockApplySettings(bool block)
bool getSquelchOpen() const
static int getRFBW(int index)
void setChannelMarker(Serializable *channelMarker)
void on_deltaFrequency_changed(qint64 value)
void setReverseAPIChannelIndex(uint16_t channelIndex)
uint16_t getReverseAPIPort() const
void addChannelMarker(ChannelMarker *channelMarker)
Add channel marker to spectrum.
DeviceUISet * m_deviceUISet
static int getRFBWIndex(int rfbw)
void setName(const QString &name)
virtual MessageQueue * getInputMessageQueue()
void leaveEvent(QEvent *)
Fixed< IntType, IntBits > arg(const std::complex< Fixed< IntType, IntBits > > &val)
void setReverseAPIDeviceIndex(uint16_t deviceIndex)
uint16_t getReverseAPIDeviceIndex() const
NFMDemodGUI(PluginAPI *pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel, QWidget *parent=0)
QString m_reverseAPIAddress
void on_ctcssOn_toggled(bool checked)
Real getFrequency() const
static const QString m_channelIdURI
QByteArray serialize() const
void on_deltaSquelch_toggled(bool checked)
virtual void setMessageQueueToGUI(MessageQueue *queue)
static DSPEngine * instance()
void on_volume_valueChanged(int value)
void on_squelch_valueChanged(int value)
void setHighlighted(bool highlighted)
void channelMarkerHighlightedByCursor()
uint16_t m_reverseAPIChannelIndex
QString m_audioDeviceName
void channelMarkerChangedByCursor()
ChannelMarker m_channelMarker
void registerRxChannelInstance(const QString &channelName, PluginInstanceGUI *pluginGUI)
void onWidgetRolled(QWidget *widget, bool rollDown)
void addRollupWidget(QWidget *widget)
Add rollup widget to channel window.
static NFMDemodGUI * create(PluginAPI *pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel)
void removeRxChannelInstance(PluginInstanceGUI *pluginGUI)
const QString & getTitle() const
bool useReverseAPI() const
static bool match(const Message *message)
bool getHighlighted() const
void handleInputMessages()
NFMDemodSettings m_settings
void on_ctcss_currentIndexChanged(int index)
void on_squelchGate_valueChanged(int value)
bool deserialize(const QByteArray &data)
bool m_basicSettingsShown
QString m_audioDeviceName
uint16_t m_reverseAPIDeviceIndex
void enterEvent(QEvent *)
void setReverseAPIAddress(const QString &address)
void applySettings(bool force=false)
void setColor(const QColor &color)
void on_audioMute_toggled(bool checked)
virtual bool handleMessage(const Message &message)
void setVisible(bool visible)
virtual qint64 getCenterFrequency() const
void on_afBW_valueChanged(int value)
void setReverseAPIPort(uint16_t port)
uint16_t getReverseAPIChannelIndex() const
void setBandwidth(int bandwidth)
const QColor & getColor() const
void setTitle(const QString &title)
static const int m_nbRfBW
int32_t m_inputFrequencyOffset
void setCenterFrequency(int centerFrequency)
QByteArray serialize() const
void setUseReverseAPI(bool useReverseAPI)
virtual void setCenterFrequency(qint64 centerFrequency)
void on_rfBW_currentIndexChanged(int index)