Mailcommon
searchrulestatus.cpp
19static struct _statusNames statusNames[] = {{"Important", Akonadi::MessageStatus::statusImportant()},
44SearchRuleStatus::SearchRuleStatus(const QByteArray &field, Function func, const QString &aContents)
104 QString msg = (rc ? QStringLiteral("<font color=#00FF00>1 = </font>") : QStringLiteral("<font color=#FF0000>0 = </font>"));
116void SearchRuleStatus::addQueryTerms(Akonadi::SearchTerm &groupTerm, bool &emptyIsNotAnError) const
122 EmailSearchTerm term(EmailSearchTerm::MessageStatus, mStatus.statusFlags().values().first(), akonadiComparator());
129 EmailSearchTerm term(EmailSearchTerm::MessageStatus, status.statusFlags().values().first(), akonadiComparator());
Flags flags() const
static const MessageStatus statusRead()
static const MessageStatus statusSent()
static const MessageStatus statusUnread()
static const MessageStatus statusHasAttachment()
static const MessageStatus statusSpam()
void setRead(bool read=true)
static const MessageStatus statusDeleted()
static const MessageStatus statusReplied()
void setStatusFromFlags(const QSet< QByteArray > &flags)
static const MessageStatus statusImportant()
static const MessageStatus statusWatched()
static const MessageStatus statusForwarded()
static const MessageStatus statusToAct()
static const MessageStatus statusQueued()
static const MessageStatus statusIgnored()
static const MessageStatus statusHam()
QSet< QByteArray > statusFlags() const
void addSubTerm(const SearchTerm &term)
void setIsNegated(bool negated)
void add(const QString &entry, ContentType type)
Adds the given log entry under the given content type to the log.
Definition filterlog.cpp:128
static QString recode(const QString &plain)
Returns an escaped version of the log which can be used in a HTML document.
Definition filterlog.cpp:188
static FilterLog * instance()
Returns the single global instance of the filter log.
Definition filterlog.cpp:71
bool matches(const Akonadi::Item &item) const override
Tries to match the rule against the KMime::Message in the given item.
Definition searchrulestatus.cpp:80
RequiredPart requiredPart() const override
Returns the required part from the item that is needed for the search to operate.
Definition searchrulestatus.cpp:111
void addQueryTerms(Akonadi::SearchTerm &groupTerm, bool &emptyIsNotAnError) const override
Adds query terms to the given term group.
Definition searchrulestatus.cpp:116
bool isEmpty() const override
Determines whether the rule is worth considering.
Definition searchrulestatus.cpp:75
QByteArray field() const
Returns the message header field name (without the trailing ':').
Definition searchrule.cpp:501
Akonadi::SearchTerm::Condition akonadiComparator() const
Converts the rule function into the corresponding Akonadi query operator.
Definition searchrule.cpp:525
bool isNegated() const
Helper that returns whether the rule has a negated function.
Definition searchrule.cpp:566
const QString asString() const
Returns the rule as string for debugging purpose.
Definition searchrule.cpp:516
Q_SCRIPTABLE CaptureState status()
bool isEmpty() const const
QByteArray trimmed() const const
int compare(QLatin1StringView s1, const QString &s2, Qt::CaseSensitivity cs)
QString fromLatin1(QByteArrayView str)
bool isEmpty() const const
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.