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

kopete/libkopete

  • sources
  • kde-4.14
  • kdenetwork
  • kopete
  • libkopete
  • tasks
kopetecontacttaskbase.cpp
Go to the documentation of this file.
1 /*
2  kopetecontacttaskbase.cpp - Base task for all contact tasks
3 
4  Copyright (c) 2007 by MichaĆ«l Larouche <larouche@kde.org>
5 
6  Kopete (c) 2002-2007 by the Kopete developers <kopete-devel@kde.org>
7 
8  *************************************************************************
9  * *
10  * This library is free software; you can redistribute it and/or *
11  * modify it under the terms of the GNU Lesser General Public *
12  * License as published by the Free Software Foundation; either *
13  * version 2 of the License, or (at your option) any later version. *
14  * *
15  *************************************************************************
16 */
17 #include "kopetecontacttaskbase.h"
18 
19 // Qt includes
20 #include <QtCore/QPointer>
21 
22 // KDE includes
23 #include <kdebug.h>
24 
25 // Kopete includes
26 #include <kopetecontact.h>
27 #include <kopeteprotocol.h>
28 
29 namespace Kopete
30 {
31 
32 class ContactTaskBase::Private
33 {
34 public:
35  QPointer<Kopete::Contact> contact;
36 };
37 
38 ContactTaskBase::ContactTaskBase(QObject *parent)
39  : Kopete::Task(parent), d(new Private)
40 {
41 }
42 
43 ContactTaskBase::~ContactTaskBase()
44 {
45  delete d;
46 }
47 
48 void ContactTaskBase::setContact(Kopete::Contact *contact)
49 {
50  d->contact = contact;
51 
52  // Add the children tasks for DeleteContactTask from the rptocol
53  KJob *subTask = d->contact->protocol()->createProtocolTask( taskType() );
54  if( subTask )
55  {
56  kDebug(14010) << "Adding protocol subtask for " << taskType();
57  addSubTask(subTask);
58  }
59 }
60 
61 Kopete::Contact *ContactTaskBase::contact()
62 {
63  return d->contact;
64 }
65 
66 } // end namespace Kopete
67 
68 #include "kopetecontacttaskbase.moc"
QPointer< Kopete::Contact >
Kopete::ContactTaskBase::~ContactTaskBase
virtual ~ContactTaskBase()
destructor
Definition: kopetecontacttaskbase.cpp:43
kopetecontacttaskbase.h
QObject
kopeteprotocol.h
Kopete::ContactTaskBase::contact
Kopete::Contact * contact()
Get access to Kopete::Contact.
Definition: kopetecontacttaskbase.cpp:61
Kopete::Contact
Definition: kopetecontact.h:58
Kopete::Task
Base class for all Kopete task.
Definition: kopetetask.h:49
Kopete::ContactTaskBase::setContact
void setContact(Kopete::Contact *contact)
Set the contact.
Definition: kopetecontacttaskbase.cpp:48
Kopete::ContactTaskBase::taskType
virtual QString taskType() const =0
Get the taskType.
Kopete::Task::addSubTask
void addSubTask(KJob *task)
Add a new sub task.
Definition: kopetetask.cpp:41
Kopete::ContactTaskBase::ContactTaskBase
ContactTaskBase(QObject *parent=0)
Default constructor.
Definition: kopetecontacttaskbase.cpp:38
KJob
kopetecontact.h
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:29:19 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