KDE 4.7 PyKDE API Reference

- KDE's Python API

# CollectionCreateJob Class Reference

`from PyKDE4.akonadi import *`

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

## Detailed Description

Job that creates a new collection in the Akonadi storage.

This job creates a new collection with all the set properties. You have to use setParentCollection() to define the collection, the new collection shall be located in.

     // create a new top-level collection
     Akonadi.Collection collection;
     collection.setParentCollection( Collection.root() );
     collection.setName( "Events" );
     collection.setContentMimeTypes( QStringList( "text/calendar" ) );

     Akonadi.CollectionCreateJob *job = new Akonadi.CollectionCreateJob( collection );
     connect( job, SIGNAL( result( KJob* ) ), this, SLOT( createResult( KJob* ) ) );

Author:
  Volker Krause <vkrause@kde.org>

## Methods
| __init__ (self, Akonadi.Collection collection, QObject parent=0)
Akonadi.Collection | collection (self)
| doHandleResponse (self, QByteArray tag, QByteArray data)
| doStart (self)

## Method Documentation

__init__ | ( | self, |
|  | Akonadi.Collection | collection,
|  | QObject | parent=0
| ) |  |  |

Creates a new collection create job.

Parameters:

  | collection | The new collection. collection must have a parent collection set with a unique identifier. If a resource context is specified in the current session (that is you are using it within Akonadi.ResourceBase), the parent collection can be identified by its remote identifier as well.
  | parent | The parent object.

Akonadi.Collection collection | ( |  | self ) |

Returns the created collection if the job was executed succesfull.

doHandleResponse | ( | self, |
|  | QByteArray | tag,
|  | QByteArray | data
| ) |  |  |

doStart | ( |  | self ) |