Commit 5206e964 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Qt4: add ATSC and CQAM to open dialog

parent a879bc58
...@@ -1021,12 +1021,16 @@ void CaptureOpenPanel::initialize() ...@@ -1021,12 +1021,16 @@ void CaptureOpenPanel::initialize()
dvbc = new QRadioButton( "DVB-C" ); dvbc = new QRadioButton( "DVB-C" );
dvbs = new QRadioButton( "DVB-S" ); dvbs = new QRadioButton( "DVB-S" );
dvbt = new QRadioButton( "DVB-T" ); dvbt = new QRadioButton( "DVB-T" );
atsc = new QRadioButton( "ATSC" );
cqam = new QRadioButton( "Clear QAM" );
dvbt->setChecked( true ); dvbt->setChecked( true );
dvbDevLayout->addWidget( dvbTypeLabel, 1, 0 ); dvbDevLayout->addWidget( dvbTypeLabel, 1, 0 );
dvbDevLayout->addWidget( dvbc, 1, 1 ); dvbDevLayout->addWidget( dvbc, 1, 1 );
dvbDevLayout->addWidget( dvbs, 1, 2 ); dvbDevLayout->addWidget( dvbs, 1, 2 );
dvbDevLayout->addWidget( dvbt, 1, 3 ); dvbDevLayout->addWidget( dvbt, 1, 3 );
dvbDevLayout->addWidget( atsc, 1, 4 );
dvbDevLayout->addWidget( cqam, 1, 5 );
/* DVB Props panel */ /* DVB Props panel */
QLabel *dvbFreqLabel = QLabel *dvbFreqLabel =
...@@ -1087,9 +1091,13 @@ void CaptureOpenPanel::initialize() ...@@ -1087,9 +1091,13 @@ void CaptureOpenPanel::initialize()
BUTTONACT( dvbs, updateButtons() ); BUTTONACT( dvbs, updateButtons() );
BUTTONACT( dvbt, updateButtons() ); BUTTONACT( dvbt, updateButtons() );
BUTTONACT( dvbc, updateButtons() ); BUTTONACT( dvbc, updateButtons() );
BUTTONACT( atsc, updateButtons() );
BUTTONACT( cqam, updateButtons() );
BUTTONACT( dvbs, updateMRL() ); BUTTONACT( dvbs, updateMRL() );
BUTTONACT( dvbt, updateMRL() ); BUTTONACT( dvbt, updateMRL() );
BUTTONACT( dvbc, updateMRL() ); BUTTONACT( dvbs, updateMRL() );
BUTTONACT( atsc, updateMRL() );
BUTTONACT( cqam, updateMRL() );
} }
#endif #endif
...@@ -1217,10 +1225,14 @@ void CaptureOpenPanel::updateMRL() ...@@ -1217,10 +1225,14 @@ void CaptureOpenPanel::updateMRL()
if( dvbs->isChecked() ) mrl = "dvb-s://"; if( dvbs->isChecked() ) mrl = "dvb-s://";
else else
if( dvbt->isChecked() ) mrl = "dvb-t://"; if( dvbt->isChecked() ) mrl = "dvb-t://";
else
if( atsc->isChecked() ) mrl = "atsc://";
else
if( cqam->isChecked() ) mrl = "cqam://";
mrl += "frequency=" + QString::number( dvbFreq->value() ); mrl += "frequency=" + QString::number( dvbFreq->value() );
if( dvbc->isChecked() ) if( dvbc->isChecked() || cqam->isChecked() )
{ {
unsigned qam = unsigned qam =
dvbModBox->itemData( dvbModBox->currentIndex() ).toInt(); dvbModBox->itemData( dvbModBox->currentIndex() ).toInt();
...@@ -1231,9 +1243,9 @@ void CaptureOpenPanel::updateMRL() ...@@ -1231,9 +1243,9 @@ void CaptureOpenPanel::updateMRL()
} }
mrl += ":srate=" + QString::number( dvbSrate->value() ); mrl += ":srate=" + QString::number( dvbSrate->value() );
} }
else if( dvbs->isChecked() ) if( dvbc->isChecked() || dvbs->isChecked() )
mrl += ":srate=" + QString::number( dvbSrate->value() ); mrl += ":srate=" + QString::number( dvbSrate->value() );
else if( dvbt->isChecked() ) if( dvbt->isChecked() )
mrl += ":bandwidth=" + mrl += ":bandwidth=" +
QString::number( dvbBandBox->itemData( QString::number( dvbBandBox->itemData(
dvbBandBox->currentIndex() ).toInt() ); dvbBandBox->currentIndex() ).toInt() );
...@@ -1296,30 +1308,27 @@ void CaptureOpenPanel::updateButtons() ...@@ -1296,30 +1308,27 @@ void CaptureOpenPanel::updateButtons()
break; break;
#else #else
case DVB_DEVICE: case DVB_DEVICE:
dvbSrate->hide();
dvbSrateLabel->hide();
dvbModBox->hide();
dvbModLabel->hide();
dvbBandBox->hide();
dvbBandLabel->hide();
if( dvbc->isChecked() ) if( dvbc->isChecked() )
{ {
dvbSrate->show(); dvbSrate->show();
dvbSrateLabel->show(); dvbSrateLabel->show();
dvbModBox->show(); dvbModBox->show();
dvbModLabel->show(); dvbModLabel->show();
dvbBandBox->hide();
dvbBandLabel->hide();
} }
else if( dvbs->isChecked() ) else if( dvbs->isChecked() )
{ {
dvbSrate->show(); dvbSrate->show();
dvbSrateLabel->show(); dvbSrateLabel->show();
dvbModBox->hide();
dvbModLabel->hide();
dvbBandBox->hide();
dvbBandLabel->hide();
} }
else if( dvbt->isChecked() ) else if( dvbt->isChecked() )
{ {
dvbSrate->hide();
dvbSrateLabel->hide();
dvbModBox->hide();
dvbModLabel->hide();
dvbBandBox->show(); dvbBandBox->show();
dvbBandLabel->show(); dvbBandLabel->show();
} }
......
...@@ -208,7 +208,7 @@ private: ...@@ -208,7 +208,7 @@ private:
StringListConfigControl *vdevDshowW, *adevDshowW; StringListConfigControl *vdevDshowW, *adevDshowW;
QLineEdit *dshowVSizeLine; QLineEdit *dshowVSizeLine;
#else #else
QRadioButton *dvbs, *dvbt, *dvbc; QRadioButton *dvbs, *dvbt, *dvbc, *atsc, *cqam;
QLabel *dvbBandLabel, *dvbSrateLabel, *dvbModLabel; QLabel *dvbBandLabel, *dvbSrateLabel, *dvbModLabel;
QSpinBox *pvrFreq, *pvrBitr; QSpinBox *pvrFreq, *pvrBitr;
QComboBox *v4l2VideoDevice, *v4l2AudioDevice; QComboBox *v4l2VideoDevice, *v4l2AudioDevice;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment