.TH "KIO::PreviewJob" kde3 "11 Jun 2005" "Version Version 3.4.1" "kio Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
KIO::PreviewJob \- \fBKIO\fP \fBJob\fP to get a thumbnail picture.  

.PP
.SH SYNOPSIS
.br
.PP
\fC#include <previewjob.h>\fP
.PP
Inherits \fBKIO::Job\fP.
.PP
.SS "Signals"

.in +1c
.ti -1c
.RI "void \fBgotPreview\fP (const \fBKFileItem\fP *item, const \fBQPixmap\fP &preview)"
.br
.ti -1c
.RI "void \fBfailed\fP (const \fBKFileItem\fP *item)"
.br
.in -1c
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "\fBPreviewJob\fP (const \fBKFileItemList\fP &items, int width, int height, int iconSize, int iconAlpha, bool scale, bool save, const \fBQStringList\fP *enabledPlugins, bool deleteItems=false)"
.br
.ti -1c
.RI "void \fBremoveItem\fP (const \fBKFileItem\fP *item)"
.br
.ti -1c
.RI "void \fBsetIgnoreMaximumSize\fP (bool ignoreSize=true)"
.br
.in -1c
.SS "Static Public Member Functions"

.in +1c
.ti -1c
.RI "static \fBQStringList\fP \fBavailablePlugins\fP ()"
.br
.ti -1c
.RI "static \fBQStringList\fP \fBsupportedMimeTypes\fP ()"
.br
.in -1c
.SS "Protected Slots"

.in +1c
.ti -1c
.RI "virtual void \fBslotResult\fP (\fBKIO::Job\fP *job)"
.br
.in -1c
.SS "Protected Member Functions"

.in +1c
.ti -1c
.RI "void \fBgetOrCreateThumbnail\fP ()"
.br
.ti -1c
.RI "bool \fBstatResultThumbnail\fP ()"
.br
.ti -1c
.RI "void \fBcreateThumbnail\fP (\fBQString\fP)"
.br
.ti -1c
.RI "virtual void \fBvirtual_hook\fP (int id, void *data)"
.br
.in -1c
.SH "Detailed Description"
.PP 
\fBKIO\fP \fBJob\fP to get a thumbnail picture. 

This class catches a preview (thumbnail) for files. 
.PP
Definition at line 37 of file previewjob.h.
.SH "Constructor & Destructor Documentation"
.PP 
.SS "PreviewJob::PreviewJob (const \fBKFileItemList\fP & items, int width, int height, int iconSize, int iconAlpha, bool scale, bool save, const \fBQStringList\fP * enabledPlugins, bool deleteItems = \fCfalse\fP)"
.PP
Creates a new \fBPreviewJob\fP. 
.PP
\fBParameters:\fP
.RS 4
\fIitems\fP a list of files to create previews for 
.br
\fIwidth\fP the desired width 
.br
\fIheight\fP the desired height, 0 to use the \fCwidth\fP 
.br
\fIiconSize\fP the size of the mimetype icon to overlay over the preview or zero to not overlay an icon. This has no effect if the preview plugin that will be used doesn't use icon overlays. 
.br
\fIiconAlpha\fP transparency to use for the icon overlay 
.br
\fIscale\fP if the image is to be scaled to the requested size or returned in its original size 
.br
\fIsave\fP if the image should be cached for later use 
.br
\fIenabledPlugins\fP if non-zero, this points to a list containing the names of the plugins that may be used. 
.br
\fIdeleteItems\fP true to delete the items when done
.RE
.PP

.PP
Definition at line 117 of file previewjob.cpp.
.PP
References QDir::homeDirPath(), and QTimer::singleShot().
.SH "Member Function Documentation"
.PP 
.SS "void PreviewJob::removeItem (const \fBKFileItem\fP * item)"
.PP
Removes an item from preview processing. 
.PP
Use this if you passed an item to filePreview and want to delete it now.
.PP
\fBParameters:\fP
.RS 4
\fIitem\fP the item that should be removed from the preview queue 
.RE
.PP

.PP
Definition at line 218 of file previewjob.cpp.
.PP
References QPtrList::first(), QMap::remove(), and QPtrList::removeFirst().
.SS "void PreviewJob::setIgnoreMaximumSize (bool ignoreSize = \fCtrue\fP)"
.PP
If \fCignoreSize\fP is true, then the preview is always generated regardless of the settings. 
.PP
\fBSince:\fP
.RS 4
\fBKDE\fP 3.4 
.RE
.PP

.PP
Definition at line 235 of file previewjob.cpp.
.SS "\fBQStringList\fP PreviewJob::availablePlugins ()\fC [static]\fP"
.PP
Returns a list of all available preview plugins. 
.PP
The list contains the basenames of the plugins' .desktop files (no path, no .desktop). 
.PP
\fBReturns:\fP
.RS 4
the list of plugins 
.RE
.PP

.PP
Definition at line 504 of file previewjob.cpp.
.PP
References QValueList::begin(), QValueList::end(), KTrader::query(), and KTrader::self().
.SS "\fBQStringList\fP PreviewJob::supportedMimeTypes ()\fC [static]\fP"
.PP
Returns a list of all supported MIME types. 
.PP
The list can contain entries like text/ * (without the space). 
.PP
\fBReturns:\fP
.RS 4
the list of mime types 
.RE
.PP

.PP
Definition at line 514 of file previewjob.cpp.
.PP
References QValueList::begin(), QValueList::end(), KTrader::query(), and KTrader::self().
.PP
Referenced by KFileIconView::showPreviews().
.SS "void KIO::PreviewJob::gotPreview (const \fBKFileItem\fP * item, const \fBQPixmap\fP & preview)\fC [signal]\fP"
.PP
Emitted when a thumbnail picture for \fCitem\fP has been successfully retrieved. 
.PP
\fBParameters:\fP
.RS 4
\fIitem\fP the file of the preview 
.br
\fIpreview\fP the preview image 
.RE
.PP

.SS "void KIO::PreviewJob::failed (const \fBKFileItem\fP * item)\fC [signal]\fP"
.PP
Emitted when a thumbnail for \fCitem\fP could not be created, either because a \fBThumbCreator\fP for its MIME type does not exist, or because something went wrong. 
.PP
\fBParameters:\fP
.RS 4
\fIitem\fP the file that failed 
.RE
.PP

.SS "void PreviewJob::slotResult (\fBKIO::Job\fP * job)\fC [protected, virtual, slot]\fP"
.PP
Called whenever a subjob finishes. 
.PP
Default implementation checks for errors and propagates to parent job, then calls removeSubjob. Override if you don't want subjobs errors to be propagated. 
.PP
\fBParameters:\fP
.RS 4
\fIjob\fP the subjob 
.RE
.PP
\fBSee also:\fP
.RS 4
\fBresult()\fP 
.RE
.PP

.PP
Reimplemented from \fBKIO::Job\fP.
.PP
Definition at line 270 of file previewjob.cpp.
.PP
References QValueList::begin(), QValueList::end(), QPtrList::isEmpty(), QFile::remove(), and QPtrList::remove().

.SH "Author"
.PP 
Generated automatically by Doxygen for kio Library from the source code.
