• Skip to content
  • Skip to link menu
KDE 4.7 API Reference
  • KDE API Reference
  • KDE-PIM Libraries
  • KDE Home
  • Contact Us
 

akonadi

  • Akonadi
  • ContactGroupSearchJob
Public Types | Public Member Functions
Akonadi::ContactGroupSearchJob Class Reference

#include <contactgroupsearchjob.h>

Inheritance diagram for Akonadi::ContactGroupSearchJob:
Inheritance graph
[legend]

List of all members.

Public Types

enum  Criterion { Name }
enum  Match { ExactMatch, StartsWithMatch, ContainsMatch }

Public Member Functions

 ContactGroupSearchJob (QObject *parent=0)
 ~ContactGroupSearchJob ()
KABC::ContactGroup::List contactGroups () const
void setLimit (int limit)
void setQuery (Criterion criterion, const QString &value)
void setQuery (Criterion criterion, const QString &value, Match match)

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

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.

enum Akonadi::ContactGroupSearchJob::Match

Describes the type of pattern matching that shall be used.

Since:
4.5
Enumerator:
ExactMatch 

The result must match exactly the pattern (case sensitive).

StartsWithMatch 

The result must start with the pattern (case insensitive).

ContainsMatch 

The result must contain the pattern (case insensitive).

Definition at line 89 of file contactgroupsearchjob.h.


Constructor & Destructor Documentation

Akonadi::ContactGroupSearchJob::ContactGroupSearchJob ( QObject *  parent = 0) [explicit]

Creates a new contact group search job.

Parameters:
parentThe parent object.
Akonadi::ContactGroupSearchJob::~ContactGroupSearchJob ( )

Destroys the contact group search job.


Member Function Documentation

KABC::ContactGroup::List Akonadi::ContactGroupSearchJob::contactGroups ( ) const

Returns the contact groups that matched the search criteria.

void Akonadi::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
void Akonadi::ContactGroupSearchJob::setQuery ( Criterion  criterion,
const QString &  value 
)

Sets the criterion and value for the search.

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

Sets the criterion and value for the search with match.

Since:
4.5

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

akonadi

Skip menu "akonadi"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • Modules
  • Related Pages

KDE-PIM Libraries

Skip menu "KDE-PIM Libraries"
  • akonadi
  •   contact
  •   kmime
  • kabc
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmbox
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  •   richtextbuilders
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • microblog
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
Generated for KDE-PIM Libraries by doxygen 1.7.5
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