• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdepimlibs-4.10.5 API Reference
  • KDE Home
  • Contact Us
 

akonadi

  • Akonadi
  • AgentInstanceCreateJob
Public Member Functions
Akonadi::AgentInstanceCreateJob Class Reference

#include <agentinstancecreatejob.h>

Inherits KJob.

List of all members.

Public Member Functions

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

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 vkrau.nosp@m.se@k.nosp@m.de.or.nosp@m.g

Definition at line 71 of file agentinstancecreatejob.h.


Constructor & Destructor Documentation

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

Creates a new agent instance create job.

Parameters:
typeThe type of the agent to create.
parentThe parent object.

Definition at line 146 of file agentinstancecreatejob.cpp.

AgentInstanceCreateJob::AgentInstanceCreateJob ( const QString &  typeId,
QObject *  parent = 0 
)
explicit

Creates a new agent instance create job.

Parameters:
typeIdThe identifier of type of the agent to create.
parentThe parent object.
Since:
4.5

Definition at line 153 of file agentinstancecreatejob.cpp.

AgentInstanceCreateJob::~AgentInstanceCreateJob ( )

Destroys the agent instance create job.

Definition at line 160 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:
parentThe parent window for the configuration dialog.

Definition at line 165 of file agentinstancecreatejob.cpp.

AgentInstance AgentInstanceCreateJob::instance ( ) const

Returns the AgentInstance object of the newly created agent instance.

Definition at line 171 of file agentinstancecreatejob.cpp.

void AgentInstanceCreateJob::start ( )

Starts the instance creation.

Definition at line 176 of file agentinstancecreatejob.cpp.


The documentation for this class was generated from the following files:
  • agentinstancecreatejob.h
  • agentinstancecreatejob.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2013 The KDE developers.
Generated on Tue Jul 16 2013 19:20:48 by doxygen 1.8.1.1 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

akonadi

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

kdepimlibs-4.10.5 API Reference

Skip menu "kdepimlibs-4.10.5 API Reference"
  • akonadi
  •   contact
  •   kmime
  •   socialutils
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmbox
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • microblog
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal