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.

Constructor & Destructor Documentation

◆ Term() [1/3]

Term::Term ( const QString property)

The Item must contain the property property.

Definition at line 40 of file term.cpp.

◆ Term() [2/3]

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() [3/3]

Term::Term ( Term::Operation  op)

This term is a combination of other terms.

Definition at line 77 of file term.cpp.

Member Function Documentation

◆ property()

QString Term::property ( ) const

Return the property this term is targeting.

Definition at line 179 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.

◆ subTerm()

Term Term::subTerm ( ) const

Returns the first subTerm in the list of subTerms.

Definition at line 145 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-2023 The KDE developers.
Generated on Tue Sep 26 2023 04:08:51 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.