From adf14f74c254ae39bf2d68f67e1e5d857649b457 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Kempf <jb@videolan.org> Date: Wed, 23 May 2007 17:13:12 +0000 Subject: [PATCH] Qt4 - Open Capture: Don't limit yourself to 99kHz --- modules/gui/qt4/components/open.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/modules/gui/qt4/components/open.cpp b/modules/gui/qt4/components/open.cpp index ca6f089893..b9b3dd0ab6 100644 --- a/modules/gui/qt4/components/open.cpp +++ b/modules/gui/qt4/components/open.cpp @@ -34,6 +34,10 @@ #include <QLineEdit> #include <QStackedLayout> +#ifdef HAVE_LIMITS_H +# include <limits.h> +#endif + /************************************************************************** * File open **************************************************************************/ @@ -477,6 +481,8 @@ CaptureOpenPanel::CaptureOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) : #define CuMRL( widget, slot ) CONNECT( widget , slot , this, updateMRL() ); +#define setMaxBound( spinbox ) spinbox->setRange ( 0, INT_MAX ); + /******* * V4L * *******/ @@ -542,9 +548,11 @@ CaptureOpenPanel::CaptureOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) : pvrFreq = new QSpinBox; pvrFreq->setAlignment( Qt::AlignRight ); pvrFreq->setSuffix(" kHz"); + setMaxBound( pvrFreq ); pvrBitr = new QSpinBox; pvrBitr->setAlignment( Qt::AlignRight ); pvrBitr->setSuffix(" kHz"); + setMaxBound( pvrBitr ); QLabel *pvrNormLabel = new QLabel( qtr( "Norm" ) ); QLabel *pvrFreqLabel = new QLabel( qtr( "Frequency" ) ); QLabel *pvrBitrLabel = new QLabel( qtr( "Bitrate" ) ); @@ -603,6 +611,7 @@ CaptureOpenPanel::CaptureOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) : bdaFreq = new QSpinBox; bdaFreq->setAlignment( Qt::AlignRight ); bdaFreq->setSuffix(" kHz"); + setMaxBound( bdaFreq ) bdaPropLayout->addWidget( bdaFreqLabel, 0, 0 ); bdaPropLayout->addWidget( bdaFreq, 0, 1 ); @@ -610,6 +619,7 @@ CaptureOpenPanel::CaptureOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) : bdaSrate = new QSpinBox; bdaSrate->setAlignment( Qt::AlignRight ); bdaSrate->setSuffix(" kHz"); + setMaxBound( bdaSrate ); bdaPropLayout->addWidget( bdaSrateLabel, 1, 0 ); bdaPropLayout->addWidget( bdaSrate, 1, 1 ); @@ -656,6 +666,7 @@ CaptureOpenPanel::CaptureOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) : dvbFreq = new QSpinBox; dvbFreq->setAlignment( Qt::AlignRight ); dvbFreq->setSuffix(" kHz"); + setMaxBound( dvbFreq ); dvbPropLayout->addWidget( dvbFreqLabel, 0, 0 ); dvbPropLayout->addWidget( dvbFreq, 0, 1 ); @@ -663,6 +674,7 @@ CaptureOpenPanel::CaptureOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) : dvbSrate = new QSpinBox; dvbSrate->setAlignment( Qt::AlignRight ); dvbSrate->setSuffix(" kHz"); + setMaxBound( dvbSrate ); dvbPropLayout->addWidget( dvbSrateLabel, 1, 0 ); dvbPropLayout->addWidget( dvbSrate, 1, 1 ); -- 2.25.4