-rw-r--r-- | kabc/addressee.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/kabc/addressee.h b/kabc/addressee.h index ee98e03..393d1cc 100644 --- a/kabc/addressee.h +++ b/kabc/addressee.h | |||
@@ -1,817 +1,823 @@ | |||
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 | 99 | ||
100 | /** | 100 | /** |
101 | Return, if the address book entry is empty. | 101 | Return, if the address book entry is empty. |
102 | */ | 102 | */ |
103 | bool isEmpty() const; | 103 | bool isEmpty() const; |
104 | 104 | ||
105 | /** | 105 | /** |
106 | Set unique identifier. | 106 | Set unique identifier. |
107 | */ | 107 | */ |
108 | void setUid( const QString &uid ); | 108 | void setUid( const QString &uid ); |
109 | /** | 109 | /** |
110 | Return unique identifier. | 110 | Return unique identifier. |
111 | */ | 111 | */ |
112 | QString uid() const; | 112 | QString uid() const; |
113 | /** | 113 | /** |
114 | Return translated label for uid field. | 114 | Return translated label for uid field. |
115 | */ | 115 | */ |
116 | static QString uidLabel(); | 116 | static QString uidLabel(); |
117 | 117 | ||
118 | /** | 118 | /** |
119 | Set name. | 119 | Set name. |
120 | */ | 120 | */ |
121 | void setName( const QString &name ); | 121 | void setName( const QString &name ); |
122 | /** | 122 | /** |
123 | Return name. | 123 | Return name. |
124 | */ | 124 | */ |
125 | QString name() const; | 125 | QString name() const; |
126 | /** | 126 | /** |
127 | Return translated label for name field. | 127 | Return translated label for name field. |
128 | */ | 128 | */ |
129 | static QString nameLabel(); | 129 | static QString nameLabel(); |
130 | 130 | ||
131 | /** | 131 | /** |
132 | Set formatted name. | 132 | Set formatted name. |
133 | */ | 133 | */ |
134 | void setFormattedName( const QString &formattedName ); | 134 | void setFormattedName( const QString &formattedName ); |
135 | /** | 135 | /** |
136 | Return formatted name. | 136 | Return formatted name. |
137 | */ | 137 | */ |
138 | QString formattedName() const; | 138 | QString formattedName() const; |
139 | /** | 139 | /** |
140 | Return translated label for formattedName field. | 140 | Return translated label for formattedName field. |
141 | */ | 141 | */ |
142 | static QString formattedNameLabel(); | 142 | static QString formattedNameLabel(); |
143 | 143 | ||
144 | /** | 144 | /** |
145 | Set family name. | 145 | Set family name. |
146 | */ | 146 | */ |
147 | void setFamilyName( const QString &familyName ); | 147 | void setFamilyName( const QString &familyName ); |
148 | /** | 148 | /** |
149 | Return family name. | 149 | Return family name. |
150 | */ | 150 | */ |
151 | QString familyName() const; | 151 | QString familyName() const; |
152 | /** | 152 | /** |
153 | Return translated label for familyName field. | 153 | Return translated label for familyName field. |
154 | */ | 154 | */ |
155 | static QString familyNameLabel(); | 155 | static QString familyNameLabel(); |
156 | 156 | ||
157 | /** | 157 | /** |
158 | Set given name. | 158 | Set given name. |
159 | */ | 159 | */ |
160 | void setGivenName( const QString &givenName ); | 160 | void setGivenName( const QString &givenName ); |
161 | /** | 161 | /** |
162 | Return given name. | 162 | Return given name. |
163 | */ | 163 | */ |
164 | QString givenName() const; | 164 | QString givenName() const; |
165 | /** | 165 | /** |
166 | Return translated label for givenName field. | 166 | Return translated label for givenName field. |
167 | */ | 167 | */ |
168 | static QString givenNameLabel(); | 168 | static QString givenNameLabel(); |
169 | 169 | ||
170 | /** | 170 | /** |
171 | Set additional names. | 171 | Set additional names. |
172 | */ | 172 | */ |
173 | void setAdditionalName( const QString &additionalName ); | 173 | void setAdditionalName( const QString &additionalName ); |
174 | /** | 174 | /** |
175 | Return additional names. | 175 | Return additional names. |
176 | */ | 176 | */ |
177 | QString additionalName() const; | 177 | QString additionalName() const; |
178 | /** | 178 | /** |
179 | Return translated label for additionalName field. | 179 | Return translated label for additionalName field. |
180 | */ | 180 | */ |
181 | static QString additionalNameLabel(); | 181 | static QString additionalNameLabel(); |
182 | 182 | ||
183 | /** | 183 | /** |
184 | Set honorific prefixes. | 184 | Set honorific prefixes. |
185 | */ | 185 | */ |
186 | void setPrefix( const QString &prefix ); | 186 | void setPrefix( const QString &prefix ); |
187 | /** | 187 | /** |
188 | Return honorific prefixes. | 188 | Return honorific prefixes. |
189 | */ | 189 | */ |
190 | QString prefix() const; | 190 | QString prefix() const; |
191 | /** | 191 | /** |
192 | Return translated label for prefix field. | 192 | Return translated label for prefix field. |
193 | */ | 193 | */ |
194 | static QString prefixLabel(); | 194 | static QString prefixLabel(); |
195 | 195 | ||
196 | /** | 196 | /** |
197 | Set honorific suffixes. | 197 | Set honorific suffixes. |
198 | */ | 198 | */ |
199 | void setSuffix( const QString &suffix ); | 199 | void setSuffix( const QString &suffix ); |
200 | /** | 200 | /** |
201 | Return honorific suffixes. | 201 | Return honorific suffixes. |
202 | */ | 202 | */ |
203 | QString suffix() const; | 203 | QString suffix() const; |
204 | /** | 204 | /** |
205 | Return translated label for suffix field. | 205 | Return translated label for suffix field. |
206 | */ | 206 | */ |
207 | static QString suffixLabel(); | 207 | static QString suffixLabel(); |
208 | 208 | ||
209 | /** | 209 | /** |
210 | Set nick name. | 210 | Set nick name. |
211 | */ | 211 | */ |
212 | void setNickName( const QString &nickName ); | 212 | void setNickName( const QString &nickName ); |
213 | /** | 213 | /** |
214 | Return nick name. | 214 | Return nick name. |
215 | */ | 215 | */ |
216 | QString nickName() const; | 216 | QString nickName() const; |
217 | /** | 217 | /** |
218 | Return translated label for nickName field. | 218 | Return translated label for nickName field. |
219 | */ | 219 | */ |
220 | static QString nickNameLabel(); | 220 | static QString nickNameLabel(); |
221 | 221 | ||
222 | /** | 222 | /** |
223 | Set birthday. | 223 | Set birthday. |
224 | */ | 224 | */ |
225 | void setBirthday( const QDateTime &birthday ); | 225 | void setBirthday( const QDateTime &birthday ); |
226 | /** | 226 | /** |
227 | Return birthday. | 227 | Return birthday. |
228 | */ | 228 | */ |
229 | QDateTime birthday() const; | 229 | QDateTime birthday() const; |
230 | /** | 230 | /** |
231 | Return translated label for birthday field. | 231 | Return translated label for birthday field. |
232 | */ | 232 | */ |
233 | static QString birthdayLabel(); | 233 | static QString birthdayLabel(); |
234 | 234 | ||
235 | /** | 235 | /** |
236 | Return translated label for homeAddressStreet field. | 236 | Return translated label for homeAddressStreet field. |
237 | */ | 237 | */ |
238 | static QString homeAddressStreetLabel(); | 238 | static QString homeAddressStreetLabel(); |
239 | 239 | ||
240 | /** | 240 | /** |
241 | Return translated label for homeAddressLocality field. | 241 | Return translated label for homeAddressLocality field. |
242 | */ | 242 | */ |
243 | static QString homeAddressLocalityLabel(); | 243 | static QString homeAddressLocalityLabel(); |
244 | 244 | ||
245 | /** | 245 | /** |
246 | Return translated label for homeAddressRegion field. | 246 | Return translated label for homeAddressRegion field. |
247 | */ | 247 | */ |
248 | static QString homeAddressRegionLabel(); | 248 | static QString homeAddressRegionLabel(); |
249 | 249 | ||
250 | /** | 250 | /** |
251 | Return translated label for homeAddressPostalCode field. | 251 | Return translated label for homeAddressPostalCode field. |
252 | */ | 252 | */ |
253 | static QString homeAddressPostalCodeLabel(); | 253 | static QString homeAddressPostalCodeLabel(); |
254 | 254 | ||
255 | /** | 255 | /** |
256 | Return translated label for homeAddressCountry field. | 256 | Return translated label for homeAddressCountry field. |
257 | */ | 257 | */ |
258 | static QString homeAddressCountryLabel(); | 258 | static QString homeAddressCountryLabel(); |
259 | 259 | ||
260 | /** | 260 | /** |
261 | Return translated label for homeAddressLabel field. | 261 | Return translated label for homeAddressLabel field. |
262 | */ | 262 | */ |
263 | static QString homeAddressLabelLabel(); | 263 | static QString homeAddressLabelLabel(); |
264 | 264 | ||
265 | /** | 265 | /** |
266 | Return translated label for businessAddressStreet field. | 266 | Return translated label for businessAddressStreet field. |
267 | */ | 267 | */ |
268 | static QString businessAddressStreetLabel(); | 268 | static QString businessAddressStreetLabel(); |
269 | 269 | ||
270 | /** | 270 | /** |
271 | Return translated label for businessAddressLocality field. | 271 | Return translated label for businessAddressLocality field. |
272 | */ | 272 | */ |
273 | static QString businessAddressLocalityLabel(); | 273 | static QString businessAddressLocalityLabel(); |
274 | 274 | ||
275 | /** | 275 | /** |
276 | Return translated label for businessAddressRegion field. | 276 | Return translated label for businessAddressRegion field. |
277 | */ | 277 | */ |
278 | static QString businessAddressRegionLabel(); | 278 | static QString businessAddressRegionLabel(); |
279 | 279 | ||
280 | /** | 280 | /** |
281 | Return translated label for businessAddressPostalCode field. | 281 | Return translated label for businessAddressPostalCode field. |
282 | */ | 282 | */ |
283 | static QString businessAddressPostalCodeLabel(); | 283 | static QString businessAddressPostalCodeLabel(); |
284 | 284 | ||
285 | /** | 285 | /** |
286 | Return translated label for businessAddressCountry field. | 286 | Return translated label for businessAddressCountry field. |
287 | */ | 287 | */ |
288 | static QString businessAddressCountryLabel(); | 288 | static QString businessAddressCountryLabel(); |
289 | 289 | ||
290 | /** | 290 | /** |
291 | Return translated label for businessAddressLabel field. | 291 | Return translated label for businessAddressLabel field. |
292 | */ | 292 | */ |
293 | static QString businessAddressLabelLabel(); | 293 | static QString businessAddressLabelLabel(); |
294 | 294 | ||
295 | /** | 295 | /** |
296 | Return translated label for homePhone field. | 296 | Return translated label for homePhone field. |
297 | */ | 297 | */ |
298 | static QString homePhoneLabel(); | 298 | static QString homePhoneLabel(); |
299 | 299 | ||
300 | /** | 300 | /** |
301 | Return translated label for businessPhone field. | 301 | Return translated label for businessPhone field. |
302 | */ | 302 | */ |
303 | static QString businessPhoneLabel(); | 303 | static QString businessPhoneLabel(); |
304 | 304 | ||
305 | /** | 305 | /** |
306 | Return translated label for mobilePhone field. | 306 | Return translated label for mobilePhone field. |
307 | */ | 307 | */ |
308 | static QString mobilePhoneLabel(); | 308 | static QString mobilePhoneLabel(); |
309 | 309 | ||
310 | /** | 310 | /** |
311 | Return translated label for homeFax field. | 311 | Return translated label for homeFax field. |
312 | */ | 312 | */ |
313 | static QString homeFaxLabel(); | 313 | static QString homeFaxLabel(); |
314 | 314 | ||
315 | /** | 315 | /** |
316 | Return translated label for businessFax field. | 316 | Return translated label for businessFax field. |
317 | */ | 317 | */ |
318 | static QString businessFaxLabel(); | 318 | static QString businessFaxLabel(); |
319 | 319 | ||
320 | /** | 320 | /** |
321 | Return translated label for carPhone field. | 321 | Return translated label for carPhone field. |
322 | */ | 322 | */ |
323 | static QString carPhoneLabel(); | 323 | static QString carPhoneLabel(); |
324 | 324 | ||
325 | /** | 325 | /** |
326 | Return translated label for isdn field. | 326 | Return translated label for isdn field. |
327 | */ | 327 | */ |
328 | static QString isdnLabel(); | 328 | static QString isdnLabel(); |
329 | 329 | ||
330 | /** | 330 | /** |
331 | Return translated label for pager field. | 331 | Return translated label for pager field. |
332 | */ | 332 | */ |
333 | static QString pagerLabel(); | 333 | static QString pagerLabel(); |
334 | 334 | ||
335 | /** | 335 | /** |
336 | Return translated label for email field. | 336 | Return translated label for email field. |
337 | */ | 337 | */ |
338 | static QString emailLabel(); | 338 | static QString emailLabel(); |
339 | 339 | ||
340 | /** | 340 | /** |
341 | Set mail client. | 341 | Set mail client. |
342 | */ | 342 | */ |
343 | void setMailer( const QString &mailer ); | 343 | void setMailer( const QString &mailer ); |
344 | /** | 344 | /** |
345 | Return mail client. | 345 | Return mail client. |
346 | */ | 346 | */ |
347 | QString mailer() const; | 347 | QString mailer() const; |
348 | /** | 348 | /** |
349 | Return translated label for mailer field. | 349 | Return translated label for mailer field. |
350 | */ | 350 | */ |
351 | static QString mailerLabel(); | 351 | static QString mailerLabel(); |
352 | 352 | ||
353 | /** | 353 | /** |
354 | Set time zone. | 354 | Set time zone. |
355 | */ | 355 | */ |
356 | void setTimeZone( const TimeZone &timeZone ); | 356 | void setTimeZone( const TimeZone &timeZone ); |
357 | /** | 357 | /** |
358 | Return time zone. | 358 | Return time zone. |
359 | */ | 359 | */ |
360 | TimeZone timeZone() const; | 360 | TimeZone timeZone() const; |
361 | /** | 361 | /** |
362 | Return translated label for timeZone field. | 362 | Return translated label for timeZone field. |
363 | */ | 363 | */ |
364 | static QString timeZoneLabel(); | 364 | static QString timeZoneLabel(); |
365 | 365 | ||
366 | /** | 366 | /** |
367 | Set geographic position. | 367 | Set geographic position. |
368 | */ | 368 | */ |
369 | void setGeo( const Geo &geo ); | 369 | void setGeo( const Geo &geo ); |
370 | /** | 370 | /** |
371 | Return geographic position. | 371 | Return geographic position. |
372 | */ | 372 | */ |
373 | Geo geo() const; | 373 | Geo geo() const; |
374 | /** | 374 | /** |
375 | Return translated label for geo field. | 375 | Return translated label for geo field. |
376 | */ | 376 | */ |
377 | static QString geoLabel(); | 377 | static QString geoLabel(); |
378 | 378 | ||
379 | /** | 379 | /** |
380 | Set title. | 380 | Set title. |
381 | */ | 381 | */ |
382 | void setTitle( const QString &title ); | 382 | void setTitle( const QString &title ); |
383 | /** | 383 | /** |
384 | Return title. | 384 | Return title. |
385 | */ | 385 | */ |
386 | QString title() const; | 386 | QString title() const; |
387 | /** | 387 | /** |
388 | Return translated label for title field. | 388 | Return translated label for title field. |
389 | */ | 389 | */ |
390 | static QString titleLabel(); | 390 | static QString titleLabel(); |
391 | 391 | ||
392 | /** | 392 | /** |
393 | Set role. | 393 | Set role. |
394 | */ | 394 | */ |
395 | void setRole( const QString &role ); | 395 | void setRole( const QString &role ); |
396 | /** | 396 | /** |
397 | Return role. | 397 | Return role. |
398 | */ | 398 | */ |
399 | QString role() const; | 399 | QString role() const; |
400 | /** | 400 | /** |
401 | Return translated label for role field. | 401 | Return translated label for role field. |
402 | */ | 402 | */ |
403 | static QString roleLabel(); | 403 | static QString roleLabel(); |
404 | 404 | ||
405 | /** | 405 | /** |
406 | Set organization. | 406 | Set organization. |
407 | */ | 407 | */ |
408 | void setOrganization( const QString &organization ); | 408 | void setOrganization( const QString &organization ); |
409 | /** | 409 | /** |
410 | Return organization. | 410 | Return organization. |
411 | */ | 411 | */ |
412 | QString organization() const; | 412 | QString organization() const; |
413 | /** | 413 | /** |
414 | Return translated label for organization field. | 414 | Return translated label for organization field. |
415 | */ | 415 | */ |
416 | static QString organizationLabel(); | 416 | static QString organizationLabel(); |
417 | 417 | ||
418 | /** | 418 | /** |
419 | Set note. | 419 | Set note. |
420 | */ | 420 | */ |
421 | void setNote( const QString ¬e ); | 421 | void setNote( const QString ¬e ); |
422 | /** | 422 | /** |
423 | Return note. | 423 | Return note. |
424 | */ | 424 | */ |
425 | QString note() const; | 425 | QString note() const; |
426 | /** | 426 | /** |
427 | Return translated label for note field. | 427 | Return translated label for note field. |
428 | */ | 428 | */ |
429 | static QString noteLabel(); | 429 | static QString noteLabel(); |
430 | 430 | ||
431 | /** | 431 | /** |
432 | Set product identifier. | 432 | Set product identifier. |
433 | */ | 433 | */ |
434 | void setProductId( const QString &productId ); | 434 | void setProductId( const QString &productId ); |
435 | /** | 435 | /** |
436 | Return product identifier. | 436 | Return product identifier. |
437 | */ | 437 | */ |
438 | QString productId() const; | 438 | QString productId() const; |
439 | /** | 439 | /** |
440 | Return translated label for productId field. | 440 | Return translated label for productId field. |
441 | */ | 441 | */ |
442 | static QString productIdLabel(); | 442 | static QString productIdLabel(); |
443 | 443 | ||
444 | /** | 444 | /** |
445 | Set revision date. | 445 | Set revision date. |
446 | */ | 446 | */ |
447 | void setRevision( const QDateTime &revision ); | 447 | void setRevision( const QDateTime &revision ); |
448 | /** | 448 | /** |
449 | Return revision date. | 449 | Return revision date. |
450 | */ | 450 | */ |
451 | QDateTime revision() const; | 451 | QDateTime revision() const; |
452 | /** | 452 | /** |
453 | Return translated label for revision field. | 453 | Return translated label for revision field. |
454 | */ | 454 | */ |
455 | static QString revisionLabel(); | 455 | static QString revisionLabel(); |
456 | 456 | ||
457 | /** | 457 | /** |
458 | Set sort string. | 458 | Set sort string. |
459 | */ | 459 | */ |
460 | void setSortString( const QString &sortString ); | 460 | void setSortString( const QString &sortString ); |
461 | /** | 461 | /** |
462 | Return sort string. | 462 | Return sort string. |
463 | */ | 463 | */ |
464 | QString sortString() const; | 464 | QString sortString() const; |
465 | /** | 465 | /** |
466 | Return translated label for sortString field. | 466 | Return translated label for sortString field. |
467 | */ | 467 | */ |
468 | static QString sortStringLabel(); | 468 | static QString sortStringLabel(); |
469 | 469 | ||
470 | /** | 470 | /** |
471 | Set URL. | 471 | Set URL. |
472 | */ | 472 | */ |
473 | void setUrl( const KURL &url ); | 473 | void setUrl( const KURL &url ); |
474 | /** | 474 | /** |
475 | Return URL. | 475 | Return URL. |
476 | */ | 476 | */ |
477 | KURL url() const; | 477 | KURL url() const; |
478 | /** | 478 | /** |
479 | Return translated label for url field. | 479 | Return translated label for url field. |
480 | */ | 480 | */ |
481 | static QString urlLabel(); | 481 | static QString urlLabel(); |
482 | 482 | ||
483 | /** | 483 | /** |
484 | Set security class. | 484 | Set security class. |
485 | */ | 485 | */ |
486 | void setSecrecy( const Secrecy &secrecy ); | 486 | void setSecrecy( const Secrecy &secrecy ); |
487 | /** | 487 | /** |
488 | Return security class. | 488 | Return security class. |
489 | */ | 489 | */ |
490 | Secrecy secrecy() const; | 490 | Secrecy secrecy() const; |
491 | /** | 491 | /** |
492 | Return translated label for secrecy field. | 492 | Return translated label for secrecy field. |
493 | */ | 493 | */ |
494 | static QString secrecyLabel(); | 494 | static QString secrecyLabel(); |
495 | 495 | ||
496 | /** | 496 | /** |
497 | Set logo. | 497 | Set logo. |
498 | */ | 498 | */ |
499 | void setLogo( const Picture &logo ); | 499 | void setLogo( const Picture &logo ); |
500 | /** | 500 | /** |
501 | Return logo. | 501 | Return logo. |
502 | */ | 502 | */ |
503 | Picture logo() const; | 503 | Picture logo() const; |
504 | /** | 504 | /** |
505 | Return translated label for logo field. | 505 | Return translated label for logo field. |
506 | */ | 506 | */ |
507 | static QString logoLabel(); | 507 | static QString logoLabel(); |
508 | 508 | ||
509 | /** | 509 | /** |
510 | Set photo. | 510 | Set photo. |
511 | */ | 511 | */ |
512 | void setPhoto( const Picture &photo ); | 512 | void setPhoto( const Picture &photo ); |
513 | /** | 513 | /** |
514 | Return photo. | 514 | Return photo. |
515 | */ | 515 | */ |
516 | Picture photo() const; | 516 | Picture photo() const; |
517 | /** | 517 | /** |
518 | Return translated label for photo field. | 518 | Return translated label for photo field. |
519 | */ | 519 | */ |
520 | static QString photoLabel(); | 520 | static QString photoLabel(); |
521 | 521 | ||
522 | /** | 522 | /** |
523 | Set sound. | 523 | Set sound. |
524 | */ | 524 | */ |
525 | void setSound( const Sound &sound ); | 525 | void setSound( const Sound &sound ); |
526 | /** | 526 | /** |
527 | Return sound. | 527 | Return sound. |
528 | */ | 528 | */ |
529 | Sound sound() const; | 529 | Sound sound() const; |
530 | /** | 530 | /** |
531 | Return translated label for sound field. | 531 | Return translated label for sound field. |
532 | */ | 532 | */ |
533 | static QString soundLabel(); | 533 | static QString soundLabel(); |
534 | 534 | ||
535 | /** | 535 | /** |
536 | Set agent. | 536 | Set agent. |
537 | */ | 537 | */ |
538 | void setAgent( const Agent &agent ); | 538 | void setAgent( const Agent &agent ); |
539 | /** | 539 | /** |
540 | Return agent. | 540 | Return agent. |
541 | */ | 541 | */ |
542 | Agent agent() const; | 542 | Agent agent() const; |
543 | /** | 543 | /** |
544 | Return translated label for agent field. | 544 | Return translated label for agent field. |
545 | */ | 545 | */ |
546 | static QString agentLabel(); | 546 | static QString agentLabel(); |
547 | 547 | ||
548 | /** | 548 | /** |
549 | Set name fields by parsing the given string and trying to associate the | 549 | Set name fields by parsing the given string and trying to associate the |
550 | parts of the string with according fields. This function should probably | 550 | parts of the string with according fields. This function should probably |
551 | be a bit more clever. | 551 | be a bit more clever. |
552 | */ | 552 | */ |
553 | void setNameFromString( const QString & ); | 553 | void setNameFromString( const QString & ); |
554 | 554 | ||
555 | /** | 555 | /** |
556 | Return the name of the addressee. This is calculated from all the name | 556 | Return the name of the addressee. This is calculated from all the name |
557 | fields. | 557 | fields. |
558 | */ | 558 | */ |
559 | QString realName() const; | 559 | QString realName() const; |
560 | 560 | ||
561 | /** | 561 | /** |
562 | Return the name that consists of all name parts. | 562 | Return the name that consists of all name parts. |
563 | */ | 563 | */ |
564 | QString assembledName() const; | 564 | QString assembledName() const; |
565 | 565 | ||
566 | /** | 566 | /** |
567 | Return email address including real name. | 567 | Return email address including real name. |
568 | 568 | ||
569 | @param email Email address to be used to construct the full email string. | 569 | @param email Email address to be used to construct the full email string. |
570 | If this is QString::null the preferred email address is used. | 570 | If this is QString::null the preferred email address is used. |
571 | */ | 571 | */ |
572 | QString fullEmail( const QString &email=QString::null ) const; | 572 | QString fullEmail( const QString &email=QString::null ) const; |
573 | 573 | ||
574 | /** | 574 | /** |
575 | Insert an email address. If the email address already exists in this | 575 | Insert an email address. If the email address already exists in this |
576 | addressee it is not duplicated. | 576 | addressee it is not duplicated. |
577 | 577 | ||
578 | @param email Email address | 578 | @param email Email address |
579 | @param preferred Set to true, if this is the preferred email address of | 579 | @param preferred Set to true, if this is the preferred email address of |
580 | the addressee. | 580 | the addressee. |
581 | */ | 581 | */ |
582 | void insertEmail( const QString &email, bool preferred=false ); | 582 | void insertEmail( const QString &email, bool preferred=false ); |
583 | 583 | ||
584 | /** | 584 | /** |
585 | Remove email address. If the email address doesn't exist, nothing happens. | 585 | Remove email address. If the email address doesn't exist, nothing happens. |
586 | */ | 586 | */ |
587 | void removeEmail( const QString &email ); | 587 | void removeEmail( const QString &email ); |
588 | 588 | ||
589 | /** | 589 | /** |
590 | Return preferred email address. This is the first email address or the | 590 | Return preferred email address. This is the first email address or the |
591 | last one added with @ref insertEmail() with a set preferred parameter. | 591 | last one added with @ref insertEmail() with a set preferred parameter. |
592 | */ | 592 | */ |
593 | QString preferredEmail() const; | 593 | QString preferredEmail() const; |
594 | 594 | ||
595 | /** | 595 | /** |
596 | Return list of all email addresses. | 596 | Return list of all email addresses. |
597 | */ | 597 | */ |
598 | QStringList emails() const; | 598 | QStringList emails() const; |
599 | 599 | ||
600 | /** | 600 | /** |
601 | Set the emails to @param. | 601 | Set the emails to @param. |
602 | The first email address gets the preferred one! | 602 | The first email address gets the preferred one! |
603 | @param list The list of email addresses. | 603 | @param list The list of email addresses. |
604 | */ | 604 | */ |
605 | void setEmails( const QStringList& list); | 605 | void setEmails( const QStringList& list); |
606 | 606 | ||
607 | /** | 607 | /** |
608 | Insert a phone number. If a phone number with the same id already exists | 608 | Insert a phone number. If a phone number with the same id already exists |
609 | in this addressee it is not duplicated. | 609 | in this addressee it is not duplicated. |
610 | */ | 610 | */ |
611 | void insertPhoneNumber( const PhoneNumber &phoneNumber ); | 611 | void insertPhoneNumber( const PhoneNumber &phoneNumber ); |
612 | 612 | ||
613 | /** | 613 | /** |
614 | Remove phone number. If no phone number with the given id exists for this | 614 | Remove phone number. If no phone number with the given id exists for this |
615 | addresse nothing happens. | 615 | addresse nothing happens. |
616 | */ | 616 | */ |
617 | void removePhoneNumber( const PhoneNumber &phoneNumber ); | 617 | void removePhoneNumber( const PhoneNumber &phoneNumber ); |
618 | 618 | ||
619 | /** | 619 | /** |
620 | Return phone number, which matches the given type. | 620 | Return phone number, which matches the given type. |
621 | */ | 621 | */ |
622 | PhoneNumber phoneNumber( int type ) const; | 622 | PhoneNumber phoneNumber( int type ) const; |
623 | 623 | ||
624 | /** | 624 | /** |
625 | Return list of all phone numbers. | 625 | Return list of all phone numbers. |
626 | */ | 626 | */ |
627 | PhoneNumber::List phoneNumbers() const; | 627 | PhoneNumber::List phoneNumbers() const; |
628 | 628 | ||
629 | /** | 629 | /** |
630 | Return list of phone numbers with a special type. | 630 | Return list of phone numbers with a special type. |
631 | */ | 631 | */ |
632 | PhoneNumber::List phoneNumbers( int type ) const; | 632 | PhoneNumber::List phoneNumbers( int type ) const; |
633 | 633 | ||
634 | /** | 634 | /** |
635 | Return phone number with the given id. | 635 | Return phone number with the given id. |
636 | */ | 636 | */ |
637 | PhoneNumber findPhoneNumber( const QString &id ) const; | 637 | PhoneNumber findPhoneNumber( const QString &id ) const; |
638 | 638 | ||
639 | /** | 639 | /** |
640 | Insert a key. If a key with the same id already exists | 640 | Insert a key. If a key with the same id already exists |
641 | in this addressee it is not duplicated. | 641 | in this addressee it is not duplicated. |
642 | */ | 642 | */ |
643 | void insertKey( const Key &key ); | 643 | void insertKey( const Key &key ); |
644 | 644 | ||
645 | /** | 645 | /** |
646 | Remove a key. If no key with the given id exists for this | 646 | Remove a key. If no key with the given id exists for this |
647 | addresse nothing happens. | 647 | addresse nothing happens. |
648 | */ | 648 | */ |
649 | void removeKey( const Key &key ); | 649 | void removeKey( const Key &key ); |
650 | 650 | ||
651 | /** | 651 | /** |
652 | Return key, which matches the given type. | 652 | Return key, which matches the given type. |
653 | If @p type == Key::Custom you can specify a string | 653 | If @p type == Key::Custom you can specify a string |
654 | that should match. If you leave the string empty, the first | 654 | that should match. If you leave the string empty, the first |
655 | key with a custom value is returned. | 655 | key with a custom value is returned. |
656 | */ | 656 | */ |
657 | Key key( int type, QString customTypeString = QString::null ) const; | 657 | Key key( int type, QString customTypeString = QString::null ) const; |
658 | 658 | ||
659 | /** | 659 | /** |
660 | Return list of all keys. | 660 | Return list of all keys. |
661 | */ | 661 | */ |
662 | Key::List keys() const; | 662 | Key::List keys() const; |
663 | 663 | ||
664 | /** | 664 | /** |
665 | Set the list of keys | 665 | Set the list of keys |
666 | @param keys The keys to be set. | 666 | @param keys The keys to be set. |
667 | */ | 667 | */ |
668 | void setKeys( const Key::List& keys); | 668 | void setKeys( const Key::List& keys); |
669 | 669 | ||
670 | /** | 670 | /** |
671 | Return list of keys with a special type. | 671 | Return list of keys with a special type. |
672 | If @p type == Key::Custom you can specify a string | 672 | If @p type == Key::Custom you can specify a string |
673 | that should match. If you leave the string empty, all custom | 673 | that should match. If you leave the string empty, all custom |
674 | keys will be returned. | 674 | keys will be returned. |
675 | */ | 675 | */ |
676 | Key::List keys( int type, QString customTypeString = QString::null ) const; | 676 | Key::List keys( int type, QString customTypeString = QString::null ) const; |
677 | 677 | ||
678 | /** | 678 | /** |
679 | Return key with the given id. | 679 | Return key with the given id. |
680 | */ | 680 | */ |
681 | Key findKey( const QString &id ) const; | 681 | Key findKey( const QString &id ) const; |
682 | 682 | ||
683 | /** | 683 | /** |
684 | Insert an address. If an address with the same id already exists | 684 | Insert an address. If an address with the same id already exists |
685 | in this addressee it is not duplicated. | 685 | in this addressee it is not duplicated. |
686 | */ | 686 | */ |
687 | void insertAddress( const Address &address ); | 687 | void insertAddress( const Address &address ); |
688 | 688 | ||
689 | /** | 689 | /** |
690 | Remove address. If no address with the given id exists for this | 690 | Remove address. If no address with the given id exists for this |
691 | addresse nothing happens. | 691 | addresse nothing happens. |
692 | */ | 692 | */ |
693 | void removeAddress( const Address &address ); | 693 | void removeAddress( const Address &address ); |
694 | 694 | ||
695 | /** | 695 | /** |
696 | Return address, which matches the given type. | 696 | Return address, which matches the given type. |
697 | */ | 697 | */ |
698 | Address address( int type ) const; | 698 | Address address( int type ) const; |
699 | 699 | ||
700 | /** | 700 | /** |
701 | Return list of all addresses. | 701 | Return list of all addresses. |
702 | */ | 702 | */ |
703 | Address::List addresses() const; | 703 | Address::List addresses() const; |
704 | 704 | ||
705 | /** | 705 | /** |
706 | Return list of addresses with a special type. | 706 | Return list of addresses with a special type. |
707 | */ | 707 | */ |
708 | Address::List addresses( int type ) const; | 708 | Address::List addresses( int type ) const; |
709 | 709 | ||
710 | /** | 710 | /** |
711 | Return address with the given id. | 711 | Return address with the given id. |
712 | */ | 712 | */ |
713 | Address findAddress( const QString &id ) const; | 713 | Address findAddress( const QString &id ) const; |
714 | 714 | ||
715 | /** | 715 | /** |
716 | Insert category. If the category already exists it is not duplicated. | 716 | Insert category. If the category already exists it is not duplicated. |
717 | */ | 717 | */ |
718 | void insertCategory( const QString & ); | 718 | void insertCategory( const QString & ); |
719 | 719 | ||
720 | /** | 720 | /** |
721 | Remove category. | 721 | Remove category. |
722 | */ | 722 | */ |
723 | void removeCategory( const QString & ); | 723 | void removeCategory( const QString & ); |
724 | 724 | ||
725 | /** | 725 | /** |
726 | Return, if addressee has the given category. | 726 | Return, if addressee has the given category. |
727 | */ | 727 | */ |
728 | bool hasCategory( const QString & ) const; | 728 | bool hasCategory( const QString & ) const; |
729 | 729 | ||
730 | /** | 730 | /** |
731 | Set categories to given value. | 731 | Set categories to given value. |
732 | */ | 732 | */ |
733 | void setCategories( const QStringList & ); | 733 | void setCategories( const QStringList & ); |
734 | 734 | ||
735 | /** | 735 | /** |
736 | Return list of all set categories. | 736 | Return list of all set categories. |
737 | */ | 737 | */ |
738 | QStringList categories() const; | 738 | QStringList categories() const; |
739 | 739 | ||
740 | /** | 740 | /** |
741 | Insert custom entry. The entry is identified by the name of the inserting | 741 | Insert custom entry. The entry is identified by the name of the inserting |
742 | application and a unique name. If an entry with the given app and name | 742 | application and a unique name. If an entry with the given app and name |
743 | already exists its value is replaced with the new given value. | 743 | already exists its value is replaced with the new given value. |
744 | */ | 744 | */ |
745 | void insertCustom( const QString &app, const QString &name, | 745 | void insertCustom( const QString &app, const QString &name, |
746 | const QString &value ); | 746 | const QString &value ); |
747 | 747 | ||
748 | /** | 748 | /** |
749 | Remove custom entry. | 749 | Remove custom entry. |
750 | */ | 750 | */ |
751 | void removeCustom( const QString &app, const QString &name ); | 751 | void removeCustom( const QString &app, const QString &name ); |
752 | 752 | ||
753 | /** | 753 | /** |
754 | Return value of custom entry, identified by app and entry name. | 754 | Return value of custom entry, identified by app and entry name. |
755 | */ | 755 | */ |
756 | QString custom( const QString &app, const QString &name ) const; | 756 | QString custom( const QString &app, const QString &name ) const; |
757 | 757 | ||
758 | /** | 758 | /** |
759 | Set all custom entries. | 759 | Set all custom entries. |
760 | */ | 760 | */ |
761 | void setCustoms( const QStringList & ); | 761 | void setCustoms( const QStringList & ); |
762 | 762 | ||
763 | /** | 763 | /** |
764 | Return list of all custom entries. | 764 | Return list of all custom entries. |
765 | */ | 765 | */ |
766 | QStringList customs() const; | 766 | QStringList customs() const; |
767 | 767 | ||
768 | /** | 768 | /** |
769 | Parse full email address. The result is given back in fullName and email. | 769 | Parse full email address. The result is given back in fullName and email. |
770 | */ | 770 | */ |
771 | static void parseEmailAddress( const QString &rawEmail, QString &fullName, | 771 | static void parseEmailAddress( const QString &rawEmail, QString &fullName, |
772 | QString &email ); | 772 | QString &email ); |
773 | 773 | ||
774 | /** | 774 | /** |
775 | Debug output. | 775 | Debug output. |
776 | */ | 776 | */ |
777 | void dump() const; | 777 | void dump() const; |
778 | 778 | ||
779 | /** | 779 | /** |
780 | Returns string representation of the addressee. | 780 | Returns string representation of the addressee. |
781 | */ | 781 | */ |
782 | QString asString() const; | 782 | QString asString() const; |
783 | 783 | ||
784 | /** | 784 | /** |
785 | Set resource where the addressee is from. | 785 | Set resource where the addressee is from. |
786 | */ | 786 | */ |
787 | void setResource( Resource *resource ); | 787 | void setResource( Resource *resource ); |
788 | 788 | ||
789 | /** | 789 | /** |
790 | Return pointer to resource. | 790 | Return pointer to resource. |
791 | */ | 791 | */ |
792 | Resource *resource() const; | 792 | Resource *resource() const; |
793 | 793 | ||
794 | /** | 794 | /** |
795 | Return resourcelabel. | ||
796 | */ | ||
797 | //US | ||
798 | static QString resourceLabel(); | ||
799 | |||
800 | /** | ||
795 | Mark addressee as changed. | 801 | Mark addressee as changed. |
796 | */ | 802 | */ |
797 | void setChanged( bool value ); | 803 | void setChanged( bool value ); |
798 | 804 | ||
799 | /** | 805 | /** |
800 | Return whether the addressee is changed. | 806 | Return whether the addressee is changed. |
801 | */ | 807 | */ |
802 | bool changed() const; | 808 | bool changed() const; |
803 | 809 | ||
804 | private: | 810 | private: |
805 | Addressee copy(); | 811 | Addressee copy(); |
806 | void detach(); | 812 | void detach(); |
807 | 813 | ||
808 | struct AddresseeData; | 814 | struct AddresseeData; |
809 | mutable KSharedPtr<AddresseeData> mData; | 815 | mutable KSharedPtr<AddresseeData> mData; |
810 | }; | 816 | }; |
811 | 817 | ||
812 | QDataStream &operator<<( QDataStream &, const Addressee & ); | 818 | QDataStream &operator<<( QDataStream &, const Addressee & ); |
813 | QDataStream &operator>>( QDataStream &, Addressee & ); | 819 | QDataStream &operator>>( QDataStream &, Addressee & ); |
814 | 820 | ||
815 | } | 821 | } |
816 | 822 | ||
817 | #endif | 823 | #endif |