• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdenetwork API Reference
  • KDE Home
  • Contact Us
 

kopete/libkopete

  • Kopete
  • DeleteContactTask
Public Member Functions | Protected Slots | Protected Member Functions | List of all members
Kopete::DeleteContactTask Class Reference

#include <kopetedeletecontacttask.h>

Inheritance diagram for Kopete::DeleteContactTask:
Inheritance graph
[legend]

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:

Kopete::DeleteContactTask *deleteTask = new Kopete::DeleteContactTask(aContact);
deleteTask->addSubTask( new JabberDeleteContactTask(aContact) );
connect(deleteTask, SIGNAL(result(KJob*)), receiver, SLOT(slotResult(KJob*)));
deleteTask->start();

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".

Author
Michaƫl Larouche larou.nosp@m.che@.nosp@m.kde.o.nosp@m.rg

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.

Kopete::DeleteContactTask::DeleteContactTask ( Kopete::Contact *  contact)
explicit

Delete the given contact.

Parameters
contactKopete 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

void Kopete::DeleteContactTask::slotResult ( KJob *  subJob)
protectedvirtualslot

Execute the next sub job.

This slot is called when a subjob has finished.

Parameters
subJobsub job that has been finished.

Definition at line 80 of file kopetedeletecontacttask.cpp.

void Kopete::DeleteContactTask::start ( )
virtual

Begin the task.

Inherited from Kopete::Task::start()

Reimplemented from Kopete::Task.

Definition at line 52 of file kopetedeletecontacttask.cpp.

QString Kopete::DeleteContactTask::taskType ( ) const
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:
  • kopetedeletecontacttask.h
  • kopetedeletecontacttask.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:29:20 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kopete/libkopete

Skip menu "kopete/libkopete"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdenetwork API Reference

Skip menu "kdenetwork API Reference"
  • kget
  • kopete
  •   kopete
  •   libkopete
  • krdc
  • krfb

Search



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