mailcommon
#include <searchpattern.h>
Public Member Functions | |
SearchRuleString (const QByteArray &field=0, Function function=FuncContains, const QString &contents=QString()) | |
SearchRuleString (const SearchRuleString &other) | |
virtual | ~SearchRuleString () |
virtual void | addQueryTerms (Nepomuk2::Query::GroupTerm &groupTerm, bool &emptyIsNotAnError) const |
virtual bool | isEmpty () const |
virtual bool | matches (const Akonadi::Item &item) const |
bool | matchesInternal (const QString &contents) const |
const SearchRuleString & | operator= (const SearchRuleString &other) |
virtual RequiredPart | requiredPart () const |
Public Member Functions inherited from MailCommon::SearchRule | |
SearchRule (const QByteArray &field=0, Function function=FuncContains, const QString &contents=QString()) | |
SearchRule (const SearchRule &other) | |
virtual | ~SearchRule () |
const QString | asString () const |
QString | contents () const |
QByteArray | field () const |
Function | function () const |
void | generateSieveScript (QStringList &requires, QString &code) |
const SearchRule & | operator= (const SearchRule &other) |
QDataStream & | operator>> (QDataStream &) const |
void | setContents (const QString &contents) |
void | setField (const QByteArray &name) |
void | setFunction (Function function) |
void | writeConfig (KConfigGroup &group, int index) const |
Detailed Description
This class represents a search pattern rule operating on a string.
This class represents a search to be performed against a string. The string can be either a message header, or a pseudo header, such as <body>
Definition at line 317 of file searchpattern.h.
Constructor & Destructor Documentation
|
explicit |
Creates new new string search rule.
- Parameters
-
field The field to search in. function The function to use for searching. contents The contents to search for.
Definition at line 657 of file searchpattern.cpp.
SearchRuleString::SearchRuleString | ( | const SearchRuleString & | other | ) |
Creates a new string search rule from an other
rule.
Definition at line 664 of file searchpattern.cpp.
|
virtual |
Destroys the string search rule.
Definition at line 682 of file searchpattern.cpp.
Member Function Documentation
|
virtual |
Adds query terms to the given term group.
Implements MailCommon::SearchRule.
Definition at line 868 of file searchpattern.cpp.
|
virtual |
Determines whether the rule is worth considering.
It isn't if either the field is not set or the contents is empty. The calling code should make sure that it's rule list contains only non-empty rules, as matches doesn't check this.
Implements MailCommon::SearchRule.
Definition at line 686 of file searchpattern.cpp.
|
virtual |
Tries to match the rule against the KMime::Message in the given item
.
- Returns
- true if the rule matched, false otherwise.
- Note
- Must be implemented by subclasses.
Implements MailCommon::SearchRule.
Definition at line 710 of file searchpattern.cpp.
bool SearchRuleString::matchesInternal | ( | const QString & | contents | ) | const |
A helper method for the main matches() method.
Does the actual comparing.
Definition at line 998 of file searchpattern.cpp.
const SearchRuleString & SearchRuleString::operator= | ( | const SearchRuleString & | other | ) |
Initializes this rule with an other
rule.
Definition at line 669 of file searchpattern.cpp.
|
virtual |
Returns the required part from the item that is needed for the search to operate.
See RequiredPart
Implements MailCommon::SearchRule.
Definition at line 691 of file searchpattern.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:55:15 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.