author | zautrix <zautrix> | 2004-10-08 23:38:07 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-10-08 23:38:07 (UTC) |
commit | 07fdef2c2ea1153d39d7114b3d5bd4abc4f4c861 (patch) (unidiff) | |
tree | 03d0e5d20e607e035e17fcdabd6bce789069f41e /kabc/addressee.h | |
parent | 44169895703beb3e8b1551a313d2d341bf742905 (diff) | |
download | kdepimpi-07fdef2c2ea1153d39d7114b3d5bd4abc4f4c861.zip kdepimpi-07fdef2c2ea1153d39d7114b3d5bd4abc4f4c861.tar.gz kdepimpi-07fdef2c2ea1153d39d7114b3d5bd4abc4f4c861.tar.bz2 |
some bugfixes
-rw-r--r-- | kabc/addressee.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/kabc/addressee.h b/kabc/addressee.h index 4cafa86..44f0629 100644 --- a/kabc/addressee.h +++ b/kabc/addressee.h | |||
@@ -1,847 +1,848 @@ | |||
1 | /*** Warning! This file has been generated by the script makeaddressee ***/ | 1 | /*** Warning! This file has been generated by the script makeaddressee ***/ |
2 | /* | 2 | /* |
3 | This file is part of libkabc. | 3 | This file is part of libkabc. |
4 | Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org> | 4 | Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org> |
5 | 5 | ||
6 | This library is free software; you can redistribute it and/or | 6 | This library is free software; you can redistribute it and/or |
7 | modify it under the terms of the GNU Library General Public | 7 | modify it under the terms of the GNU Library General Public |
8 | License as published by the Free Software Foundation; either | 8 | License as published by the Free Software Foundation; either |
9 | version 2 of the License, or (at your option) any later version. | 9 | version 2 of the License, or (at your option) any later version. |
10 | 10 | ||
11 | This library is distributed in the hope that it will be useful, | 11 | This library is distributed in the hope that it will be useful, |
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
14 | Library General Public License for more details. | 14 | Library General Public License for more details. |
15 | 15 | ||
16 | You should have received a copy of the GNU Library General Public License | 16 | You should have received a copy of the GNU Library General Public License |
17 | along with this library; see the file COPYING.LIB. If not, write to | 17 | along with this library; see the file COPYING.LIB. If not, write to |
18 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | 18 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
19 | Boston, MA 02111-1307, USA. | 19 | Boston, MA 02111-1307, USA. |
20 | */ | 20 | */ |
21 | 21 | ||
22 | /* | 22 | /* |
23 | Enhanced Version of the file for platform independent KDE tools. | 23 | Enhanced Version of the file for platform independent KDE tools. |
24 | Copyright (c) 2004 Ulf Schenk | 24 | Copyright (c) 2004 Ulf Schenk |
25 | 25 | ||
26 | $Id$ | 26 | $Id$ |
27 | */ | 27 | */ |
28 | 28 | ||
29 | #ifndef KABC_ADDRESSEE_H | 29 | #ifndef KABC_ADDRESSEE_H |
30 | #define KABC_ADDRESSEE_H | 30 | #define KABC_ADDRESSEE_H |
31 | 31 | ||
32 | #include <qdatetime.h> | 32 | #include <qdatetime.h> |
33 | #include <qstring.h> | 33 | #include <qstring.h> |
34 | #include <qstringlist.h> | 34 | #include <qstringlist.h> |
35 | #include <qvaluelist.h> | 35 | #include <qvaluelist.h> |
36 | 36 | ||
37 | #include <ksharedptr.h> | 37 | #include <ksharedptr.h> |
38 | #include <kurl.h> | 38 | #include <kurl.h> |
39 | 39 | ||
40 | #include "address.h" | 40 | #include "address.h" |
41 | #include "agent.h" | 41 | #include "agent.h" |
42 | #include "geo.h" | 42 | #include "geo.h" |
43 | #include "key.h" | 43 | #include "key.h" |
44 | #include "phonenumber.h" | 44 | #include "phonenumber.h" |
45 | #include "picture.h" | 45 | #include "picture.h" |
46 | #include "secrecy.h" | 46 | #include "secrecy.h" |
47 | #include "sound.h" | 47 | #include "sound.h" |
48 | #include "timezone.h" | 48 | #include "timezone.h" |
49 | 49 | ||
50 | namespace KABC { | 50 | namespace KABC { |
51 | 51 | ||
52 | class Resource; | 52 | class Resource; |
53 | 53 | ||
54 | /** | 54 | /** |
55 | @short address book entry | 55 | @short address book entry |
56 | 56 | ||
57 | This class represents an entry in the address book. | 57 | This class represents an entry in the address book. |
58 | 58 | ||
59 | The data of this class is implicitly shared. You can pass this class by value. | 59 | The data of this class is implicitly shared. You can pass this class by value. |
60 | 60 | ||
61 | If you need the name of a field for presenting it to the user you should use | 61 | If you need the name of a field for presenting it to the user you should use |
62 | the functions ending in Label(). They return a translated string which can be | 62 | the functions ending in Label(). They return a translated string which can be |
63 | used as label for the corresponding field. | 63 | used as label for the corresponding field. |
64 | 64 | ||
65 | About the name fields: | 65 | About the name fields: |
66 | 66 | ||
67 | givenName() is the first name and familyName() the last name. In some | 67 | givenName() is the first name and familyName() the last name. In some |
68 | countries the family name comes first, that's the reason for the | 68 | countries the family name comes first, that's the reason for the |
69 | naming. formattedName() is the full name with the correct formatting. | 69 | naming. formattedName() is the full name with the correct formatting. |
70 | It is used as an override, when the correct formatting can't be generated | 70 | It is used as an override, when the correct formatting can't be generated |
71 | from the other name fields automatically. | 71 | from the other name fields automatically. |
72 | 72 | ||
73 | realName() returns a fully formatted name(). It uses formattedName, if set, | 73 | realName() returns a fully formatted name(). It uses formattedName, if set, |
74 | otherwise it constucts the name from the name fields. As fallback, if | 74 | otherwise it constucts the name from the name fields. As fallback, if |
75 | nothing else is set it uses name(). | 75 | nothing else is set it uses name(). |
76 | 76 | ||
77 | name() is the NAME type of RFC2426. It can be used as internal name for the | 77 | name() is the NAME type of RFC2426. It can be used as internal name for the |
78 | data enty, but shouldn't be used for displaying the data to the user. | 78 | data enty, but shouldn't be used for displaying the data to the user. |
79 | */ | 79 | */ |
80 | class Addressee | 80 | class Addressee |
81 | { | 81 | { |
82 | friend QDataStream &operator<<( QDataStream &, const Addressee & ); | 82 | friend QDataStream &operator<<( QDataStream &, const Addressee & ); |
83 | friend QDataStream &operator>>( QDataStream &, Addressee & ); | 83 | friend QDataStream &operator>>( QDataStream &, Addressee & ); |
84 | 84 | ||
85 | public: | 85 | public: |
86 | typedef QValueList<Addressee> List; | 86 | typedef QValueList<Addressee> List; |
87 | 87 | ||
88 | /** | 88 | /** |
89 | Construct an empty address book entry. | 89 | Construct an empty address book entry. |
90 | */ | 90 | */ |
91 | Addressee(); | 91 | Addressee(); |
92 | ~Addressee(); | 92 | ~Addressee(); |
93 | 93 | ||
94 | Addressee( const Addressee & ); | 94 | Addressee( const Addressee & ); |
95 | Addressee &operator=( const Addressee & ); | 95 | Addressee &operator=( const Addressee & ); |
96 | 96 | ||
97 | bool operator==( const Addressee & ) const; | 97 | bool operator==( const Addressee & ) const; |
98 | bool operator!=( const Addressee & ) const; | 98 | bool operator!=( const Addressee & ) const; |
99 | // sync stuff | 99 | // sync stuff |
100 | void setTempSyncStat(int id); | 100 | void setTempSyncStat(int id); |
101 | int tempSyncStat() const; | 101 | int tempSyncStat() const; |
102 | void setIDStr( const QString & ); | 102 | void setIDStr( const QString & ); |
103 | QString IDStr() const; | 103 | QString IDStr() const; |
104 | void setID( const QString &, const QString & ); | 104 | void setID( const QString &, const QString & ); |
105 | QString getID( const QString & ); | 105 | QString getID( const QString & ); |
106 | void setCsum( const QString &, const QString & ); | 106 | void setCsum( const QString &, const QString & ); |
107 | QString getCsum( const QString & ); | 107 | QString getCsum( const QString & ); |
108 | void removeID(const QString &); | 108 | void removeID(const QString &); |
109 | void computeCsum(const QString &dev); | 109 | void computeCsum(const QString &dev); |
110 | ulong getCsum4List( const QStringList & attList); | 110 | ulong getCsum4List( const QStringList & attList); |
111 | /** | 111 | /** |
112 | Return, if the address book entry is empty. | 112 | Return, if the address book entry is empty. |
113 | */ | 113 | */ |
114 | bool isEmpty() const; | 114 | bool isEmpty() const; |
115 | void setExternalUID( const QString &id ); | 115 | void setExternalUID( const QString &id ); |
116 | QString externalUID() const; | 116 | QString externalUID() const; |
117 | void setOriginalExternalUID( const QString &id ); | 117 | void setOriginalExternalUID( const QString &id ); |
118 | QString originalExternalUID() const; | 118 | QString originalExternalUID() const; |
119 | void mergeContact( const Addressee& ad ); | 119 | void mergeContact( const Addressee& ad ); |
120 | void simplifyEmails(); | 120 | void simplifyEmails(); |
121 | void simplifyAddresses(); | ||
121 | void simplifyPhoneNumbers(); | 122 | void simplifyPhoneNumbers(); |
122 | void simplifyPhoneNumberTypes(); | 123 | void simplifyPhoneNumberTypes(); |
123 | 124 | ||
124 | /** | 125 | /** |
125 | Set unique identifier. | 126 | Set unique identifier. |
126 | */ | 127 | */ |
127 | void setUid( const QString &uid ); | 128 | void setUid( const QString &uid ); |
128 | /** | 129 | /** |
129 | Return unique identifier. | 130 | Return unique identifier. |
130 | */ | 131 | */ |
131 | QString uid() const; | 132 | QString uid() const; |
132 | /** | 133 | /** |
133 | Return translated label for uid field. | 134 | Return translated label for uid field. |
134 | */ | 135 | */ |
135 | static QString uidLabel(); | 136 | static QString uidLabel(); |
136 | 137 | ||
137 | /** | 138 | /** |
138 | Set name. | 139 | Set name. |
139 | */ | 140 | */ |
140 | void setName( const QString &name ); | 141 | void setName( const QString &name ); |
141 | /** | 142 | /** |
142 | Return name. | 143 | Return name. |
143 | */ | 144 | */ |
144 | QString name() const; | 145 | QString name() const; |
145 | /** | 146 | /** |
146 | Return translated label for name field. | 147 | Return translated label for name field. |
147 | */ | 148 | */ |
148 | static QString nameLabel(); | 149 | static QString nameLabel(); |
149 | 150 | ||
150 | /** | 151 | /** |
151 | Set formatted name. | 152 | Set formatted name. |
152 | */ | 153 | */ |
153 | void setFormattedName( const QString &formattedName ); | 154 | void setFormattedName( const QString &formattedName ); |
154 | /** | 155 | /** |
155 | Return formatted name. | 156 | Return formatted name. |
156 | */ | 157 | */ |
157 | QString formattedName() const; | 158 | QString formattedName() const; |
158 | /** | 159 | /** |
159 | Return translated label for formattedName field. | 160 | Return translated label for formattedName field. |
160 | */ | 161 | */ |
161 | static QString formattedNameLabel(); | 162 | static QString formattedNameLabel(); |
162 | 163 | ||
163 | /** | 164 | /** |
164 | Set family name. | 165 | Set family name. |
165 | */ | 166 | */ |
166 | void setFamilyName( const QString &familyName ); | 167 | void setFamilyName( const QString &familyName ); |
167 | /** | 168 | /** |
168 | Return family name. | 169 | Return family name. |
169 | */ | 170 | */ |
170 | QString familyName() const; | 171 | QString familyName() const; |
171 | /** | 172 | /** |
172 | Return translated label for familyName field. | 173 | Return translated label for familyName field. |
173 | */ | 174 | */ |
174 | static QString familyNameLabel(); | 175 | static QString familyNameLabel(); |
175 | 176 | ||
176 | /** | 177 | /** |
177 | Set given name. | 178 | Set given name. |
178 | */ | 179 | */ |
179 | void setGivenName( const QString &givenName ); | 180 | void setGivenName( const QString &givenName ); |
180 | /** | 181 | /** |
181 | Return given name. | 182 | Return given name. |
182 | */ | 183 | */ |
183 | QString givenName() const; | 184 | QString givenName() const; |
184 | /** | 185 | /** |
185 | Return translated label for givenName field. | 186 | Return translated label for givenName field. |
186 | */ | 187 | */ |
187 | static QString givenNameLabel(); | 188 | static QString givenNameLabel(); |
188 | 189 | ||
189 | /** | 190 | /** |
190 | Set additional names. | 191 | Set additional names. |
191 | */ | 192 | */ |
192 | void setAdditionalName( const QString &additionalName ); | 193 | void setAdditionalName( const QString &additionalName ); |
193 | /** | 194 | /** |
194 | Return additional names. | 195 | Return additional names. |
195 | */ | 196 | */ |
196 | QString additionalName() const; | 197 | QString additionalName() const; |
197 | /** | 198 | /** |
198 | Return translated label for additionalName field. | 199 | Return translated label for additionalName field. |
199 | */ | 200 | */ |
200 | static QString additionalNameLabel(); | 201 | static QString additionalNameLabel(); |
201 | 202 | ||
202 | /** | 203 | /** |
203 | Set honorific prefixes. | 204 | Set honorific prefixes. |
204 | */ | 205 | */ |
205 | void setPrefix( const QString &prefix ); | 206 | void setPrefix( const QString &prefix ); |
206 | /** | 207 | /** |
207 | Return honorific prefixes. | 208 | Return honorific prefixes. |
208 | */ | 209 | */ |
209 | QString prefix() const; | 210 | QString prefix() const; |
210 | /** | 211 | /** |
211 | Return translated label for prefix field. | 212 | Return translated label for prefix field. |
212 | */ | 213 | */ |
213 | static QString prefixLabel(); | 214 | static QString prefixLabel(); |
214 | 215 | ||
215 | /** | 216 | /** |
216 | Set honorific suffixes. | 217 | Set honorific suffixes. |
217 | */ | 218 | */ |
218 | void setSuffix( const QString &suffix ); | 219 | void setSuffix( const QString &suffix ); |
219 | /** | 220 | /** |
220 | Return honorific suffixes. | 221 | Return honorific suffixes. |
221 | */ | 222 | */ |
222 | QString suffix() const; | 223 | QString suffix() const; |
223 | /** | 224 | /** |
224 | Return translated label for suffix field. | 225 | Return translated label for suffix field. |
225 | */ | 226 | */ |
226 | static QString suffixLabel(); | 227 | static QString suffixLabel(); |
227 | 228 | ||
228 | /** | 229 | /** |
229 | Set nick name. | 230 | Set nick name. |
230 | */ | 231 | */ |
231 | void setNickName( const QString &nickName ); | 232 | void setNickName( const QString &nickName ); |
232 | /** | 233 | /** |
233 | Return nick name. | 234 | Return nick name. |
234 | */ | 235 | */ |
235 | QString nickName() const; | 236 | QString nickName() const; |
236 | /** | 237 | /** |
237 | Return translated label for nickName field. | 238 | Return translated label for nickName field. |
238 | */ | 239 | */ |
239 | static QString nickNameLabel(); | 240 | static QString nickNameLabel(); |
240 | 241 | ||
241 | /** | 242 | /** |
242 | Set birthday. | 243 | Set birthday. |
243 | */ | 244 | */ |
244 | void setBirthday( const QDateTime &birthday ); | 245 | void setBirthday( const QDateTime &birthday ); |
245 | /** | 246 | /** |
246 | Return birthday. | 247 | Return birthday. |
247 | */ | 248 | */ |
248 | QDateTime birthday() const; | 249 | QDateTime birthday() const; |
249 | /** | 250 | /** |
250 | Return translated label for birthday field. | 251 | Return translated label for birthday field. |
251 | */ | 252 | */ |
252 | static QString birthdayLabel(); | 253 | static QString birthdayLabel(); |
253 | 254 | ||
254 | /** | 255 | /** |
255 | Return translated label for homeAddressStreet field. | 256 | Return translated label for homeAddressStreet field. |
256 | */ | 257 | */ |
257 | static QString homeAddressStreetLabel(); | 258 | static QString homeAddressStreetLabel(); |
258 | 259 | ||
259 | /** | 260 | /** |
260 | Return translated label for homeAddressLocality field. | 261 | Return translated label for homeAddressLocality field. |
261 | */ | 262 | */ |
262 | static QString homeAddressLocalityLabel(); | 263 | static QString homeAddressLocalityLabel(); |
263 | 264 | ||
264 | /** | 265 | /** |
265 | Return translated label for homeAddressRegion field. | 266 | Return translated label for homeAddressRegion field. |
266 | */ | 267 | */ |
267 | static QString homeAddressRegionLabel(); | 268 | static QString homeAddressRegionLabel(); |
268 | 269 | ||
269 | /** | 270 | /** |
270 | Return translated label for homeAddressPostalCode field. | 271 | Return translated label for homeAddressPostalCode field. |
271 | */ | 272 | */ |
272 | static QString homeAddressPostalCodeLabel(); | 273 | static QString homeAddressPostalCodeLabel(); |
273 | 274 | ||
274 | /** | 275 | /** |
275 | Return translated label for homeAddressCountry field. | 276 | Return translated label for homeAddressCountry field. |
276 | */ | 277 | */ |
277 | static QString homeAddressCountryLabel(); | 278 | static QString homeAddressCountryLabel(); |
278 | 279 | ||
279 | /** | 280 | /** |
280 | Return translated label for homeAddressLabel field. | 281 | Return translated label for homeAddressLabel field. |
281 | */ | 282 | */ |
282 | static QString homeAddressLabelLabel(); | 283 | static QString homeAddressLabelLabel(); |
283 | 284 | ||
284 | /** | 285 | /** |
285 | Return translated label for businessAddressStreet field. | 286 | Return translated label for businessAddressStreet field. |
286 | */ | 287 | */ |
287 | static QString businessAddressStreetLabel(); | 288 | static QString businessAddressStreetLabel(); |
288 | 289 | ||
289 | /** | 290 | /** |
290 | Return translated label for businessAddressLocality field. | 291 | Return translated label for businessAddressLocality field. |
291 | */ | 292 | */ |
292 | static QString businessAddressLocalityLabel(); | 293 | static QString businessAddressLocalityLabel(); |
293 | 294 | ||
294 | /** | 295 | /** |
295 | Return translated label for businessAddressRegion field. | 296 | Return translated label for businessAddressRegion field. |
296 | */ | 297 | */ |
297 | static QString businessAddressRegionLabel(); | 298 | static QString businessAddressRegionLabel(); |
298 | 299 | ||
299 | /** | 300 | /** |
300 | Return translated label for businessAddressPostalCode field. | 301 | Return translated label for businessAddressPostalCode field. |
301 | */ | 302 | */ |
302 | static QString businessAddressPostalCodeLabel(); | 303 | static QString businessAddressPostalCodeLabel(); |
303 | 304 | ||
304 | /** | 305 | /** |
305 | Return translated label for businessAddressCountry field. | 306 | Return translated label for businessAddressCountry field. |
306 | */ | 307 | */ |
307 | static QString businessAddressCountryLabel(); | 308 | static QString businessAddressCountryLabel(); |
308 | 309 | ||
309 | /** | 310 | /** |
310 | Return translated label for businessAddressLabel field. | 311 | Return translated label for businessAddressLabel field. |
311 | */ | 312 | */ |
312 | static QString businessAddressLabelLabel(); | 313 | static QString businessAddressLabelLabel(); |
313 | 314 | ||
314 | /** | 315 | /** |
315 | Return translated label for homePhone field. | 316 | Return translated label for homePhone field. |
316 | */ | 317 | */ |
317 | static QString homePhoneLabel(); | 318 | static QString homePhoneLabel(); |
318 | 319 | ||
319 | /** | 320 | /** |
320 | Return translated label for businessPhone field. | 321 | Return translated label for businessPhone field. |
321 | */ | 322 | */ |
322 | static QString businessPhoneLabel(); | 323 | static QString businessPhoneLabel(); |
323 | 324 | ||
324 | /** | 325 | /** |
325 | Return translated label for mobilePhone field. | 326 | Return translated label for mobilePhone field. |
326 | */ | 327 | */ |
327 | static QString mobilePhoneLabel(); | 328 | static QString mobilePhoneLabel(); |
328 | 329 | ||
329 | /** | 330 | /** |
330 | Return translated label for homeFax field. | 331 | Return translated label for homeFax field. |
331 | */ | 332 | */ |
332 | static QString homeFaxLabel(); | 333 | static QString homeFaxLabel(); |
333 | 334 | ||
334 | /** | 335 | /** |
335 | Return translated label for businessFax field. | 336 | Return translated label for businessFax field. |
336 | */ | 337 | */ |
337 | static QString businessFaxLabel(); | 338 | static QString businessFaxLabel(); |
338 | 339 | ||
339 | /** | 340 | /** |
340 | Return translated label for carPhone field. | 341 | Return translated label for carPhone field. |
341 | */ | 342 | */ |
342 | static QString carPhoneLabel(); | 343 | static QString carPhoneLabel(); |
343 | 344 | ||
344 | /** | 345 | /** |
345 | Return translated label for isdn field. | 346 | Return translated label for isdn field. |
346 | */ | 347 | */ |
347 | static QString isdnLabel(); | 348 | static QString isdnLabel(); |
348 | 349 | ||
349 | /** | 350 | /** |
350 | Return translated label for pager field. | 351 | Return translated label for pager field. |
351 | */ | 352 | */ |
352 | static QString pagerLabel(); | 353 | static QString pagerLabel(); |
353 | 354 | ||
354 | /** | 355 | /** |
355 | Return translated label for sip field. | 356 | Return translated label for sip field. |
356 | */ | 357 | */ |
357 | static QString sipLabel(); | 358 | static QString sipLabel(); |
358 | 359 | ||
359 | /** | 360 | /** |
360 | Return translated label for email field. | 361 | Return translated label for email field. |
361 | */ | 362 | */ |
362 | static QString emailLabel(); | 363 | static QString emailLabel(); |
363 | 364 | ||
364 | /** | 365 | /** |
365 | Set mail client. | 366 | Set mail client. |
366 | */ | 367 | */ |
367 | void setMailer( const QString &mailer ); | 368 | void setMailer( const QString &mailer ); |
368 | /** | 369 | /** |
369 | Return mail client. | 370 | Return mail client. |
370 | */ | 371 | */ |
371 | QString mailer() const; | 372 | QString mailer() const; |
372 | /** | 373 | /** |
373 | Return translated label for mailer field. | 374 | Return translated label for mailer field. |
374 | */ | 375 | */ |
375 | static QString mailerLabel(); | 376 | static QString mailerLabel(); |
376 | 377 | ||
377 | /** | 378 | /** |
378 | Set time zone. | 379 | Set time zone. |
379 | */ | 380 | */ |
380 | void setTimeZone( const TimeZone &timeZone ); | 381 | void setTimeZone( const TimeZone &timeZone ); |
381 | /** | 382 | /** |
382 | Return time zone. | 383 | Return time zone. |
383 | */ | 384 | */ |
384 | TimeZone timeZone() const; | 385 | TimeZone timeZone() const; |
385 | /** | 386 | /** |
386 | Return translated label for timeZone field. | 387 | Return translated label for timeZone field. |
387 | */ | 388 | */ |
388 | static QString timeZoneLabel(); | 389 | static QString timeZoneLabel(); |
389 | 390 | ||
390 | /** | 391 | /** |
391 | Set geographic position. | 392 | Set geographic position. |
392 | */ | 393 | */ |
393 | void setGeo( const Geo &geo ); | 394 | void setGeo( const Geo &geo ); |
394 | /** | 395 | /** |
395 | Return geographic position. | 396 | Return geographic position. |
396 | */ | 397 | */ |
397 | Geo geo() const; | 398 | Geo geo() const; |
398 | /** | 399 | /** |
399 | Return translated label for geo field. | 400 | Return translated label for geo field. |
400 | */ | 401 | */ |
401 | static QString geoLabel(); | 402 | static QString geoLabel(); |
402 | 403 | ||
403 | /** | 404 | /** |
404 | Set title. | 405 | Set title. |
405 | */ | 406 | */ |
406 | void setTitle( const QString &title ); | 407 | void setTitle( const QString &title ); |
407 | /** | 408 | /** |
408 | Return title. | 409 | Return title. |
409 | */ | 410 | */ |
410 | QString title() const; | 411 | QString title() const; |
411 | /** | 412 | /** |
412 | Return translated label for title field. | 413 | Return translated label for title field. |
413 | */ | 414 | */ |
414 | static QString titleLabel(); | 415 | static QString titleLabel(); |
415 | 416 | ||
416 | /** | 417 | /** |
417 | Set role. | 418 | Set role. |
418 | */ | 419 | */ |
419 | void setRole( const QString &role ); | 420 | void setRole( const QString &role ); |
420 | /** | 421 | /** |
421 | Return role. | 422 | Return role. |
422 | */ | 423 | */ |
423 | QString role() const; | 424 | QString role() const; |
424 | /** | 425 | /** |
425 | Return translated label for role field. | 426 | Return translated label for role field. |
426 | */ | 427 | */ |
427 | static QString roleLabel(); | 428 | static QString roleLabel(); |
428 | 429 | ||
429 | /** | 430 | /** |
430 | Set organization. | 431 | Set organization. |
431 | */ | 432 | */ |
432 | void setOrganization( const QString &organization ); | 433 | void setOrganization( const QString &organization ); |
433 | /** | 434 | /** |
434 | Return organization. | 435 | Return organization. |
435 | */ | 436 | */ |
436 | QString organization() const; | 437 | QString organization() const; |
437 | /** | 438 | /** |
438 | Return translated label for organization field. | 439 | Return translated label for organization field. |
439 | */ | 440 | */ |
440 | static QString organizationLabel(); | 441 | static QString organizationLabel(); |
441 | 442 | ||
442 | /** | 443 | /** |
443 | Set note. | 444 | Set note. |
444 | */ | 445 | */ |
445 | void setNote( const QString ¬e ); | 446 | void setNote( const QString ¬e ); |
446 | /** | 447 | /** |
447 | Return note. | 448 | Return note. |
448 | */ | 449 | */ |
449 | QString note() const; | 450 | QString note() const; |
450 | /** | 451 | /** |
451 | Return translated label for note field. | 452 | Return translated label for note field. |
452 | */ | 453 | */ |
453 | static QString noteLabel(); | 454 | static QString noteLabel(); |
454 | 455 | ||
455 | /** | 456 | /** |
456 | Set product identifier. | 457 | Set product identifier. |
457 | */ | 458 | */ |
458 | void setProductId( const QString &productId ); | 459 | void setProductId( const QString &productId ); |
459 | /** | 460 | /** |
460 | Return product identifier. | 461 | Return product identifier. |
461 | */ | 462 | */ |
462 | QString productId() const; | 463 | QString productId() const; |
463 | /** | 464 | /** |
464 | Return translated label for productId field. | 465 | Return translated label for productId field. |
465 | */ | 466 | */ |
466 | static QString productIdLabel(); | 467 | static QString productIdLabel(); |
467 | 468 | ||
468 | /** | 469 | /** |
469 | Set revision date. | 470 | Set revision date. |
470 | */ | 471 | */ |
471 | void setRevision( const QDateTime &revision ); | 472 | void setRevision( const QDateTime &revision ); |
472 | /** | 473 | /** |
473 | Return revision date. | 474 | Return revision date. |
474 | */ | 475 | */ |
475 | QDateTime revision() const; | 476 | QDateTime revision() const; |
476 | /** | 477 | /** |
477 | Return translated label for revision field. | 478 | Return translated label for revision field. |
478 | */ | 479 | */ |
479 | static QString revisionLabel(); | 480 | static QString revisionLabel(); |
480 | 481 | ||
481 | /** | 482 | /** |
482 | Set sort string. | 483 | Set sort string. |
483 | */ | 484 | */ |
484 | void setSortString( const QString &sortString ); | 485 | void setSortString( const QString &sortString ); |
485 | /** | 486 | /** |
486 | Return sort string. | 487 | Return sort string. |
487 | */ | 488 | */ |
488 | QString sortString() const; | 489 | QString sortString() const; |
489 | /** | 490 | /** |
490 | Return translated label for sortString field. | 491 | Return translated label for sortString field. |
491 | */ | 492 | */ |
492 | static QString sortStringLabel(); | 493 | static QString sortStringLabel(); |
493 | 494 | ||
494 | /** | 495 | /** |
495 | Set URL. | 496 | Set URL. |
496 | */ | 497 | */ |
497 | void setUrl( const KURL &url ); | 498 | void setUrl( const KURL &url ); |
498 | /** | 499 | /** |
499 | Return URL. | 500 | Return URL. |
500 | */ | 501 | */ |
501 | KURL url() const; | 502 | KURL url() const; |
502 | /** | 503 | /** |
503 | Return translated label for url field. | 504 | Return translated label for url field. |
504 | */ | 505 | */ |
505 | static QString urlLabel(); | 506 | static QString urlLabel(); |
506 | 507 | ||
507 | /** | 508 | /** |
508 | Set security class. | 509 | Set security class. |
509 | */ | 510 | */ |
510 | void setSecrecy( const Secrecy &secrecy ); | 511 | void setSecrecy( const Secrecy &secrecy ); |
511 | /** | 512 | /** |
512 | Return security class. | 513 | Return security class. |
513 | */ | 514 | */ |
514 | Secrecy secrecy() const; | 515 | Secrecy secrecy() const; |
515 | /** | 516 | /** |
516 | Return translated label for secrecy field. | 517 | Return translated label for secrecy field. |
517 | */ | 518 | */ |
518 | static QString secrecyLabel(); | 519 | static QString secrecyLabel(); |
519 | 520 | ||
520 | /** | 521 | /** |
521 | Set logo. | 522 | Set logo. |
522 | */ | 523 | */ |
523 | void setLogo( const Picture &logo ); | 524 | void setLogo( const Picture &logo ); |
524 | /** | 525 | /** |
525 | Return logo. | 526 | Return logo. |
526 | */ | 527 | */ |
527 | Picture logo() const; | 528 | Picture logo() const; |
528 | /** | 529 | /** |
529 | Return translated label for logo field. | 530 | Return translated label for logo field. |
530 | */ | 531 | */ |
531 | static QString logoLabel(); | 532 | static QString logoLabel(); |
532 | 533 | ||
533 | /** | 534 | /** |
534 | Set photo. | 535 | Set photo. |
535 | */ | 536 | */ |
536 | void setPhoto( const Picture &photo ); | 537 | void setPhoto( const Picture &photo ); |
537 | /** | 538 | /** |
538 | Return photo. | 539 | Return photo. |
539 | */ | 540 | */ |
540 | Picture photo() const; | 541 | Picture photo() const; |
541 | /** | 542 | /** |
542 | Return translated label for photo field. | 543 | Return translated label for photo field. |
543 | */ | 544 | */ |
544 | static QString photoLabel(); | 545 | static QString photoLabel(); |
545 | 546 | ||
546 | /** | 547 | /** |
547 | Set sound. | 548 | Set sound. |
548 | */ | 549 | */ |
549 | void setSound( const Sound &sound ); | 550 | void setSound( const Sound &sound ); |
550 | /** | 551 | /** |
551 | Return sound. | 552 | Return sound. |
552 | */ | 553 | */ |
553 | Sound sound() const; | 554 | Sound sound() const; |
554 | /** | 555 | /** |
555 | Return translated label for sound field. | 556 | Return translated label for sound field. |
556 | */ | 557 | */ |
557 | static QString soundLabel(); | 558 | static QString soundLabel(); |
558 | 559 | ||
559 | /** | 560 | /** |
560 | Set agent. | 561 | Set agent. |
561 | */ | 562 | */ |
562 | void setAgent( const Agent &agent ); | 563 | void setAgent( const Agent &agent ); |
563 | /** | 564 | /** |
564 | Return agent. | 565 | Return agent. |
565 | */ | 566 | */ |
566 | Agent agent() const; | 567 | Agent agent() const; |
567 | /** | 568 | /** |
568 | Return translated label for agent field. | 569 | Return translated label for agent field. |
569 | */ | 570 | */ |
570 | static QString agentLabel(); | 571 | static QString agentLabel(); |
571 | 572 | ||
572 | /** | 573 | /** |
573 | Set name fields by parsing the given string and trying to associate the | 574 | Set name fields by parsing the given string and trying to associate the |
574 | parts of the string with according fields. This function should probably | 575 | parts of the string with according fields. This function should probably |
575 | be a bit more clever. | 576 | be a bit more clever. |
576 | */ | 577 | */ |
577 | void setNameFromString( const QString & ); | 578 | void setNameFromString( const QString & ); |
578 | 579 | ||
579 | /** | 580 | /** |
580 | Return the name of the addressee. This is calculated from all the name | 581 | Return the name of the addressee. This is calculated from all the name |
581 | fields. | 582 | fields. |
582 | */ | 583 | */ |
583 | QString realName() const; | 584 | QString realName() const; |
584 | 585 | ||
585 | /** | 586 | /** |
586 | Return the name that consists of all name parts. | 587 | Return the name that consists of all name parts. |
587 | */ | 588 | */ |
588 | QString assembledName() const; | 589 | QString assembledName() const; |
589 | 590 | ||
590 | /** | 591 | /** |
591 | Return email address including real name. | 592 | Return email address including real name. |
592 | 593 | ||
593 | @param email Email address to be used to construct the full email string. | 594 | @param email Email address to be used to construct the full email string. |
594 | If this is QString::null the preferred email address is used. | 595 | If this is QString::null the preferred email address is used. |
595 | */ | 596 | */ |
596 | QString fullEmail( const QString &email=QString::null ) const; | 597 | QString fullEmail( const QString &email=QString::null ) const; |
597 | 598 | ||
598 | /** | 599 | /** |
599 | Insert an email address. If the email address already exists in this | 600 | Insert an email address. If the email address already exists in this |
600 | addressee it is not duplicated. | 601 | addressee it is not duplicated. |
601 | 602 | ||
602 | @param email Email address | 603 | @param email Email address |
603 | @param preferred Set to true, if this is the preferred email address of | 604 | @param preferred Set to true, if this is the preferred email address of |
604 | the addressee. | 605 | the addressee. |
605 | */ | 606 | */ |
606 | void insertEmail( const QString &email, bool preferred=false ); | 607 | void insertEmail( const QString &email, bool preferred=false ); |
607 | 608 | ||
608 | /** | 609 | /** |
609 | Remove email address. If the email address doesn't exist, nothing happens. | 610 | Remove email address. If the email address doesn't exist, nothing happens. |
610 | */ | 611 | */ |
611 | void removeEmail( const QString &email ); | 612 | void removeEmail( const QString &email ); |
612 | 613 | ||
613 | /** | 614 | /** |
614 | Return preferred email address. This is the first email address or the | 615 | Return preferred email address. This is the first email address or the |
615 | last one added with @ref insertEmail() with a set preferred parameter. | 616 | last one added with @ref insertEmail() with a set preferred parameter. |
616 | */ | 617 | */ |
617 | QString preferredEmail() const; | 618 | QString preferredEmail() const; |
618 | 619 | ||
619 | /** | 620 | /** |
620 | Return list of all email addresses. | 621 | Return list of all email addresses. |
621 | */ | 622 | */ |
622 | QStringList emails() const; | 623 | QStringList emails() const; |
623 | 624 | ||
624 | /** | 625 | /** |
625 | Set the emails to @param. | 626 | Set the emails to @param. |
626 | The first email address gets the preferred one! | 627 | The first email address gets the preferred one! |
627 | @param list The list of email addresses. | 628 | @param list The list of email addresses. |
628 | */ | 629 | */ |
629 | void setEmails( const QStringList& list); | 630 | void setEmails( const QStringList& list); |
630 | 631 | ||
631 | /** | 632 | /** |
632 | Insert a phone number. If a phone number with the same id already exists | 633 | Insert a phone number. If a phone number with the same id already exists |
633 | in this addressee it is not duplicated. | 634 | in this addressee it is not duplicated. |
634 | */ | 635 | */ |
635 | void insertPhoneNumber( const PhoneNumber &phoneNumber ); | 636 | void insertPhoneNumber( const PhoneNumber &phoneNumber ); |
636 | 637 | ||
637 | /** | 638 | /** |
638 | Remove phone number. If no phone number with the given id exists for this | 639 | Remove phone number. If no phone number with the given id exists for this |
639 | addresse nothing happens. | 640 | addresse nothing happens. |
640 | */ | 641 | */ |
641 | void removePhoneNumber( const PhoneNumber &phoneNumber ); | 642 | void removePhoneNumber( const PhoneNumber &phoneNumber ); |
642 | 643 | ||
643 | /** | 644 | /** |
644 | Return phone number, which matches the given type. | 645 | Return phone number, which matches the given type. |
645 | */ | 646 | */ |
646 | PhoneNumber phoneNumber( int type ) const; | 647 | PhoneNumber phoneNumber( int type ) const; |
647 | 648 | ||
648 | /** | 649 | /** |
649 | Return list of all phone numbers. | 650 | Return list of all phone numbers. |
650 | */ | 651 | */ |
651 | PhoneNumber::List phoneNumbers() const; | 652 | PhoneNumber::List phoneNumbers() const; |
652 | 653 | ||
653 | /** | 654 | /** |
654 | Return list of phone numbers with a special type. | 655 | Return list of phone numbers with a special type. |
655 | */ | 656 | */ |
656 | PhoneNumber::List phoneNumbers( int type ) const; | 657 | PhoneNumber::List phoneNumbers( int type ) const; |
657 | 658 | ||
658 | /** | 659 | /** |
659 | Return phone number with the given id. | 660 | Return phone number with the given id. |
660 | */ | 661 | */ |
661 | PhoneNumber findPhoneNumber( const QString &id ) const; | 662 | PhoneNumber findPhoneNumber( const QString &id ) const; |
662 | 663 | ||
663 | /** | 664 | /** |
664 | Insert a key. If a key with the same id already exists | 665 | Insert a key. If a key with the same id already exists |
665 | in this addressee it is not duplicated. | 666 | in this addressee it is not duplicated. |
666 | */ | 667 | */ |
667 | void insertKey( const Key &key ); | 668 | void insertKey( const Key &key ); |
668 | 669 | ||
669 | /** | 670 | /** |
670 | Remove a key. If no key with the given id exists for this | 671 | Remove a key. If no key with the given id exists for this |
671 | addresse nothing happens. | 672 | addresse nothing happens. |
672 | */ | 673 | */ |
673 | void removeKey( const Key &key ); | 674 | void removeKey( const Key &key ); |
674 | 675 | ||
675 | /** | 676 | /** |
676 | Return key, which matches the given type. | 677 | Return key, which matches the given type. |
677 | If @p type == Key::Custom you can specify a string | 678 | If @p type == Key::Custom you can specify a string |
678 | that should match. If you leave the string empty, the first | 679 | that should match. If you leave the string empty, the first |
679 | key with a custom value is returned. | 680 | key with a custom value is returned. |
680 | */ | 681 | */ |
681 | Key key( int type, QString customTypeString = QString::null ) const; | 682 | Key key( int type, QString customTypeString = QString::null ) const; |
682 | 683 | ||
683 | /** | 684 | /** |
684 | Return list of all keys. | 685 | Return list of all keys. |
685 | */ | 686 | */ |
686 | Key::List keys() const; | 687 | Key::List keys() const; |
687 | 688 | ||
688 | /** | 689 | /** |
689 | Set the list of keys | 690 | Set the list of keys |
690 | @param keys The keys to be set. | 691 | @param keys The keys to be set. |
691 | */ | 692 | */ |
692 | void setKeys( const Key::List& keys); | 693 | void setKeys( const Key::List& keys); |
693 | 694 | ||
694 | /** | 695 | /** |
695 | Return list of keys with a special type. | 696 | Return list of keys with a special type. |
696 | If @p type == Key::Custom you can specify a string | 697 | If @p type == Key::Custom you can specify a string |
697 | that should match. If you leave the string empty, all custom | 698 | that should match. If you leave the string empty, all custom |
698 | keys will be returned. | 699 | keys will be returned. |
699 | */ | 700 | */ |
700 | Key::List keys( int type, QString customTypeString = QString::null ) const; | 701 | Key::List keys( int type, QString customTypeString = QString::null ) const; |
701 | 702 | ||
702 | /** | 703 | /** |
703 | Return key with the given id. | 704 | Return key with the given id. |
704 | */ | 705 | */ |
705 | Key findKey( const QString &id ) const; | 706 | Key findKey( const QString &id ) const; |
706 | 707 | ||
707 | /** | 708 | /** |
708 | Insert an address. If an address with the same id already exists | 709 | Insert an address. If an address with the same id already exists |
709 | in this addressee it is not duplicated. | 710 | in this addressee it is not duplicated. |
710 | */ | 711 | */ |
711 | void insertAddress( const Address &address ); | 712 | void insertAddress( const Address &address ); |
712 | 713 | ||
713 | /** | 714 | /** |
714 | Remove address. If no address with the given id exists for this | 715 | Remove address. If no address with the given id exists for this |
715 | addresse nothing happens. | 716 | addresse nothing happens. |
716 | */ | 717 | */ |
717 | void removeAddress( const Address &address ); | 718 | void removeAddress( const Address &address ); |
718 | 719 | ||
719 | /** | 720 | /** |
720 | Return address, which matches the given type. | 721 | Return address, which matches the given type. |
721 | */ | 722 | */ |
722 | Address address( int type ) const; | 723 | Address address( int type ) const; |
723 | 724 | ||
724 | /** | 725 | /** |
725 | Return list of all addresses. | 726 | Return list of all addresses. |
726 | */ | 727 | */ |
727 | Address::List addresses() const; | 728 | Address::List addresses() const; |
728 | 729 | ||
729 | /** | 730 | /** |
730 | Return list of addresses with a special type. | 731 | Return list of addresses with a special type. |
731 | */ | 732 | */ |
732 | Address::List addresses( int type ) const; | 733 | Address::List addresses( int type ) const; |
733 | 734 | ||
734 | /** | 735 | /** |
735 | Return address with the given id. | 736 | Return address with the given id. |
736 | */ | 737 | */ |
737 | Address findAddress( const QString &id ) const; | 738 | Address findAddress( const QString &id ) const; |
738 | 739 | ||
739 | /** | 740 | /** |
740 | Insert category. If the category already exists it is not duplicated. | 741 | Insert category. If the category already exists it is not duplicated. |
741 | */ | 742 | */ |
742 | void insertCategory( const QString & ); | 743 | void insertCategory( const QString & ); |
743 | 744 | ||
744 | /** | 745 | /** |
745 | Remove category. | 746 | Remove category. |
746 | */ | 747 | */ |
747 | void removeCategory( const QString & ); | 748 | void removeCategory( const QString & ); |
748 | 749 | ||
749 | /** | 750 | /** |
750 | Return, if addressee has the given category. | 751 | Return, if addressee has the given category. |
751 | */ | 752 | */ |
752 | bool hasCategory( const QString & ) const; | 753 | bool hasCategory( const QString & ) const; |
753 | 754 | ||
754 | /** | 755 | /** |
755 | Set categories to given value. | 756 | Set categories to given value. |
756 | */ | 757 | */ |
757 | void setCategories( const QStringList & ); | 758 | void setCategories( const QStringList & ); |
758 | 759 | ||
759 | /** | 760 | /** |
760 | Return list of all set categories. | 761 | Return list of all set categories. |
761 | */ | 762 | */ |
762 | QStringList categories() const; | 763 | QStringList categories() const; |
763 | 764 | ||
764 | /** | 765 | /** |
765 | Insert custom entry. The entry is identified by the name of the inserting | 766 | Insert custom entry. The entry is identified by the name of the inserting |
766 | application and a unique name. If an entry with the given app and name | 767 | application and a unique name. If an entry with the given app and name |
767 | already exists its value is replaced with the new given value. | 768 | already exists its value is replaced with the new given value. |
768 | */ | 769 | */ |
769 | void insertCustom( const QString &app, const QString &name, | 770 | void insertCustom( const QString &app, const QString &name, |
770 | const QString &value ); | 771 | const QString &value ); |
771 | 772 | ||
772 | /** | 773 | /** |
773 | Remove custom entry. | 774 | Remove custom entry. |
774 | */ | 775 | */ |
775 | void removeCustom( const QString &app, const QString &name ); | 776 | void removeCustom( const QString &app, const QString &name ); |
776 | 777 | ||
777 | /** | 778 | /** |
778 | Return value of custom entry, identified by app and entry name. | 779 | Return value of custom entry, identified by app and entry name. |
779 | */ | 780 | */ |
780 | QString custom( const QString &app, const QString &name ) const; | 781 | QString custom( const QString &app, const QString &name ) const; |
781 | 782 | ||
782 | /** | 783 | /** |
783 | Set all custom entries. | 784 | Set all custom entries. |
784 | */ | 785 | */ |
785 | void setCustoms( const QStringList & ); | 786 | void setCustoms( const QStringList & ); |
786 | 787 | ||
787 | /** | 788 | /** |
788 | Return list of all custom entries. | 789 | Return list of all custom entries. |
789 | */ | 790 | */ |
790 | QStringList customs() const; | 791 | QStringList customs() const; |
791 | 792 | ||
792 | /** | 793 | /** |
793 | Parse full email address. The result is given back in fullName and email. | 794 | Parse full email address. The result is given back in fullName and email. |
794 | */ | 795 | */ |
795 | static void parseEmailAddress( const QString &rawEmail, QString &fullName, | 796 | static void parseEmailAddress( const QString &rawEmail, QString &fullName, |
796 | QString &email ); | 797 | QString &email ); |
797 | 798 | ||
798 | /** | 799 | /** |
799 | Debug output. | 800 | Debug output. |
800 | */ | 801 | */ |
801 | void dump() const; | 802 | void dump() const; |
802 | 803 | ||
803 | /** | 804 | /** |
804 | Returns string representation of the addressee. | 805 | Returns string representation of the addressee. |
805 | */ | 806 | */ |
806 | QString asString() const; | 807 | QString asString() const; |
807 | 808 | ||
808 | /** | 809 | /** |
809 | Set resource where the addressee is from. | 810 | Set resource where the addressee is from. |
810 | */ | 811 | */ |
811 | void setResource( Resource *resource ); | 812 | void setResource( Resource *resource ); |
812 | 813 | ||
813 | /** | 814 | /** |
814 | Return pointer to resource. | 815 | Return pointer to resource. |
815 | */ | 816 | */ |
816 | Resource *resource() const; | 817 | Resource *resource() const; |
817 | 818 | ||
818 | /** | 819 | /** |
819 | Return resourcelabel. | 820 | Return resourcelabel. |
820 | */ | 821 | */ |
821 | //US | 822 | //US |
822 | static QString resourceLabel(); | 823 | static QString resourceLabel(); |
823 | 824 | ||
824 | /** | 825 | /** |
825 | Mark addressee as changed. | 826 | Mark addressee as changed. |
826 | */ | 827 | */ |
827 | void setChanged( bool value ); | 828 | void setChanged( bool value ); |
828 | 829 | ||
829 | /** | 830 | /** |
830 | Return whether the addressee is changed. | 831 | Return whether the addressee is changed. |
831 | */ | 832 | */ |
832 | bool changed() const; | 833 | bool changed() const; |
833 | 834 | ||
834 | private: | 835 | private: |
835 | Addressee copy(); | 836 | Addressee copy(); |
836 | void detach(); | 837 | void detach(); |
837 | 838 | ||
838 | struct AddresseeData; | 839 | struct AddresseeData; |
839 | mutable KSharedPtr<AddresseeData> mData; | 840 | mutable KSharedPtr<AddresseeData> mData; |
840 | }; | 841 | }; |
841 | 842 | ||
842 | QDataStream &operator<<( QDataStream &, const Addressee & ); | 843 | QDataStream &operator<<( QDataStream &, const Addressee & ); |
843 | QDataStream &operator>>( QDataStream &, Addressee & ); | 844 | QDataStream &operator>>( QDataStream &, Addressee & ); |
844 | 845 | ||
845 | } | 846 | } |
846 | 847 | ||
847 | #endif | 848 | #endif |