akonadi/contact
Akonadi::ContactGroupSearchJob Class Reference
Job that searches for contact groups in the Akonadi storage. More...
#include <contactgroupsearchjob.h>
Inherits ItemSearchJob.
Public Types | |
enum | Criterion { Name } |
Public Member Functions | |
ContactGroupSearchJob (QObject *parent=0) | |
~ContactGroupSearchJob () | |
KABC::ContactGroup::List | contactGroups () const |
void | setQuery (Criterion criterion, const QString &value) |
Detailed Description
Job that searches for contact groups in the Akonadi storage.
This job searches for contact groups that match given search criteria and returns the list of contact groups.
Akonadi::ContactGroupSearchJob *job = new Akonadi::ContactGroupSearchJob(); job->setQuery( Akonadi::ContactGroupSearchJob::Name, "Family Members" ); connect( job, SIGNAL( result( KJob* ) ), this, SLOT( searchResult( KJob* ) ) ); ... MyClass::searchResult( KJob *job ) { Akonadi::ContactGroupSearchJob *searchJob = qobject_cast<Akonadi::ContactGroupSearchJob*>( job ); const KABC::ContactGroup::List contactGroups = searchJob->contactGroups(); // do something with the contact groups }
- Since:
- 4.4
Definition at line 59 of file contactgroupsearchjob.h.
Member Enumeration Documentation
Describes the criteria that can be searched for.
Definition at line 79 of file contactgroupsearchjob.h.
Constructor & Destructor Documentation
ContactGroupSearchJob::ContactGroupSearchJob | ( | QObject * | parent = 0 |
) | [explicit] |
Creates a new contact group search job.
- Parameters:
-
parent The parent object.
Definition at line 28 of file contactgroupsearchjob.cpp.
ContactGroupSearchJob::~ContactGroupSearchJob | ( | ) |
Destroys the contact group search job.
Definition at line 39 of file contactgroupsearchjob.cpp.
Member Function Documentation
KABC::ContactGroup::List ContactGroupSearchJob::contactGroups | ( | ) | const |
Returns the contact groups that matched the search criteria.
Definition at line 60 of file contactgroupsearchjob.cpp.
void ContactGroupSearchJob::setQuery | ( | Criterion | criterion, | |
const QString & | value | |||
) |
Sets the criterion
and value
for the search.
Definition at line 43 of file contactgroupsearchjob.cpp.
The documentation for this class was generated from the following files: