2 kopetecontacttaskbase.h - Base task for all contact tasks
4 Copyright (c) 2007 by Michaël Larouche <larouche@kde.org>
6 Kopete (c) 2002-2007 by the Kopete developers <kopete-devel@kde.org>
8 *************************************************************************
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. *
15 *************************************************************************
17 #ifndef KOPETE_CONTACTTASKBASE_H
18 #define KOPETE_CONTACTTASKBASE_H
20 #include <kopetetask.h>
21 #include <kopete_export.h>
28 * @brief Base tasks for all contact related tasks
30 * This class contains all the common code and data
31 * for all contact tasks.
33 * Derived must implement tastType() to allow setContact()
34 * to automatically add the correct subtask from the protocol.
36 * @author Michaël Larouche <larouche@kde.org>
38 class KOPETE_EXPORT ContactTaskBase
: public Kopete::Task
43 * @brief Default constructor
45 / You must set the contact with setContact()
47 explicit ContactTaskBase(QObject
*parent
= 0);
51 virtual ~ContactTaskBase();
54 * @brief Set the contact
56 * This method also add children tasks for
57 * the specific protocol. You don't need
60 void setContact(Kopete::Contact
*contact
);
64 * @brief Get access to Kopete::Contact
65 * @return a Kopete::Contact pointer.
67 Kopete::Contact
*contact();
70 * @brief Get the taskType
72 * This is the type of task from the devired class.
73 * Used by setContact()
75 virtual QString
taskType() const = 0;