• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdepim API Reference
  • KDE Home
  • Contact Us
 

mailcommon

  • sources
  • kde-4.14
  • kdepim
  • mailcommon
  • search
  • searchrule
searchruledate.h
Go to the documentation of this file.
1 /*
2  Copyright (c) 2015 Montel Laurent <montel@kde.org>
3 
4  This program is free software; you can redistribute it and/or modify it
5  under the terms of the GNU General Public License, version 2, as
6  published by the Free Software Foundation.
7 
8  This program is distributed in the hope that it will be useful, but
9  WITHOUT ANY WARRANTY; without even the implied warranty of
10  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11  General Public License for more details.
12 
13  You should have received a copy of the GNU General Public License along
14  with this program; if not, write to the Free Software Foundation, Inc.,
15  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16 */
17 
18 #ifndef SEARCHRULEDATE_H
19 #define SEARCHRULEDATE_H
20 
21 #include "searchpattern.h"
22 #include <Akonadi/Item>
23 namespace MailCommon {
24 
25 class SearchRuleDate : public SearchRule
26 {
27 public:
35  explicit SearchRuleDate( const QByteArray &field = QByteArray(),
36  Function function = FuncContains,
37  const QString &contents = QString() );
38 
42  virtual bool isEmpty() const ;
43 
47  virtual bool matches( const Akonadi::Item &item ) const;
48 
52  virtual RequiredPart requiredPart() const;
53 
54  // Optimized matching not implemented, will use the unoptimized matching
55  // from SearchRule
56  using SearchRule::matches;
57 
62  bool matchesInternal( const QDate& dateValue, const QDate& msgDate ) const;
63 
67  virtual void addQueryTerms( Akonadi::SearchTerm &groupTerm, bool &emptyIsNotAnError ) const;
68  virtual QString informationAboutNotValidRules() const;
69 
70 };
71 }
72 
73 #endif // SEARCHRULEDATE_H
MailCommon::SearchRuleDate::matches
virtual bool matches(const Akonadi::Item &item) const
Tries to match the rule against the KMime::Message in the given item.
Definition: searchruledate.cpp:49
QByteArray
MailCommon::SearchRuleDate::isEmpty
virtual bool isEmpty() const
Determines whether the rule is worth considering.
Definition: searchruledate.cpp:44
MailCommon::SearchRuleDate::SearchRuleDate
SearchRuleDate(const QByteArray &field=QByteArray(), Function function=FuncContains, const QString &contents=QString())
Creates new date search rule.
Definition: searchruledate.cpp:30
MailCommon::SearchRuleDate::matchesInternal
bool matchesInternal(const QDate &dateValue, const QDate &msgDate) const
A helper method for the main matches() method.
Definition: searchruledate.cpp:67
MailCommon::SearchRule::Function
Function
Describes operators for comparison of field and contents.
Definition: searchrule.h:55
MailCommon::SearchRule::matches
virtual bool matches(const Akonadi::Item &item) const =0
Tries to match the rule against the KMime::Message in the given item.
MailCommon::SearchRule::contents
QString contents() const
Returns the contents of the rule.
Definition: searchrule.cpp:511
QDate
MailCommon::SearchRuleDate::addQueryTerms
virtual void addQueryTerms(Akonadi::SearchTerm &groupTerm, bool &emptyIsNotAnError) const
Adds query terms to the given term group.
Definition: searchruledate.cpp:102
MailCommon::SearchRuleDate::requiredPart
virtual RequiredPart requiredPart() const
Returns the required part from the item that is needed for the search to operate. ...
Definition: searchruledate.cpp:95
MailCommon::SearchRule::RequiredPart
RequiredPart
Definition: searchrule.h:79
QString
MailCommon::SearchRule::field
QByteArray field() const
Returns the message header field name (without the trailing ':').
Definition: searchrule.cpp:501
MailCommon::SearchRuleDate::informationAboutNotValidRules
virtual QString informationAboutNotValidRules() const
Definition: searchruledate.cpp:38
searchpattern.h
MailCommon::SearchRule
This class represents one search pattern rule.
Definition: searchrule.h:38
MailCommon::SearchRule::FuncContains
Definition: searchrule.h:57
MailCommon::SearchRuleDate
Definition: searchruledate.h:25
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:31:41 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

mailcommon

Skip menu "mailcommon"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdepim API Reference

Skip menu "kdepim API Reference"
  • akonadi_next
  • akregator
  • blogilo
  • calendarsupport
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt2
  • kjots
  • kleopatra
  • kmail
  • knode
  • knotes
  • kontact
  • korgac
  • korganizer
  • ktimetracker
  • libkdepim
  • libkleo
  • libkpgp
  • mailcommon
  • messagelist
  • messageviewer
  • pimprint

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal