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