KDirLister

Search for usage in LXR

#include <KDirLister>

Inheritance diagram for KDirLister:

Properties

bool autoErrorHandlingEnabled
 
- Properties inherited from KCoreDirLister
bool autoErrorHandlingEnabled
 
bool autoUpdate
 
bool delayedMimeTypes
 
bool dirOnlyMode
 
QStringList mimeFilter
 
QString nameFilter
 
bool requestMimeTypeWhileListing
 
bool showHiddenFiles
 
bool showingDotFiles
 
- Properties inherited from QObject
 objectName
 

Public Member Functions

 KDirLister (QObject *parent=nullptr)
 
 ~KDirLister () override
 
bool autoErrorHandlingEnabled () const
 
QWidgetmainWindow ()
 
void setAutoErrorHandlingEnabled (bool enable)
 
void setAutoErrorHandlingEnabled (bool enable, QWidget *parent)
 
void setMainWindow (QWidget *window)
 
- Public Member Functions inherited from KCoreDirLister
 KCoreDirLister (QObject *parent=nullptr)
 
 ~KCoreDirLister () override
 
bool autoErrorHandlingEnabled () const
 
bool autoUpdate () const
 
virtual void clearMimeFilter ()
 
bool delayedMimeTypes () const
 
QList< QUrldirectories () const
 
bool dirOnlyMode () const
 
virtual void emitChanges ()
 
virtual KFileItem findByName (const QString &name) const
 
virtual KFileItem findByUrl (const QUrl &url) const
 
void forgetDirs (const QUrl &dirUrl)
 
bool isFinished () const
 
KFileItemList items (WhichItems which=FilteredItems) const
 
KFileItemList itemsForDir (const QUrl &dirUrl, WhichItems which=FilteredItems) const
 
bool matchesFilter (const QString &name) const
 
bool matchesMimeFilter (const QString &mimeType) const
 
QStringList mimeFilters () const
 
QString nameFilter () const
 
virtual bool openUrl (const QUrl &dirUrl, OpenUrlFlags flags=NoFlags)
 
bool requestMimeTypeWhileListing () const
 
KFileItem rootItem () const
 
void setAutoErrorHandlingEnabled (bool enable)
 
virtual void setAutoUpdate (bool enable)
 
void setDelayedMimeTypes (bool delayedMimeTypes)
 
virtual void setDirOnlyMode (bool dirsOnly)
 
void setMimeExcludeFilter (const QStringList &mimeList)
 
virtual void setMimeFilter (const QStringList &mimeList)
 
virtual void setNameFilter (const QString &filter)
 
void setRequestMimeTypeWhileListing (bool request)
 
void setShowHiddenFiles (bool showHiddenFiles)
 
virtual void setShowingDotFiles (bool showDotFiles)
 
bool showHiddenFiles () const
 
bool showingDotFiles () const
 
virtual void stop ()
 
virtual void stop (const QUrl &dirUrl)
 
virtual void updateDirectory (const QUrl &dirUrl)
 
QUrl url () const
 
- Public Member Functions inherited from QObject
 QObject (QObject *parent)
 
bool blockSignals (bool block)
 
const QObjectListchildren () const const
 
QMetaObject::Connection connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const const
 
void deleteLater ()
 
void destroyed (QObject *obj)
 
bool disconnect (const char *signal, const QObject *receiver, const char *method) const const
 
bool disconnect (const QObject *receiver, const char *method) const const
 
void dumpObjectInfo ()
 
void dumpObjectInfo () const const
 
void dumpObjectTree ()
 
void dumpObjectTree () const const
 
QList< QByteArraydynamicPropertyNames () const const
 
virtual bool event (QEvent *e)
 
virtual bool eventFilter (QObject *watched, QEvent *event)
 
findChild (const QString &name, Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QRegExp &regExp, Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QRegularExpression &re, Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QString &name, Qt::FindChildOptions options) const const
 
bool inherits (const char *className) const const
 
void installEventFilter (QObject *filterObj)
 
bool isWidgetType () const const
 
bool isWindowType () const const
 
void killTimer (int id)
 
virtual const QMetaObjectmetaObject () const const
 
void moveToThread (QThread *targetThread)
 
QString objectName () const const
 
void objectNameChanged (const QString &objectName)
 
QObjectparent () const const
 
QVariant property (const char *name) const const
 
 Q_CLASSINFO (Name, Value)
 
 Q_DISABLE_COPY (Class)
 
 Q_DISABLE_COPY_MOVE (Class)
 
 Q_DISABLE_MOVE (Class)
 
 Q_EMIT Q_EMIT
 
 Q_ENUM (...)
 
 Q_ENUM_NS (...)
 
 Q_ENUMS (...)
 
 Q_FLAG (...)
 
 Q_FLAG_NS (...)
 
 Q_FLAGS (...)
 
 Q_GADGET Q_GADGET
 
 Q_INTERFACES (...)
 
 Q_INVOKABLE Q_INVOKABLE
 
 Q_NAMESPACE Q_NAMESPACE
 
 Q_NAMESPACE_EXPORT (EXPORT_MACRO)
 
 Q_OBJECT Q_OBJECT
 
 Q_PROPERTY (...)
 
 Q_REVISION Q_REVISION
 
 Q_SET_OBJECT_NAME (Object)
 
 Q_SIGNAL Q_SIGNAL
 
 Q_SIGNALS Q_SIGNALS
 
 Q_SLOT Q_SLOT
 
 Q_SLOTS Q_SLOTS
 
qFindChild (const QObject *obj, const QString &name)
 
QList< T > qFindChildren (const QObject *obj, const QRegExp &regExp)
 
QList< T > qFindChildren (const QObject *obj, const QString &name)
 
qobject_cast (const QObject *object)
 
qobject_cast (QObject *object)
 
 QT_NO_NARROWING_CONVERSIONS_IN_CONNECT QT_NO_NARROWING_CONVERSIONS_IN_CONNECT
 
void removeEventFilter (QObject *obj)
 
void setObjectName (const QString &name)
 
void setParent (QObject *parent)
 
bool setProperty (const char *name, const QVariant &value)
 
bool signalsBlocked () const const
 
int startTimer (int interval, Qt::TimerType timerType)
 
int startTimer (std::chrono::milliseconds time, Qt::TimerType timerType)
 
QThreadthread () const const
 

Protected Member Functions

void handleError (KIO::Job *) override
 
void handleErrorMessage (const QString &message) override
 
void jobStarted (KIO::ListJob *) override
 
- Protected Member Functions inherited from KCoreDirLister
virtual bool doMimeFilter (const QString &mimeType, const QStringList &filters) const
 
virtual bool doNameFilter (const QString &name, const QList< QRegExp > &filters) const
 
virtual bool matchesFilter (const KFileItem &) const
 
virtual bool matchesMimeFilter (const KFileItem &) const
 
- Protected Member Functions inherited from QObject
virtual void childEvent (QChildEvent *event)
 
virtual void connectNotify (const QMetaMethod &signal)
 
virtual void customEvent (QEvent *event)
 
virtual void disconnectNotify (const QMetaMethod &signal)
 
bool isSignalConnected (const QMetaMethod &signal) const const
 
int receivers (const char *signal) const const
 
QObjectsender () const const
 
int senderSignalIndex () const const
 
virtual void timerEvent (QTimerEvent *event)
 

Additional Inherited Members

- Public Types inherited from KCoreDirLister
enum  OpenUrlFlag { NoFlags = 0x0, Keep = 0x1, Reload = 0x2 }
 
typedef QFlags< OpenUrlFlagOpenUrlFlags
 
enum  WhichItems { AllItems = 0, FilteredItems = 1 }
 
- Signals inherited from KCoreDirLister
void canceled ()
 
void canceled (const QUrl &dirUrl)
 
void clear ()
 
void clear (const QUrl &dirUrl)
 
void clearDir (const QUrl &dirUrl)
 
void completed ()
 
void completed (const QUrl &dirUrl)
 
void infoMessage (const QString &msg)
 
void itemsAdded (const QUrl &directoryUrl, const KFileItemList &items)
 
void itemsDeleted (const KFileItemList &items)
 
void itemsFilteredByMime (const KFileItemList &items)
 
void jobError (KIO::Job *job)
 
void listingDirCanceled (const QUrl &dirUrl)
 
void listingDirCompleted (const QUrl &dirUrl)
 
void newItems (const KFileItemList &items)
 
void percent (int percent)
 
void processedSize (KIO::filesize_t size)
 
void redirection (const QUrl &_url)
 
void redirection (const QUrl &oldUrl, const QUrl &newUrl)
 
void refreshItems (const QList< QPair< KFileItem, KFileItem >> &items)
 
void speed (int bytes_per_second)
 
void started (const QUrl &dirUrl)
 
void totalSize (KIO::filesize_t size)
 
- Static Public Member Functions inherited from KCoreDirLister
static KFileItem cachedItemForUrl (const QUrl &url)
 
- Static Public Member Functions inherited from QObject
QMetaObject::Connection connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, const QObject *context, Functor functor, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, Functor functor)
 
bool disconnect (const QMetaObject::Connection &connection)
 
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)
 
bool disconnect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method)
 
QString tr (const char *sourceText, const char *disambiguation, int n)
 
QString trUtf8 (const char *sourceText, const char *disambiguation, int n)
 
- Public Attributes inherited from QObject
typedef QObjectList
 
- Protected Types inherited from KCoreDirLister
enum  Changes {
  NONE = 0, NAME_FILTER = 1, MIME_FILTER = 2, DOT_FILES = 4,
  DIR_ONLY_MODE = 8
}
 

Detailed Description

Subclass of KCoreDirLister which uses QWidgets to show error messages and to associate jobs with windows.

Definition at line 24 of file kdirlister.h.

Constructor & Destructor Documentation

◆ KDirLister()

KDirLister::KDirLister ( QObject parent = nullptr)

Create a directory lister.

Definition at line 31 of file kdirlister.cpp.

◆ ~KDirLister()

KDirLister::~KDirLister ( )
override

Destroy the directory lister.

Definition at line 37 of file kdirlister.cpp.

Member Function Documentation

◆ autoErrorHandlingEnabled()

bool KDirLister::autoErrorHandlingEnabled ( ) const

Check whether auto error handling is enabled.

If enabled, it will show an error dialog to the user when an error occurs. It is turned on by default.

Returns
true if auto error handling is enabled, false otherwise
See also
setAutoErrorHandlingEnabled()

◆ handleError()

void KDirLister::handleError ( KIO::Job job)
overrideprotectedvirtual

Reimplemented to customize error handling.

Reimplemented from superclass.

Reimplemented from KCoreDirLister.

Definition at line 65 of file kdirlister.cpp.

◆ handleErrorMessage()

void KDirLister::handleErrorMessage ( const QString message)
overrideprotectedvirtual

Reimplemented to customize error handling.

Reimplemented from superclass.

Reimplemented from KCoreDirLister.

Definition at line 73 of file kdirlister.cpp.

◆ jobStarted()

void KDirLister::jobStarted ( KIO::ListJob job)
overrideprotectedvirtual

Reimplemented to associate a window with new jobs.

Reimplemented from superclass.

Reimplemented from KCoreDirLister.

Definition at line 80 of file kdirlister.cpp.

◆ mainWindow()

QWidget * KDirLister::mainWindow ( )

Returns the main window associated with this object.

Returns
the associated main window, or nullptr if there is none

Definition at line 59 of file kdirlister.cpp.

◆ setAutoErrorHandlingEnabled() [1/2]

void KCoreDirLister::setAutoErrorHandlingEnabled

Enable or disable auto error handling.

If enabled, it will show an error dialog to the user when an error occurs. It is turned on by default.

Parameters
enabletrue to enable auto error handling, false to disable
parentthe parent widget for the error dialogs, can be nullptr for top-level
See also
autoErrorHandlingEnabled()
Since
5.82

Definition at line 2849 of file kcoredirlister.cpp.

◆ setAutoErrorHandlingEnabled() [2/2]

void KDirLister::setAutoErrorHandlingEnabled ( bool  enable,
QWidget parent 
)

Enable or disable auto error handling.

If enabled, it will show an error dialog to the user when an error occurs. It is turned on by default.

Parameters
enabletrue to enable auto error handling, false to disable
parentthe parent widget for the error dialogs, can be nullptr for top-level
See also
autoErrorHandlingEnabled()
Deprecated:
since 5.82, connect to the jobError() signal instead

Definition at line 47 of file kdirlister.cpp.

◆ setMainWindow()

void KDirLister::setMainWindow ( QWidget window)

Pass the main window this object is associated with this is used for caching authentication data.

Parameters
windowthe window to associate with, nullptr to disassociate

Definition at line 54 of file kdirlister.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Tue Dec 6 2022 03:56:07 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.