]> git.sesse.net Git - vlc/commitdiff
bda qt4 gui: add combobox to select bandwidth on dvb-t
authorKen Self <kenself@videolan.org>
Sat, 26 May 2007 17:18:35 +0000 (17:18 +0000)
committerKen Self <kenself@videolan.org>
Sat, 26 May 2007 17:18:35 +0000 (17:18 +0000)
modules/gui/qt4/components/open.cpp
modules/gui/qt4/components/open.hpp

index e11523bc3249a432756a6fd6b6f88bb1d94f1a88..fa2b93ebe414c1563134cc3df27c3345ae22bd68 100644 (file)
@@ -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;
     }
index 52ebf9ae714ed5c958cf835574f7b93c1c16eac3..59f8584da33f6b53353e88bad9590f3208872102 100644 (file)
@@ -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();