00001 #ifndef MEDIAARTSREQUESTER_H 00002 #define MEDIAARTSREQUESTER_H 00003 #include "mediaartinfo.h" 00004 #include <QUrl> 00005 #include <QPixmap> 00006 #include <QList> 00007 #include <QObject> 00008 00009 namespace MediaArt { 00010 class MediaArtRequesterPrivate; 00011 00063 class Requester : public QObject { 00064 Q_OBJECT 00065 public: 00076 Requester ( QUrl defaultPath = QUrl(), 00077 QPixmap defaultPixmap = QPixmap() ); 00078 00080 ~Requester (); 00081 00089 void setDefaultPath (const QUrl& path); 00090 00098 void setDefaultPixmap (const QPixmap& pixmap); 00099 00104 const QUrl defaultPath () const; 00105 00110 const QPixmap defaultPixmap () const; 00111 public: 00121 void cancel (bool sendRemainingSignals = false); 00122 00145 bool request ( QList<Info>& list, 00146 bool sendPixmap = false ); 00147 Q_SIGNALS: 00154 void started (); 00155 00161 void finished (); 00162 00172 void mediaArt (const MediaArt::Info& mai, const QUrl& path, const QPixmap& pixmap); 00173 00189 void defaultMediaArt (const MediaArt::Info& mai, const QUrl& path, const QPixmap& pixmap); 00190 00199 void error (const QString& message, const MediaArt::Info& mai); 00200 00208 void unqueued (const MediaArt::Info& mai); 00209 private: 00210 friend class MediaArtRequesterPrivate; 00211 MediaArtRequesterPrivate* priv; 00212 };} 00213 00214 00215 #endif // MEDIAARTSREQUESTER_H