Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
QQmlPreviewFileEngineIterator Class Reference
+ Inheritance diagram for QQmlPreviewFileEngineIterator:
+ Collaboration diagram for QQmlPreviewFileEngineIterator:

Public Member Functions

 QQmlPreviewFileEngineIterator (QDir::Filters filters, const QStringList &filterNames, const QStringList &m_entries)
 
 ~QQmlPreviewFileEngineIterator ()
 
QString next () override
 This pure virtual function advances the iterator to the next directory entry, and returns the file path to the current entry.
 
bool hasNext () const override
 This pure virtual function returns true if there is at least one more entry in the current directory (i.e., the iterator path is valid and accessible, and the iterator has not reached the end of the entry list).
 
QString currentFileName () const override
 This pure virtual function returns the name of the current directory entry, excluding the path.
 
- Public Member Functions inherited from QAbstractFileEngineIterator
 QAbstractFileEngineIterator (QDir::Filters filters, const QStringList &nameFilters)
 Constructs a QAbstractFileEngineIterator, using the entry filters filters, and wildcard name filters nameFilters.
 
virtual ~QAbstractFileEngineIterator ()
 Destroys the QAbstractFileEngineIterator.
 
virtual QString next ()=0
 This pure virtual function advances the iterator to the next directory entry, and returns the file path to the current entry.
 
virtual bool hasNext () const =0
 This pure virtual function returns true if there is at least one more entry in the current directory (i.e., the iterator path is valid and accessible, and the iterator has not reached the end of the entry list).
 
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 currentFileName () const =0
 This pure virtual function returns the name of the current directory entry, excluding the path.
 
virtual QFileInfo currentFileInfo () const
 The virtual function returns a QFileInfo for the current directory entry.
 
virtual QString currentFilePath () const
 Returns the path to the current directory entry.
 

Additional Inherited Members

- Protected Types inherited from QAbstractFileEngineIterator
enum  EntryInfoType
 
- Protected Member Functions inherited from QAbstractFileEngineIterator
virtual QVariant entryInfo (EntryInfoType type) const
 

Detailed Description

Definition at line 40 of file qqmlpreviewfileengine.cpp.

Constructor & Destructor Documentation

◆ QQmlPreviewFileEngineIterator()

QQmlPreviewFileEngineIterator::QQmlPreviewFileEngineIterator ( QDir::Filters  filters,
const QStringList filterNames,
const QStringList m_entries 
)

Definition at line 56 of file qqmlpreviewfileengine.cpp.

◆ ~QQmlPreviewFileEngineIterator()

QQmlPreviewFileEngineIterator::~QQmlPreviewFileEngineIterator ( )

Definition at line 63 of file qqmlpreviewfileengine.cpp.

Member Function Documentation

◆ currentFileName()

QString QQmlPreviewFileEngineIterator::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 80 of file qqmlpreviewfileengine.cpp.

◆ hasNext()

bool QQmlPreviewFileEngineIterator::hasNext ( ) const
overridevirtual

This pure virtual function returns true if there is at least one more entry in the current directory (i.e., the iterator path is valid and accessible, and the iterator has not reached the end of the entry list).

See also
QDirIterator::hasNext()

Implements QAbstractFileEngineIterator.

Definition at line 75 of file qqmlpreviewfileengine.cpp.

Referenced by next().

+ Here is the caller graph for this function:

◆ next()

QString QQmlPreviewFileEngineIterator::next ( )
overridevirtual

This pure virtual function advances the iterator to the next directory entry, and returns the file path to the current entry.

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

Reimplement this function in a subclass to advance the iterator.

See also
QDirIterator::next()

Implements QAbstractFileEngineIterator.

Definition at line 67 of file qqmlpreviewfileengine.cpp.

References QAbstractFileEngineIterator::currentFilePath(), and hasNext().

+ Here is the call graph for this function:

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