Home · All Namespaces · All Classes · Grouped Classes · Modules · Functions |
The QFileSystemFilter class is used to restrict the available filesystems returned from QStorageMetaInfo. More...
#include <QFileSystemFilter>
The QFileSystemFilter class is used to restrict the available filesystems returned from QStorageMetaInfo.
Extending the filter class is relatively simple.
class WriteableFileSystemFilter : public QFileSystemFilter { public: WriteableFileSystemFilter() : writable( QFileSystemFilter::Either ) { } bool filter( QFileSystem *fs ) { if ( (writable == QFileSystemFilter::Set && !fs->isWritable()) || (writable == QFileSystemFilter::NotSet && fs->isWritable()) ) return false; else return QFileSystemFilter::filter(fs); } QFileSystemFilter::FilterOption writable; };
See also QStorageMetaInfo.
This enum is used to describe the filter conditions for file systems.
Constant | Value | Description |
---|---|---|
QFileSystemFilter::Set | 1 | The filter matches if the connected condition is set. |
QFileSystemFilter::NotSet | 2 | The filter matches if the connected condition is not set |
QFileSystemFilter::Either | 0 | The filter always matches. |
Constructor that initializes the filter to allow any filesystem.
Destructor
Returns true if the fs matches the filter; otherwise returns false.
Copyright © 2009 Nokia | Trademarks | Qt Extended 4.4.3 |