KABC::Addressee Class Reference
#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 75 of file addressee.h.
Constructor & Destructor Documentation
Addressee::Addressee | ( | ) |
KABC::Addressee::Addressee | ( | ) |
Construct an empty address book entry.
Member Function Documentation
bool Addressee::isEmpty | ( | ) | const |
void Addressee::setUid | ( | const QString & | uid | ) |
QString Addressee::uid | ( | ) | const |
QString Addressee::uidLabel | ( | ) | [static] |
void Addressee::setName | ( | const QString & | name | ) |
QString Addressee::name | ( | ) | const |
QString Addressee::nameLabel | ( | ) | [static] |
void Addressee::setFormattedName | ( | const QString & | formattedName | ) |
QString Addressee::formattedName | ( | ) | const |
QString Addressee::formattedNameLabel | ( | ) | [static] |
void Addressee::setFamilyName | ( | const QString & | familyName | ) |
QString Addressee::familyName | ( | ) | const |
QString Addressee::familyNameLabel | ( | ) | [static] |
void Addressee::setGivenName | ( | const QString & | givenName | ) |
QString Addressee::givenName | ( | ) | const |
QString Addressee::givenNameLabel | ( | ) | [static] |
void Addressee::setAdditionalName | ( | const QString & | additionalName | ) |
QString Addressee::additionalName | ( | ) | const |
QString Addressee::additionalNameLabel | ( | ) | [static] |
void Addressee::setPrefix | ( | const QString & | prefix | ) |
QString Addressee::prefix | ( | ) | const |
QString Addressee::prefixLabel | ( | ) | [static] |
void Addressee::setSuffix | ( | const QString & | suffix | ) |
QString Addressee::suffix | ( | ) | const |
QString Addressee::suffixLabel | ( | ) | [static] |
void Addressee::setNickName | ( | const QString & | nickName | ) |
QString Addressee::nickName | ( | ) | const |
QString Addressee::nickNameLabel | ( | ) | [static] |
void Addressee::setBirthday | ( | const QDateTime & | birthday | ) |
QDateTime Addressee::birthday | ( | ) | const |
QString Addressee::birthdayLabel | ( | ) | [static] |
QString Addressee::homeAddressStreetLabel | ( | ) | [static] |
QString Addressee::homeAddressLocalityLabel | ( | ) | [static] |
Return translated label for homeAddressLocality field.
Definition at line 491 of file addressee.cpp.
QString Addressee::homeAddressRegionLabel | ( | ) | [static] |
QString Addressee::homeAddressPostalCodeLabel | ( | ) | [static] |
Return translated label for homeAddressPostalCode field.
Definition at line 503 of file addressee.cpp.
QString Addressee::homeAddressCountryLabel | ( | ) | [static] |
QString Addressee::homeAddressLabelLabel | ( | ) | [static] |
QString Addressee::businessAddressStreetLabel | ( | ) | [static] |
Return translated label for businessAddressStreet field.
Definition at line 521 of file addressee.cpp.
QString Addressee::businessAddressLocalityLabel | ( | ) | [static] |
Return translated label for businessAddressLocality field.
Definition at line 527 of file addressee.cpp.
QString Addressee::businessAddressRegionLabel | ( | ) | [static] |
Return translated label for businessAddressRegion field.
Definition at line 533 of file addressee.cpp.
QString Addressee::businessAddressPostalCodeLabel | ( | ) | [static] |
Return translated label for businessAddressPostalCode field.
Definition at line 539 of file addressee.cpp.
QString Addressee::businessAddressCountryLabel | ( | ) | [static] |
Return translated label for businessAddressCountry field.
Definition at line 545 of file addressee.cpp.
QString Addressee::businessAddressLabelLabel | ( | ) | [static] |
Return translated label for businessAddressLabel field.
Definition at line 551 of file addressee.cpp.
QString Addressee::homePhoneLabel | ( | ) | [static] |
QString Addressee::businessPhoneLabel | ( | ) | [static] |
QString Addressee::mobilePhoneLabel | ( | ) | [static] |
QString Addressee::homeFaxLabel | ( | ) | [static] |
QString Addressee::businessFaxLabel | ( | ) | [static] |
QString Addressee::carPhoneLabel | ( | ) | [static] |
QString Addressee::isdnLabel | ( | ) | [static] |
QString Addressee::pagerLabel | ( | ) | [static] |
QString Addressee::emailLabel | ( | ) | [static] |
void Addressee::setMailer | ( | const QString & | mailer | ) |
QString Addressee::mailer | ( | ) | const |
QString Addressee::mailerLabel | ( | ) | [static] |
void Addressee::setTimeZone | ( | const TimeZone & | timeZone | ) |
TimeZone Addressee::timeZone | ( | ) | const |
QString Addressee::timeZoneLabel | ( | ) | [static] |
void Addressee::setGeo | ( | const Geo & | geo | ) |
Geo Addressee::geo | ( | ) | const |
QString Addressee::geoLabel | ( | ) | [static] |
void Addressee::setTitle | ( | const QString & | title | ) |
QString Addressee::title | ( | ) | const |
QString Addressee::titleLabel | ( | ) | [static] |
void Addressee::setRole | ( | const QString & | role | ) |
QString Addressee::role | ( | ) | const |
QString Addressee::roleLabel | ( | ) | [static] |
void Addressee::setOrganization | ( | const QString & | organization | ) |
QString Addressee::organization | ( | ) | const |
QString Addressee::organizationLabel | ( | ) | [static] |
void Addressee::setNote | ( | const QString & | note | ) |
QString Addressee::note | ( | ) | const |
QString Addressee::noteLabel | ( | ) | [static] |
void Addressee::setProductId | ( | const QString & | productId | ) |
QString Addressee::productId | ( | ) | const |
QString Addressee::productIdLabel | ( | ) | [static] |
void Addressee::setRevision | ( | const QDateTime & | revision | ) |
QDateTime Addressee::revision | ( | ) | const |
QString Addressee::revisionLabel | ( | ) | [static] |
void Addressee::setSortString | ( | const QString & | sortString | ) |
QString Addressee::sortString | ( | ) | const |
QString Addressee::sortStringLabel | ( | ) | [static] |
void Addressee::setUrl | ( | const KURL & | url | ) |
KURL Addressee::url | ( | ) | const |
QString Addressee::urlLabel | ( | ) | [static] |
void Addressee::setSecrecy | ( | const Secrecy & | secrecy | ) |
Secrecy Addressee::secrecy | ( | ) | const |
QString Addressee::secrecyLabel | ( | ) | [static] |
void Addressee::setLogo | ( | const Picture & | logo | ) |
Picture Addressee::logo | ( | ) | const |
QString Addressee::logoLabel | ( | ) | [static] |
void Addressee::setPhoto | ( | const Picture & | photo | ) |
Picture Addressee::photo | ( | ) | const |
QString Addressee::photoLabel | ( | ) | [static] |
void Addressee::setSound | ( | const Sound & | sound | ) |
Sound Addressee::sound | ( | ) | const |
QString Addressee::soundLabel | ( | ) | [static] |
void Addressee::setAgent | ( | const Agent & | agent | ) |
Agent Addressee::agent | ( | ) | const |
QString Addressee::agentLabel | ( | ) | [static] |
DEFINITIONS void Addressee::setNameFromString | ( | const QString & | ) |
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 916 of file addressee.cpp.
QString Addressee::realName | ( | ) | const |
Return the name of the addressee.
This is calculated from all the name fields.
Definition at line 1073 of file addressee.cpp.
QString Addressee::assembledName | ( | ) | const |
Return email address including real name.
- Parameters:
-
email Email address to be used to construct the full email string. If this is QString::null the preferred email address is used.
Definition at line 1098 of file addressee.cpp.
void Addressee::insertEmail | ( | const QString & | email, | |
bool | preferred = false | |||
) |
Insert an email address.
If the email address already exists in this addressee it is not duplicated.
- Parameters:
-
email Email address preferred Set to true, if this is the preferred email address of the addressee.
Definition at line 1122 of file addressee.cpp.
void Addressee::removeEmail | ( | const QString & | ) |
Remove email address.
If the email address doesn't exist, nothing happens.
Definition at line 1145 of file addressee.cpp.
QString Addressee::preferredEmail | ( | ) | const |
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 1155 of file addressee.cpp.
QStringList Addressee::emails | ( | ) | const |
void Addressee::setEmails | ( | const QStringList & | list | ) |
Set the emails to list
.
The first email address gets the preferred one!
- Parameters:
-
list The list of email addresses.
Definition at line 1165 of file addressee.cpp.
void Addressee::insertPhoneNumber | ( | const PhoneNumber & | phoneNumber | ) |
Insert a phone number.
If a phone number with the same id already exists in this addressee it is not duplicated.
Definition at line 1170 of file addressee.cpp.
void Addressee::removePhoneNumber | ( | const PhoneNumber & | phoneNumber | ) |
Remove phone number.
If no phone number with the given id exists for this addresse nothing happens.
Definition at line 1186 of file addressee.cpp.
PhoneNumber Addressee::phoneNumber | ( | int | type | ) | const |
PhoneNumber::List Addressee::phoneNumbers | ( | ) | const |
PhoneNumber::List Addressee::phoneNumbers | ( | int | type | ) | const |
PhoneNumber Addressee::findPhoneNumber | ( | const QString & | id | ) | const |
void Addressee::insertKey | ( | const Key & | key | ) |
Insert a key.
If a key with the same id already exists in this addressee it is not duplicated.
Definition at line 1244 of file addressee.cpp.
void Addressee::removeKey | ( | const Key & | key | ) |
Remove a key.
If no key with the given id exists for this addresse nothing happens.
Definition at line 1259 of file addressee.cpp.
Return key, which matches the given type.
If type
== Key::Custom you can specify a string that should match. If you leave the string empty, the first key with a custom value is returned.
Definition at line 1272 of file addressee.cpp.
Key::List Addressee::keys | ( | ) | const |
void Addressee::setKeys | ( | const Key::List & | keys | ) |
Set the list of keys.
- Parameters:
-
keys The keys to be set.
Definition at line 1292 of file addressee.cpp.
Return list of keys with a special type.
If type
== Key::Custom you can specify a string that should match. If you leave the string empty, all custom keys will be returned.
Definition at line 1303 of file addressee.cpp.
void Addressee::insertAddress | ( | const Address & | address | ) |
Insert an address.
If an address with the same id already exists in this addressee it is not duplicated.
Definition at line 1409 of file addressee.cpp.
void Addressee::removeAddress | ( | const Address & | address | ) |
Remove address.
If no address with the given id exists for this addresse nothing happens.
Definition at line 1428 of file addressee.cpp.
Address Addressee::address | ( | int | type | ) | const |
Address::List Addressee::addresses | ( | ) | const |
Address::List Addressee::addresses | ( | int | type | ) | const |
void Addressee::insertCategory | ( | const QString & | ) |
Insert category.
If the category already exists it is not duplicated.
Definition at line 1487 of file addressee.cpp.
void Addressee::removeCategory | ( | const QString & | ) |
bool Addressee::hasCategory | ( | const QString & | ) | const |
void Addressee::setCategories | ( | const QStringList & | ) |
QStringList Addressee::categories | ( | ) | const |
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.
An empty value isn't allowed (nothing happens if this is called with any of the three arguments being empty)
Definition at line 1525 of file addressee.cpp.
Return value of custom entry, identified by app and entry name.
Definition at line 1561 of file addressee.cpp.
void Addressee::setCustoms | ( | const QStringList & | ) |
QStringList Addressee::customs | ( | ) | const |
void Addressee::parseEmailAddress | ( | const QString & | rawEmail, | |
QString & | fullName, | |||
QString & | ||||
) | [static] |
Parse full email address.
The result is given back in fullName and email.
Definition at line 1590 of file addressee.cpp.
void Addressee::dump | ( | ) | const |
QString Addressee::asString | ( | ) | const |
void Addressee::setResource | ( | Resource * | resource | ) |
Resource * Addressee::resource | ( | ) | const |
void Addressee::setChanged | ( | bool | value | ) |
bool Addressee::changed | ( | ) | const |
bool KABC::Addressee::isEmpty | ( | ) | const |
Return, if the address book entry is empty.
void KABC::Addressee::setUid | ( | const QString & | uid | ) |
Set unique identifier.
QString KABC::Addressee::uid | ( | ) | const |
Return unique identifier.
static QString KABC::Addressee::uidLabel | ( | ) | [static] |
Return translated label for uid field.
DECLARATIONS void KABC::Addressee::setNameFromString | ( | const QString & | ) |
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.
QString KABC::Addressee::realName | ( | ) | const |
Return the name of the addressee.
This is calculated from all the name fields.
QString KABC::Addressee::assembledName | ( | ) | const |
Return the name that consists of all name parts.
Return email address including real name.
- Parameters:
-
email Email address to be used to construct the full email string. If this is QString::null the preferred email address is used.
void KABC::Addressee::insertEmail | ( | const QString & | email, | |
bool | preferred = false | |||
) |
Insert an email address.
If the email address already exists in this addressee it is not duplicated.
- Parameters:
-
email Email address preferred Set to true, if this is the preferred email address of the addressee.
void KABC::Addressee::removeEmail | ( | const QString & | ) |
Remove email address.
If the email address doesn't exist, nothing happens.
QString KABC::Addressee::preferredEmail | ( | ) | const |
Return preferred email address.
This is the first email address or the last one added with insertEmail() with a set preferred parameter.
QStringList KABC::Addressee::emails | ( | ) | const |
Return list of all email addresses.
void KABC::Addressee::setEmails | ( | const QStringList & | list | ) |
Set the emails to list
.
The first email address gets the preferred one!
- Parameters:
-
list The list of email addresses.
void KABC::Addressee::insertPhoneNumber | ( | const PhoneNumber & | phoneNumber | ) |
Insert a phone number.
If a phone number with the same id already exists in this addressee it is not duplicated.
void KABC::Addressee::removePhoneNumber | ( | const PhoneNumber & | phoneNumber | ) |
Remove phone number.
If no phone number with the given id exists for this addresse nothing happens.
PhoneNumber KABC::Addressee::phoneNumber | ( | int | type | ) | const |
Return phone number, which matches the given type.
PhoneNumber::List KABC::Addressee::phoneNumbers | ( | ) | const |
Return list of all phone numbers.
PhoneNumber::List KABC::Addressee::phoneNumbers | ( | int | type | ) | const |
Return list of phone numbers with a special type.
PhoneNumber KABC::Addressee::findPhoneNumber | ( | const QString & | id | ) | const |
Return phone number with the given id.
void KABC::Addressee::insertKey | ( | const Key & | key | ) |
Insert a key.
If a key with the same id already exists in this addressee it is not duplicated.
void KABC::Addressee::removeKey | ( | const Key & | key | ) |
Remove a key.
If no key with the given id exists for this addresse nothing happens.
Return key, which matches the given type.
If type
== Key::Custom you can specify a string that should match. If you leave the string empty, the first key with a custom value is returned.
Key::List KABC::Addressee::keys | ( | ) | const |
Return list of all keys.
void KABC::Addressee::setKeys | ( | const Key::List & | keys | ) |
Set the list of keys.
- Parameters:
-
keys The keys to be set.
Return list of keys with a special type.
If type
== Key::Custom you can specify a string that should match. If you leave the string empty, all custom keys will be returned.
void KABC::Addressee::insertAddress | ( | const Address & | address | ) |
Insert an address.
If an address with the same id already exists in this addressee it is not duplicated.
void KABC::Addressee::removeAddress | ( | const Address & | address | ) |
Remove address.
If no address with the given id exists for this addresse nothing happens.
Address KABC::Addressee::address | ( | int | type | ) | const |
Return address, which matches the given type.
Address::List KABC::Addressee::addresses | ( | ) | const |
Return list of all addresses.
Address::List KABC::Addressee::addresses | ( | int | type | ) | const |
Return list of addresses with a special type.
void KABC::Addressee::insertCategory | ( | const QString & | ) |
Insert category.
If the category already exists it is not duplicated.
void KABC::Addressee::removeCategory | ( | const QString & | ) |
Remove category.
bool KABC::Addressee::hasCategory | ( | const QString & | ) | const |
Return, if addressee has the given category.
void KABC::Addressee::setCategories | ( | const QStringList & | ) |
Set categories to given value.
QStringList KABC::Addressee::categories | ( | ) | const |
Return list of all set categories.
void KABC::Addressee::insertCustom | ( | const QString & | app, | |
const QString & | name, | |||
const QString & | value | |||
) |
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.
An empty value isn't allowed (nothing happens if this is called with any of the three arguments being empty)
Remove custom entry.
Return value of custom entry, identified by app and entry name.
void KABC::Addressee::setCustoms | ( | const QStringList & | ) |
Set all custom entries.
QStringList KABC::Addressee::customs | ( | ) | const |
Return list of all custom entries.
static void KABC::Addressee::parseEmailAddress | ( | const QString & | rawEmail, | |
QString & | fullName, | |||
QString & | ||||
) | [static] |
Parse full email address.
The result is given back in fullName and email.
void KABC::Addressee::dump | ( | ) | const |
Debug output.
QString KABC::Addressee::asString | ( | ) | const |
Returns string representation of the addressee.
void KABC::Addressee::setResource | ( | Resource * | resource | ) |
Set resource where the addressee is from.
Resource* KABC::Addressee::resource | ( | ) | const |
Return pointer to resource.
void KABC::Addressee::setChanged | ( | bool | value | ) |
Mark addressee as changed.
bool KABC::Addressee::changed | ( | ) | const |
Return whether the addressee is changed.
The documentation for this class was generated from the following files: