36 #include "ui_freedvdemodgui.h" 103 qDebug(
"FreeDVDemodGUI::handleMessage: FreeDVDemodGUI::MsgConfigureFreeDVDemod");
173 ui->volumeText->setText(QString(
"%1").
arg(value / 10.0, 0,
'f', 1));
180 ui->volumeInText->setText(QString(
"%1").
arg(value / 10.0, 0,
'f', 1));
200 if ((value < 0) || (value > 4)) {
259 setAttribute(Qt::WA_DeleteOnClose,
true);
261 connect(
this, SIGNAL(customContextMenuRequested(
const QPoint &)),
this, SLOT(
onMenuDialogCalled(
const QPoint &)));
272 ui->glSpectrum->setDisplayWaterfall(
true);
273 ui->glSpectrum->setDisplayMaxHold(
true);
274 ui->glSpectrum->setSsbSpectrum(
true);
280 connect(audioMuteRightClickEnabler, SIGNAL(rightClick(
const QPoint &)),
this, SLOT(
audioSelect()));
282 ui->deltaFrequencyLabel->setText(QString(
"%1f").
arg(QChar(0x94, 0x03)));
284 ui->deltaFrequency->setValueRange(
false, 7, -9999999, 9999999);
287 ui->snrMeter->setRange(-10, 30);
288 ui->snrMeter->setAverageSmoothing(2);
302 connect(
m_freeDVDemod, SIGNAL(levelInChanged(qreal, qreal,
int)),
ui->volumeInMeter, SLOT(levelChanged(qreal, qreal,
int)));
306 m_iconDSBUSB.addPixmap(QPixmap(
"://dsb.png"), QIcon::Normal, QIcon::On);
307 m_iconDSBUSB.addPixmap(QPixmap(
"://usb.png"), QIcon::Normal, QIcon::Off);
308 m_iconDSBLSB.addPixmap(QPixmap(
"://dsb.png"), QIcon::Normal, QIcon::On);
309 m_iconDSBLSB.addPixmap(QPixmap(
"://lsb.png"), QIcon::Normal, QIcon::Off);
355 qDebug() <<
"FreeDVDemodGUI::displayBandwidths:" 356 <<
" spanLog2: " << spanLog2
358 <<
" bwMax: " << bwMax;
360 QString spanStr = QString::number(bwMax/10.0,
'f', 1);
362 ui->spanText->setText(tr(
"%1k").
arg(spanStr));
365 ui->glSpectrum->setSsbSpectrum(
true);
366 ui->glSpectrum->setLsbDisplay(
false);
391 ui->spanLog2->blockSignals(
true);
394 ui->spanLog2->blockSignals(
false);
417 qDebug(
"FreeDVDemodGUI::audioSelect");
430 double magsqAvg, magsqPeak;
436 ui->channelPowerMeter->levelChanged(
441 double snrAvg, snrPeak;
445 ui->snrMeter->levelChanged(
446 (10.0f + snrAvg) / 40.0f,
447 (10.0f + snrPeak) / 40.0f,
453 int freqOffsetInt = freqOffset < -999 ? -999 : freqOffset > 999 ? 999 : freqOffset;
454 ui->freqOffset->setText(tr(
"%1Hz").
arg(freqOffsetInt));
457 ui->syncLabel->setStyleSheet(
"QLabel { background-color : green; }");
459 ui->syncLabel->setStyleSheet(
"QLabel { background:rgb(79,79,79); }");
463 ui->channelPower->setText(tr(
"%1 dB").
arg(powDbAvg, 0,
'f', 1));
464 ui->snrText->setText(tr(
"%1 dB").
arg(snrAvg < -90 ? -90 : snrAvg > 90 ? 90 : snrAvg, 0,
'f', 1));
472 ui->audioMute->setStyleSheet(
"QToolButton { background-color : green; }");
474 ui->audioMute->setStyleSheet(
"QToolButton { background:rgb(79,79,79); }");
void on_freeDVMode_currentIndexChanged(int index)
void setChannelMarker(Serializable *channelMarker)
static MainWindow * getInstance()
const QString & getReverseAPIAddress() const
static MsgResyncFreeDVDemod * create()
void on_volume_valueChanged(int value)
void getSNRLevels(double &avg, double &peak, int &nbSamples)
int getCenterFrequency() const
float getFrequencyOffset() const
void setLowCutoff(int lowCutoff)
void push(Message *message, bool emitSignal=true)
Push message onto queue.
static double dbPower(double magsq, double floor=1e-12)
bool getAudioActive() const
MessageQueue * getInputMessageQueue()
Get the queue for asynchronous inbound communication.
uint16_t m_reverseAPIDeviceIndex
SpectrumVis * m_spectrumVis
DeviceUISet * m_deviceUISet
virtual MessageQueue * getInputMessageQueue()
static const QString m_channelIdURI
void applyBandwidths(int spanLog2, bool force=false)
void on_agc_toggled(bool checked)
void setReverseAPIChannelIndex(uint16_t channelIndex)
uint16_t getReverseAPIPort() const
void addChannelMarker(ChannelMarker *channelMarker)
Add channel marker to spectrum.
void on_spanLog2_valueChanged(int value)
void getMagSqLevels(double &avg, double &peak, int &nbSamples)
bool deserialize(const QByteArray &data)
Fixed< IntType, IntBits > arg(const std::complex< Fixed< IntType, IntBits > > &val)
void onMenuDialogCalled(const QPoint &p)
void setReverseAPIDeviceIndex(uint16_t deviceIndex)
bool blockApplySettings(bool block)
uint16_t getReverseAPIDeviceIndex() const
QString m_reverseAPIAddress
void displayBandwidths(int spanLog2)
virtual bool handleMessage(const Message &message)
virtual ~FreeDVDemodGUI()
void enterEvent(QEvent *)
void setSpectrumGUI(Serializable *spectrumGUI)
virtual void setMessageQueueToGUI(MessageQueue *queue)
uint32_t getModemSampleRate() const
static DSPEngine * instance()
void setHighlighted(bool highlighted)
void registerRxChannelInstance(const QString &channelName, PluginInstanceGUI *pluginGUI)
void channelMarkerHighlightedByCursor()
QByteArray serialize() const
QString m_audioDeviceName
void addRollupWidget(QWidget *widget)
Add rollup widget to channel window.
bool deserialize(const QByteArray &data)
void removeRxChannelInstance(PluginInstanceGUI *pluginGUI)
const QString & getTitle() const
static const float m_mminPowerThresholdDBf
virtual qint64 getCenterFrequency() const
bool useReverseAPI() const
static bool match(const Message *message)
bool getHighlighted() const
uint16_t m_reverseAPIPort
void on_audioMute_toggled(bool checked)
void setSampleSink(BasebandSampleSink *sampleSink)
void handleInputMessages()
void onWidgetRolled(QWidget *widget, bool rollDown)
QString m_audioDeviceName
void setName(const QString &name)
uint32_t getAudioSampleRate() const
void setReverseAPIAddress(const QString &address)
void applySettings(bool force=false)
FreeDVDemodSettings m_settings
FreeDVDemodGUI(PluginAPI *pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel, QWidget *parent=0)
void setColor(const QColor &color)
void setVisible(bool visible)
virtual void setCenterFrequency(qint64 centerFrequency)
void setReverseAPIPort(uint16_t port)
QByteArray serialize() const
uint16_t m_reverseAPIChannelIndex
qint32 m_inputFrequencyOffset
uint16_t getReverseAPIChannelIndex() const
void setBandwidth(int bandwidth)
const QColor & getColor() const
void setTitle(const QString &title)
void on_reSync_clicked(bool checked)
ChannelMarker m_channelMarker
void channelMarkerChangedByCursor()
static FreeDVDemodGUI * create(PluginAPI *pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel)
void setCenterFrequency(int centerFrequency)
void setSidebands(sidebands_t sidebands)
static int getHiCutoff(FreeDVMode freeDVMode)
FreeDVDemod * m_freeDVDemod
void on_deltaFrequency_changed(qint64 value)
void setUseReverseAPI(bool useReverseAPI)
static int getLowCutoff(FreeDVMode freeDVMode)
void leaveEvent(QEvent *)
void on_volumeIn_valueChanged(int value)