Sayonara Player
Public Member Functions | Static Public Member Functions | List of all members
EQ_Setting Class Referencefinal

#include <EqualizerPresets.h>

Detailed Description

The EQ_Setting class. Container for Equalizer configurations.

Public Member Functions

 EQ_Setting (const QString &name=QString())
 
 EQ_Setting (const EQ_Setting &other)
 
EQ_Settingoperator= (const EQ_Setting &s)
 
bool operator== (const EQ_Setting &s) const
 Compares the case insensitive string representation of two settings. More...
 
QString name () const
 get name of setting More...
 
void set_name (const QString &name)
 set name of setting More...
 
QList< int > values () const
 get database values for setting More...
 
int value (int idx) const
 get specific value for a band idx. if idx is not valid, 0 is returned More...
 
void set_value (int idx, int val)
 set specific value for band More...
 
void set_values (const QList< int > values)
 set all values for a specific index. If there are more than 10 values, list is stripped. If there are less, the list is filled with zeros More...
 
bool is_default () const
 append a value. If there are already more than 10 values, nothing happens More...
 
bool is_default_name () const
 checks, if the preset name belongs to a default preset More...
 
QString toString () const
 converts EQ_Setting to string More...
 

Static Public Member Functions

static QList< EQ_Settingget_defaults ()
 get default settings More...
 
static QList< int > get_default_values (const QString &name)
 get default values for a specific preset. If the preset does not have default values, an empty list is returned More...
 
static bool is_default_name (const QString &name)
 static convenience function for is_default_name() More...
 
static EQ_Setting fromString (const QString &str)
 converts a string to a EQ_Setting. If not possible a default constructed EQ_Setting is returned More...
 

Member Function Documentation

◆ fromString()

static EQ_Setting EQ_Setting::fromString ( const QString &  str)
static

converts a string to a EQ_Setting. If not possible a default constructed EQ_Setting is returned

Parameters
str
Returns

◆ get_default_values()

static QList<int> EQ_Setting::get_default_values ( const QString &  name)
static

get default values for a specific preset. If the preset does not have default values, an empty list is returned

Parameters
namepreset name
Returns
value list if name belongs to a default preset. Empty list else

◆ get_defaults()

static QList<EQ_Setting> EQ_Setting::get_defaults ( )
static

get default settings

Returns
list of default settings

◆ is_default()

bool EQ_Setting::is_default ( ) const

append a value. If there are already more than 10 values, nothing happens

Parameters
valchecks, if preset is default preset
Returns
true if preset is default preset, false else

◆ is_default_name() [1/2]

bool EQ_Setting::is_default_name ( ) const

checks, if the preset name belongs to a default preset

Returns
true if preset is default preset, false else

◆ is_default_name() [2/2]

static bool EQ_Setting::is_default_name ( const QString &  name)
static

static convenience function for is_default_name()

Parameters
namepreset name
Returns

◆ name()

QString EQ_Setting::name ( ) const

get name of setting

Returns

◆ operator==()

bool EQ_Setting::operator== ( const EQ_Setting s) const

Compares the case insensitive string representation of two settings.

Parameters
sother preset
Returns

◆ set_name()

void EQ_Setting::set_name ( const QString &  name)

set name of setting

Parameters
name

◆ set_value()

void EQ_Setting::set_value ( int  idx,
int  val 
)

set specific value for band

Parameters
idxband index
valdatabase formatted value

◆ set_values()

void EQ_Setting::set_values ( const QList< int >  values)

set all values for a specific index. If there are more than 10 values, list is stripped. If there are less, the list is filled with zeros

Parameters
values

◆ toString()

QString EQ_Setting::toString ( ) const

converts EQ_Setting to string

Returns

◆ value()

int EQ_Setting::value ( int  idx) const

get specific value for a band idx. if idx is not valid, 0 is returned

Parameters
idxband index
Returns
database value if idx is valid, 0 else

◆ values()

QList<int> EQ_Setting::values ( ) const

get database values for setting

Returns