kmsearchpattern.h
This class is an abstraction of a search over messages.
Definition: kmsearchpattern.h:308
bool requiresBody() const
Returns true if the pattern only depends the DwString that backs a message.
Definition: kmsearchpattern.cpp:807
void readConfig(const TDEConfig *config)
Reads a search pattern from a TDEConfig.
Definition: kmsearchpattern.cpp:829
bool matches(const KMMessage *msg, bool ignoreBody=false) const
The central function of this class.
Definition: kmsearchpattern.cpp:728
KMSearchPattern(const TDEConfig *config=0)
Constructor that initializes from a given TDEConfig group, if given.
Definition: kmsearchpattern.cpp:714
void setName(const TQString &newName)
Set the name of the search pattern.
Definition: kmsearchpattern.h:378
Operator
Boolean operators that connect the return values of the individual rules.
Definition: kmsearchpattern.h:316
const KMSearchPattern & operator=(const KMSearchPattern &aPattern)
Overloaded assignment operator.
Definition: kmsearchpattern.cpp:928
void writeConfig(TDEConfig *config) const
Writes itself into config.
Definition: kmsearchpattern.cpp:895
This class represents a search to be performed against a numerical value, such as the age of the mess...
Definition: kmsearchpattern.h:194
virtual bool isEmpty() const
Determine whether the rule is worth considering.
Definition: kmsearchpattern.cpp:529
bool matchesInternal(long numericalValue, long numericalMsgContents, const TQString &msgContents) const
Helper for the main matches() method.
Definition: kmsearchpattern.cpp:567
virtual bool matches(const KMMessage *msg) const
Tries to match the rule against the given KMMessage.
Definition: kmsearchpattern.cpp:538
This class represents a search to be performed against the status of a messsage.
Definition: kmsearchpattern.h:270
virtual bool matches(const KMMessage *msg) const
Tries to match the rule against the given KMMessage.
Definition: kmsearchpattern.cpp:674
virtual bool isEmpty() const
Determine whether the rule is worth considering.
Definition: kmsearchpattern.cpp:662
This class represents a search to be performed against a string.
Definition: kmsearchpattern.h:159
virtual bool requiresBody() const
Returns true if the rule depends on a complete message, otherwise returns false.
Definition: kmsearchpattern.cpp:244
virtual bool matches(const KMMessage *msg) const
Tries to match the rule against the given KMMessage.
Definition: kmsearchpattern.cpp:325
bool matchesInternal(const TQString &msgContents) const
Helper for the main matches() method.
Definition: kmsearchpattern.cpp:411
virtual bool isEmpty() const
Determine whether the rule is worth considering.
Definition: kmsearchpattern.cpp:239
Incoming mail is sent through the list of mail filter rules before it is placed in the associated mai...
Definition: kmsearchpattern.h:31
virtual bool matches(const KMMessage *msg) const =0
Tries to match the rule against the given KMMessage.
static KMSearchRule * createInstanceFromConfig(const TDEConfig *config, int aIdx)
Initialize the object from a given config file.
Definition: kmsearchpattern.cpp:127
static KMSearchRule * createInstance(const TQCString &field=0, Function function=FuncContains, const TQString &contents=TQString())
Create a search rule of a certain type by instantiating the appro- priate subclass depending on the f...
Definition: kmsearchpattern.cpp:100
TQCString field() const
Return message header field name (without the trailing ':').
Definition: kmsearchpattern.h:125
virtual bool requiresBody() const
Returns true if the rule depends on a complete message, otherwise returns false.
Definition: kmsearchpattern.h:98
void setField(const TQCString &field)
Set message header field name (make sure there's no trailing colon ':')
Definition: kmsearchpattern.h:129
virtual bool isEmpty() const =0
Determine whether the rule is worth considering.
void writeConfig(TDEConfig *config, int aIdx) const
Save the object into a given config file.
Definition: kmsearchpattern.cpp:163