[112] | 1 | /* smplayer, GUI front-end for mplayer.
|
---|
[188] | 2 | Copyright (C) 2006-2017 Ricardo Villalba <rvm@users.sourceforge.net>
|
---|
[112] | 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 |
|
---|
[176] | 20 | #ifndef AUDIOEQUALIZER_H
|
---|
| 21 | #define AUDIOEQUALIZER_H
|
---|
[112] | 22 |
|
---|
| 23 | #include <QWidget>
|
---|
| 24 | #include <QHideEvent>
|
---|
| 25 | #include <QShowEvent>
|
---|
| 26 | #include "audioequalizerlist.h"
|
---|
| 27 |
|
---|
[165] | 28 | class QLabel;
|
---|
| 29 | class QComboBox;
|
---|
[112] | 30 | class QPushButton;
|
---|
| 31 | class EqSlider;
|
---|
| 32 |
|
---|
| 33 | class AudioEqualizer : public QWidget
|
---|
| 34 | {
|
---|
[165] | 35 | Q_OBJECT
|
---|
[112] | 36 |
|
---|
| 37 | public:
|
---|
[165] | 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 };
|
---|
[112] | 41 |
|
---|
[165] | 42 | AudioEqualizer( QWidget* parent = 0, Qt::WindowFlags f = Qt::Dialog );
|
---|
| 43 | ~AudioEqualizer();
|
---|
| 44 |
|
---|
[112] | 45 | EqSlider * eq[10];
|
---|
| 46 |
|
---|
[165] | 47 | void setEqualizer(AudioEqualizerList l);
|
---|
| 48 |
|
---|
[112] | 49 | signals:
|
---|
| 50 | void visibilityChanged();
|
---|
| 51 | void applyClicked(AudioEqualizerList new_values);
|
---|
[176] | 52 | void valuesChanged(AudioEqualizerList values);
|
---|
[112] | 53 |
|
---|
| 54 | public slots:
|
---|
| 55 | void reset();
|
---|
| 56 | void setDefaults();
|
---|
| 57 |
|
---|
| 58 | protected slots:
|
---|
| 59 | void applyButtonClicked();
|
---|
[165] | 60 | void presetChanged(int index);
|
---|
[176] | 61 | void updatePresetCombo();
|
---|
[112] | 62 |
|
---|
| 63 | protected:
|
---|
| 64 | virtual void hideEvent( QHideEvent * );
|
---|
| 65 | virtual void showEvent( QShowEvent * );
|
---|
[165] | 66 | virtual void changeEvent( QEvent * event );
|
---|
[112] | 67 | virtual void retranslateStrings();
|
---|
| 68 |
|
---|
[165] | 69 | void createPresets();
|
---|
| 70 | void setValues(AudioEqualizerList l);
|
---|
| 71 | int findPreset(AudioEqualizerList l);
|
---|
| 72 |
|
---|
[112] | 73 | protected:
|
---|
[165] | 74 | QLabel * presets_label;
|
---|
| 75 | QComboBox * presets_combo;
|
---|
[112] | 76 | QPushButton * apply_button;
|
---|
| 77 | QPushButton * reset_button;
|
---|
| 78 | QPushButton * set_default_button;
|
---|
[181] | 79 | QPushButton * close_button;
|
---|
[165] | 80 | QMap<int,AudioEqualizerList> preset_list;
|
---|
[112] | 81 | };
|
---|
| 82 |
|
---|
| 83 |
|
---|
| 84 | #endif
|
---|