Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
QResourceFileEngineIterator Class Reference

#include <qresource_iterator_p.h>

Inheritance diagram for QResourceFileEngineIterator:
Collaboration diagram for QResourceFileEngineIterator:

Public Member Functions

 QResourceFileEngineIterator (const QString &path, QDir::Filters filters, const QStringList &filterNames)
 QResourceFileEngineIterator (const QString &path, QDirListing::IteratorFlags filters, const QStringList &filterNames)
 ~QResourceFileEngineIterator ()
bool advance () override
 This pure virtual function advances the iterator to the next directory entry; if the operation was successful this method returns true, otherwise it returs false.
QString currentFileName () const override
 This pure virtual function returns the name of the current directory entry, excluding the path.
QFileInfo currentFileInfo () const override
 The virtual function returns a QFileInfo for the current directory entry.
Public Member Functions inherited from QAbstractFileEngineIterator
 QAbstractFileEngineIterator (const QString &path, QDir::Filters filters, const QStringList &nameFilters)
 Constructs a QAbstractFileEngineIterator, using the entry filters filters, and wildcard name filters nameFilters.
 QAbstractFileEngineIterator (const QString &path, QDirListing::IteratorFlags filters, const QStringList &nameFilters)
virtual ~QAbstractFileEngineIterator ()
 Destroys the QAbstractFileEngineIterator.
QString path () const
 Returns the path for this iterator.
QStringList nameFilters () const
 Returns the name filters for this iterator.
QDir::Filters filters () const
 Returns the entry filters for this iterator.
virtual QString currentFilePath () const
 Returns the path to the current directory entry.

Additional Inherited Members

Protected Attributes inherited from QAbstractFileEngineIterator
QFileInfo m_fileInfo

Detailed Description

Definition at line 25 of file qresource_iterator_p.h.

Constructor & Destructor Documentation

◆ QResourceFileEngineIterator() [1/2]

QT_BEGIN_NAMESPACE QResourceFileEngineIterator::QResourceFileEngineIterator ( const QString & path,
QDir::Filters filters,
const QStringList & filterNames )

Definition at line 12 of file qresource_iterator.cpp.

Referenced by QResourceFileEngineIterator().

Here is the caller graph for this function:

◆ QResourceFileEngineIterator() [2/2]

QResourceFileEngineIterator::QResourceFileEngineIterator ( const QString & path,
QDirListing::IteratorFlags filters,
const QStringList & filterNames )

Definition at line 19 of file qresource_iterator.cpp.

References QResourceFileEngineIterator().

Here is the call graph for this function:

◆ ~QResourceFileEngineIterator()

QResourceFileEngineIterator::~QResourceFileEngineIterator ( )

Definition at line 27 of file qresource_iterator.cpp.

Member Function Documentation

◆ advance()

bool QResourceFileEngineIterator::advance ( )
overridevirtual

This pure virtual function advances the iterator to the next directory entry; if the operation was successful this method returns true, otherwise it returs false.

This function can optionally make use of nameFilters() and filters() to optimize its performance.

Reimplement this function in a subclass to advance the iterator.

Implements QAbstractFileEngineIterator.

Definition at line 31 of file qresource_iterator.cpp.

◆ currentFileInfo()

QFileInfo QResourceFileEngineIterator::currentFileInfo ( ) const
overridevirtual

The virtual function returns a QFileInfo for the current directory entry.

This function is provided for convenience. It can also be slightly faster than creating a QFileInfo object yourself, as the object returned by this function might contain cached information that QFileInfo otherwise would have to access through the file engine.

See also
currentFileName()

Reimplemented from QAbstractFileEngineIterator.

Definition at line 63 of file qresource_iterator.cpp.

◆ currentFileName()

QString QResourceFileEngineIterator::currentFileName ( ) const
overridevirtual

This pure virtual function returns the name of the current directory entry, excluding the path.

See also
currentFilePath()

Implements QAbstractFileEngineIterator.

Definition at line 56 of file qresource_iterator.cpp.


The documentation for this class was generated from the following files: