Changeset View
Changeset View
Standalone View
Standalone View
src/persondata.h
Show All 16 Lines | 1 | /* | |||
---|---|---|---|---|---|
17 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | 17 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | ||
18 | */ | 18 | */ | ||
19 | 19 | | |||
20 | #ifndef PERSONDATA_H | 20 | #ifndef PERSONDATA_H | ||
21 | #define PERSONDATA_H | 21 | #define PERSONDATA_H | ||
22 | 22 | | |||
23 | #include <kpeople/kpeople_export.h> | 23 | #include <kpeople/kpeople_export.h> | ||
24 | 24 | | |||
25 | #include <QMetaType> | ||||
25 | #include <QObject> | 26 | #include <QObject> | ||
26 | #include <QPixmap> | 27 | #include <QPixmap> | ||
27 | 28 | | |||
29 | #include <KContacts/PhoneNumber> | ||||
30 | | ||||
28 | #include "global.h" | 31 | #include "global.h" | ||
29 | 32 | | |||
30 | namespace KPeople | 33 | namespace KPeople | ||
31 | { | 34 | { | ||
32 | class PersonDataPrivate; | 35 | class PersonDataPrivate; | ||
33 | 36 | | |||
34 | class PersonData; | 37 | class PersonData; | ||
35 | 38 | | |||
▲ Show 20 Lines • Show All 73 Lines • ▼ Show 20 Line(s) | 56 | public: | |||
109 | QUrl pictureUrl() const; | 112 | QUrl pictureUrl() const; | ||
110 | 113 | | |||
111 | /** Returns all groups the person is in. */ | 114 | /** Returns all groups the person is in. */ | ||
112 | QStringList groups() const; | 115 | QStringList groups() const; | ||
113 | 116 | | |||
114 | /** Returns all e-mail addresses from the person. */ | 117 | /** Returns all e-mail addresses from the person. */ | ||
115 | QStringList allEmails() const; | 118 | QStringList allEmails() const; | ||
116 | 119 | | |||
117 | // struct PhoneNumber { | 120 | /** Returns an arbritrary phone number of the contact */ | ||
118 | // QString name; | 121 | KContacts::PhoneNumber phoneNumber() const; | ||
119 | // QString number; | 122 | | ||
120 | // }; | 123 | /** Returns an arbritrary phone number of the contact */ | ||
apol: wrong comment | |||||
121 | // QVector<PhoneNumber> phoneNumbers() const { createPhoneNumbers(customProperty("phoneNumbers")); }; | 124 | KContacts::PhoneNumber::List allPhoneNumbers() const; | ||
122 | 125 | | |||
123 | Q_SIGNALS: | 126 | Q_SIGNALS: | ||
124 | /** | 127 | /** | ||
125 | * One of the contact sources has changed | 128 | * One of the contact sources has changed | ||
126 | */ | 129 | */ | ||
127 | void dataChanged(); | 130 | void dataChanged(); | ||
128 | 131 | | |||
129 | private Q_SLOTS: | 132 | private Q_SLOTS: | ||
130 | void onContactChanged(); | 133 | void onContactChanged(); | ||
131 | 134 | | |||
132 | private: | 135 | private: | ||
133 | Q_DISABLE_COPY(PersonData) | 136 | Q_DISABLE_COPY(PersonData) | ||
134 | Q_DECLARE_PRIVATE(PersonData) | 137 | Q_DECLARE_PRIVATE(PersonData) | ||
135 | PersonDataPrivate *d_ptr; | 138 | PersonDataPrivate *d_ptr; | ||
136 | }; | 139 | }; | ||
137 | } | 140 | } | ||
138 | 141 | | |||
142 | // This probably will not be needed in the future since it should already be handled | ||||
143 | // by newer (> 19.04) versions of KContacts | ||||
144 | Q_DECLARE_METATYPE(KContacts::PhoneNumber) | ||||
145 | | ||||
139 | #endif // PERSONDATA_H | 146 | #endif // PERSONDATA_H |
wrong comment