source: smplayer/trunk/src/eqslider.cpp@ 119

Last change on this file since 119 was 119, checked in by Silvan Scherrer, 14 years ago

SMPlayer: latest svn update

  • Property svn:eol-style set to LF
File size: 1.9 KB
Line 
1/* smplayer, GUI front-end for mplayer.
2 Copyright (C) 2006-2011 Ricardo Villalba <rvm@escomposlinux.org>
3
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.
8
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.
13
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
17*/
18
19#include "eqslider.h"
20#include <QSlider>
21#include <QLabel>
22#include <QPixmap>
23#include "verticaltext.h"
24
25
26EqSlider::EqSlider( QWidget* parent, Qt::WindowFlags f)
27 : QWidget(parent, f)
28{
29 setupUi(this);
30
31 _icon->setText( QString::null );
32 _slider->setFocusPolicy( Qt::StrongFocus );
33 _slider->setTickPosition( QSlider::TicksRight );
34 _slider->setTickInterval( 10 );
35 _slider->setSingleStep( 1 );
36 _slider->setPageStep( 10 );
37
38 connect( _slider, SIGNAL(valueChanged(int)),
39 this, SLOT(sliderValueChanged(int)) );
40}
41
42EqSlider::~EqSlider() {
43}
44
45/*
46void EqSlider::languageChange() {
47}
48*/
49
50void EqSlider::setIcon( QPixmap i) {
51 _icon->setPixmap(i);
52}
53
54const QPixmap * EqSlider::icon() const {
55 return _icon->pixmap();
56}
57
58void EqSlider::setLabel( QString s) {
59 _label->setText(s);
60}
61
62QString EqSlider::label() const {
63 return _label->text();
64}
65
66void EqSlider::setValue(int value) {
67 _slider->setValue(value);
68 value_label->setNum(value);
69}
70
71int EqSlider::value() const {
72 return _slider->value();
73}
74
75void EqSlider::sliderValueChanged(int v) {
76 emit valueChanged( v );
77}
78
79#include "moc_eqslider.cpp"
Note: See TracBrowser for help on using the repository browser.