24 #include "tdefileitem.h"
25 #include "kdirnotify.h"
28 #include <tqstringlist.h>
32 namespace TDEIO {
class Job;
class LocalURLJob;
class ListJob; }
57 class KDirListerPrivate;
58 friend class KDirListerPrivate;
59 friend class KDirListerCache;
62 TQ_PROPERTY(
bool autoUpdate READ autoUpdate WRITE setAutoUpdate )
63 TQ_PROPERTY(
bool showingDotFiles READ showingDotFiles WRITE setShowingDotFiles )
64 TQ_PROPERTY(
bool dirOnlyMode READ dirOnlyMode WRITE setDirOnlyMode )
65 TQ_PROPERTY(
bool autoErrorHandlingEnabled READ autoErrorHandlingEnabled )
66 TQ_PROPERTY( TQString nameFilter READ nameFilter WRITE setNameFilter )
67 TQ_PROPERTY( TQStringList mimeFilter READ mimeFilters WRITE setMimeFilter RESET clearMimeFilter )
105 virtual bool openURL(
const KURL& _url,
bool _keep =
false,
bool _reload =
false );
125 virtual void stop(
const KURL& _url );
132 bool autoUpdate()
const;
139 virtual void setAutoUpdate(
bool enable );
148 bool autoErrorHandlingEnabled()
const;
159 void setAutoErrorHandlingEnabled(
bool enable, TQWidget *parent );
168 bool showingDotFiles()
const;
178 virtual void setShowingDotFiles(
bool _showDotFiles );
186 bool dirOnlyMode()
const;
193 virtual void setDirOnlyMode(
bool dirsOnly );
203 const KURL& url()
const;
214 const KURL::List& directories()
const;
220 virtual void emitChanges();
233 virtual void updateDirectory(
const KURL& _dir );
239 bool isFinished()
const;
252 virtual KFileItem *findByURL(
const KURL& _url )
const;
253 #ifndef KDE_NO_COMPAT
254 KFileItem *find(
const KURL& _url )
const;
262 virtual KFileItem *findByName(
const TQString& name )
const;
274 virtual void setNameFilter(
const TQString &filter );
281 const TQString& nameFilter()
const;
294 virtual void setMimeFilter(
const TQStringList &mimeList );
311 void setMimeExcludeFilter(
const TQStringList &mimeList );
319 virtual void clearMimeFilter();
325 const TQStringList& mimeFilters()
const;
333 bool matchesFilter(
const TQString& name )
const;
342 bool matchesMimeFilter(
const TQString& mime )
const;
350 void setMainWindow( TQWidget *window );
357 TQWidget *mainWindow();
386 KFileItemList items( WhichItems which = FilteredItems )
const;
408 KFileItemList itemsForDir(
const KURL& dir,
409 WhichItems which = FilteredItems )
const;
539 NONE=0, NAME_FILTER=1, MIME_FILTER=2, DOT_FILES=4, DIR_ONLY_MODE=8
554 virtual bool matchesFilter(
const KFileItem * )
const;
568 virtual bool matchesMimeFilter(
const KFileItem * )
const;
577 virtual bool doNameFilter(
const TQString& name,
const TQPtrList<TQRegExp>& filters )
const;
586 virtual bool doMimeFilter(
const TQString& mime,
const TQStringList& filters )
const;
591 bool doMimeExcludeFilter(
const TQString& mimeExclude,
const TQStringList& filters )
const;
598 virtual bool validURL(
const KURL& )
const;
604 virtual void virtual_hook(
int id,
void *data );
607 void slotInfoMessage(
TDEIO::Job *,
const TQString& );
608 void slotPercent(
TDEIO::Job *,
unsigned long );
611 void slotSpeed(
TDEIO::Job *,
unsigned long );
613 void slotLocalURLKIODestroyed( );
623 void emitCompleted(
const KURL& _url );
626 virtual void addNewItem(
const KFileItem *item );
627 virtual void addNewItems(
const KFileItemList& items );
628 void aboutToRefreshItem(
const KFileItem *item );
629 virtual void addRefreshItem(
const KFileItem *item );
630 virtual void emitItems();
631 virtual void emitDeleteItem(
KFileItem *item );
633 KDirListerPrivate *d;
The dir lister deals with the tdeiojob used to list and update a directory and has signals for the us...
void newItems(const KFileItemList &items)
Signal new items.
void speed(int bytes_per_second)
Emitted to display information about the speed of the jobs.
void canceled()
Tell the view that the user canceled the listing.
void completed()
Tell the view that listing is finished.
void deleteItem(KFileItem *_fileItem)
Signal an item to remove.
void canceled(const KURL &_url)
Tell the view that the listing of the directory _url was canceled.
void processedSize(TDEIO::filesize_t size)
Regularly emitted to show the progress of this KDirLister.
void refreshItems(const KFileItemList &items)
Signal an item to refresh (its mimetype/icon/name has changed).
void clear()
Signal to clear all items.
void completed(const KURL &_url)
Tell the view that the listing of the directory _url is finished.
void started(const KURL &_url)
Tell the view that we started to list url.
void totalSize(TDEIO::filesize_t size)
Emitted when we know the size of the jobs.
void itemsFilteredByMime(const KFileItemList &items)
Send a list of items filtered-out by mime-type.
void redirection(const KURL &oldUrl, const KURL &newUrl)
Signal a redirection.
WhichItems
Used by items() and itemsForDir() to specify whether you want all items for a directory or just the f...
void percent(int percent)
Progress signal showing the overall progress of the KDirLister.
void clear(const KURL &_url)
Signal to empty the directory _url.
void infoMessage(const TQString &msg)
Emitted to display information about running jobs.
void redirection(const KURL &_url)
Signal a redirection.
A KFileItem is a generic class to handle a file, local or remote.
The base class for all jobs.
A ListJob is allows you to get the get the content of a directory.
A TDEIO job that finds a local URL.
A namespace for TDEIO globals.
TQ_ULLONG filesize_t
64-bit file size