KABC::Addressee Class Reference
address book entry More...
#include <addressee.h>
Detailed Description
address book entryThis class represents an entry in the address book.
The data of this class is implicitly shared. You can pass this class by value.
If you need the name of a field for presenting it to the user you should use the functions ending in Label(). They return a translated string which can be used as label for the corresponding field.
About the name fields:
givenName() is the first name and familyName() the last name. In some countries the family name comes first, that's the reason for the naming. formattedName() is the full name with the correct formatting. It is used as an override, when the correct formatting can't be generated from the other name fields automatically.
realName() returns a fully formatted name(). It uses formattedName, if set, otherwise it constucts the name from the name fields. As fallback, if nothing else is set it uses name().
name() is the NAME type of RFC2426. It can be used as internal name for the data enty, but shouldn't be used for displaying the data to the user.
Definition at line 74 of file addressee.h.
Constructor & Destructor Documentation
|
Construct an empty address book entry.
Definition at line 95 of file addressee.cpp. |
|
Construct an empty address book entry.
|
Member Function Documentation
|
Return, if the address book entry is empty.
Definition at line 173 of file addressee.cpp. Referenced by KABC::AddressBook::findByUid(), KABC::AddressBook::insertAddressee(), and KABC::DistributionListManager::load(). |
|
Set unique identifier.
Definition at line 178 of file addressee.cpp. |
|
Return unique identifier.
Definition at line 186 of file addressee.cpp. References KApplication::randomString(). Referenced by dump(), KABC::AddressBook::find(), KABC::AddressBook::insertAddressee(), KABC::DistributionList::insertEntry(), KABC::ResourceFile::removeAddressee(), KABC::DistributionList::removeEntry(), and KABC::StdAddressBook::setWhoAmI(). |
|
Return translated label for uid field.
Definition at line 194 of file addressee.cpp. |
|
Set name.
Definition at line 199 of file addressee.cpp. Referenced by setNameFromString(). |
|
Return name.
Definition at line 207 of file addressee.cpp. Referenced by assembledName(), dump(), and realName(). |
|
Return translated label for name field.
Definition at line 212 of file addressee.cpp. |
|
Set formatted name.
Definition at line 218 of file addressee.cpp. Referenced by KABC::VCard21Parser::readFromString(), and setNameFromString(). |
|
Return formatted name.
Definition at line 226 of file addressee.cpp. Referenced by dump(), and realName(). |
|
Return translated label for formattedName field.
Definition at line 231 of file addressee.cpp. |
|
Set family name.
Definition at line 237 of file addressee.cpp. Referenced by KABC::VCard21Parser::readFromString(), and setNameFromString(). |
|
Return family name.
Definition at line 245 of file addressee.cpp. Referenced by assembledName(), and dump(). |
|
Return translated label for familyName field.
Definition at line 250 of file addressee.cpp. |
|
Set given name.
Definition at line 256 of file addressee.cpp. Referenced by KABC::VCard21Parser::readFromString(), and setNameFromString(). |
|
Return given name.
Definition at line 264 of file addressee.cpp. Referenced by assembledName(), and dump(). |
|
Return translated label for givenName field.
Definition at line 269 of file addressee.cpp. |
|
Set additional names.
Definition at line 275 of file addressee.cpp. Referenced by KABC::VCard21Parser::readFromString(), and setNameFromString(). |
|
Return additional names.
Definition at line 283 of file addressee.cpp. Referenced by assembledName(), dump(), and setNameFromString(). |
|
Return translated label for additionalName field.
Definition at line 288 of file addressee.cpp. |
|
Set honorific prefixes.
Definition at line 294 of file addressee.cpp. Referenced by KABC::VCard21Parser::readFromString(), and setNameFromString(). |
|
Return honorific prefixes.
Definition at line 302 of file addressee.cpp. Referenced by assembledName(), dump(), and setNameFromString(). |
|
Return translated label for prefix field.
Definition at line 307 of file addressee.cpp. |
|
Set honorific suffixes.
Definition at line 313 of file addressee.cpp. Referenced by KABC::VCard21Parser::readFromString(), and setNameFromString(). |
|
Return honorific suffixes.
Definition at line 321 of file addressee.cpp. Referenced by assembledName(), dump(), and setNameFromString(). |
|
Return translated label for suffix field.
Definition at line 326 of file addressee.cpp. |
|
Set nick name.
Definition at line 332 of file addressee.cpp. Referenced by KABC::VCard21Parser::readFromString(). |
|
Return nick name.
Definition at line 340 of file addressee.cpp. Referenced by dump(). |
|
Return translated label for nickName field.
Definition at line 345 of file addressee.cpp. |
|
Set birthday.
Definition at line 351 of file addressee.cpp. Referenced by KABC::VCard21Parser::readFromString(). |
|
Return birthday.
Definition at line 359 of file addressee.cpp. Referenced by dump(). |
|
Return translated label for birthday field.
Definition at line 364 of file addressee.cpp. |
|
Return translated label for homeAddressStreet field.
Definition at line 370 of file addressee.cpp. |
|
Return translated label for homeAddressLocality field.
Definition at line 376 of file addressee.cpp. |
|
Return translated label for homeAddressRegion field.
Definition at line 382 of file addressee.cpp. |
|
Return translated label for homeAddressPostalCode field.
Definition at line 388 of file addressee.cpp. |
|
Return translated label for homeAddressCountry field.
Definition at line 394 of file addressee.cpp. |
|
Return translated label for homeAddressLabel field.
Definition at line 400 of file addressee.cpp. |
|
Return translated label for businessAddressStreet field.
Definition at line 406 of file addressee.cpp. |
|
Return translated label for businessAddressLocality field.
Definition at line 412 of file addressee.cpp. |
|
Return translated label for businessAddressRegion field.
Definition at line 418 of file addressee.cpp. |
|
Return translated label for businessAddressPostalCode field.
Definition at line 424 of file addressee.cpp. |
|
Return translated label for businessAddressCountry field.
Definition at line 430 of file addressee.cpp. |
|
Return translated label for businessAddressLabel field.
Definition at line 436 of file addressee.cpp. |
|
Return translated label for homePhone field.
Definition at line 442 of file addressee.cpp. |
|
Return translated label for businessPhone field.
Definition at line 448 of file addressee.cpp. |
|
Return translated label for mobilePhone field.
Definition at line 454 of file addressee.cpp. |
|
Return translated label for homeFax field.
Definition at line 460 of file addressee.cpp. |
|
Return translated label for businessFax field.
Definition at line 466 of file addressee.cpp. |
|
Return translated label for carPhone field.
Definition at line 472 of file addressee.cpp. |
|
Return translated label for isdn field.
Definition at line 478 of file addressee.cpp. |
|
Return translated label for pager field.
Definition at line 484 of file addressee.cpp. |
|
Return translated label for email field.
Definition at line 490 of file addressee.cpp. |
|
Set mail client.
Definition at line 496 of file addressee.cpp. |
|
Return mail client.
Definition at line 504 of file addressee.cpp. Referenced by dump(). |
|
Return translated label for mailer field.
Definition at line 509 of file addressee.cpp. |
|
Set time zone.
Definition at line 515 of file addressee.cpp. Referenced by KABC::VCard21Parser::readFromString(). |
|
Return time zone.
Definition at line 523 of file addressee.cpp. Referenced by dump(). |
|
Return translated label for timeZone field.
Definition at line 528 of file addressee.cpp. |
|
Set geographic position.
Definition at line 534 of file addressee.cpp. Referenced by KABC::VCard21Parser::readFromString(). |
|
Return geographic position.
Definition at line 542 of file addressee.cpp. Referenced by dump(). |
|
Return translated label for geo field.
Definition at line 547 of file addressee.cpp. |
|
Set title.
Definition at line 553 of file addressee.cpp. Referenced by KABC::VCard21Parser::readFromString(). |
|
Return title.
Definition at line 561 of file addressee.cpp. Referenced by dump(). |
|
Return translated label for title field.
Definition at line 566 of file addressee.cpp. |
|
Set role.
Definition at line 572 of file addressee.cpp. Referenced by KABC::VCard21Parser::readFromString(). |
|
Return role.
Definition at line 580 of file addressee.cpp. Referenced by dump(). |
|
Return translated label for role field.
Definition at line 585 of file addressee.cpp. |
|
Set organization.
Definition at line 591 of file addressee.cpp. Referenced by KABC::VCard21Parser::readFromString(). |
|
Return organization.
Definition at line 599 of file addressee.cpp. Referenced by dump(). |
|
Return translated label for organization field.
Definition at line 604 of file addressee.cpp. |
|
Set note.
Definition at line 610 of file addressee.cpp. Referenced by KABC::VCard21Parser::readFromString(). |
|
Return note.
Definition at line 618 of file addressee.cpp. Referenced by dump(). |
|
Return translated label for note field.
Definition at line 623 of file addressee.cpp. |
|
Set product identifier.
Definition at line 629 of file addressee.cpp. |
|
Return product identifier.
Definition at line 637 of file addressee.cpp. Referenced by dump(). |
|
Return translated label for productId field.
Definition at line 642 of file addressee.cpp. |
|
Set revision date.
Definition at line 648 of file addressee.cpp. Referenced by KABC::AddressBook::insertAddressee(), and KABC::VCard21Parser::readFromString(). |
|
Return revision date.
Definition at line 656 of file addressee.cpp. Referenced by dump(). |
|
Return translated label for revision field.
Definition at line 661 of file addressee.cpp. |
|
Set sort string.
Definition at line 667 of file addressee.cpp. |
|
Return sort string.
Definition at line 675 of file addressee.cpp. Referenced by dump(). |
|
Return translated label for sortString field.
Definition at line 680 of file addressee.cpp. |
|
Set URL.
Definition at line 686 of file addressee.cpp. Referenced by KABC::VCard21Parser::readFromString(). |
|
Return URL.
Definition at line 694 of file addressee.cpp. Referenced by dump(). |
|
Return translated label for url field.
Definition at line 699 of file addressee.cpp. |
|
Set security class.
Definition at line 705 of file addressee.cpp. |
|
Return security class.
Definition at line 713 of file addressee.cpp. Referenced by dump(). |
|
Return translated label for secrecy field.
Definition at line 718 of file addressee.cpp. |
|
Set logo.
Definition at line 724 of file addressee.cpp. |
|
Return logo.
Definition at line 732 of file addressee.cpp. Referenced by dump(). |
|
Return translated label for logo field.
Definition at line 737 of file addressee.cpp. |
|
Set photo.
Definition at line 743 of file addressee.cpp. |
|
Return photo.
Definition at line 751 of file addressee.cpp. Referenced by dump(). |
|
Return translated label for photo field.
Definition at line 756 of file addressee.cpp. |
|
Set sound.
Definition at line 762 of file addressee.cpp. |
|
Return sound.
Definition at line 770 of file addressee.cpp. Referenced by dump(). |
|
Return translated label for sound field.
Definition at line 775 of file addressee.cpp. |
|
Set agent.
Definition at line 781 of file addressee.cpp. |
|
Return agent.
Definition at line 789 of file addressee.cpp. Referenced by dump(). |
|
Return translated label for agent field.
Definition at line 794 of file addressee.cpp. |
|
Set name fields by parsing the given string and trying to associate the parts of the string with according fields. This function should probably be a bit more clever. Definition at line 801 of file addressee.cpp. References additionalName(), QString::append(), QString::find(), QString::isEmpty(), QString::left(), QString::mid(), prefix(), QString::prepend(), setAdditionalName(), setFamilyName(), setFormattedName(), setGivenName(), setName(), setPrefix(), setSuffix(), QStringList::split(), and suffix(). |
|
Return the name of the addressee. This is calculated from all the name fields. Definition at line 941 of file addressee.cpp. References assembledName(), formattedName(), QString::isEmpty(), and name(). Referenced by KABC::AddresseeItem::AddresseeItem(), and fullEmail(). |
|
Return the name that consists of all name parts.
Definition at line 954 of file addressee.cpp. References additionalName(), familyName(), givenName(), name(), prefix(), QString::simplifyWhiteSpace(), and suffix(). Referenced by realName(). |
|
Return email address including real name.
Definition at line 962 of file addressee.cpp. References QString::find(), QString::isEmpty(), QString::isNull(), preferredEmail(), and realName(). Referenced by KABC::DistributionList::emails(). |
|
Insert an email address. If the email address already exists in this addressee it is not duplicated.
Definition at line 986 of file addressee.cpp. References QString::simplifyWhiteSpace(). Referenced by KABC::VCard21Parser::readFromString(). |
|
Remove email address. If the email address doesn't exist, nothing happens. Definition at line 1007 of file addressee.cpp. |
|
Return preferred email address. This is the first email address or the last one added with insertEmail() with a set preferred parameter. Definition at line 1017 of file addressee.cpp. References KSharedPtr< AddresseeData >::count(). Referenced by KABC::AddresseeItem::AddresseeItem(), and fullEmail(). |
|
Return list of all email addresses.
Definition at line 1023 of file addressee.cpp. Referenced by dump(). |
|
Set the emails to.
Definition at line 1027 of file addressee.cpp. |
|
Insert a phone number. If a phone number with the same id already exists in this addressee it is not duplicated. Definition at line 1031 of file addressee.cpp. References KABC::PhoneNumber::id(), KABC::PhoneNumber::number(), and QString::simplifyWhiteSpace(). Referenced by KABC::VCard21Parser::readFromString(). |
|
Remove phone number. If no phone number with the given id exists for this addresse nothing happens. Definition at line 1047 of file addressee.cpp. References KABC::PhoneNumber::id(). |
|
Return phone number, which matches the given type.
Definition at line 1060 of file addressee.cpp. References QString::isEmpty(), and KABC::PhoneNumber::number(). |
|
Return list of all phone numbers.
Definition at line 1076 of file addressee.cpp. Referenced by dump(). |
|
Return list of phone numbers with a special type.
Definition at line 1081 of file addressee.cpp. References QValueList::append(). |
|
Return phone number with the given id.
Definition at line 1094 of file addressee.cpp. |
|
Insert a key. If a key with the same id already exists in this addressee it is not duplicated. Definition at line 1105 of file addressee.cpp. References KABC::Key::id(), and KStdAccel::key(). |
|
Remove a key. If no key with the given id exists for this addresse nothing happens. Definition at line 1120 of file addressee.cpp. References KABC::Key::id(), and KStdAccel::key(). |
|
Return key, which matches the given type.
If Definition at line 1133 of file addressee.cpp. References QString::isEmpty(). |
|
Return list of all keys.
Definition at line 1159 of file addressee.cpp. Referenced by dump(). |
|
Set the list of keys.
Definition at line 1153 of file addressee.cpp. |
|
Return list of keys with a special type.
If Definition at line 1164 of file addressee.cpp. References QValueList::append(), and QString::isEmpty(). |
|
Return key with the given id.
Definition at line 1186 of file addressee.cpp. |
|
Insert an address. If an address with the same id already exists in this addressee it is not duplicated. Definition at line 1270 of file addressee.cpp. References KABC::Address::id(). Referenced by KABC::VCard21Parser::readFromString(). |
|
Remove address. If no address with the given id exists for this addresse nothing happens. Definition at line 1285 of file addressee.cpp. References KABC::Address::id(). |
|
Return address, which matches the given type.
Definition at line 1298 of file addressee.cpp. References KABC::Address::isEmpty(). |
|
Return list of all addresses.
Definition at line 1314 of file addressee.cpp. Referenced by dump(). |
|
Return list of addresses with a special type.
Definition at line 1319 of file addressee.cpp. References QValueList::append(). |
|
Return address with the given id.
Definition at line 1333 of file addressee.cpp. |
|
Insert category. If the category already exists it is not duplicated. Definition at line 1344 of file addressee.cpp. |
|
Remove category.
Definition at line 1354 of file addressee.cpp. |
|
Return, if addressee has the given category.
Definition at line 1364 of file addressee.cpp. |
|
Set categories to given value.
Definition at line 1369 of file addressee.cpp. |
|
Return list of all set categories.
Definition at line 1377 of file addressee.cpp. |
|
Insert custom entry. The entry is identified by the name of the inserting application and a unique name. If an entry with the given app and name already exists its value is replaced with the new given value. Definition at line 1382 of file addressee.cpp. References QString::isEmpty(), and QString::isNull(). |
|
Remove custom entry.
Definition at line 1403 of file addressee.cpp. |
|
Return value of custom entry, identified by app and entry name.
Definition at line 1418 of file addressee.cpp. References QString::mid(). |
|
Set all custom entries.
Definition at line 1434 of file addressee.cpp. |
|
Return list of all custom entries.
Definition at line 1442 of file addressee.cpp. |
|
Parse full email address. The result is given back in fullName and email. Definition at line 1447 of file addressee.cpp. References QString::find(), QString::left(), QString::length(), and QString::mid(). |
|
Debug output.
Definition at line 1202 of file addressee.cpp. References additionalName(), addresses(), agent(), KABC::Agent::asString(), KABC::Geo::asString(), KABC::TimeZone::asString(), QValueList::begin(), birthday(), emails(), QValueList::end(), familyName(), formattedName(), geo(), givenName(), keys(), logo(), mailer(), name(), nickName(), note(), organization(), phoneNumbers(), photo(), prefix(), productId(), revision(), role(), secrecy(), sortString(), sound(), suffix(), timeZone(), title(), QDateTime::toString(), uid(), KURL::url(), and url(). |
|
Returns string representation of the addressee.
Definition at line 1197 of file addressee.cpp. |
|
Set resource where the addressee is from.
Definition at line 1507 of file addressee.cpp. Referenced by KABC::AddressBook::insertAddressee(), KABC::VCardFormatPlugin::loadAll(), and KABC::BinaryFormat::loadAll(). |
|
Return pointer to resource.
Definition at line 1513 of file addressee.cpp. Referenced by KABC::AddressBook::insertAddressee(), and KABC::AddressBook::removeAddressee(). |
|
Mark addressee as changed.
Definition at line 1518 of file addressee.cpp. Referenced by KABC::AddressBook::insertAddressee(), KABC::VCardFormatPlugin::loadAll(), and KABC::BinaryFormat::loadAll(). |
|
Return whether the addressee is changed.
Definition at line 1524 of file addressee.cpp. |
|
Return, if the address book entry is empty.
|
|
Set unique identifier.
|
|
Return unique identifier.
|
|
Return translated label for uid field.
|
|
Set name fields by parsing the given string and trying to associate the parts of the string with according fields. This function should probably be a bit more clever. |
|
Return the name of the addressee. This is calculated from all the name fields. |
|
Return the name that consists of all name parts.
|
|
Return email address including real name.
|
|
Insert an email address. If the email address already exists in this addressee it is not duplicated.
|
|
Remove email address. If the email address doesn't exist, nothing happens. |
|
Return preferred email address. This is the first email address or the last one added with insertEmail() with a set preferred parameter. |
|
Return list of all email addresses.
|
|
Set the emails to.
|
|
Insert a phone number. If a phone number with the same id already exists in this addressee it is not duplicated. |
|
Remove phone number. If no phone number with the given id exists for this addresse nothing happens. |
|
Return phone number, which matches the given type.
|
|
Return list of all phone numbers.
|
|
Return list of phone numbers with a special type.
|
|
Return phone number with the given id.
|
|
Insert a key. If a key with the same id already exists in this addressee it is not duplicated. |
|
Remove a key. If no key with the given id exists for this addresse nothing happens. |
|
Return key, which matches the given type.
If |
|
Return list of all keys.
|
|
Set the list of keys.
|
|
Return list of keys with a special type.
If |
|
Return key with the given id.
|
|
Insert an address. If an address with the same id already exists in this addressee it is not duplicated. |
|
Remove address. If no address with the given id exists for this addresse nothing happens. |
|
Return address, which matches the given type.
|
|
Return list of all addresses.
|
|
Return list of addresses with a special type.
|
|
Return address with the given id.
|
|
Insert category. If the category already exists it is not duplicated. |
|
Remove category.
|
|
Return, if addressee has the given category.
|
|
Set categories to given value.
|
|
Return list of all set categories.
|
|
Insert custom entry. The entry is identified by the name of the inserting application and a unique name. If an entry with the given app and name already exists its value is replaced with the new given value. |
|
Remove custom entry.
|
|
Return value of custom entry, identified by app and entry name.
|
|
Set all custom entries.
|
|
Return list of all custom entries.
|
|
Parse full email address. The result is given back in fullName and email. |
|
Debug output.
|
|
Returns string representation of the addressee.
|
|
Set resource where the addressee is from.
|
|
Return pointer to resource.
|
|
Mark addressee as changed.
|
|
Return whether the addressee is changed.
|
The documentation for this class was generated from the following files: