Akonadi::SearchQuery

Search for usage in LXR

#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
 
SearchQueryoperator= (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 116 of file searchquery.h.

Constructor & Destructor Documentation

◆ SearchQuery() [1/2]

SearchQuery::SearchQuery ( SearchTerm::Relation rel = SearchTerm::RelAnd)
explicit

Constructs query where all added terms will be in given relation.

Definition at line 171 of file searchquery.cpp.

◆ ~SearchQuery()

SearchQuery::~SearchQuery ( )

Definition at line 182 of file searchquery.cpp.

◆ SearchQuery() [2/2]

SearchQuery::SearchQuery ( const SearchQuery & other)

Definition at line 177 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 207 of file searchquery.cpp.

◆ addTerm() [2/2]

void SearchQuery::addTerm ( const SearchTerm & term)

Adds a new term with subterms.

Definition at line 212 of file searchquery.cpp.

◆ fromJSON()

SearchQuery SearchQuery::fromJSON ( const QByteArray & json)
static

Definition at line 246 of file searchquery.cpp.

◆ isNull()

bool SearchQuery::isNull ( ) const

Definition at line 197 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 227 of file searchquery.cpp.

◆ operator=()

SearchQuery & SearchQuery::operator= ( const SearchQuery & other)

Definition at line 186 of file searchquery.cpp.

◆ operator==()

bool SearchQuery::operator== ( const SearchQuery & other) const

Definition at line 192 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 222 of file searchquery.cpp.

◆ setTerm()

void SearchQuery::setTerm ( const SearchTerm & term)

Sets the root term.

Definition at line 217 of file searchquery.cpp.

◆ term()

SearchTerm SearchQuery::term ( ) const

Returns the root term.

Definition at line 202 of file searchquery.cpp.

◆ toJSON()

QByteArray SearchQuery::toJSON ( ) const

Definition at line 232 of file searchquery.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 Mon Nov 4 2024 16:31:59 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.