Diffstat (limited to 'noncore/unsupported/mailit/addresslist.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/unsupported/mailit/addresslist.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/noncore/unsupported/mailit/addresslist.h b/noncore/unsupported/mailit/addresslist.h index e87d6f1..99cef9a 100644 --- a/noncore/unsupported/mailit/addresslist.h +++ b/noncore/unsupported/mailit/addresslist.h | |||
@@ -13,47 +13,46 @@ | |||
13 | ** | 13 | ** |
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
15 | ** | 15 | ** |
16 | ** Contact info@trolltech.com if any conditions of this licensing are | 16 | ** Contact info@trolltech.com if any conditions of this licensing are |
17 | ** not clear to you. | 17 | ** not clear to you. |
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | #ifndef ADDRESSLIST_H | 20 | #ifndef ADDRESSLIST_H |
21 | #define ADDRESSLIST_H | 21 | #define ADDRESSLIST_H |
22 | 22 | ||
23 | #include <qobject.h> | 23 | #include <qobject.h> |
24 | #include <qlist.h> | 24 | #include <qlist.h> |
25 | 25 | ||
26 | struct Contact | 26 | struct Contact |
27 | { | 27 | { |
28 | QString email; | 28 | QString email; |
29 | QString name; | 29 | QString name; |
30 | }; | 30 | }; |
31 | 31 | ||
32 | class AddressList : public QObject | 32 | class AddressList : public QObject |
33 | { | 33 | { |
34 | Q_OBJECT | 34 | Q_OBJECT |
35 | 35 | ||
36 | public: | 36 | public: |
37 | AddressList(QString file); | 37 | AddressList(); |
38 | ~AddressList(); | 38 | ~AddressList(); |
39 | void addContact(QString email, QString name); | 39 | void addContact(QString email, QString name); |
40 | bool containsEmail(QString email); | 40 | bool containsEmail(QString email); |
41 | bool containsName(QString name); | 41 | bool containsName(QString name); |
42 | QString getNameByEmail(QString email); | 42 | QString getNameByEmail(QString email); |
43 | QString getEmailByName(QString name); | 43 | QString getEmailByName(QString name); |
44 | QList<Contact>* getContactList(); | 44 | QList<Contact>* getContactList(); |
45 | void write(); | ||
46 | 45 | ||
47 | private: | 46 | private: |
48 | int getEmailRef(QString email); | 47 | int getEmailRef(QString email); |
49 | int getNameRef(QString name); | 48 | int getNameRef(QString name); |
50 | QString getRightString(QString in); | 49 | QString getRightString(QString in); |
51 | void read(); | 50 | void read(); |
52 | 51 | ||
53 | private: | 52 | private: |
54 | QList<Contact> addresses; | 53 | QList<Contact> addresses; |
55 | QString filename; | 54 | QString filename; |
56 | bool dirty; | 55 | bool dirty; |
57 | }; | 56 | }; |
58 | 57 | ||
59 | #endif | 58 | #endif |