1
#ifndef NOATUN_EQUALIZER_H
2
#define NOATUN_EQUALIZER_H
8
namespace Arts { class StereoEffect; }
14
friend class Equalizer;
15
Preset(const QString &file);
19
bool setName(const QString &name);
32
friend class Equalizer;
33
friend class QList<Band>;
37
Band(int start, int end);
41
* the intensity of the change.
42
* it's logarithmic. 0 is no change
43
* negative numbers are loss in intensity
44
* positive numbers are a gain
45
* And +-100 is the most you'd need to go
54
* the middle between start and end
58
QString formatStart(bool withHz=true) const;
59
QString formatEnd(bool withHz=true) const;
61
* return the format for center()
63
QString format(bool withHz=true) const;
70
class Equalizer : public QObject
80
const QList<Band> &bands() const;
81
Band *band(int num) const;
82
int bandCount() const;
85
bool isEnabled() const;
91
* set the preamplification
92
* it's logarithmic. 0 is no change
93
* negative numbers are loss in intensity
94
* positive numbers are a gain
95
* And +-100 is the most you'd need to go
97
void setPreamp(int p);
100
void setEnabled(bool e);
106
* save the current levels
107
* all noatun equalizer files have the "*.noatunequalizer"
108
* pattern. Nevertheless, the file can be identified
109
* by magic, so it's not required
111
bool save(const KURL &file, const QString &friendly) const;
114
* restore the EQ settings from this file
116
bool load(const KURL &file);
119
* create a preset with such a name
120
* and remember that it'l return zero
121
* if the name already exists
123
* If smart is true, append a number to the end
124
* of the name, if one already exists by the given
126
Preset *createPreset(const QString &name, bool smart=true);
129
* return all the presets
130
* remember to setAutoDelete on this
132
QList<Preset> presets() const;
134
Preset *preset(const QString &file);
135
bool presetExists(const QString &name) const;
138
void changed(Band *band);
142
void enabled(bool e);
144
void preampChanged(int p);
145
void preampChanged();
148
* the preset with the given name
151
void changed(Preset *);
154
* when a new preset has been created
156
void created(Preset*);
159
* when @p preset has been renamed to @p newname
161
void renamed(Preset *);
164
* the given preset has been removed
166
void removed(Preset *);
171
// apply the data to artsd
172
void enableUpdates(bool on=true);
173
void update(bool full=false);