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
00020
00021 #ifndef KNEWSTUFF2_UI_QASYNCPIXMAP_H
00022 #define KNEWSTUFF2_UI_QASYNCPIXMAP_H
00023
00024 #include <QtGui/QPixmap>
00025 #include <QtCore/QObject>
00026 #include <QtCore/QByteArray>
00027
00028 class KJob;
00029 namespace KIO
00030 {
00031 class Job;
00032 }
00033
00046 class QAsyncPixmap : public QObject, public QPixmap
00047 {
00048 Q_OBJECT
00049 public:
00050 QAsyncPixmap(const QString& url, QObject* parent);
00051
00052 Q_SIGNALS:
00053 void signalLoaded(const QString & url, const QPixmap& pix);
00054
00055 private Q_SLOTS:
00056 void slotDownload(KJob *job);
00057 void slotData(KIO::Job* job, const QByteArray& buf);
00058
00059 private:
00060 QString m_url;
00061 QByteArray m_buffer;
00062 };
00063
00064 #endif
00065