[vlc-devel] commit: Qt4: screen-fps is a float, not an integer... ( Rémi Denis-Courmont )
git version control
git at videolan.org
Sun Feb 21 15:52:21 CET 2010
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Feb 21 16:51:37 2010 +0200| [fdd6eed1c3fb518a5ace68e0441ba5b8c9021248] | committer: Rémi Denis-Courmont
Qt4: screen-fps is a float, not an integer...
...so allow decimal values.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=fdd6eed1c3fb518a5ace68e0441ba5b8c9021248
---
modules/gui/qt4/components/open_panels.cpp | 11 +++++++----
modules/gui/qt4/components/open_panels.hpp | 2 +-
2 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/modules/gui/qt4/components/open_panels.cpp b/modules/gui/qt4/components/open_panels.cpp
index 6e4afb5..dea7827 100644
--- a/modules/gui/qt4/components/open_panels.cpp
+++ b/modules/gui/qt4/components/open_panels.cpp
@@ -1012,13 +1012,16 @@ void CaptureOpenPanel::initialize()
qtr( "Desired frame rate for the capture." ) );
screenPropLayout->addWidget( screenFPSLabel, 0, 0 );
- screenFPS = new QSpinBox;
- screenFPS->setValue( 1 );
+ screenFPS = new QDoubleSpinBox;
+ screenFPS->setValue( 1. );
+ screenFPS->setRange( .01, 100. );
screenFPS->setAlignment( Qt::AlignRight );
+ /* xgettext: frames per second */
+ screenFPS->setSuffix( qtr( " f/s" ) );
screenPropLayout->addWidget( screenFPS, 0, 1 );
/* Screen connect */
- CuMRL( screenFPS, valueChanged( int ) );
+ CuMRL( screenFPS, valueChanged( double ) );
/* General connects */
CONNECT( ui.deviceCombo, activated( int ) ,
@@ -1136,7 +1139,7 @@ void CaptureOpenPanel::updateMRL()
#endif
case SCREEN_DEVICE:
fileList << "screen://";
- mrl = " :screen-fps=" + QString::number( screenFPS->value() );
+ mrl = " :screen-fps=" + QString::number( screenFPS->value(), 'f' );
emit methodChanged( "screen-caching" );
updateButtons();
break;
diff --git a/modules/gui/qt4/components/open_panels.hpp b/modules/gui/qt4/components/open_panels.hpp
index fee9fee..6d8cbb4 100644
--- a/modules/gui/qt4/components/open_panels.hpp
+++ b/modules/gui/qt4/components/open_panels.hpp
@@ -198,7 +198,7 @@ private:
QCheckBox *jackPace, *jackConnect;
QLineEdit *jackPortsSelected;
#endif
- QSpinBox *screenFPS;
+ QDoubleSpinBox *screenFPS;
public slots:
virtual void updateMRL();
More information about the vlc-devel
mailing list