mailcommon
searchrule.cpp
Go to the documentation of this file.
305 code += QLatin1Char('"') + i18n("\"%1\" is not supported with condition \"%2\"", QLatin1String(mField), conditionToString(mFunction)) + QLatin1Char('"');
308 code += QString::fromLatin1("size %1 %2K").arg(comparaison).arg(QString::number(mContents.toInt() + offset));
404 code += QLatin1Char('"') + i18n("\"%1\" is not supported with condition \"%2\"", QLatin1String(mField), conditionToString(mFunction)) + QLatin1Char('"');
407 code += (negative ? QLatin1String("not ") : QString()) + QString::fromLatin1("body :text %1 \"%2\"").arg(comparaison).arg(contentStr);
479 code += QLatin1Char('"') + i18n("\"%1\" is not supported with condition \"%2\"", QLatin1String(mField), conditionToString(mFunction)) + QLatin1Char('"');
482 code += (negative ? QLatin1String("not ") : QString()) + QString::fromLatin1("header %1 \"%2\" \"%3\"").arg(comparaison).arg(QLatin1String(mField)).arg(contentStr);
QDataStream & operator>>(QDataStream &) const
Definition: searchrule.cpp:586
void setField(const QByteArray &name)
Sets the message header field name.
Definition: searchrule.cpp:496
Akonadi::SearchTerm::Condition akonadiComparator() const
Converts the rule function into the corresponding Akonadi query operator.
Definition: searchrule.cpp:526
This class represents a search pattern rule operating on numerical values.
Definition: searchrulenumerical.h:30
bool contains(const QString &str, Qt::CaseSensitivity cs) const
void writeConfig(KConfigGroup &group, int index) const
Saves the object into a given config group.
Definition: searchrule.cpp:180
void setContents(const QString &contents)
Set the contents of the rule.
Definition: searchrule.cpp:506
void setFunction(Function function)
Sets the filter function of the rule.
Definition: searchrule.cpp:486
const SearchRule & operator=(const SearchRule &other)
Initializes this rule with an other rule.
Definition: searchrule.cpp:78
QString number(int n, int base)
static SearchRule::Ptr createInstanceFromConfig(const KConfigGroup &group, int index)
Creates a new search rule from a given config group.
Definition: searchrule.cpp:121
const QString asString() const
Returns the rule as string for debugging purpose.
Definition: searchrule.cpp:516
int toInt(bool *ok, int base) const
Definition: searchrule.h:56
QByteArray field() const
Returns the message header field name (without the trailing ':').
Definition: searchrule.cpp:501
bool isNegated() const
Helper that returns whether the rule has a negated function.
Definition: searchrule.cpp:567
This class represents a search to be performed against the status of a messsage.
Definition: searchrulestatus.h:85
void generateSieveScript(QStringList &requires, QString &code)
Definition: searchrule.cpp:263
Definition: searchruledate.h:25
QString fromLatin1(const char *str, int size)
static SearchRule::Ptr createInstance(const QByteArray &field=0, 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:91
QString arg(qlonglong a, int fieldWidth, int base, const QChar &fillChar) const
SearchRule(const QByteArray &field=QByteArray(), Function function=FuncContains, const QString &contents=QString())
Creates new new search rule.
Definition: searchrule.cpp:64
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:31:41 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:31:41 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.