KNewStuff
qasyncpixmap.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef KNEWSTUFF2_UI_QASYNCPIXMAP_H
00020 #define KNEWSTUFF2_UI_QASYNCPIXMAP_H
00021
00022 #include <QtGui/QPixmap>
00023 #include <QtCore/QObject>
00024 #include <QtCore/QByteArray>
00025
00026 class KJob;
00027 namespace KIO
00028 {
00029 class Job;
00030 }
00031
00044 class QAsyncPixmap : public QObject, public QPixmap
00045 {
00046 Q_OBJECT
00047 public:
00048 QAsyncPixmap(const QString& url, QObject* parent);
00049
00050 Q_SIGNALS:
00051 void signalLoaded(const QString & url, const QPixmap& pix);
00052
00053 private Q_SLOTS:
00054 void slotDownload(KJob *job);
00055 void slotData(KIO::Job* job, const QByteArray& buf);
00056
00057 private:
00058 QString m_url;
00059 QByteArray m_buffer;
00060 };
00061
00062 #endif
00063