SDRAngel  4.11.5
Developer docs for <a href="https://github.com/f4exb/sdrangel">SDRangel<\a>, an Open Source Qt5 / OpenGL 3.0+ SDR and signal analyzer frontend to various hardware.
Public Slots | Public Member Functions | Static Public Member Functions | Private Slots | Private Member Functions | Private Attributes | List of all members
DSDDemodGUI Class Reference

#include <dsddemodgui.h>

+ Inheritance diagram for DSDDemodGUI:
+ Collaboration diagram for DSDDemodGUI:

Public Slots

void channelMarkerChangedByCursor ()
 
void channelMarkerHighlightedByCursor ()
 

Public Member Functions

virtual void destroy ()
 
void setName (const QString &name)
 
QString getName () const
 
virtual qint64 getCenterFrequency () const
 
virtual void setCenterFrequency (qint64 centerFrequency)
 
void resetToDefaults ()
 
QByteArray serialize () const
 
bool deserialize (const QByteArray &data)
 
virtual MessageQueuegetInputMessageQueue ()
 
virtual bool handleMessage (const Message &message)
 
- Public Member Functions inherited from RollupWidget
 RollupWidget (QWidget *parent=NULL)
 
void setTitleColor (const QColor &c)
 
void setHighlighted (bool highlighted)
 
- Public Member Functions inherited from PluginInstanceGUI
 PluginInstanceGUI ()
 
virtual ~PluginInstanceGUI ()
 

Static Public Member Functions

static DSDDemodGUIcreate (PluginAPI *pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel)
 

Private Slots

void on_deltaFrequency_changed (qint64 value)
 
void on_rfBW_valueChanged (int index)
 
void on_demodGain_valueChanged (int value)
 
void on_volume_valueChanged (int value)
 
void on_baudRate_currentIndexChanged (int index)
 
void on_enableCosineFiltering_toggled (bool enable)
 
void on_syncOrConstellation_toggled (bool checked)
 
void on_traceLength_valueChanged (int value)
 
void on_traceStroke_valueChanged (int value)
 
void on_traceDecay_valueChanged (int value)
 
void on_slot1On_toggled (bool checked)
 
void on_slot2On_toggled (bool checked)
 
void on_tdmaStereoSplit_toggled (bool checked)
 
void on_fmDeviation_valueChanged (int value)
 
void on_squelchGate_valueChanged (int value)
 
void on_squelch_valueChanged (int value)
 
void on_highPassFilter_toggled (bool checked)
 
void on_audioMute_toggled (bool checked)
 
void on_symbolPLLLock_toggled (bool checked)
 
void onWidgetRolled (QWidget *widget, bool rollDown)
 
void onMenuDialogCalled (const QPoint &p)
 
void on_viewStatusLog_clicked ()
 
void handleInputMessages ()
 
void audioSelect ()
 
void tick ()
 

Private Member Functions

 DSDDemodGUI (PluginAPI *pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel, QWidget *parent=0)
 
virtual ~DSDDemodGUI ()
 
void blockApplySettings (bool block)
 
void applySettings (bool force=false)
 
void displaySettings ()
 
void updateMyPosition ()
 
void leaveEvent (QEvent *)
 
void enterEvent (QEvent *)
 

Private Attributes

Ui::DSDDemodGUI * ui
 
PluginAPIm_pluginAPI
 
DeviceUISetm_deviceUISet
 
ChannelMarker m_channelMarker
 
DSDDemodSettings m_settings
 
bool m_doApplySettings
 
ScopeVisXYm_scopeVisXY
 
DSDDemodm_dsdDemod
 
bool m_enableCosineFiltering
 
bool m_syncOrConstellation
 
bool m_slot1On
 
bool m_slot2On
 
bool m_tdmaStereo
 
bool m_audioMute
 
bool m_squelchOpen
 
uint32_t m_tickCount
 
float m_myLatitude
 
float m_myLongitude
 
MessageQueue m_inputMessageQueue
 
DSDStatusTextDialog m_dsdStatusTextDialog
 

Additional Inherited Members

- Signals inherited from RollupWidget
void widgetRolled (QWidget *widget, bool rollDown)
 
- Protected Types inherited from RollupWidget
enum  { VersionMarker = 0xff }
 
enum  ContextMenuType { ContextMenuNone, ContextMenuChannelSettings, ContextMenuStreamSettings }
 
- Protected Member Functions inherited from RollupWidget
int arrangeRollups ()
 
QByteArray saveState (int version=0) const
 
bool restoreState (const QByteArray &state, int version=0)
 
void paintEvent (QPaintEvent *)
 
int paintRollup (QWidget *rollup, int pos, QPainter *p, bool last, const QColor &frame)
 
void resizeEvent (QResizeEvent *size)
 
void mousePressEvent (QMouseEvent *event)
 
bool event (QEvent *event)
 
bool eventFilter (QObject *object, QEvent *event)
 
void resetContextMenuType ()
 
void setStreamIndicator (const QString &indicator)
 
- Protected Attributes inherited from RollupWidget
QColor m_titleColor
 
QColor m_titleTextColor
 
bool m_highlighted
 
ContextMenuType m_contextMenuType
 
QString m_streamIndicator
 

Detailed Description

Definition at line 45 of file dsddemodgui.h.

Constructor & Destructor Documentation

◆ DSDDemodGUI()

DSDDemodGUI::DSDDemodGUI ( PluginAPI pluginAPI,
DeviceUISet deviceUISet,
BasebandSampleSink rxChannel,
QWidget *  parent = 0 
)
explicitprivate

Definition at line 311 of file dsddemodgui.cpp.

References DeviceUISet::addChannelMarker(), ScopeVisXY::addGraticulePoint(), DeviceUISet::addRollupWidget(), applySettings(), arg(), audioSelect(), ScopeVisXY::calculateGraticule(), channelMarkerChangedByCursor(), channelMarkerHighlightedByCursor(), LevelMeterSignalDB::ColorGreenAndBlue, displaySettings(), getInputMessageQueue(), MainWindow::getInstance(), ColorMapper::GrayGold, handleInputMessages(), DSDDemod::m_channelIdURI, m_channelMarker, m_deviceUISet, m_dsdDemod, m_scopeVisXY, m_settings, onMenuDialogCalled(), onWidgetRolled(), DeviceUISet::registerRxChannelInstance(), ChannelMarker::setBandwidth(), ChannelMarker::setCenterFrequency(), DSDDemodSettings::setChannelMarker(), ChannelMarker::setColor(), ScopeVisXY::setGridRGB(), BasebandSampleSink::setMessageQueueToGUI(), ScopeVisXY::setPixelsPerFrame(), ScopeVisXY::setPlotRGB(), ScopeVisXY::setScale(), DSDDemod::setScopeXYSink(), ChannelMarker::setTitle(), ChannelMarker::setVisible(), tick(), ui, updateMyPosition(), and RollupWidget::widgetRolled().

Referenced by create().

311  :
312  RollupWidget(parent),
313  ui(new Ui::DSDDemodGUI),
314  m_pluginAPI(pluginAPI),
315  m_deviceUISet(deviceUISet),
316  m_channelMarker(this),
317  m_doApplySettings(true),
319  m_syncOrConstellation(false),
320  m_slot1On(false),
321  m_slot2On(false),
322  m_tdmaStereo(false),
323  m_squelchOpen(false),
324  m_tickCount(0),
326 {
327  ui->setupUi(this);
328  ui->screenTV->setColor(true);
329  ui->screenTV->resizeTVScreen(200,200);
330  setAttribute(Qt::WA_DeleteOnClose, true);
331 
332  connect(this, SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool)));
333  connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(onMenuDialogCalled(const QPoint &)));
334  connect(getInputMessageQueue(), SIGNAL(messageEnqueued()), this, SLOT(handleInputMessages()));
335 
336  CRightClickEnabler *audioMuteRightClickEnabler = new CRightClickEnabler(ui->audioMute);
337  connect(audioMuteRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(audioSelect()));
338 
339  m_scopeVisXY = new ScopeVisXY(ui->screenTV);
340  m_scopeVisXY->setScale(2.0);
342  m_scopeVisXY->setPlotRGB(qRgb(0, 220, 250));
343  m_scopeVisXY->setGridRGB(qRgb(255, 255, 128));
344 
345  for (float x = -0.84; x < 1.0; x += 0.56)
346  {
347  for (float y = -0.84; y < 1.0; y += 0.56)
348  {
349  m_scopeVisXY->addGraticulePoint(std::complex<float>(x, y));
350  }
351  }
352 
354 
355  m_dsdDemod = (DSDDemod*) rxChannel; //new DSDDemod(m_deviceUISet->m_deviceSourceAPI);
358 
359  connect(&MainWindow::getInstance()->getMasterTimer(), SIGNAL(timeout()), this, SLOT(tick()));
360 
361  ui->audioMute->setStyleSheet("QToolButton { background:rgb(79,79,79); }");
362 
363  ui->deltaFrequencyLabel->setText(QString("%1f").arg(QChar(0x94, 0x03)));
364  ui->deltaFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold));
365  ui->deltaFrequency->setValueRange(false, 7, -9999999, 9999999);
366  ui->channelPowerMeter->setColorTheme(LevelMeterSignalDB::ColorGreenAndBlue);
367 
368  m_channelMarker.blockSignals(true);
369  m_channelMarker.setColor(Qt::cyan);
372  m_channelMarker.setTitle("DSD Demodulator");
373  m_channelMarker.blockSignals(false);
374  m_channelMarker.setVisible(true); // activate signal on the last setting only
375 
379 
380  connect(&m_channelMarker, SIGNAL(changedByCursor()), this, SLOT(channelMarkerChangedByCursor()));
381  connect(&m_channelMarker, SIGNAL(highlightedByCursor()), this, SLOT(channelMarkerHighlightedByCursor()));
382 
384 
386  displaySettings();
387  applySettings(true);
388 }
static MainWindow * getInstance()
Definition: mainwindow.h:73
bool m_enableCosineFiltering
Definition: dsddemodgui.h:87
void setChannelMarker(Serializable *channelMarker)
static const QString m_channelIdURI
Definition: dsddemod.h:167
void onMenuDialogCalled(const QPoint &p)
bool m_syncOrConstellation
Definition: dsddemodgui.h:88
void channelMarkerHighlightedByCursor()
Ui::DSDDemodGUI * ui
Definition: dsddemodgui.h:77
DSDDemodSettings m_settings
Definition: dsddemodgui.h:81
void addChannelMarker(ChannelMarker *channelMarker)
Add channel marker to spectrum.
Definition: deviceuiset.cpp:72
void setScopeXYSink(BasebandSampleSink *sampleSink)
Definition: dsddemod.h:102
void onWidgetRolled(QWidget *widget, bool rollDown)
Fixed< IntType, IntBits > arg(const std::complex< Fixed< IntType, IntBits > > &val)
Definition: fixed.h:2401
void channelMarkerChangedByCursor()
bool m_squelchOpen
Definition: dsddemodgui.h:93
RollupWidget(QWidget *parent=NULL)
Definition: rollupwidget.cpp:7
virtual void setMessageQueueToGUI(MessageQueue *queue)
void setPixelsPerFrame(int pixelsPerFrame)
Definition: scopevisxy.cpp:46
void registerRxChannelInstance(const QString &channelName, PluginInstanceGUI *pluginGUI)
Definition: deviceuiset.cpp:82
void updateMyPosition()
void addRollupWidget(QWidget *widget)
Add rollup widget to channel window.
Definition: deviceuiset.cpp:77
DeviceUISet * m_deviceUISet
Definition: dsddemodgui.h:79
ChannelMarker m_channelMarker
Definition: dsddemodgui.h:80
void setColor(const QColor &color)
bool m_tdmaStereo
Definition: dsddemodgui.h:91
void applySettings(bool force=false)
void setVisible(bool visible)
DSDDemod * m_dsdDemod
Definition: dsddemodgui.h:86
void displaySettings()
void setBandwidth(int bandwidth)
void setScale(float scale)
Definition: scopevisxy.h:42
void setTitle(const QString &title)
bool m_doApplySettings
Definition: dsddemodgui.h:82
virtual MessageQueue * getInputMessageQueue()
Definition: dsddemodgui.h:60
void setCenterFrequency(int centerFrequency)
void addGraticulePoint(const std::complex< float > &z)
Definition: scopevisxy.cpp:111
PluginAPI * m_pluginAPI
Definition: dsddemodgui.h:78
bool m_slot2On
Definition: dsddemodgui.h:90
void audioSelect()
void widgetRolled(QWidget *widget, bool rollDown)
uint32_t m_tickCount
Definition: dsddemodgui.h:94
void calculateGraticule(int rows, int cols)
Definition: scopevisxy.cpp:119
void handleInputMessages()
void setGridRGB(const QRgb &gridRGB)
Definition: scopevisxy.h:48
DSDStatusTextDialog m_dsdStatusTextDialog
Definition: dsddemodgui.h:101
bool m_slot1On
Definition: dsddemodgui.h:89
void setPlotRGB(const QRgb &plotRGB)
Definition: scopevisxy.h:47
ScopeVisXY * m_scopeVisXY
Definition: dsddemodgui.h:84
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ~DSDDemodGUI()

DSDDemodGUI::~DSDDemodGUI ( )
privatevirtual

Definition at line 390 of file dsddemodgui.cpp.

References m_deviceUISet, m_dsdDemod, m_scopeVisXY, DeviceUISet::removeRxChannelInstance(), and ui.

391 {
393  delete m_dsdDemod; // TODO: check this: when the GUI closes it has to delete the demodulator
394  delete m_scopeVisXY;
395  delete ui;
396 }
Ui::DSDDemodGUI * ui
Definition: dsddemodgui.h:77
void removeRxChannelInstance(PluginInstanceGUI *pluginGUI)
Definition: deviceuiset.cpp:94
DeviceUISet * m_deviceUISet
Definition: dsddemodgui.h:79
DSDDemod * m_dsdDemod
Definition: dsddemodgui.h:86
ScopeVisXY * m_scopeVisXY
Definition: dsddemodgui.h:84
+ Here is the call graph for this function:

Member Function Documentation

◆ applySettings()

void DSDDemodGUI::applySettings ( bool  force = false)
private

Definition at line 471 of file dsddemodgui.cpp.

References DSDDemod::MsgConfigureDSDDemod::create(), DSDDemod::MsgConfigureChannelizer::create(), ChannelMarker::getCenterFrequency(), BasebandSampleSink::getInputMessageQueue(), m_channelMarker, m_doApplySettings, m_dsdDemod, m_settings, and MessageQueue::push().

Referenced by audioSelect(), channelMarkerChangedByCursor(), deserialize(), DSDDemodGUI(), on_audioMute_toggled(), on_baudRate_currentIndexChanged(), on_deltaFrequency_changed(), on_demodGain_valueChanged(), on_enableCosineFiltering_toggled(), on_fmDeviation_valueChanged(), on_highPassFilter_toggled(), on_rfBW_valueChanged(), on_slot1On_toggled(), on_slot2On_toggled(), on_squelch_valueChanged(), on_squelchGate_valueChanged(), on_symbolPLLLock_toggled(), on_syncOrConstellation_toggled(), on_tdmaStereoSplit_toggled(), on_volume_valueChanged(), onMenuDialogCalled(), resetToDefaults(), and setCenterFrequency().

472 {
473  if (m_doApplySettings)
474  {
475  qDebug() << "DSDDemodGUI::applySettings";
476 
479  m_dsdDemod->getInputMessageQueue()->push(channelConfigMsg);
480 
482  m_dsdDemod->getInputMessageQueue()->push(message);
483  }
484 }
int getCenterFrequency() const
Definition: channelmarker.h:42
void push(Message *message, bool emitSignal=true)
Push message onto queue.
MessageQueue * getInputMessageQueue()
Get the queue for asynchronous inbound communication.
DSDDemodSettings m_settings
Definition: dsddemodgui.h:81
ChannelMarker m_channelMarker
Definition: dsddemodgui.h:80
DSDDemod * m_dsdDemod
Definition: dsddemodgui.h:86
static MsgConfigureChannelizer * create(int sampleRate, int centerFrequency)
Definition: dsddemod.h:83
bool m_doApplySettings
Definition: dsddemodgui.h:82
static MsgConfigureDSDDemod * create(const DSDDemodSettings &settings, bool force)
Definition: dsddemod.h:60
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ audioSelect

void DSDDemodGUI::audioSelect ( )
privateslot

Definition at line 513 of file dsddemodgui.cpp.

References applySettings(), DSPEngine::instance(), AudioSelectDialog::m_audioDeviceName, DSDDemodSettings::m_audioDeviceName, AudioSelectDialog::m_selected, and m_settings.

Referenced by DSDDemodGUI().

514 {
515  qDebug("DSDDemodGUI::audioSelect");
517  audioSelect.exec();
518 
519  if (audioSelect.m_selected)
520  {
521  m_settings.m_audioDeviceName = audioSelect.m_audioDeviceName;
522  applySettings();
523  }
524 }
DSDDemodSettings m_settings
Definition: dsddemodgui.h:81
static DSPEngine * instance()
Definition: dspengine.cpp:51
void applySettings(bool force=false)
void audioSelect()
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ blockApplySettings()

void DSDDemodGUI::blockApplySettings ( bool  block)
private

Definition at line 496 of file dsddemodgui.cpp.

References m_doApplySettings.

Referenced by displaySettings(), handleMessage(), and resetToDefaults().

497 {
498  m_doApplySettings = !block;
499 }
bool m_doApplySettings
Definition: dsddemodgui.h:82
+ Here is the caller graph for this function:

◆ channelMarkerChangedByCursor

void DSDDemodGUI::channelMarkerChangedByCursor ( )
slot

Definition at line 501 of file dsddemodgui.cpp.

References applySettings(), ChannelMarker::getCenterFrequency(), m_channelMarker, DSDDemodSettings::m_inputFrequencyOffset, m_settings, and ui.

Referenced by DSDDemodGUI().

502 {
503  ui->deltaFrequency->setValue(m_channelMarker.getCenterFrequency());
505  applySettings();
506 }
int getCenterFrequency() const
Definition: channelmarker.h:42
Ui::DSDDemodGUI * ui
Definition: dsddemodgui.h:77
DSDDemodSettings m_settings
Definition: dsddemodgui.h:81
qint64 m_inputFrequencyOffset
ChannelMarker m_channelMarker
Definition: dsddemodgui.h:80
void applySettings(bool force=false)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ channelMarkerHighlightedByCursor

void DSDDemodGUI::channelMarkerHighlightedByCursor ( )
slot

Definition at line 508 of file dsddemodgui.cpp.

References ChannelMarker::getHighlighted(), m_channelMarker, and RollupWidget::setHighlighted().

Referenced by DSDDemodGUI().

509 {
511 }
bool getHighlighted() const
Definition: channelmarker.h:61
ChannelMarker m_channelMarker
Definition: dsddemodgui.h:80
void setHighlighted(bool highlighted)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ create()

DSDDemodGUI * DSDDemodGUI::create ( PluginAPI pluginAPI,
DeviceUISet deviceUISet,
BasebandSampleSink rxChannel 
)
static

Definition at line 45 of file dsddemodgui.cpp.

References DSDDemodGUI().

Referenced by DSDDemodPlugin::createRxChannelGUI().

46 {
47  DSDDemodGUI* gui = new DSDDemodGUI(pluginAPI, deviceUISet, rxChannel);
48  return gui;
49 }
DSDDemodGUI(PluginAPI *pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel, QWidget *parent=0)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ deserialize()

bool DSDDemodGUI::deserialize ( const QByteArray &  data)
virtual

Implements PluginInstanceGUI.

Definition at line 91 of file dsddemodgui.cpp.

References applySettings(), DSDDemodSettings::deserialize(), displaySettings(), m_settings, and resetToDefaults().

92 {
93  if (m_settings.deserialize(data))
94  {
96  applySettings(true);
97  return true;
98  }
99  else
100  {
101  resetToDefaults();
102  return false;
103  }
104 }
void resetToDefaults()
Definition: dsddemodgui.cpp:77
DSDDemodSettings m_settings
Definition: dsddemodgui.h:81
bool deserialize(const QByteArray &data)
void applySettings(bool force=false)
void displaySettings()
+ Here is the call graph for this function:

◆ destroy()

void DSDDemodGUI::destroy ( )
virtual

Implements PluginInstanceGUI.

Definition at line 51 of file dsddemodgui.cpp.

52 {
53  delete this;
54 }

◆ displaySettings()

void DSDDemodGUI::displaySettings ( )
private

Definition at line 411 of file dsddemodgui.cpp.

References arg(), blockApplySettings(), ChannelMarker::getCenterFrequency(), DSDDemodBaudRates::getRateIndex(), ChannelMarker::getTitle(), DSDDemodSettings::m_audioMute, DSDDemodSettings::m_baudRate, m_channelMarker, DSDDemodSettings::m_demodGain, DSDDemodSettings::m_enableCosineFiltering, DSDDemodSettings::m_fmDeviation, DSDDemodSettings::m_highPassFilter, DSDDemodSettings::m_inputFrequencyOffset, DSDDemodSettings::m_pllLock, DSDDemodSettings::m_rfBandwidth, DSDDemodSettings::m_rgbColor, m_scopeVisXY, m_settings, DSDDemodSettings::m_slot1On, DSDDemodSettings::m_slot2On, DSDDemodSettings::m_squelch, DSDDemodSettings::m_squelchGate, DSDDemodSettings::m_syncOrConstellation, DSDDemodSettings::m_tdmaStereo, DSDDemodSettings::m_title, DSDDemodSettings::m_traceDecay, DSDDemodSettings::m_traceLengthMutliplier, DSDDemodSettings::m_traceStroke, DSDDemodSettings::m_volume, ChannelMarker::setCenterFrequency(), ChannelMarker::setColor(), ScopeVisXY::setDecay(), ScopeVisXY::setPixelsPerFrame(), ScopeVisXY::setStroke(), ChannelMarker::setTitle(), RollupWidget::setTitleColor(), and ui.

Referenced by deserialize(), DSDDemodGUI(), handleMessage(), and resetToDefaults().

412 {
413  m_channelMarker.blockSignals(true);
417  m_channelMarker.blockSignals(false);
418  setTitleColor(m_settings.m_rgbColor); // activate signal on the last setting only
419 
421  setWindowTitle(m_channelMarker.getTitle());
422 
423  blockApplySettings(true);
424 
425  ui->deltaFrequency->setValue(m_channelMarker.getCenterFrequency());
426 
427  ui->rfBW->setValue(m_settings.m_rfBandwidth / 100.0);
428  ui->rfBWText->setText(QString("%1k").arg(ui->rfBW->value() / 10.0, 0, 'f', 1));
429 
430  ui->fmDeviation->setValue(m_settings.m_fmDeviation / 100.0);
431  ui->fmDeviationText->setText(QString("%1%2k").arg(QChar(0xB1, 0x00)).arg(ui->fmDeviation->value() / 10.0, 0, 'f', 1));
432 
433  ui->squelch->setValue(m_settings.m_squelch);
434  ui->squelchText->setText(QString("%1").arg(ui->squelch->value() / 1.0, 0, 'f', 0));
435 
436  ui->squelchGate->setValue(m_settings.m_squelchGate);
437  ui->squelchGateText->setText(QString("%1").arg(ui->squelchGate->value() * 10.0, 0, 'f', 0));
438 
439  ui->demodGain->setValue(m_settings.m_demodGain * 100.0);
440  ui->demodGainText->setText(QString("%1").arg(ui->demodGain->value() / 100.0, 0, 'f', 2));
441 
442  ui->volume->setValue(m_settings.m_volume * 10.0);
443  ui->volumeText->setText(QString("%1").arg(ui->volume->value() / 10.0, 0, 'f', 1));
444 
445  ui->enableCosineFiltering->setChecked(m_settings.m_enableCosineFiltering);
446  ui->syncOrConstellation->setChecked(m_settings.m_syncOrConstellation);
447  ui->slot1On->setChecked(m_settings.m_slot1On);
448  ui->slot2On->setChecked(m_settings.m_slot2On);
449  ui->tdmaStereoSplit->setChecked(m_settings.m_tdmaStereo);
450  ui->audioMute->setChecked(m_settings.m_audioMute);
451  ui->symbolPLLLock->setChecked(m_settings.m_pllLock);
452  ui->highPassFilter->setChecked(m_settings.m_highPassFilter);
453 
454  ui->baudRate->setCurrentIndex(DSDDemodBaudRates::getRateIndex(m_settings.m_baudRate));
455 
456  ui->traceLength->setValue(m_settings.m_traceLengthMutliplier);
457  ui->traceLengthText->setText(QString("%1").arg(m_settings.m_traceLengthMutliplier*50));
458  m_scopeVisXY->setPixelsPerFrame(m_settings.m_traceLengthMutliplier*960); // 48000 / 50. Chunks of 50 ms.
459 
460  ui->traceStroke->setValue(m_settings.m_traceStroke);
461  ui->traceStrokeText->setText(QString("%1").arg(m_settings.m_traceStroke));
463 
464  ui->traceDecay->setValue(m_settings.m_traceDecay);
465  ui->traceDecayText->setText(QString("%1").arg(m_settings.m_traceDecay));
467 
468  blockApplySettings(false);
469 }
int getCenterFrequency() const
Definition: channelmarker.h:42
static unsigned int getRateIndex(unsigned int rate)
Ui::DSDDemodGUI * ui
Definition: dsddemodgui.h:77
DSDDemodSettings m_settings
Definition: dsddemodgui.h:81
qint64 m_inputFrequencyOffset
Fixed< IntType, IntBits > arg(const std::complex< Fixed< IntType, IntBits > > &val)
Definition: fixed.h:2401
void setStroke(int stroke)
Definition: scopevisxy.h:43
void blockApplySettings(bool block)
void setTitleColor(const QColor &c)
void setPixelsPerFrame(int pixelsPerFrame)
Definition: scopevisxy.cpp:46
const QString & getTitle() const
Definition: channelmarker.h:38
ChannelMarker m_channelMarker
Definition: dsddemodgui.h:80
void setColor(const QColor &color)
void setDecay(int decay)
Definition: scopevisxy.h:44
void setTitle(const QString &title)
void setCenterFrequency(int centerFrequency)
ScopeVisXY * m_scopeVisXY
Definition: dsddemodgui.h:84
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ enterEvent()

void DSDDemodGUI::enterEvent ( QEvent *  )
private

Definition at line 491 of file dsddemodgui.cpp.

References m_channelMarker, and ChannelMarker::setHighlighted().

492 {
494 }
void setHighlighted(bool highlighted)
ChannelMarker m_channelMarker
Definition: dsddemodgui.h:80
+ Here is the call graph for this function:

◆ getCenterFrequency()

qint64 DSDDemodGUI::getCenterFrequency ( ) const
virtual

Implements PluginInstanceGUI.

Definition at line 66 of file dsddemodgui.cpp.

References ChannelMarker::getCenterFrequency(), and m_channelMarker.

67 {
69 }
int getCenterFrequency() const
Definition: channelmarker.h:42
ChannelMarker m_channelMarker
Definition: dsddemodgui.h:80
+ Here is the call graph for this function:

◆ getInputMessageQueue()

virtual MessageQueue* DSDDemodGUI::getInputMessageQueue ( )
inlinevirtual

Implements PluginInstanceGUI.

Definition at line 60 of file dsddemodgui.h.

Referenced by DSDDemodGUI(), and handleInputMessages().

60 { return &m_inputMessageQueue; }
MessageQueue m_inputMessageQueue
Definition: dsddemodgui.h:99
+ Here is the caller graph for this function:

◆ getName()

QString DSDDemodGUI::getName ( ) const
virtual

Implements PluginInstanceGUI.

Definition at line 61 of file dsddemodgui.cpp.

62 {
63  return objectName();
64 }

◆ handleInputMessages

void DSDDemodGUI::handleInputMessages ( )
privateslot

Definition at line 124 of file dsddemodgui.cpp.

References getInputMessageQueue(), and handleMessage().

Referenced by DSDDemodGUI().

125 {
126  Message* message;
127 
128  while ((message = getInputMessageQueue()->pop()) != 0)
129  {
130  if (handleMessage(*message))
131  {
132  delete message;
133  }
134  }
135 }
virtual bool handleMessage(const Message &message)
virtual MessageQueue * getInputMessageQueue()
Definition: dsddemodgui.h:60
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ handleMessage()

bool DSDDemodGUI::handleMessage ( const Message message)
virtual

Implements PluginInstanceGUI.

Definition at line 106 of file dsddemodgui.cpp.

References blockApplySettings(), displaySettings(), DSDDemod::MsgConfigureDSDDemod::getSettings(), m_settings, and Message::match().

Referenced by handleInputMessages().

107 {
109  {
110  qDebug("DSDDemodGUI::handleMessage: DSDDemod::MsgConfigureDSDDemod");
112  m_settings = cfg.getSettings();
113  blockApplySettings(true);
114  displaySettings();
115  blockApplySettings(false);
116  return true;
117  }
118  else
119  {
120  return false;
121  }
122 }
DSDDemodSettings m_settings
Definition: dsddemodgui.h:81
void blockApplySettings(bool block)
static bool match(const Message *message)
Definition: message.cpp:45
const DSDDemodSettings & getSettings() const
Definition: dsddemod.h:57
void displaySettings()
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ leaveEvent()

void DSDDemodGUI::leaveEvent ( QEvent *  )
private

Definition at line 486 of file dsddemodgui.cpp.

References m_channelMarker, and ChannelMarker::setHighlighted().

487 {
489 }
void setHighlighted(bool highlighted)
ChannelMarker m_channelMarker
Definition: dsddemodgui.h:80
+ Here is the call graph for this function:

◆ on_audioMute_toggled

void DSDDemodGUI::on_audioMute_toggled ( bool  checked)
privateslot

Definition at line 244 of file dsddemodgui.cpp.

References applySettings(), DSDDemodSettings::m_audioMute, and m_settings.

245 {
246  m_settings.m_audioMute = checked;
247  applySettings();
248 }
DSDDemodSettings m_settings
Definition: dsddemodgui.h:81
void applySettings(bool force=false)
+ Here is the call graph for this function:

◆ on_baudRate_currentIndexChanged

void DSDDemodGUI::on_baudRate_currentIndexChanged ( int  index)
privateslot

Definition at line 173 of file dsddemodgui.cpp.

References applySettings(), DSDDemodBaudRates::getRate(), DSDDemodSettings::m_baudRate, and m_settings.

174 {
176  applySettings();
177 }
DSDDemodSettings m_settings
Definition: dsddemodgui.h:81
void applySettings(bool force=false)
static unsigned int getRate(unsigned int rate_index)
+ Here is the call graph for this function:

◆ on_deltaFrequency_changed

void DSDDemodGUI::on_deltaFrequency_changed ( qint64  value)
privateslot

Definition at line 137 of file dsddemodgui.cpp.

References applySettings(), ChannelMarker::getCenterFrequency(), m_channelMarker, DSDDemodSettings::m_inputFrequencyOffset, m_settings, and ChannelMarker::setCenterFrequency().

138 {
141  applySettings();
142 }
int getCenterFrequency() const
Definition: channelmarker.h:42
DSDDemodSettings m_settings
Definition: dsddemodgui.h:81
qint64 m_inputFrequencyOffset
ChannelMarker m_channelMarker
Definition: dsddemodgui.h:80
void applySettings(bool force=false)
void setCenterFrequency(int centerFrequency)
+ Here is the call graph for this function:

◆ on_demodGain_valueChanged

void DSDDemodGUI::on_demodGain_valueChanged ( int  value)
privateslot

Definition at line 152 of file dsddemodgui.cpp.

References applySettings(), arg(), DSDDemodSettings::m_demodGain, m_settings, and ui.

153 {
154  m_settings.m_demodGain = value / 100.0;
155  ui->demodGainText->setText(QString("%1").arg(value / 100.0, 0, 'f', 2));
156  applySettings();
157 }
Ui::DSDDemodGUI * ui
Definition: dsddemodgui.h:77
DSDDemodSettings m_settings
Definition: dsddemodgui.h:81
Fixed< IntType, IntBits > arg(const std::complex< Fixed< IntType, IntBits > > &val)
Definition: fixed.h:2401
void applySettings(bool force=false)
+ Here is the call graph for this function:

◆ on_enableCosineFiltering_toggled

void DSDDemodGUI::on_enableCosineFiltering_toggled ( bool  enable)
privateslot

Definition at line 179 of file dsddemodgui.cpp.

References applySettings(), DSDDemodSettings::m_enableCosineFiltering, and m_settings.

180 {
182  applySettings();
183 }
DSDDemodSettings m_settings
Definition: dsddemodgui.h:81
void applySettings(bool force=false)
+ Here is the call graph for this function:

◆ on_fmDeviation_valueChanged

void DSDDemodGUI::on_fmDeviation_valueChanged ( int  value)
privateslot

Definition at line 159 of file dsddemodgui.cpp.

References applySettings(), arg(), DSDDemodSettings::m_fmDeviation, m_settings, and ui.

160 {
161  m_settings.m_fmDeviation = value * 100.0;
162  ui->fmDeviationText->setText(QString("%1%2k").arg(QChar(0xB1, 0x00)).arg(value / 10.0, 0, 'f', 1));
163  applySettings();
164 }
Ui::DSDDemodGUI * ui
Definition: dsddemodgui.h:77
DSDDemodSettings m_settings
Definition: dsddemodgui.h:81
Fixed< IntType, IntBits > arg(const std::complex< Fixed< IntType, IntBits > > &val)
Definition: fixed.h:2401
void applySettings(bool force=false)
+ Here is the call graph for this function:

◆ on_highPassFilter_toggled

void DSDDemodGUI::on_highPassFilter_toggled ( bool  checked)
privateslot

Definition at line 250 of file dsddemodgui.cpp.

References applySettings(), DSDDemodSettings::m_highPassFilter, and m_settings.

251 {
252  m_settings.m_highPassFilter = checked;
253  applySettings();
254 }
DSDDemodSettings m_settings
Definition: dsddemodgui.h:81
void applySettings(bool force=false)
+ Here is the call graph for this function:

◆ on_rfBW_valueChanged

void DSDDemodGUI::on_rfBW_valueChanged ( int  index)
privateslot

Definition at line 144 of file dsddemodgui.cpp.

References applySettings(), arg(), m_channelMarker, DSDDemodSettings::m_rfBandwidth, m_settings, ChannelMarker::setBandwidth(), and ui.

145 {
146  m_channelMarker.setBandwidth(value * 100);
147  m_settings.m_rfBandwidth = value * 100.0;
148  ui->rfBWText->setText(QString("%1k").arg(value / 10.0, 0, 'f', 1));
149  applySettings();
150 }
Ui::DSDDemodGUI * ui
Definition: dsddemodgui.h:77
DSDDemodSettings m_settings
Definition: dsddemodgui.h:81
Fixed< IntType, IntBits > arg(const std::complex< Fixed< IntType, IntBits > > &val)
Definition: fixed.h:2401
ChannelMarker m_channelMarker
Definition: dsddemodgui.h:80
void applySettings(bool force=false)
void setBandwidth(int bandwidth)
+ Here is the call graph for this function:

◆ on_slot1On_toggled

void DSDDemodGUI::on_slot1On_toggled ( bool  checked)
privateslot

Definition at line 212 of file dsddemodgui.cpp.

References applySettings(), m_settings, and DSDDemodSettings::m_slot1On.

213 {
214  m_settings.m_slot1On = checked;
215  applySettings();
216 }
DSDDemodSettings m_settings
Definition: dsddemodgui.h:81
void applySettings(bool force=false)
+ Here is the call graph for this function:

◆ on_slot2On_toggled

void DSDDemodGUI::on_slot2On_toggled ( bool  checked)
privateslot

Definition at line 218 of file dsddemodgui.cpp.

References applySettings(), m_settings, and DSDDemodSettings::m_slot2On.

219 {
220  m_settings.m_slot2On = checked;
221  applySettings();
222 }
DSDDemodSettings m_settings
Definition: dsddemodgui.h:81
void applySettings(bool force=false)
+ Here is the call graph for this function:

◆ on_squelch_valueChanged

void DSDDemodGUI::on_squelch_valueChanged ( int  value)
privateslot

Definition at line 237 of file dsddemodgui.cpp.

References applySettings(), arg(), m_settings, DSDDemodSettings::m_squelch, and ui.

238 {
239  ui->squelchText->setText(QString("%1").arg(value / 1.0, 0, 'f', 0));
240  m_settings.m_squelch = value;
241  applySettings();
242 }
Ui::DSDDemodGUI * ui
Definition: dsddemodgui.h:77
DSDDemodSettings m_settings
Definition: dsddemodgui.h:81
Fixed< IntType, IntBits > arg(const std::complex< Fixed< IntType, IntBits > > &val)
Definition: fixed.h:2401
void applySettings(bool force=false)
+ Here is the call graph for this function:

◆ on_squelchGate_valueChanged

void DSDDemodGUI::on_squelchGate_valueChanged ( int  value)
privateslot

Definition at line 230 of file dsddemodgui.cpp.

References applySettings(), arg(), m_settings, DSDDemodSettings::m_squelchGate, and ui.

231 {
232  m_settings.m_squelchGate = value;
233  ui->squelchGateText->setText(QString("%1").arg(value * 10.0, 0, 'f', 0));
234  applySettings();
235 }
Ui::DSDDemodGUI * ui
Definition: dsddemodgui.h:77
DSDDemodSettings m_settings
Definition: dsddemodgui.h:81
Fixed< IntType, IntBits > arg(const std::complex< Fixed< IntType, IntBits > > &val)
Definition: fixed.h:2401
void applySettings(bool force=false)
+ Here is the call graph for this function:

◆ on_symbolPLLLock_toggled

void DSDDemodGUI::on_symbolPLLLock_toggled ( bool  checked)
privateslot

Definition at line 256 of file dsddemodgui.cpp.

References applySettings(), DSDDemodSettings::m_pllLock, m_settings, and ui.

257 {
258  if (checked) {
259  ui->symbolPLLLock->setStyleSheet("QToolButton { background:rgb(79,79,79); }");
260  } else {
261  ui->symbolPLLLock->setStyleSheet("QToolButton { background:rgb(53,53,53); }");
262  }
263  m_settings.m_pllLock = checked;
264  applySettings();
265 }
Ui::DSDDemodGUI * ui
Definition: dsddemodgui.h:77
DSDDemodSettings m_settings
Definition: dsddemodgui.h:81
void applySettings(bool force=false)
+ Here is the call graph for this function:

◆ on_syncOrConstellation_toggled

void DSDDemodGUI::on_syncOrConstellation_toggled ( bool  checked)
privateslot

Definition at line 185 of file dsddemodgui.cpp.

References applySettings(), m_settings, and DSDDemodSettings::m_syncOrConstellation.

186 {
188  applySettings();
189 }
DSDDemodSettings m_settings
Definition: dsddemodgui.h:81
void applySettings(bool force=false)
+ Here is the call graph for this function:

◆ on_tdmaStereoSplit_toggled

void DSDDemodGUI::on_tdmaStereoSplit_toggled ( bool  checked)
privateslot

Definition at line 224 of file dsddemodgui.cpp.

References applySettings(), m_settings, and DSDDemodSettings::m_tdmaStereo.

225 {
226  m_settings.m_tdmaStereo = checked;
227  applySettings();
228 }
DSDDemodSettings m_settings
Definition: dsddemodgui.h:81
void applySettings(bool force=false)
+ Here is the call graph for this function:

◆ on_traceDecay_valueChanged

void DSDDemodGUI::on_traceDecay_valueChanged ( int  value)
privateslot

Definition at line 205 of file dsddemodgui.cpp.

References arg(), m_scopeVisXY, m_settings, DSDDemodSettings::m_traceDecay, ScopeVisXY::setDecay(), and ui.

206 {
207  m_settings.m_traceDecay = value;
208  ui->traceDecayText->setText(QString("%1").arg(m_settings.m_traceDecay));
210 }
Ui::DSDDemodGUI * ui
Definition: dsddemodgui.h:77
DSDDemodSettings m_settings
Definition: dsddemodgui.h:81
Fixed< IntType, IntBits > arg(const std::complex< Fixed< IntType, IntBits > > &val)
Definition: fixed.h:2401
void setDecay(int decay)
Definition: scopevisxy.h:44
ScopeVisXY * m_scopeVisXY
Definition: dsddemodgui.h:84
+ Here is the call graph for this function:

◆ on_traceLength_valueChanged

void DSDDemodGUI::on_traceLength_valueChanged ( int  value)
privateslot

Definition at line 191 of file dsddemodgui.cpp.

References arg(), m_scopeVisXY, m_settings, DSDDemodSettings::m_traceLengthMutliplier, ScopeVisXY::setPixelsPerFrame(), and ui.

192 {
194  ui->traceLengthText->setText(QString("%1").arg(m_settings.m_traceLengthMutliplier*50));
195  m_scopeVisXY->setPixelsPerFrame(m_settings.m_traceLengthMutliplier*960); // 48000 / 50. Chunks of 50 ms.
196 }
Ui::DSDDemodGUI * ui
Definition: dsddemodgui.h:77
DSDDemodSettings m_settings
Definition: dsddemodgui.h:81
Fixed< IntType, IntBits > arg(const std::complex< Fixed< IntType, IntBits > > &val)
Definition: fixed.h:2401
void setPixelsPerFrame(int pixelsPerFrame)
Definition: scopevisxy.cpp:46
ScopeVisXY * m_scopeVisXY
Definition: dsddemodgui.h:84
+ Here is the call graph for this function:

◆ on_traceStroke_valueChanged

void DSDDemodGUI::on_traceStroke_valueChanged ( int  value)
privateslot

Definition at line 198 of file dsddemodgui.cpp.

References arg(), m_scopeVisXY, m_settings, DSDDemodSettings::m_traceStroke, ScopeVisXY::setStroke(), and ui.

199 {
200  m_settings.m_traceStroke = value;
201  ui->traceStrokeText->setText(QString("%1").arg(m_settings.m_traceStroke));
203 }
Ui::DSDDemodGUI * ui
Definition: dsddemodgui.h:77
DSDDemodSettings m_settings
Definition: dsddemodgui.h:81
Fixed< IntType, IntBits > arg(const std::complex< Fixed< IntType, IntBits > > &val)
Definition: fixed.h:2401
void setStroke(int stroke)
Definition: scopevisxy.h:43
ScopeVisXY * m_scopeVisXY
Definition: dsddemodgui.h:84
+ Here is the call graph for this function:

◆ on_viewStatusLog_clicked

void DSDDemodGUI::on_viewStatusLog_clicked ( )
privateslot

Definition at line 305 of file dsddemodgui.cpp.

References m_dsdStatusTextDialog.

306 {
307  qDebug("DSDDemodGUI::on_viewStatusLog_clicked");
308  m_dsdStatusTextDialog.exec();
309 }
DSDStatusTextDialog m_dsdStatusTextDialog
Definition: dsddemodgui.h:101

◆ on_volume_valueChanged

void DSDDemodGUI::on_volume_valueChanged ( int  value)
privateslot

Definition at line 166 of file dsddemodgui.cpp.

References applySettings(), arg(), m_settings, DSDDemodSettings::m_volume, and ui.

167 {
168  m_settings.m_volume= value / 10.0;
169  ui->volumeText->setText(QString("%1").arg(value / 10.0, 0, 'f', 1));
170  applySettings();
171 }
Ui::DSDDemodGUI * ui
Definition: dsddemodgui.h:77
DSDDemodSettings m_settings
Definition: dsddemodgui.h:81
Fixed< IntType, IntBits > arg(const std::complex< Fixed< IntType, IntBits > > &val)
Definition: fixed.h:2401
void applySettings(bool force=false)
+ Here is the call graph for this function:

◆ onMenuDialogCalled

void DSDDemodGUI::onMenuDialogCalled ( const QPoint &  p)
privateslot

Definition at line 273 of file dsddemodgui.cpp.

References applySettings(), RollupWidget::ContextMenuChannelSettings, ChannelMarker::getCenterFrequency(), ChannelMarker::getColor(), BasicChannelSettingsDialog::getReverseAPIAddress(), BasicChannelSettingsDialog::getReverseAPIChannelIndex(), BasicChannelSettingsDialog::getReverseAPIDeviceIndex(), BasicChannelSettingsDialog::getReverseAPIPort(), ChannelMarker::getTitle(), m_channelMarker, RollupWidget::m_contextMenuType, DSDDemodSettings::m_inputFrequencyOffset, DSDDemodSettings::m_reverseAPIAddress, DSDDemodSettings::m_reverseAPIChannelIndex, DSDDemodSettings::m_reverseAPIDeviceIndex, DSDDemodSettings::m_reverseAPIPort, DSDDemodSettings::m_rgbColor, m_settings, DSDDemodSettings::m_title, DSDDemodSettings::m_useReverseAPI, RollupWidget::resetContextMenuType(), BasicChannelSettingsDialog::setReverseAPIAddress(), BasicChannelSettingsDialog::setReverseAPIChannelIndex(), BasicChannelSettingsDialog::setReverseAPIDeviceIndex(), BasicChannelSettingsDialog::setReverseAPIPort(), RollupWidget::setTitleColor(), BasicChannelSettingsDialog::setUseReverseAPI(), and BasicChannelSettingsDialog::useReverseAPI().

Referenced by DSDDemodGUI().

274 {
276  {
278  dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
279  dialog.setReverseAPIAddress(m_settings.m_reverseAPIAddress);
280  dialog.setReverseAPIPort(m_settings.m_reverseAPIPort);
281  dialog.setReverseAPIDeviceIndex(m_settings.m_reverseAPIDeviceIndex);
282  dialog.setReverseAPIChannelIndex(m_settings.m_reverseAPIChannelIndex);
283 
284  dialog.move(p);
285  dialog.exec();
286 
290  m_settings.m_useReverseAPI = dialog.useReverseAPI();
291  m_settings.m_reverseAPIAddress = dialog.getReverseAPIAddress();
292  m_settings.m_reverseAPIPort = dialog.getReverseAPIPort();
293  m_settings.m_reverseAPIDeviceIndex = dialog.getReverseAPIDeviceIndex();
294  m_settings.m_reverseAPIChannelIndex = dialog.getReverseAPIChannelIndex();
295 
296  setWindowTitle(m_settings.m_title);
298 
299  applySettings();
300  }
301 
303 }
int getCenterFrequency() const
Definition: channelmarker.h:42
DSDDemodSettings m_settings
Definition: dsddemodgui.h:81
void resetContextMenuType()
Definition: rollupwidget.h:50
qint64 m_inputFrequencyOffset
ContextMenuType m_contextMenuType
Definition: rollupwidget.h:33
uint16_t m_reverseAPIDeviceIndex
void setTitleColor(const QColor &c)
uint16_t m_reverseAPIPort
const QString & getTitle() const
Definition: channelmarker.h:38
ChannelMarker m_channelMarker
Definition: dsddemodgui.h:80
void applySettings(bool force=false)
uint16_t m_reverseAPIChannelIndex
const QColor & getColor() const
Definition: channelmarker.h:64
QString m_reverseAPIAddress
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ onWidgetRolled

void DSDDemodGUI::onWidgetRolled ( QWidget *  widget,
bool  rollDown 
)
privateslot

Definition at line 267 of file dsddemodgui.cpp.

Referenced by DSDDemodGUI().

268 {
269  (void) widget;
270  (void) rollDown;
271 }
+ Here is the caller graph for this function:

◆ resetToDefaults()

void DSDDemodGUI::resetToDefaults ( )
virtual

Implements PluginInstanceGUI.

Definition at line 77 of file dsddemodgui.cpp.

References applySettings(), blockApplySettings(), displaySettings(), m_settings, and DSDDemodSettings::resetToDefaults().

Referenced by deserialize().

78 {
80  blockApplySettings(true);
82  blockApplySettings(false);
83  applySettings();
84 }
DSDDemodSettings m_settings
Definition: dsddemodgui.h:81
void blockApplySettings(bool block)
void applySettings(bool force=false)
void displaySettings()
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ serialize()

QByteArray DSDDemodGUI::serialize ( ) const
virtual

Implements PluginInstanceGUI.

Definition at line 86 of file dsddemodgui.cpp.

References m_settings, and DSDDemodSettings::serialize().

87 {
88  return m_settings.serialize();
89 }
QByteArray serialize() const
DSDDemodSettings m_settings
Definition: dsddemodgui.h:81
+ Here is the call graph for this function:

◆ setCenterFrequency()

void DSDDemodGUI::setCenterFrequency ( qint64  centerFrequency)
virtual

Implements PluginInstanceGUI.

Definition at line 71 of file dsddemodgui.cpp.

References applySettings(), m_channelMarker, and ChannelMarker::setCenterFrequency().

72 {
73  m_channelMarker.setCenterFrequency(centerFrequency);
74  applySettings();
75 }
ChannelMarker m_channelMarker
Definition: dsddemodgui.h:80
void applySettings(bool force=false)
void setCenterFrequency(int centerFrequency)
+ Here is the call graph for this function:

◆ setName()

void DSDDemodGUI::setName ( const QString &  name)
virtual

Implements PluginInstanceGUI.

Definition at line 56 of file dsddemodgui.cpp.

57 {
58  setObjectName(name);
59 }

◆ tick

void DSDDemodGUI::tick ( )
privateslot

Definition at line 526 of file dsddemodgui.cpp.

References DSDStatusTextDialog::addLine(), arg(), CalcDb::dbPower(), DSDDecoder::getCarrierPos(), DSDDemod::getDecoder(), DSDDecoder::getFrameTypeText(), DSDDecoder::getInLevel(), DSDDemod::getMagSqLevels(), DSDDemod::getSquelchOpen(), DSDDecoder::getSymbolPLLLocked(), DSDDecoder::getSymbolSyncQuality(), DSDDecoder::getVoice1On(), DSDDecoder::getVoice2On(), DSDDecoder::getZeroCrossingPos(), m_dsdDemod, m_dsdStatusTextDialog, m_squelchOpen, m_tickCount, ui, and DSDDemod::updateAndGetStatusText().

Referenced by DSDDemodGUI().

527 {
528  double magsqAvg, magsqPeak;
529  int nbMagsqSamples;
530  m_dsdDemod->getMagSqLevels(magsqAvg, magsqPeak, nbMagsqSamples);
531  double powDbAvg = CalcDb::dbPower(magsqAvg);
532  double powDbPeak = CalcDb::dbPower(magsqPeak);
533 
534  ui->channelPowerMeter->levelChanged(
535  (100.0f + powDbAvg) / 100.0f,
536  (100.0f + powDbPeak) / 100.0f,
537  nbMagsqSamples);
538 
539  if (m_tickCount % 4 == 0) {
540  ui->channelPower->setText(tr("%1 dB").arg(powDbAvg, 0, 'f', 1));
541  }
542 
543  bool squelchOpen = m_dsdDemod->getSquelchOpen();
544 
545  if (squelchOpen != m_squelchOpen)
546  {
547  if (squelchOpen) {
548  ui->audioMute->setStyleSheet("QToolButton { background-color : green; }");
549  } else {
550  ui->audioMute->setStyleSheet("QToolButton { background:rgb(79,79,79); }");
551  }
552 
553  m_squelchOpen = squelchOpen;
554  }
555 
556  // "slow" updates
557 
558  if (m_tickCount % 10 == 0)
559  {
560  ui->inLevelText->setText(QString::number(m_dsdDemod->getDecoder().getInLevel()));
561  ui->inCarrierPosText->setText(QString::number(m_dsdDemod->getDecoder().getCarrierPos()));
562  ui->zcPosText->setText(QString::number(m_dsdDemod->getDecoder().getZeroCrossingPos()));
563  ui->symbolSyncQualityText->setText(QString::number(m_dsdDemod->getDecoder().getSymbolSyncQuality()));
564 
565  if (m_dsdDemod->getDecoder().getVoice1On()) {
566  ui->slot1On->setStyleSheet("QToolButton { background-color : green; }");
567  } else {
568  ui->slot1On->setStyleSheet("QToolButton { background-color : rgb(79,79,79); }");
569  }
570 
571  if (m_dsdDemod->getDecoder().getVoice2On()) {
572  ui->slot2On->setStyleSheet("QToolButton { background-color : green; }");
573  } else {
574  ui->slot2On->setStyleSheet("QToolButton { background-color : rgb(79,79,79); }");
575  }
576 
577  const char *frameTypeText = m_dsdDemod->getDecoder().getFrameTypeText();
578 
579  if (frameTypeText[0] == '\0') {
580  ui->syncText->setStyleSheet("QLabel { background:rgb(53,53,53); }"); // turn off background
581  } else {
582  ui->syncText->setStyleSheet("QLabel { background:rgb(37,53,39); }"); // turn on background
583  }
584 
585  ui->syncText->setText(QString(frameTypeText));
586 
587  const char *formatStatusText = m_dsdDemod->updateAndGetStatusText();
588  ui->formatStatusText->setText(QString(formatStatusText));
589 
590  if (ui->activateStatusLog->isChecked()) {
591  m_dsdStatusTextDialog.addLine(QString(formatStatusText));
592  }
593 
594  if (formatStatusText[0] == '\0') {
595  ui->formatStatusText->setStyleSheet("QLabel { background:rgb(53,53,53); }"); // turn off background
596  } else {
597  ui->formatStatusText->setStyleSheet("QLabel { background:rgb(37,53,39); }"); // turn on background
598  }
599 
600  if (m_squelchOpen && ui->symbolPLLLock->isChecked() && m_dsdDemod->getDecoder().getSymbolPLLLocked()) {
601  ui->symbolPLLLock->setStyleSheet("QToolButton { background-color : green; }");
602  } else {
603  ui->symbolPLLLock->setStyleSheet("QToolButton { background:rgb(79,79,79); }");
604  }
605  }
606 
607  m_tickCount++;
608 }
void getMagSqLevels(double &avg, double &peak, int &nbSamples)
Definition: dsddemod.h:133
static double dbPower(double magsq, double floor=1e-12)
Definition: db.cpp:22
Ui::DSDDemodGUI * ui
Definition: dsddemodgui.h:77
int getCarrierPos() const
Definition: dsddecoder.h:57
int getSymbolSyncQuality() const
Definition: dsddecoder.h:59
const char * getFrameTypeText() const
Definition: dsddecoder.h:64
Fixed< IntType, IntBits > arg(const std::complex< Fixed< IntType, IntBits > > &val)
Definition: fixed.h:2401
bool m_squelchOpen
Definition: dsddemodgui.h:93
bool getSquelchOpen() const
Definition: dsddemod.h:129
int getZeroCrossingPos() const
Definition: dsddecoder.h:58
bool getVoice2On() const
Definition: dsddecoder.h:50
bool getSymbolPLLLocked() const
Definition: dsddecoder.h:52
const char * updateAndGetStatusText()
Definition: dsddemod.cpp:641
bool getVoice1On() const
Definition: dsddecoder.h:49
DSDDemod * m_dsdDemod
Definition: dsddemodgui.h:86
int getInLevel() const
Definition: dsddecoder.h:56
void addLine(const QString &line)
const DSDDecoder & getDecoder() const
Definition: dsddemod.h:131
uint32_t m_tickCount
Definition: dsddemodgui.h:94
DSDStatusTextDialog m_dsdStatusTextDialog
Definition: dsddemodgui.h:101
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateMyPosition()

void DSDDemodGUI::updateMyPosition ( )
private

Definition at line 398 of file dsddemodgui.cpp.

References DSDDemod::configureMyPosition(), BasebandSampleSink::getInputMessageQueue(), MainWindow::getInstance(), MainSettings::getLatitude(), MainSettings::getLongitude(), MainWindow::getMainSettings(), m_dsdDemod, m_myLatitude, and m_myLongitude.

Referenced by DSDDemodGUI().

399 {
400  float latitude = MainWindow::getInstance()->getMainSettings().getLatitude();
401  float longitude = MainWindow::getInstance()->getMainSettings().getLongitude();
402 
403  if ((m_myLatitude != latitude) || (m_myLongitude != longitude))
404  {
406  m_myLatitude = latitude;
407  m_myLongitude = longitude;
408  }
409 }
float getLatitude() const
Definition: mainsettings.h:55
static MainWindow * getInstance()
Definition: mainwindow.h:73
float m_myLatitude
Definition: dsddemodgui.h:96
MessageQueue * getInputMessageQueue()
Get the queue for asynchronous inbound communication.
float m_myLongitude
Definition: dsddemodgui.h:97
const MainSettings & getMainSettings() const
Definition: mainwindow.h:83
float getLongitude() const
Definition: mainsettings.h:56
void configureMyPosition(MessageQueue *messageQueue, float myLatitude, float myLongitude)
Definition: dsddemod.cpp:119
DSDDemod * m_dsdDemod
Definition: dsddemodgui.h:86
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ m_audioMute

bool DSDDemodGUI::m_audioMute
private

Definition at line 92 of file dsddemodgui.h.

◆ m_channelMarker

ChannelMarker DSDDemodGUI::m_channelMarker
private

◆ m_deviceUISet

DeviceUISet* DSDDemodGUI::m_deviceUISet
private

Definition at line 79 of file dsddemodgui.h.

Referenced by DSDDemodGUI(), and ~DSDDemodGUI().

◆ m_doApplySettings

bool DSDDemodGUI::m_doApplySettings
private

Definition at line 82 of file dsddemodgui.h.

Referenced by applySettings(), and blockApplySettings().

◆ m_dsdDemod

DSDDemod* DSDDemodGUI::m_dsdDemod
private

Definition at line 86 of file dsddemodgui.h.

Referenced by applySettings(), DSDDemodGUI(), tick(), updateMyPosition(), and ~DSDDemodGUI().

◆ m_dsdStatusTextDialog

DSDStatusTextDialog DSDDemodGUI::m_dsdStatusTextDialog
private

Definition at line 101 of file dsddemodgui.h.

Referenced by on_viewStatusLog_clicked(), and tick().

◆ m_enableCosineFiltering

bool DSDDemodGUI::m_enableCosineFiltering
private

Definition at line 87 of file dsddemodgui.h.

◆ m_inputMessageQueue

MessageQueue DSDDemodGUI::m_inputMessageQueue
private

Definition at line 99 of file dsddemodgui.h.

◆ m_myLatitude

float DSDDemodGUI::m_myLatitude
private

Definition at line 96 of file dsddemodgui.h.

Referenced by updateMyPosition().

◆ m_myLongitude

float DSDDemodGUI::m_myLongitude
private

Definition at line 97 of file dsddemodgui.h.

Referenced by updateMyPosition().

◆ m_pluginAPI

PluginAPI* DSDDemodGUI::m_pluginAPI
private

Definition at line 78 of file dsddemodgui.h.

◆ m_scopeVisXY

ScopeVisXY* DSDDemodGUI::m_scopeVisXY
private

◆ m_settings

DSDDemodSettings DSDDemodGUI::m_settings
private

◆ m_slot1On

bool DSDDemodGUI::m_slot1On
private

Definition at line 89 of file dsddemodgui.h.

◆ m_slot2On

bool DSDDemodGUI::m_slot2On
private

Definition at line 90 of file dsddemodgui.h.

◆ m_squelchOpen

bool DSDDemodGUI::m_squelchOpen
private

Definition at line 93 of file dsddemodgui.h.

Referenced by tick().

◆ m_syncOrConstellation

bool DSDDemodGUI::m_syncOrConstellation
private

Definition at line 88 of file dsddemodgui.h.

◆ m_tdmaStereo

bool DSDDemodGUI::m_tdmaStereo
private

Definition at line 91 of file dsddemodgui.h.

◆ m_tickCount

uint32_t DSDDemodGUI::m_tickCount
private

Definition at line 94 of file dsddemodgui.h.

Referenced by tick().

◆ ui

Ui::DSDDemodGUI* DSDDemodGUI::ui
private

The documentation for this class was generated from the following files: