Commit adf14f74 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt4 - Open Capture: Don't limit yourself to 99kHz

parent 3d01b088
...@@ -34,6 +34,10 @@ ...@@ -34,6 +34,10 @@
#include <QLineEdit> #include <QLineEdit>
#include <QStackedLayout> #include <QStackedLayout>
#ifdef HAVE_LIMITS_H
# include <limits.h>
#endif
/************************************************************************** /**************************************************************************
* File open * File open
**************************************************************************/ **************************************************************************/
...@@ -477,6 +481,8 @@ CaptureOpenPanel::CaptureOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) : ...@@ -477,6 +481,8 @@ CaptureOpenPanel::CaptureOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
#define CuMRL( widget, slot ) CONNECT( widget , slot , this, updateMRL() ); #define CuMRL( widget, slot ) CONNECT( widget , slot , this, updateMRL() );
#define setMaxBound( spinbox ) spinbox->setRange ( 0, INT_MAX );
/******* /*******
* V4L * * V4L *
*******/ *******/
...@@ -542,9 +548,11 @@ CaptureOpenPanel::CaptureOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) : ...@@ -542,9 +548,11 @@ CaptureOpenPanel::CaptureOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
pvrFreq = new QSpinBox; pvrFreq = new QSpinBox;
pvrFreq->setAlignment( Qt::AlignRight ); pvrFreq->setAlignment( Qt::AlignRight );
pvrFreq->setSuffix(" kHz"); pvrFreq->setSuffix(" kHz");
setMaxBound( pvrFreq );
pvrBitr = new QSpinBox; pvrBitr = new QSpinBox;
pvrBitr->setAlignment( Qt::AlignRight ); pvrBitr->setAlignment( Qt::AlignRight );
pvrBitr->setSuffix(" kHz"); pvrBitr->setSuffix(" kHz");
setMaxBound( pvrBitr );
QLabel *pvrNormLabel = new QLabel( qtr( "Norm" ) ); QLabel *pvrNormLabel = new QLabel( qtr( "Norm" ) );
QLabel *pvrFreqLabel = new QLabel( qtr( "Frequency" ) ); QLabel *pvrFreqLabel = new QLabel( qtr( "Frequency" ) );
QLabel *pvrBitrLabel = new QLabel( qtr( "Bitrate" ) ); QLabel *pvrBitrLabel = new QLabel( qtr( "Bitrate" ) );
...@@ -603,6 +611,7 @@ CaptureOpenPanel::CaptureOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) : ...@@ -603,6 +611,7 @@ CaptureOpenPanel::CaptureOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
bdaFreq = new QSpinBox; bdaFreq = new QSpinBox;
bdaFreq->setAlignment( Qt::AlignRight ); bdaFreq->setAlignment( Qt::AlignRight );
bdaFreq->setSuffix(" kHz"); bdaFreq->setSuffix(" kHz");
setMaxBound( bdaFreq )
bdaPropLayout->addWidget( bdaFreqLabel, 0, 0 ); bdaPropLayout->addWidget( bdaFreqLabel, 0, 0 );
bdaPropLayout->addWidget( bdaFreq, 0, 1 ); bdaPropLayout->addWidget( bdaFreq, 0, 1 );
...@@ -610,6 +619,7 @@ CaptureOpenPanel::CaptureOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) : ...@@ -610,6 +619,7 @@ CaptureOpenPanel::CaptureOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
bdaSrate = new QSpinBox; bdaSrate = new QSpinBox;
bdaSrate->setAlignment( Qt::AlignRight ); bdaSrate->setAlignment( Qt::AlignRight );
bdaSrate->setSuffix(" kHz"); bdaSrate->setSuffix(" kHz");
setMaxBound( bdaSrate );
bdaPropLayout->addWidget( bdaSrateLabel, 1, 0 ); bdaPropLayout->addWidget( bdaSrateLabel, 1, 0 );
bdaPropLayout->addWidget( bdaSrate, 1, 1 ); bdaPropLayout->addWidget( bdaSrate, 1, 1 );
...@@ -656,6 +666,7 @@ CaptureOpenPanel::CaptureOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) : ...@@ -656,6 +666,7 @@ CaptureOpenPanel::CaptureOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
dvbFreq = new QSpinBox; dvbFreq = new QSpinBox;
dvbFreq->setAlignment( Qt::AlignRight ); dvbFreq->setAlignment( Qt::AlignRight );
dvbFreq->setSuffix(" kHz"); dvbFreq->setSuffix(" kHz");
setMaxBound( dvbFreq );
dvbPropLayout->addWidget( dvbFreqLabel, 0, 0 ); dvbPropLayout->addWidget( dvbFreqLabel, 0, 0 );
dvbPropLayout->addWidget( dvbFreq, 0, 1 ); dvbPropLayout->addWidget( dvbFreq, 0, 1 );
...@@ -663,6 +674,7 @@ CaptureOpenPanel::CaptureOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) : ...@@ -663,6 +674,7 @@ CaptureOpenPanel::CaptureOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
dvbSrate = new QSpinBox; dvbSrate = new QSpinBox;
dvbSrate->setAlignment( Qt::AlignRight ); dvbSrate->setAlignment( Qt::AlignRight );
dvbSrate->setSuffix(" kHz"); dvbSrate->setSuffix(" kHz");
setMaxBound( dvbSrate );
dvbPropLayout->addWidget( dvbSrateLabel, 1, 0 ); dvbPropLayout->addWidget( dvbSrateLabel, 1, 0 );
dvbPropLayout->addWidget( dvbSrate, 1, 1 ); dvbPropLayout->addWidget( dvbSrate, 1, 1 );
......
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