Commit 0da1c927 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Qt4: DVB-C modulation combo box

parent fd5cf6b5
...@@ -1049,6 +1049,21 @@ void CaptureOpenPanel::initialize() ...@@ -1049,6 +1049,21 @@ void CaptureOpenPanel::initialize()
setSpinBoxFreq( dvbSrate ); setSpinBoxFreq( dvbSrate );
dvbPropLayout->addWidget( dvbSrate, 1, 1 ); dvbPropLayout->addWidget( dvbSrate, 1, 1 );
dvbModLabel = new QLabel( qtr( "Modulation / Constellation" ) );
dvbPropLayout->addWidget( dvbModLabel, 2, 0 );
dvbModBox = new QComboBox;
dvbModBox->addItem( qtr( "Automatic" ), 0 );
dvbModBox->addItem( qtr( "256-QAM" ), 256 );
dvbModBox->addItem( qtr( "128-QAM" ), 128 );
dvbModBox->addItem( qtr( "64-QAM" ), 64 );
dvbModBox->addItem( qtr( "32-QAM" ), 32 );
dvbModBox->addItem( qtr( "16-QAM" ), 16 );
dvbPropLayout->addWidget( dvbModBox, 2, 1 );
dvbModLabel->hide();
dvbModBox->hide();
dvbBandLabel = new QLabel( qtr( "Bandwidth" ) ); dvbBandLabel = new QLabel( qtr( "Bandwidth" ) );
dvbPropLayout->addWidget( dvbBandLabel, 2, 0 ); dvbPropLayout->addWidget( dvbBandLabel, 2, 0 );
...@@ -1073,6 +1088,7 @@ void CaptureOpenPanel::initialize() ...@@ -1073,6 +1088,7 @@ void CaptureOpenPanel::initialize()
CuMRL( dvbCard, valueChanged ( int ) ); CuMRL( dvbCard, valueChanged ( int ) );
CuMRL( dvbFreq, valueChanged ( int ) ); CuMRL( dvbFreq, valueChanged ( int ) );
CuMRL( dvbSrate, valueChanged ( int ) ); CuMRL( dvbSrate, valueChanged ( int ) );
CuMRL( dvbModBox, currentIndexChanged ( int ) );
CuMRL( dvbBandBox, currentIndexChanged ( int ) ); CuMRL( dvbBandBox, currentIndexChanged ( int ) );
BUTTONACT( dvbs, updateButtons() ); BUTTONACT( dvbs, updateButtons() );
...@@ -1210,7 +1226,15 @@ void CaptureOpenPanel::updateMRL() ...@@ -1210,7 +1226,15 @@ void CaptureOpenPanel::updateMRL()
fileList << mrl; mrl= ""; fileList << mrl; mrl= "";
mrl += " :dvb-adapter=" + QString::number( dvbCard->value() ); mrl += " :dvb-adapter=" + QString::number( dvbCard->value() );
if( dvbs->isChecked() || dvbc->isChecked() ) if( dvbc->isChecked() )
{
unsigned qam =
dvbModBox->itemData( dvbModBox->currentIndex() ).toInt();
if( qam != 0 )
mrl += " :dvb-modulation=" + QString::number( qam );
mrl += " :dvb-srate=" + QString::number( dvbSrate->value() );
}
else if( dvbs->isChecked() )
mrl += " :dvb-srate=" + QString::number( dvbSrate->value() ); mrl += " :dvb-srate=" + QString::number( dvbSrate->value() );
else if( dvbt->isChecked() ) else if( dvbt->isChecked() )
mrl += " :dvb-bandwidth=" + mrl += " :dvb-bandwidth=" +
...@@ -1273,10 +1297,21 @@ void CaptureOpenPanel::updateButtons() ...@@ -1273,10 +1297,21 @@ void CaptureOpenPanel::updateButtons()
break; break;
#else #else
case DVB_DEVICE: case DVB_DEVICE:
if( dvbs->isChecked() || dvbc->isChecked() ) if( dvbc->isChecked() )
{
dvbSrate->show();
dvbSrateLabel->show();
dvbModBox->show();
dvbModLabel->show();
dvbBandBox->hide();
dvbBandLabel->hide();
}
else if( dvbs->isChecked() )
{ {
dvbSrate->show(); dvbSrate->show();
dvbSrateLabel->show(); dvbSrateLabel->show();
dvbModBox->hide();
dvbModLabel->hide();
dvbBandBox->hide(); dvbBandBox->hide();
dvbBandLabel->hide(); dvbBandLabel->hide();
} }
...@@ -1284,6 +1319,8 @@ void CaptureOpenPanel::updateButtons() ...@@ -1284,6 +1319,8 @@ void CaptureOpenPanel::updateButtons()
{ {
dvbSrate->hide(); dvbSrate->hide();
dvbSrateLabel->hide(); dvbSrateLabel->hide();
dvbModBox->hide();
dvbModLabel->hide();
dvbBandBox->show(); dvbBandBox->show();
dvbBandLabel->show(); dvbBandLabel->show();
} }
......
...@@ -209,11 +209,11 @@ private: ...@@ -209,11 +209,11 @@ private:
QLineEdit *dshowVSizeLine; QLineEdit *dshowVSizeLine;
#else #else
QRadioButton *dvbs, *dvbt, *dvbc; QRadioButton *dvbs, *dvbt, *dvbc;
QLabel *dvbBandLabel, *dvbSrateLabel; QLabel *dvbBandLabel, *dvbSrateLabel, *dvbModLabel;
QSpinBox *pvrFreq, *pvrBitr; QSpinBox *pvrFreq, *pvrBitr;
QComboBox *v4l2VideoDevice, *v4l2AudioDevice; QComboBox *v4l2VideoDevice, *v4l2AudioDevice;
QLineEdit *pvrDevice, *pvrRadioDevice; QLineEdit *pvrDevice, *pvrRadioDevice;
QComboBox *v4l2StdBox, *pvrNormBox, *dvbBandBox; QComboBox *v4l2StdBox, *pvrNormBox, *dvbModBox, *dvbBandBox;
QSpinBox *dvbCard, *dvbFreq, *dvbSrate; QSpinBox *dvbCard, *dvbFreq, *dvbSrate;
QSpinBox *jackChannels, *jackCaching; QSpinBox *jackChannels, *jackCaching;
QCheckBox *jackPace, *jackConnect; QCheckBox *jackPace, *jackConnect;
......
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