akonadi
#include <searchquery.h>
Public Member Functions | |
SearchQuery (const SearchQuery &other) | |
SearchQuery (SearchTerm::Relation rel=SearchTerm::RelAnd) | |
void | addTerm (const QString &key, const QVariant &value, SearchTerm::Condition condition=SearchTerm::CondEqual) |
void | addTerm (const SearchTerm &term) |
bool | isNull () const |
int | limit () const |
SearchQuery & | operator= (const SearchQuery &other) |
bool | operator== (const SearchQuery &other) const |
void | setLimit (int limit) |
void | setTerm (const SearchTerm &term) |
SearchTerm | term () const |
QByteArray | toJSON () const |
Static Public Member Functions | |
static SearchQuery | fromJSON (const QByteArray &json) |
Detailed Description
A query that can be passed to ItemSearchJob or others.
- Since
- 4.13
Definition at line 128 of file searchquery.h.
Constructor & Destructor Documentation
◆ SearchQuery() [1/2]
SearchQuery::SearchQuery | ( | SearchTerm::Relation | rel = SearchTerm::RelAnd | ) |
Constructs query where all added terms will be in given relation.
Definition at line 219 of file searchquery.cpp.
◆ ~SearchQuery()
SearchQuery::~SearchQuery | ( | ) |
Definition at line 230 of file searchquery.cpp.
◆ SearchQuery() [2/2]
SearchQuery::SearchQuery | ( | const SearchQuery & | other | ) |
Definition at line 225 of file searchquery.cpp.
Member Function Documentation
◆ addTerm() [1/2]
void SearchQuery::addTerm | ( | const QString & | key, |
const QVariant & | value, | ||
SearchTerm::Condition | condition = SearchTerm::CondEqual ) |
Adds a new term.
Definition at line 255 of file searchquery.cpp.
◆ addTerm() [2/2]
void SearchQuery::addTerm | ( | const SearchTerm & | term | ) |
Adds a new term with subterms.
Definition at line 260 of file searchquery.cpp.
◆ fromJSON()
|
static |
Definition at line 289 of file searchquery.cpp.
◆ isNull()
bool SearchQuery::isNull | ( | ) | const |
Definition at line 245 of file searchquery.cpp.
◆ limit()
int SearchQuery::limit | ( | ) | const |
Returns the maximum number of results.
The default value is -1, indicating no limit.
Definition at line 275 of file searchquery.cpp.
◆ operator=()
SearchQuery & SearchQuery::operator= | ( | const SearchQuery & | other | ) |
Definition at line 234 of file searchquery.cpp.
◆ operator==()
bool SearchQuery::operator== | ( | const SearchQuery & | other | ) | const |
Definition at line 240 of file searchquery.cpp.
◆ setLimit()
void SearchQuery::setLimit | ( | int | limit | ) |
Sets the maximum number of results.
Note that this limit is only evaluated per search backend, so the total number of results retrieved may be larger.
Definition at line 270 of file searchquery.cpp.
◆ setTerm()
void SearchQuery::setTerm | ( | const SearchTerm & | term | ) |
Sets the root term.
Definition at line 265 of file searchquery.cpp.
◆ term()
SearchTerm SearchQuery::term | ( | ) | const |
Returns the root term.
Definition at line 250 of file searchquery.cpp.
◆ toJSON()
QByteArray SearchQuery::toJSON | ( | ) | const |
Definition at line 280 of file searchquery.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2024 The KDE developers.
Generated on Wed Jan 24 2024 00:00:00 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.