Sayonara Player
Classes | Public Types | Public Member Functions | Static Public Member Functions | List of all members
DynamicPlayback::ArtistMatch Class Reference

Classes

struct  Entry
 

Public Types

enum  Quality : uint8_t {
  Poor = 0,
  Good,
  VeryGood,
  Excellent
}
 The Quality enum used to access the bin of interest. See ArtistMatch::get(Quality q)
 

Public Member Functions

 ArtistMatch (const QString &artist_name)
 
 ArtistMatch (const ArtistMatch &other)
 
bool isValid () const
 checks, if structure is valid. More...
 
bool operator== (const ArtistMatch &am) const
 Compares two ArtistMatch structures. More...
 
ArtistMatchoperator= (const ArtistMatch &other)
 
void add (const Entry &entry)
 adds an artist string to the corresponding bin More...
 
QList< Entryget (Quality q) const
 get bin by quality More...
 
QString artistName () const
 get the corresponding artist name of the ArtistMatch structure More...
 
QString toString () const
 converts the artist match to string More...
 

Static Public Member Functions

static ArtistMatch fromString (const QString &data)
 

Member Function Documentation

◆ add()

void DynamicPlayback::ArtistMatch::add ( const Entry entry)

adds an artist string to the corresponding bin

Parameters
artistartist string
matchthe match value

◆ artistName()

QString DynamicPlayback::ArtistMatch::artistName ( ) const

get the corresponding artist name of the ArtistMatch structure

Returns
artist name

◆ get()

QList<Entry> DynamicPlayback::ArtistMatch::get ( Quality  q) const

get bin by quality

Parameters
qquality. See ArtistMatch::Quality
Returns
the desired bin

◆ isValid()

bool DynamicPlayback::ArtistMatch::isValid ( ) const

checks, if structure is valid.

Returns
false, if all bins are empty. True else

◆ operator==()

bool DynamicPlayback::ArtistMatch::operator== ( const ArtistMatch am) const

Compares two ArtistMatch structures.

Parameters
amthe other ArtistMatch
Returns
true, if the artist string is the same. False else

◆ toString()

QString DynamicPlayback::ArtistMatch::toString ( ) const

converts the artist match to string

Returns
string representation