Commit 79638a06 authored by Ken Self's avatar Ken Self

bda qt4 gui: add combobox to select bandwidth on dvb-t

parent e98f5605
......@@ -629,9 +629,21 @@ CaptureOpenPanel::CaptureOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
bdaPropLayout->addWidget( bdaSrateLabel, 1, 0 );
bdaPropLayout->addWidget( bdaSrate, 1, 1 );
bdaBandLabel = new QLabel( qtr( "Bandwidth" ) );
bdaBandBox = new QComboBox;
bdaBandBox->insertItem( 0, qtr( "Automatic" ), QVariant( -1 ) );
bdaBandBox->insertItem( 1, "6 MHz", QVariant( 6 ) );
bdaBandBox->insertItem( 2, "7 MHz", QVariant( 7 ) );
bdaBandBox->insertItem( 3, "8 MHz", QVariant( 8 ) );
bdaPropLayout->addWidget( bdaBandLabel, 2, 0 );
bdaPropLayout->addWidget( bdaBandBox, 2, 1 );
bdaBandLabel->hide();
bdaBandBox->hide();
/* bda CONNECTs */
CuMRL( bdaFreq, valueChanged ( int ) );
CuMRL( bdaSrate, valueChanged ( int ) );
CuMRL( bdaBandBox, currentIndexChanged ( int ) );
BUTTONACT( bdas, updateButtons() );
BUTTONACT( bdat, updateButtons() );
BUTTONACT( bdac, updateButtons() );
......@@ -746,6 +758,10 @@ void CaptureOpenPanel::updateMRL()
mrl += " :dvb-frequency=" + QString("%1").arg( bdaFreq->value() );
if( bdas->isChecked() || bdac->isChecked() )
mrl += " :dvb-srate=" + QString("%1").arg( bdaSrate->value() );
else
mrl += " :dvb-bandwidth=" +
QString("%1").arg( bdaBandBox->itemData(
bdaBandBox->currentIndex() ).toInt() );
break;
case DSHOW_DEVICE:
break;
......@@ -770,11 +786,15 @@ void CaptureOpenPanel::updateButtons()
{
bdaSrate->show();
bdaSrateLabel->show();
bdaBandBox->hide();
bdaBandLabel->hide();
}
else
{
bdaSrate->hide();
bdaSrateLabel->hide();
bdaBandBox->show();
bdaBandLabel->show();
}
break;
}
......
......@@ -139,11 +139,11 @@ private:
QSpinBox *v4lFreq, *pvrFreq, *pvrBitr ;
QLineEdit *v4lVideoDevice, *v4lAudioDevice;
QLineEdit *pvrDevice, *pvrRadioDevice;
QComboBox *v4lNormBox, *pvrNormBox;
QComboBox *v4lNormBox, *pvrNormBox, *bdaBandBox;
QSpinBox *dvbCard, *dvbFreq, *dvbSrate;
QSpinBox *bdaCard, *bdaFreq, *bdaSrate;
QLabel *bdaSrateLabel;
QLabel *bdaSrateLabel, *bdaBandLabel;
public slots:
virtual void updateMRL();
......
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