Revert previous commit, was incorrect
[amarok.git] / src / equalizersetup.h
blob146c40e00477f4cef7b7ea2b7df8817d380ae03b
1 /***************************************************************************
2 Setup dialog for the equalizer
4 (c) 2004 Mark Kretschmann <markey@web.de>
5 (c) 2005 Seb Ruiz <ruiz@kde.org>
6 (c) 2005 Markus Brueffer <markus@brueffer.de>
7 ***************************************************************************/
9 /***************************************************************************
10 * *
11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation; either version 2 of the License, or *
14 * (at your option) any later version. *
15 * *
16 ***************************************************************************/
18 #ifndef AMAROK_EQUALIZERSETUP_H
19 #define AMAROK_EQUALIZERSETUP_H
21 #include <kdialog.h>
23 #include <QList> //stack alloc
26 class EqualizerGraph;
27 class KComboBox;
28 class QGroupBox;
30 namespace Amarok { class Slider; }
33 class EqualizerSetup : public KDialog
35 Q_OBJECT
37 public:
38 static EqualizerSetup* instance() { return s_instance ? s_instance : new EqualizerSetup(); }
39 static bool isInstantiated() { return s_instance ? true : false; }
41 EqualizerSetup();
42 ~EqualizerSetup();
44 // for use by DCOP
45 void setActive( bool active );
46 void setBands( int preamp, QList<int> gains );
47 void setPreset( QString name );
49 private slots:
50 void presetChanged( int id );
51 void presetChanged( QString title );
52 void sliderChanged();
53 void setEqualizerEnabled( bool );
54 void setEqualizerParameters();
55 void editPresets();
56 void addPreset();
58 private:
59 static EqualizerSetup* s_instance;
61 void loadPresets();
62 void savePresets();
63 void updatePresets(QString selectTitle = QString());
64 QString presetsCache() const;
66 Amarok::Slider* m_slider_preamp;
67 EqualizerGraph* m_equalizerGraph;
68 QList<Amarok::Slider*> m_bandSliders;
70 QGroupBox* m_groupBoxSliders;
71 KComboBox* m_presetCombo;
72 uint m_manualPos;
74 QMap< QString, QList<int> > m_presets;
77 #endif /*AMAROK_EQUALIZERSETUP_H*/