| Home · All Classes · Annotated · Functions |
The QFileSystemFilter class is used to restrict the available filesystems. More...
#include <QFileSystemFilter>
The QFileSystemFilter class is used to restrict the available filesystems.
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;
return QFileSystemFilter::filter();
}
QFileSystemFilter::FilterOption writable;
};
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 initialises the filter to allow any filesystem.
Destructor
Does the fs match the filter?
| Copyright © 2006 Trolltech | Trademarks | Qtopia 4.1.7 |