Sayonara Player
Signals | Public Member Functions | Public Slots | List of all members
Cover::Lookup Class Reference

#include <CoverLookup.h>

Detailed Description

The CoverLookup class.

Signals

void sig_cover_found (const QPixmap &pm)
 
void sig_finished (bool success)
 
void sig_started ()
 

Public Member Functions

 Lookup (QObject *parent=nullptr, int n_covers=1)
 
 Lookup (QObject *parent, int n_covers, const Location &cl)
 
bool fetch_cover (const Location &cl, bool also_www=true)
 fetches cover for a CoverLocation. More...
 
void stop () override
 Stop the Cover::FetchThread if running and retrieve the sig_finished signal If no Cover::FetchThread is running, nothing will happen.
 
bool is_thread_running () const
 indicates if the Cover::FetchThread is running More...
 
void set_user_data (void *data)
 Set some custom data you can retrieve later. More...
 
void * user_data ()
 Fetch your custom data again. More...
 
QList< QPixmap > pixmaps () const
 Get a copy of all pixmaps that where fetched. More...
 
QList< QPixmap > take_pixmaps ()
 Get all pixmaps that where fetched and remove them from Cover::Lookup. More...
 

Public Slots

void start ()
 

Member Function Documentation

◆ fetch_cover()

bool Cover::Lookup::fetch_cover ( const Location cl,
bool  also_www = true 
)

fetches cover for a CoverLocation.

  1. Looks up CoverLocation::cover_path
  2. Looks up CoverLocation::local_paths
  3. Starts a CoverFetchThread
    Parameters
    clCoverLocation of interest
    Returns
    always true

◆ is_thread_running()

bool Cover::Lookup::is_thread_running ( ) const

indicates if the Cover::FetchThread is running

Returns

◆ pixmaps()

QList<QPixmap> Cover::Lookup::pixmaps ( ) const

Get a copy of all pixmaps that where fetched.

Returns

◆ set_user_data()

void Cover::Lookup::set_user_data ( void *  data)

Set some custom data you can retrieve later.

Parameters
data

◆ take_pixmaps()

QList<QPixmap> Cover::Lookup::take_pixmaps ( )

Get all pixmaps that where fetched and remove them from Cover::Lookup.

Returns

◆ user_data()

void* Cover::Lookup::user_data ( )

Fetch your custom data again.

Returns
Inheritance diagram for Cover::Lookup:
Cover::LookupBase