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