Akonadi.SpecialCollectionsRequestJob

KDE 4.5 PyKDE API Reference

- KDE's Python API

# SpecialCollectionsRequestJob Class Reference

`from PyKDE4.akonadi import *`

Inherits: Akonadi.TransactionSequence → Akonadi.Job → KCompositeJob → KJob → QObject
Subclasses: Akonadi.SpecialMailCollectionsRequestJob
Namespace: Akonadi

## Detailed Description

A job to request SpecialCollections.

Use this job to request the SpecialCollections you need. You can request both default SpecialCollections and SpecialCollections in a given resource. The default SpecialCollections resource is created when the first default SpecialCollection is requested, but if a SpecialCollection in a custom resource is requested, this job expects that resource to exist already.

If the folders you requested already exist, this job simply succeeds. Otherwise, it creates the required collections and registers them with SpecialCollections.

This class is not meant to be used directly but as a base class for type specific special collection request jobs.

Author:
  Constantin Berzan <exit3219@gmail.com>

Since:
  4.4

## Methods
| __init__ (self, Akonadi.SpecialCollections collections, QObject parent=0)
Akonadi.Collection | collection (self)
| doStart (self)
| requestCollection (self, QByteArray type, Akonadi.AgentInstance instance)
| requestDefaultCollection (self, QByteArray type)
| setDefaultResourceOptions (self, {QString:QVariant} options)
| setDefaultResourceType (self, QString type)
| setIconForTypeMap (self, {QByteArray:QString} map)
| setNameForTypeMap (self, {QByteArray:QString} map)
| setTypes (self, [QByteArray] types)
| slotResult (self, KJob job)

## Method Documentation

__init__ | ( | self, |
|  | Akonadi.SpecialCollections | collections,
|  | QObject | parent=0
| ) |  |  |

Creates a new special collections request job.

Parameters:

  | collections | The SpecialCollections object that shall be used.
  | parent | The parent object.

Akonadi.Collection collection | ( |  | self ) |

Returns the requested collection.

doStart | ( |  | self ) |

requestCollection | ( | self, |
|  | QByteArray | type,
|  | Akonadi.AgentInstance | instance
| ) |  |  |

Requests a special collection of the given type in the given resource instance.

requestDefaultCollection | ( | self, |
|  | QByteArray | type
| ) |  |  |

Requests a special collection of the given type in the default resource.

setDefaultResourceOptions | ( | self, |
|  | {QString:QVariant} | options
| ) |  |  |

Sets the configuration options that shall be applied to the new resource that is created if the requested special collection does not exist yet.

setDefaultResourceType | ( | self, |
|  | QString | type
| ) |  |  |

Sets the type of the resource that shall be created if the requested special collection does not exist yet.

setIconForTypeMap | ( | self, |
|  | {QByteArray:QString} | map
| ) |  |  |

Sets the map of special collection types to icon names.

setNameForTypeMap | ( | self, |
|  | {QByteArray:QString} | map
| ) |  |  |

Sets the map of special collection types to display names.

setTypes | ( | self, |
|  | [QByteArray] | types
| ) |  |  |

Sets the list of well known special collection types.

slotResult | ( | self, |
|  | KJob | job
| ) |  |  |