From 8bc57b36e4a9247b0f8e6e2e310a8c7d234647bf Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Kempf <jb@videolan.org> Date: Mon, 4 Jun 2007 22:20:21 +0000 Subject: [PATCH] Qt4 - Open Dialog: Capture: small fixes. --- modules/gui/qt4/components/open.cpp | 14 +++++++------- modules/gui/qt4/components/open.hpp | 3 ++- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/modules/gui/qt4/components/open.cpp b/modules/gui/qt4/components/open.cpp index 151c22b162..164e5da49b 100644 --- a/modules/gui/qt4/components/open.cpp +++ b/modules/gui/qt4/components/open.cpp @@ -507,6 +507,7 @@ CaptureOpenPanel::CaptureOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) : v4lFreq = new QSpinBox; v4lFreq->setAlignment( Qt::AlignRight ); v4lFreq->setSuffix(" kHz"); + setSpinBoxFreq( v4lFreq ); v4lPropLayout->addWidget( v4lFreq, 1 , 1 ); /* v4l CONNECTs */ @@ -547,7 +548,7 @@ CaptureOpenPanel::CaptureOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) : pvrFreq = new QSpinBox; pvrFreq->setAlignment( Qt::AlignRight ); pvrFreq->setSuffix(" kHz"); - setMaxBound( pvrFreq ); + setSpinBoxFreq( pvrFreq ); pvrPropLayout->addWidget( pvrFreq, 1, 1 ); QLabel *pvrBitrLabel = new QLabel( qtr( "Bitrate" ) ); @@ -556,7 +557,7 @@ CaptureOpenPanel::CaptureOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) : pvrBitr = new QSpinBox; pvrBitr->setAlignment( Qt::AlignRight ); pvrBitr->setSuffix(" kHz"); - setMaxBound( pvrBitr ); + setSpinBoxFreq( pvrBitr ); pvrPropLayout->addWidget( pvrBitr, 2, 1 ); /* PVR CONNECTs */ @@ -638,8 +639,7 @@ CaptureOpenPanel::CaptureOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) : bdaFreq->setAlignment( Qt::AlignRight ); bdaFreq->setSuffix(" kHz"); bdaFreq->setSingleStep( 1000 ); - bdaFreq->setAccelerated( true ); - setMaxBound( bdaFreq ) + setSpinBoxFreq( bdaFreq ) bdaPropLayout->addWidget( bdaFreq, 0, 1 ); bdaSrateLabel = new QLabel( qtr( "Transponder symbol rate" ) ); @@ -648,7 +648,7 @@ CaptureOpenPanel::CaptureOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) : bdaSrate = new QSpinBox; bdaSrate->setAlignment( Qt::AlignRight ); bdaSrate->setSuffix(" kHz"); - setMaxBound( bdaSrate ); + setSpinBoxFreq( bdaSrate ); bdaPropLayout->addWidget( bdaSrate, 1, 1 ); bdaBandLabel = new QLabel( qtr( "Bandwidth" ) ); @@ -706,7 +706,7 @@ CaptureOpenPanel::CaptureOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) : dvbFreq = new QSpinBox; dvbFreq->setAlignment( Qt::AlignRight ); dvbFreq->setSuffix(" kHz"); - setMaxBound( dvbFreq ); + setSpinBoxFreq( dvbFreq ); dvbPropLayout->addWidget( dvbFreq, 0, 1 ); QLabel *dvbSrateLabel = new QLabel( qtr( "Transponder symbol rate" ) ); @@ -715,7 +715,7 @@ CaptureOpenPanel::CaptureOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) : dvbSrate = new QSpinBox; dvbSrate->setAlignment( Qt::AlignRight ); dvbSrate->setSuffix(" kHz"); - setMaxBound( dvbSrate ); + setSpinBoxFreq( dvbSrate ); dvbPropLayout->addWidget( dvbSrate, 1, 1 ); /* DVB CONNECTs */ diff --git a/modules/gui/qt4/components/open.hpp b/modules/gui/qt4/components/open.hpp index 443686159e..9f3d51e895 100644 --- a/modules/gui/qt4/components/open.hpp +++ b/modules/gui/qt4/components/open.hpp @@ -38,7 +38,8 @@ # include <limits.h> #endif -#define setMaxBound( spinbox ) spinbox->setRange ( 0, INT_MAX ); +#define setSpinBoxFreq( spinbox ){ spinbox->setRange ( 0, INT_MAX ); \ + spinbox->setAccelerated( true ); } #define V4L_DEVICE 0x0 #define PVR_DEVICE 0x1 -- 2.25.4