kmsearchpattern.h
This class is an abstraction of a search over messages.
Definition: kmsearchpattern.h:308
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:101
virtual bool isEmpty() const
Determine whether the rule is worth considering.
Definition: kmsearchpattern.cpp:240
This class represents a search to be performed against a string.
Definition: kmsearchpattern.h:159
bool requiresBody() const
Returns true if the pattern only depends the DwString that backs a message.
Definition: kmsearchpattern.cpp:808
This class represents a search to be performed against the status of a messsage.
Definition: kmsearchpattern.h:270
TQCString field() const
Return message header field name (without the trailing ':').
Definition: kmsearchpattern.h:126
bool matchesInternal(const TQString &msgContents) const
Helper for the main matches() method.
Definition: kmsearchpattern.cpp:412
void writeConfig(TDEConfig *config) const
Writes itself into config.
Definition: kmsearchpattern.cpp:896
void readConfig(const TDEConfig *config)
Reads a search pattern from a TDEConfig.
Definition: kmsearchpattern.cpp:830
bool matchesInternal(long numericalValue, long numericalMsgContents, const TQString &msgContents) const
Helper for the main matches() method.
Definition: kmsearchpattern.cpp:568
Incoming mail is sent through the list of mail filter rules before it is placed in the associated mai...
Definition: kmsearchpattern.h:31
KMSearchPattern(const TDEConfig *config=0)
Constructor that initializes from a given TDEConfig group, if given.
Definition: kmsearchpattern.cpp:715
virtual bool isEmpty() const
Determine whether the rule is worth considering.
Definition: kmsearchpattern.cpp:663
void setName(const TQString &newName)
Set the name of the search pattern.
Definition: kmsearchpattern.h:379
virtual bool matches(const KMMessage *msg) const =0
Tries to match the rule against the given KMMessage.
virtual bool matches(const KMMessage *msg) const
Tries to match the rule against the given KMMessage.
Definition: kmsearchpattern.cpp:539
void setField(const TQCString &field)
Set message header field name (make sure there's no trailing colon ':')
Definition: kmsearchpattern.h:130
bool matches(const KMMessage *msg, bool ignoreBody=false) const
The central function of this class.
Definition: kmsearchpattern.cpp:729
virtual bool isEmpty() const
Determine whether the rule is worth considering.
Definition: kmsearchpattern.cpp:530
virtual bool isEmpty() const =0
Determine whether the rule is worth considering.
This class represents a search to be performed against a numerical value, such as the age of the mess...
Definition: kmsearchpattern.h:194
Operator
Boolean operators that connect the return values of the individual rules.
Definition: kmsearchpattern.h:317
virtual bool matches(const KMMessage *msg) const
Tries to match the rule against the given KMMessage.
Definition: kmsearchpattern.cpp:326
virtual bool requiresBody() const
Returns true if the rule depends on a complete message, otherwise returns false.
Definition: kmsearchpattern.cpp:245
const KMSearchPattern & operator=(const KMSearchPattern &aPattern)
Overloaded assignment operator.
Definition: kmsearchpattern.cpp:929
virtual bool requiresBody() const
Returns true if the rule depends on a complete message, otherwise returns false.
Definition: kmsearchpattern.h:99
virtual bool matches(const KMMessage *msg) const
Tries to match the rule against the given KMMessage.
Definition: kmsearchpattern.cpp:675
void writeConfig(TDEConfig *config, int aIdx) const
Save the object into a given config file.
Definition: kmsearchpattern.cpp:164
static KMSearchRule * createInstanceFromConfig(const TDEConfig *config, int aIdx)
Initialize the object from a given config file.
Definition: kmsearchpattern.cpp:128
