• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdepimlibs-4.8.3 API Reference
  • KDE Home
  • Contact Us
 

akonadi

  • Akonadi
  • SearchCreateJob
Public Member Functions | Protected Member Functions
Akonadi::SearchCreateJob Class Reference

#include <searchcreatejob.h>

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

List of all members.

Public Member Functions

 SearchCreateJob (const QString &name, const QString &query, QObject *parent=0)
 ~SearchCreateJob ()
Collection createdCollection () const
void setQueryLanguage (const QString &queryLanguage)

Protected Member Functions

void doHandleResponse (const QByteArray &tag, const QByteArray &data)
void doStart ()

Detailed Description

Job that creates a virtual/search collection in the Akonadi storage.

This job creates so called virtual or search collections, which don't contain real data, but references to items that match a given search query.

 const QString name = "My search folder";
 const QString query = "...";

 Akonadi::SearchCreateJob *job = new Akonadi::SearchCreateJob( name, query );
 connect( job, SIGNAL( result( KJob* ) ), SLOT( jobFinished( KJob* ) ) );

 MyClass::jobFinished( KJob *job )
 {
   if ( job->error() ) {
     qDebug() << "Error occurred";
     return;
   }

   qDebug() << "Created search folder successfully";
   const Collection searchCollection = job->createdCollection();
   ...
 }
Author:
Volker Krause vkrau.nosp@m.se@k.nosp@m.de.or.nosp@m.g

Definition at line 60 of file searchcreatejob.h.


Constructor & Destructor Documentation

SearchCreateJob::SearchCreateJob ( const QString &  name,
const QString &  query,
QObject *  parent = 0 
)

Creates a search create job.

Parameters:
nameThe name of the search collection.
queryThe search query (format not defined yet).
parentThe parent object.

Definition at line 45 of file searchcreatejob.cpp.

SearchCreateJob::~SearchCreateJob ( )

Destroys the search create job.

Definition at line 54 of file searchcreatejob.cpp.


Member Function Documentation

Akonadi::Collection SearchCreateJob::createdCollection ( ) const

Returns the newly created search collection once the job finished successfully.

Returns an invalid collection if the job has not yet finished or failed.

Since:
4.4

Definition at line 81 of file searchcreatejob.cpp.

void SearchCreateJob::doHandleResponse ( const QByteArray &  tag,
const QByteArray &  data 
) [protected, virtual]

Reimplemented from Akonadi::Job.

Reimplemented from Akonadi::Job.

Definition at line 87 of file searchcreatejob.cpp.

void SearchCreateJob::doStart ( ) [protected, virtual]

Reimplemented from Akonadi::Job.

Implements Akonadi::Job.

Definition at line 64 of file searchcreatejob.cpp.

void SearchCreateJob::setQueryLanguage ( const QString &  queryLanguage)

Sets the query language.

Parameters:
queryLanguageThe query language used.
Since:
4.6

Definition at line 58 of file searchcreatejob.cpp.


The documentation for this class was generated from the following files:
  • searchcreatejob.h
  • searchcreatejob.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2012 The KDE developers.
Generated on Thu May 10 2012 22:18:42 by doxygen 1.8.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

akonadi

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

kdepimlibs-4.8.3 API Reference

Skip menu "kdepimlibs-4.8.3 API Reference"
  • akonadi
  •   contact
  •   kmime
  • kabc
  • kalarmcal
  • 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
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal