\section{KFile\-Detail\-View Class Reference}
\label{classKFileDetailView}\index{KFileDetailView@{KFileDetailView}}
A list-view capable of showing {\bf KFile\-Item}{\rm (p.\,\pageref{classKFileItem})}'.  


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

Inheritance diagram for KFile\-Detail\-View:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=91pt]{classKFileDetailView__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for KFile\-Detail\-View:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=178pt]{classKFileDetailView__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf KFile\-Detail\-View} ({\bf QWidget} $\ast$parent, const  char $\ast$name)\label{classKFileDetailView_a0}

\item 
virtual {\bf QWidget} $\ast$ {\bf widget} ()
\begin{CompactList}\small\item\em a pure virtual function to get a {\bf QWidget}, that can be added to other widgets. \item\end{CompactList}\item 
virtual void {\bf clear\-View} ()
\begin{CompactList}\small\item\em pure virtual function, that should be implemented to clear the view. \item\end{CompactList}\item 
virtual void {\bf set\-Auto\-Update} (bool)\label{classKFileDetailView_a4}

\item 
virtual void {\bf set\-Selection\-Mode} (KFile::Selection\-Mode sm)\label{classKFileDetailView_a5}

\item 
virtual void {\bf update\-View} (bool)
\begin{CompactList}\small\item\em does a repaint of the view. \item\end{CompactList}\item 
virtual void {\bf update\-View} (const  {\bf KFile\-Item} $\ast$)\label{classKFileDetailView_a7}

\item 
virtual void {\bf remove\-Item} (const  {\bf KFile\-Item} $\ast$)
\begin{CompactList}\small\item\em Removes an item from the list; has to be implemented by the view. \item\end{CompactList}\item 
virtual void {\bf listing\-Completed} ()
\begin{CompactList}\small\item\em This hook is called when all items of the currently listed directory are listed and inserted into the view, i.e. \item\end{CompactList}\item 
virtual void {\bf set\-Selected} (const  {\bf KFile\-Item} $\ast$, bool)
\begin{CompactList}\small\item\em Tells the view that it should highlight the item. \item\end{CompactList}\item 
virtual bool {\bf is\-Selected} (const  {\bf KFile\-Item} $\ast$i) const 
\item 
virtual void {\bf clear\-Selection} ()
\begin{CompactList}\small\item\em Clears any selection, unhighlights everything. \item\end{CompactList}\item 
virtual void {\bf select\-All} ()
\begin{CompactList}\small\item\em Selects all items. \item\end{CompactList}\item 
virtual void {\bf invert\-Selection} ()
\begin{CompactList}\small\item\em Inverts the current selection, i.e. \item\end{CompactList}\item 
virtual void {\bf set\-Current\-Item} (const  {\bf KFile\-Item} $\ast$)
\begin{CompactList}\small\item\em Reimplement this to set {\tt item} the current item in the view, e.g. \item\end{CompactList}\item 
virtual {\bf KFile\-Item} $\ast$ {\bf current\-File\-Item} () const 
\item 
virtual {\bf KFile\-Item} $\ast$ {\bf first\-File\-Item} () const \label{classKFileDetailView_a17}

\item 
virtual {\bf KFile\-Item} $\ast$ {\bf next\-Item} (const  {\bf KFile\-Item} $\ast$) const \label{classKFileDetailView_a18}

\item 
virtual {\bf KFile\-Item} $\ast$ {\bf prev\-Item} (const  {\bf KFile\-Item} $\ast$) const \label{classKFileDetailView_a19}

\item 
virtual void {\bf insert\-Item} ({\bf KFile\-Item} $\ast$i)
\begin{CompactList}\small\item\em The derived view must implement this function to add the file in the widget. \item\end{CompactList}\item 
virtual void {\bf set\-Sorting} (QDir::Sort\-Spec)
\begin{CompactList}\small\item\em Sets the sorting order of the view. \item\end{CompactList}\item 
void {\bf ensure\-Item\-Visible} (const  {\bf KFile\-Item} $\ast$)
\begin{CompactList}\small\item\em pure virtual function, that should be implemented to make item i visible, i.e. \item\end{CompactList}\item 
void {\bf mime\-Type\-Determination\-Finished} ()\label{classKFileDetailView_a23}

\item 
void {\bf determine\-Icon} ({\bf KFile\-List\-View\-Item} $\ast$item)\label{classKFileDetailView_a24}

\item 
{\bf QScroll\-View} $\ast$ {\bf scroll\-Widget} () const \label{classKFileDetailView_a25}

\end{CompactItemize}
\subsection*{Protected Slots}
\begin{CompactItemize}
\item 
void {\bf slot\-Selection\-Changed} ()\label{classKFileDetailView_j0}

\end{CompactItemize}
\subsection*{Protected Member Functions}
\begin{CompactItemize}
\item 
virtual void {\bf key\-Press\-Event} ({\bf QKey\-Event} $\ast$)\label{classKFileDetailView_b0}

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

\end{CompactItemize}
\subsection*{Protected Attributes}
\begin{CompactItemize}
\item 
int {\bf m\_\-sorting\-Col}\label{classKFileDetailView_p0}

\end{CompactItemize}


\subsection{Detailed Description}
A list-view capable of showing {\bf KFile\-Item}{\rm (p.\,\pageref{classKFileItem})}'. 

Used in the filedialog for example. Most of the documentation is in {\bf KFile\-View}{\rm (p.\,\pageref{classKFileView})} class.

\begin{Desc}
\item[See also:]{\bf KDir\-Operator}{\rm (p.\,\pageref{classKDirOperator})} 

{\bf KCombi\-View}{\rm (p.\,\pageref{classKCombiView})} 

{\bf KFile\-Icon\-View}{\rm (p.\,\pageref{classKFileIconView})} \end{Desc}




Definition at line 109 of file kfiledetailview.h.

\subsection{Member Function Documentation}
\index{KFileDetailView@{KFile\-Detail\-View}!widget@{widget}}
\index{widget@{widget}!KFileDetailView@{KFile\-Detail\-View}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual {\bf QWidget}$\ast$ KFile\-Detail\-View::widget ()\hspace{0.3cm}{\tt  [inline, virtual]}}\label{classKFileDetailView_a2}


a pure virtual function to get a {\bf QWidget}, that can be added to other widgets. 

This function is needed to make it possible for derived classes to derive from other widgets. 

Implements {\bf KFile\-View} {\rm (p.\,\pageref{classKFileView_a3})}.

Definition at line 117 of file kfiledetailview.h.\index{KFileDetailView@{KFile\-Detail\-View}!clearView@{clearView}}
\index{clearView@{clearView}!KFileDetailView@{KFile\-Detail\-View}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KFile\-Detail\-View::clear\-View ()\hspace{0.3cm}{\tt  [virtual]}}\label{classKFileDetailView_a3}


pure virtual function, that should be implemented to clear the view. 

At this moment the list is already empty 

Implements {\bf KFile\-View} {\rm (p.\,\pageref{classKFileView_a28})}.

Definition at line 174 of file kfiledetailview.cpp.

References QList\-View::clear(), QPtr\-List$<$ KFile\-List\-View\-Item $>$::clear(), and KMime\-Type\-Resolver$<$ KFile\-List\-View\-Item, KFile\-Detail\-View $>$::m\_\-lst\-Pending\-Mime\-Icon\-Items.\index{KFileDetailView@{KFile\-Detail\-View}!updateView@{updateView}}
\index{updateView@{updateView}!KFileDetailView@{KFile\-Detail\-View}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KFile\-Detail\-View::update\-View (bool)\hspace{0.3cm}{\tt  [virtual]}}\label{classKFileDetailView_a6}


does a repaint of the view. 

The default implementation calls \small\begin{alltt}{\bf widget()}{\rm (p.\,\pageref{classKFileDetailView_a2})}-$>$repaint(f)\end{alltt}\normalsize 
 

Reimplemented from {\bf KFile\-View} {\rm (p.\,\pageref{classKFileView_a9})}.

Definition at line 268 of file kfiledetailview.cpp.

References QList\-View\-Item\-Iterator::current(), KFile\-List\-View\-Item::file\-Info(), KFile\-Item::pixmap(), QList\-View\-Item::set\-Pixmap(), and KIcon::Size\-Small.\index{KFileDetailView@{KFile\-Detail\-View}!removeItem@{removeItem}}
\index{removeItem@{removeItem}!KFileDetailView@{KFile\-Detail\-View}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KFile\-Detail\-View::remove\-Item (const {\bf KFile\-Item} $\ast$)\hspace{0.3cm}{\tt  [virtual]}}\label{classKFileDetailView_a8}


Removes an item from the list; has to be implemented by the view. 

Call KFile\-View::remove\-Item( item ) after removing it. 

Reimplemented from {\bf KFile\-View} {\rm (p.\,\pageref{classKFileView_a11})}.

Definition at line 312 of file kfiledetailview.cpp.

References KFile\-Item::extra\-Data(), KMime\-Type\-Resolver$<$ KFile\-List\-View\-Item, KFile\-Detail\-View $>$::m\_\-lst\-Pending\-Mime\-Icon\-Items, QPtr\-List$<$ KFile\-List\-View\-Item $>$::remove(), and KFile\-View::remove\-Item().\index{KFileDetailView@{KFile\-Detail\-View}!listingCompleted@{listingCompleted}}
\index{listingCompleted@{listingCompleted}!KFileDetailView@{KFile\-Detail\-View}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KFile\-Detail\-View::listing\-Completed ()\hspace{0.3cm}{\tt  [virtual]}}\label{classKFileDetailView_a9}


This hook is called when all items of the currently listed directory are listed and inserted into the view, i.e. 

there won't come any new items anymore. 

Reimplemented from {\bf KFile\-View} {\rm (p.\,\pageref{classKFileView_a12})}.

Definition at line 501 of file kfiledetailview.cpp.

References KMime\-Type\-Resolver$<$ KFile\-List\-View\-Item, KFile\-Detail\-View $>$::start().\index{KFileDetailView@{KFile\-Detail\-View}!setSelected@{setSelected}}
\index{setSelected@{setSelected}!KFileDetailView@{KFile\-Detail\-View}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KFile\-Detail\-View::set\-Selected (const {\bf KFile\-Item} $\ast$, bool)\hspace{0.3cm}{\tt  [virtual]}}\label{classKFileDetailView_a10}


Tells the view that it should highlight the item. 

This function must be implemented by the view. 

Implements {\bf KFile\-View} {\rm (p.\,\pageref{classKFileView_a33})}.

Definition at line 115 of file kfiledetailview.cpp.

References KFile\-Item::extra\-Data(), and QList\-View::set\-Selected().\index{KFileDetailView@{KFile\-Detail\-View}!isSelected@{isSelected}}
\index{isSelected@{isSelected}!KFileDetailView@{KFile\-Detail\-View}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KFile\-Detail\-View::is\-Selected (const {\bf KFile\-Item} $\ast$ {\em i}) const\hspace{0.3cm}{\tt  [virtual]}}\label{classKFileDetailView_a11}


\begin{Desc}
\item[Returns:]whether the given item is currently selected. Must be implemented by the view. \end{Desc}


Implements {\bf KFile\-View} {\rm (p.\,\pageref{classKFileView_a34})}.

Definition at line 258 of file kfiledetailview.cpp.

References KFile\-Item::extra\-Data(), and QList\-View\-Item::is\-Selected().\index{KFileDetailView@{KFile\-Detail\-View}!clearSelection@{clearSelection}}
\index{clearSelection@{clearSelection}!KFileDetailView@{KFile\-Detail\-View}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KFile\-Detail\-View::clear\-Selection ()\hspace{0.3cm}{\tt  [virtual]}}\label{classKFileDetailView_a12}


Clears any selection, unhighlights everything. 

Must be implemented by the view. 

Implements {\bf KFile\-View} {\rm (p.\,\pageref{classKFileView_a30})}.

Definition at line 145 of file kfiledetailview.cpp.

References QList\-View::clear\-Selection().\index{KFileDetailView@{KFile\-Detail\-View}!selectAll@{selectAll}}
\index{selectAll@{selectAll}!KFileDetailView@{KFile\-Detail\-View}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KFile\-Detail\-View::select\-All ()\hspace{0.3cm}{\tt  [virtual]}}\label{classKFileDetailView_a13}


Selects all items. 

You may want to override this, if you can implement it more efficiently than calling {\bf set\-Selected()}{\rm (p.\,\pageref{classKFileDetailView_a10})} with every item. This works only in Multiselection mode of course. 

Reimplemented from {\bf KFile\-View} {\rm (p.\,\pageref{classKFileView_a31})}.

Definition at line 150 of file kfiledetailview.cpp.

References QList\-View::select\-All().\index{KFileDetailView@{KFile\-Detail\-View}!invertSelection@{invertSelection}}
\index{invertSelection@{invertSelection}!KFileDetailView@{KFile\-Detail\-View}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KFile\-Detail\-View::invert\-Selection ()\hspace{0.3cm}{\tt  [virtual]}}\label{classKFileDetailView_a14}


Inverts the current selection, i.e. 

selects all items, that were up to now not selected and deselects the other. 

Reimplemented from {\bf KFile\-View} {\rm (p.\,\pageref{classKFileView_a32})}.

Definition at line 159 of file kfiledetailview.cpp.

References QList\-View::invert\-Selection().\index{KFileDetailView@{KFile\-Detail\-View}!setCurrentItem@{setCurrentItem}}
\index{setCurrentItem@{setCurrentItem}!KFileDetailView@{KFile\-Detail\-View}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KFile\-Detail\-View::set\-Current\-Item (const {\bf KFile\-Item} $\ast$)\hspace{0.3cm}{\tt  [virtual]}}\label{classKFileDetailView_a15}


Reimplement this to set {\tt item} the current item in the view, e.g. 

the item having focus. 

Implements {\bf KFile\-View} {\rm (p.\,\pageref{classKFileView_a6})}.

Definition at line 127 of file kfiledetailview.cpp.

References KFile\-Item::extra\-Data(), and QList\-View::set\-Current\-Item().\index{KFileDetailView@{KFile\-Detail\-View}!currentFileItem@{currentFileItem}}
\index{currentFileItem@{currentFileItem}!KFileDetailView@{KFile\-Detail\-View}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KFile\-Item} $\ast$ KFile\-Detail\-View::current\-File\-Item () const\hspace{0.3cm}{\tt  [virtual]}}\label{classKFileDetailView_a16}


\begin{Desc}
\item[Returns:]the \char`\"{}current\char`\"{} {\bf KFile\-Item}{\rm (p.\,\pageref{classKFileItem})}, e.g. where the cursor is. Returns 0L when there is no current item (e.g. in an empty view). Subclasses have to implement this. \end{Desc}


Implements {\bf KFile\-View} {\rm (p.\,\pageref{classKFileView_a7})}.

Definition at line 136 of file kfiledetailview.cpp.

References QList\-View::current\-Item(), and KFile\-List\-View\-Item::file\-Info().\index{KFileDetailView@{KFile\-Detail\-View}!insertItem@{insertItem}}
\index{insertItem@{insertItem}!KFileDetailView@{KFile\-Detail\-View}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KFile\-Detail\-View::insert\-Item ({\bf KFile\-Item} $\ast$ {\em i})\hspace{0.3cm}{\tt  [virtual]}}\label{classKFileDetailView_a20}


The derived view must implement this function to add the file in the widget. 

Make sure to call this implementation, i.e. KFile\-View::insert\-Item( i ); 

Reimplemented from {\bf KFile\-View} {\rm (p.\,\pageref{classKFileView_a27})}.

Definition at line 180 of file kfiledetailview.cpp.

References QPtr\-List$<$ KFile\-List\-View\-Item $>$::append(), KFile\-View::insert\-Item(), KFile\-Item::is\-Mime\-Type\-Known(), KMime\-Type\-Resolver$<$ KFile\-List\-View\-Item, KFile\-Detail\-View $>$::m\_\-lst\-Pending\-Mime\-Icon\-Items, and KFile\-Item::set\-Extra\-Data().\index{KFileDetailView@{KFile\-Detail\-View}!setSorting@{setSorting}}
\index{setSorting@{setSorting}!KFileDetailView@{KFile\-Detail\-View}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KFile\-Detail\-View::set\-Sorting (QDir::Sort\-Spec)\hspace{0.3cm}{\tt  [virtual]}}\label{classKFileDetailView_a21}


Sets the sorting order of the view. 

Default is QDir::Name $|$ QDir::Ignore\-Case $|$ QDir::Dirs\-First Override this in your subclass and sort accordingly (usually by setting the sorting-key for every item and telling {\bf QIcon\-View} or {\bf QList\-View} to sort.

A view may choose to use a different sorting than QDir::Name, Time or Size. E.g. to sort by mimetype or any possible string. Set the sorting to QDir::Unsorted for that and do the rest internally.

\begin{Desc}
\item[See also:]{\bf sorting\-Key}{\rm (p.\,\pageref{classKFileView_e0})} \end{Desc}


Reimplemented from {\bf KFile\-View} {\rm (p.\,\pageref{classKFileView_a14})}.

Definition at line 396 of file kfiledetailview.cpp.

References KFile\-View::set\-Sorting().\index{KFileDetailView@{KFile\-Detail\-View}!ensureItemVisible@{ensureItemVisible}}
\index{ensureItemVisible@{ensureItemVisible}!KFileDetailView@{KFile\-Detail\-View}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KFile\-Detail\-View::ensure\-Item\-Visible (const {\bf KFile\-Item} $\ast$)\hspace{0.3cm}{\tt  [virtual]}}\label{classKFileDetailView_a22}


pure virtual function, that should be implemented to make item i visible, i.e. 

by scrolling the view appropriately. 

Implements {\bf KFile\-View} {\rm (p.\,\pageref{classKFileView_a29})}.

Definition at line 424 of file kfiledetailview.cpp.

References QList\-View::ensure\-Item\-Visible(), and KFile\-Item::extra\-Data().

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