\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=84pt]{classKCombiView__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for KCombi\-View:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=267pt]{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} ()
\item 
virtual void {\bf clear\-View} ()
\item 
virtual void {\bf update\-View} (bool)
\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$)
\item 
virtual void {\bf listing\-Completed} ()
\item 
void {\bf set\-Right} ({\bf KFile\-View} $\ast$view)
\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)
\item 
virtual bool {\bf is\-Selected} (const {\bf KFile\-Item} $\ast$) const 
\item 
virtual void {\bf clear\-Selection} ()
\item 
virtual void {\bf select\-All} ()
\item 
virtual void {\bf invert\-Selection} ()
\item 
virtual void {\bf set\-Current\-Item} (const {\bf KFile\-Item} $\ast$)
\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)
\item 
virtual void {\bf clear} ()
\item 
virtual void {\bf set\-Sorting} (QDir::Sort\-Spec sort)
\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$)
\item 
virtual {\bf KAction\-Collection} $\ast$ {\bf action\-Collection} () const 
\item 
virtual void {\bf set\-Accept\-Drops} (bool b)\label{classKCombiView_a27}

\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 bool {\bf event\-Filter} ({\bf QObject} $\ast$o, {\bf QEvent} $\ast$e)\label{classKCombiView_b0}

\item 
void {\bf set\-Drop\-Options\_\-impl} (int options)\label{classKCombiView_b1}

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

\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 54 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 63 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 111 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 

\footnotesize\begin{verbatim} widget()->repaint(f)
\end{verbatim}
\normalsize
 

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

Definition at line 118 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 132 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 140 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 68 of file kcombiview.cpp.

References KFile\-View::drop\-Options(), QIcon\-View::grid\-X(), QWidget::set\-Accept\-Drops(), KFile\-View::set\-Drop\-Options(), KFile\-View::set\-Parent\-View(), QSplitter::set\-Resize\-Mode(), QSplitter::set\-Sizes(), KFile\-View::set\-View\-Name(), QIcon\-View::spacing(), KFile\-View::view\-Name(), and KFile\-View::widget().

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 192 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 176 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 155 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 162 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 169 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 199 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 206 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 87 of file kcombiview.cpp.

References KFile\-Icon\-View::insert\-Item(), KFile\-View::insert\-Item(), 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 147 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 101 of file kcombiview.cpp.

References endl(), kd\-Fatal(), 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 222 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 322 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}
