Mailcommon
filtermanager.cpp
31 const auto service = Akonadi::ServerManager::agentServiceName(Akonadi::ServerManager::Agent, QStringLiteral("akonadi_mailfilter_agent"));
33 new org::freedesktop::Akonadi::MailFilterAgent(service, QStringLiteral("/MailFilterAgent"), QDBusConnection::sessionBus(), q);
54 KSharedConfig::openConfig(Akonadi::ServerManager::addNamespace(QStringLiteral("akonadi_mailfilter_agent")) + QStringLiteral("rc"));
64 KSharedConfig::openConfig(Akonadi::ServerManager::addNamespace(QStringLiteral("akonadi_mailfilter_agent")) + QStringLiteral("rc"));
122 connect(Akonadi::ServerManager::self(), &Akonadi::ServerManager::stateChanged, this, &FilterManager::slotServerStateChanged);
140 disconnect(Akonadi::ServerManager::self(), SIGNAL(stateChanged(Akonadi::ServerManager::State)));
217void FilterManager::filter(const Akonadi::Item &item, const QString &identifier, const QString &resourceId) const
222void FilterManager::filter(const Akonadi::Item &item, FilterSet set, bool account, const QString &resourceId) const
243void FilterManager::filter(const Akonadi::Collection &collection, const QStringList &listFilters) const
248void FilterManager::filter(const Akonadi::Collection::List &collections, const QStringList &listFilters, FilterSet set) const
259void FilterManager::filter(const Akonadi::Item::List &messages, FilterManager::FilterSet set) const
271void FilterManager::filter(const Akonadi::Item::List &messages, SearchRule::RequiredPart requiredPart, const QStringList &listFilters) const
279 d->mMailFilterAgentInterface->applySpecificFilters(itemIds, static_cast<int>(requiredPart), listFilters);
295void FilterManager::appendFilters(const QList<MailCommon::MailFilter *> &filters, bool replaceIfNameExists)
Id id() const
void tagRemoved(const Akonadi::Tag &tag)
TagFetchScope & tagFetchScope()
void tagChanged(const Akonadi::Tag &tag)
void tagAdded(const Akonadi::Tag &tag)
void setTypeMonitored(Type type, bool monitored=true)
static State state()
static QString agentServiceName(ServiceAgentType agentType, const QString &identifier)
static QString addNamespace(const QString &string)
void stateChanged(Akonadi::ServerManager::State state)
static ServerManager * self()
Tag::List tags() const
void fetchAttribute(bool fetch=true)
QUrl url() const
KConfigGroup group(const QString &group)
bool sync() override
virtual QString errorString() const
int error() const
void result(KJob *job)
static void writeFiltersToConfig(const QList< MailFilter * > &filters, KSharedConfig::Ptr config, bool exportFilter=false)
Writes the given list of filters to the given config file.
Definition filterimporterexporter.cpp:70
static QList< MailFilter * > readFiltersFromConfig(const KSharedConfig::Ptr &config, QStringList &emptyFilter)
Reads a list of filters from the given config file.
Definition filterimporterexporter.cpp:33
A wrapper class that allows easy access to the mail filters.
Definition filtermanager.h:27
void filter(const Akonadi::Item &item, const QString &identifier, const QString &resourceId) const
Apply filters interface.
Definition filtermanager.cpp:217
void filtersChanged()
This signal is emitted whenever the filter list has been updated.
static FilterActionDict * filterActionDict()
Returns the global filter action dictionary.
Definition filtermanager.cpp:96
void appendFilters(const QList< MailCommon::MailFilter * > &filters, bool replaceIfNameExists=false)
Manage filters interface.
Definition filtermanager.cpp:295
void removeFilter(MailCommon::MailFilter *filter)
Removes the given filter from the list.
Definition filtermanager.cpp:316
void setFilters(const QList< MailCommon::MailFilter * > &filters)
Replace the list of filters of the filter manager with the given list of filters.
Definition filtermanager.cpp:282
void showFilterLogDialog(qlonglong windowId)
Shows the filter log dialog.
Definition filtermanager.cpp:212
QList< MailCommon::MailFilter * > filters() const
Returns the filter list of the manager.
Definition filtermanager.cpp:290
void endUpdate()
Should be called at the end of an filter list update.
Definition filtermanager.cpp:327
QString createUniqueFilterName(const QString &name) const
Checks for existing filters with the name and extend the "name" to "name (i)" until no match is found...
Definition filtermanager.cpp:207
static FilterManager * instance()
Returns the global filter manager object.
Definition filtermanager.cpp:87
void beginUpdate()
Should be called at the beginning of an filter list update.
Definition filtermanager.cpp:323
bool isValid() const
Returns whether the filter manager is in a usable state.
Definition filtermanager.cpp:202
QDBusConnection sessionBus()
const_reference at(qsizetype i) const const
qsizetype count() const const
qsizetype removeAll(const AT &t)
void reserve(qsizetype size)
qsizetype size() const const
bool contains(const Key &key) const const
iterator insert(const Key &key, const T &value)
size_type remove(const Key &key)
Q_EMITQ_EMIT
QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor)
bool disconnect(const QMetaObject::Connection &connection)
void setObjectName(QAnyStringView name)
singleShot
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 6 2024 12:02:04 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 6 2024 12:02:04 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.