.TH "KDirLister" kde3 "11 Jun 2005" "Version Version 3.4.1" "kio Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
KDirLister \- The dir lister deals with the kiojob used to list and update a directory and has signals for the user of this class (e.g. Helper class for the kiojob used to list and update a directory.  

.PP
.SH SYNOPSIS
.br
.PP
\fC#include <kdirlister.h>\fP
.PP
Inherits \fBQObject\fP.
.PP
Inherited by \fBKFileTreeBranch\fP.
.PP
.SS "Public Types"

.in +1c
.ti -1c
.RI "enum \fBWhichItems\fP { \fBAllItems\fP =  0, \fBFilteredItems\fP =  1 }"
.br
.in -1c
.SS "Signals"

.in +1c
.ti -1c
.RI "void \fBstarted\fP (const \fBKURL\fP &_url)"
.br
.ti -1c
.RI "void \fBcompleted\fP ()"
.br
.ti -1c
.RI "void \fBcompleted\fP (const \fBKURL\fP &_url)"
.br
.ti -1c
.RI "void \fBcanceled\fP ()"
.br
.ti -1c
.RI "void \fBcanceled\fP (const \fBKURL\fP &_url)"
.br
.ti -1c
.RI "void \fBredirection\fP (const \fBKURL\fP &_url)"
.br
.ti -1c
.RI "void \fBredirection\fP (const \fBKURL\fP &oldUrl, const \fBKURL\fP &newUrl)"
.br
.ti -1c
.RI "void \fBclear\fP ()"
.br
.ti -1c
.RI "void \fBclear\fP (const \fBKURL\fP &_url)"
.br
.ti -1c
.RI "void \fBnewItems\fP (const \fBKFileItemList\fP &items)"
.br
.ti -1c
.RI "void \fBitemsFilteredByMime\fP (const \fBKFileItemList\fP &items)"
.br
.ti -1c
.RI "void \fBdeleteItem\fP (\fBKFileItem\fP *_fileItem)"
.br
.ti -1c
.RI "void \fBrefreshItems\fP (const \fBKFileItemList\fP &items)"
.br
.ti -1c
.RI "void \fBinfoMessage\fP (const \fBQString\fP &msg)"
.br
.ti -1c
.RI "void \fBpercent\fP (int percent)"
.br
.ti -1c
.RI "void \fBtotalSize\fP (\fBKIO::filesize_t\fP size)"
.br
.ti -1c
.RI "void \fBprocessedSize\fP (\fBKIO::filesize_t\fP size)"
.br
.ti -1c
.RI "void \fBspeed\fP (int bytes_per_second)"
.br
.in -1c
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "\fBKDirLister\fP (bool _delayedMimeTypes=false)"
.br
.ti -1c
.RI "virtual \fB~KDirLister\fP ()"
.br
.ti -1c
.RI "virtual bool \fBopenURL\fP (const \fBKURL\fP &_url, bool _keep=false, bool _reload=false)"
.br
.ti -1c
.RI "virtual void \fBstop\fP ()"
.br
.ti -1c
.RI "virtual void \fBstop\fP (const \fBKURL\fP &_url)"
.br
.ti -1c
.RI "bool \fBautoUpdate\fP () const "
.br
.ti -1c
.RI "virtual void \fBsetAutoUpdate\fP (bool enable)"
.br
.ti -1c
.RI "bool \fBautoErrorHandlingEnabled\fP () const "
.br
.ti -1c
.RI "void \fBsetAutoErrorHandlingEnabled\fP (bool enable, \fBQWidget\fP *\fBparent\fP)"
.br
.ti -1c
.RI "bool \fBshowingDotFiles\fP () const "
.br
.ti -1c
.RI "virtual void \fBsetShowingDotFiles\fP (bool _showDotFiles)"
.br
.ti -1c
.RI "bool \fBdirOnlyMode\fP () const "
.br
.ti -1c
.RI "virtual void \fBsetDirOnlyMode\fP (bool dirsOnly)"
.br
.ti -1c
.RI "const \fBKURL\fP & \fBurl\fP () const "
.br
.ti -1c
.RI "const \fBKURL::List\fP & \fBdirectories\fP () const "
.br
.ti -1c
.RI "virtual void \fBemitChanges\fP ()"
.br
.ti -1c
.RI "virtual void \fBupdateDirectory\fP (const \fBKURL\fP &_dir)"
.br
.ti -1c
.RI "bool \fBisFinished\fP () const "
.br
.ti -1c
.RI "\fBKFileItem\fP * \fBrootItem\fP () const "
.br
.ti -1c
.RI "virtual \fBKFileItem\fP * \fBfindByURL\fP (const \fBKURL\fP &_url) const "
.br
.ti -1c
.RI "\fBKFileItem\fP * \fBfind\fP (const \fBKURL\fP &_url) const "
.br
.ti -1c
.RI "virtual \fBKFileItem\fP * \fBfindByName\fP (const \fBQString\fP &\fBname\fP) const "
.br
.ti -1c
.RI "virtual void \fBsetNameFilter\fP (const \fBQString\fP &filter)"
.br
.ti -1c
.RI "const \fBQString\fP & \fBnameFilter\fP () const "
.br
.ti -1c
.RI "virtual void \fBsetMimeFilter\fP (const \fBQStringList\fP &mimeList)"
.br
.ti -1c
.RI "void \fBsetMimeExcludeFilter\fP (const \fBQStringList\fP &mimeList)"
.br
.ti -1c
.RI "virtual void \fBclearMimeFilter\fP ()"
.br
.ti -1c
.RI "const \fBQStringList\fP & \fBmimeFilters\fP () const "
.br
.ti -1c
.RI "bool \fBmatchesFilter\fP (const \fBQString\fP &\fBname\fP) const "
.br
.ti -1c
.RI "bool \fBmatchesMimeFilter\fP (const \fBQString\fP &mime) const "
.br
.ti -1c
.RI "void \fBsetMainWindow\fP (\fBQWidget\fP *window)"
.br
.ti -1c
.RI "\fBQWidget\fP * \fBmainWindow\fP ()"
.br
.ti -1c
.RI "\fBKFileItemList\fP \fBitems\fP (\fBWhichItems\fP which=FilteredItems) const "
.br
.ti -1c
.RI "\fBKFileItemList\fP \fBitemsForDir\fP (const \fBKURL\fP &dir, \fBWhichItems\fP which=FilteredItems) const "
.br
.in -1c
.SS "Protected Types"

.in +1c
.ti -1c
.RI "enum \fBChanges\fP { \fBNONE\fP = 0, \fBNAME_FILTER\fP = 1, \fBMIME_FILTER\fP = 2, \fBDOT_FILES\fP = 4, \fBDIR_ONLY_MODE\fP = 8 }"
.br
.in -1c
.SS "Protected Member Functions"

.in +1c
.ti -1c
.RI "virtual bool \fBmatchesFilter\fP (const \fBKFileItem\fP *) const "
.br
.ti -1c
.RI "virtual bool \fBmatchesMimeFilter\fP (const \fBKFileItem\fP *) const "
.br
.ti -1c
.RI "virtual bool \fBdoNameFilter\fP (const \fBQString\fP &\fBname\fP, const \fBQPtrList\fP< \fBQRegExp\fP > &filters) const "
.br
.ti -1c
.RI "virtual bool \fBdoMimeFilter\fP (const \fBQString\fP &mime, const \fBQStringList\fP &filters) const "
.br
.ti -1c
.RI "bool \fBdoMimeExcludeFilter\fP (const \fBQString\fP &mimeExclude, const \fBQStringList\fP &filters) const "
.br
.ti -1c
.RI "virtual bool \fBvalidURL\fP (const \fBKURL\fP &) const "
.br
.ti -1c
.RI "virtual void \fBhandleError\fP (\fBKIO::Job\fP *)"
.br
.ti -1c
.RI "virtual void \fBvirtual_hook\fP (int id, void *data)"
.br
.in -1c
.SS "Properties"

.in +1c
.ti -1c
.RI "bool \fBautoUpdate\fP"
.br
.ti -1c
.RI "bool \fBshowingDotFiles\fP"
.br
.ti -1c
.RI "bool \fBdirOnlyMode\fP"
.br
.ti -1c
.RI "bool \fBautoErrorHandlingEnabled\fP"
.br
.ti -1c
.RI "\fBQString\fP \fBnameFilter\fP"
.br
.ti -1c
.RI "\fBQStringList\fP \fBmimeFilter\fP"
.br
.in -1c
.SS "Friends"

.in +1c
.ti -1c
.RI "class \fBKDirListerCache\fP"
.br
.in -1c
.SH "Detailed Description"
.PP 
The dir lister deals with the kiojob used to list and update a directory and has signals for the user of this class (e.g. Helper class for the kiojob used to list and update a directory. 

konqueror view or kdesktop) to create/destroy its items when asked.
.PP
This class is independent from the graphical representation of the dir (icon container, tree view, ...) and it stores the items (as KFileItems).
.PP
Typical usage : 
.PD 0

.IP "\(bu" 2
Create an instance. 
.IP "\(bu" 2
Connect to at least update, clear, newItem, and deleteItem. 
.IP "\(bu" 2
Call openURL - the signals will be called. 
.IP "\(bu" 2
Reuse the instance when opening a new url (openURL). 
.IP "\(bu" 2
Destroy the instance when not needed anymore (usually destructor).
.PP
Advanced usage : call openURL with _keep = true to list directories without forgetting the ones previously read (e.g. for a tree view)
.PP
\fBAuthor:\fP
.RS 4
Michael Brade <brade@kde.org> 
.RE
.PP

.PP
Definition at line 55 of file kdirlister.h.
.SH "Member Enumeration Documentation"
.PP 
.SS "enum \fBKDirLister::WhichItems\fP"
.PP
Used by \fBitems()\fP and \fBitemsForDir()\fP to specify whether you want all items for a directory or just the filtered ones. 
.PP
Definition at line 363 of file kdirlister.h.
.SH "Constructor & Destructor Documentation"
.PP 
.SS "KDirLister::KDirLister (bool _delayedMimeTypes = \fCfalse\fP)"
.PP
Create a directory lister. 
.PP
\fBParameters:\fP
.RS 4
\fI_delayedMimeTypes\fP if true, mime types will be fetched on demand. If false, they will always be fetched immediately 
.RE
.PP

.PP
Definition at line 1784 of file kdirlister.cpp.
.PP
References endl(), kdDebug(), setAutoErrorHandlingEnabled(), setAutoUpdate(), setDirOnlyMode(), and setShowingDotFiles().
.SS "KDirLister::~\fBKDirLister\fP ()\fC [virtual]\fP"
.PP
Destroy the directory lister. 
.PP
Definition at line 1800 of file kdirlister.cpp.
.PP
References endl(), kdDebug(), and stop().
.SH "Member Function Documentation"
.PP 
.SS "bool KDirLister::openURL (const \fBKURL\fP & _url, bool _keep = \fCfalse\fP, bool _reload = \fCfalse\fP)\fC [virtual]\fP"
.PP
Run the directory lister on the given url. 
.PP
This method causes KDirLister to emit _all_ the items of \fC_url\fP, in any case. Depending on \fC_keep\fP either \fBclear()\fP or \fBclear(const KURL &)\fP will be emitted first.
.PP
The \fBnewItems()\fP signal may be emitted more than once to supply you with KFileItems, up until the signal \fBcompleted()\fP is emitted (and \fBisFinished()\fP returns true).
.PP
\fBParameters:\fP
.RS 4
\fI_url\fP the directory URL. 
.br
\fI_keep\fP if true the previous directories aren't forgotten (they are still watched by kdirwatch and their items are kept for this KDirLister). This is useful for e.g. a treeview. 
.br
\fI_reload\fP indicates wether to use the cache (false) or to reread the directory from the disk. Use only when opening a dir not yet listed by this lister without using the cache. Otherwise use updateDirectory. 
.RE
.PP
\fBReturns:\fP
.RS 4
true if successful, false otherwise (e.g. invalid \fC_url\fP) 
.RE
.PP

.PP
Definition at line 1811 of file kdirlister.cpp.
.PP
References emitChanges(), endl(), k_funcinfo, kdDebug(), and validURL().
.PP
Referenced by KFileTreeBranch::populate(), KDirOperator::rereadDir(), and KDirOperator::setURL().
.SS "void KDirLister::stop ()\fC [virtual]\fP"
.PP
Stop listing all directories currently being listed. 
.PP
Emits \fBcanceled()\fP if there was at least one job running. Emits \fBcanceled( const KURL& )\fP for each stopped job if there are at least two dirctories being watched by KDirLister. 
.PP
Definition at line 1830 of file kdirlister.cpp.
.PP
References endl(), k_funcinfo, and kdDebug().
.PP
Referenced by KDirOperator::close(), and ~KDirLister().
.SS "void KDirLister::stop (const \fBKURL\fP & _url)\fC [virtual]\fP"
.PP
Stop listing the given directory. 
.PP
Emits \fBcanceled()\fP if the killed job was the last running one. Emits \fBcanceled( const KURL& )\fP for the killed job if there are at least two directories being watched by KDirLister. No signal is emitted if there was no job running for \fC_url\fP. 
.PP
\fBParameters:\fP
.RS 4
\fI_url\fP the directory URL 
.RE
.PP

.PP
Definition at line 1836 of file kdirlister.cpp.
.PP
References endl(), k_funcinfo, and kdDebug().
.SS "bool KDirLister::autoUpdate () const"
.PP
Checks whether \fBKDirWatch\fP will automatically update directories. 
.PP
This is enabled by default. 
.PP
\fBReturns:\fP
.RS 4
true if \fBKDirWatch\fP is used to automatically update directories. 
.RE
.PP

.SS "void KDirLister::setAutoUpdate (bool enable)\fC [virtual]\fP"
.PP
Enable/disable automatic directory updating, when a directory changes (using \fBKDirWatch\fP). 
.PP
\fBParameters:\fP
.RS 4
\fIenable\fP true to enable, false to disable 
.RE
.PP

.PP
Definition at line 1847 of file kdirlister.cpp.
.PP
Referenced by KDirLister(), and KDirOperator::setDirLister().
.SS "bool KDirLister::autoErrorHandlingEnabled () const"
.PP
Check whether auto error handling is enabled. 
.PP
If enabled, it will show an error dialog to the user when an error occurs. It is turned on by default. 
.PP
\fBReturns:\fP
.RS 4
true if auto error handling is enabled, false otherwise 
.RE
.PP
\fBSee also:\fP
.RS 4
\fBsetAutoErrorHandlingEnabled()\fP 
.RE
.PP

.SS "void KDirLister::setAutoErrorHandlingEnabled (bool enable, \fBQWidget\fP * parent)"
.PP
Enable or disable auto error handling is enabled. 
.PP
If enabled, it will show an error dialog to the user when an error occurs. It is turned on by default. 
.PP
\fBParameters:\fP
.RS 4
\fIenable\fP true to enable auto error handling, false to disable 
.br
\fIparent\fP the parent widget for the error dialogs, can be 0 for top-level 
.RE
.PP
\fBSee also:\fP
.RS 4
\fBautoErrorHandlingEnabled()\fP 
.RE
.PP

.PP
Definition at line 1889 of file kdirlister.cpp.
.PP
Referenced by KDirLister().
.SS "bool KDirLister::showingDotFiles () const"
.PP
Checks whether hidden files (files beginning with a dot) will be shown. 
.PP
By default this option is disabled (hidden files will be not shown). 
.PP
\fBReturns:\fP
.RS 4
true if dot files are shown, false otherwise 
.RE
.PP
\fBSee also:\fP
.RS 4
\fBsetShowingDotFiles()\fP 
.RE
.PP

.SS "void KDirLister::setShowingDotFiles (bool _showDotFiles)\fC [virtual]\fP"
.PP
Changes the 'is viewing dot files' setting. 
.PP
Calls \fBupdateDirectory()\fP if setting changed. By default this option is disabled (hidden files will not be shown). 
.PP
\fBParameters:\fP
.RS 4
\fI_showDotFiles\fP true to enable showing hidden files, false to disable 
.RE
.PP
\fBSee also:\fP
.RS 4
\fBshowingDotFiles()\fP 
.RE
.PP

.PP
Definition at line 1861 of file kdirlister.cpp.
.PP
Referenced by KDirLister(), KFileTreeBranch::KFileTreeBranch(), and KDirOperator::readConfig().
.SS "bool KDirLister::dirOnlyMode () const"
.PP
Checks whether the KDirLister only lists directories or all files. 
.PP
By default this option is disabled (all files will be shown). 
.PP
\fBReturns:\fP
.RS 4
true if setDirOnlyMode(true) was called 
.RE
.PP

.SS "void KDirLister::setDirOnlyMode (bool dirsOnly)\fC [virtual]\fP"
.PP
Call this to list only directories. 
.PP
By default this option is disabled (all files will be shown). 
.PP
\fBParameters:\fP
.RS 4
\fIdirsOnly\fP true to list only directories 
.RE
.PP

.PP
Definition at line 1875 of file kdirlister.cpp.
.PP
Referenced by KDirLister(), KFileTreeView::setDirOnlyMode(), and KDirOperator::setMode().
.SS "const \fBKURL\fP & KDirLister::url () const"
.PP
Returns the top level URL that is listed by this KDirLister. 
.PP
It might be different from the one given with \fBopenURL()\fP if there was a redirection. If you called \fBopenURL()\fP with \fC_keep\fP == true this is the first url opened (e.g. in a treeview this is the root).
.PP
\fBReturns:\fP
.RS 4
the url used by this instance to list the files. 
.RE
.PP

.PP
Definition at line 1895 of file kdirlister.cpp.
.PP
References KURL::url().
.PP
Referenced by items().
.SS "const \fBKURL::List\fP & KDirLister::directories () const"
.PP
Returns all URLs that are listed by this KDirLister. 
.PP
This is only useful if you called \fBopenURL()\fP with \fC_keep\fP == true, as it happens in a treeview, for example. (Note that the base url is included in the list as well, of course.)
.PP
\fBReturns:\fP
.RS 4
the list of all listed URLs 
.RE
.PP
\fBSince:\fP
.RS 4
3.4 
.RE
.PP

.PP
Definition at line 1900 of file kdirlister.cpp.
.SS "void KDirLister::emitChanges ()\fC [virtual]\fP"
.PP
Actually emit the changes made with setShowingDotFiles, setDirOnlyMode, setNameFilter and setMimeFilter. 
.PP
Definition at line 1905 of file kdirlister.cpp.
.PP
References QMap::begin(), deleteItem(), doMimeFilter(), doNameFilter(), QMap::end(), QString::isEmpty(), and KGlobal::staticQString().
.PP
Referenced by openURL(), and KDirOperator::updateDir().
.SS "void KDirLister::updateDirectory (const \fBKURL\fP & _dir)\fC [virtual]\fP"
.PP
Update the directory \fC_dir\fP. 
.PP
This method causes KDirLister to _only_ emit the items of \fC_dir\fP that actually changed compared to the current state in the cache and updates the cache.
.PP
The current implementation calls updateDirectory automatically for local files, using \fBKDirWatch\fP (if \fBautoUpdate()\fP is true), but it might be useful to force an update manually.
.PP
\fBParameters:\fP
.RS 4
\fI_dir\fP the directory URL 
.RE
.PP

.PP
Definition at line 1994 of file kdirlister.cpp.
.SS "bool KDirLister::isFinished () const"
.PP
Returns true if no io operation is currently in progress. 
.PP
\fBReturns:\fP
.RS 4
true if finished, false otherwise 
.RE
.PP

.PP
Definition at line 1999 of file kdirlister.cpp.
.SS "\fBKFileItem\fP * KDirLister::rootItem () const"
.PP
Returns the file item of the URL. 
.PP
\fBReturns:\fP
.RS 4
the file item for \fBurl()\fP itself ('.') 
.RE
.PP

.PP
Definition at line 2004 of file kdirlister.cpp.
.SS "\fBKFileItem\fP * KDirLister::findByURL (const \fBKURL\fP & _url) const\fC [virtual]\fP"
.PP
Find an item by its URL. 
.PP
\fBParameters:\fP
.RS 4
\fI_url\fP the item URL 
.RE
.PP
\fBReturns:\fP
.RS 4
the pointer to the \fBKFileItem\fP 
.RE
.PP

.PP
Definition at line 2009 of file kdirlister.cpp.
.PP
Referenced by KFileTreeBranch::findTVIByURL().
.SS "\fBKFileItem\fP * KDirLister::findByName (const \fBQString\fP & name) const\fC [virtual]\fP"
.PP
Find an item by its name. 
.PP
\fBParameters:\fP
.RS 4
\fIname\fP the item name 
.RE
.PP
\fBReturns:\fP
.RS 4
the pointer to the \fBKFileItem\fP 
.RE
.PP

.PP
Definition at line 2014 of file kdirlister.cpp.
.PP
Referenced by KDirOperator::setCurrentItem().
.SS "void KDirLister::setNameFilter (const \fBQString\fP & filter)\fC [virtual]\fP"
.PP
Set a name filter to only list items matching this name, e.g. 
.PP
'*.cpp'.
.PP
You can set more than one filter by separating them with whitespace, e.g '*.cpp *.h'. Note: the direcory is not automatically reloaded.
.PP
\fBParameters:\fP
.RS 4
\fIfilter\fP the new filter, QString::null to disable filtering 
.RE
.PP
\fBSee also:\fP
.RS 4
\fBmatchesFilter\fP 
.RE
.PP

.PP
Definition at line 2029 of file kdirlister.cpp.
.PP
References QString::append(), and QStringList::split().
.PP
Referenced by KDirOperator::clearFilter(), and KDirOperator::setNameFilter().
.SS "const \fBQString\fP& KDirLister::nameFilter () const"
.PP
Returns the current name filter, as set via \fBsetNameFilter()\fP. 
.PP
\fBReturns:\fP
.RS 4
the current name filter, can be QString::null if filtering is turned off 
.RE
.PP

.SS "void KDirLister::setMimeFilter (const \fBQStringList\fP & mimeList)\fC [virtual]\fP"
.PP
Set mime-based filter to only list items matching the given mimetypes. 
.PP
NOTE: setting the filter does not automatically reload direcory. Also calling this function will not affect any named filter already set.
.PP
\fBParameters:\fP
.RS 4
\fImimeList\fP a list of mime-types.
.RE
.PP
\fBSee also:\fP
.RS 4
\fBclearMimeFilter\fP 
.PP
\fBmatchesMimeFilter\fP 
.RE
.PP

.PP
Definition at line 2055 of file kdirlister.cpp.
.PP
Referenced by KDirOperator::setMimeFilter().
.SS "void KDirLister::setMimeExcludeFilter (const \fBQStringList\fP & mimeList)"
.PP
Filtering should be done with \fBKFileFilter\fP. 
.PP
This will be implemented in a later revision of KDirLister. This method may be removed then.
.PP
Set mime-based exclude filter to only list items not matching the given mimetypes
.PP
NOTE: setting the filter does not automatically reload direcory. Also calling this function will not affect any named filter already set.
.PP
\fBParameters:\fP
.RS 4
\fImimeList\fP a list of mime-types. 
.RE
.PP
\fBSee also:\fP
.RS 4
\fBclearMimeFilter\fP 
.PP
\fBmatchesMimeFilter\fP 
.RE
.PP
\fBSince:\fP
.RS 4
3.1 
.RE
.PP

.PP
Definition at line 2069 of file kdirlister.cpp.
.SS "void KDirLister::clearMimeFilter ()\fC [virtual]\fP"
.PP
Clears the mime based filter. 
.PP
\fBSee also:\fP
.RS 4
\fBsetMimeFilter\fP 
.RE
.PP

.PP
Definition at line 2079 of file kdirlister.cpp.
.PP
Referenced by KDirOperator::clearFilter().
.SS "const \fBQStringList\fP & KDirLister::mimeFilters () const"
.PP
Returns the list of mime based filters, as set via \fBsetMimeFilter()\fP. 
.PP
\fBReturns:\fP
.RS 4
the list of mime based filters. Empty, when no mime filter is set. 
.RE
.PP

.PP
Definition at line 2091 of file kdirlister.cpp.
.SS "bool KDirLister::matchesFilter (const \fBQString\fP & name) const"
.PP
Checks whether \fCname\fP matches a filter in the list of name filters. 
.PP
\fBReturns:\fP
.RS 4
true if \fCname\fP matches a filter in the list, otherwise false. 
.RE
.PP
\fBSee also:\fP
.RS 4
\fBsetNameFilter\fP 
.RE
.PP

.PP
Definition at line 2096 of file kdirlister.cpp.
.PP
References doNameFilter().
.PP
Referenced by itemsForDir(), and matchesFilter().
.SS "bool KDirLister::matchesMimeFilter (const \fBQString\fP & mime) const"
.PP
Checks whether \fCmime\fP matches a filter in the list of mime types. 
.PP
\fBParameters:\fP
.RS 4
\fImime\fP the mimetype to find in the filter list. 
.RE
.PP
\fBReturns:\fP
.RS 4
true if \fCname\fP matches a filter in the list, otherwise false. 
.RE
.PP
\fBSee also:\fP
.RS 4
\fBsetMimeFilter\fP. 
.RE
.PP

.PP
Definition at line 2101 of file kdirlister.cpp.
.PP
References doMimeFilter().
.PP
Referenced by itemsForDir(), and matchesMimeFilter().
.SS "void KDirLister::setMainWindow (\fBQWidget\fP * window)"
.PP
Pass the main window this object is associated with this is used for caching authentication data. 
.PP
\fBParameters:\fP
.RS 4
\fIwindow\fP the window to associate with, 0 to disassociate 
.RE
.PP
\fBSince:\fP
.RS 4
3.1 
.RE
.PP

.PP
Definition at line 2437 of file kdirlister.cpp.
.PP
Referenced by KDirOperator::setDirLister().
.SS "\fBQWidget\fP * KDirLister::mainWindow ()"
.PP
Returns the main window associated with this object. 
.PP
\fBReturns:\fP
.RS 4
the associated main window, or 0 if there is none 
.RE
.PP
\fBSince:\fP
.RS 4
3.1 
.RE
.PP

.PP
Definition at line 2442 of file kdirlister.cpp.
.SS "\fBKFileItemList\fP KDirLister::items (\fBWhichItems\fP which = \fCFilteredItems\fP) const"
.PP
Returns the items listed for the current \fBurl()\fP. 
.PP
This method will NOT start listing a directory, you should only call this when receiving the finished() signal.
.PP
The items in the KFileItemList are references to the items used by KDirLister, so e.g. an item gets destroyed when the \fBdeleteItem()\fP signal is emitted.
.PP
\fBParameters:\fP
.RS 4
\fIwhich\fP specifies whether the returned list will contain all entries or only the ones that passed the \fBnameFilter()\fP, mimeFilter(), etc. Note that the latter causes iteration over all the items, filtering them. If this is too slow for you, use the \fBnewItems()\fP signal, sending out filtered items in chunks. 
.RE
.PP
\fBReturns:\fP
.RS 4
the items listed for the current \fBurl()\fP. 
.RE
.PP
\fBSince:\fP
.RS 4
3.1 
.RE
.PP

.PP
Definition at line 2447 of file kdirlister.cpp.
.PP
References itemsForDir(), and url().
.SS "\fBKFileItemList\fP KDirLister::itemsForDir (const \fBKURL\fP & dir, \fBWhichItems\fP which = \fCFilteredItems\fP) const"
.PP
Returns the items listed for the given \fCdir\fP. 
.PP
This method will NOT start listing \fCdir\fP, you should only call this when receiving the finished() signal.
.PP
The items in the KFileItemList are references to the items used by KDirLister, so e.g. an item gets destroyed when the \fBdeleteItem()\fP signal is emitted.
.PP
\fBParameters:\fP
.RS 4
\fIdir\fP specifies the url for which the items should be returned. This is only useful if you use KDirLister with multiple URLs i.e. using bool keep = true in \fBopenURL()\fP. 
.br
\fIwhich\fP specifies whether the returned list will contain all entries or only the ones that passed the nameFilter, mimeFilter, etc. Note that the latter causes iteration over all the items, filtering them. If this is too slow for you, use the \fBnewItems()\fP signal, sending out filtered items in chunks. 
.RE
.PP
\fBReturns:\fP
.RS 4
the items listed for \fCdir\fP. 
.RE
.PP
\fBSince:\fP
.RS 4
3.1 
.RE
.PP

.PP
Definition at line 2452 of file kdirlister.cpp.
.PP
References QPtrList::append(), KFileItem::isDir(), matchesFilter(), and matchesMimeFilter().
.PP
Referenced by items().
.SS "void KDirLister::started (const \fBKURL\fP & _url)\fC [signal]\fP"
.PP
Tell the view that we started to list \fC_url\fP. 
.PP
NOTE: this does _not_ imply that there is really a job running! I.e. KDirLister::jobs() may return an empty list. In this case the items are taken from the cache.
.PP
The view knows that openURL should start it, so it might seem useless, but the view also needs to know when an automatic update happens. 
.PP
\fBParameters:\fP
.RS 4
\fI_url\fP the URL to list 
.RE
.PP

.PP
Referenced by KFileTreeBranch::KFileTreeBranch().
.SS "void KDirLister::completed ()\fC [signal]\fP"
.PP
Tell the view that listing is finished. 
.PP
There are no jobs running anymore. 
.PP
Referenced by KFileTreeBranch::KFileTreeBranch().
.SS "void KDirLister::completed (const \fBKURL\fP & _url)\fC [signal]\fP"
.PP
Tell the view that the listing of the directory \fC_url\fP is finished. 
.PP
There might be other running jobs left. This signal is only emitted if KDirLister is watching more than one directory. 
.PP
\fBParameters:\fP
.RS 4
\fI_url\fP the directory URL 
.RE
.PP

.SS "void KDirLister::canceled ()\fC [signal]\fP"
.PP
Tell the view that the user canceled the listing. 
.PP
No running jobs are left. 
.PP
Referenced by KFileTreeBranch::KFileTreeBranch().
.SS "void KDirLister::canceled (const \fBKURL\fP & _url)\fC [signal]\fP"
.PP
Tell the view that the listing of the directory \fC_url\fP was canceled. 
.PP
There might be other running jobs left. This signal is only emitted if KDirLister is watching more than one directory. 
.PP
\fBParameters:\fP
.RS 4
\fI_url\fP the directory URL 
.RE
.PP

.SS "void KDirLister::redirection (const \fBKURL\fP & _url)\fC [signal]\fP"
.PP
Signal a redirection. 
.PP
Only emitted if there's just one directory to list, i.e. most probably \fBopenURL()\fP has been called with \fC_keep\fP == \fCfalse\fP. 
.PP
\fBParameters:\fP
.RS 4
\fI_url\fP the new URL 
.RE
.PP

.PP
Referenced by KFileTreeBranch::KFileTreeBranch().
.SS "void KDirLister::redirection (const \fBKURL\fP & oldUrl, const \fBKURL\fP & newUrl)\fC [signal]\fP"
.PP
Signal a redirection. 
.PP
\fBParameters:\fP
.RS 4
\fIoldUrl\fP the original URL 
.br
\fInewUrl\fP the new URL 
.RE
.PP

.SS "void KDirLister::clear ()\fC [signal]\fP"
.PP
Signal to clear all items. 
.PP
It must always be connected to this signal to avoid doubled items! 
.PP
Referenced by KFileTreeBranch::KFileTreeBranch().
.SS "void KDirLister::clear (const \fBKURL\fP & _url)\fC [signal]\fP"
.PP
Signal to empty the directory \fC_url\fP. 
.PP
It is only emitted if the lister is holding more than one directory. 
.PP
\fBParameters:\fP
.RS 4
\fI_url\fP the directory that will be emptied 
.RE
.PP

.SS "void KDirLister::newItems (const \fBKFileItemList\fP & items)\fC [signal]\fP"
.PP
Signal new items. 
.PP
\fBParameters:\fP
.RS 4
\fIitems\fP a list of new items 
.RE
.PP

.PP
Referenced by KFileTreeBranch::KFileTreeBranch().
.SS "void KDirLister::itemsFilteredByMime (const \fBKFileItemList\fP & items)\fC [signal]\fP"
.PP
Send a list of items filtered-out by mime-type. 
.PP
\fBParameters:\fP
.RS 4
\fIitems\fP the list of filtered items 
.RE
.PP

.SS "void KDirLister::deleteItem (\fBKFileItem\fP * _fileItem)\fC [signal]\fP"
.PP
Signal an item to remove. 
.PP
ATTENTION: if \fC_fileItem\fP == \fBrootItem()\fP the directory this lister is holding was deleted and you HAVE to release especially the \fBrootItem()\fP of this lister, otherwise your app will CRASH!! The \fBclear()\fP signals have been emitted already. 
.PP
\fBParameters:\fP
.RS 4
\fI_fileItem\fP the fileItem to delete 
.RE
.PP

.PP
Referenced by emitChanges(), and KFileTreeBranch::KFileTreeBranch().
.SS "void KDirLister::refreshItems (const \fBKFileItemList\fP & items)\fC [signal]\fP"
.PP
Signal an item to refresh (its mimetype/icon/name has changed). 
.PP
Note: \fBKFileItem::refresh\fP has already been called on those items. 
.PP
\fBParameters:\fP
.RS 4
\fIitems\fP the items to refresh 
.RE
.PP

.PP
Referenced by KFileTreeBranch::KFileTreeBranch().
.SS "void KDirLister::infoMessage (const \fBQString\fP & msg)\fC [signal]\fP"
.PP
Emitted to display information about running jobs. 
.PP
Examples of message are 'Resolving host', 'Connecting to host...', etc. 
.PP
\fBParameters:\fP
.RS 4
\fImsg\fP the info message 
.RE
.PP

.SS "void KDirLister::percent (int percent)\fC [signal]\fP"
.PP
Progress signal showing the overall progress of the KDirLister. 
.PP
This allows using a progress bar very easily. (see \fBKProgress\fP) 
.PP
\fBParameters:\fP
.RS 4
\fIpercent\fP the progress in percent 
.RE
.PP

.SS "void KDirLister::totalSize (\fBKIO::filesize_t\fP size)\fC [signal]\fP"
.PP
Emitted when we know the size of the jobs. 
.PP
\fBParameters:\fP
.RS 4
\fIsize\fP the total size in bytes 
.RE
.PP

.SS "void KDirLister::processedSize (\fBKIO::filesize_t\fP size)\fC [signal]\fP"
.PP
Regularly emitted to show the progress of this KDirLister. 
.PP
\fBParameters:\fP
.RS 4
\fIsize\fP the processed size in bytes 
.RE
.PP

.SS "void KDirLister::speed (int bytes_per_second)\fC [signal]\fP"
.PP
Emitted to display information about the speed of the jobs. 
.PP
\fBParameters:\fP
.RS 4
\fIbytes_per_second\fP the speed in bytes/s 
.RE
.PP

.SS "bool KDirLister::matchesFilter (const \fBKFileItem\fP *) const\fC [protected, virtual]\fP"
.PP
Called for every new item before emitting \fBnewItems()\fP. 
.PP
You may reimplement this method in a subclass to implement your own filtering. The default implementation filters out '..' and everything not matching the name filter(s) 
.PP
\fBReturns:\fP
.RS 4
true if the item is 'ok'. false if the item shall not be shown in a view, e.g. files not matching a pattern *.cpp ( \fBKFileItem::isHidden()\fP) 
.RE
.PP
\fBSee also:\fP
.RS 4
\fBmatchesFilter\fP 
.PP
\fBsetNameFilter\fP 
.RE
.PP

.PP
Definition at line 2108 of file kdirlister.cpp.
.PP
References KFileItem::isDir(), matchesFilter(), KGlobal::staticQString(), and KFileItem::text().
.SS "bool KDirLister::matchesMimeFilter (const \fBKFileItem\fP *) const\fC [protected, virtual]\fP"
.PP
Called for every new item before emitting \fBnewItems()\fP. 
.PP
You may reimplement this method in a subclass to implement your own filtering. The default implementation filters out '..' and everything not matching the name filter(s) 
.PP
\fBReturns:\fP
.RS 4
true if the item is 'ok'. false if the item shall not be shown in a view, e.g. files not matching a pattern *.cpp ( \fBKFileItem::isHidden()\fP) 
.RE
.PP
\fBSee also:\fP
.RS 4
\fBmatchesMimeFilter\fP 
.PP
\fBsetMimeFilter\fP 
.RE
.PP

.PP
Definition at line 2125 of file kdirlister.cpp.
.PP
References matchesMimeFilter(), and KFileItem::mimetype().
.SS "bool KDirLister::doNameFilter (const \fBQString\fP & name, const \fBQPtrList\fP< \fBQRegExp\fP > & filters) const\fC [protected, virtual]\fP"
.PP
Called by the public \fBmatchesFilter()\fP to do the actual filtering. 
.PP
Those methods may be reimplemented to customize filtering. 
.PP
\fBParameters:\fP
.RS 4
\fIname\fP the name to filter 
.br
\fIfilters\fP a list of regular expressions for filtering 
.RE
.PP

.PP
Definition at line 2134 of file kdirlister.cpp.
.PP
Referenced by emitChanges(), and matchesFilter().
.SS "bool KDirLister::doMimeFilter (const \fBQString\fP & mime, const \fBQStringList\fP & filters) const\fC [protected, virtual]\fP"
.PP
Called by the public \fBmatchesMimeFilter()\fP to do the actual filtering. 
.PP
Those methods may be reimplemented to customize filtering. 
.PP
\fBParameters:\fP
.RS 4
\fImime\fP the mime type to filter 
.br
\fIfilters\fP the list of mime types to filter 
.RE
.PP

.PP
Definition at line 2143 of file kdirlister.cpp.
.PP
References QMap::begin(), and KMimeType::mimeType().
.PP
Referenced by emitChanges(), and matchesMimeFilter().
.SS "bool KDirLister::validURL (const \fBKURL\fP &) const\fC [protected, virtual]\fP"
.PP
Checks if an url is malformed or not and displays an error message if it is and autoErrorHandling is set to true. 
.PP
\fBReturns:\fP
.RS 4
true if url is valid, otherwise false. 
.RE
.PP

.PP
Definition at line 2174 of file kdirlister.cpp.
.PP
References KMessageBox::error().
.PP
Referenced by openURL().
.SS "void KDirLister::handleError (\fBKIO::Job\fP *)\fC [protected, virtual]\fP"
.PP
Reimplement to customize error handling. 
.PP
Definition at line 2191 of file kdirlister.cpp.
.PP
References KIO::Job::showErrorDialog().

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