]> git.sesse.net Git - vlc/commitdiff
Cleanup
authorClément Stenac <zorglub@videolan.org>
Wed, 31 May 2006 21:24:58 +0000 (21:24 +0000)
committerClément Stenac <zorglub@videolan.org>
Wed, 31 May 2006 21:24:58 +0000 (21:24 +0000)
modules/gui/qt4/input_manager.cpp
modules/gui/qt4/input_manager.hpp
modules/gui/qt4/main_interface.cpp
modules/gui/qt4/util/input_slider.cpp
modules/gui/qt4/util/input_slider.hpp

index b4d272e8bd73240e44ebed06a94480613c13d79d..e045a7768491c8e9a9b26b820f106afc0eb16eff 100644 (file)
@@ -40,9 +40,8 @@ InputManager::~InputManager()
 
 void InputManager::setInput( input_thread_t *_p_input )
 {
-    fprintf( stderr, "[IM] Got input\n");
     p_input = _p_input;
-    emit reset();
+    emit positionUpdated( 0.0,0,0 );
 }
 
 void InputManager::update()
@@ -51,7 +50,7 @@ void InputManager::update()
 
     if( p_input->b_dead )
     {
-        //emit statusChanged( 0 );
+        emit positionUpdated( 0.0, 0, 0 );
     }
     mtime_t i_length, i_time;
     float f_pos;
@@ -59,12 +58,10 @@ void InputManager::update()
     i_time = var_GetTime( p_input, "time") / 1000000;
     f_pos = var_GetFloat( p_input, "position" );
 
-    fprintf( stderr, "Changing pos\n");
     emit positionUpdated( f_pos, i_time, i_length );
 }
 
 void InputManager::sliderUpdate( float new_pos )
 {
-   fprintf( stderr, "Seek to %f\n", new_pos );
    var_SetFloat( p_input, "position", new_pos );
 }
index 8c86878efc8c188d14022bb8f790173382d5c2bf..c5e0cc49e10783f9c1e5bfb5832fa58beae4beff 100644 (file)
@@ -45,7 +45,6 @@ public slots:
 signals:
     /// Send new position, new time and new length
     void positionUpdated( float , int, int );
-    void reset(); ///< Input changed, tell others to reset
 };
 
 
index 2d559fb84944708867d1beb88f8b0418bb661701..8ce674e2d87a3ef6dd2769bc207fc57a8f73c423 100644 (file)
 MainInterface::MainInterface( intf_thread_t *_p_intf ) :
                             QWidget( NULL ), p_intf( _p_intf)
 {
-    fprintf( stderr, "QT Main interface\n" );
-
     /* Init UI */
-    slider = new InputSlider( Qt::Horizontal, this ); slider->init();
+    slider = new InputSlider( Qt::Horizontal, this );
 
     /* Init input manager */
     p_input = NULL;
@@ -49,7 +47,7 @@ void MainInterface::init()
     QObject::connect( this, SIGNAL( inputChanged( input_thread_t * ) ),
                    main_input_manager, SLOT( setInput( input_thread_t * ) ) );
 
-    /* Connect the slider and the input manager */
+    /* Connect the slider and the input manager (both ways) */
     QObject::connect( main_input_manager, SIGNAL(positionUpdated(
                       float, int, int ) ), slider, SLOT( setPosition( float,int,
                       int ) ) );
@@ -88,7 +86,6 @@ void MainInterface::updateOnTimer()
         if( p_input )
         {
             vlc_object_yield( p_input );
-            fprintf( stderr, "Sending input\n");
             emit inputChanged( p_input );
         }
 
index b23af1b8c46b65960b3d450d95f9557934ef438e..4a740677dd0bb2ecce1fe2f624e61e9e4d359178 100644 (file)
 
 #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 );
@@ -37,7 +43,6 @@ void InputSlider::init()
 
 void InputSlider::setPosition( float pos, int a, int b )
 {
-    fprintf( stderr, "Set pos %f\n", pos );
     mymove = true;
     setValue( (int)(pos * 1000.0 ) );
     mymove = false;
@@ -48,7 +53,6 @@ void InputSlider::userDrag( int new_value )
     float f_pos = (float)(new_value)/1000.0;
     if( !mymove )
     {
-        fprintf( stderr, "Emitting %f\n", f_pos );
         emit sliderDragged( f_pos );
     }
 }
index 04ed3b59aa07cb50328c5c164d97f467b20a8a36..cf690392f60206c87e5a1f03056a2771d6383587 100644 (file)
@@ -29,11 +29,9 @@ class InputSlider : public DirectSlider
 {
     Q_OBJECT
 public:
-    InputSlider( QWidget *_parent ) : DirectSlider( _parent ) {};
-    InputSlider( Qt::Orientation q,QWidget *_parent ) : DirectSlider( q,_parent )
-    {};
+    InputSlider( QWidget *_parent );
+    InputSlider( Qt::Orientation q,QWidget *_parent );
     virtual ~InputSlider()   {};
-    void init();
 private:
     bool mymove;
 public slots: