• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • KDE-PIM Libraries
  • Sitemap
  • Contact Us
 

akonadi

Akonadi::AgentInstanceCreateJob

Akonadi::AgentInstanceCreateJob Class Reference

#include <agentinstancecreatejob.h>

Inherits KJob.

List of all members.


Detailed Description

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::self()->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<Akonadi::AgentInstanceCreateJob*>( job );

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

Author:
Volker Krause <vkrause@kde.org>

Definition at line 70 of file agentinstancecreatejob.h.


Public Member Functions

 AgentInstanceCreateJob (const AgentType &type, QObject *parent=0)
void configure (QWidget *parent=0)
AgentInstance instance () const
void start ()
 ~AgentInstanceCreateJob ()

Constructor & Destructor Documentation

AgentInstanceCreateJob::AgentInstanceCreateJob ( const AgentType &  type,
QObject *  parent = 0 
) [explicit]

Create a new agent instance creation job.

Parameters:
type The type of the agent to create.
parent The parent object.

Definition at line 94 of file agentinstancecreatejob.cpp.

AgentInstanceCreateJob::~AgentInstanceCreateJob (  ) 

Destroys the agent instance creation job.

Definition at line 106 of file agentinstancecreatejob.cpp.


Member Function Documentation

void AgentInstanceCreateJob::configure ( QWidget *  parent = 0  ) 

Setup the job to show agent configuration dialog once the agent instance has been successfully started.

Parameters:
parent The parent window for the configuration dialog.

Definition at line 111 of file agentinstancecreatejob.cpp.

AgentInstance AgentInstanceCreateJob::instance (  )  const

Returns the AgentInstance object of the newly created agent instance.

Definition at line 117 of file agentinstancecreatejob.cpp.

void AgentInstanceCreateJob::start (  ) 

Starts the instance creation.

Definition at line 122 of file agentinstancecreatejob.cpp.


The documentation for this class was generated from the following files:
  • agentinstancecreatejob.h
  • agentinstancecreatejob.cpp

akonadi

Skip menu "akonadi"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

KDE-PIM Libraries

Skip menu "KDE-PIM Libraries"
  • akonadi
  • kabc
  • kblog
  • kcal
  • kimap
  • kioslave
  •   imap4
  •   mbox
  • kldap
  • kmime
  • kpimidentities
  •   richtextbuilders
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
Generated for KDE-PIM Libraries by doxygen 1.5.6
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal