3.0
Last change
on this file since 71:415b45c71663 was
71:415b45c71663,
checked in by Sämy Zehnder <saemy.zehnder@…>, 12 years ago
|
- Reorganized all the libraries. libinterfaces and libgateways are removed now and libdatatypes contains now all these files.
|
File size:
1.3 KB
|
Line | |
---|
1 | /* |
---|
2 | * BCGroup.h |
---|
3 | * |
---|
4 | * Created on: Jun 20, 2009 |
---|
5 | * Author: saemy |
---|
6 | */ |
---|
7 | |
---|
8 | #ifndef SGROUP_H_ |
---|
9 | #define SGROUP_H_ |
---|
10 | |
---|
11 | #include <QObject> |
---|
12 | #include <QMap> |
---|
13 | |
---|
14 | #include "igroup.h" |
---|
15 | |
---|
16 | class SGroup: public QObject, public IGroup { |
---|
17 | Q_OBJECT |
---|
18 | Q_INTERFACES(IGroup) |
---|
19 | |
---|
20 | public: |
---|
21 | SGroup(); |
---|
22 | |
---|
23 | virtual int id() const; |
---|
24 | virtual QString name() const; |
---|
25 | virtual QImage image() const; |
---|
26 | virtual QSet<IContact*> contacts() const; |
---|
27 | |
---|
28 | virtual void setId(int id); |
---|
29 | virtual void setName(const QString& name); |
---|
30 | virtual void setImage(const QImage& image); |
---|
31 | // virtual void setContacts(const QSet<int>& contactIds); |
---|
32 | virtual void setContacts(const QSet<IContact*>& contacts); |
---|
33 | |
---|
34 | virtual void addContact(IContact* contact); |
---|
35 | virtual void removeContact(int contactId); |
---|
36 | virtual void removeContact(IContact* contact); |
---|
37 | |
---|
38 | virtual SGroupEventMapper* eventMapper() const; |
---|
39 | |
---|
40 | protected: |
---|
41 | virtual IGroupEvents* groupEvents() const; |
---|
42 | |
---|
43 | protected slots: |
---|
44 | void contactIdChanged(int oldId, int newId); |
---|
45 | |
---|
46 | private: |
---|
47 | SGroupEventMapper* eventMapper_; |
---|
48 | |
---|
49 | int id_; |
---|
50 | QString name_; |
---|
51 | QMap<int, IContact*> contactList_; |
---|
52 | QImage image_; |
---|
53 | |
---|
54 | void addContactToList(IContact* contact); |
---|
55 | void removeContactFromList(IContact* contact); |
---|
56 | }; |
---|
57 | |
---|
58 | #endif /* SGROUP_H_ */ |
---|
Note: See
TracBrowser
for help on using the repository browser.