1 /*****************************************************************************
2 * input_slider.hpp : A slider that controls an input
3 ****************************************************************************
4 * Copyright (C) 2006 the VideoLAN team
7 * Authors: Clément Stenac <zorglub@videolan.org>
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
22 *****************************************************************************/
24 #ifndef _INPUTSLIDER_H_
25 #define _INPUTSLIDER_H_
30 #include <QMouseEvent>
32 class InputSlider : public QSlider
36 InputSlider( QWidget *_parent );
37 InputSlider( Qt::Orientation q,QWidget *_parent );
38 virtual ~InputSlider() {};
40 virtual void mouseMoveEvent(QMouseEvent *event);
41 virtual void mousePressEvent(QMouseEvent* event);
42 virtual void mouseReleaseEvent(QMouseEvent* event);
46 char psz_length[MSTRTIME_MAX_SIZE];
48 void setPosition( float, int, int );
52 void sliderDragged( float );
57 #include <QAbstractSlider>
59 class SoundSlider : public QAbstractSlider
63 SoundSlider( QWidget *_parent, int _i_step, bool b_softamp, char * );
64 virtual ~SoundSlider() {};
68 virtual void paintEvent(QPaintEvent *);
69 virtual void wheelEvent( QWheelEvent *event );
70 virtual void mousePressEvent( QMouseEvent * );
71 virtual void mouseMoveEvent( QMouseEvent * );
72 virtual void mouseReleaseEvent( QMouseEvent * );
78 void changeValue( int x );