![]() |
LeechCraft
0.6.70-6645-gcd10d7e
Modular cross-platform feature rich live environment.
|
Pending album art search handle. More...
#include "ialbumartprovider.h"
Public Member Functions | |
virtual | ~IPendingAlbumArt () |
virtual QObject * | GetQObject ()=0 |
Returns this object as a QObject. More... | |
virtual AlbumInfo | GetAlbumInfo () const =0 |
Returns the information about the album. More... | |
virtual QList< QImage > | GetImages () const =0 |
Returns the fetched cover art for the album. More... | |
virtual QList< QUrl > | GetImageUrls () const =0 |
Returns the URLs of the covert art for the album. More... | |
Protected Member Functions | |
virtual void | ready (const AlbumInfo &info, const QList< QImage > &images)=0 |
Emitted when the album info and the cover art is ready and fetched. More... | |
virtual void | urlsReady (const AlbumInfo &info, const QList< QUrl > &urls)=0 |
Emitted when the album info and the URLs of cover art are ready. More... | |
Pending album art search handle.
Interface for a pending album art search in an IAlbumArtProvider. An object implementing this interface is returned from IAlbumArtProvider::RequestAlbumArt() method and is used to track the status of album art requests.
This class has some signals (ready() and urlsReady()), and the GetQObject() method can be used to get an object of this class as a QObject to connect to those signals.
The urlsReady() signal is emitted as soon as the URLs of the album images are fetched, and then the user of this object can either wait for the convenience ready() signal after which the object would be destroyed, or delete the object himself.
QObject::deleteLater()
, for example) after the ready() signal is emitted. Thus the calling code should never delete it explicitly after this signal, neither it should use this object after ready() signal or connect to its signals via Qt::QueuedConnection
.Definition at line 95 of file ialbumartprovider.h.
|
inlinevirtual |
Definition at line 98 of file ialbumartprovider.h.
|
pure virtual |
Returns the information about the album.
The returned object is invalid if called before the urlsReady() signal is emitted.
|
pure virtual |
|
pure virtual |
Returns the URLs of the covert art for the album.
The returned list is empty if called before the urlsReady() signal is emitted.
|
pure virtual |
Returns this object as a QObject.
This function can be used to connect to the signals of this class.
|
protectedpure virtual |
Emitted when the album info and the cover art is ready and fetched.
The object will be invalid after this signal is emitted and the event loop is run.
If you only need the URLs of the images but not the images themselves (like if you will show the images by URLs in a QML view), consider deleting this object after urlsReady() signal instead of waiting for this signal.
[out] | info | The information about the album. |
[out] | images | The images corresponding to this album. |
|
protectedpure virtual |
Emitted when the album info and the URLs of cover art are ready.
After emitting this signal the object will start fetching the images at the given urls and emit ready() after fetching them. If the images themselves are not required, some bandwidth and CPU cycles can be saved by deleting the object in a slot connected to this signal.
[out] | info | The information about the album. |
[out] | urls | The cover art corresponding to this album. |