• 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
searchrulestring.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 SEARCHRULESTRING_H
19 #define SEARCHRULESTRING_H
20 
21 #include "searchpattern.h"
22 #include <Akonadi/Item>
23 
31 namespace MailCommon {
32 class SearchRuleString : public SearchRule
33 {
34 public:
42  explicit SearchRuleString( const QByteArray &field = QByteArray(),
43  Function function = FuncContains,
44  const QString &contents = QString() );
45 
49  SearchRuleString( const SearchRuleString &other );
50 
54  const SearchRuleString &operator=( const SearchRuleString &other );
55 
59  virtual ~SearchRuleString();
60 
64  virtual bool isEmpty() const ;
65 
69  virtual RequiredPart requiredPart() const;
70 
74  virtual bool matches( const Akonadi::Item &item ) const;
75 
80  bool matchesInternal( const QString &contents ) const;
81 
85  virtual void addQueryTerms( Akonadi::SearchTerm &groupTerm, bool &emptyIsNotAnError ) const;
86  virtual QString informationAboutNotValidRules() const;
87 };
88 }
89 #endif // SEARCHRULESTRING_H
MailCommon::SearchRuleString::matchesInternal
bool matchesInternal(const QString &contents) const
A helper method for the main matches() method.
Definition: searchrulestring.cpp:259
QByteArray
MailCommon::SearchRule::Function
Function
Describes operators for comparison of field and contents.
Definition: searchrule.h:55
MailCommon::SearchRuleString::isEmpty
virtual bool isEmpty() const
Determines whether the rule is worth considering.
Definition: searchrulestring.cpp:74
MailCommon::SearchRule::contents
QString contents() const
Returns the contents of the rule.
Definition: searchrule.cpp:511
MailCommon::SearchRuleString::informationAboutNotValidRules
virtual QString informationAboutNotValidRules() const
Definition: searchrulestring.cpp:252
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::SearchRuleString::requiredPart
virtual RequiredPart requiredPart() const
Returns the required part from the item that is needed for the search to operate. ...
Definition: searchrulestring.cpp:79
searchpattern.h
MailCommon::SearchRule
This class represents one search pattern rule.
Definition: searchrule.h:38
MailCommon::SearchRule::FuncContains
Definition: searchrule.h:57
MailCommon::SearchRuleString
Definition: searchrulestring.h:32
MailCommon::SearchRuleString::operator=
const SearchRuleString & operator=(const SearchRuleString &other)
Initializes this rule with an other rule.
Definition: searchrulestring.cpp:57
MailCommon::SearchRuleString::addQueryTerms
virtual void addQueryTerms(Akonadi::SearchTerm &groupTerm, bool &emptyIsNotAnError) const
Adds query terms to the given term group.
Definition: searchrulestring.cpp:199
MailCommon::SearchRuleString::matches
virtual bool matches(const Akonadi::Item &item) const
Tries to match the rule against the KMime::Message in the given item.
Definition: searchrulestring.cpp:110
MailCommon::SearchRuleString::SearchRuleString
SearchRuleString(const QByteArray &field=QByteArray(), Function function=FuncContains, const QString &contents=QString())
Creates new new string search rule.
Definition: searchrulestring.cpp:45
MailCommon::SearchRuleString::~SearchRuleString
virtual ~SearchRuleString()
Destroys the string search rule.
Definition: searchrulestring.cpp:70
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