\section{KPreview\-Widget\-Base Class Reference}
\label{classKPreviewWidgetBase}\index{KPreviewWidgetBase@{KPreviewWidgetBase}}
Abstract baseclass for all preview widgets which shall be used via {\bf KFile\-Dialog::set\-Preview\-Widget(const KPreview\-Widget\-Base $\ast$)}{\rm (p.\,\pageref{classKFileDialog_a22})}. Abstract baseclass for all preview widgets.  


{\tt \#include $<$kpreviewwidgetbase.h$>$}

Inheritance diagram for KPreview\-Widget\-Base:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=74pt]{classKPreviewWidgetBase__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for KPreview\-Widget\-Base:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=176pt]{classKPreviewWidgetBase__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Slots}
\begin{CompactItemize}
\item 
virtual void {\bf show\-Preview} (const {\bf KURL} \&url)=0
\item 
virtual void {\bf clear\-Preview} ()=0
\item 
{\bf QString\-List} {\bf supported\-Mime\-Types} () const \label{classKPreviewWidgetBase_i2}

\end{CompactItemize}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf KPreview\-Widget\-Base} ({\bf QWidget} $\ast$parent, const char $\ast$name=0)
\end{CompactItemize}
\subsection*{Protected Member Functions}
\begin{CompactItemize}
\item 
void {\bf set\-Supported\-Mime\-Types} (const {\bf QString\-List} \&mime\-Types)\label{classKPreviewWidgetBase_b0}

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

\end{CompactItemize}


\subsection{Detailed Description}
Abstract baseclass for all preview widgets which shall be used via {\bf KFile\-Dialog::set\-Preview\-Widget(const KPreview\-Widget\-Base $\ast$)}{\rm (p.\,\pageref{classKFileDialog_a22})}. Abstract baseclass for all preview widgets. 

Ownership will be transferred to {\bf KFile\-Dialog}{\rm (p.\,\pageref{classKFileDialog})}, so you have to create the preview with \char`\"{}new\char`\"{} and let {\bf KFile\-Dialog}{\rm (p.\,\pageref{classKFileDialog})} delete it.

Just derive your custom preview widget from KPreview\-Widget\-Base and implement all the pure virtual methods. The slot {\bf show\-Preview(const KURL \&)}{\rm (p.\,\pageref{classKPreviewWidgetBase_i0})} is called every time the file selection changes.

\begin{Desc}
\item[Author:]Frerich Raabe $<${\tt raabe@kde.org}$>$ \end{Desc}




Definition at line 44 of file kpreviewwidgetbase.h.

\subsection{Constructor \& Destructor Documentation}
\index{KPreviewWidgetBase@{KPreview\-Widget\-Base}!KPreviewWidgetBase@{KPreviewWidgetBase}}
\index{KPreviewWidgetBase@{KPreviewWidgetBase}!KPreviewWidgetBase@{KPreview\-Widget\-Base}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KPreview\-Widget\-Base::KPreview\-Widget\-Base ({\bf QWidget} $\ast$ {\em parent}, const char $\ast$ {\em name} = {\tt 0})}\label{classKPreviewWidgetBase_a0}


Constructor. 

Construct the user interface of your preview widget here and pass the {\bf KFile\-Dialog}{\rm (p.\,\pageref{classKFileDialog})} this preview widget is going to be used in as the parent.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em parent}]The {\bf KFile\-Dialog}{\rm (p.\,\pageref{classKFileDialog})} this preview widget is going to be used in \item[{\em name}]The internal name of this object \end{description}
\end{Desc}


Definition at line 20 of file kpreviewwidgetbase.cpp.

References QPtr\-Dict::insert().

\subsection{Member Function Documentation}
\index{KPreviewWidgetBase@{KPreview\-Widget\-Base}!showPreview@{showPreview}}
\index{showPreview@{showPreview}!KPreviewWidgetBase@{KPreview\-Widget\-Base}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual void KPreview\-Widget\-Base::show\-Preview (const {\bf KURL} \& {\em url})\hspace{0.3cm}{\tt  [pure virtual, slot]}}\label{classKPreviewWidgetBase_i0}


This slot is called every time the user selects another file in the file dialog. 

Implement the stuff necessary to reflect the change here.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em url}]The URL of the currently selected file. \end{description}
\end{Desc}


Implemented in {\bf KImage\-File\-Preview} {\rm (p.\,\pageref{classKImageFilePreview_i0})}.\index{KPreviewWidgetBase@{KPreview\-Widget\-Base}!clearPreview@{clearPreview}}
\index{clearPreview@{clearPreview}!KPreviewWidgetBase@{KPreview\-Widget\-Base}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual void KPreview\-Widget\-Base::clear\-Preview ()\hspace{0.3cm}{\tt  [pure virtual, slot]}}\label{classKPreviewWidgetBase_i1}


Reimplement this to clear the preview. 

This is called when e.g. the selection is cleared or when multiple selections exist, or the directory is changed. 

Implemented in {\bf KImage\-File\-Preview} {\rm (p.\,\pageref{classKImageFilePreview_i1})}.

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