Akonadi
agentfilterproxymodel.cpp
19static_assert(static_cast<int>(AgentTypeModel::CapabilitiesRole) == static_cast<int>(AgentInstanceModel::CapabilitiesRole),
21static_assert(static_cast<int>(AgentTypeModel::MimeTypesRole) == static_cast<int>(AgentInstanceModel::MimeTypesRole),
33 [[nodiscard]] bool filterAcceptRegExp(const QModelIndex &index, const QRegularExpression &filterRegExpStr);
70bool AgentFilterProxyModelPrivate::filterAcceptRegExp(const QModelIndex &index, const QRegularExpression &filterRegExpStr)
74 return index.data(AgentTypeModel::IdentifierRole).toString().contains(filterRegExpStr) || index.data().toString().contains(filterRegExpStr);
79bool AgentFilterProxyModel::filterAcceptsRow(int row, const QModelIndex & /*source_parent*/) const
127 const QStringList lstCapabilities = index.data(AgentTypeModel::CapabilitiesRole).toStringList();
AgentFilterProxyModel(QObject *parent=nullptr)
Create a new agent filter proxy model.
Definition agentfilterproxymodel.cpp:36
void addMimeTypeFilter(const QString &mimeType)
Accept agents supporting mimeType.
Definition agentfilterproxymodel.cpp:44
~AgentFilterProxyModel() override
Destroys the agent filter proxy model.
void addCapabilityFilter(const QString &capability)
Accept agents with the given capability.
Definition agentfilterproxymodel.cpp:50
void excludeCapabilities(const QString &capability)
Excludes agents with the given capability.
Definition agentfilterproxymodel.cpp:56
void clearFilters()
Clear the filters ( mimeTypes & capabilities ).
Definition agentfilterproxymodel.cpp:62
Helper integration between Akonadi and Qt.
sourceModel
QMimeType mimeTypeForName(const QString &nameOrAlias) const const
bool inherits(const QString &mimeTypeName) const const
bool isValid() const const
QVariant data(int role) const const
QString pattern() const const
filterRegularExpression
virtual QModelIndex index(int row, int column, const QModelIndex &parent) const const override
void invalidateFilter()
virtual QStringList mimeTypes() const const override
bool contains(QChar ch, Qt::CaseSensitivity cs) const const
bool isEmpty() const const
QString toString() const const
QStringList toStringList() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 29 2024 11:49:11 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 29 2024 11:49:11 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.