KABC::Addressee Class Reference
address book entry More...
#include <addressee.h>
Public Types | |
typedef QValueList< Addressee > | List |
typedef QValueList< Addressee > | List |
Public Member Functions | |
Addressee () | |
Construct an empty address book entry. | |
Addressee (const Addressee &) | |
Addressee & | operator= (const Addressee &) |
bool | operator== (const Addressee &) const |
bool | operator!= (const Addressee &) const |
bool | isEmpty () const |
Return, if the address book entry is empty. | |
void | setUid (const QString &uid) |
Set unique identifier. | |
QString | uid () const |
Return unique identifier. | |
void | setName (const QString &name) |
Set name. | |
QString | name () const |
Return name. | |
void | setFormattedName (const QString &formattedName) |
Set formatted name. | |
QString | formattedName () const |
Return formatted name. | |
void | setFamilyName (const QString &familyName) |
Set family name. | |
QString | familyName () const |
Return family name. | |
void | setGivenName (const QString &givenName) |
Set given name. | |
QString | givenName () const |
Return given name. | |
void | setAdditionalName (const QString &additionalName) |
Set additional names. | |
QString | additionalName () const |
Return additional names. | |
void | setPrefix (const QString &prefix) |
Set honorific prefixes. | |
QString | prefix () const |
Return honorific prefixes. | |
void | setSuffix (const QString &suffix) |
Set honorific suffixes. | |
QString | suffix () const |
Return honorific suffixes. | |
void | setNickName (const QString &nickName) |
Set nick name. | |
QString | nickName () const |
Return nick name. | |
void | setBirthday (const QDateTime &birthday) |
Set birthday. | |
QDateTime | birthday () const |
Return birthday. | |
void | setMailer (const QString &mailer) |
Set mail client. | |
QString | mailer () const |
Return mail client. | |
void | setTimeZone (const TimeZone &timeZone) |
Set time zone. | |
TimeZone | timeZone () const |
Return time zone. | |
void | setGeo (const Geo &geo) |
Set geographic position. | |
Geo | geo () const |
Return geographic position. | |
void | setTitle (const QString &title) |
Set title. | |
QString | title () const |
Return title. | |
void | setRole (const QString &role) |
Set role. | |
QString | role () const |
Return role. | |
void | setOrganization (const QString &organization) |
Set organization. | |
QString | organization () const |
Return organization. | |
void | setNote (const QString ¬e) |
Set note. | |
QString | note () const |
Return note. | |
void | setProductId (const QString &productId) |
Set product identifier. | |
QString | productId () const |
Return product identifier. | |
void | setRevision (const QDateTime &revision) |
Set revision date. | |
QDateTime | revision () const |
Return revision date. | |
void | setSortString (const QString &sortString) |
Set sort string. | |
QString | sortString () const |
Return sort string. | |
void | setUrl (const KURL &url) |
Set URL. | |
KURL | url () const |
Return URL. | |
void | setSecrecy (const Secrecy &secrecy) |
Set security class. | |
Secrecy | secrecy () const |
Return security class. | |
void | setLogo (const Picture &logo) |
Set logo. | |
Picture | logo () const |
Return logo. | |
void | setPhoto (const Picture &photo) |
Set photo. | |
Picture | photo () const |
Return photo. | |
void | setSound (const Sound &sound) |
Set sound. | |
Sound | sound () const |
Return sound. | |
void | setAgent (const Agent &agent) |
Set agent. | |
Agent | agent () const |
Return agent. | |
void | setNameFromString (const QString &) |
Set name fields by parsing the given string and trying to associate the parts of the string with according fields. | |
QString | realName () const |
Return the name of the addressee. | |
QString | assembledName () const |
Return the name that consists of all name parts. | |
QString | fullEmail (const QString &email=QString::null) const |
Return email address including real name. | |
void | insertEmail (const QString &email, bool preferred=false) |
Insert an email address. | |
void | removeEmail (const QString &email) |
Remove email address. | |
QString | preferredEmail () const |
Return preferred email address. | |
QStringList | emails () const |
Return list of all email addresses. | |
void | insertPhoneNumber (const PhoneNumber &phoneNumber) |
Insert a phone number. | |
void | removePhoneNumber (const PhoneNumber &phoneNumber) |
Remove phone number. | |
PhoneNumber | phoneNumber (int type) const |
Return phone number, which matches the given type. | |
PhoneNumber::List | phoneNumbers () const |
Return list of all phone numbers. | |
PhoneNumber::List | phoneNumbers (int type) const |
Return list of phone numbers with a special type. | |
PhoneNumber | findPhoneNumber (const QString &id) const |
Return phone number with the given id. | |
void | insertKey (const Key &key) |
Insert a key. | |
void | removeKey (const Key &key) |
Remove a key. | |
Key | key (int type, QString customTypeString=QString::null) const |
Return key, which matches the given type. | |
Key::List | keys () const |
Return list of all keys. | |
Key::List | keys (int type, QString customTypeString=QString::null) const |
Return list of keys with a special type. | |
Key | findKey (const QString &id) const |
Return key with the given id. | |
void | insertAddress (const Address &address) |
Insert an address. | |
void | removeAddress (const Address &address) |
Remove address. | |
Address | address (int type) const |
Return address, which matches the given type. | |
Address::List | addresses () const |
Return list of all addresses. | |
Address::List | addresses (int type) const |
Return list of addresses with a special type. | |
Address | findAddress (const QString &id) const |
Return address with the given id. | |
void | insertCategory (const QString &) |
Insert category. | |
void | removeCategory (const QString &) |
Remove category. | |
bool | hasCategory (const QString &) const |
Return, if addressee has the given category. | |
void | setCategories (const QStringList &) |
Set categories to given value. | |
QStringList | categories () const |
Return list of all set categories. | |
void | insertCustom (const QString &app, const QString &name, const QString &value) |
Insert custom entry. | |
void | removeCustom (const QString &app, const QString &name) |
Remove custom entry. | |
QString | custom (const QString &app, const QString &name) const |
Return value of custom entry, identified by app and entry name. | |
void | setCustoms (const QStringList &) |
Set all custom entries. | |
QStringList | customs () const |
Return list of all custom entries. | |
void | dump () const |
Debug output. | |
QString | asString () const |
Returns string representation of the addressee. | |
void | setResource (Resource *resource) |
Set resource where the addressee is from. | |
Resource * | resource () const |
Return pointer to resource. | |
void | setChanged (bool value) |
Mark addressee as changed. | |
bool | changed () const |
Return whether the addressee is changed. | |
Addressee () | |
Construct an empty address book entry. | |
Addressee (const Addressee &) | |
Addressee & | operator= (const Addressee &) |
bool | operator== (const Addressee &) const |
bool | operator!= (const Addressee &) const |
bool | isEmpty () const |
Return, if the address book entry is empty. | |
DECLARATIONS void | setNameFromString (const QString &) |
Set name fields by parsing the given string and trying to associate the parts of the string with according fields. | |
QString | realName () const |
Return the name of the addressee. | |
QString | assembledName () const |
Return the name that consists of all name parts. | |
QString | fullEmail (const QString &email=QString::null) const |
Return email address including real name. | |
void | insertEmail (const QString &email, bool preferred=false) |
Insert an email address. | |
void | removeEmail (const QString &email) |
Remove email address. | |
QString | preferredEmail () const |
Return preferred email address. | |
QStringList | emails () const |
Return list of all email addresses. | |
void | insertPhoneNumber (const PhoneNumber &phoneNumber) |
Insert a phone number. | |
void | removePhoneNumber (const PhoneNumber &phoneNumber) |
Remove phone number. | |
PhoneNumber | phoneNumber (int type) const |
Return phone number, which matches the given type. | |
PhoneNumber::List | phoneNumbers () const |
Return list of all phone numbers. | |
PhoneNumber::List | phoneNumbers (int type) const |
Return list of phone numbers with a special type. | |
PhoneNumber | findPhoneNumber (const QString &id) const |
Return phone number with the given id. | |
void | insertKey (const Key &key) |
Insert a key. | |
void | removeKey (const Key &key) |
Remove a key. | |
Key | key (int type, QString customTypeString=QString::null) const |
Return key, which matches the given type. | |
Key::List | keys () const |
Return list of all keys. | |
Key::List | keys (int type, QString customTypeString=QString::null) const |
Return list of keys with a special type. | |
Key | findKey (const QString &id) const |
Return key with the given id. | |
void | insertAddress (const Address &address) |
Insert an address. | |
void | removeAddress (const Address &address) |
Remove address. | |
Address | address (int type) const |
Return address, which matches the given type. | |
Address::List | addresses () const |
Return list of all addresses. | |
Address::List | addresses (int type) const |
Return list of addresses with a special type. | |
Address | findAddress (const QString &id) const |
Return address with the given id. | |
void | insertCategory (const QString &) |
Insert category. | |
void | removeCategory (const QString &) |
Remove category. | |
bool | hasCategory (const QString &) const |
Return, if addressee has the given category. | |
void | setCategories (const QStringList &) |
Set categories to given value. | |
QStringList | categories () const |
Return list of all set categories. | |
void | insertCustom (const QString &app, const QString &name, const QString &value) |
Insert custom entry. | |
void | removeCustom (const QString &app, const QString &name) |
Remove custom entry. | |
QString | custom (const QString &app, const QString &name) const |
Return value of custom entry, identified by app and entry name. | |
void | setCustoms (const QStringList &) |
Set all custom entries. | |
QStringList | customs () const |
Return list of all custom entries. | |
void | dump () const |
Debug output. | |
QString | asString () const |
Returns string representation of the addressee. | |
void | setResource (Resource *resource) |
Set resource where the addressee is from. | |
Resource * | resource () const |
Return pointer to resource. | |
void | setChanged (bool value) |
Mark addressee as changed. | |
bool | changed () const |
Return whether the addressee is changed. | |
Static Public Member Functions | |
QString | uidLabel () |
Return translated label for uid field. | |
QString | nameLabel () |
Return translated label for name field. | |
QString | formattedNameLabel () |
Return translated label for formattedName field. | |
QString | familyNameLabel () |
Return translated label for familyName field. | |
QString | givenNameLabel () |
Return translated label for givenName field. | |
QString | additionalNameLabel () |
Return translated label for additionalName field. | |
QString | prefixLabel () |
Return translated label for prefix field. | |
QString | suffixLabel () |
Return translated label for suffix field. | |
QString | nickNameLabel () |
Return translated label for nickName field. | |
QString | birthdayLabel () |
Return translated label for birthday field. | |
QString | homeAddressStreetLabel () |
Return translated label for homeAddressStreet field. | |
QString | homeAddressLocalityLabel () |
Return translated label for homeAddressLocality field. | |
QString | homeAddressRegionLabel () |
Return translated label for homeAddressRegion field. | |
QString | homeAddressPostalCodeLabel () |
Return translated label for homeAddressPostalCode field. | |
QString | homeAddressCountryLabel () |
Return translated label for homeAddressCountry field. | |
QString | homeAddressLabelLabel () |
Return translated label for homeAddressLabel field. | |
QString | businessAddressStreetLabel () |
Return translated label for businessAddressStreet field. | |
QString | businessAddressLocalityLabel () |
Return translated label for businessAddressLocality field. | |
QString | businessAddressRegionLabel () |
Return translated label for businessAddressRegion field. | |
QString | businessAddressPostalCodeLabel () |
Return translated label for businessAddressPostalCode field. | |
QString | businessAddressCountryLabel () |
Return translated label for businessAddressCountry field. | |
QString | businessAddressLabelLabel () |
Return translated label for businessAddressLabel field. | |
QString | homePhoneLabel () |
Return translated label for homePhone field. | |
QString | businessPhoneLabel () |
Return translated label for businessPhone field. | |
QString | mobilePhoneLabel () |
Return translated label for mobilePhone field. | |
QString | homeFaxLabel () |
Return translated label for homeFax field. | |
QString | businessFaxLabel () |
Return translated label for businessFax field. | |
QString | carPhoneLabel () |
Return translated label for carPhone field. | |
QString | isdnLabel () |
Return translated label for isdn field. | |
QString | pagerLabel () |
Return translated label for pager field. | |
QString | emailLabel () |
Return translated label for email field. | |
QString | mailerLabel () |
Return translated label for mailer field. | |
QString | timeZoneLabel () |
Return translated label for timeZone field. | |
QString | geoLabel () |
Return translated label for geo field. | |
QString | titleLabel () |
Return translated label for title field. | |
QString | roleLabel () |
Return translated label for role field. | |
QString | organizationLabel () |
Return translated label for organization field. | |
QString | noteLabel () |
Return translated label for note field. | |
QString | productIdLabel () |
Return translated label for productId field. | |
QString | revisionLabel () |
Return translated label for revision field. | |
QString | sortStringLabel () |
Return translated label for sortString field. | |
QString | urlLabel () |
Return translated label for url field. | |
QString | secrecyLabel () |
Return translated label for secrecy field. | |
QString | logoLabel () |
Return translated label for logo field. | |
QString | photoLabel () |
Return translated label for photo field. | |
QString | soundLabel () |
Return translated label for sound field. | |
QString | agentLabel () |
Return translated label for agent field. | |
void | parseEmailAddress (const QString &rawEmail, QString &fullName, QString &email) |
Parse full email address. | |
void | parseEmailAddress (const QString &rawEmail, QString &fullName, QString &email) |
Parse full email address. | |
Friends | |
QDataStream & | operator<< (QDataStream &, const Addressee &) |
QDataStream & | operator>> (QDataStream &, Addressee &) |
QDataStream & | operator<< (QDataStream &, const Addressee &) |
QDataStream & | operator>> (QDataStream &, Addressee &) |
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 73 of file addressee.h.
Constructor & Destructor Documentation
|
Construct an empty address book entry.
|
|
Construct an empty address book entry.
|
Member Function Documentation
|
Return, if the address book entry is empty.
Referenced by KABC::DistributionListManager::load(). |
|
Set unique identifier.
|
|
Return unique identifier.
Referenced by KABC::DistributionList::insertEntry(), and KABC::DistributionList::removeEntry(). |
|
Return translated label for uid field.
|
|
Set name.
|
|
Return name.
|
|
Return translated label for name field.
|
|
Set formatted name.
|
|
Return formatted name.
|
|
Return translated label for formattedName field.
|
|
Set family name.
|
|
Return family name.
|
|
Return translated label for familyName field.
|
|
Set given name.
|
|
Return given name.
|
|
Return translated label for givenName field.
|
|
Set additional names.
|
|
Return additional names.
|
|
Return translated label for additionalName field.
|
|
Set honorific prefixes.
|
|
Return honorific prefixes.
|
|
Return translated label for prefix field.
|
|
Set honorific suffixes.
|
|
Return honorific suffixes.
|
|
Return translated label for suffix field.
|
|
Set nick name.
|
|
Return nick name.
|
|
Return translated label for nickName field.
|
|
Set birthday.
|
|
Return birthday.
|
|
Return translated label for birthday field.
|
|
Return translated label for homeAddressStreet field.
|
|
Return translated label for homeAddressLocality field.
|
|
Return translated label for homeAddressRegion field.
|
|
Return translated label for homeAddressPostalCode field.
|
|
Return translated label for homeAddressCountry field.
|
|
Return translated label for homeAddressLabel field.
|
|
Return translated label for businessAddressStreet field.
|
|
Return translated label for businessAddressLocality field.
|
|
Return translated label for businessAddressRegion field.
|
|
Return translated label for businessAddressPostalCode field.
|
|
Return translated label for businessAddressCountry field.
|
|
Return translated label for businessAddressLabel field.
|
|
Return translated label for homePhone field.
|
|
Return translated label for businessPhone field.
|
|
Return translated label for mobilePhone field.
|
|
Return translated label for homeFax field.
|
|
Return translated label for businessFax field.
|
|
Return translated label for carPhone field.
|
|
Return translated label for isdn field.
|
|
Return translated label for pager field.
|
|
Return translated label for email field.
|
|
Set mail client.
|
|
Return mail client.
|
|
Return translated label for mailer field.
|
|
Set time zone.
|
|
Return time zone.
|
|
Return translated label for timeZone field.
|
|
Set geographic position.
|
|
Return geographic position.
|
|
Return translated label for geo field.
|
|
Set title.
|
|
Return title.
|
|
Return translated label for title field.
|
|
Set role.
|
|
Return role.
|
|
Return translated label for role field.
|
|
Set organization.
|
|
Return organization.
|
|
Return translated label for organization field.
|
|
Set note.
|
|
Return note.
|
|
Return translated label for note field.
|
|
Set product identifier.
|
|
Return product identifier.
|
|
Return translated label for productId field.
|
|
Set revision date.
|
|
Return revision date.
|
|
Return translated label for revision field.
|
|
Set sort string.
|
|
Return sort string.
|
|
Return translated label for sortString field.
|
|
Set URL.
|
|
Return URL.
|
|
Return translated label for url field.
|
|
Set security class.
|
|
Return security class.
|
|
Return translated label for secrecy field.
|
|
Set logo.
|
|
Return logo.
|
|
Return translated label for logo field.
|
|
Set photo.
|
|
Return photo.
|
|
Return translated label for photo field.
|
|
Set sound.
|
|
Return sound.
|
|
Return translated label for sound field.
|
|
Set agent.
|
|
Return agent.
|
|
Return translated label for agent 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. Referenced by KABC::AddresseeItem::AddresseeItem(). |
|
Return the name that consists of all name parts.
|
|
Return email address including real name.
Referenced by KABC::DistributionList::emails(). |
|
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 isnertEmail() with a set preferred parameter. Referenced by KABC::AddresseeItem::AddresseeItem(). |
|
Return list of all email addresses.
|
|
Insert a phone number. If a phoen 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.
|
|
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.
Referenced by KABC::BinaryFormat::loadAll(). |
|
Return pointer to resource.
|
|
Mark addressee as changed.
|
|
Return whether the addressee is changed.
|
|
Return, if the address book entry is empty.
|
|
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 isnertEmail() with a set preferred parameter. |
|
Return list of all email addresses.
|
|
Insert a phone number. If a phoen 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.
|
|
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: