.TH "KFileIconView" 3 "28 Jan 2004" "kio Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
KFileIconView \- An icon-view capable of showing \fBKFileItem\fP's.  

.PP
.SH SYNOPSIS
.br
.PP
\fC#include <kfileiconview.h>\fP
.PP
Inherits \fBKIconView\fP, and \fBKFileView\fP.
.PP
.SS "Public Slots"

.in +1c
.ti -1c
.RI "void \fBshowPreviews\fP ()"
.br
.RI "\fIStarts loading previews for all files shown and shows them. \fP"
.ti -1c
.RI "virtual void \fBarrangeItemsInGrid\fP (bool updated=true)"
.br
.RI "\fIReimplemented for performance reasons. \fP"
.in -1c
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "\fBKFileIconView\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 \fBsetAutoUpdate\fP (bool)"
.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 \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 \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 *i) 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 "void \fBsetIconSize\fP (int size)"
.br
.RI "\fISets the size of the icons to show. \fP"
.ti -1c
.RI "void \fBsetPreviewSize\fP (int size)"
.br
.RI "\fISets the size of the previews. \fP"
.ti -1c
.RI "int \fBiconSize\fP () const "
.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 void \fBsetSorting\fP (QDir::SortSpec \fBsort\fP)"
.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 \fBmimeTypeDeterminationFinished\fP ()"
.br
.ti -1c
.RI "void \fBdetermineIcon\fP (\fBKFileIconViewItem\fP *item)"
.br
.ti -1c
.RI "\fBQScrollView\fP * \fBscrollWidget\fP () const "
.br
.in -1c
.SS "Protected Member Functions"

.in +1c
.ti -1c
.RI "virtual void \fBkeyPressEvent\fP (\fBQKeyEvent\fP *)"
.br
.RI "\fIReimplemented to not let \fBQIconView\fP eat return-key events. \fP"
.ti -1c
.RI "virtual void \fBhideEvent\fP (\fBQHideEvent\fP *)"
.br
.RI "\fIReimplemented to remove an eventual tooltip. \fP"
.ti -1c
.RI "virtual void \fBshowEvent\fP (\fBQShowEvent\fP *)"
.br
.ti -1c
.RI "virtual bool \fBeventFilter\fP (\fBQObject\fP *o, \fBQEvent\fP *e)"
.br
.ti -1c
.RI "virtual void \fBvirtual_hook\fP (int id, void *data)"
.br
.in -1c
.SH "Detailed Description"
.PP 
An icon-view capable of showing \fBKFileItem\fP's. 

Used in the filedialog for example. Most of the documentation is in \fBKFileView\fP class.
.PP
\fBSee also:\fP
.RS 4
\fBKDirOperator\fP 
.PP
\fBKCombiView\fP 
.PP
\fBKFileDetailView\fP 
.RE
.PP

.PP
Definition at line 82 of file kfileiconview.h.
.SH "Member Function Documentation"
.PP 
.SS "virtual \fBQWidget\fP* KFileIconView::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 90 of file kfileiconview.h.
.SS "void KFileIconView::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 292 of file kfileiconview.cpp.
.PP
References QIconView::clear(), QPtrList< KFileIconViewItem >::clear(), and KMimeTypeResolver< KFileIconViewItem, KFileIconView >::m_lstPendingMimeIconItems.
.PP
Referenced by KCombiView::clearView().
.SS "void KFileIconView::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 397 of file kfileiconview.cpp.
.PP
References KFileIconViewItem::fileInfo(), QIconView::firstItem(), QIconViewItem::nextItem(), and QIconViewItem::setPixmap().
.PP
Referenced by KCombiView::updateView().
.SS "void KFileIconView::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 429 of file kfileiconview.cpp.
.PP
References KMimeTypeResolver< KFileIconViewItem, KFileIconView >::m_lstPendingMimeIconItems, QPtrList< KFileIconViewItem >::remove(), and KFileView::removeItem().
.PP
Referenced by KCombiView::removeItem().
.SS "void KFileIconView::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 659 of file kfileiconview.cpp.
.PP
References arrangeItemsInGrid(), QIconView::currentItem(), QIconView::setCurrentItem(), QIconView::setSelected(), and KMimeTypeResolver< KFileIconViewItem, KFileIconView >::start().
.PP
Referenced by KCombiView::listingCompleted().
.SS "void KFileIconView::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 300 of file kfileiconview.cpp.
.PP
References QPtrList< KFileIconViewItem >::append(), KFileView::insertItem(), KFileItem::isMimeTypeKnown(), KMimeTypeResolver< KFileIconViewItem, KFileIconView >::m_lstPendingMimeIconItems, KFileItem::pixmap(), KFileItem::setExtraData(), and KFileItem::text().
.PP
Referenced by KCombiView::insertItem().
.SS "void KFileIconView::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 266 of file kfileiconview.cpp.
.PP
References QIconView::setSelected().
.PP
Referenced by KCombiView::setSelected().
.SS "bool KFileIconView::isSelected (const \fBKFileItem\fP * i) 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 391 of file kfileiconview.cpp.
.PP
References QIconViewItem::isSelected().
.PP
Referenced by KCombiView::isSelected().
.SS "void KFileIconView::clearSelection ()\fC [virtual]\fP"
.PP
Clears any selection, unhighlights everything. Must be implemented by the view. Implements \fBKFileView\fP.
.PP
Definition at line 282 of file kfileiconview.cpp.
.PP
References QIconView::clearSelection().
.PP
Referenced by KCombiView::clearSelection().
.SS "void KFileIconView::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 273 of file kfileiconview.cpp.
.PP
References QIconView::selectAll().
.PP
Referenced by KCombiView::selectAll().
.SS "void KFileIconView::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 287 of file kfileiconview.cpp.
.PP
References QIconView::invertSelection().
.PP
Referenced by KCombiView::invertSelection().
.SS "void KFileIconView::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 336 of file kfileiconview.cpp.
.PP
References QIconView::setCurrentItem().
.PP
Referenced by KCombiView::setCurrentItem().
.SS "\fBKFileItem\fP * KFileIconView::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 343 of file kfileiconview.cpp.
.PP
References QIconView::currentItem(), and KFileIconViewItem::fileInfo().
.PP
Referenced by KCombiView::currentFileItem().
.SS "void KFileIconView::setIconSize (int size)"
.PP
Sets the size of the icons to show. Defaults to \fBKIcon::SizeSmall\fP. Definition at line 441 of file kfileiconview.cpp.
.SS "void KFileIconView::setPreviewSize (int size)"
.PP
Sets the size of the previews. Defaults to \fBKIcon::SizeLarge\fP. Definition at line 447 of file kfileiconview.cpp.
.SS "int KFileIconView::iconSize () const\fC [inline]\fP"
.PP
\fBReturns:\fP
.RS 4
the current size used for icons. 
.RE
.PP
Definition at line 128 of file kfileiconview.h.
.SS "void KFileIconView::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 460 of file kfileiconview.cpp.
.PP
References QIconView::ensureItemVisible().
.PP
Referenced by KCombiView::ensureItemVisible().
.SS "void KFileIconView::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 618 of file kfileiconview.cpp.
.PP
References QPtrListIterator::current(), KFileItem::isDir(), KFileView::isReversed(), KFileView::items(), QIconViewItem::setKey(), QIconView::setSorting(), KFileView::setSorting(), KFileItem::size(), QIconView::sort(), KFileView::sortingKey(), KFileItem::text(), and KFileItem::time().
.PP
Referenced by KCombiView::setSorting().
.SS "void KFileIconView::showPreviews ()\fC [slot]\fP"
.PP
Starts loading previews for all files shown and shows them. Switches into 'large rows' mode, if that isn't the current mode yet. Definition at line 529 of file kfileiconview.cpp.
.PP
References KIO::filePreview(), KFileView::items(), and KIO::PreviewJob::supportedMimeTypes().
.SS "void KFileIconView::arrangeItemsInGrid (bool updated = true)\fC [virtual, slot]\fP"
.PP
Reimplemented for performance reasons. \fBSince:\fP
.RS 4
3.1 
.RE
.PP
Reimplemented from \fBQIconView\fP.
.PP
Definition at line 731 of file kfileiconview.cpp.
.PP
References QIconView::arrangeItemsInGrid().
.PP
Referenced by listingCompleted().
.SS "void KFileIconView::keyPressEvent (\fBQKeyEvent\fP *)\fC [protected, virtual]\fP"
.PP
Reimplemented to not let \fBQIconView\fP eat return-key events. Definition at line 256 of file kfileiconview.cpp.
.PP
References QKeyEvent::ignore(), QKeyEvent::key(), and QKeyEvent::state().
.SS "void KFileIconView::hideEvent (\fBQHideEvent\fP *)\fC [protected, virtual]\fP"
.PP
Reimplemented to remove an eventual tooltip. Definition at line 250 of file kfileiconview.cpp.

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