source: smplayer/vendor/0.6.9/src/audioequalizer.cpp@ 189

Last change on this file since 189 was 90, checked in by Silvan Scherrer, 16 years ago

smplayer: import 0.6.9

File size: 3.9 KB
Line 
1/* smplayer, GUI front-end for mplayer.
2 Copyright (C) 2006-2010 Ricardo Villalba <[email protected]>
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 "audioequalizer.h"
20#include "eqslider.h"
21#include "images.h"
22#include "preferences.h"
23#include "global.h"
24#include <QLayout>
25#include <QPushButton>
26#include <QMessageBox>
27
28using namespace Global;
29
30AudioEqualizer::AudioEqualizer( QWidget* parent, Qt::WindowFlags f)
31 : QWidget(parent, f)
32{
33 QBoxLayout *bl = new QHBoxLayout; //(0, 4, 2);
34
35 for (int n = 0; n < 10; n++) {
36 eq[n] = new EqSlider(this);
37 eq[n]->setIcon( QPixmap() );
38 eq[n]->sliderWidget()->setRange(-120, 120);
39 bl->addWidget(eq[n]);
40 }
41
42 reset_button = new QPushButton( "&Reset", this);
43 connect( reset_button, SIGNAL(clicked()), this, SLOT(reset()) );
44
45 set_default_button = new QPushButton( "&Set as default values", this );
46 connect( set_default_button, SIGNAL(clicked()), this, SLOT(setDefaults()) );
47
48 apply_button = new QPushButton( "&Apply", this );
49 connect( apply_button, SIGNAL(clicked()), this, SLOT(applyButtonClicked()) );
50
51 QBoxLayout *button_layout = new QHBoxLayout; //(0, 4, 2);
52 button_layout->addStretch();
53 button_layout->addWidget(apply_button);
54 button_layout->addWidget(reset_button);
55 button_layout->addWidget(set_default_button);
56
57 QBoxLayout *layout = new QVBoxLayout(this); //, 4, 2);
58 layout->addLayout(bl);
59 layout->addLayout(button_layout);
60
61 retranslateStrings();