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

#include <datvdemodgui.h>

+ Inheritance diagram for DATVDemodGUI:
+ Collaboration diagram for DATVDemodGUI:

Public Member Functions

virtual void destroy ()
 
void setName (const QString &strName)
 
QString getName () const
 
virtual qint64 getCenterFrequency () const
 
virtual void setCenterFrequency (qint64 intCenterFrequency)
 
void resetToDefaults ()
 
QByteArray serialize () const
 
bool deserialize (const QByteArray &arrData)
 
virtual MessageQueuegetInputMessageQueue ()
 
virtual bool handleMessage (const Message &objMessage)
 
- 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 DATVDemodGUIcreate (PluginAPI *objPluginAPI, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel)
 

Static Public Attributes

static const QString m_strChannelID = "sdrangel.channel.demoddatv"
 

Private Slots

void channelMarkerChangedByCursor ()
 
void channelMarkerHighlightedByCursor ()
 
void onWidgetRolled (QWidget *widget, bool rollDown)
 
void onMenuDoubleClicked ()
 
void handleInputMessages ()
 
void audioSelect ()
 
void tick ()
 
void on_cmbStandard_currentIndexChanged (int index)
 
void on_cmbModulation_currentIndexChanged (const QString &arg1)
 
void on_cmbFEC_currentIndexChanged (const QString &arg1)
 
void on_chkViterbi_clicked ()
 
void on_chkHardMetric_clicked ()
 
void on_resetDefaults_clicked ()
 
void on_spiSymbolRate_valueChanged (int arg1)
 
void on_spiNotchFilters_valueChanged (int arg1)
 
void on_chkAllowDrift_clicked ()
 
void on_fullScreen_clicked ()
 
void on_mouseEvent (QMouseEvent *obj)
 
void on_StreamDataAvailable (int *intPackets, int *intBytes, int *intPercent, qint64 *intTotalReceived)
 
void on_StreamMetaDataChanged (DataTSMetaData2 *objMetaData)
 
void on_chkFastlock_clicked ()
 
void on_cmbFilter_currentIndexChanged (int index)
 
void on_spiRollOff_valueChanged (int arg1)
 
void on_spiExcursion_valueChanged (int arg1)
 
void on_deltaFrequency_changed (qint64 value)
 
void on_rfBandwidth_changed (qint64 value)
 
void on_audioMute_toggled (bool checked)
 
void on_audioVolume_valueChanged (int value)
 
void on_videoMute_toggled (bool checked)
 
void on_udpTS_clicked (bool checked)
 
void on_udpTSAddress_editingFinished ()
 
void on_udpTSPort_editingFinished ()
 

Private Member Functions

 DATVDemodGUI (PluginAPI *objPluginAPI, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel, QWidget *objParent=0)
 
virtual ~DATVDemodGUI ()
 
void blockApplySettings (bool blnBlock)
 
void applySettings (bool force=false)
 
void displaySettings ()
 
void displaySystemConfiguration ()
 
QString formatBytes (qint64 intBytes)
 
void displayRRCParameters (bool blnVisible)
 
void leaveEvent (QEvent *)
 
void enterEvent (QEvent *)
 

Private Attributes

Ui::DATVDemodGUI * ui
 
PluginAPIm_objPluginAPI
 
DeviceUISetm_deviceUISet
 
ChannelMarker m_objChannelMarker
 
ThreadedBasebandSampleSinkm_objThreadedChannelizer
 
DownChannelizerm_objChannelizer
 
DATVDemodm_objDATVDemod
 
MessageQueue m_inputMessageQueue
 
int m_intCenterFrequency
 
DATVDemodSettings m_settings
 
QTimer m_objTimer
 
qint64 m_intPreviousDecodedData
 
qint64 m_intLastDecodedData
 
qint64 m_intLastSpeed
 
int m_intReadyDecodedData
 
bool m_blnBasicSettingsShown
 
bool m_blnDoApplySettings
 
bool m_blnButtonPlayClicked
 
int m_modcodModulationIndex
 
int m_modcodCodeRateIndex
 
bool m_cstlnSetByModcod
 
MovingAverageUtil< double, double, 4 > m_objMagSqAverage
 

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 43 of file datvdemodgui.h.

Constructor & Destructor Documentation

◆ DATVDemodGUI()

DATVDemodGUI::DATVDemodGUI ( PluginAPI objPluginAPI,
DeviceUISet deviceUISet,
BasebandSampleSink rxChannel,
QWidget *  objParent = 0 
)
explicitprivate

Definition at line 159 of file datvdemodgui.cpp.

References DeviceUISet::addChannelMarker(), DeviceUISet::addRollupWidget(), arg(), audioSelect(), channelMarkerChangedByCursor(), channelMarkerHighlightedByCursor(), getInputMessageQueue(), ColorMapper::GrayGold, ColorMapper::GrayYellow, handleInputMessages(), DATVDemod::m_channelIdURI, m_deviceUISet, m_intLastDecodedData, m_intLastSpeed, m_intPreviousDecodedData, m_intReadyDecodedData, m_objChannelMarker, m_objDATVDemod, m_objTimer, on_StreamDataAvailable(), on_StreamMetaDataChanged(), DATVideostream::onDataPackets(), DATVideoRender::onMetaDataChanged(), onWidgetRolled(), DeviceUISet::registerRxChannelInstance(), resetToDefaults(), ChannelMarker::setBandwidth(), ChannelMarker::setCenterFrequency(), ChannelMarker::setColor(), BasebandSampleSink::setMessageQueueToGUI(), DATVDemod::SetTVScreen(), DATVDemod::SetVideoRender(), ChannelMarker::setVisible(), tick(), ui, and RollupWidget::widgetRolled().

Referenced by create().

159  :
160  RollupWidget(objParent),
161  ui(new Ui::DATVDemodGUI),
162  m_objPluginAPI(objPluginAPI),
163  m_deviceUISet(deviceUISet),
164  m_objChannelMarker(this),
166  m_blnDoApplySettings(true),
169  m_cstlnSetByModcod(false)
170 {
171  ui->setupUi(this);
172  ui->screenTV->setColor(true);
173  setAttribute(Qt::WA_DeleteOnClose, true);
174  connect(this, SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool)));
175  connect(getInputMessageQueue(), SIGNAL(messageEnqueued()), this, SLOT(handleInputMessages()));
176 
177  m_objDATVDemod = (DATVDemod*) rxChannel;
179 
180  m_objDATVDemod->SetTVScreen(ui->screenTV);
181 
184 
187  m_intLastSpeed=0;
189  m_objTimer.setInterval(1000);
190  connect(&m_objTimer, SIGNAL(timeout()), this, SLOT(tick()));
191  m_objTimer.start();
192 
193  ui->fullScreen->setVisible(false);
194 
195  ui->deltaFrequencyLabel->setText(QString("%1f").arg(QChar(0x94, 0x03)));
196  ui->deltaFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold));
197  ui->deltaFrequency->setValueRange(false, 7, -9999999, 9999999);
198 
199  ui->rfBandwidth->setColorMapper(ColorMapper(ColorMapper::GrayYellow));
200  ui->rfBandwidth->setValueRange(true, 7, 0, 9999999);
201 
202  m_objChannelMarker.blockSignals(true);
203  m_objChannelMarker.setColor(Qt::magenta);
206  m_objChannelMarker.blockSignals(false);
208 
209  connect(&m_objChannelMarker, SIGNAL(changedByCursor()), this, SLOT(channelMarkerChangedByCursor()));
210  connect(&m_objChannelMarker, SIGNAL(highlightedByCursor()), this, SLOT(channelMarkerHighlightedByCursor()));
211 
215 
216  // QPixmap pixmapTarget = QPixmap(":/film.png");
217  // pixmapTarget = pixmapTarget.scaled(16, 16, Qt::KeepAspectRatio, Qt::SmoothTransformation);
218  // ui->videoPlay->setAlignment(Qt::AlignCenter);
219  // ui->videoPlay->setPixmap(pixmapTarget);
220 
221  CRightClickEnabler *audioMuteRightClickEnabler = new CRightClickEnabler(ui->audioMute);
222  connect(audioMuteRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(audioSelect()));
223 
224 
225  resetToDefaults(); // does applySettings()
226 }
int m_modcodModulationIndex
Definition: datvdemodgui.h:123
void audioSelect()
void on_StreamMetaDataChanged(DataTSMetaData2 *objMetaData)
void onMetaDataChanged(DataTSMetaData2 *metaData)
int m_modcodCodeRateIndex
Definition: datvdemodgui.h:124
DATVideostream * SetVideoRender(DATVideoRender *objScreen)
Definition: datvdemod.cpp:118
qint64 m_intLastSpeed
Definition: datvdemodgui.h:117
void on_StreamDataAvailable(int *intPackets, int *intBytes, int *intPercent, qint64 *intTotalReceived)
int m_intReadyDecodedData
Definition: datvdemodgui.h:118
static const QString m_channelIdURI
Definition: datvdemod.h:197
virtual MessageQueue * getInputMessageQueue()
Definition: datvdemodgui.h:60
bool m_blnBasicSettingsShown
Definition: datvdemodgui.h:120
DATVDemod * m_objDATVDemod
Definition: datvdemodgui.h:109
bool m_cstlnSetByModcod
Definition: datvdemodgui.h:125
void addChannelMarker(ChannelMarker *channelMarker)
Add channel marker to spectrum.
Definition: deviceuiset.cpp:72
void channelMarkerChangedByCursor()
Fixed< IntType, IntBits > arg(const std::complex< Fixed< IntType, IntBits > > &val)
Definition: fixed.h:2401
RollupWidget(QWidget *parent=NULL)
Definition: rollupwidget.cpp:7
bool m_blnDoApplySettings
Definition: datvdemodgui.h:121
void channelMarkerHighlightedByCursor()
ChannelMarker m_objChannelMarker
Definition: datvdemodgui.h:106
virtual void setMessageQueueToGUI(MessageQueue *queue)
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
PluginAPI * m_objPluginAPI
Definition: datvdemodgui.h:103
qint64 m_intPreviousDecodedData
Definition: datvdemodgui.h:115
QTimer m_objTimer
Definition: datvdemodgui.h:114
DeviceUISet * m_deviceUISet
Definition: datvdemodgui.h:104
bool SetTVScreen(TVScreen *objScreen)
Definition: datvdemod.cpp:112
void setColor(const QColor &color)
void resetToDefaults()
void onWidgetRolled(QWidget *widget, bool rollDown)
Ui::DATVDemodGUI * ui
Definition: datvdemodgui.h:102
void setVisible(bool visible)
void setBandwidth(int bandwidth)
void setCenterFrequency(int centerFrequency)
void handleInputMessages()
void widgetRolled(QWidget *widget, bool rollDown)
qint64 m_intLastDecodedData
Definition: datvdemodgui.h:116
void onDataPackets(int *intDataPackets, int *intDataBytes, int *intPercentBuffer, qint64 *intTotalReceived)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ~DATVDemodGUI()

DATVDemodGUI::~DATVDemodGUI ( )
privatevirtual

Definition at line 228 of file datvdemodgui.cpp.

References m_deviceUISet, m_objDATVDemod, DeviceUISet::removeRxChannelInstance(), and ui.

229 {
231  delete m_objDATVDemod;
232  delete ui;
233 }
DATVDemod * m_objDATVDemod
Definition: datvdemodgui.h:109
void removeRxChannelInstance(PluginInstanceGUI *pluginGUI)
Definition: deviceuiset.cpp:94
DeviceUISet * m_deviceUISet
Definition: datvdemodgui.h:104
Ui::DATVDemodGUI * ui
Definition: datvdemodgui.h:102
+ Here is the call graph for this function:

Member Function Documentation

◆ applySettings()

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

Definition at line 348 of file datvdemodgui.cpp.

References DATVDemod::MsgConfigureChannelizer::create(), DATVDemod::MsgConfigureDATVDemod::create(), DATVDemodSettings::debug(), ChannelMarker::getCenterFrequency(), ChannelMarker::getColor(), BasebandSampleSink::getInputMessageQueue(), m_blnDoApplySettings, m_objChannelMarker, m_objDATVDemod, m_settings, MessageQueue::push(), and RollupWidget::setTitleColor().

Referenced by audioSelect(), channelMarkerChangedByCursor(), deserialize(), on_audioMute_toggled(), on_audioVolume_valueChanged(), on_chkAllowDrift_clicked(), on_chkFastlock_clicked(), on_chkHardMetric_clicked(), on_chkViterbi_clicked(), on_cmbFEC_currentIndexChanged(), on_cmbFilter_currentIndexChanged(), on_cmbModulation_currentIndexChanged(), on_cmbStandard_currentIndexChanged(), on_deltaFrequency_changed(), on_rfBandwidth_changed(), on_spiExcursion_valueChanged(), on_spiNotchFilters_valueChanged(), on_spiRollOff_valueChanged(), on_spiSymbolRate_valueChanged(), on_udpTS_clicked(), on_udpTSAddress_editingFinished(), on_udpTSPort_editingFinished(), on_videoMute_toggled(), resetToDefaults(), and setCenterFrequency().

349 {
351  {
352  qDebug("DATVDemodGUI::applySettings");
353 
356 
358 
359  QString msg = tr("DATVDemodGUI::applySettings: force: %1").arg(force ? "true" : "false");
360  m_settings.debug(msg);
361 
364  }
365 }
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.
DATVDemod * m_objDATVDemod
Definition: datvdemodgui.h:109
void debug(const QString &msg) const
bool m_blnDoApplySettings
Definition: datvdemodgui.h:121
ChannelMarker m_objChannelMarker
Definition: datvdemodgui.h:106
static MsgConfigureChannelizer * create(int centerFrequency)
Definition: datvdemod.h:207
void setTitleColor(const QColor &c)
static MsgConfigureDATVDemod * create(const DATVDemodSettings &settings, bool force)
Definition: datvdemod.h:227
DATVDemodSettings m_settings
Definition: datvdemodgui.h:112
const QColor & getColor() const
Definition: channelmarker.h:64
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ audioSelect

void DATVDemodGUI::audioSelect ( )
privateslot

Definition at line 381 of file datvdemodgui.cpp.

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

Referenced by DATVDemodGUI().

382 {
383  qDebug("AMDemodGUI::audioSelect");
385  audioSelect.exec();
386 
387  if (audioSelect.m_selected)
388  {
389  m_settings.m_audioDeviceName = audioSelect.m_audioDeviceName;
390  applySettings();
391  }
392 }
void applySettings(bool force=false)
void audioSelect()
static DSPEngine * instance()
Definition: dspengine.cpp:51
DATVDemodSettings m_settings
Definition: datvdemodgui.h:112
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ blockApplySettings()

void DATVDemodGUI::blockApplySettings ( bool  blnBlock)
private

Definition at line 235 of file datvdemodgui.cpp.

References m_blnDoApplySettings.

Referenced by displaySettings(), enterEvent(), and leaveEvent().

236 {
237  m_blnDoApplySettings = !blnBlock;
238 }
bool m_blnDoApplySettings
Definition: datvdemodgui.h:121
+ Here is the caller graph for this function:

◆ channelMarkerChangedByCursor

void DATVDemodGUI::channelMarkerChangedByCursor ( )
privateslot

Definition at line 132 of file datvdemodgui.cpp.

References applySettings(), ChannelMarker::getCenterFrequency(), m_intCenterFrequency, m_objChannelMarker, and ui.

Referenced by DATVDemodGUI().

133 {
134  ui->deltaFrequency->setValue(m_objChannelMarker.getCenterFrequency());
135 
137  {
139  applySettings();
140  }
141 }
void applySettings(bool force=false)
int getCenterFrequency() const
Definition: channelmarker.h:42
int m_intCenterFrequency
Definition: datvdemodgui.h:111
ChannelMarker m_objChannelMarker
Definition: datvdemodgui.h:106
Ui::DATVDemodGUI * ui
Definition: datvdemodgui.h:102
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ channelMarkerHighlightedByCursor

void DATVDemodGUI::channelMarkerHighlightedByCursor ( )
privateslot

Definition at line 143 of file datvdemodgui.cpp.

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

Referenced by DATVDemodGUI().

144 {
146 }
ChannelMarker m_objChannelMarker
Definition: datvdemodgui.h:106
bool getHighlighted() const
Definition: channelmarker.h:61
void setHighlighted(bool highlighted)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ create()

DATVDemodGUI * DATVDemodGUI::create ( PluginAPI objPluginAPI,
DeviceUISet deviceUISet,
BasebandSampleSink rxChannel 
)
static

Definition at line 41 of file datvdemodgui.cpp.

References DATVDemodGUI().

Referenced by DATVDemodPlugin::createRxChannelGUI().

44 {
45  DATVDemodGUI* gui = new DATVDemodGUI(objPluginAPI, deviceUISet, rxChannel);
46  return gui;
47 }
DATVDemodGUI(PluginAPI *objPluginAPI, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel, QWidget *objParent=0)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ deserialize()

bool DATVDemodGUI::deserialize ( const QByteArray &  arrData)
virtual

Implements PluginInstanceGUI.

Definition at line 87 of file datvdemodgui.cpp.

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

88 {
89  if (m_settings.deserialize(arrData))
90  {
92  applySettings(true);
93  return true;
94  }
95  else
96  {
98  return false;
99  }
100 }
void applySettings(bool force=false)
void displaySettings()
DATVDemodSettings m_settings
Definition: datvdemodgui.h:112
void resetToDefaults()
bool deserialize(const QByteArray &data)
+ Here is the call graph for this function:

◆ destroy()

void DATVDemodGUI::destroy ( )
virtual

Implements PluginInstanceGUI.

Definition at line 49 of file datvdemodgui.cpp.

50 {
51  delete this;
52 }

◆ displayRRCParameters()

void DATVDemodGUI::displayRRCParameters ( bool  blnVisible)
private

Definition at line 675 of file datvdemodgui.cpp.

References ui.

Referenced by displaySettings(), and on_cmbFilter_currentIndexChanged().

676 {
677  ui->spiRollOff->setVisible(blnVisible);
678  ui->spiExcursion->setVisible(blnVisible);
679  ui->rollOffLabel->setVisible(blnVisible);
680  ui->excursionLabel->setVisible(blnVisible);
681 }
Ui::DATVDemodGUI * ui
Definition: datvdemodgui.h:102
+ Here is the caller graph for this function:

◆ displaySettings()

void DATVDemodGUI::displaySettings ( )
private

Definition at line 240 of file datvdemodgui.cpp.

References arg(), blockApplySettings(), displayRRCParameters(), displaySystemConfiguration(), DATVDemodSettings::m_allowDrift, DATVDemodSettings::m_audioMute, DATVDemodSettings::m_audioVolume, DATVDemodSettings::m_centerFrequency, DATVDemodSettings::m_excursion, DATVDemodSettings::m_fastLock, DATVDemodSettings::m_filter, DATVDemodSettings::m_hardMetric, DATVDemodSettings::m_notchFilters, m_objChannelMarker, DATVDemodSettings::m_rfBandwidth, DATVDemodSettings::m_rgbColor, DATVDemodSettings::m_rollOff, m_settings, DATVDemodSettings::m_standard, DATVDemodSettings::m_symbolRate, DATVDemodSettings::m_udpTS, DATVDemodSettings::m_udpTSAddress, DATVDemodSettings::m_udpTSPort, DATVDemodSettings::m_videoMute, DATVDemodSettings::m_viterbi, ChannelMarker::setBandwidth(), ChannelMarker::setCenterFrequency(), ChannelMarker::setColor(), and ui.

Referenced by deserialize(), and resetToDefaults().

241 {
242  m_objChannelMarker.blockSignals(true);
243  blockApplySettings(true);
244 
247  ui->deltaFrequency->setValue(m_settings.m_centerFrequency);
249 
250  ui->chkAllowDrift->setChecked(m_settings.m_allowDrift);
251  ui->chkHardMetric->setChecked(m_settings.m_hardMetric);
252  ui->chkFastlock->setChecked(m_settings.m_fastLock);
253  ui->chkViterbi->setChecked(m_settings.m_viterbi);
254 
255  if (m_settings.m_standard == DATVDemodSettings::dvb_version::DVB_S)
256  {
257  ui->chkAllowDrift->setEnabled(true);
258  ui->chkHardMetric->setEnabled(true);
259  ui->chkFastlock->setEnabled(true);
260  ui->chkViterbi->setEnabled(true);
261  ui->chkAllowDrift->setStyleSheet("QCheckBox { color: white }");
262  ui->chkHardMetric->setStyleSheet("QCheckBox { color: white }");
263  ui->chkFastlock->setStyleSheet("QCheckBox { color: white }");
264  ui->chkViterbi->setStyleSheet("QCheckBox { color: white }");
265  }
266  else
267  {
268  ui->chkAllowDrift->setEnabled(false);
269  ui->chkHardMetric->setEnabled(false);
270  ui->chkFastlock->setEnabled(false);
271  ui->chkViterbi->setEnabled(false);
272  ui->chkAllowDrift->setStyleSheet("QCheckBox { color: gray }");
273  ui->chkHardMetric->setStyleSheet("QCheckBox { color: gray }");
274  ui->chkFastlock->setStyleSheet("QCheckBox { color: gray }");
275  ui->chkViterbi->setStyleSheet("QCheckBox { color: gray }");
276  }
277 
278  if (m_settings.m_standard == DATVDemodSettings::dvb_version::DVB_S) {
279  ui->statusText->clear();
280  }
281 
282  ui->cmbFilter->setCurrentIndex((int) m_settings.m_filter);
284 
285  ui->spiRollOff->setValue((int) (m_settings.m_rollOff * 100.0f));
286  ui->audioMute->setChecked(m_settings.m_audioMute);
288  ui->cmbStandard->setCurrentIndex((int) m_settings.m_standard);
289  ui->spiNotchFilters->setValue(m_settings.m_notchFilters);
290  ui->rfBandwidth->setValue(m_settings.m_rfBandwidth);
291  ui->spiSymbolRate->setValue(m_settings.m_symbolRate);
292  ui->spiExcursion->setValue(m_settings.m_excursion);
293  ui->audioVolume->setValue(m_settings.m_audioVolume);
294  ui->audioVolumeText->setText(tr("%1").arg(m_settings.m_audioVolume));
295  ui->videoMute->setChecked(m_settings.m_videoMute);
296  ui->udpTS->setChecked(m_settings.m_udpTS);
297  ui->udpTSAddress->setText(m_settings.m_udpTSAddress);
298  ui->udpTSPort->setText(tr("%1").arg(m_settings.m_udpTSPort));
299 
300  blockApplySettings(false);
301  m_objChannelMarker.blockSignals(false);
302 }
void displayRRCParameters(bool blnVisible)
Fixed< IntType, IntBits > arg(const std::complex< Fixed< IntType, IntBits > > &val)
Definition: fixed.h:2401
void displaySystemConfiguration()
ChannelMarker m_objChannelMarker
Definition: datvdemodgui.h:106
void blockApplySettings(bool blnBlock)
DATVDemodSettings m_settings
Definition: datvdemodgui.h:112
void setColor(const QColor &color)
Ui::DATVDemodGUI * ui
Definition: datvdemodgui.h:102
void setBandwidth(int bandwidth)
void setCenterFrequency(int centerFrequency)
dvb_version m_standard
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ displaySystemConfiguration()

void DATVDemodGUI::displaySystemConfiguration ( )
private

Definition at line 304 of file datvdemodgui.cpp.

References DATVDemodSettings::getAvailableCodeRates(), DATVDemodSettings::getAvailableModulations(), DATVDemodSettings::getStrFromCodeRate(), DATVDemodSettings::getStrFromModulation(), i, DATVDemodSettings::m_fec, DATVDemodSettings::m_modulation, m_settings, DATVDemodSettings::m_standard, and ui.

Referenced by displaySettings(), handleMessage(), on_cmbModulation_currentIndexChanged(), and on_cmbStandard_currentIndexChanged().

305 {
306  ui->cmbModulation->blockSignals(true);
307  ui->cmbFEC->blockSignals(true);
308 
309  std::vector<DATVDemodSettings::DATVModulation> modulations;
311  std::vector<DATVDemodSettings::DATVCodeRate> codeRates;
313 
314  ui->cmbModulation->clear();
315  int modulationIndex = 0;
316  int i;
317  std::vector<DATVDemodSettings::DATVModulation>::const_iterator mIt = modulations.begin();
318 
319  for (i = 0; mIt != modulations.end(); ++mIt, i++)
320  {
321  ui->cmbModulation->addItem(DATVDemodSettings::getStrFromModulation(*mIt));
322 
323  if (m_settings.m_modulation == *mIt) {
324  modulationIndex = i;
325  }
326  }
327 
328  ui->cmbFEC->clear();
329  int rateIndex = 0;
330  std::vector<DATVDemodSettings::DATVCodeRate>::const_iterator rIt = codeRates.begin();
331 
332  for (i = 0; rIt != codeRates.end(); ++rIt, i++)
333  {
334  ui->cmbFEC->addItem(DATVDemodSettings::getStrFromCodeRate(*rIt));
335 
336  if (m_settings.m_fec == *rIt) {
337  rateIndex = i;
338  }
339  }
340 
341  ui->cmbModulation->setCurrentIndex(modulationIndex);
342  ui->cmbFEC->setCurrentIndex(rateIndex);
343 
344  ui->cmbModulation->blockSignals(false);
345  ui->cmbFEC->blockSignals(false);
346 }
static QString getStrFromCodeRate(const DATVCodeRate codeRate)
static void getAvailableModulations(dvb_version dvbStandard, std::vector< DATVModulation > &modulations)
DATVModulation m_modulation
int32_t i
Definition: decimators.h:244
DATVDemodSettings m_settings
Definition: datvdemodgui.h:112
Ui::DATVDemodGUI * ui
Definition: datvdemodgui.h:102
static void getAvailableCodeRates(dvb_version dvbStandard, DATVModulation modulation, std::vector< DATVCodeRate > &codeRates)
dvb_version m_standard
static QString getStrFromModulation(const DATVModulation modulation)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ enterEvent()

void DATVDemodGUI::enterEvent ( QEvent *  )
private

Definition at line 374 of file datvdemodgui.cpp.

References blockApplySettings(), m_objChannelMarker, and ChannelMarker::setHighlighted().

375 {
376  blockApplySettings(true);
378  blockApplySettings(false);
379 }
ChannelMarker m_objChannelMarker
Definition: datvdemodgui.h:106
void blockApplySettings(bool blnBlock)
void setHighlighted(bool highlighted)
+ Here is the call graph for this function:

◆ formatBytes()

QString DATVDemodGUI::formatBytes ( qint64  intBytes)
private

Definition at line 572 of file datvdemodgui.cpp.

Referenced by on_StreamDataAvailable(), and tick().

573 {
574  if(intBytes<1024) {
575  return QString("%1").arg(intBytes);
576  } else if(intBytes<1024*1024) {
577  return QString("%1 K").arg((float)(10*intBytes/1024)/10.0f);
578  } else if(intBytes<1024*1024*1024) {
579  return QString("%1 M").arg((float)(10*intBytes/(1024*1024))/10.0f);
580  }
581 
582  return QString("%1 G").arg((float)(10*intBytes/(1024*1024*1024))/10.0f);
583 }
+ Here is the caller graph for this function:

◆ getCenterFrequency()

qint64 DATVDemodGUI::getCenterFrequency ( ) const
virtual

Implements PluginInstanceGUI.

Definition at line 64 of file datvdemodgui.cpp.

References ChannelMarker::getCenterFrequency(), and m_objChannelMarker.

65 {
67 }
int getCenterFrequency() const
Definition: channelmarker.h:42
ChannelMarker m_objChannelMarker
Definition: datvdemodgui.h:106
+ Here is the call graph for this function:

◆ getInputMessageQueue()

virtual MessageQueue* DATVDemodGUI::getInputMessageQueue ( )
inlinevirtual

Implements PluginInstanceGUI.

Definition at line 60 of file datvdemodgui.h.

Referenced by DATVDemodGUI(), and handleInputMessages().

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

◆ getName()

QString DATVDemodGUI::getName ( ) const
virtual

Implements PluginInstanceGUI.

Definition at line 59 of file datvdemodgui.cpp.

60 {
61  return objectName();
62 }

◆ handleInputMessages

void DATVDemodGUI::handleInputMessages ( )
privateslot

Definition at line 119 of file datvdemodgui.cpp.

References getInputMessageQueue(), and handleMessage().

Referenced by DATVDemodGUI().

120 {
121  Message* message;
122 
123  while ((message = getInputMessageQueue()->pop()) != 0)
124  {
125  if (handleMessage(*message))
126  {
127  delete message;
128  }
129  }
130 }
virtual MessageQueue * getInputMessageQueue()
Definition: datvdemodgui.h:60
virtual bool handleMessage(const Message &objMessage)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ handleMessage()

bool DATVDemodGUI::handleMessage ( const Message objMessage)
virtual

Implements PluginInstanceGUI.

Definition at line 102 of file datvdemodgui.cpp.

References displaySystemConfiguration(), DATVDemod::MsgReportModcodCstlnChange::getCodeRate(), DATVDemod::MsgReportModcodCstlnChange::getModulation(), DATVDemodSettings::m_fec, DATVDemodSettings::m_modulation, m_settings, Message::match(), and DATVDemodSettings::validateSystemConfiguration().

Referenced by handleInputMessages().

103 {
105  {
107  m_settings.m_fec = notif.getCodeRate();
111  return true;
112  }
113  else
114  {
115  return false;
116  }
117 }
DATVDemodSettings::DATVCodeRate getCodeRate() const
Definition: datvdemod.h:248
DATVModulation m_modulation
void displaySystemConfiguration()
static bool match(const Message *message)
Definition: message.cpp:45
DATVDemodSettings m_settings
Definition: datvdemodgui.h:112
DATVDemodSettings::DATVModulation getModulation() const
Definition: datvdemod.h:247
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ leaveEvent()

void DATVDemodGUI::leaveEvent ( QEvent *  )
private

Definition at line 367 of file datvdemodgui.cpp.

References blockApplySettings(), m_objChannelMarker, and ChannelMarker::setHighlighted().

368 {
369  blockApplySettings(true);
371  blockApplySettings(false);
372 }
ChannelMarker m_objChannelMarker
Definition: datvdemodgui.h:106
void blockApplySettings(bool blnBlock)
void setHighlighted(bool highlighted)
+ Here is the call graph for this function:

◆ on_audioMute_toggled

void DATVDemodGUI::on_audioMute_toggled ( bool  checked)
privateslot

Definition at line 621 of file datvdemodgui.cpp.

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

622 {
623  m_settings.m_audioMute = checked;
624  applySettings();
625 }
void applySettings(bool force=false)
DATVDemodSettings m_settings
Definition: datvdemodgui.h:112
+ Here is the call graph for this function:

◆ on_audioVolume_valueChanged

void DATVDemodGUI::on_audioVolume_valueChanged ( int  value)
privateslot

Definition at line 633 of file datvdemodgui.cpp.

References applySettings(), arg(), DATVDemodSettings::m_audioVolume, m_settings, and ui.

634 {
635  ui->audioVolumeText->setText(tr("%1").arg(value));
636  m_settings.m_audioVolume = value;
637  applySettings();
638 }
void applySettings(bool force=false)
Fixed< IntType, IntBits > arg(const std::complex< Fixed< IntType, IntBits > > &val)
Definition: fixed.h:2401
DATVDemodSettings m_settings
Definition: datvdemodgui.h:112
Ui::DATVDemodGUI * ui
Definition: datvdemodgui.h:102
+ Here is the call graph for this function:

◆ on_chkAllowDrift_clicked

void DATVDemodGUI::on_chkAllowDrift_clicked ( )
privateslot

Definition at line 556 of file datvdemodgui.cpp.

References applySettings(), DATVDemodSettings::m_allowDrift, m_settings, and ui.

557 {
558  m_settings.m_allowDrift = ui->chkAllowDrift->isChecked();
559  applySettings();
560 }
void applySettings(bool force=false)
DATVDemodSettings m_settings
Definition: datvdemodgui.h:112
Ui::DATVDemodGUI * ui
Definition: datvdemodgui.h:102
+ Here is the call graph for this function:

◆ on_chkFastlock_clicked

void DATVDemodGUI::on_chkFastlock_clicked ( )
privateslot

Definition at line 615 of file datvdemodgui.cpp.

References applySettings(), DATVDemodSettings::m_fastLock, m_settings, and ui.

616 {
617  m_settings.m_fastLock = ui->chkFastlock->isChecked();
618  applySettings();
619 }
void applySettings(bool force=false)
DATVDemodSettings m_settings
Definition: datvdemodgui.h:112
Ui::DATVDemodGUI * ui
Definition: datvdemodgui.h:102
+ Here is the call graph for this function:

◆ on_chkHardMetric_clicked

void DATVDemodGUI::on_chkHardMetric_clicked ( )
privateslot

Definition at line 533 of file datvdemodgui.cpp.

References applySettings(), DATVDemodSettings::m_hardMetric, m_settings, and ui.

534 {
535  m_settings.m_hardMetric = ui->chkHardMetric->isChecked();
536  applySettings();
537 }
void applySettings(bool force=false)
DATVDemodSettings m_settings
Definition: datvdemodgui.h:112
Ui::DATVDemodGUI * ui
Definition: datvdemodgui.h:102
+ Here is the call graph for this function:

◆ on_chkViterbi_clicked

void DATVDemodGUI::on_chkViterbi_clicked ( )
privateslot

Definition at line 527 of file datvdemodgui.cpp.

References applySettings(), m_settings, DATVDemodSettings::m_viterbi, and ui.

528 {
529  m_settings.m_viterbi = ui->chkViterbi->isChecked();
530  applySettings();
531 }
void applySettings(bool force=false)
DATVDemodSettings m_settings
Definition: datvdemodgui.h:112
Ui::DATVDemodGUI * ui
Definition: datvdemodgui.h:102
+ Here is the call graph for this function:

◆ on_cmbFEC_currentIndexChanged

void DATVDemodGUI::on_cmbFEC_currentIndexChanged ( const QString &  arg1)
privateslot

Definition at line 519 of file datvdemodgui.cpp.

References applySettings(), DATVDemodSettings::getCodeRateFromStr(), DATVDemodSettings::m_fec, m_settings, and ui.

520 {
521  (void) arg1;
522  QString strFEC = ui->cmbFEC->currentText();
524  applySettings();
525 }
void applySettings(bool force=false)
DATVDemodSettings m_settings
Definition: datvdemodgui.h:112
Ui::DATVDemodGUI * ui
Definition: datvdemodgui.h:102
static DATVCodeRate getCodeRateFromStr(const QString &str)
+ Here is the call graph for this function:

◆ on_cmbFilter_currentIndexChanged

void DATVDemodGUI::on_cmbFilter_currentIndexChanged ( int  index)
privateslot

Definition at line 683 of file datvdemodgui.cpp.

References applySettings(), displayRRCParameters(), DATVDemodSettings::m_filter, m_settings, DATVDemodSettings::SAMP_LINEAR, DATVDemodSettings::SAMP_NEAREST, and DATVDemodSettings::SAMP_RRC.

684 {
685  if (index == 0) {
687  } else if (index == 1) {
689  } else {
691  }
692 
693  displayRRCParameters(index == 2);
694  applySettings();
695 }
void applySettings(bool force=false)
void displayRRCParameters(bool blnVisible)
DATVDemodSettings m_settings
Definition: datvdemodgui.h:112
+ Here is the call graph for this function:

◆ on_cmbModulation_currentIndexChanged

void DATVDemodGUI::on_cmbModulation_currentIndexChanged ( const QString &  arg1)
privateslot

Definition at line 501 of file datvdemodgui.cpp.

References applySettings(), DATVDemodSettings::BPSK, displaySystemConfiguration(), DATVDemodSettings::getModulationFromStr(), DATVDemodSettings::m_modulation, m_settings, DATVDemodSettings::QPSK, ui, and DATVDemodSettings::validateSystemConfiguration().

502 {
503  (void) arg1;
504  QString strModulation = ui->cmbModulation->currentText();
508 
509  //Viterbi only for BPSK and QPSK
512  {
513  ui->chkViterbi->setChecked(false);
514  }
515 
516  applySettings();
517 }
void applySettings(bool force=false)
static DATVModulation getModulationFromStr(const QString &str)
DATVModulation m_modulation
void displaySystemConfiguration()
DATVDemodSettings m_settings
Definition: datvdemodgui.h:112
Ui::DATVDemodGUI * ui
Definition: datvdemodgui.h:102
+ Here is the call graph for this function:

◆ on_cmbStandard_currentIndexChanged

void DATVDemodGUI::on_cmbStandard_currentIndexChanged ( int  index)
privateslot

Definition at line 465 of file datvdemodgui.cpp.

References applySettings(), displaySystemConfiguration(), m_settings, DATVDemodSettings::m_standard, ui, and DATVDemodSettings::validateSystemConfiguration().

466 {
468 
469  if (m_settings.m_standard == DATVDemodSettings::dvb_version::DVB_S)
470  {
471  ui->chkAllowDrift->setEnabled(true);
472  ui->chkHardMetric->setEnabled(true);
473  ui->chkFastlock->setEnabled(true);
474  ui->chkViterbi->setEnabled(true);
475  ui->chkAllowDrift->setStyleSheet("QCheckBox { color: white }");
476  ui->chkHardMetric->setStyleSheet("QCheckBox { color: white }");
477  ui->chkFastlock->setStyleSheet("QCheckBox { color: white }");
478  ui->chkViterbi->setStyleSheet("QCheckBox { color: white }");
479  }
480  else
481  {
482  ui->chkAllowDrift->setEnabled(false);
483  ui->chkHardMetric->setEnabled(false);
484  ui->chkFastlock->setEnabled(false);
485  ui->chkViterbi->setEnabled(false);
486  ui->chkAllowDrift->setStyleSheet("QCheckBox { color: gray }");
487  ui->chkHardMetric->setStyleSheet("QCheckBox { color: gray }");
488  ui->chkFastlock->setStyleSheet("QCheckBox { color: gray }");
489  ui->chkViterbi->setStyleSheet("QCheckBox { color: gray }");
490  }
491 
492  if (m_settings.m_standard == DATVDemodSettings::dvb_version::DVB_S) {
493  ui->statusText->clear();
494  }
495 
498  applySettings();
499 }
void applySettings(bool force=false)
void displaySystemConfiguration()
DATVDemodSettings m_settings
Definition: datvdemodgui.h:112
Ui::DATVDemodGUI * ui
Definition: datvdemodgui.h:102
dvb_version m_standard
+ Here is the call graph for this function:

◆ on_deltaFrequency_changed

void DATVDemodGUI::on_deltaFrequency_changed ( qint64  value)
privateslot

Definition at line 601 of file datvdemodgui.cpp.

References applySettings(), ChannelMarker::getCenterFrequency(), DATVDemodSettings::m_centerFrequency, m_objChannelMarker, m_settings, and ChannelMarker::setCenterFrequency().

602 {
605  applySettings();
606 }
void applySettings(bool force=false)
int getCenterFrequency() const
Definition: channelmarker.h:42
ChannelMarker m_objChannelMarker
Definition: datvdemodgui.h:106
DATVDemodSettings m_settings
Definition: datvdemodgui.h:112
void setCenterFrequency(int centerFrequency)
+ Here is the call graph for this function:

◆ on_fullScreen_clicked

void DATVDemodGUI::on_fullScreen_clicked ( )
privateslot

Definition at line 562 of file datvdemodgui.cpp.

References ui.

563 {
564  ui->screenTV_2->SetFullScreen(true);
565 }
Ui::DATVDemodGUI * ui
Definition: datvdemodgui.h:102

◆ on_mouseEvent

void DATVDemodGUI::on_mouseEvent ( QMouseEvent *  obj)
privateslot

Definition at line 567 of file datvdemodgui.cpp.

568 {
569  (void) obj;
570 }

◆ on_resetDefaults_clicked

void DATVDemodGUI::on_resetDefaults_clicked ( )
privateslot

Definition at line 539 of file datvdemodgui.cpp.

References resetToDefaults().

540 {
541  resetToDefaults();
542 }
void resetToDefaults()
+ Here is the call graph for this function:

◆ on_rfBandwidth_changed

void DATVDemodGUI::on_rfBandwidth_changed ( qint64  value)
privateslot

Definition at line 608 of file datvdemodgui.cpp.

References applySettings(), ChannelMarker::getBandwidth(), m_objChannelMarker, DATVDemodSettings::m_rfBandwidth, m_settings, and ChannelMarker::setBandwidth().

609 {
612  applySettings();
613 }
void applySettings(bool force=false)
ChannelMarker m_objChannelMarker
Definition: datvdemodgui.h:106
DATVDemodSettings m_settings
Definition: datvdemodgui.h:112
int getBandwidth() const
Definition: channelmarker.h:45
void setBandwidth(int bandwidth)
+ Here is the call graph for this function:

◆ on_spiExcursion_valueChanged

void DATVDemodGUI::on_spiExcursion_valueChanged ( int  arg1)
privateslot

Definition at line 703 of file datvdemodgui.cpp.

References applySettings(), DATVDemodSettings::m_excursion, and m_settings.

704 {
705  m_settings.m_excursion = value;
706  applySettings();
707 }
void applySettings(bool force=false)
DATVDemodSettings m_settings
Definition: datvdemodgui.h:112
+ Here is the call graph for this function:

◆ on_spiNotchFilters_valueChanged

void DATVDemodGUI::on_spiNotchFilters_valueChanged ( int  arg1)
privateslot

Definition at line 550 of file datvdemodgui.cpp.

References applySettings(), DATVDemodSettings::m_notchFilters, and m_settings.

551 {
552  m_settings.m_notchFilters = value;
553  applySettings();
554 }
void applySettings(bool force=false)
DATVDemodSettings m_settings
Definition: datvdemodgui.h:112
+ Here is the call graph for this function:

◆ on_spiRollOff_valueChanged

void DATVDemodGUI::on_spiRollOff_valueChanged ( int  arg1)
privateslot

Definition at line 697 of file datvdemodgui.cpp.

References applySettings(), DATVDemodSettings::m_rollOff, and m_settings.

698 {
699  m_settings.m_rollOff = ((float) value) / 100.0f;
700  applySettings();
701 }
void applySettings(bool force=false)
DATVDemodSettings m_settings
Definition: datvdemodgui.h:112
+ Here is the call graph for this function:

◆ on_spiSymbolRate_valueChanged

void DATVDemodGUI::on_spiSymbolRate_valueChanged ( int  arg1)
privateslot

Definition at line 544 of file datvdemodgui.cpp.

References applySettings(), m_settings, and DATVDemodSettings::m_symbolRate.

545 {
546  m_settings.m_symbolRate = value;
547  applySettings();
548 }
void applySettings(bool force=false)
DATVDemodSettings m_settings
Definition: datvdemodgui.h:112
+ Here is the call graph for this function:

◆ on_StreamDataAvailable

void DATVDemodGUI::on_StreamDataAvailable ( int *  intPackets,
int *  intBytes,
int *  intPercent,
qint64 *  intTotalReceived 
)
privateslot

Definition at line 586 of file datvdemodgui.cpp.

References arg(), formatBytes(), m_intLastDecodedData, m_intReadyDecodedData, and ui.

Referenced by DATVDemodGUI().

587 {
588  (void) intPackets;
589  ui->lblStatus->setText(QString("Data: %1B").arg(formatBytes(*intTotalReceived)));
590  m_intLastDecodedData = *intTotalReceived;
591 
592  if((*intPercent)<100) {
593  ui->prgSynchro->setValue(*intPercent);
594  } else {
595  ui->prgSynchro->setValue(100);
596  }
597 
598  m_intReadyDecodedData = *intBytes;
599 }
int m_intReadyDecodedData
Definition: datvdemodgui.h:118
Fixed< IntType, IntBits > arg(const std::complex< Fixed< IntType, IntBits > > &val)
Definition: fixed.h:2401
Ui::DATVDemodGUI * ui
Definition: datvdemodgui.h:102
qint64 m_intLastDecodedData
Definition: datvdemodgui.h:116
QString formatBytes(qint64 intBytes)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ on_StreamMetaDataChanged

void DATVDemodGUI::on_StreamMetaDataChanged ( DataTSMetaData2 objMetaData)
privateslot

Definition at line 646 of file datvdemodgui.cpp.

References DataTSMetaData2::CodecDescription, DataTSMetaData2::Height, DataTSMetaData2::OK_Data, DataTSMetaData2::OK_Decoding, DataTSMetaData2::OK_TransportStream, DataTSMetaData2::OK_VideoStream, DataTSMetaData2::PID, DataTSMetaData2::Program, DataTSMetaData2::Stream, ui, and DataTSMetaData2::Width.

Referenced by DATVDemodGUI().

647 {
648  QString strMetaData="";
649 
650  if (objMetaData != nullptr)
651  {
652  if (objMetaData->OK_TransportStream == true)
653  {
654  strMetaData.sprintf("PID: %d - Width: %d - Height: %d\r\n%s%s\r\nCodec: %s\r\n",
655  objMetaData->PID,
656  objMetaData->Width,
657  objMetaData->Height,
658  objMetaData->Program.toStdString().c_str(),
659  objMetaData->Stream.toStdString().c_str(),
660  objMetaData->CodecDescription.toStdString().c_str());
661  }
662 
663  ui->streamInfo->setText(strMetaData);
664  ui->chkData->setChecked(objMetaData->OK_Data);
665  ui->chkTS->setChecked(objMetaData->OK_TransportStream);
666  ui->chkVS->setChecked(objMetaData->OK_VideoStream);
667  ui->chkDecoding->setChecked(objMetaData->OK_Decoding);
668 
669  if (objMetaData->Height > 0) {
670  ui->screenTV_2->setFixedWidth((int)objMetaData->Width*(270.0f/(float)objMetaData->Height));
671  }
672  }
673 }
QString CodecDescription
Ui::DATVDemodGUI * ui
Definition: datvdemodgui.h:102
+ Here is the caller graph for this function:

◆ on_udpTS_clicked

void DATVDemodGUI::on_udpTS_clicked ( bool  checked)
privateslot

Definition at line 640 of file datvdemodgui.cpp.

References applySettings(), m_settings, and DATVDemodSettings::m_udpTS.

641 {
642  m_settings.m_udpTS = checked;
643  applySettings();
644 }
void applySettings(bool force=false)
DATVDemodSettings m_settings
Definition: datvdemodgui.h:112
+ Here is the call graph for this function:

◆ on_udpTSAddress_editingFinished

void DATVDemodGUI::on_udpTSAddress_editingFinished ( )
privateslot

Definition at line 709 of file datvdemodgui.cpp.

References applySettings(), m_settings, DATVDemodSettings::m_udpTSAddress, and ui.

710 {
711  m_settings.m_udpTSAddress = ui->udpTSAddress->text();
712  applySettings();
713 }
void applySettings(bool force=false)
DATVDemodSettings m_settings
Definition: datvdemodgui.h:112
Ui::DATVDemodGUI * ui
Definition: datvdemodgui.h:102
+ Here is the call graph for this function:

◆ on_udpTSPort_editingFinished

void DATVDemodGUI::on_udpTSPort_editingFinished ( )
privateslot

Definition at line 715 of file datvdemodgui.cpp.

References applySettings(), arg(), m_settings, DATVDemodSettings::m_udpTSPort, and ui.

716 {
717  bool ok;
718  quint16 udpPort = ui->udpTSPort->text().toInt(&ok);
719 
720  if((!ok) || (udpPort < 1024)) {
721  udpPort = 8882;
722  }
723 
724  m_settings.m_udpTSPort = udpPort;
725  ui->udpTSPort->setText(tr("%1").arg(udpPort));
726  applySettings();
727 }
void applySettings(bool force=false)
Fixed< IntType, IntBits > arg(const std::complex< Fixed< IntType, IntBits > > &val)
Definition: fixed.h:2401
DATVDemodSettings m_settings
Definition: datvdemodgui.h:112
Ui::DATVDemodGUI * ui
Definition: datvdemodgui.h:102
+ Here is the call graph for this function:

◆ on_videoMute_toggled

void DATVDemodGUI::on_videoMute_toggled ( bool  checked)
privateslot

Definition at line 627 of file datvdemodgui.cpp.

References applySettings(), m_settings, and DATVDemodSettings::m_videoMute.

628 {
629  m_settings.m_videoMute = checked;
630  applySettings();
631 }
void applySettings(bool force=false)
DATVDemodSettings m_settings
Definition: datvdemodgui.h:112
+ Here is the call graph for this function:

◆ onMenuDoubleClicked

void DATVDemodGUI::onMenuDoubleClicked ( )
privateslot

Definition at line 155 of file datvdemodgui.cpp.

156 {
157 }

◆ onWidgetRolled

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

Definition at line 149 of file datvdemodgui.cpp.

Referenced by DATVDemodGUI().

150 {
151  (void) widget;
152  (void) rollDown;
153 }
+ Here is the caller graph for this function:

◆ resetToDefaults()

void DATVDemodGUI::resetToDefaults ( )
virtual

Implements PluginInstanceGUI.

Definition at line 75 of file datvdemodgui.cpp.

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

Referenced by DATVDemodGUI(), deserialize(), and on_resetDefaults_clicked().

76 {
79  applySettings(true);
80 }
void applySettings(bool force=false)
void displaySettings()
DATVDemodSettings m_settings
Definition: datvdemodgui.h:112
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ serialize()

QByteArray DATVDemodGUI::serialize ( ) const
virtual

Implements PluginInstanceGUI.

Definition at line 82 of file datvdemodgui.cpp.

References m_settings, and DATVDemodSettings::serialize().

83 {
84  return m_settings.serialize();
85 }
QByteArray serialize() const
DATVDemodSettings m_settings
Definition: datvdemodgui.h:112
+ Here is the call graph for this function:

◆ setCenterFrequency()

void DATVDemodGUI::setCenterFrequency ( qint64  intCenterFrequency)
virtual

Implements PluginInstanceGUI.

Definition at line 69 of file datvdemodgui.cpp.

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

70 {
71  m_objChannelMarker.setCenterFrequency(intCenterFrequency);
72  applySettings();
73 }
void applySettings(bool force=false)
ChannelMarker m_objChannelMarker
Definition: datvdemodgui.h:106
void setCenterFrequency(int centerFrequency)
+ Here is the call graph for this function:

◆ setName()

void DATVDemodGUI::setName ( const QString &  strName)
virtual

Implements PluginInstanceGUI.

Definition at line 54 of file datvdemodgui.cpp.

55 {
56  setObjectName(strName);
57 }

◆ tick

void DATVDemodGUI::tick ( )
privateslot

Definition at line 394 of file datvdemodgui.cpp.

References arg(), DATVDemod::audioActive(), DATVDemod::audioDecodeOK(), CalcDb::dbPower(), formatBytes(), DATVDemod::getCodeRateFromLeanDVBCode(), DATVDemod::getMagSq(), DATVDemod::getModcodCodeRate(), DATVDemod::getModcodModulation(), DATVDemod::getModulationFromLeanDVBCode(), DATVDemodSettings::getStrFromCodeRate(), DATVDemodSettings::getStrFromModulation(), DATVDemod::isCstlnSetByModcod(), m_cstlnSetByModcod, m_intLastDecodedData, m_intLastSpeed, m_intPreviousDecodedData, m_modcodCodeRateIndex, m_modcodModulationIndex, m_objDATVDemod, m_objMagSqAverage, DATVDemod::PlayVideo(), SDR_RX_SCALED, ui, DATVDemod::videoActive(), and DATVDemod::videoDecodeOK().

Referenced by DATVDemodGUI().

395 {
396  if (m_objDATVDemod)
397  {
400  ui->channePowerText->setText(tr("%1 dB").arg(magSqDB, 0, 'f', 1));
401 
403  {
408  QString modcodModulationStr = DATVDemodSettings::getStrFromModulation(modulation);
409  QString modcodCodeRateStr = DATVDemodSettings::getStrFromCodeRate(rate);
410  ui->statusText->setText(tr("MCOD %1 %2").arg(modcodModulationStr).arg(modcodCodeRateStr));
411  }
412 
414  {
416 
417  if (m_cstlnSetByModcod) {
418  ui->statusText->setStyleSheet("QLabel { background-color : green; }");
419  } else {
420  ui->statusText->setStyleSheet("QLabel { background:rgb(79,79,79); }");
421  }
422  }
423  }
424 
426  {
428  ui->lblRate->setText(QString("Speed: %1b/s").arg(formatBytes(m_intLastSpeed)));
429  }
430 
432  {
433  if (m_objDATVDemod->audioDecodeOK()) {
434  ui->audioMute->setStyleSheet("QToolButton { background-color : green; }");
435  } else {
436  ui->audioMute->setStyleSheet("QToolButton { background-color : red; }");
437  }
438  }
439  else
440  {
441  ui->audioMute->setStyleSheet("QToolButton { background:rgb(79,79,79); }");
442  }
443 
445  {
446  if (m_objDATVDemod->videoDecodeOK()) {
447  ui->videoMute->setStyleSheet("QToolButton { background-color : green; }");
448  } else {
449  ui->videoMute->setStyleSheet("QToolButton { background-color : red; }");
450  }
451  }
452  else
453  {
454  ui->videoMute->setStyleSheet("QToolButton { background:rgb(79,79,79); }");
455  }
456 
458 
459  //Try to start video rendering
460  m_objDATVDemod->PlayVideo(false);
461 
462  return;
463 }
int m_modcodModulationIndex
Definition: datvdemodgui.h:123
static QString getStrFromCodeRate(const DATVCodeRate codeRate)
int getModcodModulation() const
Definition: datvdemod.h:189
bool isCstlnSetByModcod() const
Definition: datvdemod.h:191
bool videoDecodeOK()
Definition: datvdemod.cpp:153
bool videoActive()
Definition: datvdemod.cpp:135
static double dbPower(double magsq, double floor=1e-12)
Definition: db.cpp:22
int m_modcodCodeRateIndex
Definition: datvdemodgui.h:124
qint64 m_intLastSpeed
Definition: datvdemodgui.h:117
DATVDemod * m_objDATVDemod
Definition: datvdemodgui.h:109
bool m_cstlnSetByModcod
Definition: datvdemodgui.h:125
bool audioActive()
Definition: datvdemod.cpp:126
double getMagSq() const
Beware this is scaled to 2^30.
Definition: datvdemod.h:188
static DATVDemodSettings::DATVModulation getModulationFromLeanDVBCode(int leanDVBModulation)
Definition: datvdemod.cpp:1507
MovingAverageUtil< double, double, 4 > m_objMagSqAverage
Definition: datvdemodgui.h:127
Fixed< IntType, IntBits > arg(const std::complex< Fixed< IntType, IntBits > > &val)
Definition: fixed.h:2401
bool audioDecodeOK()
Definition: datvdemod.cpp:144
static DATVDemodSettings::DATVCodeRate getCodeRateFromLeanDVBCode(int leanDVBCodeRate)
Definition: datvdemod.cpp:1474
qint64 m_intPreviousDecodedData
Definition: datvdemodgui.h:115
bool PlayVideo(bool blnStartStop)
Definition: datvdemod.cpp:162
Ui::DATVDemodGUI * ui
Definition: datvdemodgui.h:102
#define SDR_RX_SCALED
Definition: dsptypes.h:34
qint64 m_intLastDecodedData
Definition: datvdemodgui.h:116
int getModcodCodeRate() const
Definition: datvdemod.h:190
QString formatBytes(qint64 intBytes)
static QString getStrFromModulation(const DATVModulation modulation)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ m_blnBasicSettingsShown

bool DATVDemodGUI::m_blnBasicSettingsShown
private

Definition at line 120 of file datvdemodgui.h.

◆ m_blnButtonPlayClicked

bool DATVDemodGUI::m_blnButtonPlayClicked
private

Definition at line 122 of file datvdemodgui.h.

◆ m_blnDoApplySettings

bool DATVDemodGUI::m_blnDoApplySettings
private

Definition at line 121 of file datvdemodgui.h.

Referenced by applySettings(), and blockApplySettings().

◆ m_cstlnSetByModcod

bool DATVDemodGUI::m_cstlnSetByModcod
private

Definition at line 125 of file datvdemodgui.h.

Referenced by tick().

◆ m_deviceUISet

DeviceUISet* DATVDemodGUI::m_deviceUISet
private

Definition at line 104 of file datvdemodgui.h.

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

◆ m_inputMessageQueue

MessageQueue DATVDemodGUI::m_inputMessageQueue
private

Definition at line 110 of file datvdemodgui.h.

◆ m_intCenterFrequency

int DATVDemodGUI::m_intCenterFrequency
private

Definition at line 111 of file datvdemodgui.h.

Referenced by channelMarkerChangedByCursor().

◆ m_intLastDecodedData

qint64 DATVDemodGUI::m_intLastDecodedData
private

Definition at line 116 of file datvdemodgui.h.

Referenced by DATVDemodGUI(), on_StreamDataAvailable(), and tick().

◆ m_intLastSpeed

qint64 DATVDemodGUI::m_intLastSpeed
private

Definition at line 117 of file datvdemodgui.h.

Referenced by DATVDemodGUI(), and tick().

◆ m_intPreviousDecodedData

qint64 DATVDemodGUI::m_intPreviousDecodedData
private

Definition at line 115 of file datvdemodgui.h.

Referenced by DATVDemodGUI(), and tick().

◆ m_intReadyDecodedData

int DATVDemodGUI::m_intReadyDecodedData
private

Definition at line 118 of file datvdemodgui.h.

Referenced by DATVDemodGUI(), and on_StreamDataAvailable().

◆ m_modcodCodeRateIndex

int DATVDemodGUI::m_modcodCodeRateIndex
private

Definition at line 124 of file datvdemodgui.h.

Referenced by tick().

◆ m_modcodModulationIndex

int DATVDemodGUI::m_modcodModulationIndex
private

Definition at line 123 of file datvdemodgui.h.

Referenced by tick().

◆ m_objChannelizer

DownChannelizer* DATVDemodGUI::m_objChannelizer
private

Definition at line 108 of file datvdemodgui.h.

◆ m_objChannelMarker

ChannelMarker DATVDemodGUI::m_objChannelMarker
private

◆ m_objDATVDemod

DATVDemod* DATVDemodGUI::m_objDATVDemod
private

Definition at line 109 of file datvdemodgui.h.

Referenced by applySettings(), DATVDemodGUI(), tick(), and ~DATVDemodGUI().

◆ m_objMagSqAverage

MovingAverageUtil<double, double, 4> DATVDemodGUI::m_objMagSqAverage
private

Definition at line 127 of file datvdemodgui.h.

Referenced by tick().

◆ m_objPluginAPI

PluginAPI* DATVDemodGUI::m_objPluginAPI
private

Definition at line 103 of file datvdemodgui.h.

◆ m_objThreadedChannelizer

ThreadedBasebandSampleSink* DATVDemodGUI::m_objThreadedChannelizer
private

Definition at line 107 of file datvdemodgui.h.

◆ m_objTimer

QTimer DATVDemodGUI::m_objTimer
private

Definition at line 114 of file datvdemodgui.h.

Referenced by DATVDemodGUI().

◆ m_settings

DATVDemodSettings DATVDemodGUI::m_settings
private

◆ m_strChannelID

const QString DATVDemodGUI::m_strChannelID = "sdrangel.channel.demoddatv"
static

Definition at line 63 of file datvdemodgui.h.

◆ ui

Ui::DATVDemodGUI* DATVDemodGUI::ui
private

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