1
/* smplayer, GUI front-end for mplayer.
2
Copyright (C) 2007 Ricardo Villalba <rvm@escomposlinux.org>
4
This program is free software; you can redistribute it and/or modify
5
it under the terms of the GNU General Public License as published by
6
the Free Software Foundation; either version 2 of the License, or
7
(at your option) any later version.
9
This program is distributed in the hope that it will be useful,
10
but WITHOUT ANY WARRANTY; without even the implied warranty of
11
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
GNU General Public License for more details.
14
You should have received a copy of the GNU General Public License
15
along with this program; if not, write to the Free Software
16
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23
#include "verticaltext.h"
24
#include "qt3_4_compat.h"
26
EqSlider::EqSlider( QWidget* parent, const char* name, WFlags fl)
27
: EqSliderBase(parent, name, fl)
29
_icon->setText( QString::null );
30
_slider->setFocusPolicy( STRONGFOCUS );
31
_slider->setTickmarks( QSlider::Right );
32
_slider->setTickInterval( 10 );
33
_slider->setLineStep( 1 );
34
_slider->setPageStep( 10 );
36
connect( _slider, SIGNAL(valueChanged(int)),
37
this, SLOT(sliderValueChanged(int)) );
40
EqSlider::~EqSlider() {
44
void EqSlider::languageChange() {
47
void EqSlider::setIcon( QPixmap i) {
51
const QPixmap * EqSlider::icon() const {
52
return _icon->pixmap();
55
void EqSlider::setLabel( QString s) {
59
QString EqSlider::label() const {
60
return _label->text();
63
void EqSlider::setValue(int value) {
64
#if QT_VERSION >= 0x040000
65
_slider->setValue(value);
67
// QSlider in Qt 3works upside-down!
68
_slider->setValue(-value);
72
int EqSlider::value() const {
73
#if QT_VERSION >= 0x040000
74
return _slider->value();
76
// QSlider in Qt 3 works upside-down!
77
return - _slider->value();
81
void EqSlider::sliderValueChanged(int v) {
82
#if QT_VERSION >= 0x040000
83
emit valueChanged( v );
85
// QSlider in Qt 3 works upside-down!
86
emit valueChanged( -v );