KDE 4.9 PyKDE API Reference

- KDE's Python API

# ItemCopyJob Class Reference

`from PyKDE4.akonadi import *`

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

## Detailed Description

Job that copies a set of items to a target collection in the Akonadi storage.

The job can be used to copy one or several Item objects to another collection.

Example:

     Akonadi.Item.List items = ...
     Akonadi.Collection collection = ...

     Akonadi.ItemCopyJob *job = new Akonadi.ItemCopyJob( items, collection );
     connect( job, SIGNAL( result( KJob* ) ), SLOT( jobFinished( KJob* ) ) );

     ...

     MyClass.jobFinished( KJob *job )
     {
       if ( job->error() )
         qDebug() << "Error occurred";
       else
         qDebug() << "Items copied successfully";
     }

Author:
  Volker Krause <vkrause@kde.org>

## Methods

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

## Method Documentation

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

Creates a new item copy job.

Parameters:

  | item | The item to copy.
  | target | The target collection.
  | parent | The parent object.

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

Creates a new item copy job.

Parameters:

  | items | A list of items to copy.
  | target | The target collection.
  | parent | The parent object.

doStart | ( |  | self ) |