• Skip to content
  • Skip to link menu
KDE 4.4 API Reference
  • KDE API Reference
  • KDE-PIM Libraries
  • Sitemap
  • Contact Us
 

akonadi/contact

Akonadi::ContactGroupSearchJob

Akonadi::ContactGroupSearchJob Class Reference

Job that searches for contact groups in the Akonadi storage. More...

#include <contactgroupsearchjob.h>

Inherits ItemSearchJob.

List of all members.

Public Types

enum  Criterion { Name }

Public Member Functions

 ContactGroupSearchJob (QObject *parent=0)
 ~ContactGroupSearchJob ()
KABC::ContactGroup::List contactGroups () const
void setLimit (int limit)
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
 }
Author:
Tobias Koenig <tokoe@kde.org>
Since:
4.4

Definition at line 59 of file contactgroupsearchjob.h.


Member Enumeration Documentation

enum Akonadi::ContactGroupSearchJob::Criterion

Describes the criteria that can be searched for.

Enumerator:
Name 

The name of the contact group.

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 34 of file contactgroupsearchjob.cpp.

ContactGroupSearchJob::~ContactGroupSearchJob (  ) 

Destroys the contact group search job.

Definition at line 46 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 75 of file contactgroupsearchjob.cpp.

void ContactGroupSearchJob::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.

Since:
4.4.3

Definition at line 87 of file contactgroupsearchjob.cpp.

void ContactGroupSearchJob::setQuery ( Criterion  criterion,
const QString &  value 
)

Sets the criterion and value for the search.

Definition at line 51 of file contactgroupsearchjob.cpp.


The documentation for this class was generated from the following files:
  • contactgroupsearchjob.h
  • contactgroupsearchjob.cpp

akonadi/contact

Skip menu "akonadi/contact"
  • Main Page
  • Alphabetical List
  • Class List
  • File List
  • Class Members

KDE-PIM Libraries

Skip menu "KDE-PIM Libraries"
  • akonadi
  •   contact
  •   kmime
  • kabc
  • kblog
  • kcal
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  •   richtextbuilders
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • microblog
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
Generated for KDE-PIM Libraries by doxygen 1.6.1
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal