git.videolan.org
/
vlc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Cleanup
[vlc.git]
/
modules
/
gui
/
qt4
/
util
/
input_slider.cpp
diff --git
a/modules/gui/qt4/util/input_slider.cpp
b/modules/gui/qt4/util/input_slider.cpp
index
a153acc
..
4a74067
100644
(file)
--- a/
modules/gui/qt4/util/input_slider.cpp
+++ b/
modules/gui/qt4/util/input_slider.cpp
@@
-23,24
+23,36
@@
#include "util/input_slider.hpp"
#include "util/input_slider.hpp"
-
void InputSlider::init(
)
+
InputSlider::InputSlider( QWidget *_parent ) : DirectSlider( _parent
)
{
{
+ InputSlider::InputSlider( Qt::Horizontal, _parent );
+}
+
+InputSlider::InputSlider( Qt::Orientation q,QWidget *_parent ) :
+ DirectSlider( q, _parent )
+{
+ mymove = false;
setMinimum( 0 );
setMaximum( 1000 );
setSingleStep( 2 );
setMinimum( 0 );
setMaximum( 1000 );
setSingleStep( 2 );
- setPageStep( 100 );
+ setPageStep( 100
0
);
setTracking( true );
QObject::connect( this, SIGNAL( valueChanged(int) ), this,
setTracking( true );
QObject::connect( this, SIGNAL( valueChanged(int) ), this,
- SLOT( userDrag( int ) ) );
+
SLOT( userDrag( int ) ) );
}
void InputSlider::setPosition( float pos, int a, int b )
{
}
void InputSlider::setPosition( float pos, int a, int b )
{
+ mymove = true;
setValue( (int)(pos * 1000.0 ) );
setValue( (int)(pos * 1000.0 ) );
+ mymove = false;
}
void InputSlider::userDrag( int new_value )
{
float f_pos = (float)(new_value)/1000.0;
}
void InputSlider::userDrag( int new_value )
{
float f_pos = (float)(new_value)/1000.0;
- emit positionUpdated( f_pos );
+ if( !mymove )
+ {
+ emit sliderDragged( f_pos );
+ }
}
}