.TH "KABC::Addressee" kde3 "11 Jun 2005" "Version Version 3.4.1" "kabc Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
KABC::Addressee \- address book entry  

.PP
.SH SYNOPSIS
.br
.PP
\fC#include <addressee.src.h>\fP
.PP
.SS "Public Types"

.in +1c
.ti -1c
.RI "typedef \fBQValueList\fP< \fBAddressee\fP > \fBList\fP"
.br
.ti -1c
.RI "typedef \fBQMap\fP< \fBQString\fP, \fBAddressee\fP > \fBMap\fP"
.br
.in -1c
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "\fBAddressee\fP ()"
.br
.ti -1c
.RI "\fBAddressee\fP (const \fBAddressee\fP &)"
.br
.ti -1c
.RI "\fBAddressee\fP & \fBoperator=\fP (const \fBAddressee\fP &)"
.br
.ti -1c
.RI "bool \fBoperator==\fP (const \fBAddressee\fP &) const "
.br
.ti -1c
.RI "bool \fBoperator!=\fP (const \fBAddressee\fP &) const "
.br
.ti -1c
.RI "bool \fBisEmpty\fP () const "
.br
.ti -1c
.RI "void \fBsetUid\fP (const \fBQString\fP &uid)"
.br
.ti -1c
.RI "\fBQString\fP \fBuid\fP () const "
.br
.ti -1c
.RI "DECLARATIONS void \fBsetNameFromString\fP (const \fBQString\fP &)"
.br
.ti -1c
.RI "\fBQString\fP \fBrealName\fP () const "
.br
.ti -1c
.RI "\fBQString\fP \fBassembledName\fP () const "
.br
.ti -1c
.RI "\fBQString\fP \fBfullEmail\fP (const \fBQString\fP &email=QString::null) const "
.br
.ti -1c
.RI "void \fBinsertEmail\fP (const \fBQString\fP &email, bool preferred=false)"
.br
.ti -1c
.RI "void \fBremoveEmail\fP (const \fBQString\fP &email)"
.br
.ti -1c
.RI "\fBQString\fP \fBpreferredEmail\fP () const "
.br
.ti -1c
.RI "\fBQStringList\fP \fBemails\fP () const "
.br
.ti -1c
.RI "void \fBsetEmails\fP (const \fBQStringList\fP &list)"
.br
.ti -1c
.RI "void \fBinsertPhoneNumber\fP (const \fBPhoneNumber\fP &phoneNumber)"
.br
.ti -1c
.RI "void \fBremovePhoneNumber\fP (const \fBPhoneNumber\fP &phoneNumber)"
.br
.ti -1c
.RI "\fBPhoneNumber\fP \fBphoneNumber\fP (int type) const "
.br
.ti -1c
.RI "\fBPhoneNumber::List\fP \fBphoneNumbers\fP () const "
.br
.ti -1c
.RI "\fBPhoneNumber::List\fP \fBphoneNumbers\fP (int type) const "
.br
.ti -1c
.RI "\fBPhoneNumber\fP \fBfindPhoneNumber\fP (const \fBQString\fP &id) const "
.br
.ti -1c
.RI "void \fBinsertKey\fP (const \fBKey\fP &key)"
.br
.ti -1c
.RI "void \fBremoveKey\fP (const \fBKey\fP &key)"
.br
.ti -1c
.RI "\fBKey\fP \fBkey\fP (int type, \fBQString\fP customTypeString=QString::null) const "
.br
.ti -1c
.RI "\fBKey::List\fP \fBkeys\fP () const "
.br
.ti -1c
.RI "void \fBsetKeys\fP (const \fBKey::List\fP &keys)"
.br
.ti -1c
.RI "\fBKey::List\fP \fBkeys\fP (int type, \fBQString\fP customTypeString=QString::null) const "
.br
.ti -1c
.RI "\fBKey\fP \fBfindKey\fP (const \fBQString\fP &id) const "
.br
.ti -1c
.RI "void \fBinsertAddress\fP (const \fBAddress\fP &address)"
.br
.ti -1c
.RI "void \fBremoveAddress\fP (const \fBAddress\fP &address)"
.br
.ti -1c
.RI "\fBAddress\fP \fBaddress\fP (int type) const "
.br
.ti -1c
.RI "\fBAddress::List\fP \fBaddresses\fP () const "
.br
.ti -1c
.RI "\fBAddress::List\fP \fBaddresses\fP (int type) const "
.br
.ti -1c
.RI "\fBAddress\fP \fBfindAddress\fP (const \fBQString\fP &id) const "
.br
.ti -1c
.RI "void \fBinsertCategory\fP (const \fBQString\fP &)"
.br
.ti -1c
.RI "void \fBremoveCategory\fP (const \fBQString\fP &)"
.br
.ti -1c
.RI "bool \fBhasCategory\fP (const \fBQString\fP &) const "
.br
.ti -1c
.RI "void \fBsetCategories\fP (const \fBQStringList\fP &)"
.br
.ti -1c
.RI "\fBQStringList\fP \fBcategories\fP () const "
.br
.ti -1c
.RI "void \fBinsertCustom\fP (const \fBQString\fP &app, const \fBQString\fP &name, const \fBQString\fP &value)"
.br
.ti -1c
.RI "void \fBremoveCustom\fP (const \fBQString\fP &app, const \fBQString\fP &name)"
.br
.ti -1c
.RI "\fBQString\fP \fBcustom\fP (const \fBQString\fP &app, const \fBQString\fP &name) const "
.br
.ti -1c
.RI "void \fBsetCustoms\fP (const \fBQStringList\fP &)"
.br
.ti -1c
.RI "\fBQStringList\fP \fBcustoms\fP () const "
.br
.ti -1c
.RI "void \fBdump\fP () const "
.br
.ti -1c
.RI "\fBQString\fP \fBasString\fP () const "
.br
.ti -1c
.RI "void \fBsetResource\fP (Resource *resource)"
.br
.ti -1c
.RI "Resource * \fBresource\fP () const "
.br
.ti -1c
.RI "void \fBsetChanged\fP (bool value)"
.br
.ti -1c
.RI "bool \fBchanged\fP () const "
.br
.ti -1c
.RI "bool \fBoperator<\fP (const \fBAddressee\fP &addr)"
.br
.in -1c
.SS "Static Public Member Functions"

.in +1c
.ti -1c
.RI "static \fBQString\fP \fBuidLabel\fP ()"
.br
.ti -1c
.RI "static void \fBparseEmailAddress\fP (const \fBQString\fP &rawEmail, \fBQString\fP &fullName, \fBQString\fP &email)"
.br
.ti -1c
.RI "static void \fBsetSortMode\fP (\fBKABC::SortMode\fP *mode)"
.br
.in -1c
.SS "Friends"

.in +1c
.ti -1c
.RI "KABC_EXPORT \fBQDataStream\fP & \fBoperator<<\fP (\fBQDataStream\fP &, const \fBAddressee\fP &)"
.br
.ti -1c
.RI "KABC_EXPORT \fBQDataStream\fP & \fBoperator>>\fP (\fBQDataStream\fP &, \fBAddressee\fP &)"
.br
.in -1c
.SH "Detailed Description"
.PP 
address book entry 

This class represents an entry in the address book.
.PP
The data of this class is implicitly shared. You can pass this class by value.
.PP
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.
.PP
About the name fields:
.PP
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.
.PP
\fBrealName()\fP 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().
.PP
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. 
.PP
Definition at line 74 of file addressee.src.h.
.SH "Constructor & Destructor Documentation"
.PP 
.SS "KABC::Addressee::Addressee ()"
.PP
Construct an empty address book entry. 
.PP
.SH "Member Function Documentation"
.PP 
.SS "bool KABC::Addressee::isEmpty () const"
.PP
Return, if the address book entry is empty. 
.PP
.SS "void KABC::Addressee::setUid (const \fBQString\fP & uid)"
.PP
Set unique identifier. 
.PP
.SS "\fBQString\fP KABC::Addressee::uid () const"
.PP
Return unique identifier. 
.PP
.SS "static \fBQString\fP KABC::Addressee::uidLabel ()\fC [static]\fP"
.PP
Return translated label for uid field. 
.PP
.SS "DECLARATIONS void KABC::Addressee::setNameFromString (const \fBQString\fP &)"
.PP
Set name fields by parsing the given string and trying to associate the parts of the string with according fields. 
.PP
This function should probably be a bit more clever. 
.SS "\fBQString\fP KABC::Addressee::realName () const"
.PP
Return the name of the addressee. 
.PP
This is calculated from all the name fields. 
.PP
Referenced by KABC::AddresseeItem::AddresseeItem().
.SS "\fBQString\fP KABC::Addressee::assembledName () const"
.PP
Return the name that consists of all name parts. 
.PP
.SS "\fBQString\fP KABC::Addressee::fullEmail (const \fBQString\fP & email = \fCQString::null\fP) const"
.PP
Return email address including real name. 
.PP
\fBParameters:\fP
.RS 4
\fIemail\fP Email address to be used to construct the full email string. If this is QString::null the preferred email address is used. 
.RE
.PP

.PP
Referenced by KABC::DistributionList::emails().
.SS "void KABC::Addressee::insertEmail (const \fBQString\fP & email, bool preferred = \fCfalse\fP)"
.PP
Insert an email address. 
.PP
If the email address already exists in this addressee it is not duplicated.
.PP
\fBParameters:\fP
.RS 4
\fIemail\fP Email address 
.br
\fIpreferred\fP Set to true, if this is the preferred email address of the addressee. 
.RE
.PP

.PP
Referenced by KABC::VCard21Parser::readFromString().
.SS "void KABC::Addressee::removeEmail (const \fBQString\fP & email)"
.PP
Remove email address. 
.PP
If the email address doesn't exist, nothing happens. 
.SS "\fBQString\fP KABC::Addressee::preferredEmail () const"
.PP
Return preferred email address. 
.PP
This is the first email address or the last one added with \fBinsertEmail()\fP with a set preferred parameter. 
.PP
Referenced by KABC::AddresseeItem::AddresseeItem().
.SS "\fBQStringList\fP KABC::Addressee::emails () const"
.PP
Return list of all email addresses. 
.PP
.SS "void KABC::Addressee::setEmails (const \fBQStringList\fP & list)"
.PP
Set the emails to \fClist\fP. 
.PP
The first email address gets the preferred one! 
.PP
\fBParameters:\fP
.RS 4
\fIlist\fP The list of email addresses. 
.RE
.PP

.SS "void KABC::Addressee::insertPhoneNumber (const \fBPhoneNumber\fP & phoneNumber)"
.PP
Insert a phone number. 
.PP
If a phone number with the same id already exists in this addressee it is not duplicated. 
.PP
Referenced by KABC::VCard21Parser::readFromString().
.SS "void KABC::Addressee::removePhoneNumber (const \fBPhoneNumber\fP & phoneNumber)"
.PP
Remove phone number. 
.PP
If no phone number with the given id exists for this addresse nothing happens. 
.SS "\fBPhoneNumber\fP KABC::Addressee::phoneNumber (int type) const"
.PP
Return phone number, which matches the given type. 
.PP
.SS "\fBPhoneNumber::List\fP KABC::Addressee::phoneNumbers () const"
.PP
Return list of all phone numbers. 
.PP
.SS "\fBPhoneNumber::List\fP KABC::Addressee::phoneNumbers (int type) const"
.PP
Return list of phone numbers with a special type. 
.PP
.SS "\fBPhoneNumber\fP KABC::Addressee::findPhoneNumber (const \fBQString\fP & id) const"
.PP
Return phone number with the given id. 
.PP
.SS "void KABC::Addressee::insertKey (const \fBKey\fP & key)"
.PP
Insert a key. 
.PP
If a key with the same id already exists in this addressee it is not duplicated. 
.SS "void KABC::Addressee::removeKey (const \fBKey\fP & key)"
.PP
Remove a key. 
.PP
If no key with the given id exists for this addresse nothing happens. 
.SS "\fBKey\fP KABC::Addressee::key (int type, \fBQString\fP customTypeString = \fCQString::null\fP) const"
.PP
Return key, which matches the given type. 
.PP
If \fCtype\fP == 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. 
.SS "\fBKey::List\fP KABC::Addressee::keys () const"
.PP
Return list of all keys. 
.PP
.SS "void KABC::Addressee::setKeys (const \fBKey::List\fP & keys)"
.PP
Set the list of keys. 
.PP
\fBParameters:\fP
.RS 4
\fIkeys\fP The keys to be set. 
.RE
.PP

.SS "\fBKey::List\fP KABC::Addressee::keys (int type, \fBQString\fP customTypeString = \fCQString::null\fP) const"
.PP
Return list of keys with a special type. 
.PP
If \fCtype\fP == Key::Custom you can specify a string that should match. If you leave the string empty, all custom keys will be returned. 
.SS "\fBKey\fP KABC::Addressee::findKey (const \fBQString\fP & id) const"
.PP
Return key with the given id. 
.PP
.SS "void KABC::Addressee::insertAddress (const \fBAddress\fP & address)"
.PP
Insert an address. 
.PP
If an address with the same id already exists in this addressee it is not duplicated. 
.PP
Referenced by KABC::VCard21Parser::readFromString().
.SS "void KABC::Addressee::removeAddress (const \fBAddress\fP & address)"
.PP
Remove address. 
.PP
If no address with the given id exists for this addresse nothing happens. 
.SS "\fBAddress\fP KABC::Addressee::address (int type) const"
.PP
Return address, which matches the given type. 
.PP
.SS "\fBAddress::List\fP KABC::Addressee::addresses () const"
.PP
Return list of all addresses. 
.PP
.SS "\fBAddress::List\fP KABC::Addressee::addresses (int type) const"
.PP
Return list of addresses with a special type. 
.PP
.SS "\fBAddress\fP KABC::Addressee::findAddress (const \fBQString\fP & id) const"
.PP
Return address with the given id. 
.PP
.SS "void KABC::Addressee::insertCategory (const \fBQString\fP &)"
.PP
Insert category. 
.PP
If the category already exists it is not duplicated. 
.SS "void KABC::Addressee::removeCategory (const \fBQString\fP &)"
.PP
Remove category. 
.PP
.SS "bool KABC::Addressee::hasCategory (const \fBQString\fP &) const"
.PP
Return, if addressee has the given category. 
.PP
.SS "void KABC::Addressee::setCategories (const \fBQStringList\fP &)"
.PP
Set categories to given value. 
.PP
.SS "\fBQStringList\fP KABC::Addressee::categories () const"
.PP
Return list of all set categories. 
.PP
.SS "void KABC::Addressee::insertCustom (const \fBQString\fP & app, const \fBQString\fP & name, const \fBQString\fP & value)"
.PP
Insert custom entry. 
.PP
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.
.PP
An empty value isn't allowed (nothing happens if this is called with any of the three arguments being empty) 
.SS "void KABC::Addressee::removeCustom (const \fBQString\fP & app, const \fBQString\fP & name)"
.PP
Remove custom entry. 
.PP
.SS "\fBQString\fP KABC::Addressee::custom (const \fBQString\fP & app, const \fBQString\fP & name) const"
.PP
Return value of custom entry, identified by app and entry name. 
.PP
.SS "void KABC::Addressee::setCustoms (const \fBQStringList\fP &)"
.PP
Set all custom entries. 
.PP
.SS "\fBQStringList\fP KABC::Addressee::customs () const"
.PP
Return list of all custom entries. 
.PP
.SS "static void KABC::Addressee::parseEmailAddress (const \fBQString\fP & rawEmail, \fBQString\fP & fullName, \fBQString\fP & email)\fC [static]\fP"
.PP
Parse full email address. 
.PP
The result is given back in fullName and email. 
.SS "void KABC::Addressee::dump () const"
.PP
Debug output. 
.PP
.SS "\fBQString\fP KABC::Addressee::asString () const"
.PP
Returns string representation of the addressee. 
.PP
.SS "void KABC::Addressee::setResource (Resource * resource)"
.PP
Set resource where the addressee is from. 
.PP
Referenced by KABC::VCardFormatPlugin::loadAll(), and KABC::BinaryFormat::loadAll().
.SS "Resource* KABC::Addressee::resource () const"
.PP
Return pointer to resource. 
.PP
.SS "void KABC::Addressee::setChanged (bool value)"
.PP
Mark addressee as changed. 
.PP
Referenced by KABC::VCardFormatPlugin::loadAll(), and KABC::BinaryFormat::loadAll().
.SS "bool KABC::Addressee::changed () const"
.PP
Return whether the addressee is changed. 
.PP


.SH "Author"
.PP 
Generated automatically by Doxygen for kabc Library from the source code.
