[vlc-commits] Qt4: DVB-C modulation combo box

Rémi Denis-Courmont git at videolan.org
Wed Mar 23 23:14:55 CET 2011


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Mar 24 00:10:36 2011 +0200| [0da1c927a759b31a2093028e24dd77970e13ef6f] | committer: Rémi Denis-Courmont

Qt4: DVB-C modulation combo box

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=0da1c927a759b31a2093028e24dd77970e13ef6f
---

 modules/gui/qt4/components/open_panels.cpp |   41 ++++++++++++++++++++++++++-
 modules/gui/qt4/components/open_panels.hpp |    4 +-
 2 files changed, 41 insertions(+), 4 deletions(-)

diff --git a/modules/gui/qt4/components/open_panels.cpp b/modules/gui/qt4/components/open_panels.cpp
index 32b9f80..cc9f529 100644
--- a/modules/gui/qt4/components/open_panels.cpp
+++ b/modules/gui/qt4/components/open_panels.cpp
@@ -1049,6 +1049,21 @@ void CaptureOpenPanel::initialize()
     setSpinBoxFreq( dvbSrate );
     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" ) );
     dvbPropLayout->addWidget( dvbBandLabel, 2, 0 );
 
@@ -1073,6 +1088,7 @@ void CaptureOpenPanel::initialize()
     CuMRL( dvbCard, valueChanged ( int ) );
     CuMRL( dvbFreq, valueChanged ( int ) );
     CuMRL( dvbSrate, valueChanged ( int ) );
+    CuMRL( dvbModBox, currentIndexChanged ( int ) );
     CuMRL( dvbBandBox, currentIndexChanged ( int ) );
 
     BUTTONACT( dvbs, updateButtons() );
@@ -1210,7 +1226,15 @@ void CaptureOpenPanel::updateMRL()
         fileList << mrl; mrl= "";
 
         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() );
         else if( dvbt->isChecked() )
             mrl += " :dvb-bandwidth=" +
@@ -1273,10 +1297,21 @@ void CaptureOpenPanel::updateButtons()
         break;
 #else
     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();
             dvbSrateLabel->show();
+            dvbModBox->hide();
+            dvbModLabel->hide();
             dvbBandBox->hide();
             dvbBandLabel->hide();
         }
@@ -1284,6 +1319,8 @@ void CaptureOpenPanel::updateButtons()
         {
             dvbSrate->hide();
             dvbSrateLabel->hide();
+            dvbModBox->hide();
+            dvbModLabel->hide();
             dvbBandBox->show();
             dvbBandLabel->show();
         }
diff --git a/modules/gui/qt4/components/open_panels.hpp b/modules/gui/qt4/components/open_panels.hpp
index 0fe6eb5..fee01c5 100644
--- a/modules/gui/qt4/components/open_panels.hpp
+++ b/modules/gui/qt4/components/open_panels.hpp
@@ -209,11 +209,11 @@ private:
     QLineEdit *dshowVSizeLine;
 #else
     QRadioButton *dvbs, *dvbt, *dvbc;
-    QLabel *dvbBandLabel, *dvbSrateLabel;
+    QLabel *dvbBandLabel, *dvbSrateLabel, *dvbModLabel;
     QSpinBox  *pvrFreq, *pvrBitr;
     QComboBox *v4l2VideoDevice, *v4l2AudioDevice;
     QLineEdit *pvrDevice, *pvrRadioDevice;
-    QComboBox *v4l2StdBox, *pvrNormBox, *dvbBandBox;
+    QComboBox *v4l2StdBox, *pvrNormBox, *dvbModBox, *dvbBandBox;
     QSpinBox *dvbCard, *dvbFreq, *dvbSrate;
     QSpinBox *jackChannels, *jackCaching;
     QCheckBox *jackPace, *jackConnect;



More information about the vlc-commits mailing list