.TH "KFilePreview" 3 "28 Jan 2004" "kio Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
KFilePreview \- 
.SH SYNOPSIS
.br
.PP
\fC#include <kfilepreview.h>\fP
.PP
Inherits \fBQSplitter\fP, and \fBKFileView\fP.
.PP
.SS "Signals"

.in +1c
.ti -1c
.RI "void \fBshowPreview\fP (const  \fBKURL\fP &)"
.br
.ti -1c
.RI "void \fBclearPreview\fP ()"
.br
.in -1c
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "\fBKFilePreview\fP (\fBQWidget\fP *parent, const  char *name)"
.br
.ti -1c
.RI "\fBKFilePreview\fP (\fBKFileView\fP *view, \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 "void \fBsetFileView\fP (\fBKFileView\fP *view)"
.br
.RI "\fIDelets the current view and sets the view to the given \fCview\fP. \fP"
.ti -1c
.RI "\fBKFileView\fP * \fBfileView\fP () const "
.br
.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 "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 \fBinsertItem\fP (\fBKFileItem\fP *)"
.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 \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 \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 "virtual \fBKActionCollection\fP * \fBactionCollection\fP () const "
.br
.RI "\fIThis overrides \fBKFileView::actionCollection()\fP by returning the \fBactionCollection()\fP of the \fBKFileView\fP (member left) it contains. \fP"
.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 "void \fBsetPreviewWidget\fP (const  \fBQWidget\fP *w, const  \fBKURL\fP &u)"
.br
.in -1c
.SS "Protected Slots"

.in +1c
.ti -1c
.RI "virtual void \fBslotHighlighted\fP (const  \fBKFileItem\fP *)"
.br
.in -1c
.SS "Protected Member Functions"

.in +1c
.ti -1c
.RI "virtual void \fBvirtual_hook\fP (int id, void *data)"
.br
.in -1c
.SH "Detailed Description"
.PP 
This \fBKFileView\fP is an empbedded preview for some file types. Definition at line 46 of file kfilepreview.h.
.SH "Member Function Documentation"
.PP 
.SS "virtual \fBQWidget\fP* KFilePreview::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 55 of file kfilepreview.h.
.SS "void KFilePreview::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 139 of file kfilepreview.cpp.
.PP
References KFileView::clearView().
.SS "void KFilePreview::setFileView (\fBKFileView\fP * view)"
.PP
Delets the current view and sets the view to the given \fCview\fP. The view is reparented to have this as parent, if necessary. Definition at line 78 of file kfilepreview.cpp.
.PP
References QWidget::reparent(), KFileView::setParentView(), KFileView::setSorting(), KFileView::signaler(), KFileView::sorting(), and KFileView::widget().
.SS "\fBKFileView\fP* KFilePreview::fileView () const\fC [inline]\fP"
.PP
\fBReturns:\fP
.RS 4
the current fileview 
.RE
.PP
Definition at line 67 of file kfilepreview.h.
.SS "void KFilePreview::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 145 of file kfilepreview.cpp.
.PP
References QWidget::repaint(), and KFileView::updateView().
.SS "void KFilePreview::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 157 of file kfilepreview.cpp.
.PP
References KFileView::isSelected(), and KFileView::removeItem().
.SS "void KFilePreview::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 166 of file kfilepreview.cpp.
.PP
References KFileView::listingCompleted().
.SS "void KFilePreview::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 202 of file kfilepreview.cpp.
.PP
References KFileView::setSelected().
.SS "bool KFilePreview::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 193 of file kfilepreview.cpp.
.PP
References KFileView::isSelected().
.SS "void KFilePreview::clearSelection ()\fC [virtual]\fP"
.PP
Clears any selection, unhighlights everything. Must be implemented by the view. Implements \fBKFileView\fP.
.PP
Definition at line 177 of file kfilepreview.cpp.
.PP
References KFileView::clearSelection().
.SS "void KFilePreview::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 183 of file kfilepreview.cpp.
.PP
References KFileView::selectAll().
.SS "void KFilePreview::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 188 of file kfilepreview.cpp.
.PP
References KFileView::invertSelection().
.SS "void KFilePreview::insertItem (\fBKFileItem\fP *)\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 127 of file kfilepreview.cpp.
.PP
References KFileView::insertItem().
.SS "void KFilePreview::clear ()\fC [virtual]\fP"
.PP
Clears the view and all item lists. Reimplemented from \fBKFileView\fP.
.PP
Definition at line 171 of file kfilepreview.cpp.
.PP
References KFileView::clear().
.SS "void KFilePreview::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 206 of file kfilepreview.cpp.
.PP
References KFileView::setCurrentItem().
.SS "\fBKFileItem\fP * KFilePreview::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 211 of file kfilepreview.cpp.
.PP
References KFileView::currentFileItem().
.SS "void KFilePreview::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 133 of file kfilepreview.cpp.
.PP
References KFileView::setSorting(), and KFileView::sorting().
.SS "\fBKActionCollection\fP * KFilePreview::actionCollection () const\fC [virtual]\fP"
.PP
This overrides \fBKFileView::actionCollection()\fP by returning the \fBactionCollection()\fP of the \fBKFileView\fP (member left) it contains. This means that KFilePreview will never create a \fBKActionCollection\fP object of its own. Reimplemented from \fBKFileView\fP.
.PP
Definition at line 254 of file kfilepreview.cpp.
.PP
References KFileView::actionCollection().
.SS "void KFilePreview::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 234 of file kfilepreview.cpp.
.PP
References KFileView::ensureItemVisible().

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