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

The CoverFetchThread class, This is not a real QThread class, but behaves like one because of AsyncWebAccess. More...

#include <CoverFetchThread.h>

Inheritance diagram for Cover::FetchThread:

Signals

void sig_finished (bool b)
 emitted, when thread has finished More...
 
void sig_cover_found (int idx)
 emitted, when covers has been found More...
 

Public Member Functions

 FetchThread (QObject *parent, const Cover::Location &cl, const int n_covers)
 
bool start ()
 start fetching covers, if the url does not contain "google", a direct link to an image is assumed and will be downloaded directly More...
 
bool fetch_next_cover ()
 fetch next cover More...
 
void stop ()
 stops the current search
 
QString url (int idx) const
 Google, Amazon, Last.Fm. More...
 
QPixmap pixmap (int idx) const
 
int found_images () const
 

Detailed Description

The CoverFetchThread class, This is not a real QThread class, but behaves like one because of AsyncWebAccess.

Member Function Documentation

◆ fetch_next_cover()

bool Cover::FetchThread::fetch_next_cover ( )

fetch next cover

Returns
false, if there are no more covers to fetch

◆ sig_cover_found

void Cover::FetchThread::sig_cover_found ( int  idx)
signal

emitted, when covers has been found

Parameters
clCoverLocation including the local cover path

◆ sig_finished

void Cover::FetchThread::sig_finished ( bool  b)
signal

emitted, when thread has finished

Parameters
btrue, if couvers could be fetched. false else

◆ start()

bool Cover::FetchThread::start ( )

start fetching covers, if the url does not contain "google", a direct link to an image is assumed and will be downloaded directly

Returns
always true

◆ url()

QString Cover::FetchThread::url ( int  idx) const

Google, Amazon, Last.Fm.

Returns