23 #include <KLocalizedString>
29 return i18nc(
"@item Undefined import field type",
"Undefined" );
32 return KABC::Addressee::formattedNameLabel();
35 return KABC::Addressee::prefixLabel();
38 return KABC::Addressee::givenNameLabel();
41 return KABC::Addressee::additionalNameLabel();
44 return KABC::Addressee::familyNameLabel();
47 return KABC::Addressee::suffixLabel();
50 return KABC::Addressee::nickNameLabel();
53 return KABC::Addressee::birthdayLabel();
56 return i18nc(
"The wedding anniversary of a contact",
"Anniversary" );
59 return KABC::Addressee::homeAddressStreetLabel();
62 return KABC::Addressee::homeAddressPostOfficeBoxLabel();
65 return KABC::Addressee::homeAddressLocalityLabel();
68 return KABC::Addressee::homeAddressRegionLabel();
71 return KABC::Addressee::homeAddressPostalCodeLabel();
74 return KABC::Addressee::homeAddressCountryLabel();
77 return KABC::Addressee::homeAddressLabelLabel();
80 return KABC::Addressee::businessAddressStreetLabel();
83 return KABC::Addressee::businessAddressPostOfficeBoxLabel();
86 return KABC::Addressee::businessAddressLocalityLabel();
89 return KABC::Addressee::businessAddressRegionLabel();
92 return KABC::Addressee::businessAddressPostalCodeLabel();
95 return KABC::Addressee::businessAddressCountryLabel();
98 return KABC::Addressee::businessAddressLabelLabel();
101 return KABC::Addressee::homePhoneLabel();
104 return KABC::Addressee::businessPhoneLabel();
107 return KABC::Addressee::mobilePhoneLabel();
110 return KABC::Addressee::homeFaxLabel();
113 return KABC::Addressee::businessFaxLabel();
116 return KABC::Addressee::carPhoneLabel();
119 return KABC::Addressee::isdnLabel();
122 return KABC::Addressee::pagerLabel();
125 return i18nc(
"Preferred email address",
"EMail (preferred)" );
128 return i18nc(
"Second email address",
"EMail (2)" );
131 return i18nc(
"Third email address",
"EMail (3)" );
134 return i18nc(
"Fourth email address",
"EMail (4)" );
137 return KABC::Addressee::mailerLabel();
140 return KABC::Addressee::titleLabel();
143 return KABC::Addressee::roleLabel();
146 return KABC::Addressee::organizationLabel();
149 return KABC::Addressee::noteLabel();
152 return KABC::Addressee::urlLabel();
155 return i18n(
"Blog Feed" );
158 return i18n(
"Profession" );
161 return i18n(
"Office" );
164 return i18n(
"Manager" );
167 return i18n(
"Assistant" );
170 return i18n(
"Spouse" );
239 contact.setFormattedName( value );
242 contact.setGivenName( value );
245 contact.setFamilyName( value );
248 contact.setAdditionalName( value );
251 contact.setPrefix( value );
254 contact.setSuffix( value );
257 contact.setNickName( value );
267 contact.insertEmail( value,
true );
270 contact.insertEmail( value,
false );
273 contact.insertEmail( value,
false );
276 contact.insertEmail( value,
false );
279 contact.setRole( value );
282 contact.setTitle( value );
285 contact.setMailer( value );
288 contact.setUrl( KUrl( value ) );
291 contact.setOrganization( value );
294 contact.setNote( value );
298 KABC::PhoneNumber number = contact.phoneNumber( KABC::PhoneNumber::Home );
299 number.setNumber( value );
300 contact.insertPhoneNumber( number );
305 KABC::PhoneNumber number = contact.phoneNumber( KABC::PhoneNumber::Work );
306 number.setNumber( value );
307 contact.insertPhoneNumber( number );
312 KABC::PhoneNumber number = contact.phoneNumber( KABC::PhoneNumber::Cell );
313 number.setNumber( value );
314 contact.insertPhoneNumber( number );
319 KABC::PhoneNumber number = contact.phoneNumber( KABC::PhoneNumber::Home |
320 KABC::PhoneNumber::Fax );
321 number.setNumber( value );
322 contact.insertPhoneNumber( number );
327 KABC::PhoneNumber number = contact.phoneNumber( KABC::PhoneNumber::Work |
328 KABC::PhoneNumber::Fax );
329 number.setNumber( value );
330 contact.insertPhoneNumber( number );
335 KABC::PhoneNumber number = contact.phoneNumber( KABC::PhoneNumber::Car );
336 number.setNumber( value );
337 contact.insertPhoneNumber( number );
342 KABC::PhoneNumber number = contact.phoneNumber( KABC::PhoneNumber::Isdn );
343 number.setNumber( value );
344 contact.insertPhoneNumber( number );
349 KABC::PhoneNumber number = contact.phoneNumber( KABC::PhoneNumber::Pager );
350 number.setNumber( value );
351 contact.insertPhoneNumber( number );
357 KABC::Address address = contact.address( KABC::Address::Home );
358 address.setStreet( value );
359 contact.insertAddress( address );
364 KABC::Address address = contact.address( KABC::Address::Home );
365 address.setPostOfficeBox( value );
366 contact.insertAddress( address );
371 KABC::Address address = contact.address( KABC::Address::Home );
372 address.setLocality( value );
373 contact.insertAddress( address );
378 KABC::Address address = contact.address( KABC::Address::Home );
379 address.setRegion( value );
380 contact.insertAddress( address );
385 KABC::Address address = contact.address( KABC::Address::Home );
386 address.setPostalCode( value );
387 contact.insertAddress( address );
392 KABC::Address address = contact.address( KABC::Address::Home );
393 address.setCountry( value );
394 contact.insertAddress( address );
399 KABC::Address address = contact.address( KABC::Address::Home );
400 address.setLabel( value );
401 contact.insertAddress( address );
406 KABC::Address address = contact.address( KABC::Address::Work );
407 address.setStreet( value );
408 contact.insertAddress( address );
413 KABC::Address address = contact.address( KABC::Address::Work );
414 address.setPostOfficeBox( value );
415 contact.insertAddress( address );
420 KABC::Address address = contact.address( KABC::Address::Work );
421 address.setLocality( value );
422 contact.insertAddress( address );
427 KABC::Address address = contact.address( KABC::Address::Work );
428 address.setRegion( value );
429 contact.insertAddress( address );
434 KABC::Address address = contact.address( KABC::Address::Work );
435 address.setPostalCode( value );
436 contact.insertAddress( address );
441 KABC::Address address = contact.address( KABC::Address::Work );
442 address.setCountry( value );
443 contact.insertAddress( address );
448 KABC::Address address = contact.address( KABC::Address::Work );
449 address.setLabel( value );
450 contact.insertAddress( address );
487 return contact.formattedName();
490 return contact.prefix();
493 return contact.givenName();
496 return contact.additionalName();
499 return contact.familyName();
502 return contact.suffix();
505 return contact.nickName();
509 const QDateTime birthday = contact.birthday();
522 const KABC::Address address = contact.address( KABC::Address::Home );
523 return address.street();
528 const KABC::Address address = contact.address( KABC::Address::Home );
529 return address.postOfficeBox();
534 const KABC::Address address = contact.address( KABC::Address::Home );
535 return address.locality();
540 const KABC::Address address = contact.address( KABC::Address::Home );
541 return address.region();
546 const KABC::Address address = contact.address( KABC::Address::Home );
547 return address.postalCode();
552 const KABC::Address address = contact.address( KABC::Address::Home );
553 return address.country();
558 const KABC::Address address = contact.address( KABC::Address::Home );
559 return address.label();
564 const KABC::Address address = contact.address( KABC::Address::Work );
565 return address.street();
570 const KABC::Address address = contact.address( KABC::Address::Work );
571 return address.postOfficeBox();
576 const KABC::Address address = contact.address( KABC::Address::Work );
577 return address.locality();
582 const KABC::Address address = contact.address( KABC::Address::Work );
583 return address.region();
588 const KABC::Address address = contact.address( KABC::Address::Work );
589 return address.postalCode();
594 const KABC::Address address = contact.address( KABC::Address::Work );
595 return address.country();
600 const KABC::Address address = contact.address( KABC::Address::Work );
601 return address.label();
605 return contact.phoneNumber( KABC::PhoneNumber::Home ).number();
608 return contact.phoneNumber( KABC::PhoneNumber::Work ).number();
611 return contact.phoneNumber( KABC::PhoneNumber::Cell ).number();
614 return contact.phoneNumber( KABC::PhoneNumber::Home | KABC::PhoneNumber::Fax ).number();
617 return contact.phoneNumber( KABC::PhoneNumber::Work | KABC::PhoneNumber::Fax ).number();
620 return contact.phoneNumber( KABC::PhoneNumber::Car ).number();
623 return contact.phoneNumber( KABC::PhoneNumber::Isdn ).number();
626 return contact.phoneNumber( KABC::PhoneNumber::Pager ).number();
631 if ( emails.
count() > 0 ) {
632 return emails.
at( 0 );
641 if ( emails.
count() > 1 ) {
642 return emails.
at( 1 );
651 if ( emails.
count() > 2 ) {
652 return emails.
at( 2 );
661 if ( emails.
count() > 3 ) {
662 return emails.
at( 3 );
669 return contact.mailer();
672 return contact.title();
675 return contact.role();
678 return contact.organization();
681 return contact.note();
684 return contact.url().url();
QString toString(Qt::DateFormat format) const
const T & at(int i) const
int count(const T &value) const
QDateTime fromString(const QString &string, Qt::DateFormat format)