class AgentInstanceCreateJob


Module akonadi
Namespace Akonadi
Class AgentInstanceCreateJob
Inherits KJob
Job for creating new agent instances.

This class encapsulates the procedure of creating a new agent instance and optionally configuring it immediately.

MyClass.MyClass( QWidget *parent ) : QWidget( parent ) { // Get agent type object Akonadi.AgentType type = Akonadi.AgentManager.type( "akonadi_vcard_resource" );

Akonadi.AgentInstanceCreateJob *job = new Akonadi.AgentInstanceCreateJob( type ); connect( job, SIGNAL( result( KJob * ) ), this, SLOT( slotCreated( KJob * ) ) );

// use this widget as parent for the config dialog job->configure( this );

job->start(); }

...

void MyClass.slotCreated( KJob *job ) { Akonadi.AgentInstanceCreateJob *createJob = static_cast( job );

qDebug() << "Created agent instance:" << createJob->instance().identifier(); }

Author Volker Krause



methods