KMSearchRuleNumerical Class Reference
This class represents a search to be performed against a numerical value, such as the age of the message in days or its size. This class represents a search pattern rule operating on numerical values. More...
#include <kmsearchpattern.h>
Inheritance diagram for KMSearchRuleNumerical:

Public Methods | |
KMSearchRuleNumerical (const QCString &field=0, Function function=FuncContains, const QString &contents=QString::null) | |
virtual bool | isEmpty () const |
virtual bool | matches (const KMMessage *msg) const |
bool | matchesInternal (unsigned long numericalValue, unsigned long numericalMsgContents, const QString &msgContents) const |
Detailed Description
This class represents a search to be performed against a numerical value, such as the age of the message in days or its size. This class represents a search pattern rule operating on numerical values.
Definition at line 188 of file kmsearchpattern.h.
Member Function Documentation
|
Determine whether the rule is worth considering. It isn't if either the field is not set or the contents is empty. KFilter should make sure that it's rule list contains only non-empty rules, as matches doesn't check this. Implements KMSearchRule. Definition at line 346 of file kmsearchpattern.cpp. References KMSearchRule::contents(), and QString::toInt(). |
|
Tries to match the rule against the given KMMessage.
Implements KMSearchRule. Definition at line 355 of file kmsearchpattern.cpp. References KMSearchRule::contents(), QDateTime::currentDateTime(), QDateTime::daysTo(), KMSearchRule::field(), matchesInternal(), QString::setNum(), QDateTime::setTime_t(), and QString::toInt(). |
|
Helper for the main matches() method. Does the actual comparing. Definition at line 376 of file kmsearchpattern.cpp. References KMSearchRule::contents(), QString::find(), KMSearchRule::function(), and QRegExp::search(). Referenced by matches(). |
The documentation for this class was generated from the following files: