akonadi
collectionfilterproxymodel.cpp
53 bool CollectionFilterProxyModel::Private::collectionAccepted(const QModelIndex &index, bool checkResourceVisibility)
56 const Collection collection = mParent->sourceModel()->data(index, CollectionModel::CollectionRole).value<Collection>();
99 if (collectionAccepted(childIndex, false /* don't check visibility of the parent, as we are checking the child now */)) {
139 bool CollectionFilterProxyModel::filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const
175 const Collection collection = sourceModel()->data(mapToSource(index), CollectionModel::CollectionRole).value<Collection>();
virtual QModelIndex index(int row, int column, const QModelIndex &parent) const
virtual Qt::ItemFlags flags(const QModelIndex &index) const
A proxy model that filters collections by mime type.
Definition: collectionfilterproxymodel.h:54
T value() const
Helper for checking MIME types of Collections and Items.
Definition: mimetypechecker.h:109
void addMimeTypeFilters(const QStringList &mimeTypes)
Adds a list of mime types to be shown by the filter.
Definition: collectionfilterproxymodel.cpp:126
CollectionFilterProxyModel(QObject *parent=0)
Creates a new collection proxy filter model.
Definition: collectionfilterproxymodel.cpp:115
bool isValid() const
QStringList mimeTypeFilters() const
Returns the list of mime type filters.
Definition: collectionfilterproxymodel.cpp:144
int row() const
void invalidateFilter()
virtual QVariant data(const QModelIndex &index, int role) const =0
QModelIndex parent() const
virtual QStringList mimeTypes() const
void setExcludeVirtualCollections(bool exclude)
Sets whether we want virtual collections to be filtered or not.
Definition: collectionfilterproxymodel.cpp:155
QModelIndex child(int row, int column) const
The actual collection object.
Definition: collectionmodel.h:66
QAbstractItemModel * sourceModel() const
virtual QModelIndex mapToSource(const QModelIndex &proxyIndex) const
void addMimeTypeFilter(const QString &mimeType)
Adds a mime type to be shown by the filter.
Definition: collectionfilterproxymodel.cpp:133
QVariant data(int role) const
QModelIndex sibling(int row, int column) const
QObject * parent() const
QChar * data()
QString toString() const
virtual ~CollectionFilterProxyModel()
Destroys the collection proxy filter model.
Definition: collectionfilterproxymodel.cpp:121
bool isVirtual() const
Returns whether the collection is virtual, for example a search collection.
Definition: collection.cpp:261
typedef ItemFlags
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:38:02 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:38:02 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.