\section{KCombi\-View Class Reference}
\label{classKCombiView}\index{KCombiView@{KCombiView}}
This view is designed to combine two KFile\-Views into one widget, to show directories on the left side and files on the right side.  


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

Inheritance diagram for KCombi\-View:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=85pt]{classKCombiView__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for KCombi\-View:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=300pt]{classKCombiView__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf KCombi\-View} ({\bf QWidget} $\ast$parent, const  char $\ast$name)\label{classKCombiView_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 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{classKCombiView_a5}

\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 
void {\bf set\-Right} ({\bf KFile\-View} $\ast$view)
\begin{CompactList}\small\item\em Sets the view to be shown in the right. \item\end{CompactList}\item 
virtual void {\bf set\-Selection\-Mode} (KFile::Selection\-Mode sm)\label{classKCombiView_a9}

\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$) 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{classKCombiView_a17}

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

\item 
virtual {\bf KFile\-Item} $\ast$ {\bf prev\-Item} (const  {\bf KFile\-Item} $\ast$) const \label{classKCombiView_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 clear} ()
\begin{CompactList}\small\item\em Clears the view and all item lists. \item\end{CompactList}\item 
virtual void {\bf set\-Sorting} (QDir::Sort\-Spec sort)
\begin{CompactList}\small\item\em Sets the sorting order of the view. \item\end{CompactList}\item 
virtual void {\bf read\-Config} ({\bf KConfig} $\ast$, const  {\bf QString} \&group=QString::null)\label{classKCombiView_a23}

\item 
virtual void {\bf write\-Config} ({\bf KConfig} $\ast$, const  {\bf QString} \&group=QString::null)\label{classKCombiView_a24}

\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 
virtual {\bf KAction\-Collection} $\ast$ {\bf action\-Collection} () const 
\end{CompactItemize}
\subsection*{Protected Slots}
\begin{CompactItemize}
\item 
void {\bf slot\-Sorting\-Changed} (QDir::Sort\-Spec)\label{classKCombiView_j0}

\end{CompactItemize}
\subsection*{Protected Member Functions}
\begin{CompactItemize}
\item 
virtual void {\bf virtual\_\-hook} (int id, void $\ast$data)\label{classKCombiView_b0}

\end{CompactItemize}
\subsection*{Protected Attributes}
\begin{CompactItemize}
\item 
{\bf KFile\-Icon\-View} $\ast$ {\bf left}\label{classKCombiView_p0}

\item 
{\bf KFile\-View} $\ast$ {\bf right}\label{classKCombiView_p1}

\end{CompactItemize}


\subsection{Detailed Description}
This view is designed to combine two KFile\-Views into one widget, to show directories on the left side and files on the right side. 

Methods like {\bf selected\-Items()}{\rm (p.\,\pageref{classKFileView_a35})} to query status \_\-only\_\- work on the right side, i.e. on the files.

After creating the KCombi\-View, you need to supply the view shown in the right, (see {\bf set\-Right}{\rm (p.\,\pageref{classKCombiView_a8})}()). Available {\bf KFile\-View}{\rm (p.\,\pageref{classKFileView})} implementations are {\bf KFile\-Icon\-View}{\rm (p.\,\pageref{classKFileIconView})} and {\bf KFile\-Detail\-View}{\rm (p.\,\pageref{classKFileDetailView})}.

Most of the below methods are just implementations of the baseclass {\bf KFile\-View}{\rm (p.\,\pageref{classKFileView})}, so look there for documentation.

\begin{Desc}
\item[See also:]{\bf KFile\-View}{\rm (p.\,\pageref{classKFileView})} 

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

{\bf KFile\-Detail\-View}{\rm (p.\,\pageref{classKFileDetailView})} 

{\bf KDir\-Operator}{\rm (p.\,\pageref{classKDirOperator})} \end{Desc}




Definition at line 53 of file kcombiview.h.

\subsection{Member Function Documentation}
\index{KCombiView@{KCombi\-View}!widget@{widget}}
\index{widget@{widget}!KCombiView@{KCombi\-View}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual {\bf QWidget}$\ast$ KCombi\-View::widget ()\hspace{0.3cm}{\tt  [inline, virtual]}}\label{classKCombiView_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 62 of file kcombiview.h.\index{KCombiView@{KCombi\-View}!clearView@{clearView}}
\index{clearView@{clearView}!KCombiView@{KCombi\-View}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KCombi\-View::clear\-View ()\hspace{0.3cm}{\tt  [virtual]}}\label{classKCombiView_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 104 of file kcombiview.cpp.

References KFile\-View::clear\-View(), and KFile\-Icon\-View::clear\-View().\index{KCombiView@{KCombi\-View}!updateView@{updateView}}
\index{updateView@{updateView}!KCombiView@{KCombi\-View}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KCombi\-View::update\-View (bool)\hspace{0.3cm}{\tt  [virtual]}}\label{classKCombiView_a4}


does a repaint of the view. 

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

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

Definition at line 111 of file kcombiview.cpp.

References KFile\-View::update\-View(), and KFile\-Icon\-View::update\-View().\index{KCombiView@{KCombi\-View}!removeItem@{removeItem}}
\index{removeItem@{removeItem}!KCombiView@{KCombi\-View}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KCombi\-View::remove\-Item (const {\bf KFile\-Item} $\ast$)\hspace{0.3cm}{\tt  [virtual]}}\label{classKCombiView_a6}


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 125 of file kcombiview.cpp.

References KFile\-View::remove\-Item(), and KFile\-Icon\-View::remove\-Item().\index{KCombiView@{KCombi\-View}!listingCompleted@{listingCompleted}}
\index{listingCompleted@{listingCompleted}!KCombiView@{KCombi\-View}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KCombi\-View::listing\-Completed ()\hspace{0.3cm}{\tt  [virtual]}}\label{classKCombiView_a7}


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 133 of file kcombiview.cpp.

References KFile\-View::listing\-Completed(), and KFile\-Icon\-View::listing\-Completed().\index{KCombiView@{KCombi\-View}!setRight@{setRight}}
\index{setRight@{setRight}!KCombiView@{KCombi\-View}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KCombi\-View::set\-Right ({\bf KFile\-View} $\ast$ {\em view})}\label{classKCombiView_a8}


Sets the view to be shown in the right. 

You need to call this before doing anything else with this widget. 

Definition at line 65 of file kcombiview.cpp.

References QIcon\-View::grid\-X(), KFile\-View::set\-Parent\-View(), QSplitter::set\-Resize\-Mode(), QSplitter::set\-Sizes(), KFile\-View::set\-View\-Name(), QIcon\-View::spacing(), and KFile\-View::view\-Name().

Referenced by KDir\-Operator::create\-View().\index{KCombiView@{KCombi\-View}!setSelected@{setSelected}}
\index{setSelected@{setSelected}!KCombiView@{KCombi\-View}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KCombi\-View::set\-Selected (const {\bf KFile\-Item} $\ast$, bool)\hspace{0.3cm}{\tt  [virtual]}}\label{classKCombiView_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 185 of file kcombiview.cpp.

References KFile\-View::set\-Selected(), and KFile\-Icon\-View::set\-Selected().\index{KCombiView@{KCombi\-View}!isSelected@{isSelected}}
\index{isSelected@{isSelected}!KCombiView@{KCombi\-View}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KCombi\-View::is\-Selected (const {\bf KFile\-Item} $\ast$) const\hspace{0.3cm}{\tt  [virtual]}}\label{classKCombiView_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 169 of file kcombiview.cpp.

References KFile\-Icon\-View::is\-Selected(), and KFile\-View::is\-Selected().\index{KCombiView@{KCombi\-View}!clearSelection@{clearSelection}}
\index{clearSelection@{clearSelection}!KCombiView@{KCombi\-View}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KCombi\-View::clear\-Selection ()\hspace{0.3cm}{\tt  [virtual]}}\label{classKCombiView_a12}


Clears any selection, unhighlights everything. 

Must be implemented by the view. 

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

Definition at line 148 of file kcombiview.cpp.

References KFile\-View::clear\-Selection(), and KFile\-Icon\-View::clear\-Selection().\index{KCombiView@{KCombi\-View}!selectAll@{selectAll}}
\index{selectAll@{selectAll}!KCombiView@{KCombi\-View}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KCombi\-View::select\-All ()\hspace{0.3cm}{\tt  [virtual]}}\label{classKCombiView_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{classKCombiView_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 155 of file kcombiview.cpp.

References KFile\-View::select\-All(), and KFile\-Icon\-View::select\-All().\index{KCombiView@{KCombi\-View}!invertSelection@{invertSelection}}
\index{invertSelection@{invertSelection}!KCombiView@{KCombi\-View}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KCombi\-View::invert\-Selection ()\hspace{0.3cm}{\tt  [virtual]}}\label{classKCombiView_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 162 of file kcombiview.cpp.

References KFile\-View::invert\-Selection(), and KFile\-Icon\-View::invert\-Selection().\index{KCombiView@{KCombi\-View}!setCurrentItem@{setCurrentItem}}
\index{setCurrentItem@{setCurrentItem}!KCombiView@{KCombi\-View}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KCombi\-View::set\-Current\-Item (const {\bf KFile\-Item} $\ast$)\hspace{0.3cm}{\tt  [virtual]}}\label{classKCombiView_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 192 of file kcombiview.cpp.

References KFile\-View::set\-Current\-Item(), and KFile\-Icon\-View::set\-Current\-Item().\index{KCombiView@{KCombi\-View}!currentFileItem@{currentFileItem}}
\index{currentFileItem@{currentFileItem}!KCombiView@{KCombi\-View}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KFile\-Item} $\ast$ KCombi\-View::current\-File\-Item () const\hspace{0.3cm}{\tt  [virtual]}}\label{classKCombiView_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 199 of file kcombiview.cpp.

References KFile\-View::current\-File\-Item(), and KFile\-Icon\-View::current\-File\-Item().\index{KCombiView@{KCombi\-View}!insertItem@{insertItem}}
\index{insertItem@{insertItem}!KCombiView@{KCombi\-View}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KCombi\-View::insert\-Item ({\bf KFile\-Item} $\ast$ {\em i})\hspace{0.3cm}{\tt  [virtual]}}\label{classKCombiView_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 80 of file kcombiview.cpp.

References KFile\-Icon\-View::insert\-Item(), KFile\-View::insert\-Item(), KFile\-Item::is\-Dir(), and KFile\-View::update\-Numbers().\index{KCombiView@{KCombi\-View}!clear@{clear}}
\index{clear@{clear}!KCombiView@{KCombi\-View}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KCombi\-View::clear ()\hspace{0.3cm}{\tt  [virtual]}}\label{classKCombiView_a21}


Clears the view and all item lists. 



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

Definition at line 140 of file kcombiview.cpp.

References KFile\-View::clear().\index{KCombiView@{KCombi\-View}!setSorting@{setSorting}}
\index{setSorting@{setSorting}!KCombiView@{KCombi\-View}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KCombi\-View::set\-Sorting (QDir::Sort\-Spec {\em sort})\hspace{0.3cm}{\tt  [virtual]}}\label{classKCombiView_a22}


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 94 of file kcombiview.cpp.

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


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 215 of file kcombiview.cpp.

References KFile\-View::ensure\-Item\-Visible(), and KFile\-Icon\-View::ensure\-Item\-Visible().\index{KCombiView@{KCombi\-View}!actionCollection@{actionCollection}}
\index{actionCollection@{actionCollection}!KCombiView@{KCombi\-View}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KAction\-Collection} $\ast$ KCombi\-View::action\-Collection () const\hspace{0.3cm}{\tt  [virtual]}}\label{classKCombiView_a26}


\begin{Desc}
\item[Returns:]the view-specific action-collection. Every view should add its actions here (if it has any) to make them available to e.g. the KDir\-Operator's popup-menu. \end{Desc}


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

Definition at line 315 of file kcombiview.cpp.

References KFile\-View::action\-Collection().

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