KIO
#include <kdirlister_p.h>
Public Slots | |
void | slotFileRenamed (const QString &srcUrl, const QString &dstUrl) |
void | slotFilesAdded (const QString &urlDirectory) |
void | slotFilesChanged (const QStringList &fileList) |
void | slotFilesRemoved (const QStringList &fileList) |
Public Member Functions | |
KDirListerCache () | |
~KDirListerCache () | |
void | emitItemsFromCache (KDirLister::Private::CachedItemsJob *job, KDirLister *lister, const KUrl &_url, bool _reload, bool _emitCompleted) |
KFileItem | findByName (const KDirLister *lister, const QString &_name) const |
KFileItem * | findByUrl (const KDirLister *lister, const KUrl &url) const |
void | forgetCachedItemsJob (KDirLister::Private::CachedItemsJob *job, KDirLister *lister, const KUrl &url) |
void | forgetDirs (KDirLister *lister) |
void | forgetDirs (KDirLister *lister, const KUrl &_url, bool notify) |
KFileItem | itemForUrl (const KUrl &url) const |
KFileItemList * | itemsForDir (const KUrl &dir) const |
bool | listDir (KDirLister *lister, const KUrl &_url, bool _keep, bool _reload) |
void | setAutoUpdate (KDirLister *lister, bool enable) |
void | stop (KDirLister *lister, bool silent=false) |
void | stopListingUrl (KDirLister *lister, const KUrl &_url, bool silent=false) |
void | updateDirectory (const KUrl &dir) |
Public Member Functions inherited from QObject | |
QObject (QObject *parent) | |
QObject (QObject *parent, const char *name) | |
virtual | ~QObject () |
bool | blockSignals (bool block) |
QObject * | child (const char *objName, const char *inheritsClass, bool recursiveSearch) const |
const QObjectList & | children () const |
const char * | className () const |
bool | connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const |
void | deleteLater () |
void | destroyed (QObject *obj) |
bool | disconnect (const QObject *receiver, const char *method) |
bool | disconnect (const char *signal, const QObject *receiver, const char *method) |
void | dumpObjectInfo () |
void | dumpObjectTree () |
QList< QByteArray > | dynamicPropertyNames () const |
virtual bool | event (QEvent *e) |
virtual bool | eventFilter (QObject *watched, QEvent *event) |
T | findChild (const QString &name) const |
QList< T > | findChildren (const QRegExp ®Exp) const |
QList< T > | findChildren (const QString &name) const |
bool | inherits (const char *className) const |
void | insertChild (QObject *object) |
void | installEventFilter (QObject *filterObj) |
bool | isA (const char *className) const |
bool | isWidgetType () const |
void | killTimer (int id) |
virtual const QMetaObject * | metaObject () const |
void | moveToThread (QThread *targetThread) |
const char * | name () const |
const char * | name (const char *defaultName) const |
QString | objectName () const |
QObject * | parent () const |
QVariant | property (const char *name) const |
void | removeChild (QObject *object) |
void | removeEventFilter (QObject *obj) |
void | setName (const char *name) |
void | setObjectName (const QString &name) |
void | setParent (QObject *parent) |
bool | setProperty (const char *name, const QVariant &value) |
bool | signalsBlocked () const |
int | startTimer (int interval) |
QThread * | thread () const |
Additional Inherited Members | |
Static Public Member Functions inherited from QObject | |
bool | connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type) |
bool | connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type) |
bool | disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method) |
bool | disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method) |
QString | tr (const char *sourceText, const char *disambiguation, int n) |
QString | trUtf8 (const char *sourceText, const char *disambiguation, int n) |
Protected Member Functions inherited from QObject | |
bool | checkConnectArgs (const char *signal, const QObject *object, const char *method) |
virtual void | childEvent (QChildEvent *event) |
virtual void | connectNotify (const char *signal) |
virtual void | customEvent (QEvent *event) |
virtual void | disconnectNotify (const char *signal) |
int | receivers (const char *signal) const |
QObject * | sender () const |
int | senderSignalIndex () const |
virtual void | timerEvent (QTimerEvent *event) |
Static Protected Member Functions inherited from QObject | |
QByteArray | normalizeSignalSlot (const char *signalSlot) |
Properties inherited from QObject | |
objectName | |
Detailed Description
Design of the cache: There is a single KDirListerCache for the whole process.
It holds all the items used by the dir listers (itemsInUse) as well as a cache of the recently used items (itemsCached). Those items are grouped by directory (a DirItem represents a whole directory).
KDirListerCache also runs all the jobs for listing directories, whether they are for normal listing or for updates. For faster lookups, it also stores a hash table, which gives for a directory URL:
- the dirlisters holding that URL (listersCurrentlyHolding)
- the dirlisters currently listing that URL (listersCurrentlyListing)
Definition at line 181 of file kdirlister_p.h.
Constructor & Destructor Documentation
KDirListerCache::KDirListerCache | ( | ) |
Definition at line 49 of file kdirlister.cpp.
KDirListerCache::~KDirListerCache | ( | ) |
Definition at line 75 of file kdirlister.cpp.
Member Function Documentation
void KDirListerCache::emitItemsFromCache | ( | KDirLister::Private::CachedItemsJob * | job, |
KDirLister * | lister, | ||
const KUrl & | _url, | ||
bool | _reload, | ||
bool | _emitCompleted | ||
) |
Definition at line 325 of file kdirlister.cpp.
KFileItem KDirListerCache::findByName | ( | const KDirLister * | lister, |
const QString & | _name | ||
) | const |
Definition at line 807 of file kdirlister.cpp.
KFileItem * KDirListerCache::findByUrl | ( | const KDirLister * | lister, |
const KUrl & | url | ||
) | const |
Definition at line 823 of file kdirlister.cpp.
void KDirListerCache::forgetCachedItemsJob | ( | KDirLister::Private::CachedItemsJob * | job, |
KDirLister * | lister, | ||
const KUrl & | url | ||
) |
Definition at line 367 of file kdirlister.cpp.
void KDirListerCache::forgetDirs | ( | KDirLister * | lister | ) |
Definition at line 513 of file kdirlister.cpp.
void KDirListerCache::forgetDirs | ( | KDirLister * | lister, |
const KUrl & | _url, | ||
bool | notify | ||
) |
Definition at line 549 of file kdirlister.cpp.
Definition at line 782 of file kdirlister.cpp.
KFileItemList * KDirListerCache::itemsForDir | ( | const KUrl & | dir | ) | const |
Definition at line 801 of file kdirlister.cpp.
bool KDirListerCache::listDir | ( | KDirLister * | lister, |
const KUrl & | _url, | ||
bool | _keep, | ||
bool | _reload | ||
) |
Definition at line 91 of file kdirlister.cpp.
void KDirListerCache::setAutoUpdate | ( | KDirLister * | lister, |
bool | enable | ||
) |
Definition at line 498 of file kdirlister.cpp.
Definition at line 966 of file kdirlister.cpp.
|
slot |
Notify that files have been added in directory
The receiver will list that directory again to find the new items (since it needs more than just the names anyway).
Connected to the DBus signal from the KDirNotify interface.
Definition at line 859 of file kdirlister.cpp.
|
slot |
Notify that files have been changed.
At the moment, this is only used for new icon, but it could be used for size etc. as well. Connected to the DBus signal from the KDirNotify interface.
Definition at line 932 of file kdirlister.cpp.
|
slot |
Notify that files have been deleted.
This call passes the exact urls of the deleted files so that any view showing them can simply remove them or be closed (if its current dir was deleted) Connected to the DBus signal from the KDirNotify interface.
Definition at line 872 of file kdirlister.cpp.
void KDirListerCache::stop | ( | KDirLister * | lister, |
bool | silent = false |
||
) |
Definition at line 414 of file kdirlister.cpp.
void KDirListerCache::stopListingUrl | ( | KDirLister * | lister, |
const KUrl & | _url, | ||
bool | silent = false |
||
) |
Definition at line 439 of file kdirlister.cpp.
void KDirListerCache::updateDirectory | ( | const KUrl & | dir | ) |
Definition at line 652 of file kdirlister.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:24:54 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.