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

akonadi

  • Akonadi
  • AgentInstanceCreateJob
Public Member Functions | List of all members
Akonadi::AgentInstanceCreateJob Class Reference

#include <agentinstancecreatejob.h>

Inherits KJob.

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();
}
Akonadi::AgentInstanceCreateJob
Job for creating new agent instances.
Definition: agentinstancecreatejob.h:72
Akonadi::AgentInstanceCreateJob::start
void start()
Starts the instance creation.
Definition: agentinstancecreatejob.cpp:176
Akonadi::AgentInstanceCreateJob::configure
void configure(QWidget *parent=0)
Setup the job to show agent configuration dialog once the agent instance has been successfully starte...
Definition: agentinstancecreatejob.cpp:165
Akonadi::AgentInstanceCreateJob::instance
AgentInstance instance() const
Returns the AgentInstance object of the newly created agent instance.
Definition: agentinstancecreatejob.cpp:171
Akonadi::AgentInstance::identifier
QString identifier() const
Returns the unique identifier of the agent instance.
Definition: agentinstance.cpp:55
Akonadi::AgentManager::type
AgentType type(const QString &identifier) const
Returns the agent type with the given identifier or an invalid agent type if the identifier does not ...
Definition: agentmanager.cpp:391
Akonadi::AgentManager::self
static AgentManager * self()
Returns the global instance of the agent manager.
Definition: agentmanager.cpp:377
Akonadi::AgentType
A representation of an agent type.
Definition: agenttype.h:59
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() [1/2]

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() [2/2]

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::~AgentInstanceCreateJob ( )

Destroys the agent instance create job.

Definition at line 160 of file agentinstancecreatejob.cpp.

Member Function Documentation

◆ configure()

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.

◆ instance()

AgentInstance AgentInstanceCreateJob::instance ( ) const

Returns the AgentInstance object of the newly created agent instance.

Definition at line 171 of file agentinstancecreatejob.cpp.

◆ start()

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-2022 The KDE developers.
Generated on Thu Jul 21 2022 00:00:00 by doxygen 1.9.5 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.14.10 API Reference

Skip menu "kdepimlibs-4.14.10 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