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
ChannelAnalyzerGUI Class Reference

#include <chanalyzergui.h>

+ Inheritance diagram for ChannelAnalyzerGUI:
+ Collaboration diagram for ChannelAnalyzerGUI:

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 ChannelAnalyzerGUIcreate (PluginAPI *pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel)
 

Private Slots

void on_deltaFrequency_changed (qint64 value)
 
void on_channelSampleRate_changed (quint64 value)
 
void on_pll_toggled (bool checked)
 
void on_pllPskOrder_currentIndexChanged (int index)
 
void on_useRationalDownsampler_toggled (bool checked)
 
void on_signalSelect_currentIndexChanged (int index)
 
void on_rrcFilter_toggled (bool checked)
 
void on_rrcRolloff_valueChanged (int value)
 
void on_BW_valueChanged (int value)
 
void on_lowCut_valueChanged (int value)
 
void on_spanLog2_currentIndexChanged (int index)
 
void on_ssb_toggled (bool checked)
 
void onWidgetRolled (QWidget *widget, bool rollDown)
 
void onMenuDialogCalled (const QPoint &p)
 
void handleInputMessages ()
 
void tick ()
 

Private Member Functions

 ChannelAnalyzerGUI (PluginAPI *pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel, QWidget *parent=0)
 
virtual ~ChannelAnalyzerGUI ()
 
int getRequestedChannelSampleRate ()
 
void setNewFinalRate ()
 set sample rate after final in-channel decimation More...
 
void setFiltersUIBoundaries ()
 
void blockApplySettings (bool block)
 
void applySettings (bool force=false)
 
void displaySettings ()
 
void displayPLLSettings ()
 
void setSpectrumDisplay ()
 
void leaveEvent (QEvent *)
 
void enterEvent (QEvent *)
 

Private Attributes

Ui::ChannelAnalyzerGUI * ui
 
PluginAPIm_pluginAPI
 
DeviceUISetm_deviceUISet
 
ChannelMarker m_channelMarker
 
ChannelAnalyzerSettings m_settings
 
bool m_doApplySettings
 
int m_rate
 sample rate after final in-channel decimation (spanlog2) More...
 
MovingAverageUtil< double, double, 40 > m_channelPowerAvg
 
ChannelAnalyzerm_channelAnalyzer
 
SpectrumScopeComboVism_spectrumScopeComboVis
 
SpectrumVism_spectrumVis
 
ScopeVism_scopeVis
 
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 42 of file chanalyzergui.h.

Constructor & Destructor Documentation

◆ ChannelAnalyzerGUI()

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

Definition at line 387 of file chanalyzergui.cpp.

References DeviceUISet::addChannelMarker(), DeviceUISet::addRollupWidget(), applySettings(), arg(), channelMarkerChangedByCursor(), channelMarkerHighlightedByCursor(), displaySettings(), ChannelMarker::getColor(), getInputMessageQueue(), BasebandSampleSink::getInputMessageQueue(), MainWindow::getInstance(), ColorMapper::GrayGold, ColorMapper::GrayGreenYellow, handleInputMessages(), m_channelAnalyzer, ChannelAnalyzer::m_channelIdURI, m_channelMarker, m_deviceUISet, m_rate, m_scopeVis, m_settings, m_spectrumScopeComboVis, m_spectrumVis, onMenuDialogCalled(), onWidgetRolled(), DeviceUISet::registerRxChannelInstance(), SDR_RX_SCALEF, ChannelMarker::setBandwidth(), ChannelMarker::setCenterFrequency(), ChannelAnalyzerSettings::setChannelMarker(), ChannelMarker::setColor(), BasebandSampleSink::setMessageQueueToGUI(), ChannelAnalyzer::setSampleSink(), ChannelAnalyzerSettings::setScopeGUI(), ChannelMarker::setSidebands(), ChannelAnalyzerSettings::setSpectrumGUI(), ChannelMarker::setTitle(), RollupWidget::setTitleColor(), ChannelMarker::setVisible(), tick(), ui, ChannelMarker::usb, and RollupWidget::widgetRolled().

Referenced by create().

387  :
388  RollupWidget(parent),
389  ui(new Ui::ChannelAnalyzerGUI),
390  m_pluginAPI(pluginAPI),
391  m_deviceUISet(deviceUISet),
392  m_channelMarker(this),
393  m_doApplySettings(true),
394  m_rate(48000)
395 {
396  ui->setupUi(this);
397  setAttribute(Qt::WA_DeleteOnClose, true);
398  connect(this, SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool)));
399  connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(onMenuDialogCalled(const QPoint &)));
400 
401  m_spectrumVis = new SpectrumVis(SDR_RX_SCALEF, ui->glSpectrum);
402  m_scopeVis = new ScopeVis(ui->glScope);
404  m_channelAnalyzer = (ChannelAnalyzer*) rxChannel; //new ChannelAnalyzer(m_deviceUISet->m_deviceSourceAPI);
407 
408  ui->deltaFrequencyLabel->setText(QString("%1f").arg(QChar(0x94, 0x03)));
409  ui->deltaFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold));
410  ui->deltaFrequency->setValueRange(false, 7, -9999999, 9999999);
411 
412  ui->channelSampleRate->setColorMapper(ColorMapper(ColorMapper::GrayGreenYellow));
413  ui->channelSampleRate->setValueRange(7, 0.501*m_rate, m_rate);
414 
415  ui->glSpectrum->setCenterFrequency(m_rate/2);
416  ui->glSpectrum->setSampleRate(m_rate);
417  ui->glSpectrum->setDisplayWaterfall(true);
418  ui->glSpectrum->setDisplayMaxHold(true);
419  ui->glSpectrum->setSsbSpectrum(false);
420  ui->glSpectrum->setLsbDisplay(false);
421 
422  ui->glSpectrum->connectTimer(MainWindow::getInstance()->getMasterTimer());
423  ui->glScope->connectTimer(MainWindow::getInstance()->getMasterTimer());
424  connect(&MainWindow::getInstance()->getMasterTimer(), SIGNAL(timeout()), this, SLOT(tick()));
425 
426  m_channelMarker.blockSignals(true);
427  m_channelMarker.setColor(Qt::gray);
431  m_channelMarker.setTitle("Channel Analyzer");
432  m_channelMarker.blockSignals(false);
433  m_channelMarker.setVisible(true); // activate signal on the last setting only
435 
439 
440  ui->spectrumGUI->setBuddies(m_spectrumVis->getInputMessageQueue(), m_spectrumVis, ui->glSpectrum);
441  ui->scopeGUI->setBuddies(m_scopeVis->getInputMessageQueue(), m_scopeVis, ui->glScope);
442 
444  m_settings.setSpectrumGUI(ui->spectrumGUI);
445  m_settings.setScopeGUI(ui->scopeGUI);
446 
447  connect(&m_channelMarker, SIGNAL(changedByCursor()), this, SLOT(channelMarkerChangedByCursor()));
448  connect(&m_channelMarker, SIGNAL(highlightedByCursor()), this, SLOT(channelMarkerHighlightedByCursor()));
449  connect(getInputMessageQueue(), SIGNAL(messageEnqueued()), this, SLOT(handleInputMessages()));
450 
451  displaySettings();
452  applySettings(true);
453 }
static MainWindow * getInstance()
Definition: mainwindow.h:73
SpectrumScopeComboVis * m_spectrumScopeComboVis
Definition: chanalyzergui.h:75
DeviceUISet * m_deviceUISet
Definition: chanalyzergui.h:67
int m_rate
sample rate after final in-channel decimation (spanlog2)
Definition: chanalyzergui.h:71
void applySettings(bool force=false)
void setChannelMarker(Serializable *channelMarker)
MessageQueue * getInputMessageQueue()
Get the queue for asynchronous inbound communication.
void onMenuDialogCalled(const QPoint &p)
void addChannelMarker(ChannelMarker *channelMarker)
Add channel marker to spectrum.
Definition: deviceuiset.cpp:72
Fixed< IntType, IntBits > arg(const std::complex< Fixed< IntType, IntBits > > &val)
Definition: fixed.h:2401
SpectrumVis * m_spectrumVis
Definition: chanalyzergui.h:76
#define SDR_RX_SCALEF
Definition: dsptypes.h:33
RollupWidget(QWidget *parent=NULL)
Definition: rollupwidget.cpp:7
void onWidgetRolled(QWidget *widget, bool rollDown)
PluginAPI * m_pluginAPI
Definition: chanalyzergui.h:66
void setScopeGUI(Serializable *scopeGUI)
void channelMarkerChangedByCursor()
void setSpectrumGUI(Serializable *spectrumGUI)
virtual void setMessageQueueToGUI(MessageQueue *queue)
void setTitleColor(const QColor &c)
void setSampleSink(BasebandSampleSink *sampleSink)
Definition: chanalyzer.h:112
void registerRxChannelInstance(const QString &channelName, PluginInstanceGUI *pluginGUI)
Definition: deviceuiset.cpp:82
void addRollupWidget(QWidget *widget)
Add rollup widget to channel window.
Definition: deviceuiset.cpp:77
ScopeVis * m_scopeVis
Definition: chanalyzergui.h:77
ChannelMarker m_channelMarker
Definition: chanalyzergui.h:68
void setColor(const QColor &color)
void setVisible(bool visible)
void setBandwidth(int bandwidth)
const QColor & getColor() const
Definition: channelmarker.h:64
void setTitle(const QString &title)
void setCenterFrequency(int centerFrequency)
void setSidebands(sidebands_t sidebands)
Ui::ChannelAnalyzerGUI * ui
Definition: chanalyzergui.h:65
ChannelAnalyzerSettings m_settings
Definition: chanalyzergui.h:69
static const QString m_channelIdURI
Definition: chanalyzer.h:157
void widgetRolled(QWidget *widget, bool rollDown)
virtual MessageQueue * getInputMessageQueue()
Definition: chanalyzergui.h:57
ChannelAnalyzer * m_channelAnalyzer
Definition: chanalyzergui.h:74
void channelMarkerHighlightedByCursor()
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ~ChannelAnalyzerGUI()

ChannelAnalyzerGUI::~ChannelAnalyzerGUI ( )
privatevirtual

Definition at line 455 of file chanalyzergui.cpp.

References m_channelAnalyzer, m_deviceUISet, m_scopeVis, m_spectrumScopeComboVis, m_spectrumVis, DeviceUISet::removeRxChannelInstance(), and ui.

456 {
458  delete m_channelAnalyzer; // TODO: check this: when the GUI closes it has to delete the demodulator
459  delete m_spectrumVis;
460  delete m_scopeVis;
462  delete ui;
463 }
SpectrumScopeComboVis * m_spectrumScopeComboVis
Definition: chanalyzergui.h:75
DeviceUISet * m_deviceUISet
Definition: chanalyzergui.h:67
SpectrumVis * m_spectrumVis
Definition: chanalyzergui.h:76
void removeRxChannelInstance(PluginInstanceGUI *pluginGUI)
Definition: deviceuiset.cpp:94
ScopeVis * m_scopeVis
Definition: chanalyzergui.h:77
Ui::ChannelAnalyzerGUI * ui
Definition: chanalyzergui.h:65
ChannelAnalyzer * m_channelAnalyzer
Definition: chanalyzergui.h:74
+ Here is the call graph for this function:

Member Function Documentation

◆ applySettings()

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

Definition at line 546 of file chanalyzergui.cpp.

References ChannelAnalyzer::MsgConfigureChannelAnalyzer::create(), ChannelAnalyzer::MsgConfigureChannelizer::create(), ChannelMarker::getCenterFrequency(), BasebandSampleSink::getInputMessageQueue(), getRequestedChannelSampleRate(), m_channelAnalyzer, m_channelMarker, m_doApplySettings, m_scopeVis, m_settings, ChannelAnalyzerSettings::m_spanLog2, MessageQueue::push(), and ScopeVis::setLiveRateLog2Decim().

Referenced by ChannelAnalyzerGUI(), channelMarkerChangedByCursor(), deserialize(), on_BW_valueChanged(), on_channelSampleRate_changed(), on_deltaFrequency_changed(), on_lowCut_valueChanged(), on_pll_toggled(), on_pllPskOrder_currentIndexChanged(), on_rrcFilter_toggled(), on_rrcRolloff_valueChanged(), on_signalSelect_currentIndexChanged(), on_spanLog2_currentIndexChanged(), on_ssb_toggled(), on_useRationalDownsampler_toggled(), onMenuDialogCalled(), and setCenterFrequency().

547 {
548  if (m_doApplySettings)
549  {
550  int sampleRate = getRequestedChannelSampleRate();
551 
554  m_channelAnalyzer->getInputMessageQueue()->push(msgChannelizer);
555 
559 
561  }
562 }
int getCenterFrequency() const
Definition: channelmarker.h:42
static MsgConfigureChannelizer * create(int sampleRate, int centerFrequency)
Definition: chanalyzer.h:76
void push(Message *message, bool emitSignal=true)
Push message onto queue.
MessageQueue * getInputMessageQueue()
Get the queue for asynchronous inbound communication.
int getRequestedChannelSampleRate()
ScopeVis * m_scopeVis
Definition: chanalyzergui.h:77
ChannelMarker m_channelMarker
Definition: chanalyzergui.h:68
static MsgConfigureChannelAnalyzer * create(const ChannelAnalyzerSettings &settings, bool force)
Definition: chanalyzer.h:53
void setLiveRateLog2Decim(int log2Decim)
Definition: scopevis.cpp:92
ChannelAnalyzerSettings m_settings
Definition: chanalyzergui.h:69
ChannelAnalyzer * m_channelAnalyzer
Definition: chanalyzergui.h:74
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ blockApplySettings()

void ChannelAnalyzerGUI::blockApplySettings ( bool  block)
private

Definition at line 539 of file chanalyzergui.cpp.

References m_doApplySettings, and ui.

Referenced by displaySettings().

540 {
541  ui->glScope->blockSignals(block);
542  ui->glSpectrum->blockSignals(block);
543  m_doApplySettings = !block;
544 }
Ui::ChannelAnalyzerGUI * ui
Definition: chanalyzergui.h:65
+ Here is the caller graph for this function:

◆ channelMarkerChangedByCursor

void ChannelAnalyzerGUI::channelMarkerChangedByCursor ( )
slot

Definition at line 218 of file chanalyzergui.cpp.

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

Referenced by ChannelAnalyzerGUI().

219 {
220  ui->deltaFrequency->setValue(m_channelMarker.getCenterFrequency());
221  applySettings();
222 }
int getCenterFrequency() const
Definition: channelmarker.h:42
void applySettings(bool force=false)
ChannelMarker m_channelMarker
Definition: chanalyzergui.h:68
Ui::ChannelAnalyzerGUI * ui
Definition: chanalyzergui.h:65
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ channelMarkerHighlightedByCursor

void ChannelAnalyzerGUI::channelMarkerHighlightedByCursor ( )
slot

Definition at line 224 of file chanalyzergui.cpp.

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

Referenced by ChannelAnalyzerGUI().

225 {
227 }
bool getHighlighted() const
Definition: channelmarker.h:61
ChannelMarker m_channelMarker
Definition: chanalyzergui.h:68
void setHighlighted(bool highlighted)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ create()

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

Definition at line 39 of file chanalyzergui.cpp.

References ChannelAnalyzerGUI().

Referenced by ChannelAnalyzerPlugin::createRxChannelGUI().

40 {
41  ChannelAnalyzerGUI* gui = new ChannelAnalyzerGUI(pluginAPI, deviceUISet, rxChannel);
42  return gui;
43 }
ChannelAnalyzerGUI(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 ChannelAnalyzerGUI::deserialize ( const QByteArray &  data)
virtual

Implements PluginInstanceGUI.

Definition at line 170 of file chanalyzergui.cpp.

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

171 {
172  if(m_settings.deserialize(data))
173  {
174  displaySettings();
175  applySettings(true); // will have true
176  return true;
177  }
178  else
179  {
181  displaySettings();
182  applySettings(true); // will have true
183  return false;
184  }
185 }
void applySettings(bool force=false)
bool deserialize(const QByteArray &data)
ChannelAnalyzerSettings m_settings
Definition: chanalyzergui.h:69
+ Here is the call graph for this function:

◆ destroy()

void ChannelAnalyzerGUI::destroy ( )
virtual

Implements PluginInstanceGUI.

Definition at line 45 of file chanalyzergui.cpp.

46 {
47  delete this;
48 }

◆ displayPLLSettings()

void ChannelAnalyzerGUI::displayPLLSettings ( )
private

Definition at line 130 of file chanalyzergui.cpp.

References i, ChannelAnalyzerSettings::m_fll, ChannelAnalyzerSettings::m_pll, ChannelAnalyzerSettings::m_pllPskOrder, m_settings, and ui.

Referenced by displaySettings().

131 {
132  if (m_settings.m_fll)
133  {
134  ui->pllPskOrder->setCurrentIndex(5);
135  }
136  else
137  {
138  int i = 0;
139  for(; ((m_settings.m_pllPskOrder>>i) & 1) == 0; i++);
140  ui->pllPskOrder->setCurrentIndex(i);
141  }
142 
143  ui->pll->setChecked(m_settings.m_pll);
144 }
int32_t i
Definition: decimators.h:244
Ui::ChannelAnalyzerGUI * ui
Definition: chanalyzergui.h:65
ChannelAnalyzerSettings m_settings
Definition: chanalyzergui.h:69
+ Here is the caller graph for this function:

◆ displaySettings()

void ChannelAnalyzerGUI::displaySettings ( )
private

Definition at line 77 of file chanalyzergui.cpp.

References blockApplySettings(), displayPLLSettings(), ChannelMarker::dsb, ChannelAnalyzer::getInputSampleRate(), ChannelMarker::getTitle(), ChannelMarker::lsb, ChannelAnalyzerSettings::m_bandwidth, m_channelAnalyzer, m_channelMarker, ChannelAnalyzerSettings::m_downSample, ChannelAnalyzerSettings::m_downSampleRate, ChannelAnalyzerSettings::m_frequency, ChannelAnalyzerSettings::m_inputType, ChannelAnalyzerSettings::m_lowCutoff, ChannelAnalyzerSettings::m_rgbColor, ChannelAnalyzerSettings::m_rrc, ChannelAnalyzerSettings::m_rrcRolloff, m_settings, ChannelAnalyzerSettings::m_spanLog2, ChannelAnalyzerSettings::m_ssb, ChannelAnalyzerSettings::m_title, ChannelMarker::setBandwidth(), ChannelMarker::setCenterFrequency(), ChannelMarker::setColor(), ChannelMarker::setLowCutoff(), setNewFinalRate(), ChannelMarker::setSidebands(), ChannelMarker::setTitle(), RollupWidget::setTitleColor(), ui, and ChannelMarker::usb.

Referenced by ChannelAnalyzerGUI(), and deserialize().

78 {
79  m_channelMarker.blockSignals(true);
84 
85  if (m_settings.m_ssb)
86  {
87  if (m_settings.m_bandwidth < 0) {
89  } else {
91  }
92  }
93  else
94  {
96  }
97 
98  m_channelMarker.blockSignals(false);
99  m_channelMarker.setColor(m_settings.m_rgbColor); // activate signal on the last setting only
100 
102  setWindowTitle(m_channelMarker.getTitle());
103 
104  ui->channelSampleRate->setValueRange(7, 0.501*m_channelAnalyzer->getInputSampleRate(), m_channelAnalyzer->getInputSampleRate());
105  ui->channelSampleRate->setValue(m_settings.m_downSampleRate);
106 
107  blockApplySettings(true);
108 
109  ui->useRationalDownsampler->setChecked(m_settings.m_downSample);
110  setNewFinalRate();
111  if (m_settings.m_ssb) {
112  ui->BWLabel->setText("LP");
113  } else {
114  ui->BWLabel->setText("BP");
115  }
116  ui->ssb->setChecked(m_settings.m_ssb);
117  ui->BW->setValue(m_settings.m_bandwidth/100);
118  ui->lowCut->setValue(m_settings.m_lowCutoff/100);
119  ui->deltaFrequency->setValue(m_settings.m_frequency);
120  ui->spanLog2->setCurrentIndex(m_settings.m_spanLog2);
122  ui->signalSelect->setCurrentIndex((int) m_settings.m_inputType);
123  ui->rrcFilter->setChecked(m_settings.m_rrc);
124  QString rolloffStr = QString::number(m_settings.m_rrcRolloff/100.0, 'f', 2);
125  ui->rrcRolloffText->setText(rolloffStr);
126 
127  blockApplySettings(false);
128 }
void setLowCutoff(int lowCutoff)
void blockApplySettings(bool block)
void setTitleColor(const QColor &c)
quint32 m_rrcRolloff
in 100ths
const QString & getTitle() const
Definition: channelmarker.h:38
ChannelMarker m_channelMarker
Definition: chanalyzergui.h:68
int getInputSampleRate() const
Definition: chanalyzer.h:125
void setColor(const QColor &color)
void setNewFinalRate()
set sample rate after final in-channel decimation
void setBandwidth(int bandwidth)
void setTitle(const QString &title)
void setCenterFrequency(int centerFrequency)
void setSidebands(sidebands_t sidebands)
Ui::ChannelAnalyzerGUI * ui
Definition: chanalyzergui.h:65
ChannelAnalyzerSettings m_settings
Definition: chanalyzergui.h:69
ChannelAnalyzer * m_channelAnalyzer
Definition: chanalyzergui.h:74
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ enterEvent()

void ChannelAnalyzerGUI::enterEvent ( QEvent *  )
private

Definition at line 569 of file chanalyzergui.cpp.

References m_channelMarker, and ChannelMarker::setHighlighted().

570 {
572 }
void setHighlighted(bool highlighted)
ChannelMarker m_channelMarker
Definition: chanalyzergui.h:68
+ Here is the call graph for this function:

◆ getCenterFrequency()

qint64 ChannelAnalyzerGUI::getCenterFrequency ( ) const
virtual

Implements PluginInstanceGUI.

Definition at line 60 of file chanalyzergui.cpp.

References ChannelMarker::getCenterFrequency(), and m_channelMarker.

61 {
63 }
int getCenterFrequency() const
Definition: channelmarker.h:42
ChannelMarker m_channelMarker
Definition: chanalyzergui.h:68
+ Here is the call graph for this function:

◆ getInputMessageQueue()

virtual MessageQueue* ChannelAnalyzerGUI::getInputMessageQueue ( )
inlinevirtual

Implements PluginInstanceGUI.

Definition at line 57 of file chanalyzergui.h.

Referenced by ChannelAnalyzerGUI(), and handleInputMessages().

57 { return &m_inputMessageQueue; }
MessageQueue m_inputMessageQueue
Definition: chanalyzergui.h:78
+ Here is the caller graph for this function:

◆ getName()

QString ChannelAnalyzerGUI::getName ( ) const
virtual

Implements PluginInstanceGUI.

Definition at line 55 of file chanalyzergui.cpp.

56 {
57  return objectName();
58 }

◆ getRequestedChannelSampleRate()

int ChannelAnalyzerGUI::getRequestedChannelSampleRate ( )
private

Definition at line 283 of file chanalyzergui.cpp.

References ChannelAnalyzer::getChannelizer(), DownChannelizer::getInputSampleRate(), m_channelAnalyzer, and ui.

Referenced by applySettings(), and setNewFinalRate().

284 {
285  if (ui->useRationalDownsampler->isChecked()) {
286  return ui->channelSampleRate->getValueNew();
287  } else {
289  }
290 }
DownChannelizer * getChannelizer()
Definition: chanalyzer.h:124
int getInputSampleRate() const
Ui::ChannelAnalyzerGUI * ui
Definition: chanalyzergui.h:65
ChannelAnalyzer * m_channelAnalyzer
Definition: chanalyzergui.h:74
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ handleInputMessages

void ChannelAnalyzerGUI::handleInputMessages ( )
privateslot

Definition at line 203 of file chanalyzergui.cpp.

References Message::getIdentifier(), getInputMessageQueue(), and handleMessage().

Referenced by ChannelAnalyzerGUI().

204 {
205  Message* message;
206 
207  while ((message = getInputMessageQueue()->pop()) != 0)
208  {
209  qDebug("ChannelAnalyzerGUI::handleInputMessages: message: %s", message->getIdentifier());
210 
211  if (handleMessage(*message))
212  {
213  delete message;
214  }
215  }
216 }
virtual bool handleMessage(const Message &message)
virtual const char * getIdentifier() const
Definition: message.cpp:35
virtual MessageQueue * getInputMessageQueue()
Definition: chanalyzergui.h:57
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ handleMessage()

bool ChannelAnalyzerGUI::handleMessage ( const Message message)
virtual

Implements PluginInstanceGUI.

Definition at line 187 of file chanalyzergui.cpp.

References ChannelAnalyzer::getInputSampleRate(), m_channelAnalyzer, ChannelAnalyzerSettings::m_downSampleRate, m_settings, Message::match(), setNewFinalRate(), and ui.

Referenced by handleInputMessages().

188 {
190  {
191  qDebug() << "ChannelAnalyzerGUI::handleMessage: MsgReportChannelSampleRateChanged:" << m_channelAnalyzer->getInputSampleRate();
192  ui->channelSampleRate->setValueRange(7, 0.501*m_channelAnalyzer->getInputSampleRate(), m_channelAnalyzer->getInputSampleRate());
193  ui->channelSampleRate->setValue(m_settings.m_downSampleRate);
194  m_settings.m_downSampleRate = ui->channelSampleRate->getValueNew();
195  setNewFinalRate();
196 
197  return true;
198  }
199 
200  return false;
201 }
static bool match(const Message *message)
Definition: message.cpp:45
int getInputSampleRate() const
Definition: chanalyzer.h:125
void setNewFinalRate()
set sample rate after final in-channel decimation
Ui::ChannelAnalyzerGUI * ui
Definition: chanalyzergui.h:65
ChannelAnalyzerSettings m_settings
Definition: chanalyzergui.h:69
ChannelAnalyzer * m_channelAnalyzer
Definition: chanalyzergui.h:74
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ leaveEvent()

void ChannelAnalyzerGUI::leaveEvent ( QEvent *  )
private

Definition at line 564 of file chanalyzergui.cpp.

References m_channelMarker, and ChannelMarker::setHighlighted().

565 {
567 }
void setHighlighted(bool highlighted)
ChannelMarker m_channelMarker
Definition: chanalyzergui.h:68
+ Here is the call graph for this function:

◆ on_BW_valueChanged

void ChannelAnalyzerGUI::on_BW_valueChanged ( int  value)
privateslot

Definition at line 319 of file chanalyzergui.cpp.

References applySettings(), ChannelAnalyzerSettings::m_bandwidth, ChannelAnalyzerSettings::m_lowCutoff, m_settings, setFiltersUIBoundaries(), and ui.

320 {
321  (void) value;
323  m_settings.m_bandwidth = ui->BW->value() * 100;
324  m_settings.m_lowCutoff = ui->lowCut->value() * 100;
325  applySettings();
326 }
void applySettings(bool force=false)
Ui::ChannelAnalyzerGUI * ui
Definition: chanalyzergui.h:65
ChannelAnalyzerSettings m_settings
Definition: chanalyzergui.h:69
+ Here is the call graph for this function:

◆ on_channelSampleRate_changed

void ChannelAnalyzerGUI::on_channelSampleRate_changed ( quint64  value)
privateslot

Definition at line 249 of file chanalyzergui.cpp.

References applySettings(), ChannelAnalyzerSettings::m_downSampleRate, m_settings, and setNewFinalRate().

250 {
252  setNewFinalRate();
253  applySettings();
254 }
void applySettings(bool force=false)
void setNewFinalRate()
set sample rate after final in-channel decimation
ChannelAnalyzerSettings m_settings
Definition: chanalyzergui.h:69
+ Here is the call graph for this function:

◆ on_deltaFrequency_changed

void ChannelAnalyzerGUI::on_deltaFrequency_changed ( qint64  value)
privateslot

Definition at line 298 of file chanalyzergui.cpp.

References applySettings(), ChannelMarker::getCenterFrequency(), m_channelMarker, ChannelAnalyzerSettings::m_frequency, m_settings, and ChannelMarker::setCenterFrequency().

299 {
302  applySettings();
303 }
int getCenterFrequency() const
Definition: channelmarker.h:42
void applySettings(bool force=false)
ChannelMarker m_channelMarker
Definition: chanalyzergui.h:68
void setCenterFrequency(int centerFrequency)
ChannelAnalyzerSettings m_settings
Definition: chanalyzergui.h:69
+ Here is the call graph for this function:

◆ on_lowCut_valueChanged

void ChannelAnalyzerGUI::on_lowCut_valueChanged ( int  value)
privateslot

Definition at line 328 of file chanalyzergui.cpp.

References applySettings(), ChannelAnalyzerSettings::m_bandwidth, ChannelAnalyzerSettings::m_lowCutoff, m_settings, setFiltersUIBoundaries(), and ui.

329 {
330  (void) value;
332  m_settings.m_bandwidth = ui->BW->value() * 100;
333  m_settings.m_lowCutoff = ui->lowCut->value() * 100;
334  applySettings();
335 }
void applySettings(bool force=false)
Ui::ChannelAnalyzerGUI * ui
Definition: chanalyzergui.h:65
ChannelAnalyzerSettings m_settings
Definition: chanalyzergui.h:69
+ Here is the call graph for this function:

◆ on_pll_toggled

void ChannelAnalyzerGUI::on_pll_toggled ( bool  checked)
privateslot

Definition at line 256 of file chanalyzergui.cpp.

References applySettings(), ChannelAnalyzerSettings::m_pll, m_settings, and ui.

257 {
258  if (!checked) {
259  ui->pll->setToolTip(tr("PLL lock"));
260  }
261 
262  m_settings.m_pll = checked;
263  applySettings();
264 }
void applySettings(bool force=false)
Ui::ChannelAnalyzerGUI * ui
Definition: chanalyzergui.h:65
ChannelAnalyzerSettings m_settings
Definition: chanalyzergui.h:69
+ Here is the call graph for this function:

◆ on_pllPskOrder_currentIndexChanged

void ChannelAnalyzerGUI::on_pllPskOrder_currentIndexChanged ( int  index)
privateslot

Definition at line 266 of file chanalyzergui.cpp.

References applySettings(), ChannelAnalyzerSettings::m_fll, ChannelAnalyzerSettings::m_pllPskOrder, and m_settings.

267 {
268  if (index < 5) {
269  m_settings.m_pllPskOrder = (1<<index);
270  }
271 
272  m_settings.m_fll = (index == 5);
273  applySettings();
274 }
void applySettings(bool force=false)
ChannelAnalyzerSettings m_settings
Definition: chanalyzergui.h:69
+ Here is the call graph for this function:

◆ on_rrcFilter_toggled

void ChannelAnalyzerGUI::on_rrcFilter_toggled ( bool  checked)
privateslot

Definition at line 305 of file chanalyzergui.cpp.

References applySettings(), ChannelAnalyzerSettings::m_rrc, and m_settings.

306 {
307  m_settings.m_rrc = checked;
308  applySettings();
309 }
void applySettings(bool force=false)
ChannelAnalyzerSettings m_settings
Definition: chanalyzergui.h:69
+ Here is the call graph for this function:

◆ on_rrcRolloff_valueChanged

void ChannelAnalyzerGUI::on_rrcRolloff_valueChanged ( int  value)
privateslot

Definition at line 311 of file chanalyzergui.cpp.

References applySettings(), ChannelAnalyzerSettings::m_rrcRolloff, m_settings, and ui.

312 {
313  m_settings.m_rrcRolloff = value;
314  QString rolloffStr = QString::number(value/100.0, 'f', 2);
315  ui->rrcRolloffText->setText(rolloffStr);
316  applySettings();
317 }
void applySettings(bool force=false)
quint32 m_rrcRolloff
in 100ths
Ui::ChannelAnalyzerGUI * ui
Definition: chanalyzergui.h:65
ChannelAnalyzerSettings m_settings
Definition: chanalyzergui.h:69
+ Here is the call graph for this function:

◆ on_signalSelect_currentIndexChanged

void ChannelAnalyzerGUI::on_signalSelect_currentIndexChanged ( int  index)
privateslot

Definition at line 292 of file chanalyzergui.cpp.

References applySettings(), ChannelAnalyzerSettings::m_inputType, and m_settings.

293 {
295  applySettings();
296 }
void applySettings(bool force=false)
ChannelAnalyzerSettings m_settings
Definition: chanalyzergui.h:69
+ Here is the call graph for this function:

◆ on_spanLog2_currentIndexChanged

void ChannelAnalyzerGUI::on_spanLog2_currentIndexChanged ( int  index)
privateslot

Definition at line 337 of file chanalyzergui.cpp.

References applySettings(), m_settings, ChannelAnalyzerSettings::m_spanLog2, and setNewFinalRate().

338 {
339  if ((index < 0) || (index > 6)) {
340  return;
341  }
342 
343  m_settings.m_spanLog2 = index;
344  setNewFinalRate();
345  applySettings();
346 }
void applySettings(bool force=false)
void setNewFinalRate()
set sample rate after final in-channel decimation
ChannelAnalyzerSettings m_settings
Definition: chanalyzergui.h:69
+ Here is the call graph for this function:

◆ on_ssb_toggled

void ChannelAnalyzerGUI::on_ssb_toggled ( bool  checked)
privateslot

Definition at line 348 of file chanalyzergui.cpp.

References applySettings(), m_settings, ChannelAnalyzerSettings::m_ssb, setFiltersUIBoundaries(), and ui.

349 {
350  m_settings.m_ssb = checked;
351  if (checked) {
352  ui->BWLabel->setText("LP");
353  } else {
354  ui->BWLabel->setText("BP");
355  }
357  applySettings();
358 }
void applySettings(bool force=false)
Ui::ChannelAnalyzerGUI * ui
Definition: chanalyzergui.h:65
ChannelAnalyzerSettings m_settings
Definition: chanalyzergui.h:69
+ Here is the call graph for this function:

◆ on_useRationalDownsampler_toggled

void ChannelAnalyzerGUI::on_useRationalDownsampler_toggled ( bool  checked)
privateslot

Definition at line 276 of file chanalyzergui.cpp.

References applySettings(), ChannelAnalyzerSettings::m_downSample, m_settings, and setNewFinalRate().

277 {
278  m_settings.m_downSample = checked;
279  setNewFinalRate();
280  applySettings();
281 }
void applySettings(bool force=false)
void setNewFinalRate()
set sample rate after final in-channel decimation
ChannelAnalyzerSettings m_settings
Definition: chanalyzergui.h:69
+ Here is the call graph for this function:

◆ onMenuDialogCalled

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

Definition at line 366 of file chanalyzergui.cpp.

References applySettings(), RollupWidget::ContextMenuChannelSettings, ChannelMarker::getCenterFrequency(), ChannelMarker::getColor(), ChannelMarker::getTitle(), m_channelMarker, RollupWidget::m_contextMenuType, ChannelAnalyzerSettings::m_frequency, ChannelAnalyzerSettings::m_rgbColor, m_settings, ChannelAnalyzerSettings::m_title, RollupWidget::resetContextMenuType(), and RollupWidget::setTitleColor().

Referenced by ChannelAnalyzerGUI().

367 {
369  {
371  dialog.move(p);
372  dialog.exec();
373 
377 
378  setWindowTitle(m_settings.m_title);
380 
381  applySettings();
382  }
383 
385 }
int getCenterFrequency() const
Definition: channelmarker.h:42
void applySettings(bool force=false)
void resetContextMenuType()
Definition: rollupwidget.h:50
ContextMenuType m_contextMenuType
Definition: rollupwidget.h:33
void setTitleColor(const QColor &c)
const QString & getTitle() const
Definition: channelmarker.h:38
ChannelMarker m_channelMarker
Definition: chanalyzergui.h:68
const QColor & getColor() const
Definition: channelmarker.h:64
ChannelAnalyzerSettings m_settings
Definition: chanalyzergui.h:69
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ onWidgetRolled

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

Definition at line 360 of file chanalyzergui.cpp.

Referenced by ChannelAnalyzerGUI().

361 {
362  (void) widget;
363  (void) rollDown;
364 }
+ Here is the caller graph for this function:

◆ resetToDefaults()

void ChannelAnalyzerGUI::resetToDefaults ( )
virtual

Implements PluginInstanceGUI.

Definition at line 72 of file chanalyzergui.cpp.

References m_settings, and ChannelAnalyzerSettings::resetToDefaults().

73 {
75 }
ChannelAnalyzerSettings m_settings
Definition: chanalyzergui.h:69
+ Here is the call graph for this function:

◆ serialize()

QByteArray ChannelAnalyzerGUI::serialize ( ) const
virtual

Implements PluginInstanceGUI.

Definition at line 165 of file chanalyzergui.cpp.

References m_settings, and ChannelAnalyzerSettings::serialize().

166 {
167  return m_settings.serialize();
168 }
QByteArray serialize() const
ChannelAnalyzerSettings m_settings
Definition: chanalyzergui.h:69
+ Here is the call graph for this function:

◆ setCenterFrequency()

void ChannelAnalyzerGUI::setCenterFrequency ( qint64  centerFrequency)
virtual

Implements PluginInstanceGUI.

Definition at line 65 of file chanalyzergui.cpp.

References applySettings(), ChannelMarker::getCenterFrequency(), m_channelMarker, ChannelAnalyzerSettings::m_frequency, m_settings, and ChannelMarker::setCenterFrequency().

66 {
67  m_channelMarker.setCenterFrequency(centerFrequency);
69  applySettings();
70 }
int getCenterFrequency() const
Definition: channelmarker.h:42
void applySettings(bool force=false)
ChannelMarker m_channelMarker
Definition: chanalyzergui.h:68
void setCenterFrequency(int centerFrequency)
ChannelAnalyzerSettings m_settings
Definition: chanalyzergui.h:69
+ Here is the call graph for this function:

◆ setFiltersUIBoundaries()

void ChannelAnalyzerGUI::setFiltersUIBoundaries ( )
private

Definition at line 481 of file chanalyzergui.cpp.

References arg(), ChannelMarker::dsb, ChannelMarker::lsb, m_channelMarker, m_rate, ChannelMarker::setBandwidth(), ChannelMarker::setLowCutoff(), ChannelMarker::setSidebands(), setSpectrumDisplay(), ui, and ChannelMarker::usb.

Referenced by on_BW_valueChanged(), on_lowCut_valueChanged(), on_ssb_toggled(), and setNewFinalRate().

482 {
483  bool dsb = !ui->ssb->isChecked();
484  int bw = ui->BW->value();
485  int lw = ui->lowCut->value();
486  int bwMax = m_rate / 200;
487 
488  bw = bw < -bwMax ? -bwMax : bw > bwMax ? bwMax : bw;
489 
490  if (bw < 0) {
491  lw = lw < bw+1 ? bw+1 : lw < 0 ? lw : 0;
492  } else if (bw > 0) {
493  lw = lw > bw-1 ? bw-1 : lw < 0 ? 0 : lw;
494  } else {
495  lw = 0;
496  }
497 
498  if (dsb)
499  {
500  bw = bw < 0 ? -bw : bw;
501  lw = 0;
502  }
503 
504  QString bwStr = QString::number(bw/10.0, 'f', 1);
505  QString lwStr = QString::number(lw/10.0, 'f', 1);
506 
507  if (dsb) {
508  ui->BWText->setText(tr("%1%2k").arg(QChar(0xB1, 0x00)).arg(bwStr));
509  } else {
510  ui->BWText->setText(tr("%1k").arg(bwStr));
511  }
512 
513  ui->lowCutText->setText(tr("%1k").arg(lwStr));
514 
515  ui->BW->blockSignals(true);
516  ui->lowCut->blockSignals(true);
517 
518  ui->BW->setMaximum(bwMax);
519  ui->BW->setMinimum(dsb ? 0 : -bwMax);
520  ui->BW->setValue(bw);
521 
522  ui->lowCut->setMaximum(dsb ? 0 : bw);
523  ui->lowCut->setMinimum(dsb ? 0 : -bw);
524  ui->lowCut->setValue(lw);
525 
526  ui->lowCut->blockSignals(false);
527  ui->BW->blockSignals(false);
528 
530 
531  m_channelMarker.setBandwidth(bw * 200);
533 
534  if (!dsb) {
535  m_channelMarker.setLowCutoff(lw * 100);
536  }
537 }
void setLowCutoff(int lowCutoff)
int m_rate
sample rate after final in-channel decimation (spanlog2)
Definition: chanalyzergui.h:71
Fixed< IntType, IntBits > arg(const std::complex< Fixed< IntType, IntBits > > &val)
Definition: fixed.h:2401
ChannelMarker m_channelMarker
Definition: chanalyzergui.h:68
void setBandwidth(int bandwidth)
void setSidebands(sidebands_t sidebands)
Ui::ChannelAnalyzerGUI * ui
Definition: chanalyzergui.h:65
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setName()

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

Implements PluginInstanceGUI.

Definition at line 50 of file chanalyzergui.cpp.

51 {
52  setObjectName(name);
53 }

◆ setNewFinalRate()

void ChannelAnalyzerGUI::setNewFinalRate ( )
private

set sample rate after final in-channel decimation

Definition at line 465 of file chanalyzergui.cpp.

References arg(), getRequestedChannelSampleRate(), m_rate, m_scopeVis, m_settings, ChannelAnalyzerSettings::m_spanLog2, setFiltersUIBoundaries(), ScopeVis::setLiveRate(), and ui.

Referenced by displaySettings(), handleMessage(), on_channelSampleRate_changed(), on_spanLog2_currentIndexChanged(), and on_useRationalDownsampler_toggled().

466 {
468  if (m_rate == 0) {
469  m_rate = 48000;
470  }
471  qDebug("ChannelAnalyzerGUI::setNewFinalRate: %d m_spanLog2: %d", m_rate, m_settings.m_spanLog2);
472 
474 
475  QString s = QString::number(m_rate/1000.0, 'f', 1);
476  ui->spanText->setText(tr("%1 kS/s").arg(s));
477 
479 }
int m_rate
sample rate after final in-channel decimation (spanlog2)
Definition: chanalyzergui.h:71
int getRequestedChannelSampleRate()
void setLiveRate(int sampleRate)
Definition: scopevis.cpp:83
Fixed< IntType, IntBits > arg(const std::complex< Fixed< IntType, IntBits > > &val)
Definition: fixed.h:2401
ScopeVis * m_scopeVis
Definition: chanalyzergui.h:77
Ui::ChannelAnalyzerGUI * ui
Definition: chanalyzergui.h:65
ChannelAnalyzerSettings m_settings
Definition: chanalyzergui.h:69
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setSpectrumDisplay()

void ChannelAnalyzerGUI::setSpectrumDisplay ( )
private

Definition at line 146 of file chanalyzergui.cpp.

References m_rate, m_settings, ChannelAnalyzerSettings::m_ssb, and ui.

Referenced by setFiltersUIBoundaries().

147 {
148  qDebug("ChannelAnalyzerGUI::setSpectrumDisplay: m_rate: %d", m_rate);
149  if (m_settings.m_ssb)
150  {
151  ui->glSpectrum->setCenterFrequency(m_rate/4);
152  ui->glSpectrum->setSampleRate(m_rate/2);
153  ui->glSpectrum->setSsbSpectrum(true);
154  ui->glSpectrum->setLsbDisplay(ui->BW->value() < 0);
155  }
156  else
157  {
158  ui->glSpectrum->setCenterFrequency(0);
159  ui->glSpectrum->setSampleRate(m_rate);
160  ui->glSpectrum->setSsbSpectrum(false);
161  ui->glSpectrum->setLsbDisplay(false);
162  }
163 }
int m_rate
sample rate after final in-channel decimation (spanlog2)
Definition: chanalyzergui.h:71
Ui::ChannelAnalyzerGUI * ui
Definition: chanalyzergui.h:65
ChannelAnalyzerSettings m_settings
Definition: chanalyzergui.h:69
+ Here is the caller graph for this function:

◆ tick

void ChannelAnalyzerGUI::tick ( )
privateslot

Definition at line 229 of file chanalyzergui.cpp.

References arg(), CalcDb::dbPower(), ChannelAnalyzer::getChannelSampleRate(), ChannelAnalyzer::getDecimation(), ChannelAnalyzer::getMagSqAvg(), ChannelAnalyzer::getPllFrequency(), ChannelAnalyzer::isPllLocked(), m_channelAnalyzer, m_channelPowerAvg, M_PI, and ui.

Referenced by ChannelAnalyzerGUI().

230 {
232  double powDb = CalcDb::dbPower((double) m_channelPowerAvg);
233  ui->channelPower->setText(tr("%1 dB").arg(powDb, 0, 'f', 1));
234 
236  ui->pll->setStyleSheet("QToolButton { background-color : green; }");
237  } else {
238  ui->pll->setStyleSheet("QToolButton { background:rgb(79,79,79); }");
239  }
240 
241  if (ui->pll->isChecked())
242  {
243  double sampleRate = ((double) m_channelAnalyzer->getChannelSampleRate()) / m_channelAnalyzer->getDecimation();
244  int freq = (m_channelAnalyzer->getPllFrequency() * sampleRate) / (2.0*M_PI);
245  ui->pll->setToolTip(tr("PLL lock. Freq = %1 Hz").arg(freq));
246  }
247 }
double getMagSqAvg() const
Definition: chanalyzer.h:129
static double dbPower(double magsq, double floor=1e-12)
Definition: db.cpp:22
#define M_PI
Definition: rdsdemod.cpp:27
Fixed< IntType, IntBits > arg(const std::complex< Fixed< IntType, IntBits > > &val)
Definition: fixed.h:2401
MovingAverageUtil< double, double, 40 > m_channelPowerAvg
Definition: chanalyzergui.h:72
Real getPllFrequency() const
Definition: chanalyzer.cpp:383
bool isPllLocked() const
Definition: chanalyzer.h:130
Ui::ChannelAnalyzerGUI * ui
Definition: chanalyzergui.h:65
int getChannelSampleRate() const
Definition: chanalyzer.h:126
ChannelAnalyzer * m_channelAnalyzer
Definition: chanalyzergui.h:74
int getDecimation() const
Definition: chanalyzer.h:127
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ m_channelAnalyzer

ChannelAnalyzer* ChannelAnalyzerGUI::m_channelAnalyzer
private

◆ m_channelMarker

ChannelMarker ChannelAnalyzerGUI::m_channelMarker
private

◆ m_channelPowerAvg

MovingAverageUtil<double, double, 40> ChannelAnalyzerGUI::m_channelPowerAvg
private

Definition at line 72 of file chanalyzergui.h.

Referenced by tick().

◆ m_deviceUISet

DeviceUISet* ChannelAnalyzerGUI::m_deviceUISet
private

Definition at line 67 of file chanalyzergui.h.

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

◆ m_doApplySettings

bool ChannelAnalyzerGUI::m_doApplySettings
private

Definition at line 70 of file chanalyzergui.h.

Referenced by applySettings(), and blockApplySettings().

◆ m_inputMessageQueue

MessageQueue ChannelAnalyzerGUI::m_inputMessageQueue
private

Definition at line 78 of file chanalyzergui.h.

◆ m_pluginAPI

PluginAPI* ChannelAnalyzerGUI::m_pluginAPI
private

Definition at line 66 of file chanalyzergui.h.

◆ m_rate

int ChannelAnalyzerGUI::m_rate
private

sample rate after final in-channel decimation (spanlog2)

Definition at line 71 of file chanalyzergui.h.

Referenced by ChannelAnalyzerGUI(), setFiltersUIBoundaries(), setNewFinalRate(), and setSpectrumDisplay().

◆ m_scopeVis

ScopeVis* ChannelAnalyzerGUI::m_scopeVis
private

◆ m_settings

ChannelAnalyzerSettings ChannelAnalyzerGUI::m_settings
private

◆ m_spectrumScopeComboVis

SpectrumScopeComboVis* ChannelAnalyzerGUI::m_spectrumScopeComboVis
private

Definition at line 75 of file chanalyzergui.h.

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

◆ m_spectrumVis

SpectrumVis* ChannelAnalyzerGUI::m_spectrumVis
private

Definition at line 76 of file chanalyzergui.h.

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

◆ ui

Ui::ChannelAnalyzerGUI* ChannelAnalyzerGUI::ui
private

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