KMSearchPattern Class Reference
This class is an abstraction of a search over messages. An abstraction of a search over messages. More...
#include <kmsearchpattern.h>
Inherits QPtrList.
Public Types
- enum Operator { OpAnd, OpOr }
Public Member Functions
- KMSearchPattern (const KConfig *config=0)
- ~KMSearchPattern ()
- bool matches (const KMMessage *msg, bool ignoreBody=false) const
- bool matches (const DwString &str, bool ignoreBody=false) const
- bool matches (Q_UINT32 sernum, bool ignoreBody=false) const
- bool requiresBody () const
- void purify ()
- void readConfig (const KConfig *config)
- void writeConfig (KConfig *config) const
- QString name () const
- void setName (const QString &newName)
- KMSearchPattern::Operator op () const
- void setOp (KMSearchPattern::Operator aOp)
- QString asString () const
- const KMSearchPattern & operator= (const KMSearchPattern &aPattern)
Detailed Description
This class is an abstraction of a search over messages. An abstraction of a search over messages.It is intended to be used inside a
- See also:
- KFilter (which adds
KFilterAction's), as well as in
KMSearch. It can read and write itself into a
KConfig group and there is a constructor, mainly used by
KMFilter to initialize from a preset KConfig-Group.
- See also:
- QPtrList of
KMSearchRule's that adds the boolean operators (see
Operator) 'and' and 'or' that connect the rules logically, and has a name under which it could be stored in the config file.
- See also:
- QPtrList with autoDelete enabled, it assumes that it is the central repository for the rules it contains. So if you want to reuse a rule in another pattern, make a deep copy of that rule.
- Author:
- Marc Mutz <Marc@Mutz.com>
Member Enumeration Documentation
|
Boolean operators that connect the return values of the individual rules.
A pattern with |
Constructor & Destructor Documentation
|
Constructor that initializes from a given.
|
|
Destructor. Deletes all stored rules! |
Member Function Documentation
|
The central function of this class. Tries to match the set of rules against a
|
|
Returns true if the pattern only depends the DwString that backs a message.
|
|
Removes all empty rules from the list. You should call this method whenever the user had had control of the rules outside of this class. (e.g. after editing it with
|
|
Reads a search pattern from a.
OpIgnore ) in config und converts them to the new format on
|
|
Writes itself into The group has to be preset. Tries to delete old-style keys by overwriting them with QString::null. Derived classes reimplementing writeConfig() should also call this method, or else the rules will not be stored. |
|
Get the name of the search pattern.
|
|
Set the name of the search pattern.
|
|
Get the filter operator.
|
|
Set the filter operator.
|
|
Returns the pattern as string. For debugging. |
|
Overloaded assignment operator. Makes a deep copy. |
The documentation for this class was generated from the following files:
- kmsearchpattern.h
- kmsearchpattern.cpp