\section{KIO::Preview\-Job Class Reference}
\label{classKIO_1_1PreviewJob}\index{KIO::PreviewJob@{KIO::PreviewJob}}
{\tt \#include $<$previewjob.h$>$}

Inheritance diagram for KIO::Preview\-Job:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=64pt]{classKIO_1_1PreviewJob__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for KIO::Preview\-Job:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=277pt]{classKIO_1_1PreviewJob__coll__graph}
\end{center}
\end{figure}
\subsection*{Signals}
\begin{CompactItemize}
\item 
void {\bf got\-Preview} (const  {\bf KFile\-Item} $\ast$item, const  {\bf QPixmap} \&preview)
\begin{CompactList}\small\item\em Emitted when a thumbnail picture for {\tt item} has been successfully retrieved. \item\end{CompactList}\item 
void {\bf failed} (const  {\bf KFile\-Item} $\ast$item)
\begin{CompactList}\small\item\em Emitted when a thumbnail for {\tt item} could not be created, either because a {\bf Thumb\-Creator}{\rm (p.\,\pageref{classThumbCreator})} for its MIME type does not exist, or because something went wrong. \item\end{CompactList}\end{CompactItemize}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf Preview\-Job} (const  {\bf KFile\-Item\-List} \&items, int width, int height, int icon\-Size, int icon\-Alpha, bool scale, bool save, const  {\bf QString\-List} $\ast$enabled\-Plugins, bool delete\-Items=false)\label{classKIO_1_1PreviewJob_a0}

\item 
void {\bf remove\-Item} (const  {\bf KFile\-Item} $\ast$item)
\begin{CompactList}\small\item\em Removes an item from preview processing. \item\end{CompactList}\end{CompactItemize}
\subsection*{Static Public Member Functions}
\begin{CompactItemize}
\item 
{\bf QString\-List} {\bf available\-Plugins} ()
\item 
{\bf QString\-List} {\bf supported\-Mime\-Types} ()
\end{CompactItemize}
\subsection*{Protected Slots}
\begin{CompactItemize}
\item 
virtual void {\bf slot\-Result} ({\bf KIO::Job} $\ast$job)
\begin{CompactList}\small\item\em Called whenever a subjob finishes. \item\end{CompactList}\end{CompactItemize}
\subsection*{Protected Member Functions}
\begin{CompactItemize}
\item 
void {\bf get\-Or\-Create\-Thumbnail} ()\label{classKIO_1_1PreviewJob_b0}

\item 
bool {\bf stat\-Result\-Thumbnail} ()\label{classKIO_1_1PreviewJob_b1}

\item 
void {\bf create\-Thumbnail} ({\bf QString})\label{classKIO_1_1PreviewJob_b2}

\item 
virtual void {\bf virtual\_\-hook} (int id, void $\ast$data)\label{classKIO_1_1PreviewJob_b3}

\end{CompactItemize}


\subsection{Detailed Description}
This class catches a preview (thumbnail) for files 



Definition at line 36 of file previewjob.h.

\subsection{Member Function Documentation}
\index{KIO::PreviewJob@{KIO::Preview\-Job}!removeItem@{removeItem}}
\index{removeItem@{removeItem}!KIO::PreviewJob@{KIO::Preview\-Job}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void Preview\-Job::remove\-Item (const {\bf KFile\-Item} $\ast$ {\em item})}\label{classKIO_1_1PreviewJob_a2}


Removes an item from preview processing. 

Use this if you passed an item to {\bf file\-Preview}{\rm (p.\,\pageref{namespaceKIO_a235})} and want to delete it now.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em item}]the item that should be removed from the preview queue \end{description}
\end{Desc}


Definition at line 209 of file previewjob.cpp.

References QPtr\-List$<$ Job $>$::first(), and QPtr\-List$<$ Job $>$::remove\-First().\index{KIO::PreviewJob@{KIO::Preview\-Job}!availablePlugins@{availablePlugins}}
\index{availablePlugins@{availablePlugins}!KIO::PreviewJob@{KIO::Preview\-Job}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString\-List} Preview\-Job::available\-Plugins ()\hspace{0.3cm}{\tt  [static]}}\label{classKIO_1_1PreviewJob_e0}


\begin{Desc}
\item[Returns:]a list of all available preview plugins. The list contains the basenames of the plugins' .desktop files (no path, no .desktop). \end{Desc}


Definition at line 475 of file previewjob.cpp.

References QValue\-List::begin(), QValue\-List::end(), KTrader::Offer\-List, KTrader::query(), KIO::Job::result(), and KTrader::self().\index{KIO::PreviewJob@{KIO::Preview\-Job}!supportedMimeTypes@{supportedMimeTypes}}
\index{supportedMimeTypes@{supportedMimeTypes}!KIO::PreviewJob@{KIO::Preview\-Job}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString\-List} Preview\-Job::supported\-Mime\-Types ()\hspace{0.3cm}{\tt  [static]}}\label{classKIO_1_1PreviewJob_e1}


\begin{Desc}
\item[Returns:]a list of all supported MIME types. The list can contain entries like text/ $\ast$ (without the space). \end{Desc}


Definition at line 485 of file previewjob.cpp.

References QValue\-List::begin(), QValue\-List::end(), KTrader::Offer\-List, KTrader::query(), KIO::Job::result(), and KTrader::self().

Referenced by KFile\-Icon\-View::show\-Previews().\index{KIO::PreviewJob@{KIO::Preview\-Job}!gotPreview@{gotPreview}}
\index{gotPreview@{gotPreview}!KIO::PreviewJob@{KIO::Preview\-Job}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KIO::Preview\-Job::got\-Preview (const {\bf KFile\-Item} $\ast$ {\em item}, const {\bf QPixmap} \& {\em preview})\hspace{0.3cm}{\tt  [signal]}}\label{classKIO_1_1PreviewJob_l0}


Emitted when a thumbnail picture for {\tt item} has been successfully retrieved. 

\index{KIO::PreviewJob@{KIO::Preview\-Job}!failed@{failed}}
\index{failed@{failed}!KIO::PreviewJob@{KIO::Preview\-Job}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KIO::Preview\-Job::failed (const {\bf KFile\-Item} $\ast$ {\em item})\hspace{0.3cm}{\tt  [signal]}}\label{classKIO_1_1PreviewJob_l1}


Emitted when a thumbnail for {\tt item} could not be created, either because a {\bf Thumb\-Creator}{\rm (p.\,\pageref{classThumbCreator})} for its MIME type does not exist, or because something went wrong. 

\index{KIO::PreviewJob@{KIO::Preview\-Job}!slotResult@{slotResult}}
\index{slotResult@{slotResult}!KIO::PreviewJob@{KIO::Preview\-Job}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void Preview\-Job::slot\-Result ({\bf KIO::Job} $\ast$ {\em job})\hspace{0.3cm}{\tt  [protected, virtual, slot]}}\label{classKIO_1_1PreviewJob_j0}


Called whenever a subjob finishes. 

Default implementation checks for errors and propagates to parent job, then calls {\bf remove\-Subjob}{\rm (p.\,\pageref{classKIO_1_1Job_b2})}. Override if you don't want subjobs errors to be propagated. 

Reimplemented from {\bf KIO::Job} {\rm (p.\,\pageref{classKIO_1_1Job_j0})}.

Definition at line 253 of file previewjob.cpp.

References QValue\-List::begin(), QValue\-List::end(), KIO::Job::error(), QPtr\-List$<$ Job $>$::is\-Empty(), QFile::remove(), QPtr\-List$<$ Job $>$::remove(), and KIO::UDSEntry.

The documentation for this class was generated from the following files:\begin{CompactItemize}
\item 
previewjob.h\item 
previewjob.cpp\end{CompactItemize}
