Mailcommon
searchpattern.cpp
154 SearchRule::createInstance(config.readEntry("fieldA").toLatin1(), config.readEntry("funcA").toLatin1().constData(), config.readEntry("contentsA"));
168 rule = SearchRule::createInstance(config.readEntry("fieldB").toLatin1(), config.readEntry("funcB").toLatin1().constData(), config.readEntry("contentsB"));
235 mName = QLatin1Char('<') + i18nc("name used for a virgin filter", "unknown") + QLatin1Char('>');
bool hasPayload() const
QList< SearchTerm > subTerms() const
bool hasKey(const char *key) const
void writeEntry(const char *key, const char *value, WriteConfigFlags pFlags=Normal)
QString readEntry(const char *key, const char *aDefault=nullptr) const
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
This class is an abstraction of a search over messages.
Definition searchpattern.h:54
void writeConfig(KConfigGroup &config) const
Writes itself into config.
Definition searchpattern.cpp:194
SearchPattern()
Constructor which provides a pattern with minimal, but sufficient initialization.
Definition searchpattern.cpp:32
bool matches(const Akonadi::Item &item, bool ignoreBody=false) const
The central function of this class.
Definition searchpattern.cpp:46
const SearchPattern & operator=(const SearchPattern &aPattern)
Overloaded assignment operator.
Definition searchpattern.cpp:292
void deserialize(const QByteArray &)
Constructs the pattern from a byte array serialization.
Definition searchpattern.cpp:319
SearchRule::RequiredPart requiredPart() const
Returns the required part from the item that is needed for the search to operate.
Definition searchpattern.cpp:86
void setName(const QString &newName)
Sets the name of the search pattern.
Definition searchpattern.h:153
QByteArray serialize() const
Writes the pattern into a byte array for persistence purposes.
Definition searchpattern.cpp:311
void readConfig(const KConfigGroup &config)
Reads a search pattern from a KConfigGroup.
Definition searchpattern.cpp:121
QString purify(bool removeAction=true)
Removes all empty rules from the list.
Definition searchpattern.cpp:98
SparqlQueryError asAkonadiQuery(Akonadi::SearchQuery &) const
Returns the pattern as akonadi query.
Definition searchpattern.cpp:262
static SearchRule::Ptr createInstanceFromConfig(const KConfigGroup &group, int index)
Creates a new search rule from a given config group.
Definition searchrule.cpp:111
static SearchRule::Ptr createInstance(const QByteArray &field=QByteArray(), Function function=FuncContains, const QString &contents=QString())
Creates a new search rule of a certain type by instantiating the appropriate subclass depending on th...
Definition searchrule.cpp:79
QString i18nc(const char *context, const char *text, const TYPE &arg...)
QString i18n(const char *text, const TYPE &arg...)
const char * constData() const const
bool atEnd() const const
WriteOnly
void append(QList< T > &&value)
iterator begin()
void clear()
const_iterator constBegin() const const
const_iterator constEnd() const const
qsizetype count() const const
iterator end()
iterator erase(const_iterator begin, const_iterator end)
bool isEmpty() const const
T & last()
bool isEmpty() const const
QByteArray toLatin1() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:00:25 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:00:25 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.