-rw-r--r-- | kabc/addressee.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/kabc/addressee.h b/kabc/addressee.h index 8051fec..0d688f8 100644 --- a/kabc/addressee.h +++ b/kabc/addressee.h | |||
@@ -61,366 +61,371 @@ class Resource; | |||
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 ); | ||
157 | /** | 158 | /** |
158 | Return formatted name. | 159 | Return formatted name. |
159 | */ | 160 | */ |
160 | QString formattedName() const; | 161 | QString formattedName() const; |
162 | QString defaultFormattedName() const; | ||
161 | /** | 163 | /** |
162 | Return translated label for formattedName field. | 164 | Return translated label for formattedName field. |
163 | */ | 165 | */ |
164 | static QString formattedNameLabel(); | 166 | static QString formattedNameLabel(); |
167 | static QString defaultFormattedNameLabel(); | ||
165 | 168 | ||
166 | /** | 169 | /** |
167 | Set family name. | 170 | Set family name. |
168 | */ | 171 | */ |
169 | void setFamilyName( const QString &familyName ); | 172 | void setFamilyName( const QString &familyName ); |
170 | /** | 173 | /** |
171 | Return family name. | 174 | Return family name. |
172 | */ | 175 | */ |
173 | QString familyName() const; | 176 | QString familyName() const; |
174 | /** | 177 | /** |
175 | Return translated label for familyName field. | 178 | Return translated label for familyName field. |
176 | */ | 179 | */ |
177 | static QString familyNameLabel(); | 180 | static QString familyNameLabel(); |
178 | 181 | ||
179 | /** | 182 | /** |
180 | Set given name. | 183 | Set given name. |
181 | */ | 184 | */ |
182 | void setGivenName( const QString &givenName ); | 185 | void setGivenName( const QString &givenName ); |
183 | /** | 186 | /** |
184 | Return given name. | 187 | Return given name. |
185 | */ | 188 | */ |
186 | QString givenName() const; | 189 | QString givenName() const; |
187 | /** | 190 | /** |
188 | Return translated label for givenName field. | 191 | Return translated label for givenName field. |
189 | */ | 192 | */ |
190 | static QString givenNameLabel(); | 193 | static QString givenNameLabel(); |
191 | 194 | ||
192 | /** | 195 | /** |
193 | Set additional names. | 196 | Set additional names. |
194 | */ | 197 | */ |
195 | void setAdditionalName( const QString &additionalName ); | 198 | void setAdditionalName( const QString &additionalName ); |
196 | /** | 199 | /** |
197 | Return additional names. | 200 | Return additional names. |
198 | */ | 201 | */ |
199 | QString additionalName() const; | 202 | QString additionalName() const; |
200 | /** | 203 | /** |
201 | Return translated label for additionalName field. | 204 | Return translated label for additionalName field. |
202 | */ | 205 | */ |
203 | static QString additionalNameLabel(); | 206 | static QString additionalNameLabel(); |
204 | 207 | ||
205 | /** | 208 | /** |
206 | Set honorific prefixes. | 209 | Set honorific prefixes. |
207 | */ | 210 | */ |
208 | void setPrefix( const QString &prefix ); | 211 | void setPrefix( const QString &prefix ); |
209 | /** | 212 | /** |
210 | Return honorific prefixes. | 213 | Return honorific prefixes. |
211 | */ | 214 | */ |
212 | QString prefix() const; | 215 | QString prefix() const; |
213 | /** | 216 | /** |
214 | Return translated label for prefix field. | 217 | Return translated label for prefix field. |
215 | */ | 218 | */ |
216 | static QString prefixLabel(); | 219 | static QString prefixLabel(); |
217 | 220 | ||
218 | /** | 221 | /** |
219 | Set honorific suffixes. | 222 | Set honorific suffixes. |
220 | */ | 223 | */ |
221 | void setSuffix( const QString &suffix ); | 224 | void setSuffix( const QString &suffix ); |
222 | /** | 225 | /** |
223 | Return honorific suffixes. | 226 | Return honorific suffixes. |
224 | */ | 227 | */ |
225 | QString suffix() const; | 228 | QString suffix() const; |
226 | /** | 229 | /** |
227 | Return translated label for suffix field. | 230 | Return translated label for suffix field. |
228 | */ | 231 | */ |
229 | static QString suffixLabel(); | 232 | static QString suffixLabel(); |
230 | 233 | ||
231 | /** | 234 | /** |
232 | Set nick name. | 235 | Set nick name. |
233 | */ | 236 | */ |
234 | void setNickName( const QString &nickName ); | 237 | void setNickName( const QString &nickName ); |
235 | /** | 238 | /** |
236 | Return nick name. | 239 | Return nick name. |
237 | */ | 240 | */ |
238 | QString nickName() const; | 241 | QString nickName() const; |
239 | /** | 242 | /** |
240 | Return translated label for nickName field. | 243 | Return translated label for nickName field. |
241 | */ | 244 | */ |
242 | static QString nickNameLabel(); | 245 | static QString nickNameLabel(); |
243 | 246 | ||
244 | /** | 247 | /** |
245 | Set birthday. | 248 | Set birthday. |
246 | */ | 249 | */ |
247 | void setBirthday( const QDateTime &birthday ); | 250 | void setBirthday( const QDateTime &birthday ); |
248 | /** | 251 | /** |
249 | Return birthday. | 252 | Return birthday. |
250 | */ | 253 | */ |
251 | QDateTime birthday() const; | 254 | QDateTime birthday() const; |
252 | /** | 255 | /** |
253 | Return translated label for birthday field. | 256 | Return translated label for birthday field. |
254 | */ | 257 | */ |
255 | static QString birthdayLabel(); | 258 | static QString birthdayLabel(); |
256 | 259 | ||
257 | /** | 260 | /** |
258 | Return translated label for homeAddressStreet field. | 261 | Return translated label for homeAddressStreet field. |
259 | */ | 262 | */ |
260 | static QString homeAddressStreetLabel(); | 263 | static QString homeAddressStreetLabel(); |
261 | 264 | ||
262 | /** | 265 | /** |
263 | Return translated label for homeAddressLocality field. | 266 | Return translated label for homeAddressLocality field. |
264 | */ | 267 | */ |
265 | static QString homeAddressLocalityLabel(); | 268 | static QString homeAddressLocalityLabel(); |
266 | 269 | ||
267 | /** | 270 | /** |
268 | Return translated label for homeAddressRegion field. | 271 | Return translated label for homeAddressRegion field. |
269 | */ | 272 | */ |
270 | static QString homeAddressRegionLabel(); | 273 | static QString homeAddressRegionLabel(); |
271 | 274 | ||
272 | /** | 275 | /** |
273 | Return translated label for homeAddressPostalCode field. | 276 | Return translated label for homeAddressPostalCode field. |
274 | */ | 277 | */ |
275 | static QString homeAddressPostalCodeLabel(); | 278 | static QString homeAddressPostalCodeLabel(); |
276 | 279 | ||
277 | /** | 280 | /** |
278 | Return translated label for homeAddressCountry field. | 281 | Return translated label for homeAddressCountry field. |
279 | */ | 282 | */ |
280 | static QString homeAddressCountryLabel(); | 283 | static QString homeAddressCountryLabel(); |
281 | 284 | ||
282 | /** | 285 | /** |
283 | Return translated label for homeAddressLabel field. | 286 | Return translated label for homeAddressLabel field. |
284 | */ | 287 | */ |
285 | static QString homeAddressLabelLabel(); | 288 | static QString homeAddressLabelLabel(); |
286 | 289 | ||
287 | /** | 290 | /** |
288 | Return translated label for businessAddressStreet field. | 291 | Return translated label for businessAddressStreet field. |
289 | */ | 292 | */ |
290 | static QString businessAddressStreetLabel(); | 293 | static QString businessAddressStreetLabel(); |
291 | 294 | ||
292 | /** | 295 | /** |
293 | Return translated label for businessAddressLocality field. | 296 | Return translated label for businessAddressLocality field. |
294 | */ | 297 | */ |
295 | static QString businessAddressLocalityLabel(); | 298 | static QString businessAddressLocalityLabel(); |
296 | 299 | ||
297 | /** | 300 | /** |
298 | Return translated label for businessAddressRegion field. | 301 | Return translated label for businessAddressRegion field. |
299 | */ | 302 | */ |
300 | static QString businessAddressRegionLabel(); | 303 | static QString businessAddressRegionLabel(); |
301 | 304 | ||
302 | /** | 305 | /** |
303 | Return translated label for businessAddressPostalCode field. | 306 | Return translated label for businessAddressPostalCode field. |
304 | */ | 307 | */ |
305 | static QString businessAddressPostalCodeLabel(); | 308 | static QString businessAddressPostalCodeLabel(); |
306 | 309 | ||
307 | /** | 310 | /** |
308 | Return translated label for businessAddressCountry field. | 311 | Return translated label for businessAddressCountry field. |
309 | */ | 312 | */ |
310 | static QString businessAddressCountryLabel(); | 313 | static QString businessAddressCountryLabel(); |
311 | 314 | ||
312 | /** | 315 | /** |
313 | Return translated label for businessAddressLabel field. | 316 | Return translated label for businessAddressLabel field. |
314 | */ | 317 | */ |
315 | static QString businessAddressLabelLabel(); | 318 | static QString businessAddressLabelLabel(); |
316 | 319 | ||
317 | /** | 320 | /** |
318 | Return translated label for homePhone field. | 321 | Return translated label for homePhone field. |
319 | */ | 322 | */ |
320 | static QString homePhoneLabel(); | 323 | static QString homePhoneLabel(); |
321 | 324 | ||
322 | /** | 325 | /** |
323 | Return translated label for businessPhone field. | 326 | Return translated label for businessPhone field. |
324 | */ | 327 | */ |
325 | static QString businessPhoneLabel(); | 328 | static QString businessPhoneLabel(); |
326 | 329 | ||
327 | /** | 330 | /** |
328 | Return translated label for mobilePhone field. | 331 | Return translated label for mobilePhone field. |
329 | */ | 332 | */ |
330 | static QString mobilePhoneLabel(); | 333 | static QString mobilePhoneLabel(); |
334 | static QString mobileWorkPhoneLabel(); | ||
335 | static QString mobileHomePhoneLabel(); | ||
331 | 336 | ||
332 | /** | 337 | /** |
333 | Return translated label for homeFax field. | 338 | Return translated label for homeFax field. |
334 | */ | 339 | */ |
335 | static QString homeFaxLabel(); | 340 | static QString homeFaxLabel(); |
336 | 341 | ||
337 | /** | 342 | /** |
338 | Return translated label for businessFax field. | 343 | Return translated label for businessFax field. |
339 | */ | 344 | */ |
340 | static QString businessFaxLabel(); | 345 | static QString businessFaxLabel(); |
341 | 346 | ||
342 | /** | 347 | /** |
343 | Return translated label for carPhone field. | 348 | Return translated label for carPhone field. |
344 | */ | 349 | */ |
345 | static QString carPhoneLabel(); | 350 | static QString carPhoneLabel(); |
346 | 351 | ||
347 | /** | 352 | /** |
348 | Return translated label for isdn field. | 353 | Return translated label for isdn field. |
349 | */ | 354 | */ |
350 | static QString isdnLabel(); | 355 | static QString isdnLabel(); |
351 | 356 | ||
352 | /** | 357 | /** |
353 | Return translated label for pager field. | 358 | Return translated label for pager field. |
354 | */ | 359 | */ |
355 | static QString pagerLabel(); | 360 | static QString pagerLabel(); |
356 | 361 | ||
357 | /** | 362 | /** |
358 | Return translated label for sip field. | 363 | Return translated label for sip field. |
359 | */ | 364 | */ |
360 | static QString sipLabel(); | 365 | static QString sipLabel(); |
361 | 366 | ||
362 | /** | 367 | /** |
363 | Return translated label for email field. | 368 | Return translated label for email field. |
364 | */ | 369 | */ |
365 | static QString emailLabel(); | 370 | static QString emailLabel(); |
366 | 371 | ||
367 | /** | 372 | /** |
368 | Set mail client. | 373 | Set mail client. |
369 | */ | 374 | */ |
370 | void setMailer( const QString &mailer ); | 375 | void setMailer( const QString &mailer ); |
371 | /** | 376 | /** |
372 | Return mail client. | 377 | Return mail client. |
373 | */ | 378 | */ |
374 | QString mailer() const; | 379 | QString mailer() const; |
375 | /** | 380 | /** |
376 | Return translated label for mailer field. | 381 | Return translated label for mailer field. |
377 | */ | 382 | */ |
378 | static QString mailerLabel(); | 383 | static QString mailerLabel(); |
379 | 384 | ||
380 | /** | 385 | /** |
381 | Set time zone. | 386 | Set time zone. |
382 | */ | 387 | */ |
383 | void setTimeZone( const TimeZone &timeZone ); | 388 | void setTimeZone( const TimeZone &timeZone ); |
384 | /** | 389 | /** |
385 | Return time zone. | 390 | Return time zone. |
386 | */ | 391 | */ |
387 | TimeZone timeZone() const; | 392 | TimeZone timeZone() const; |
388 | /** | 393 | /** |
389 | Return translated label for timeZone field. | 394 | Return translated label for timeZone field. |
390 | */ | 395 | */ |
391 | static QString timeZoneLabel(); | 396 | static QString timeZoneLabel(); |
392 | 397 | ||
393 | /** | 398 | /** |
394 | Set geographic position. | 399 | Set geographic position. |
395 | */ | 400 | */ |
396 | void setGeo( const Geo &geo ); | 401 | void setGeo( const Geo &geo ); |
397 | /** | 402 | /** |
398 | Return geographic position. | 403 | Return geographic position. |
399 | */ | 404 | */ |
400 | Geo geo() const; | 405 | Geo geo() const; |
401 | /** | 406 | /** |
402 | Return translated label for geo field. | 407 | Return translated label for geo field. |
403 | */ | 408 | */ |
404 | static QString geoLabel(); | 409 | static QString geoLabel(); |
405 | 410 | ||
406 | /** | 411 | /** |
407 | Set title. | 412 | Set title. |
408 | */ | 413 | */ |
409 | void setTitle( const QString &title ); | 414 | void setTitle( const QString &title ); |
410 | /** | 415 | /** |
411 | Return title. | 416 | Return title. |
412 | */ | 417 | */ |
413 | QString title() const; | 418 | QString title() const; |
414 | /** | 419 | /** |
415 | Return translated label for title field. | 420 | Return translated label for title field. |
416 | */ | 421 | */ |
417 | static QString titleLabel(); | 422 | static QString titleLabel(); |
418 | 423 | ||
419 | /** | 424 | /** |
420 | Set role. | 425 | Set role. |
421 | */ | 426 | */ |
422 | void setRole( const QString &role ); | 427 | void setRole( const QString &role ); |
423 | /** | 428 | /** |
424 | Return role. | 429 | Return role. |
425 | */ | 430 | */ |
426 | QString role() const; | 431 | QString role() const; |