.TH "KCombiView" 3 "28 Jan 2004" "kio Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
KCombiView \- This view is designed to combine two KFileViews into one widget, to show directories on the left side and files on the right side.  

.PP
.SH SYNOPSIS
.br
.PP
\fC#include <kcombiview.h>\fP
.PP
Inherits \fBQSplitter\fP, and \fBKFileView\fP.
.PP
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "\fBKCombiView\fP (\fBQWidget\fP *parent, const  char *name)"
.br
.ti -1c
.RI "virtual \fBQWidget\fP * \fBwidget\fP ()"
.br
.RI "\fIa pure virtual function to get a \fBQWidget\fP, that can be added to other widgets. \fP"
.ti -1c
.RI "virtual void \fBclearView\fP ()"
.br
.RI "\fIpure virtual function, that should be implemented to clear the view. \fP"
.ti -1c
.RI "virtual void \fBupdateView\fP (bool)"
.br
.RI "\fIdoes a repaint of the view. \fP"
.ti -1c
.RI "virtual void \fBupdateView\fP (const  \fBKFileItem\fP *)"
.br
.ti -1c
.RI "virtual void \fBremoveItem\fP (const  \fBKFileItem\fP *)"
.br
.RI "\fIRemoves an item from the list; has to be implemented by the view. \fP"
.ti -1c
.RI "virtual void \fBlistingCompleted\fP ()"
.br
.RI "\fIThis hook is called when all items of the currently listed directory are listed and inserted into the view, i.e. \fP"
.ti -1c
.RI "void \fBsetRight\fP (\fBKFileView\fP *view)"
.br
.RI "\fISets the view to be shown in the right. \fP"
.ti -1c
.RI "virtual void \fBsetSelectionMode\fP (KFile::SelectionMode sm)"
.br
.ti -1c
.RI "virtual void \fBsetSelected\fP (const  \fBKFileItem\fP *, bool)"
.br
.RI "\fITells the view that it should highlight the item. \fP"
.ti -1c
.RI "virtual bool \fBisSelected\fP (const  \fBKFileItem\fP *) const "
.br
.ti -1c
.RI "virtual void \fBclearSelection\fP ()"
.br
.RI "\fIClears any selection, unhighlights everything. \fP"
.ti -1c
.RI "virtual void \fBselectAll\fP ()"
.br
.RI "\fISelects all items. \fP"
.ti -1c
.RI "virtual void \fBinvertSelection\fP ()"
.br
.RI "\fIInverts the current selection, i.e. \fP"
.ti -1c
.RI "virtual void \fBsetCurrentItem\fP (const  \fBKFileItem\fP *)"
.br
.RI "\fIReimplement this to set \fCitem\fP the current item in the view, e.g. \fP"
.ti -1c
.RI "virtual \fBKFileItem\fP * \fBcurrentFileItem\fP () const "
.br
.ti -1c
.RI "virtual \fBKFileItem\fP * \fBfirstFileItem\fP () const "
.br
.ti -1c
.RI "virtual \fBKFileItem\fP * \fBnextItem\fP (const  \fBKFileItem\fP *) const "
.br
.ti -1c
.RI "virtual \fBKFileItem\fP * \fBprevItem\fP (const  \fBKFileItem\fP *) const "
.br
.ti -1c
.RI "virtual void \fBinsertItem\fP (\fBKFileItem\fP *i)"
.br
.RI "\fIThe derived view must implement this function to add the file in the widget. \fP"
.ti -1c
.RI "virtual void \fBclear\fP ()"
.br
.RI "\fIClears the view and all item lists. \fP"
.ti -1c
.RI "virtual void \fBsetSorting\fP (QDir::SortSpec sort)"
.br
.RI "\fISets the sorting order of the view. \fP"
.ti -1c
.RI "virtual void \fBreadConfig\fP (\fBKConfig\fP *, const  \fBQString\fP &group=QString::null)"
.br
.ti -1c
.RI "virtual void \fBwriteConfig\fP (\fBKConfig\fP *, const  \fBQString\fP &group=QString::null)"
.br
.ti -1c
.RI "void \fBensureItemVisible\fP (const  \fBKFileItem\fP *)"
.br
.RI "\fIpure virtual function, that should be implemented to make item i visible, i.e. \fP"
.ti -1c
.RI "virtual \fBKActionCollection\fP * \fBactionCollection\fP () const "
.br
.in -1c
.SS "Protected Slots"

.in +1c
.ti -1c
.RI "void \fBslotSortingChanged\fP (QDir::SortSpec)"
.br
.in -1c
.SS "Protected Member Functions"

.in +1c
.ti -1c
.RI "virtual void \fBvirtual_hook\fP (int id, void *data)"
.br
.in -1c
.SS "Protected Attributes"

.in +1c
.ti -1c
.RI "\fBKFileIconView\fP * \fBleft\fP"
.br
.ti -1c
.RI "\fBKFileView\fP * \fBright\fP"
.br
.in -1c
.SH "Detailed Description"
.PP 
This view is designed to combine two KFileViews into one widget, to show directories on the left side and files on the right side. 

Methods like \fBselectedItems()\fP to query status _only_ work on the right side, i.e. on the files.
.PP
After creating the KCombiView, you need to supply the view shown in the right, (see \fBsetRight\fP()). Available \fBKFileView\fP implementations are \fBKFileIconView\fP and \fBKFileDetailView\fP.
.PP
Most of the below methods are just implementations of the baseclass \fBKFileView\fP, so look there for documentation.
.PP
\fBSee also:\fP
.RS 4
\fBKFileView\fP 
.PP
\fBKFileIconView\fP 
.PP
\fBKFileDetailView\fP 
.PP
\fBKDirOperator\fP 
.RE
.PP

.PP
Definition at line 53 of file kcombiview.h.
.SH "Member Function Documentation"
.PP 
.SS "virtual \fBQWidget\fP* KCombiView::widget ()\fC [inline, virtual]\fP"
.PP
a pure virtual function to get a \fBQWidget\fP, that can be added to other widgets. This function is needed to make it possible for derived classes to derive from other widgets. Implements \fBKFileView\fP.
.PP
Definition at line 62 of file kcombiview.h.
.SS "void KCombiView::clearView ()\fC [virtual]\fP"
.PP
pure virtual function, that should be implemented to clear the view. At this moment the list is already empty Implements \fBKFileView\fP.
.PP
Definition at line 104 of file kcombiview.cpp.
.PP
References KFileView::clearView(), and KFileIconView::clearView().
.SS "void KCombiView::updateView (bool)\fC [virtual]\fP"
.PP
does a repaint of the view. The default implementation calls 
.PP
.nf
\fBwidget()\fP->repaint(f)
.PP
 Reimplemented from \fBKFileView\fP.
.PP
Definition at line 111 of file kcombiview.cpp.
.PP
References KFileView::updateView(), and KFileIconView::updateView().
.SS "void KCombiView::removeItem (const \fBKFileItem\fP *)\fC [virtual]\fP"
.PP
Removes an item from the list; has to be implemented by the view. Call KFileView::removeItem( item ) after removing it. Reimplemented from \fBKFileView\fP.
.PP
Definition at line 125 of file kcombiview.cpp.
.PP
References KFileView::removeItem(), and KFileIconView::removeItem().
.SS "void KCombiView::listingCompleted ()\fC [virtual]\fP"
.PP
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 \fBKFileView\fP.
.PP
Definition at line 133 of file kcombiview.cpp.
.PP
References KFileView::listingCompleted(), and KFileIconView::listingCompleted().
.SS "void KCombiView::setRight (\fBKFileView\fP * view)"
.PP
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.
.PP
References QIconView::gridX(), KFileView::setParentView(), QSplitter::setResizeMode(), QSplitter::setSizes(), KFileView::setViewName(), QIconView::spacing(), and KFileView::viewName().
.PP
Referenced by KDirOperator::createView().
.SS "void KCombiView::setSelected (const \fBKFileItem\fP *, bool)\fC [virtual]\fP"
.PP
Tells the view that it should highlight the item. This function must be implemented by the view. Implements \fBKFileView\fP.
.PP
Definition at line 185 of file kcombiview.cpp.
.PP
References KFileView::setSelected(), and KFileIconView::setSelected().
.SS "bool KCombiView::isSelected (const \fBKFileItem\fP *) const\fC [virtual]\fP"
.PP
\fBReturns:\fP
.RS 4
whether the given item is currently selected. Must be implemented by the view. 
.RE
.PP
Implements \fBKFileView\fP.
.PP
Definition at line 169 of file kcombiview.cpp.
.PP
References KFileIconView::isSelected(), and KFileView::isSelected().
.SS "void KCombiView::clearSelection ()\fC [virtual]\fP"
.PP
Clears any selection, unhighlights everything. Must be implemented by the view. Implements \fBKFileView\fP.
.PP
Definition at line 148 of file kcombiview.cpp.
.PP
References KFileView::clearSelection(), and KFileIconView::clearSelection().
.SS "void KCombiView::selectAll ()\fC [virtual]\fP"
.PP
Selects all items. You may want to override this, if you can implement it more efficiently than calling \fBsetSelected()\fP with every item. This works only in Multiselection mode of course. Reimplemented from \fBKFileView\fP.
.PP
Definition at line 155 of file kcombiview.cpp.
.PP
References KFileView::selectAll(), and KFileIconView::selectAll().
.SS "void KCombiView::invertSelection ()\fC [virtual]\fP"
.PP
Inverts the current selection, i.e. selects all items, that were up to now not selected and deselects the other. Reimplemented from \fBKFileView\fP.
.PP
Definition at line 162 of file kcombiview.cpp.
.PP
References KFileView::invertSelection(), and KFileIconView::invertSelection().
.SS "void KCombiView::setCurrentItem (const \fBKFileItem\fP *)\fC [virtual]\fP"
.PP
Reimplement this to set \fCitem\fP the current item in the view, e.g. the item having focus. Implements \fBKFileView\fP.
.PP
Definition at line 192 of file kcombiview.cpp.
.PP
References KFileView::setCurrentItem(), and KFileIconView::setCurrentItem().
.SS "\fBKFileItem\fP * KCombiView::currentFileItem () const\fC [virtual]\fP"
.PP
\fBReturns:\fP
.RS 4
the 'current' \fBKFileItem\fP, 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. 
.RE
.PP
Implements \fBKFileView\fP.
.PP
Definition at line 199 of file kcombiview.cpp.
.PP
References KFileView::currentFileItem(), and KFileIconView::currentFileItem().
.SS "void KCombiView::insertItem (\fBKFileItem\fP * i)\fC [virtual]\fP"
.PP
The derived view must implement this function to add the file in the widget. Make sure to call this implementation, i.e. KFileView::insertItem( i ); Reimplemented from \fBKFileView\fP.
.PP
Definition at line 80 of file kcombiview.cpp.
.PP
References KFileIconView::insertItem(), KFileView::insertItem(), KFileItem::isDir(), and KFileView::updateNumbers().
.SS "void KCombiView::clear ()\fC [virtual]\fP"
.PP
Clears the view and all item lists. Reimplemented from \fBKFileView\fP.
.PP
Definition at line 140 of file kcombiview.cpp.
.PP
References KFileView::clear().
.SS "void KCombiView::setSorting (QDir::SortSpec sort)\fC [virtual]\fP"
.PP
Sets the sorting order of the view. Default is QDir::Name | QDir::IgnoreCase | QDir::DirsFirst Override this in your subclass and sort accordingly (usually by setting the sorting-key for every item and telling \fBQIconView\fP or \fBQListView\fP to sort.
.PP
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.
.PP
\fBSee also:\fP
.RS 4
\fBsortingKey\fP 
.RE
.PP
Reimplemented from \fBKFileView\fP.
.PP
Definition at line 94 of file kcombiview.cpp.
.PP
References KFileIconView::setSorting(), KFileView::setSorting(), and KFileView::sorting().
.SS "void KCombiView::ensureItemVisible (const \fBKFileItem\fP *)\fC [virtual]\fP"
.PP
pure virtual function, that should be implemented to make item i visible, i.e. by scrolling the view appropriately. Implements \fBKFileView\fP.
.PP
Definition at line 215 of file kcombiview.cpp.
.PP
References KFileView::ensureItemVisible(), and KFileIconView::ensureItemVisible().
.SS "\fBKActionCollection\fP * KCombiView::actionCollection () const\fC [virtual]\fP"
.PP
\fBReturns:\fP
.RS 4
the view-specific action-collection. Every view should add its actions here (if it has any) to make them available to e.g. the KDirOperator's popup-menu. 
.RE
.PP
Reimplemented from \fBKFileView\fP.
.PP
Definition at line 315 of file kcombiview.cpp.
.PP
References KFileView::actionCollection().

.SH "Author"
.PP 
Generated automatically by Doxygen for kio Library from the source code.
