Akonadi::SearchTerm
#include <searchquery.h>
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 26 of file searchquery.h.
Member Enumeration Documentation
◆ Condition
enum Akonadi::SearchTerm::Condition |
Definition at line 34 of file searchquery.h.
◆ Relation
enum Akonadi::SearchTerm::Relation |
Definition at line 29 of file searchquery.h.
Constructor & Destructor Documentation
◆ SearchTerm() [1/3]
|
explicit |
Constructs a term where all subterms will be in given relation.
Definition at line 93 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 99 of file searchquery.cpp.
◆ SearchTerm() [3/3]
SearchTerm::SearchTerm | ( | const SearchTerm & | other | ) |
Definition at line 108 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 156 of file searchquery.cpp.
◆ condition()
|
nodiscard |
Returns relation between key and value.
Definition at line 141 of file searchquery.cpp.
◆ isNegated()
|
nodiscard |
Returns whether the entire term is negated.
Definition at line 151 of file searchquery.cpp.
◆ isNull()
|
nodiscard |
Definition at line 126 of file searchquery.cpp.
◆ key()
|
nodiscard |
Returns key of this end term.
Definition at line 131 of file searchquery.cpp.
◆ operator=()
SearchTerm & SearchTerm::operator= | ( | const SearchTerm & | other | ) |
Definition at line 115 of file searchquery.cpp.
◆ operator==()
|
nodiscard |
Definition at line 121 of file searchquery.cpp.
◆ relation()
|
nodiscard |
Returns relation in which all subterms are.
Definition at line 166 of file searchquery.cpp.
◆ setIsNegated()
void SearchTerm::setIsNegated | ( | bool | negated | ) |
Sets whether the entire term is negated.
Definition at line 146 of file searchquery.cpp.
◆ subTerms()
|
nodiscard |
Returns all subterms, or an empty list if this is an end term.
Definition at line 161 of file searchquery.cpp.
◆ value()
|
nodiscard |
Returns value of this end term.
Definition at line 136 of file searchquery.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:08:30 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.