akonadi
#include <searchquery.h>
Public Types | |
enum | Condition { CondEqual, CondGreaterThan, CondGreaterOrEqual, CondLessThan, CondLessOrEqual, CondContains } |
enum | Relation { RelAnd, RelOr } |
Public Member Functions | |
SearchTerm (SearchTerm::Relation relation=SearchTerm::RelAnd) | |
SearchTerm (const QString &key, const QVariant &value, SearchTerm::Condition condition=SearchTerm::CondEqual) | |
SearchTerm (const SearchTerm &other) | |
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.
Constructor & Destructor Documentation
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::SearchTerm | ( | const QString & | key, |
const QVariant & | value, | ||
SearchTerm::Condition | condition = SearchTerm::CondEqual |
||
) |
Constructs an end term.
Definition at line 145 of file searchquery.cpp.
Member Function Documentation
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.
SearchTerm::Condition SearchTerm::condition | ( | ) | const |
Returns relation between key and value.
Definition at line 189 of file searchquery.cpp.
bool SearchTerm::isNegated | ( | ) | const |
Returns whether the entire term is negated.
Definition at line 199 of file searchquery.cpp.
QString SearchTerm::key | ( | ) | const |
Returns key of this end term.
Definition at line 179 of file searchquery.cpp.
SearchTerm::Relation SearchTerm::relation | ( | ) | const |
Returns relation in which all subterms are.
Definition at line 214 of file searchquery.cpp.
void SearchTerm::setIsNegated | ( | bool | negated | ) |
Sets whether the entire term is negated.
Definition at line 194 of file searchquery.cpp.
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.
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:
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:38:05 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.