akonadi
#include <collectionfilterproxymodel.h>
Inherits QSortFilterProxyModel.
Public Member Functions | |
CollectionFilterProxyModel (QObject *parent=0) | |
virtual | ~CollectionFilterProxyModel () |
void | addMimeTypeFilter (const QString &mimeType) |
void | addMimeTypeFilters (const QStringList &mimeTypes) |
void | clearFilters () |
bool | excludeVirtualCollections () const |
virtual Qt::ItemFlags | flags (const QModelIndex &index) const |
QStringList | mimeTypeFilters () const |
void | setExcludeVirtualCollections (bool exclude) |
Protected Member Functions | |
virtual bool | filterAcceptsRow (int sourceRow, const QModelIndex &sourceParent) const |
Detailed Description
A proxy model that filters collections by mime type.
This class can be used on top of a CollectionModel to filter out all collections that doesn't match a given mime type.
For instance, a mail application will use addMimeType( "message/rfc822" ) to only show collections containing mail.
Definition at line 54 of file collectionfilterproxymodel.h.
Constructor & Destructor Documentation
|
explicit |
Creates a new collection proxy filter model.
- Parameters
-
parent The parent object.
Definition at line 115 of file collectionfilterproxymodel.cpp.
|
virtual |
Destroys the collection proxy filter model.
Definition at line 121 of file collectionfilterproxymodel.cpp.
Member Function Documentation
void CollectionFilterProxyModel::addMimeTypeFilter | ( | const QString & | mimeType | ) |
Adds a mime type to be shown by the filter.
- Parameters
-
mimeType A mime type to be shown.
Definition at line 133 of file collectionfilterproxymodel.cpp.
void CollectionFilterProxyModel::addMimeTypeFilters | ( | const QStringList & | mimeTypes | ) |
Adds a list of mime types to be shown by the filter.
- Parameters
-
mimeTypes A list of mime types to be shown.
Definition at line 126 of file collectionfilterproxymodel.cpp.
void CollectionFilterProxyModel::clearFilters | ( | ) |
Clears all mime type filters.
Definition at line 149 of file collectionfilterproxymodel.cpp.
QStringList CollectionFilterProxyModel::mimeTypeFilters | ( | ) | const |
Returns the list of mime type filters.
Definition at line 144 of file collectionfilterproxymodel.cpp.
void CollectionFilterProxyModel::setExcludeVirtualCollections | ( | bool | exclude | ) |
Sets whether we want virtual collections to be filtered or not.
By default, virtual collections are accepted.
- Parameters
-
exclude If true, virtual collections aren't accepted.
- Since
- 4.7
Definition at line 155 of file collectionfilterproxymodel.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:00:28 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.