• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdepimlibs-4.14.10 API Reference
  • KDE Home
  • Contact Us
 

akonadi

  • Akonadi
  • SearchTerm
Public Types | Public Member Functions | List of all members
Akonadi::SearchTerm Class Reference

#include <searchquery.h>

Inheritance diagram for Akonadi::SearchTerm:
Akonadi::ContactSearchTerm Akonadi::EmailSearchTerm

Public Types

enum  Condition {
  CondEqual , CondGreaterThan , CondGreaterOrEqual , CondLessThan ,
  CondLessOrEqual , CondContains
}
 
enum  Relation { RelAnd , RelOr }
 

Public Member Functions

 SearchTerm (const QString &key, const QVariant &value, SearchTerm::Condition condition=SearchTerm::CondEqual)
 
 SearchTerm (const SearchTerm &other)
 
 SearchTerm (SearchTerm::Relation relation=SearchTerm::RelAnd)
 
void addSubTerm (const SearchTerm &term)
 
SearchTerm::Condition condition () const
 
bool isNegated () const
 
bool isNull () const
 
QString key () const
 
SearchTerm & operator= (const SearchTerm &other)
 
bool operator== (const SearchTerm &other) const
 
SearchTerm::Relation relation () const
 
void setIsNegated (bool negated)
 
QList< SearchTerm > subTerms () const
 
QVariant value () const
 

Detailed Description

Search term represents the actual condition within query.

SearchTerm can either have multiple subterms, or can be so-called endterm, when there are no more subterms, but instead the actual condition is specified, that is have key, value and relation between them.

Since
4.13

Definition at line 39 of file searchquery.h.

Member Enumeration Documentation

◆ Condition

enum Akonadi::SearchTerm::Condition

Definition at line 47 of file searchquery.h.

◆ Relation

enum Akonadi::SearchTerm::Relation

Definition at line 42 of file searchquery.h.

Constructor & Destructor Documentation

◆ SearchTerm() [1/3]

SearchTerm::SearchTerm ( SearchTerm::Relation relation = SearchTerm::RelAnd)

Constructs a term where all subterms will be in given relation.

Definition at line 139 of file searchquery.cpp.

◆ SearchTerm() [2/3]

SearchTerm::SearchTerm ( const QString & key,
const QVariant & value,
SearchTerm::Condition condition = SearchTerm::CondEqual )

Constructs an end term.

Definition at line 145 of file searchquery.cpp.

◆ SearchTerm() [3/3]

SearchTerm::SearchTerm ( const SearchTerm & other)

Definition at line 154 of file searchquery.cpp.

◆ ~SearchTerm()

SearchTerm::~SearchTerm ( )

Definition at line 159 of file searchquery.cpp.

Member Function Documentation

◆ addSubTerm()

void SearchTerm::addSubTerm ( const SearchTerm & term)

Adds a new subterm to this term.

Subterms will be in relation as specified in SearchTerm constructor.

If there are subterms in a term, key, value and condition are ignored.

Definition at line 204 of file searchquery.cpp.

◆ condition()

SearchTerm::Condition SearchTerm::condition ( ) const

Returns relation between key and value.

Definition at line 189 of file searchquery.cpp.

◆ isNegated()

bool SearchTerm::isNegated ( ) const

Returns whether the entire term is negated.

Definition at line 199 of file searchquery.cpp.

◆ isNull()

bool SearchTerm::isNull ( ) const

Definition at line 174 of file searchquery.cpp.

◆ key()

QString SearchTerm::key ( ) const

Returns key of this end term.

Definition at line 179 of file searchquery.cpp.

◆ operator=()

SearchTerm & SearchTerm::operator= ( const SearchTerm & other)

Definition at line 163 of file searchquery.cpp.

◆ operator==()

bool SearchTerm::operator== ( const SearchTerm & other) const

Definition at line 169 of file searchquery.cpp.

◆ relation()

SearchTerm::Relation SearchTerm::relation ( ) const

Returns relation in which all subterms are.

Definition at line 214 of file searchquery.cpp.

◆ setIsNegated()

void SearchTerm::setIsNegated ( bool negated)

Sets whether the entire term is negated.

Definition at line 194 of file searchquery.cpp.

◆ subTerms()

QList< SearchTerm > SearchTerm::subTerms ( ) const

Returns all subterms, or an empty list if this is an end term.

Definition at line 209 of file searchquery.cpp.

◆ value()

QVariant SearchTerm::value ( ) const

Returns value of this end term.

Definition at line 184 of file searchquery.cpp.


The documentation for this class was generated from the following files:
  • searchquery.h
  • searchquery.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Wed Jan 24 2024 00:00:00 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

akonadi

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

kdepimlibs-4.14.10 API Reference

Skip menu "kdepimlibs-4.14.10 API Reference"
  • akonadi
  •   contact
  •   kmime
  •   socialutils
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmbox
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • microblog
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
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