KIO
previewjob.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
00022
00023
00024 #ifndef KIO_PREVIEWJOB_H
00025 #define KIO_PREVIEWJOB_H
00026
00027 #include <kfileitem.h>
00028 #include <kio/job.h>
00029
00030 class QPixmap;
00031
00032 namespace KIO {
00033 class PreviewJobPrivate;
00038 class KIO_EXPORT PreviewJob : public KIO::Job
00039 {
00040 Q_OBJECT
00041 public:
00057 PreviewJob( const KFileItemList& items, int width, int height,
00058 int iconSize, int iconAlpha, bool scale, bool save,
00059 const QStringList *enabledPlugins );
00060 virtual ~PreviewJob();
00061
00068 void removeItem( const KUrl& url );
00069
00074 void setIgnoreMaximumSize(bool ignoreSize = true);
00075
00084 void setSequenceIndex(int index);
00085
00091 int sequenceIndex() const;
00092
00099 static QStringList availablePlugins();
00100
00106 static QStringList supportedMimeTypes();
00107
00113 static KIO::filesize_t maximumFileSize();
00114
00115
00116 Q_SIGNALS:
00123 void gotPreview( const KFileItem& item, const QPixmap &preview );
00130 void failed( const KFileItem& item );
00131
00132 protected Q_SLOTS:
00133 virtual void slotResult( KJob *job );
00134
00135 private:
00136 Q_PRIVATE_SLOT(d_func(), void startPreview())
00137 Q_PRIVATE_SLOT(d_func(), void slotThumbData(KIO::Job *, const QByteArray &))
00138 Q_DECLARE_PRIVATE(PreviewJob)
00139 };
00140
00161 KIO_EXPORT PreviewJob *filePreview( const KFileItemList &items, int width, int height = 0, int iconSize = 0, int iconAlpha = 70, bool scale = true, bool save = true, const QStringList *enabledPlugins = 0 );
00162
00183 KIO_EXPORT PreviewJob *filePreview( const KUrl::List &items, int width, int height = 0, int iconSize = 0, int iconAlpha = 70, bool scale = true, bool save = true, const QStringList *enabledPlugins = 0 );
00184 }
00185
00186 #endif