Akonadi::Search::Term

Search for usage in LXR

#include <term.h>

Public Types

enum  Comparator {
  Auto , Equal , Contains , Greater ,
  GreaterEqual , Less , LessEqual
}
 
enum  Operation { None , And , Or }
 

Public Member Functions

 Term (const QString &property)
 
 Term (const QString &property, const QVariant &value, Comparator c=Auto)
 
 Term (const Term &lhs, Operation op, const Term &rhs)
 
 Term (const Term &t)
 
 Term (Operation op)
 
 Term (Operation op, const QList< Term > &t)
 
 Term (Operation op, const Term &t)
 
void addSubTerm (const Term &term)
 
Comparator comparator () const
 
bool empty () const
 
bool isEmpty () const
 
bool isNegated () const
 
bool isValid () const
 
bool negated () const
 
Operation operation () const
 
Termoperator= (const Term &rhs)
 
bool operator== (const Term &rhs) const
 
QString property () const
 
void setComparator (Comparator c)
 
void setNegation (bool isNegated)
 
void setOperation (Operation op)
 
void setProperty (const QString &property)
 
void setSubTerms (const QList< Term > &terms)
 
void setUserData (const QString &name, const QVariant &value)
 
void setValue (const QVariant &value)
 
Term subTerm () const
 
QList< TermsubTerms () const
 
QVariantMap toVariantMap () const
 
QVariant userData (const QString &name) const
 
QVariant value () const
 

Static Public Member Functions

static Term fromVariantMap (const QVariantMap &map)
 

Detailed Description

Search term.

Definition at line 26 of file term.h.

Member Enumeration Documentation

◆ Comparator

enum Akonadi::Search::Term::Comparator

Definition at line 29 of file term.h.

◆ Operation

enum Akonadi::Search::Term::Operation

Definition at line 31 of file term.h.

Constructor & Destructor Documentation

◆ Term() [1/8]

Term::Term ( )

Definition at line 30 of file term.cpp.

◆ Term() [2/8]

Term::Term ( const Term & t)

Definition at line 35 of file term.cpp.

◆ Term() [3/8]

Term::Term ( const QString & property)

The Item must contain the property property.

Definition at line 40 of file term.cpp.

◆ Term() [4/8]

Term::Term ( const QString & property,
const QVariant & value,
Term::Comparator c = Auto )

The Item must contain the property property with value \value.

The default comparator is Auto which has the following behavior For Strings - Contains For DateTime - Contains For any other type - Equals

Definition at line 46 of file term.cpp.

◆ Term() [5/8]

Term::Term ( Term::Operation op)

This term is a combination of other terms.

Definition at line 77 of file term.cpp.

◆ Term() [6/8]

Term::Term ( Term::Operation op,
const Term & t )

Definition at line 83 of file term.cpp.

◆ Term() [7/8]

Term::Term ( Term::Operation op,
const QList< Term > & t )

Definition at line 90 of file term.cpp.

◆ Term() [8/8]

Term::Term ( const Term & lhs,
Term::Operation op,
const Term & rhs )

Definition at line 97 of file term.cpp.

Member Function Documentation

◆ addSubTerm()

void Term::addSubTerm ( const Term & term)

Definition at line 135 of file term.cpp.

◆ comparator()

Term::Comparator Term::comparator ( ) const

Definition at line 199 of file term.cpp.

◆ empty()

bool Term::empty ( ) const

Definition at line 169 of file term.cpp.

◆ fromVariantMap()

Term Term::fromVariantMap ( const QVariantMap & map)
static

Definition at line 296 of file term.cpp.

◆ isEmpty()

bool Term::isEmpty ( ) const

Definition at line 174 of file term.cpp.

◆ isNegated()

bool Term::isNegated ( ) const

Definition at line 125 of file term.cpp.

◆ isValid()

bool Term::isValid ( ) const

Definition at line 107 of file term.cpp.

◆ negated()

bool Term::negated ( ) const

Definition at line 130 of file term.cpp.

◆ operation()

Term::Operation Term::operation ( ) const

Definition at line 164 of file term.cpp.

◆ operator=()

Term & Term::operator= ( const Term & rhs)

Definition at line 388 of file term.cpp.

◆ operator==()

bool Term::operator== ( const Term & rhs) const

Definition at line 364 of file term.cpp.

◆ property()

QString Term::property ( ) const

Return the property this term is targeting.

Definition at line 179 of file term.cpp.

◆ setComparator()

void Term::setComparator ( Term::Comparator c)

Definition at line 204 of file term.cpp.

◆ setNegation()

void Term::setNegation ( bool isNegated)

Negate this term.

Negation only applies for Equal or Contains For other Comparators you must invert it yourself

Definition at line 120 of file term.cpp.

◆ setOperation()

void Term::setOperation ( Term::Operation op)

Definition at line 159 of file term.cpp.

◆ setProperty()

void Term::setProperty ( const QString & property)

Definition at line 184 of file term.cpp.

◆ setSubTerms()

void Term::setSubTerms ( const QList< Term > & terms)

Definition at line 140 of file term.cpp.

◆ setUserData()

void Term::setUserData ( const QString & name,
const QVariant & value )

Definition at line 209 of file term.cpp.

◆ setValue()

void Term::setValue ( const QVariant & value)

Definition at line 189 of file term.cpp.

◆ subTerm()

Term Term::subTerm ( ) const

Returns the first subTerm in the list of subTerms.

Definition at line 145 of file term.cpp.

◆ subTerms()

QList< Term > Term::subTerms ( ) const

Definition at line 154 of file term.cpp.

◆ toVariantMap()

QVariantMap Term::toVariantMap ( ) const

Definition at line 219 of file term.cpp.

◆ userData()

QVariant Term::userData ( const QString & name) const

Definition at line 214 of file term.cpp.

◆ value()

QVariant Term::value ( ) const

Definition at line 194 of file term.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:15:27 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.