KDE 4.5 PyKDE API Reference
  • KDE's Python API
  • Overview
  • PyKDE Home
  • Sitemap
  • Contact Us
 

SearchCreateJob Class Reference

from PyKDE4.akonadi import *

Inherits: Akonadi.Job → KCompositeJob → KJob → QObject
Namespace: Akonadi

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 <vkrause@kde.org>


Methods

 __init__ (self, QString name, QString query, QObject parent=0)
Akonadi.Collection createdCollection (self)
 doHandleResponse (self, QByteArray tag, QByteArray data)
 doStart (self)

Method Documentation

__init__ (  self,
QString  name,
QString  query,
QObject  parent=0
)

Creates a search create job.

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

Akonadi.Collection createdCollection (   self )

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

doHandleResponse (  self,
QByteArray  tag,
QByteArray  data
)

Reimplemented from Akonadi.Job

doStart (   self )

Reimplemented from Akonadi.Job

  • Full Index

Modules

  • akonadi
  • dnssd
  • kdecore
  • kdeui
  • khtml
  • kio
  • knewstuff
  • kparts
  • kutils
  • nepomuk
  • phonon
  • plasma
  • polkitqt
  • solid
  • soprano
This documentation is maintained by Simon Edwards.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal