kopete/libkopete
#include <kopetedeletecontacttask.h>
Public Member Functions | |
DeleteContactTask (QObject *parent=0) | |
DeleteContactTask (Kopete::Contact *contact) | |
~DeleteContactTask () | |
virtual void | start () |
Public Member Functions inherited from Kopete::ContactTaskBase | |
ContactTaskBase (QObject *parent=0) | |
virtual | ~ContactTaskBase () |
void | setContact (Kopete::Contact *contact) |
Public Member Functions inherited from Kopete::Task | |
Task (QObject *parent=0) | |
virtual | ~Task () |
void | addSubTask (KJob *task) |
Protected Slots | |
virtual void | slotResult (KJob *subJob) |
Protected Member Functions | |
QString | taskType () const |
Protected Member Functions inherited from Kopete::ContactTaskBase | |
Kopete::Contact * | contact () |
Additional Inherited Members | |
Public Types inherited from Kopete::Task | |
enum | KopeteTaskError { NoProtocolSubTaskError = KJob::UserDefinedError+1, NetworkUnavailableError } |
Detailed Description
Delete a contact in Kopete.
Example code:
Implementing protocol subtask for deleting
It is a good idea to inherit from DeleteContactTask. In your implementation of start() method, please DO NOT call parent start() method from DeleteContactTask.
DeleteContactTask will delete the contact after the subjob, so you don't need to explicit call deleteLater() on contact.
Also, you don't need to check if the network(or account if you prefer) is available, DeleteContactTask do it for you.
The name of this task is "DeleteContactTask".
Definition at line 52 of file kopetedeletecontacttask.h.
Constructor & Destructor Documentation
Kopete::DeleteContactTask::DeleteContactTask | ( | QObject * | parent = 0 | ) |
Default constructor.
You must set the contact to delete with setContact()
Definition at line 36 of file kopetedeletecontacttask.cpp.
|
explicit |
Delete the given contact.
- Parameters
-
contact Kopete contact to delete
Definition at line 41 of file kopetedeletecontacttask.cpp.
Kopete::DeleteContactTask::~DeleteContactTask | ( | ) |
Destructor
Definition at line 47 of file kopetedeletecontacttask.cpp.
Member Function Documentation
|
protectedvirtualslot |
Execute the next sub job.
This slot is called when a subjob has finished.
- Parameters
-
subJob sub job that has been finished.
Definition at line 80 of file kopetedeletecontacttask.cpp.
|
virtual |
Begin the task.
Inherited from Kopete::Task::start()
Reimplemented from Kopete::Task.
Definition at line 52 of file kopetedeletecontacttask.cpp.
|
protectedvirtual |
Return Task Type.
- Returns
- DeleteContactTask
Implements Kopete::ContactTaskBase.
Definition at line 94 of file kopetedeletecontacttask.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:53:52 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.