Akonadi::Search::Term

Search for usage in LXR

#include <term.h>

Public Types

enum  Comparator : uint8_t {
  Auto , Equal , Contains , Greater ,
  GreaterEqual , Less , LessEqual
}
 
enum  Operation : uint8_t { 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 : uint8_t

Definition at line 29 of file term.h.

◆ Operation

enum Akonadi::Search::Term::Operation : uint8_t

Definition at line 39 of file term.h.

Constructor & Destructor Documentation

◆ Term() [1/8]

Term::Term ( )

Definition at line 31 of file term.cpp.

◆ Term() [2/8]

Term::Term ( const Term & t)

Definition at line 36 of file term.cpp.

◆ Term() [3/8]

Term::Term ( const QString & property)

The Item must contain the property property.

Definition at line 41 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 47 of file term.cpp.

◆ Term() [5/8]

Term::Term ( Term::Operation op)

This term is a combination of other terms.

Definition at line 78 of file term.cpp.

◆ Term() [6/8]

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

Definition at line 84 of file term.cpp.

◆ Term() [7/8]

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

Definition at line 91 of file term.cpp.

◆ Term() [8/8]

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

Definition at line 98 of file term.cpp.

Member Function Documentation

◆ addSubTerm()

void Term::addSubTerm ( const Term & term)

Definition at line 136 of file term.cpp.

◆ comparator()

Term::Comparator Term::comparator ( ) const
nodiscard

Definition at line 200 of file term.cpp.

◆ empty()

bool Term::empty ( ) const
nodiscard

Definition at line 170 of file term.cpp.

◆ fromVariantMap()

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

Definition at line 297 of file term.cpp.

◆ isEmpty()

bool Term::isEmpty ( ) const
nodiscard

Definition at line 175 of file term.cpp.

◆ isNegated()

bool Term::isNegated ( ) const
nodiscard

Definition at line 126 of file term.cpp.

◆ isValid()

bool Term::isValid ( ) const
nodiscard

Definition at line 108 of file term.cpp.

◆ negated()

bool Term::negated ( ) const
nodiscard

Definition at line 131 of file term.cpp.

◆ operation()

Term::Operation Term::operation ( ) const
nodiscard

Definition at line 165 of file term.cpp.

◆ operator=()

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

Definition at line 389 of file term.cpp.

◆ operator==()

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

Definition at line 365 of file term.cpp.

◆ property()

QString Term::property ( ) const
nodiscard

Return the property this term is targeting.

Definition at line 180 of file term.cpp.

◆ setComparator()

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

Definition at line 205 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 121 of file term.cpp.

◆ setOperation()

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

Definition at line 160 of file term.cpp.

◆ setProperty()

void Term::setProperty ( const QString & property)

Definition at line 185 of file term.cpp.

◆ setSubTerms()

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

Definition at line 141 of file term.cpp.

◆ setUserData()

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

Definition at line 210 of file term.cpp.

◆ setValue()

void Term::setValue ( const QVariant & value)

Definition at line 190 of file term.cpp.

◆ subTerm()

Term Term::subTerm ( ) const
nodiscard

Returns the first subTerm in the list of subTerms.

Definition at line 146 of file term.cpp.

◆ subTerms()

QList< Term > Term::subTerms ( ) const
nodiscard

Definition at line 155 of file term.cpp.

◆ toVariantMap()

QVariantMap Term::toVariantMap ( ) const
nodiscard

Definition at line 220 of file term.cpp.

◆ userData()

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

Definition at line 215 of file term.cpp.

◆ value()

QVariant Term::value ( ) const
nodiscard

Definition at line 195 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 Fri Nov 22 2024 12:10:12 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.