Sayonara Player
Toggle main menu visibility
Loading...
Searching...
No Matches
src
Utils
EqualizerSetting.h
1
/* EqualizerSetting.h */
2
3
/* Copyright (C) 2011 Michael Lugmair (Lucio Carreras)
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
21
#ifndef EQUALIZER_SETTING_H_
22
#define EQUALIZER_SETTING_H_
23
24
#include "Utils/Pimpl.h"
25
26
#include <QString>
27
#include <array>
28
33
34
class
EqualizerSetting
35
{
36
PIMPL(EqualizerSetting)
37
38
public
:
39
40
using
ValueArray=std::array<int, 10>;
41
42
EqualizerSetting(
int
id
=-1,
const
QString&
name
=QString());
43
EqualizerSetting(
int
id
,
const
QString&
name
,
const
ValueArray&
values
);
44
EqualizerSetting(
int
id
,
const
QString&
name
,
const
ValueArray&
values
,
const
ValueArray& defaultValues);
45
46
EqualizerSetting(
const
EqualizerSetting& other);
47
~EqualizerSetting();
48
49
EqualizerSetting& operator=(
const
EqualizerSetting& s);
50
55
QString
name
()
const
;
56
61
void
setName
(
const
QString&
name
);
62
63
int
id()
const
;
64
void
setId(
int
id
);
65
70
const
ValueArray&
values
()
const
;
71
72
const
ValueArray& defaultValues()
const
;
73
79
int
value
(
int
idx)
const
;
80
86
void
setValue
(
int
idx,
int
val);
87
94
void
setValues
(
const
ValueArray&
values
);
95
96
void
setDefaultValues(
const
ValueArray&
values
);
97
102
bool
isDefault
()
const
;
103
104
105
ValueArray::const_iterator begin()
const
;
106
ValueArray::const_iterator end()
const
;
107
};
108
109
#endif
EqualizerSetting::setValue
void setValue(int idx, int val)
set specific value for band
EqualizerSetting::name
QString name() const
get name of setting
EqualizerSetting::values
const ValueArray & values() const
get database values for setting
EqualizerSetting::setValues
void setValues(const ValueArray &values)
set all values for a specific index. If there are more than 10 values, list is stripped....
EqualizerSetting::value
int value(int idx) const
get specific value for a band idx. if idx is not valid, 0 is returned
EqualizerSetting::setName
void setName(const QString &name)
set name of setting
EqualizerSetting::isDefault
bool isDefault() const
checks, if preset is default preset
Generated on
for Sayonara Player by
1.17.0