[vlc-commits] Qt: rename a class

Jean-Baptiste Kempf git at videolan.org
Tue Apr 12 02:30:51 CEST 2011


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Tue Apr 12 00:53:04 2011 +0200| [7ab98f85ccc97618cb55f6c2a111539bf36ad5eb] | committer: Jean-Baptiste Kempf

Qt: rename a class

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=7ab98f85ccc97618cb55f6c2a111539bf36ad5eb
---

 modules/gui/qt4/components/controller.cpp |    4 ++--
 modules/gui/qt4/components/controller.hpp |    2 +-
 modules/gui/qt4/dialogs/toolbar.cpp       |    2 +-
 modules/gui/qt4/util/input_slider.cpp     |   26 +++++++++++++-------------
 modules/gui/qt4/util/input_slider.hpp     |    6 +++---
 5 files changed, 20 insertions(+), 20 deletions(-)

diff --git a/modules/gui/qt4/components/controller.cpp b/modules/gui/qt4/components/controller.cpp
index abbe9bd..b8a832c 100644
--- a/modules/gui/qt4/components/controller.cpp
+++ b/modules/gui/qt4/components/controller.cpp
@@ -37,7 +37,7 @@
 #include "input_manager.hpp"
 #include "actions_manager.hpp"
 
-#include "util/input_slider.hpp" /* InputSlider */
+#include "util/input_slider.hpp" /* SeekSlider */
 #include "util/customwidgets.hpp" /* qEventToKey */
 
 #include <QSpacerItem>
@@ -289,7 +289,7 @@ QWidget *AbstractController::createWidget( buttonType_e button, int options )
         }
         break;
     case INPUT_SLIDER: {
-        InputSlider *slider = new InputSlider( Qt::Horizontal, NULL );
+        SeekSlider *slider = new SeekSlider( Qt::Horizontal, NULL );
 
         /* Update the position when the IM has changed */
         CONNECT( THEMIM->getIM(), positionUpdated( float, int64_t, int ),
diff --git a/modules/gui/qt4/components/controller.hpp b/modules/gui/qt4/components/controller.hpp
index e32cb21..15540d8 100644
--- a/modules/gui/qt4/components/controller.hpp
+++ b/modules/gui/qt4/components/controller.hpp
@@ -50,7 +50,7 @@ class QBoxLayout;
 
 class QAbstractSlider;
 class QAbstractButton;
-class InputSlider;
+class SeekSlider;
 class QToolButton;
 
 class VolumeClickHandler;
diff --git a/modules/gui/qt4/dialogs/toolbar.cpp b/modules/gui/qt4/dialogs/toolbar.cpp
index 72cf407..85af2ce 100644
--- a/modules/gui/qt4/dialogs/toolbar.cpp
+++ b/modules/gui/qt4/dialogs/toolbar.cpp
@@ -333,7 +333,7 @@ WidgetListing::WidgetListing( intf_thread_t *p_intf, QWidget *_parent )
             break;
         case INPUT_SLIDER:
             {
-                InputSlider *slider = new InputSlider( Qt::Horizontal, this );
+                SeekSlider *slider = new SeekSlider( Qt::Horizontal, this );
                 widget = slider;
             }
             widgetItem->setText( qtr("Time Slider") );
diff --git a/modules/gui/qt4/util/input_slider.cpp b/modules/gui/qt4/util/input_slider.cpp
index 34e03d9..552f8c9 100644
--- a/modules/gui/qt4/util/input_slider.cpp
+++ b/modules/gui/qt4/util/input_slider.cpp
@@ -39,12 +39,12 @@
 #define MINIMUM 0
 #define MAXIMUM 1000
 
-InputSlider::InputSlider( QWidget *_parent ) : QSlider( _parent )
+SeekSlider::SeekSlider( QWidget *_parent ) : QSlider( _parent )
 {
-    InputSlider( Qt::Horizontal, _parent );
+    SeekSlider( Qt::Horizontal, _parent );
 }
 
-InputSlider::InputSlider( Qt::Orientation q, QWidget *_parent )
+SeekSlider::SeekSlider( Qt::Orientation q, QWidget *_parent )
             : QSlider( q, _parent )
 {
     b_isSliding = false;
@@ -72,7 +72,7 @@ InputSlider::InputSlider( Qt::Orientation q, QWidget *_parent )
 /***
  * \brief Public interface, like setValue,  but disabling the slider too
  ***/
-void InputSlider::setPosition( float pos, int64_t a, int b )
+void SeekSlider::setPosition( float pos, int64_t a, int b )
 {
     if( pos == -1.0 )
     {
@@ -88,20 +88,20 @@ void InputSlider::setPosition( float pos, int64_t a, int b )
     inputLength = b;
 }
 
-void InputSlider::startSeekTimer( int new_value )
+void SeekSlider::startSeekTimer( int new_value )
 {
     /* Only fire one update, when sliding, every 150ms */
     if( b_isSliding && !seekLimitTimer->isActive() )
         seekLimitTimer->start( 150 );
 }
 
-void InputSlider::updatePos()
+void SeekSlider::updatePos()
 {
     float f_pos = (float)(value())/1000.0;
     emit sliderDragged( f_pos ); /* Send new position to VLC's core */
 }
 
-void InputSlider::mouseReleaseEvent( QMouseEvent *event )
+void SeekSlider::mouseReleaseEvent( QMouseEvent *event )
 {
     event->accept();
     b_isSliding = false;
@@ -110,7 +110,7 @@ void InputSlider::mouseReleaseEvent( QMouseEvent *event )
     updatePos();
 }
 
-void InputSlider::mousePressEvent(QMouseEvent* event)
+void SeekSlider::mousePressEvent(QMouseEvent* event)
 {
     /* Right-click */
     if( event->button() != Qt::LeftButton &&
@@ -125,7 +125,7 @@ void InputSlider::mousePressEvent(QMouseEvent* event)
     event->accept();
 }
 
-void InputSlider::mouseMoveEvent(QMouseEvent *event)
+void SeekSlider::mouseMoveEvent(QMouseEvent *event)
 {
     if( b_isSliding )
     {
@@ -138,7 +138,7 @@ void InputSlider::mouseMoveEvent(QMouseEvent *event)
     event->accept();
 }
 
-void InputSlider::wheelEvent( QWheelEvent *event)
+void SeekSlider::wheelEvent( QWheelEvent *event)
 {
     /* Don't do anything if we are for somehow reason sliding */
     if( !b_isSliding )
@@ -154,19 +154,19 @@ void InputSlider::wheelEvent( QWheelEvent *event)
     event->accept();
 }
 
-QSize InputSlider::sizeHint() const
+QSize SeekSlider::sizeHint() const
 {
     return ( orientation() == Qt::Horizontal ) ? QSize( 100, 18 )
                                                : QSize( 18, 100 );
 }
 
-QSize InputSlider::handleSize() const
+QSize SeekSlider::handleSize() const
 {
     const int size = ( orientation() == Qt::Horizontal ? height() : width() );
     return QSize( size, size );
 }
 
-void InputSlider::paintEvent( QPaintEvent *event )
+void SeekSlider::paintEvent( QPaintEvent *event )
 {
     Q_UNUSED( event );
 
diff --git a/modules/gui/qt4/util/input_slider.hpp b/modules/gui/qt4/util/input_slider.hpp
index e911d9c..00e2375 100644
--- a/modules/gui/qt4/util/input_slider.hpp
+++ b/modules/gui/qt4/util/input_slider.hpp
@@ -34,12 +34,12 @@
 #include <QTimer>
 
 /* Input Slider derived from QSlider */
-class InputSlider : public QSlider
+class SeekSlider : public QSlider
 {
     Q_OBJECT
 public:
-    InputSlider( QWidget *_parent );
-    InputSlider( Qt::Orientation q, QWidget *_parent );
+    SeekSlider( QWidget *_parent );
+    SeekSlider( Qt::Orientation q, QWidget *_parent );
 
 protected:
     virtual void mouseMoveEvent(QMouseEvent *event);



More information about the vlc-commits mailing list