libqutim  0.3.1.0
metacontact.h
Go to the documentation of this file.
1 /****************************************************************************
2 **
3 ** qutIM - instant messenger
4 **
5 ** Copyright © 2011 Ruslan Nigmatullin <euroelessar@yandex.ru>
6 **
7 *****************************************************************************
8 **
9 ** $QUTIM_BEGIN_LICENSE$
10 ** This program is free software: you can redistribute it and/or modify
11 ** it under the terms of the GNU General Public License as published by
12 ** the Free Software Foundation, either version 3 of the License, or
13 ** (at your option) any later version.
14 **
15 ** This program is distributed in the hope that it will be useful,
16 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
17 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 ** See the GNU General Public License for more details.
19 **
20 ** You should have received a copy of the GNU General Public License
21 ** along with this program. If not, see http://www.gnu.org/licenses/.
22 ** $QUTIM_END_LICENSE$
23 **
24 ****************************************************************************/
25 
26 #ifndef METACONTACT_H
27 #define METACONTACT_H
28 
29 #include "contact.h"
30 
31 namespace qutim_sdk_0_3
32 {
33 class MetaContactPrivate;
34 
36 {
37  Q_OBJECT
38  Q_DECLARE_PRIVATE(MetaContact)
39 public:
40  MetaContact();
41  virtual ~MetaContact();
42 
43  virtual bool isInList() const;
44  virtual void setInList(bool inList);
45 
46  virtual void addContact(Contact *contact);
47  virtual void removeContact(Contact *contact);
48 
49  virtual ChatUnitList lowerUnits();
50  // virtual const ChatUnit *getHistoryUnit() const;
51 signals:
52  void contactAdded(qutim_sdk_0_3::Contact *);
53  void contactRemoved(qutim_sdk_0_3::Contact *);
54 };
55 
57 {
58 public:
59  MetaContactChangeEvent(Contact *contact, MetaContact *oldMetaContact, MetaContact *newMetaContact);
61  static QEvent::Type eventType();
62  Contact *contact() const { return c; }
63  MetaContact *oldMetaContact() const { return om; }
64  MetaContact *newMetaContact() const { return nm; }
65 private:
66  Contact *c;
67  MetaContact *om;
68  MetaContact *nm;
69 };
70 }
71 
72 #endif // METACONTACT_H
73 

Generated by Doxygen