.TH "KCombiView" kde3 "11 Jun 2005" "Version Version 3.4.1" "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
.ti -1c
.RI "virtual void \fBclearView\fP ()"
.br
.ti -1c
.RI "virtual void \fBupdateView\fP (bool)"
.br
.ti -1c
.RI "virtual void \fBupdateView\fP (const \fBKFileItem\fP *)"
.br
.ti -1c
.RI "virtual void \fBremoveItem\fP (const \fBKFileItem\fP *)"
.br
.ti -1c
.RI "virtual void \fBlistingCompleted\fP ()"
.br
.ti -1c
.RI "void \fBsetRight\fP (\fBKFileView\fP *view)"
.br
.ti -1c
.RI "virtual void \fBsetSelectionMode\fP (KFile::SelectionMode sm)"
.br
.ti -1c
.RI "virtual void \fBsetSelected\fP (const \fBKFileItem\fP *, bool)"
.br
.ti -1c
.RI "virtual bool \fBisSelected\fP (const \fBKFileItem\fP *) const "
.br
.ti -1c
.RI "virtual void \fBclearSelection\fP ()"
.br
.ti -1c
.RI "virtual void \fBselectAll\fP ()"
.br
.ti -1c
.RI "virtual void \fBinvertSelection\fP ()"
.br
.ti -1c
.RI "virtual void \fBsetCurrentItem\fP (const \fBKFileItem\fP *)"
.br
.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
.ti -1c
.RI "virtual void \fBclear\fP ()"
.br
.ti -1c
.RI "virtual void \fBsetSorting\fP (QDir::SortSpec sort)"
.br
.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
.ti -1c
.RI "virtual \fBKActionCollection\fP * \fBactionCollection\fP () const "
.br
.ti -1c
.RI "virtual void \fBsetAcceptDrops\fP (bool b)"
.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 bool \fBeventFilter\fP (\fBQObject\fP *o, \fBQEvent\fP *e)"
.br
.ti -1c
.RI "void \fBsetDropOptions_impl\fP (int options)"
.br
.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 54 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. 
.PP
This function is needed to make it possible for derived classes to derive from other widgets. 
.PP
Implements \fBKFileView\fP.
.PP
Definition at line 63 of file kcombiview.h.
.SS "void KCombiView::clearView ()\fC [virtual]\fP"
.PP
pure virtual function, that should be implemented to clear the view. 
.PP
At this moment the list is already empty 
.PP
Implements \fBKFileView\fP.
.PP
Definition at line 111 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. 
.PP
The default implementation calls 
.PP
.nf
 widget()->repaint(f)

.fi
.PP
 
.PP
Reimplemented from \fBKFileView\fP.
.PP
Definition at line 118 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. 
.PP
Call KFileView::removeItem( item ) after removing it. 
.PP
Reimplemented from \fBKFileView\fP.
.PP
Definition at line 132 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. 
.PP
there won't come any new items anymore. 
.PP
Reimplemented from \fBKFileView\fP.
.PP
Definition at line 140 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. 
.PP
You need to call this before doing anything else with this widget. 
.PP
Definition at line 68 of file kcombiview.cpp.
.PP
References KFileView::dropOptions(), QIconView::gridX(), QWidget::setAcceptDrops(), KFileView::setDropOptions(), KFileView::setParentView(), QSplitter::setResizeMode(), QSplitter::setSizes(), KFileView::setViewName(), QIconView::spacing(), KFileView::viewName(), and KFileView::widget().
.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. 
.PP
This function must be implemented by the view. 
.PP
Implements \fBKFileView\fP.
.PP
Definition at line 192 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

.PP
Implements \fBKFileView\fP.
.PP
Definition at line 176 of file kcombiview.cpp.
.PP
References KFileIconView::isSelected(), and KFileView::isSelected().
.SS "void KCombiView::clearSelection ()\fC [virtual]\fP"
.PP
Clears any selection, unhighlights everything. 
.PP
Must be implemented by the view. 
.PP
Implements \fBKFileView\fP.
.PP
Definition at line 155 of file kcombiview.cpp.
.PP
References KFileView::clearSelection(), and KFileIconView::clearSelection().
.SS "void KCombiView::selectAll ()\fC [virtual]\fP"
.PP
Selects all items. 
.PP
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. 
.PP
Reimplemented from \fBKFileView\fP.
.PP
Definition at line 162 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. 
.PP
selects all items, that were up to now not selected and deselects the other. 
.PP
Reimplemented from \fBKFileView\fP.
.PP
Definition at line 169 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. 
.PP
the item having focus. 
.PP
Implements \fBKFileView\fP.
.PP
Definition at line 199 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

.PP
Implements \fBKFileView\fP.
.PP
Definition at line 206 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. 
.PP
Make sure to call this implementation, i.e. KFileView::insertItem( i ); 
.PP
Reimplemented from \fBKFileView\fP.
.PP
Definition at line 87 of file kcombiview.cpp.
.PP
References KFileIconView::insertItem(), KFileView::insertItem(), and KFileView::updateNumbers().
.SS "void KCombiView::clear ()\fC [virtual]\fP"
.PP
Clears the view and all item lists. 
.PP
Reimplemented from \fBKFileView\fP.
.PP
Definition at line 147 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. 
.PP
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

.PP
Reimplemented from \fBKFileView\fP.
.PP
Definition at line 101 of file kcombiview.cpp.
.PP
References endl(), kdFatal(), 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. 
.PP
by scrolling the view appropriately. 
.PP
Implements \fBKFileView\fP.
.PP
Definition at line 222 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

.PP
Reimplemented from \fBKFileView\fP.
.PP
Definition at line 322 of file kcombiview.cpp.
.PP
References KFileView::actionCollection().

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