kabc
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 72 of file addressee.h.
Member Typedef Documentation
typedef AddresseeList KABC::Addressee::List |
typedef QMap<QString, Addressee> KABC::Addressee::Map |
A map from unique identifier to addressee.
- See also:
- uid()
Definition at line 87 of file addressee.h.
Constructor & Destructor Documentation
Addressee::Addressee | ( | ) |
Addressee::~Addressee | ( | ) |
Addressee::Addressee | ( | const Addressee & | other | ) |
Member Function Documentation
QString Addressee::additionalName | ( | ) | const |
QString Addressee::additionalNameLabel | ( | ) | [static] |
Address Addressee::address | ( | Address::Type | type | ) | const |
Return address, which matches the given type.
- Parameters:
-
type The type of address to look for
Definition at line 1423 of file addressee.cpp.
Address::List Addressee::addresses | ( | Address::Type | type | ) | const |
Return list of addresses with a special type.
- Parameters:
-
type The type of addresses to look for
Definition at line 1444 of file addressee.cpp.
Address::List Addressee::addresses | ( | ) | const |
QString Addressee::assembledName | ( | ) | const |
QDateTime Addressee::birthday | ( | ) | const |
QString Addressee::birthdayLabel | ( | ) | [static] |
QString Addressee::businessAddressCountryLabel | ( | ) | [static] |
Return translated label for businessAddressCountry field.
Definition at line 565 of file addressee.cpp.
QString Addressee::businessAddressLabelLabel | ( | ) | [static] |
Return translated label for businessAddressLabel field.
Definition at line 571 of file addressee.cpp.
QString Addressee::businessAddressLocalityLabel | ( | ) | [static] |
Return translated label for businessAddressLocality field.
Definition at line 547 of file addressee.cpp.
QString Addressee::businessAddressPostalCodeLabel | ( | ) | [static] |
Return translated label for businessAddressPostalCode field.
Definition at line 559 of file addressee.cpp.
QString Addressee::businessAddressRegionLabel | ( | ) | [static] |
Return translated label for businessAddressRegion field.
Definition at line 553 of file addressee.cpp.
QString Addressee::businessAddressStreetLabel | ( | ) | [static] |
Return translated label for businessAddressStreet field.
Definition at line 541 of file addressee.cpp.
QString Addressee::businessFaxLabel | ( | ) | [static] |
QString Addressee::businessPhoneLabel | ( | ) | [static] |
QString Addressee::carPhoneLabel | ( | ) | [static] |
QStringList Addressee::categories | ( | ) | const |
bool Addressee::changed | ( | ) | const |
Return value of custom entry, identified by app and entry name.
- Parameters:
-
app Name of the application which has inserted this custom entry name Name of this application specific custom entry
Definition at line 1536 of file addressee.cpp.
QStringList Addressee::customs | ( | ) | const |
QString Addressee::department | ( | ) | const |
QString Addressee::departmentLabel | ( | ) | [static] |
QString Addressee::emailLabel | ( | ) | [static] |
QStringList Addressee::emails | ( | ) | const |
QString Addressee::familyName | ( | ) | const |
QString Addressee::familyNameLabel | ( | ) | [static] |
Return address with the given id.
- Parameters:
-
id The identifier of the address to look for. See Address::id()
Definition at line 1458 of file addressee.cpp.
Return key with the given id.
- Parameters:
-
id The identifier of the key to look for. See Key::id()
Definition at line 1312 of file addressee.cpp.
PhoneNumber Addressee::findPhoneNumber | ( | const QString & | id | ) | const |
Return phone number with the given id.
- Parameters:
-
id The identifier of the phone number to look for. See PhoneNumber::id()
Definition at line 1224 of file addressee.cpp.
QString Addressee::formattedName | ( | ) | const |
QString Addressee::formattedNameLabel | ( | ) | [static] |
Return email address including real name.
- Parameters:
-
email Email address to be used to construct the full email string. If this is QString() the preferred email address is used.
Definition at line 1094 of file addressee.cpp.
Geo Addressee::geo | ( | ) | const |
QString Addressee::geoLabel | ( | ) | [static] |
QString Addressee::givenName | ( | ) | const |
QString Addressee::givenNameLabel | ( | ) | [static] |
bool Addressee::hasCategory | ( | const QString & | category | ) | const |
QString Addressee::homeAddressCountryLabel | ( | ) | [static] |
QString Addressee::homeAddressLabelLabel | ( | ) | [static] |
QString Addressee::homeAddressLocalityLabel | ( | ) | [static] |
Return translated label for homeAddressLocality field.
Definition at line 511 of file addressee.cpp.
QString Addressee::homeAddressPostalCodeLabel | ( | ) | [static] |
Return translated label for homeAddressPostalCode field.
Definition at line 523 of file addressee.cpp.
QString Addressee::homeAddressRegionLabel | ( | ) | [static] |
QString Addressee::homeAddressStreetLabel | ( | ) | [static] |
QString Addressee::homeFaxLabel | ( | ) | [static] |
QString Addressee::homePhoneLabel | ( | ) | [static] |
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.
- Parameters:
-
address The address to insert
Definition at line 1394 of file addressee.cpp.
void Addressee::insertCategory | ( | const QString & | c | ) |
Insert category.
If the category already exists it is not duplicated.
Definition at line 1469 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.
An empty value isn't allowed (nothing happens if this is called with any of the three arguments being empty)
- Parameters:
-
app Name of the application inserting this custom entry name Name of this application specific custom entry value Value of this application specific custom entry
Definition at line 1503 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 1120 of file addressee.cpp.
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.
- Parameters:
-
key The key to insert
Definition at line 1235 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.
- Parameters:
-
phoneNumber The telephone number to insert to the addressee
Definition at line 1164 of file addressee.cpp.
QString Addressee::isdnLabel | ( | ) | [static] |
bool Addressee::isEmpty | ( | ) | const |
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.
- Parameters:
-
type The type of key to look for customTypeString A string to match custom keys against when type
isKey::Custom
Definition at line 1260 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.
- Parameters:
-
type The type of key to look for customTypeString A string to match custom keys against when type
isKey::Custom
Definition at line 1290 of file addressee.cpp.
Key::List Addressee::keys | ( | ) | const |
Picture Addressee::logo | ( | ) | const |
QString Addressee::logoLabel | ( | ) | [static] |
QString Addressee::mailer | ( | ) | const |
QString Addressee::mailerLabel | ( | ) | [static] |
QString Addressee::mobilePhoneLabel | ( | ) | [static] |
QString Addressee::name | ( | ) | const |
QString Addressee::nameLabel | ( | ) | [static] |
QString Addressee::nickName | ( | ) | const |
QString Addressee::nickNameLabel | ( | ) | [static] |
QString Addressee::note | ( | ) | const |
QString Addressee::noteLabel | ( | ) | [static] |
bool Addressee::operator!= | ( | const Addressee & | a | ) | const |
Not-equal operator.
- Returns:
true
ifthis
and the given addressee are not equal, otherwisefalse
Definition at line 316 of file addressee.cpp.
bool Addressee::operator< | ( | const Addressee & | addr | ) | const |
Return whether this addressee is "less-than" a given one.
- Parameters:
-
addr The addressee object to compare with
- See also:
- setSortMode()
Definition at line 1745 of file addressee.cpp.
bool Addressee::operator== | ( | const Addressee & | a | ) | const |
Equality operator.
- Returns:
true
ifthis
and the given addressee are equal, otherwisefalse
Definition at line 169 of file addressee.cpp.
QString Addressee::organization | ( | ) | const |
QString Addressee::organizationLabel | ( | ) | [static] |
QString Addressee::pagerLabel | ( | ) | [static] |
void Addressee::parseEmailAddress | ( | const QString & | rawEmail, | |
QString & | fullName, | |||
QString & | ||||
) | [static] |
Parse full email address.
The result is given back in fullName and email.
- Parameters:
-
rawEmail The input string to parse for name and email fullName The name part of the rawEmail
input, if it contained oneemail The email part of the rawEmail
input, if it contained one
Definition at line 1563 of file addressee.cpp.
PhoneNumber Addressee::phoneNumber | ( | PhoneNumber::Type | type | ) | const |
Return phone number, which matches the given type.
- Parameters:
-
type The type of phone number to get
Definition at line 1190 of file addressee.cpp.
PhoneNumber::List Addressee::phoneNumbers | ( | PhoneNumber::Type | type | ) | const |
Return list of phone numbers with a special type.
- Parameters:
-
type The type of phone number to get
Definition at line 1211 of file addressee.cpp.
PhoneNumber::List Addressee::phoneNumbers | ( | ) | const |
Picture Addressee::photo | ( | ) | const |
QString Addressee::photoLabel | ( | ) | [static] |
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 1147 of file addressee.cpp.
QString Addressee::prefix | ( | ) | const |
QString Addressee::prefixLabel | ( | ) | [static] |
QString Addressee::productId | ( | ) | const |
QString Addressee::productIdLabel | ( | ) | [static] |
QString Addressee::realName | ( | ) | const |
Return the name of the addressee.
This is calculated from all the name fields.
Definition at line 1069 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.
- Parameters:
-
address The address to remove
Definition at line 1412 of file addressee.cpp.
void Addressee::removeCategory | ( | const QString & | category | ) |
Remove custom entry.
- Parameters:
-
app Name of the application which has inserted this custom entry name Name of this application specific custom entry
Definition at line 1523 of file addressee.cpp.
void Addressee::removeEmail | ( | const QString & | ) |
Remove email address.
If the email address doesn't exist, nothing happens.
- Parameters:
-
email Email address to remove
Definition at line 1140 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.
- Parameters:
-
key The key to remove
Definition at line 1249 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.
- Parameters:
-
phoneNumber The telephone number to remove from the addressee
Definition at line 1179 of file addressee.cpp.
Resource * Addressee::resource | ( | ) | const |
QDateTime Addressee::revision | ( | ) | const |
QString Addressee::revisionLabel | ( | ) | [static] |
QString Addressee::role | ( | ) | const |
QString Addressee::roleLabel | ( | ) | [static] |
Secrecy Addressee::secrecy | ( | ) | const |
QString Addressee::secrecyLabel | ( | ) | [static] |
void Addressee::setAdditionalName | ( | const QString & | additionalName | ) |
void Addressee::setBirthday | ( | const QDateTime & | birthday | ) |
void Addressee::setCategories | ( | const QStringList & | c | ) |
void Addressee::setChanged | ( | bool | value | ) |
Mark addressee as changed.
- Parameters:
-
value Sets the status indicating changed data
Definition at line 1730 of file addressee.cpp.
void Addressee::setCustoms | ( | const QStringList & | l | ) |
void Addressee::setDepartment | ( | const QString & | department | ) |
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 1160 of file addressee.cpp.
void Addressee::setFamilyName | ( | const QString & | familyName | ) |
void Addressee::setFormattedName | ( | const QString & | formattedName | ) |
void Addressee::setGeo | ( | const Geo & | geo | ) |
void Addressee::setGivenName | ( | const QString & | givenName | ) |
void Addressee::setKeys | ( | const Key::List & | keys | ) |
Set the list of keys.
- Parameters:
-
keys The keys to be set.
Definition at line 1280 of file addressee.cpp.
void Addressee::setLogo | ( | const Picture & | logo | ) |
void Addressee::setMailer | ( | const QString & | mailer | ) |
void Addressee::setName | ( | const QString & | name | ) |
void Addressee::setNameFromString | ( | const QString & | s | ) |
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 920 of file addressee.cpp.
void Addressee::setNickName | ( | const QString & | nickName | ) |
void Addressee::setNote | ( | const QString & | note | ) |
void Addressee::setOrganization | ( | const QString & | organization | ) |
void Addressee::setPhoto | ( | const Picture & | photo | ) |
void Addressee::setPrefix | ( | const QString & | prefix | ) |
void Addressee::setProductId | ( | const QString & | productId | ) |
void Addressee::setResource | ( | Resource * | resource | ) |
Set resource where the addressee is from.
- Parameters:
-
resource The Resource the addressee is from
Definition at line 1720 of file addressee.cpp.
void Addressee::setRevision | ( | const QDateTime & | revision | ) |
void Addressee::setRole | ( | const QString & | role | ) |
void Addressee::setSecrecy | ( | const Secrecy & | secrecy | ) |
void Addressee::setSortMode | ( | KABC::SortMode * | mode | ) | [static] |
Sets the sort mode implementation.
Comparing to addressee objects is delegated to an instance of a subclass of KABC::SortMode.
- Parameters:
-
mode The sort mode implementator to use
Definition at line 1740 of file addressee.cpp.
void Addressee::setSortString | ( | const QString & | sortString | ) |
void Addressee::setSound | ( | const Sound & | sound | ) |
void Addressee::setSuffix | ( | const QString & | suffix | ) |
void Addressee::setTimeZone | ( | const TimeZone & | timeZone | ) |
void Addressee::setTitle | ( | const QString & | title | ) |
void Addressee::setUid | ( | const QString & | uid | ) |
Set unique identifier.
- Parameters:
-
uid the KABC unique identifier
Definition at line 326 of file addressee.cpp.
void Addressee::setUrl | ( | const KUrl & | url | ) |
QString Addressee::sortString | ( | ) | const |
QString Addressee::sortStringLabel | ( | ) | [static] |
Sound Addressee::sound | ( | ) | const |
QString Addressee::soundLabel | ( | ) | [static] |
QString Addressee::suffix | ( | ) | const |
QString Addressee::suffixLabel | ( | ) | [static] |
TimeZone Addressee::timeZone | ( | ) | const |
QString Addressee::timeZoneLabel | ( | ) | [static] |
QString Addressee::title | ( | ) | const |
QString Addressee::titleLabel | ( | ) | [static] |
QString Addressee::toString | ( | ) | const |
QString Addressee::uid | ( | ) | const |
QString Addressee::uidLabel | ( | ) | [static] |
KUrl Addressee::url | ( | ) | const |
QString Addressee::urlLabel | ( | ) | [static] |
The documentation for this class was generated from the following files: