KDE 4.9 PyKDE API Reference

- KDE's Python API

# TrashRestoreJob Class Reference

`from PyKDE4.akonadi import *`

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

## Detailed Description

Job that restores entites from trash

This job restores the given entites from trash. The EntityDeletedAttribute is removed and the item is restored to the stored restore collection.

If the stored restore collection is not available, the root collection of the original resource is used. If also this is not available, setTargetCollection has to be used to restore the item to a specific collection.

Example:

     const Akonadi.Item.List items = ...

     TrashRestoreJob *job = new TrashRestoreJob( items );
     connect( job, SIGNAL( result( KJob* ) ), this, SLOT( restoreResult( KJob* ) ) );

Author:
  Christian Mollekopf <chrigi_1@fastmail.fm>

Since:
  4.8

## Methods
| __init__ (self, Akonadi.Item item, QObject parent=0)
| __init__ (self, [Akonadi.Item] items, QObject parent=0)
| __init__ (self, Akonadi.Collection collection, QObject parent=0)
| doStart (self)
[Akonadi.Item] | items (self)
| setTargetCollection (self, Akonadi.Collection collection)

## Method Documentation

__init__ | ( | self, |
|  | Akonadi.Item | item,
|  | QObject | parent=0
| ) |  |  |

All items need to be from the same resource

__init__ | ( | self, |
|  | [Akonadi.Item] | items,
|  | QObject | parent=0
| ) |  |  |

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

doStart | ( |  | self ) |

[Akonadi.Item] items | ( |  | self ) |

setTargetCollection | ( | self, |
|  | Akonadi.Collection | collection
| ) |  |  |

Sets the target collection, where the item is moved to. If not set the item will be restored in the collection saved in the EntityDeletedAttribute.