akonadi
#include <contactsearchjob.h>

Public Types | |
enum | Criterion { Name, Email, NickName, NameOrEmail, ContactUid } |
enum | Match { ExactMatch, StartsWithMatch, ContainsMatch, ContainsWordBoundaryMatch } |
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) |
![]() | |
ItemSearchJob (const QString &query, QObject *parent=0) | |
~ItemSearchJob () | |
ItemFetchScope & | fetchScope () |
Item::List | items () const |
void | setFetchScope (const ItemFetchScope &fetchScope) |
void | setQuery (const QString &query) |
![]() | |
Job (QObject *parent=0) | |
virtual | ~Job () |
virtual QString | errorString () const |
void | start () |
Additional Inherited Members | |
![]() | |
void | itemsReceived (const Akonadi::Item::List &items) |
![]() | |
static QUrl | akonadiItemIdUri () |
![]() | |
virtual void | slotResult (KJob *job) |
![]() | |
virtual void | doHandleResponse (const QByteArray &tag, const QByteArray &data) |
void | doStart () |
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
Describes the criteria that can be searched for.
- Enumerator:
Definition at line 99 of file contactsearchjob.h.
Describes the type of pattern matching that shall be used.
- Since
- 4.5
- Enumerator:
Definition at line 113 of file contactsearchjob.h.
Constructor & Destructor Documentation
|
explicit |
Creates a new contact search job.
- Parameters
-
parent The parent object.
Definition at line 34 of file contactsearchjob.cpp.
ContactSearchJob::~ContactSearchJob | ( | ) |
Destroys the contact search job.
Definition at line 58 of file contactsearchjob.cpp.
Member Function Documentation
KABC::Addressee::List ContactSearchJob::contacts | ( | ) | const |
Returns the contacts that matched the search criteria.
Definition at line 622 of file contactsearchjob.cpp.
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 of Nepomuk during the search.
This needs to be called before calling setQuery() to have an effect. By default, the number of results is unlimited.
Definition at line 617 of file contactsearchjob.cpp.
void ContactSearchJob::setQuery | ( | Criterion | criterion, |
const QString & | value | ||
) |
Sets the criterion
and value
for the search.
- Note
- ExactMatch is used for the matching.
- Todo:
- Merge with the method below in KDE5
Definition at line 63 of file contactsearchjob.cpp.
Sets the criterion
and value
for the search with match
.
- Since
- 4.5
Definition at line 79 of file contactsearchjob.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2012 The KDE developers.
Generated on Mon Nov 26 2012 16:48:23 by doxygen 1.8.1.2 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.