20 #include <QDockWidget> 21 #include <QMainWindow> 22 #include <QMediaMetaData> 30 #include "ui_datvdemodgui.h" 56 setObjectName(strName);
172 ui->screenTV->setColor(
true);
173 setAttribute(Qt::WA_DeleteOnClose,
true);
193 ui->fullScreen->setVisible(
false);
195 ui->deltaFrequencyLabel->setText(QString(
"%1f").
arg(QChar(0x94, 0x03)));
197 ui->deltaFrequency->setValueRange(
false, 7, -9999999, 9999999);
200 ui->rfBandwidth->setValueRange(
true, 7, 0, 9999999);
222 connect(audioMuteRightClickEnabler, SIGNAL(rightClick(
const QPoint &)),
this, SLOT(
audioSelect()));
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 }");
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 }");
279 ui->statusText->clear();
306 ui->cmbModulation->blockSignals(
true);
307 ui->cmbFEC->blockSignals(
true);
309 std::vector<DATVDemodSettings::DATVModulation> modulations;
311 std::vector<DATVDemodSettings::DATVCodeRate> codeRates;
314 ui->cmbModulation->clear();
315 int modulationIndex = 0;
317 std::vector<DATVDemodSettings::DATVModulation>::const_iterator mIt = modulations.begin();
319 for (i = 0; mIt != modulations.end(); ++mIt, i++)
330 std::vector<DATVDemodSettings::DATVCodeRate>::const_iterator rIt = codeRates.begin();
332 for (i = 0; rIt != codeRates.end(); ++rIt, i++)
341 ui->cmbModulation->setCurrentIndex(modulationIndex);
342 ui->cmbFEC->setCurrentIndex(rateIndex);
344 ui->cmbModulation->blockSignals(
false);
345 ui->cmbFEC->blockSignals(
false);
352 qDebug(
"DATVDemodGUI::applySettings");
359 QString msg = tr(
"DATVDemodGUI::applySettings: force: %1").arg(force ?
"true" :
"false");
383 qDebug(
"AMDemodGUI::audioSelect");
400 ui->channePowerText->setText(tr(
"%1 dB").
arg(magSqDB, 0,
'f', 1));
410 ui->statusText->setText(tr(
"MCOD %1 %2").
arg(modcodModulationStr).
arg(modcodCodeRateStr));
418 ui->statusText->setStyleSheet(
"QLabel { background-color : green; }");
420 ui->statusText->setStyleSheet(
"QLabel { background:rgb(79,79,79); }");
434 ui->audioMute->setStyleSheet(
"QToolButton { background-color : green; }");
436 ui->audioMute->setStyleSheet(
"QToolButton { background-color : red; }");
441 ui->audioMute->setStyleSheet(
"QToolButton { background:rgb(79,79,79); }");
447 ui->videoMute->setStyleSheet(
"QToolButton { background-color : green; }");
449 ui->videoMute->setStyleSheet(
"QToolButton { background-color : red; }");
454 ui->videoMute->setStyleSheet(
"QToolButton { background:rgb(79,79,79); }");
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 }");
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 }");
493 ui->statusText->clear();
504 QString strModulation =
ui->cmbModulation->currentText();
513 ui->chkViterbi->setChecked(
false);
522 QString strFEC =
ui->cmbFEC->currentText();
564 ui->screenTV_2->SetFullScreen(
true);
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);
582 return QString(
"%1 G").arg((
float)(10*intBytes/(1024*1024*1024))/10.0f);
589 ui->lblStatus->setText(QString(
"Data: %1B").
arg(
formatBytes(*intTotalReceived)));
592 if((*intPercent)<100) {
593 ui->prgSynchro->setValue(*intPercent);
595 ui->prgSynchro->setValue(100);
635 ui->audioVolumeText->setText(tr(
"%1").
arg(value));
648 QString strMetaData=
"";
650 if (objMetaData !=
nullptr)
654 strMetaData.sprintf(
"PID: %d - Width: %d - Height: %d\r\n%s%s\r\nCodec: %s\r\n",
658 objMetaData->
Program.toStdString().c_str(),
659 objMetaData->
Stream.toStdString().c_str(),
663 ui->streamInfo->setText(strMetaData);
664 ui->chkData->setChecked(objMetaData->
OK_Data);
669 if (objMetaData->
Height > 0) {
670 ui->screenTV_2->setFixedWidth((
int)objMetaData->
Width*(270.0f/(
float)objMetaData->
Height));
677 ui->spiRollOff->setVisible(blnVisible);
678 ui->spiExcursion->setVisible(blnVisible);
679 ui->rollOffLabel->setVisible(blnVisible);
680 ui->excursionLabel->setVisible(blnVisible);
687 }
else if (index == 1) {
718 quint16 udpPort =
ui->udpTSPort->text().toInt(&ok);
720 if((!ok) || (udpPort < 1024)) {
725 ui->udpTSPort->setText(tr(
"%1").
arg(udpPort));
int m_modcodModulationIndex
static QString getStrFromCodeRate(const DATVCodeRate codeRate)
int getModcodModulation() const
bool isCstlnSetByModcod() const
void applySettings(bool force=false)
bool deserialize(const QByteArray &arrData)
DATVDemodSettings::DATVCodeRate getCodeRate() const
void on_StreamMetaDataChanged(DataTSMetaData2 *objMetaData)
static DATVModulation getModulationFromStr(const QString &str)
int getCenterFrequency() const
void push(Message *message, bool emitSignal=true)
Push message onto queue.
void onMetaDataChanged(DataTSMetaData2 *metaData)
static double dbPower(double magsq, double floor=1e-12)
static void getAvailableModulations(dvb_version dvbStandard, std::vector< DATVModulation > &modulations)
int m_modcodCodeRateIndex
void on_videoMute_toggled(bool checked)
MessageQueue * getInputMessageQueue()
Get the queue for asynchronous inbound communication.
void displayRRCParameters(bool blnVisible)
DATVModulation m_modulation
DATVideostream * SetVideoRender(DATVideoRender *objScreen)
void on_spiSymbolRate_valueChanged(int arg1)
void on_StreamDataAvailable(int *intPackets, int *intBytes, int *intPercent, qint64 *intTotalReceived)
int m_intReadyDecodedData
static const QString m_channelIdURI
virtual MessageQueue * getInputMessageQueue()
bool m_blnBasicSettingsShown
void on_spiRollOff_valueChanged(int arg1)
void enterEvent(QEvent *)
DATVDemod * m_objDATVDemod
void on_spiExcursion_valueChanged(int arg1)
QByteArray serialize() const
virtual bool handleMessage(const Message &objMessage)
void debug(const QString &msg) const
virtual void setCenterFrequency(qint64 intCenterFrequency)
void addChannelMarker(ChannelMarker *channelMarker)
Add channel marker to spectrum.
void on_cmbModulation_currentIndexChanged(const QString &arg1)
double getMagSq() const
Beware this is scaled to 2^30.
void on_spiNotchFilters_valueChanged(int arg1)
static DATVDemodSettings::DATVModulation getModulationFromLeanDVBCode(int leanDVBModulation)
void on_chkHardMetric_clicked()
void channelMarkerChangedByCursor()
MovingAverageUtil< double, double, 4 > m_objMagSqAverage
QString m_audioDeviceName
static const QString m_strChannelID
Fixed< IntType, IntBits > arg(const std::complex< Fixed< IntType, IntBits > > &val)
void displaySystemConfiguration()
void on_chkAllowDrift_clicked()
bool m_blnDoApplySettings
void channelMarkerHighlightedByCursor()
void onMenuDoubleClicked()
static DATVDemodGUI * create(PluginAPI *objPluginAPI, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel)
ChannelMarker m_objChannelMarker
void on_cmbStandard_currentIndexChanged(int index)
virtual void setMessageQueueToGUI(MessageQueue *queue)
void on_cmbFilter_currentIndexChanged(int index)
static DSPEngine * instance()
void on_cmbFEC_currentIndexChanged(const QString &arg1)
void blockApplySettings(bool blnBlock)
void on_resetDefaults_clicked()
void validateSystemConfiguration()
void setHighlighted(bool highlighted)
static DATVDemodSettings::DATVCodeRate getCodeRateFromLeanDVBCode(int leanDVBCodeRate)
void registerRxChannelInstance(const QString &channelName, PluginInstanceGUI *pluginGUI)
void on_audioMute_toggled(bool checked)
void addRollupWidget(QWidget *widget)
Add rollup widget to channel window.
void on_chkFastlock_clicked()
void removeRxChannelInstance(PluginInstanceGUI *pluginGUI)
static bool match(const Message *message)
bool getHighlighted() const
void on_mouseEvent(QMouseEvent *obj)
PluginAPI * m_objPluginAPI
void on_udpTS_clicked(bool checked)
qint64 m_intPreviousDecodedData
DATVDemodSettings m_settings
QString m_audioDeviceName
void on_fullScreen_clicked()
DeviceUISet * m_deviceUISet
bool SetTVScreen(TVScreen *objScreen)
void on_chkViterbi_clicked()
void setColor(const QColor &color)
void on_rfBandwidth_changed(qint64 value)
bool PlayVideo(bool blnStartStop)
void onWidgetRolled(QWidget *widget, bool rollDown)
virtual qint64 getCenterFrequency() const
void setVisible(bool visible)
DATVDemodGUI(PluginAPI *objPluginAPI, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel, QWidget *objParent=0)
void on_deltaFrequency_changed(qint64 value)
void on_udpTSPort_editingFinished()
void setBandwidth(int bandwidth)
const QColor & getColor() const
static DATVCodeRate getCodeRateFromStr(const QString &str)
void leaveEvent(QEvent *)
void setCenterFrequency(int centerFrequency)
bool deserialize(const QByteArray &data)
DATVDemodSettings::DATVModulation getModulation() const
static void getAvailableCodeRates(dvb_version dvbStandard, DATVModulation modulation, std::vector< DATVCodeRate > &codeRates)
void handleInputMessages()
qint64 m_intLastDecodedData
int getModcodCodeRate() const
QByteArray serialize() const
QString formatBytes(qint64 intBytes)
void on_audioVolume_valueChanged(int value)
static QString getStrFromModulation(const DATVModulation modulation)
void on_udpTSAddress_editingFinished()
void onDataPackets(int *intDataPackets, int *intDataBytes, int *intPercentBuffer, qint64 *intTotalReceived)
void setName(const QString &strName)