source: smplayer/trunk/src/audioequalizer.h@ 170

Last change on this file since 170 was 165, checked in by Silvan Scherrer, 11 years ago

SMPlayer: update trunk to latest 0.8.7

  • Property svn:eol-style set to LF
File size: 2.2 KB
Line 
1/* smplayer, GUI front-end for mplayer.
2 Copyright (C) 2006-2014 Ricardo Villalba <rvm@users.sourceforge.net>
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
20#ifndef _AUDIOOEQUALIZER_H_
21#define _AUDIOOEQUALIZER_H_
22
23#include <QWidget>
24#include <QHideEvent>
25#include <QShowEvent>
26#include "audioequalizerlist.h"
27
28class QLabel;
29class QComboBox;
30class QPushButton;
31class EqSlider;
32
33class AudioEqualizer : public QWidget
34{
35 Q_OBJECT
36
37public:
38 enum Preset { User_defined = 0, Flat = 1, Pop = 2, Rock = 3, Classical = 4, Club = 5, Dance = 6, Fullbass = 7,
39 FullbassTreble = 8, Fulltreble = 9, Headphones = 10, LargeHall = 11, Live = 12,
40 Party = 13, Reggae = 14, Ska = 15, Soft = 16, SoftRock = 17, Techno = 18 };
41
42 AudioEqualizer( QWidget* parent = 0, Qt::WindowFlags f = Qt::Dialog );
43 ~AudioEqualizer();
44
45 EqSlider * eq[10];
46
47 void setEqualizer(AudioEqualizerList l);
48
49signals:
50 void visibilityChanged();
51 void applyClicked(AudioEqualizerList new_values);
52
53public slots:
54 void reset();
55 void setDefaults();
56
57protected slots:
58 void applyButtonClicked();
59 void presetChanged(int index);
60
61protected:
62 virtual void hideEvent( QHideEvent * );
63 virtual void showEvent( QShowEvent * );
64 virtual void changeEvent( QEvent * event );
65 virtual void retranslateStrings();
66
67 void createPresets();
68 void setValues(AudioEqualizerList l);
69 int findPreset(AudioEqualizerList l);
70
71protected:
72 QLabel * presets_label;
73 QComboBox * presets_combo;
74 QPushButton * apply_button;
75 QPushButton * reset_button;
76 QPushButton * set_default_button;
77 QMap<int,AudioEqualizerList> preset_list;
78};
79
80
81#endif
Note: See TracBrowser for help on using the repository browser.