akonadi
#include <contactsearchjob.h>

Public Types | |
enum | Criterion { Name , Email , NickName , NameOrEmail , ContactUid } |
enum | Match { ExactMatch , StartsWithMatch , ContainsMatch , ContainsWordBoundaryMatch } |
![]() | |
enum | Error { ConnectionFailed = UserDefinedError , ProtocolVersionMismatch , UserCanceled , Unknown , UserError = UserDefinedError + 42 } |
typedef QList< Job * > | List |
Public Member Functions | |
ContactSearchJob (QObject *parent=0) | |
~ContactSearchJob () | |
KABC::Addressee::List | contacts () const |
void | setLimit (int limit) |
void | setQuery (Criterion criterion, const QString &value) |
void | setQuery (Criterion criterion, const QString &value, Match match) |
![]() | |
AKONADI_DEPRECATED | ItemSearchJob (const QString &query, QObject *parent=0) |
ItemSearchJob (const SearchQuery &query, QObject *parent=0) | |
~ItemSearchJob () | |
ItemFetchScope & | fetchScope () |
bool | isRecursive () const |
bool | isRemoteSearchEnabled () const |
Item::List | items () const |
QStringList | mimeTypes () const |
Collection::List | searchCollections () const |
void | setFetchScope (const ItemFetchScope &fetchScope) |
void | setMimeTypes (const QStringList &mimeTypes) |
void AKONADI_DEPRECATED | setQuery (const QString &query) |
void | setQuery (const SearchQuery &query) |
void | setRecursive (bool recursive) |
void | setRemoteSearchEnabled (bool enabled) |
void | setSearchCollections (const Collection::List &collections) |
![]() | |
Job (QObject *parent=0) | |
virtual | ~Job () |
virtual QString | errorString () const |
void | start () |
Additional Inherited Members | |
![]() | |
void | itemsReceived (const Akonadi::Item::List &items) |
![]() | |
void | aboutToStart (Akonadi::Job *job) |
void | writeFinished (Akonadi::Job *job) |
![]() | |
static AKONADI_DEPRECATED QUrl | akonadiItemIdUri () |
![]() | |
virtual void | slotResult (KJob *job) |
![]() | |
virtual void | doHandleResponse (const QByteArray &tag, const QByteArray &data) |
void | doStart () |
![]() | |
virtual bool | addSubjob (KJob *job) |
virtual bool | doKill () |
void | emitWriteFinished () |
virtual bool | removeSubjob (KJob *job) |
Detailed Description
Job that searches for contacts in the Akonadi storage.
This job searches for contacts that match given search criteria and returns the list of contacts.
Examples:
- Since
- 4.4
Definition at line 79 of file contactsearchjob.h.
Member Enumeration Documentation
◆ Criterion
Describes the criteria that can be searched for.
Definition at line 99 of file contactsearchjob.h.
◆ Match
Describes the type of pattern matching that shall be used.
- Since
- 4.5
Definition at line 112 of file contactsearchjob.h.
Constructor & Destructor Documentation
◆ ContactSearchJob()
|
explicit |
Creates a new contact search job.
- Parameters
-
parent The parent object.
Definition at line 35 of file contactsearchjob.cpp.
◆ ~ContactSearchJob()
ContactSearchJob::~ContactSearchJob | ( | ) |
Destroys the contact search job.
Definition at line 49 of file contactsearchjob.cpp.
Member Function Documentation
◆ contacts()
KABC::Addressee::List ContactSearchJob::contacts | ( | ) | const |
Returns the contacts that matched the search criteria.
Definition at line 99 of file contactsearchjob.cpp.
◆ setLimit()
void ContactSearchJob::setLimit | ( | int | limit | ) |
Sets a limit
on how many results will be returned by this search job.
This is useful in situation where for example only the first search result is needed anyway, setting a limit of 1 here will greatly reduce the resource usage during the search. This needs to be called before calling setQuery() to have an effect. By default, the number of results is unlimited.
- Parameters
-
limit the upper limit for number of search results
Definition at line 94 of file contactsearchjob.cpp.
◆ setQuery() [1/2]
void ContactSearchJob::setQuery | ( | Criterion | criterion, |
const QString & | value ) |
Sets the criterion
and value
for the search.
- Parameters
-
criterion the query criterion to compare with value the value to match against
- Note
- ExactMatch is used for the matching.
- Todo
- Merge with the method below in KDE5
Definition at line 54 of file contactsearchjob.cpp.
◆ setQuery() [2/2]
Sets the criterion
and value
for the search with match
.
- Parameters
-
criterion the query criterion to compare with value the value to match against match how to match the given value
- Since
- 4.5
Definition at line 72 of file contactsearchjob.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.