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 | Static Private Member Functions | Private Attributes | List of all members
WFMModGUI Class Reference

#include <wfmmodgui.h>

+ Inheritance diagram for WFMModGUI:
+ Collaboration diagram for WFMModGUI:

Public Slots

void channelMarkerChangedByCursor ()
 

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 WFMModGUIcreate (PluginAPI *pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSource *channelTx)
 

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 onMenuDialogCalled (const QPoint &p)
 
void configureFileName ()
 
void audioSelect ()
 
void tick ()
 

Private Member Functions

 WFMModGUI (PluginAPI *pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSource *channelTx, QWidget *parent=0)
 
virtual ~WFMModGUI ()
 
void blockApplySettings (bool block)
 
void applySettings (bool force=false)
 
void displaySettings ()
 
void updateWithStreamData ()
 
void updateWithStreamTime ()
 
void leaveEvent (QEvent *)
 
void enterEvent (QEvent *)
 

Static Private Member Functions

static int requiredBW (int rfBW)
 

Private Attributes

Ui::WFMModGUI * ui
 
PluginAPIm_pluginAPI
 
DeviceUISetm_deviceUISet
 
ChannelMarker m_channelMarker
 
WFMModSettings m_settings
 
bool m_doApplySettings
 
WFMModm_wfmMod
 
MovingAverageUtil< double, double, 20 > m_channelPowerDbAvg
 
QString m_fileName
 
quint32 m_recordLength
 
int m_recordSampleRate
 
int m_samplesCount
 
std::size_t m_tickCount
 
bool m_enableNavTime
 
MessageQueue m_inputMessageQueue
 

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 40 of file wfmmodgui.h.

Constructor & Destructor Documentation

◆ WFMModGUI()

WFMModGUI::WFMModGUI ( PluginAPI pluginAPI,
DeviceUISet deviceUISet,
BasebandSampleSource channelTx,
QWidget *  parent = 0 
)
explicitprivate

Definition at line 318 of file wfmmodgui.cpp.

References DeviceUISet::addChannelMarker(), DeviceUISet::addRollupWidget(), applySettings(), arg(), audioSelect(), blockApplySettings(), channelMarkerChangedByCursor(), displaySettings(), WFMMod::getCWKeyer(), getInputMessageQueue(), MainWindow::getInstance(), WFMModSettings::getRFBW(), ColorMapper::GrayGold, handleSourceMessages(), i, WFMMod::m_channelIdURI, m_channelMarker, m_deviceUISet, WFMModSettings::m_nbRfBW, m_settings, m_wfmMod, onMenuDialogCalled(), onWidgetRolled(), DeviceUISet::registerTxChannelInstance(), ChannelMarker::setBandwidth(), ChannelMarker::setCenterFrequency(), WFMModSettings::setChannelMarker(), ChannelMarker::setColor(), WFMModSettings::setCWKeyerGUI(), BasebandSampleSource::setMessageQueueToGUI(), ChannelMarker::setSourceOrSinkStream(), ChannelMarker::setTitle(), ChannelMarker::setVisible(), tick(), ui, and RollupWidget::widgetRolled().

Referenced by create().

318  :
319  RollupWidget(parent),
320  ui(new Ui::WFMModGUI),
321  m_pluginAPI(pluginAPI),
322  m_deviceUISet(deviceUISet),
323  m_channelMarker(this),
324  m_doApplySettings(true),
325  m_recordLength(0),
326  m_recordSampleRate(48000),
327  m_samplesCount(0),
328  m_tickCount(0),
329  m_enableNavTime(false)
330 {
331  ui->setupUi(this);
332  setAttribute(Qt::WA_DeleteOnClose, true);
333 
334  blockApplySettings(true);
335 
336  ui->rfBW->clear();
337  for (int i = 0; i < WFMModSettings::m_nbRfBW; i++) {
338  ui->rfBW->addItem(QString("%1").arg(WFMModSettings::getRFBW(i) / 1000.0, 0, 'f', 2));
339  }
340  ui->rfBW->setCurrentIndex(7);
341 
342  blockApplySettings(false);
343 
344  connect(this, SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool)));
345  connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(onMenuDialogCalled(const QPoint &)));
346 
347  m_wfmMod = (WFMMod*) channelTx; //new WFMMod(m_deviceUISet->m_deviceSinkAPI);
349 
350  connect(&MainWindow::getInstance()->getMasterTimer(), SIGNAL(timeout()), this, SLOT(tick()));
351 
352  CRightClickEnabler *audioMuteRightClickEnabler = new CRightClickEnabler(ui->mic);
353  connect(audioMuteRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(audioSelect()));
354 
355  ui->deltaFrequencyLabel->setText(QString("%1f").arg(QChar(0x94, 0x03)));
356  ui->deltaFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold));
357  ui->deltaFrequency->setValueRange(false, 7, -9999999, 9999999);
358 
359  m_channelMarker.blockSignals(true);
360  m_channelMarker.setColor(Qt::blue);
363  m_channelMarker.setTitle("WFM Modulator");
365  m_channelMarker.blockSignals(false);
366  m_channelMarker.setVisible(true); // activate signal on the last setting only
367 
371 
372  connect(&m_channelMarker, SIGNAL(changedByCursor()), this, SLOT(channelMarkerChangedByCursor()));
373 
374  ui->play->setEnabled(false);
375  ui->play->setChecked(false);
376  ui->tone->setChecked(false);
377  ui->mic->setChecked(false);
378 
379  ui->cwKeyerGUI->setCWKeyer(m_wfmMod->getCWKeyer());
380 
382  m_settings.setCWKeyerGUI(ui->cwKeyerGUI);
383 
384  connect(getInputMessageQueue(), SIGNAL(messageEnqueued()), this, SLOT(handleSourceMessages()));
385  connect(m_wfmMod, SIGNAL(levelChanged(qreal, qreal, int)), ui->volumeMeter, SLOT(levelChanged(qreal, qreal, int)));
386 
387  displaySettings();
388  applySettings(true);
389 }
CWKeyer * getCWKeyer()
Definition: wfmmod.h:248
static MainWindow * getInstance()
Definition: mainwindow.h:73
void registerTxChannelInstance(const QString &channelName, PluginInstanceGUI *pluginGUI)
Definition: deviceuiset.cpp:88
bool m_doApplySettings
Definition: wfmmodgui.h:67
int m_samplesCount
Definition: wfmmodgui.h:77
static const int m_nbRfBW
static int getRFBW(int index)
void setCWKeyerGUI(Serializable *cwKeyerGUI)
Ui::WFMModGUI * ui
Definition: wfmmodgui.h:62
WFMModSettings m_settings
Definition: wfmmodgui.h:66
void addChannelMarker(ChannelMarker *channelMarker)
Add channel marker to spectrum.
Definition: deviceuiset.cpp:72
Definition: wfmmod.h:48
static const QString m_channelIdURI
Definition: wfmmod.h:250
void audioSelect()
Definition: wfmmodgui.cpp:477
Fixed< IntType, IntBits > arg(const std::complex< Fixed< IntType, IntBits > > &val)
Definition: fixed.h:2401
virtual MessageQueue * getInputMessageQueue()
Definition: wfmmodgui.h:55
RollupWidget(QWidget *parent=NULL)
Definition: rollupwidget.cpp:7
void applySettings(bool force=false)
Definition: wfmmodgui.cpp:403
void setChannelMarker(Serializable *channelMarker)
void setSourceOrSinkStream(bool sourceOrSinkStream)
Definition: channelmarker.h:75
WFMMod * m_wfmMod
Definition: wfmmodgui.h:71
DeviceUISet * m_deviceUISet
Definition: wfmmodgui.h:64
PluginAPI * m_pluginAPI
Definition: wfmmodgui.h:63
int32_t i
Definition: decimators.h:244
void addRollupWidget(QWidget *widget)
Add rollup widget to channel window.
Definition: deviceuiset.cpp:77
virtual void setMessageQueueToGUI(MessageQueue *queue)
int m_recordSampleRate
Definition: wfmmodgui.h:76
void blockApplySettings(bool block)
Definition: wfmmodgui.cpp:398
bool m_enableNavTime
Definition: wfmmodgui.h:79
void handleSourceMessages()
Definition: wfmmodgui.cpp:139
void onWidgetRolled(QWidget *widget, bool rollDown)
Definition: wfmmodgui.cpp:280
void setColor(const QColor &color)
quint32 m_recordLength
Definition: wfmmodgui.h:75
void channelMarkerChangedByCursor()
Definition: wfmmodgui.cpp:132
void setVisible(bool visible)
void displaySettings()
Definition: wfmmodgui.cpp:421
void setBandwidth(int bandwidth)
void setTitle(const QString &title)
void setCenterFrequency(int centerFrequency)
void onMenuDialogCalled(const QPoint &p)
Definition: wfmmodgui.cpp:286
void widgetRolled(QWidget *widget, bool rollDown)
void tick()
Definition: wfmmodgui.cpp:490
ChannelMarker m_channelMarker
Definition: wfmmodgui.h:65
std::size_t m_tickCount
Definition: wfmmodgui.h:78
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ~WFMModGUI()

WFMModGUI::~WFMModGUI ( )
privatevirtual

Definition at line 391 of file wfmmodgui.cpp.

References m_deviceUISet, m_wfmMod, DeviceUISet::removeTxChannelInstance(), and ui.

392 {
394  delete m_wfmMod; // TODO: check this: when the GUI closes it has to delete the modulator
395  delete ui;
396 }
void removeTxChannelInstance(PluginInstanceGUI *pluginGUI)
Ui::WFMModGUI * ui
Definition: wfmmodgui.h:62
WFMMod * m_wfmMod
Definition: wfmmodgui.h:71
DeviceUISet * m_deviceUISet
Definition: wfmmodgui.h:64
+ Here is the call graph for this function:

Member Function Documentation

◆ applySettings()

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

Definition at line 403 of file wfmmodgui.cpp.

References WFMMod::MsgConfigureWFMMod::create(), WFMMod::MsgConfigureChannelizer::create(), ChannelMarker::getCenterFrequency(), ChannelMarker::getColor(), BasebandSampleSource::getInputMessageQueue(), WFMModSettings::getRFBW(), m_channelMarker, m_doApplySettings, m_settings, m_wfmMod, MessageQueue::push(), requiredBW(), RollupWidget::setTitleColor(), and ui.

Referenced by audioSelect(), channelMarkerChangedByCursor(), deserialize(), on_afBW_valueChanged(), on_channelMute_toggled(), on_deltaFrequency_changed(), on_fmDev_valueChanged(), on_mic_toggled(), on_morseKeyer_toggled(), on_play_toggled(), on_playLoop_toggled(), on_rfBW_currentIndexChanged(), on_tone_toggled(), on_toneFrequency_valueChanged(), on_volume_valueChanged(), onMenuDialogCalled(), resetToDefaults(), setCenterFrequency(), and WFMModGUI().

404 {
405  if (m_doApplySettings)
406  {
408 
410  requiredBW(WFMModSettings::getRFBW(ui->rfBW->currentIndex())),
412  m_wfmMod->getInputMessageQueue()->push(msgChan);
413 
414  ui->deltaFrequency->setValue(m_channelMarker.getCenterFrequency());
415 
417  m_wfmMod->getInputMessageQueue()->push(msgConf);
418  }
419 }
int getCenterFrequency() const
Definition: channelmarker.h:42
void push(Message *message, bool emitSignal=true)
Push message onto queue.
bool m_doApplySettings
Definition: wfmmodgui.h:67
static int getRFBW(int index)
MessageQueue * getInputMessageQueue()
Get the queue for asynchronous inbound communication.
Ui::WFMModGUI * ui
Definition: wfmmodgui.h:62
WFMModSettings m_settings
Definition: wfmmodgui.h:66
static MsgConfigureChannelizer * create(int sampleRate, int centerFrequency)
Definition: wfmmod.h:82
static MsgConfigureWFMMod * create(const WFMModSettings &settings, bool force)
Definition: wfmmod.h:59
static int requiredBW(int rfBW)
Definition: wfmmodgui.h:94
void setTitleColor(const QColor &c)
WFMMod * m_wfmMod
Definition: wfmmodgui.h:71
const QColor & getColor() const
Definition: channelmarker.h:64
ChannelMarker m_channelMarker
Definition: wfmmodgui.h:65
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ audioSelect

void WFMModGUI::audioSelect ( )
privateslot

Definition at line 477 of file wfmmodgui.cpp.

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

Referenced by WFMModGUI().

478 {
479  qDebug("WFMModGUI::audioSelect");
480  AudioSelectDialog audioSelect(DSPEngine::instance()->getAudioDeviceManager(), m_settings.m_audioDeviceName, true); // true for input
481  audioSelect.exec();
482 
483  if (audioSelect.m_selected)
484  {
485  m_settings.m_audioDeviceName = audioSelect.m_audioDeviceName;
486  applySettings();
487  }
488 }
WFMModSettings m_settings
Definition: wfmmodgui.h:66
void audioSelect()
Definition: wfmmodgui.cpp:477
void applySettings(bool force=false)
Definition: wfmmodgui.cpp:403
static DSPEngine * instance()
Definition: dspengine.cpp:51
QString m_audioDeviceName
This is the audio device you get the audio samples from.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ blockApplySettings()

void WFMModGUI::blockApplySettings ( bool  block)
private

Definition at line 398 of file wfmmodgui.cpp.

References m_doApplySettings.

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

399 {
400  m_doApplySettings = !block;
401 }
bool m_doApplySettings
Definition: wfmmodgui.h:67
+ Here is the caller graph for this function:

◆ channelMarkerChangedByCursor

void WFMModGUI::channelMarkerChangedByCursor ( )
slot

Definition at line 132 of file wfmmodgui.cpp.

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

Referenced by WFMModGUI().

133 {
134  ui->deltaFrequency->setValue(m_channelMarker.getCenterFrequency());
136  applySettings();
137 }
int getCenterFrequency() const
Definition: channelmarker.h:42
Ui::WFMModGUI * ui
Definition: wfmmodgui.h:62
WFMModSettings m_settings
Definition: wfmmodgui.h:66
void applySettings(bool force=false)
Definition: wfmmodgui.cpp:403
qint64 m_inputFrequencyOffset
ChannelMarker m_channelMarker
Definition: wfmmodgui.h:65
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ configureFileName

void WFMModGUI::configureFileName ( )
privateslot

Definition at line 273 of file wfmmodgui.cpp.

References WFMMod::MsgConfigureFileSourceName::create(), BasebandSampleSource::getInputMessageQueue(), m_fileName, m_wfmMod, and MessageQueue::push().

Referenced by on_showFileDialog_clicked().

274 {
275  qDebug() << "FileSourceGui::configureFileName: " << m_fileName.toStdString().c_str();
277  m_wfmMod->getInputMessageQueue()->push(message);
278 }
void push(Message *message, bool emitSignal=true)
Push message onto queue.
MessageQueue * getInputMessageQueue()
Get the queue for asynchronous inbound communication.
WFMMod * m_wfmMod
Definition: wfmmodgui.h:71
QString m_fileName
Definition: wfmmodgui.h:74
static MsgConfigureFileSourceName * create(const QString &fileName)
Definition: wfmmod.h:105
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ create()

WFMModGUI * WFMModGUI::create ( PluginAPI pluginAPI,
DeviceUISet deviceUISet,
BasebandSampleSource channelTx 
)
static

Definition at line 39 of file wfmmodgui.cpp.

References WFMModGUI().

Referenced by WFMModPlugin::createTxChannelGUI().

40 {
41  WFMModGUI* gui = new WFMModGUI(pluginAPI, deviceUISet, channelTx);
42  return gui;
43 }
WFMModGUI(PluginAPI *pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSource *channelTx, QWidget *parent=0)
Definition: wfmmodgui.cpp:318
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ deserialize()

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

Implements PluginInstanceGUI.

Definition at line 82 of file wfmmodgui.cpp.

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

83 {
84  if(m_settings.deserialize(data)) {
86  applySettings(true);
87  return true;
88  } else {
90  return false;
91  }
92 }
void resetToDefaults()
Definition: wfmmodgui.cpp:70
WFMModSettings m_settings
Definition: wfmmodgui.h:66
bool deserialize(const QByteArray &data)
void applySettings(bool force=false)
Definition: wfmmodgui.cpp:403
void displaySettings()
Definition: wfmmodgui.cpp:421
+ Here is the call graph for this function:

◆ destroy()

void WFMModGUI::destroy ( )
virtual

Implements PluginInstanceGUI.

Definition at line 45 of file wfmmodgui.cpp.

46 {
47  delete this;
48 }

◆ displaySettings()

void WFMModGUI::displaySettings ( )
private

Definition at line 421 of file wfmmodgui.cpp.

References arg(), blockApplySettings(), ChannelMarker::getCenterFrequency(), WFMModSettings::getRFBWIndex(), ChannelMarker::getTitle(), WFMModSettings::m_afBandwidth, m_channelMarker, WFMModSettings::m_channelMute, WFMModSettings::m_fmDeviation, WFMModSettings::m_inputFrequencyOffset, WFMModSettings::m_modAFInput, WFMModSettings::m_playLoop, WFMModSettings::m_rfBandwidth, WFMModSettings::m_rgbColor, m_settings, WFMModSettings::m_title, WFMModSettings::m_toneFrequency, WFMModSettings::m_volumeFactor, ChannelMarker::setBandwidth(), ChannelMarker::setCenterFrequency(), ChannelMarker::setColor(), ChannelMarker::setTitle(), RollupWidget::setTitleColor(), and ui.

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

422 {
423  m_channelMarker.blockSignals(true);
427  m_channelMarker.blockSignals(false);
428  m_channelMarker.setColor(m_settings.m_rgbColor); // activate signal on the last setting only
429 
431  setWindowTitle(m_channelMarker.getTitle());
432 
433  blockApplySettings(true);
434 
435  ui->deltaFrequency->setValue(m_channelMarker.getCenterFrequency());
436 
437  ui->rfBW->setCurrentIndex(WFMModSettings::getRFBWIndex(m_settings.m_rfBandwidth));
438 
439  ui->afBWText->setText(QString("%1k").arg(m_settings.m_afBandwidth / 1000.0));
440  ui->afBW->setValue(m_settings.m_afBandwidth / 1000.0);
441 
442  ui->fmDevText->setText(QString("%1k").arg(m_settings.m_fmDeviation / 1000.0));
443  ui->fmDev->setValue(m_settings.m_fmDeviation / 1000.0);
444 
445  ui->volumeText->setText(QString("%1").arg(m_settings.m_volumeFactor, 0, 'f', 1));
446  ui->volume->setValue(m_settings.m_volumeFactor * 10.0);
447 
448  ui->toneFrequencyText->setText(QString("%1k").arg(m_settings.m_toneFrequency / 1000.0, 0, 'f', 2));
449  ui->toneFrequency->setValue(m_settings.m_toneFrequency / 10.0);
450 
451  ui->channelMute->setChecked(m_settings.m_channelMute);
452  ui->playLoop->setChecked(m_settings.m_playLoop);
453 
454  ui->tone->setEnabled((m_settings.m_modAFInput == WFMModSettings::WFMModInputAF::WFMModInputTone) || (m_settings.m_modAFInput == WFMModSettings::WFMModInputAF::WFMModInputNone));
455  ui->mic->setEnabled((m_settings.m_modAFInput == WFMModSettings::WFMModInputAF::WFMModInputAudio) || (m_settings.m_modAFInput == WFMModSettings::WFMModInputAF::WFMModInputNone));
456  ui->play->setEnabled((m_settings.m_modAFInput == WFMModSettings::WFMModInputAF::WFMModInputFile) || (m_settings.m_modAFInput == WFMModSettings::WFMModInputAF::WFMModInputNone));
457  ui->morseKeyer->setEnabled((m_settings.m_modAFInput == WFMModSettings::WFMModInputAF::WFMModInputCWTone) || (m_settings.m_modAFInput == WFMModSettings::WFMModInputAF::WFMModInputNone));
458 
459  ui->tone->setChecked(m_settings.m_modAFInput == WFMModSettings::WFMModInputAF::WFMModInputTone);
460  ui->mic->setChecked(m_settings.m_modAFInput == WFMModSettings::WFMModInputAF::WFMModInputAudio);
461  ui->play->setChecked(m_settings.m_modAFInput == WFMModSettings::WFMModInputAF::WFMModInputFile);
462  ui->morseKeyer->setChecked(m_settings.m_modAFInput == WFMModSettings::WFMModInputAF::WFMModInputCWTone);
463 
464  blockApplySettings(false);
465 }
int getCenterFrequency() const
Definition: channelmarker.h:42
WFMModInputAF m_modAFInput
Ui::WFMModGUI * ui
Definition: wfmmodgui.h:62
WFMModSettings m_settings
Definition: wfmmodgui.h:66
quint32 m_rgbColor
Fixed< IntType, IntBits > arg(const std::complex< Fixed< IntType, IntBits > > &val)
Definition: fixed.h:2401
void setTitleColor(const QColor &c)
const QString & getTitle() const
Definition: channelmarker.h:38
void blockApplySettings(bool block)
Definition: wfmmodgui.cpp:398
void setColor(const QColor &color)
void setBandwidth(int bandwidth)
void setTitle(const QString &title)
static int getRFBWIndex(int rfbw)
void setCenterFrequency(int centerFrequency)
qint64 m_inputFrequencyOffset
ChannelMarker m_channelMarker
Definition: wfmmodgui.h:65
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ enterEvent()

void WFMModGUI::enterEvent ( QEvent *  )
private

Definition at line 472 of file wfmmodgui.cpp.

References m_channelMarker, and ChannelMarker::setHighlighted().

473 {
475 }
void setHighlighted(bool highlighted)
ChannelMarker m_channelMarker
Definition: wfmmodgui.h:65
+ Here is the call graph for this function:

◆ getCenterFrequency()

qint64 WFMModGUI::getCenterFrequency ( ) const
virtual

Implements PluginInstanceGUI.

Definition at line 60 of file wfmmodgui.cpp.

References ChannelMarker::getCenterFrequency(), and m_channelMarker.

60  {
62 }
int getCenterFrequency() const
Definition: channelmarker.h:42
ChannelMarker m_channelMarker
Definition: wfmmodgui.h:65
+ Here is the call graph for this function:

◆ getInputMessageQueue()

virtual MessageQueue* WFMModGUI::getInputMessageQueue ( )
inlinevirtual

Implements PluginInstanceGUI.

Definition at line 55 of file wfmmodgui.h.

Referenced by handleSourceMessages(), and WFMModGUI().

55 { return &m_inputMessageQueue; }
MessageQueue m_inputMessageQueue
Definition: wfmmodgui.h:80
+ Here is the caller graph for this function:

◆ getName()

QString WFMModGUI::getName ( ) const
virtual

Implements PluginInstanceGUI.

Definition at line 55 of file wfmmodgui.cpp.

56 {
57  return objectName();
58 }

◆ handleMessage()

bool WFMModGUI::handleMessage ( const Message message)
virtual

Implements PluginInstanceGUI.

Definition at line 94 of file wfmmodgui.cpp.

References blockApplySettings(), displaySettings(), WFMMod::MsgConfigureWFMMod::getSettings(), CWKeyer::MsgConfigureCWKeyer::getSettings(), m_recordLength, m_recordSampleRate, m_samplesCount, m_settings, Message::match(), ui, updateWithStreamData(), and updateWithStreamTime().

Referenced by handleSourceMessages().

95 {
97  {
98  m_recordSampleRate = ((WFMMod::MsgReportFileSourceStreamData&)message).getSampleRate();
99  m_recordLength = ((WFMMod::MsgReportFileSourceStreamData&)message).getRecordLength();
100  m_samplesCount = 0;
102  return true;
103  }
105  {
106  m_samplesCount = ((WFMMod::MsgReportFileSourceStreamTiming&)message).getSamplesCount();
108  return true;
109  }
110  else if (WFMMod::MsgConfigureWFMMod::match(message))
111  {
113  m_settings = cfg.getSettings();
114  blockApplySettings(true);
115  displaySettings();
116  blockApplySettings(false);
117  return true;
118  }
119  else if (CWKeyer::MsgConfigureCWKeyer::match(message))
120  {
122  ui->cwKeyerGUI->setSettings(cfg.getSettings());
123  ui->cwKeyerGUI->displaySettings();
124  return true;
125  }
126  else
127  {
128  return false;
129  }
130 }
int m_samplesCount
Definition: wfmmodgui.h:77
Ui::WFMModGUI * ui
Definition: wfmmodgui.h:62
WFMModSettings m_settings
Definition: wfmmodgui.h:66
int m_recordSampleRate
Definition: wfmmodgui.h:76
static bool match(const Message *message)
Definition: message.cpp:45
void blockApplySettings(bool block)
Definition: wfmmodgui.cpp:398
void updateWithStreamData()
Definition: wfmmodgui.cpp:503
quint32 m_recordLength
Definition: wfmmodgui.h:75
void displaySettings()
Definition: wfmmodgui.cpp:421
void updateWithStreamTime()
Definition: wfmmodgui.cpp:512
const WFMModSettings & getSettings() const
Definition: wfmmod.h:56
const CWKeyerSettings & getSettings() const
Definition: cwkeyer.h:60
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ handleSourceMessages

void WFMModGUI::handleSourceMessages ( )
privateslot

Definition at line 139 of file wfmmodgui.cpp.

References getInputMessageQueue(), and handleMessage().

Referenced by WFMModGUI().

140 {
141  Message* message;
142 
143  while ((message = getInputMessageQueue()->pop()) != 0)
144  {
145  if (handleMessage(*message))
146  {
147  delete message;
148  }
149  }
150 }
virtual MessageQueue * getInputMessageQueue()
Definition: wfmmodgui.h:55
virtual bool handleMessage(const Message &message)
Definition: wfmmodgui.cpp:94
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ leaveEvent()

void WFMModGUI::leaveEvent ( QEvent *  )
private

Definition at line 467 of file wfmmodgui.cpp.

References m_channelMarker, and ChannelMarker::setHighlighted().

468 {
470 }
void setHighlighted(bool highlighted)
ChannelMarker m_channelMarker
Definition: wfmmodgui.h:65
+ Here is the call graph for this function:

◆ on_afBW_valueChanged

void WFMModGUI::on_afBW_valueChanged ( int  value)
privateslot

Definition at line 167 of file wfmmodgui.cpp.

References applySettings(), arg(), WFMModSettings::m_afBandwidth, m_settings, and ui.

168 {
169  ui->afBWText->setText(QString("%1k").arg(value));
170  m_settings.m_afBandwidth = value * 1000.0;
171  applySettings();
172 }
Ui::WFMModGUI * ui
Definition: wfmmodgui.h:62
WFMModSettings m_settings
Definition: wfmmodgui.h:66
Fixed< IntType, IntBits > arg(const std::complex< Fixed< IntType, IntBits > > &val)
Definition: fixed.h:2401
void applySettings(bool force=false)
Definition: wfmmodgui.cpp:403
+ Here is the call graph for this function:

◆ on_channelMute_toggled

void WFMModGUI::on_channelMute_toggled ( bool  checked)
privateslot

Definition at line 195 of file wfmmodgui.cpp.

References applySettings(), WFMModSettings::m_channelMute, and m_settings.

196 {
197  m_settings.m_channelMute = checked;
198  applySettings();
199 }
WFMModSettings m_settings
Definition: wfmmodgui.h:66
void applySettings(bool force=false)
Definition: wfmmodgui.cpp:403
+ Here is the call graph for this function:

◆ on_deltaFrequency_changed

void WFMModGUI::on_deltaFrequency_changed ( qint64  value)
privateslot

Definition at line 152 of file wfmmodgui.cpp.

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

153 {
156  applySettings();
157 }
int getCenterFrequency() const
Definition: channelmarker.h:42
WFMModSettings m_settings
Definition: wfmmodgui.h:66
void applySettings(bool force=false)
Definition: wfmmodgui.cpp:403
void setCenterFrequency(int centerFrequency)
qint64 m_inputFrequencyOffset
ChannelMarker m_channelMarker
Definition: wfmmodgui.h:65
+ Here is the call graph for this function:

◆ on_fmDev_valueChanged

void WFMModGUI::on_fmDev_valueChanged ( int  value)
privateslot

Definition at line 174 of file wfmmodgui.cpp.

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

175 {
176  ui->fmDevText->setText(QString("%1k").arg(value));
177  m_settings.m_fmDeviation = value * 1000.0;
178  applySettings();
179 }
Ui::WFMModGUI * ui
Definition: wfmmodgui.h:62
WFMModSettings m_settings
Definition: wfmmodgui.h:66
Fixed< IntType, IntBits > arg(const std::complex< Fixed< IntType, IntBits > > &val)
Definition: fixed.h:2401
void applySettings(bool force=false)
Definition: wfmmodgui.cpp:403
+ Here is the call graph for this function:

◆ on_mic_toggled

void WFMModGUI::on_mic_toggled ( bool  checked)
privateslot

Definition at line 236 of file wfmmodgui.cpp.

References applySettings(), WFMModSettings::m_modAFInput, m_settings, ui, WFMModSettings::WFMModInputAudio, and WFMModSettings::WFMModInputNone.

237 {
238  ui->play->setEnabled(!checked); // release other source inputs
239  ui->tone->setEnabled(!checked); // release other source inputs
240  ui->morseKeyer->setEnabled(!checked);
242  applySettings();
243 }
WFMModInputAF m_modAFInput
Ui::WFMModGUI * ui
Definition: wfmmodgui.h:62
WFMModSettings m_settings
Definition: wfmmodgui.h:66
void applySettings(bool force=false)
Definition: wfmmodgui.cpp:403
+ Here is the call graph for this function:

◆ on_morseKeyer_toggled

void WFMModGUI::on_morseKeyer_toggled ( bool  checked)
privateslot

Definition at line 227 of file wfmmodgui.cpp.

References applySettings(), WFMModSettings::m_modAFInput, m_settings, ui, WFMModSettings::WFMModInputCWTone, and WFMModSettings::WFMModInputNone.

228 {
229  ui->tone->setEnabled(!checked); // release other source inputs
230  ui->mic->setEnabled(!checked);
231  ui->play->setEnabled(!checked);
233  applySettings();
234 }
WFMModInputAF m_modAFInput
Ui::WFMModGUI * ui
Definition: wfmmodgui.h:62
WFMModSettings m_settings
Definition: wfmmodgui.h:66
void applySettings(bool force=false)
Definition: wfmmodgui.cpp:403
+ Here is the call graph for this function:

◆ on_navTimeSlider_valueChanged

void WFMModGUI::on_navTimeSlider_valueChanged ( int  value)
privateslot

Definition at line 245 of file wfmmodgui.cpp.

References WFMMod::MsgConfigureFileSourceSeek::create(), BasebandSampleSource::getInputMessageQueue(), m_enableNavTime, m_recordLength, m_wfmMod, and MessageQueue::push().

246 {
247  if (m_enableNavTime && ((value >= 0) && (value <= 100)))
248  {
249  int t_sec = (m_recordLength * value) / 100;
250  QTime t(0, 0, 0, 0);
251  t = t.addSecs(t_sec);
252 
254  m_wfmMod->getInputMessageQueue()->push(message);
255  }
256 }
void push(Message *message, bool emitSignal=true)
Push message onto queue.
MessageQueue * getInputMessageQueue()
Get the queue for asynchronous inbound communication.
WFMMod * m_wfmMod
Definition: wfmmodgui.h:71
bool m_enableNavTime
Definition: wfmmodgui.h:79
quint32 m_recordLength
Definition: wfmmodgui.h:75
static MsgConfigureFileSourceSeek * create(int seekPercentage)
Definition: wfmmod.h:126
+ Here is the call graph for this function:

◆ on_play_toggled

void WFMModGUI::on_play_toggled ( bool  checked)
privateslot

Definition at line 207 of file wfmmodgui.cpp.

References applySettings(), m_enableNavTime, WFMModSettings::m_modAFInput, m_settings, ui, WFMModSettings::WFMModInputFile, and WFMModSettings::WFMModInputNone.

208 {
209  ui->tone->setEnabled(!checked); // release other source inputs
210  ui->mic->setEnabled(!checked);
211  ui->morseKeyer->setEnabled(!checked);
213  applySettings();
214  ui->navTimeSlider->setEnabled(!checked);
215  m_enableNavTime = !checked;
216 }
WFMModInputAF m_modAFInput
Ui::WFMModGUI * ui
Definition: wfmmodgui.h:62
WFMModSettings m_settings
Definition: wfmmodgui.h:66
void applySettings(bool force=false)
Definition: wfmmodgui.cpp:403
bool m_enableNavTime
Definition: wfmmodgui.h:79
+ Here is the call graph for this function:

◆ on_playLoop_toggled

void WFMModGUI::on_playLoop_toggled ( bool  checked)
privateslot

Definition at line 201 of file wfmmodgui.cpp.

References applySettings(), WFMModSettings::m_playLoop, and m_settings.

202 {
203  m_settings.m_playLoop = checked;
204  applySettings();
205 }
WFMModSettings m_settings
Definition: wfmmodgui.h:66
void applySettings(bool force=false)
Definition: wfmmodgui.cpp:403
+ Here is the call graph for this function:

◆ on_rfBW_currentIndexChanged

void WFMModGUI::on_rfBW_currentIndexChanged ( int  index)
privateslot

Definition at line 159 of file wfmmodgui.cpp.

References applySettings(), WFMModSettings::getRFBW(), m_channelMarker, WFMModSettings::m_rfBandwidth, m_settings, and ChannelMarker::setBandwidth().

160 {
161  float rfBW = WFMModSettings::getRFBW(index);
163  m_settings.m_rfBandwidth = rfBW;
164  applySettings();
165 }
static int getRFBW(int index)
WFMModSettings m_settings
Definition: wfmmodgui.h:66
void applySettings(bool force=false)
Definition: wfmmodgui.cpp:403
void setBandwidth(int bandwidth)
ChannelMarker m_channelMarker
Definition: wfmmodgui.h:65
+ Here is the call graph for this function:

◆ on_showFileDialog_clicked

void WFMModGUI::on_showFileDialog_clicked ( bool  checked)
privateslot

Definition at line 258 of file wfmmodgui.cpp.

References configureFileName(), m_fileName, and ui.

259 {
260  (void) checked;
261  QString fileName = QFileDialog::getOpenFileName(this,
262  tr("Open raw audio file"), ".", tr("Raw audio Files (*.raw)"), 0, QFileDialog::DontUseNativeDialog);
263 
264  if (fileName != "")
265  {
266  m_fileName = fileName;
267  ui->recordFileText->setText(m_fileName);
268  ui->play->setEnabled(true);
270  }
271 }
Ui::WFMModGUI * ui
Definition: wfmmodgui.h:62
QString m_fileName
Definition: wfmmodgui.h:74
void configureFileName()
Definition: wfmmodgui.cpp:273
+ Here is the call graph for this function:

◆ on_tone_toggled

void WFMModGUI::on_tone_toggled ( bool  checked)
privateslot

Definition at line 218 of file wfmmodgui.cpp.

References applySettings(), WFMModSettings::m_modAFInput, m_settings, ui, WFMModSettings::WFMModInputNone, and WFMModSettings::WFMModInputTone.

219 {
220  ui->play->setEnabled(!checked); // release other source inputs
221  ui->mic->setEnabled(!checked);
222  ui->morseKeyer->setEnabled(!checked);
224  applySettings();
225 }
WFMModInputAF m_modAFInput
Ui::WFMModGUI * ui
Definition: wfmmodgui.h:62
WFMModSettings m_settings
Definition: wfmmodgui.h:66
void applySettings(bool force=false)
Definition: wfmmodgui.cpp:403
+ Here is the call graph for this function:

◆ on_toneFrequency_valueChanged

void WFMModGUI::on_toneFrequency_valueChanged ( int  value)
privateslot

Definition at line 188 of file wfmmodgui.cpp.

References applySettings(), arg(), m_settings, WFMModSettings::m_toneFrequency, and ui.

189 {
190  ui->toneFrequencyText->setText(QString("%1k").arg(value / 100.0, 0, 'f', 2));
191  m_settings.m_toneFrequency = value * 10.0;
192  applySettings();
193 }
Ui::WFMModGUI * ui
Definition: wfmmodgui.h:62
WFMModSettings m_settings
Definition: wfmmodgui.h:66
Fixed< IntType, IntBits > arg(const std::complex< Fixed< IntType, IntBits > > &val)
Definition: fixed.h:2401
void applySettings(bool force=false)
Definition: wfmmodgui.cpp:403
+ Here is the call graph for this function:

◆ on_volume_valueChanged

void WFMModGUI::on_volume_valueChanged ( int  value)
privateslot

Definition at line 181 of file wfmmodgui.cpp.

References applySettings(), arg(), m_settings, WFMModSettings::m_volumeFactor, and ui.

182 {
183  ui->volumeText->setText(QString("%1").arg(value / 10.0, 0, 'f', 1));
184  m_settings.m_volumeFactor = value / 10.0;
185  applySettings();
186 }
Ui::WFMModGUI * ui
Definition: wfmmodgui.h:62
WFMModSettings m_settings
Definition: wfmmodgui.h:66
Fixed< IntType, IntBits > arg(const std::complex< Fixed< IntType, IntBits > > &val)
Definition: fixed.h:2401
void applySettings(bool force=false)
Definition: wfmmodgui.cpp:403
+ Here is the call graph for this function:

◆ onMenuDialogCalled

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

Definition at line 286 of file wfmmodgui.cpp.

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

Referenced by WFMModGUI().

287 {
289  {
291  dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
292  dialog.setReverseAPIAddress(m_settings.m_reverseAPIAddress);
293  dialog.setReverseAPIPort(m_settings.m_reverseAPIPort);
294  dialog.setReverseAPIDeviceIndex(m_settings.m_reverseAPIDeviceIndex);
295  dialog.setReverseAPIChannelIndex(m_settings.m_reverseAPIChannelIndex);
296 
297  dialog.move(p);
298  dialog.exec();
299 
303  m_settings.m_useReverseAPI = dialog.useReverseAPI();
304  m_settings.m_reverseAPIAddress = dialog.getReverseAPIAddress();
305  m_settings.m_reverseAPIPort = dialog.getReverseAPIPort();
306  m_settings.m_reverseAPIDeviceIndex = dialog.getReverseAPIDeviceIndex();
307  m_settings.m_reverseAPIChannelIndex = dialog.getReverseAPIChannelIndex();
308 
309  setWindowTitle(m_settings.m_title);
311 
312  applySettings();
313  }
314 
316 }
int getCenterFrequency() const
Definition: channelmarker.h:42
uint16_t m_reverseAPIChannelIndex
WFMModSettings m_settings
Definition: wfmmodgui.h:66
void resetContextMenuType()
Definition: rollupwidget.h:50
quint32 m_rgbColor
ContextMenuType m_contextMenuType
Definition: rollupwidget.h:33
void applySettings(bool force=false)
Definition: wfmmodgui.cpp:403
void setTitleColor(const QColor &c)
const QString & getTitle() const
Definition: channelmarker.h:38
uint16_t m_reverseAPIPort
const QColor & getColor() const
Definition: channelmarker.h:64
QString m_reverseAPIAddress
qint64 m_inputFrequencyOffset
uint16_t m_reverseAPIDeviceIndex
ChannelMarker m_channelMarker
Definition: wfmmodgui.h:65
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ onWidgetRolled

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

Definition at line 280 of file wfmmodgui.cpp.

Referenced by WFMModGUI().

281 {
282  (void) widget;
283  (void) rollDown;
284 }
+ Here is the caller graph for this function:

◆ requiredBW()

static int WFMModGUI::requiredBW ( int  rfBW)
inlinestaticprivate

Definition at line 94 of file wfmmodgui.h.

Referenced by applySettings().

95  {
96  if (rfBW <= 96000) {
97  return 96000;
98  } else {
99  return (3*rfBW)/2;
100  }
101  }
+ Here is the caller graph for this function:

◆ resetToDefaults()

void WFMModGUI::resetToDefaults ( )
virtual

Implements PluginInstanceGUI.

Definition at line 70 of file wfmmodgui.cpp.

References applySettings(), displaySettings(), m_settings, and WFMModSettings::resetToDefaults().

Referenced by deserialize().

71 {
74  applySettings(true);
75 }
WFMModSettings m_settings
Definition: wfmmodgui.h:66
void applySettings(bool force=false)
Definition: wfmmodgui.cpp:403
void displaySettings()
Definition: wfmmodgui.cpp:421
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ serialize()

QByteArray WFMModGUI::serialize ( ) const
virtual

Implements PluginInstanceGUI.

Definition at line 77 of file wfmmodgui.cpp.

References m_settings, and WFMModSettings::serialize().

78 {
79  return m_settings.serialize();
80 }
WFMModSettings m_settings
Definition: wfmmodgui.h:66
QByteArray serialize() const
+ Here is the call graph for this function:

◆ setCenterFrequency()

void WFMModGUI::setCenterFrequency ( qint64  centerFrequency)
virtual

Implements PluginInstanceGUI.

Definition at line 64 of file wfmmodgui.cpp.

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

65 {
66  m_channelMarker.setCenterFrequency(centerFrequency);
67  applySettings();
68 }
void applySettings(bool force=false)
Definition: wfmmodgui.cpp:403
void setCenterFrequency(int centerFrequency)
ChannelMarker m_channelMarker
Definition: wfmmodgui.h:65
+ Here is the call graph for this function:

◆ setName()

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

Implements PluginInstanceGUI.

Definition at line 50 of file wfmmodgui.cpp.

51 {
52  setObjectName(name);
53 }

◆ tick

void WFMModGUI::tick ( )
privateslot

Definition at line 490 of file wfmmodgui.cpp.

References arg(), WFMMod::MsgConfigureFileSourceStreamTiming::create(), CalcDb::dbPower(), BasebandSampleSource::getInputMessageQueue(), WFMMod::getMagSq(), m_channelPowerDbAvg, WFMModSettings::m_modAFInput, m_settings, m_tickCount, m_wfmMod, MessageQueue::push(), ui, and WFMModSettings::WFMModInputFile.

Referenced by WFMModGUI().

491 {
492  double powDb = CalcDb::dbPower(m_wfmMod->getMagSq());
493  m_channelPowerDbAvg(powDb);
494  ui->channelPower->setText(tr("%1 dB").arg(m_channelPowerDbAvg.asDouble(), 0, 'f', 1));
495 
497  {
499  m_wfmMod->getInputMessageQueue()->push(message);
500  }
501 }
MovingAverageUtil< double, double, 20 > m_channelPowerDbAvg
Definition: wfmmodgui.h:72
void push(Message *message, bool emitSignal=true)
Push message onto queue.
static double dbPower(double magsq, double floor=1e-12)
Definition: db.cpp:22
MessageQueue * getInputMessageQueue()
Get the queue for asynchronous inbound communication.
WFMModInputAF m_modAFInput
Ui::WFMModGUI * ui
Definition: wfmmodgui.h:62
WFMModSettings m_settings
Definition: wfmmodgui.h:66
Fixed< IntType, IntBits > arg(const std::complex< Fixed< IntType, IntBits > > &val)
Definition: fixed.h:2401
double getMagSq() const
Definition: wfmmod.h:246
WFMMod * m_wfmMod
Definition: wfmmodgui.h:71
static MsgConfigureFileSourceStreamTiming * create()
Definition: wfmmod.h:145
double asDouble() const
Definition: movingaverage.h:57
std::size_t m_tickCount
Definition: wfmmodgui.h:78
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateWithStreamData()

void WFMModGUI::updateWithStreamData ( )
private

Definition at line 503 of file wfmmodgui.cpp.

References m_recordLength, ui, and updateWithStreamTime().

Referenced by handleMessage().

504 {
505  QTime recordLength(0, 0, 0, 0);
506  recordLength = recordLength.addSecs(m_recordLength);
507  QString s_time = recordLength.toString("HH:mm:ss");
508  ui->recordLengthText->setText(s_time);
510 }
Ui::WFMModGUI * ui
Definition: wfmmodgui.h:62
quint32 m_recordLength
Definition: wfmmodgui.h:75
void updateWithStreamTime()
Definition: wfmmodgui.cpp:512
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateWithStreamTime()

void WFMModGUI::updateWithStreamTime ( )
private

Definition at line 512 of file wfmmodgui.cpp.

References m_enableNavTime, m_recordLength, m_recordSampleRate, m_samplesCount, and ui.

Referenced by handleMessage(), and updateWithStreamData().

513 {
514  int t_sec = 0;
515  int t_msec = 0;
516 
517  if (m_recordSampleRate > 0)
518  {
519  t_msec = ((m_samplesCount * 1000) / m_recordSampleRate) % 1000;
521  }
522 
523  QTime t(0, 0, 0, 0);
524  t = t.addSecs(t_sec);
525  t = t.addMSecs(t_msec);
526  QString s_timems = t.toString("HH:mm:ss.zzz");
527  QString s_time = t.toString("HH:mm:ss");
528  ui->relTimeText->setText(s_timems);
529 
530  if (!m_enableNavTime)
531  {
532  float posRatio = (float) t_sec / (float) m_recordLength;
533  ui->navTimeSlider->setValue((int) (posRatio * 100.0));
534  }
535 }
int m_samplesCount
Definition: wfmmodgui.h:77
Ui::WFMModGUI * ui
Definition: wfmmodgui.h:62
int m_recordSampleRate
Definition: wfmmodgui.h:76
bool m_enableNavTime
Definition: wfmmodgui.h:79
quint32 m_recordLength
Definition: wfmmodgui.h:75
+ Here is the caller graph for this function:

Member Data Documentation

◆ m_channelMarker

ChannelMarker WFMModGUI::m_channelMarker
private

◆ m_channelPowerDbAvg

MovingAverageUtil<double, double, 20> WFMModGUI::m_channelPowerDbAvg
private

Definition at line 72 of file wfmmodgui.h.

Referenced by tick().

◆ m_deviceUISet

DeviceUISet* WFMModGUI::m_deviceUISet
private

Definition at line 64 of file wfmmodgui.h.

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

◆ m_doApplySettings

bool WFMModGUI::m_doApplySettings
private

Definition at line 67 of file wfmmodgui.h.

Referenced by applySettings(), and blockApplySettings().

◆ m_enableNavTime

bool WFMModGUI::m_enableNavTime
private

◆ m_fileName

QString WFMModGUI::m_fileName
private

Definition at line 74 of file wfmmodgui.h.

Referenced by configureFileName(), and on_showFileDialog_clicked().

◆ m_inputMessageQueue

MessageQueue WFMModGUI::m_inputMessageQueue
private

Definition at line 80 of file wfmmodgui.h.

◆ m_pluginAPI

PluginAPI* WFMModGUI::m_pluginAPI
private

Definition at line 63 of file wfmmodgui.h.

◆ m_recordLength

quint32 WFMModGUI::m_recordLength
private

◆ m_recordSampleRate

int WFMModGUI::m_recordSampleRate
private

Definition at line 76 of file wfmmodgui.h.

Referenced by handleMessage(), and updateWithStreamTime().

◆ m_samplesCount

int WFMModGUI::m_samplesCount
private

Definition at line 77 of file wfmmodgui.h.

Referenced by handleMessage(), and updateWithStreamTime().

◆ m_settings

WFMModSettings WFMModGUI::m_settings
private

◆ m_tickCount

std::size_t WFMModGUI::m_tickCount
private

Definition at line 78 of file wfmmodgui.h.

Referenced by tick().

◆ m_wfmMod

WFMMod* WFMModGUI::m_wfmMod
private

◆ ui

Ui::WFMModGUI* WFMModGUI::ui
private

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