Sayonara Player
Loading...
Searching...
No Matches
Equalizer.h
1/* Equalizer.h */
2/*
3 * Copyright (C) 2011-2024 Michael Lugmair
4 *
5 * This file is part of sayonara player
6 *
7 * This program is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
19 */
20#ifndef SAYONARA_PLAYER_EQUALIZER_H
21#define SAYONARA_PLAYER_EQUALIZER_H
22
23#include "Utils/Pimpl.h"
24
25#include <QObject>
26#include <QList>
27
28class SoundModifier;
30class QString;
31class Equalizer :
32 public QObject
33{
34 Q_OBJECT
35 PIMPL(Equalizer)
36
37 signals:
38 void sigValueChanged(int band, int value);
39
40 public:
41 enum RenameError
42 {
43 NoError = 0,
44 DbError,
45 EmptyName,
46 NameAlreadyKnown,
47 InvalidIndex
48 };
49
50 Equalizer(SoundModifier* soundModifier, QObject* parent = nullptr);
51 ~Equalizer() noexcept;
52
53 const EqualizerSetting& equalizerSetting(int index) const;
54 EqualizerSetting& equalizerSetting(int index);
55 const EqualizerSetting& currentSetting() const;
56
57 QStringList names() const;
58 QStringList defaultNames() const;
59
60 void changeValue(int index, int band, int value);
61 void resetPreset(int presetIndex);
62 RenameError renamePreset(int index, const QString& newName);
63 bool deletePreset(int presetIndex);
64 RenameError saveCurrentEqualizerAs(const QString& name);
65
66 int currentIndex() const;
67 void setCurrentIndex(int index);
68
69 int count() const;
70
71 void setGaussEnabled(bool enabled);
72 bool isGaussEnabled() const;
73
74 void startValueChange();
75 void endValueChange();
76};
77
78#endif //SAYONARA_PLAYER_EQUALIZER_H
The EQ_Setting class. Container for Equalizer configurations.
Definition: EqualizerSetting.h:35
Definition: Equalizer.h:33
Definition: SoundModifier.h:24