kabc Library API Documentation

KABC::Addressee Class Reference

address book entry More...

#include <addressee.h>

List of all members.

Public Methods

 Addressee ()
 Construct an empty address book entry.

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 &note)
 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.

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 Methods

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.


Detailed Description

address book entry

This 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

Addressee::Addressee  
 

Construct an empty address book entry.

Definition at line 75 of file addressee.cpp.

References KApplication::randomString().

KABC::Addressee::Addressee  
 

Construct an empty address book entry.


Member Function Documentation

bool Addressee::isEmpty  
 

Return, if the address book entry is empty.

Definition at line 156 of file addressee.cpp.

Referenced by KABC::DistributionListManager::load().

void Addressee::setUid const QString   uid
 

Set unique identifier.

Definition at line 161 of file addressee.cpp.

QString Addressee::uid  
 

Return unique identifier.

Definition at line 169 of file addressee.cpp.

Referenced by dump(), KABC::AddressBook::find(), KABC::AddressBook::insertAddressee(), KABC::DistributionList::insertEntry(), KABC::AddressBook::removeAddressee(), and KABC::DistributionList::removeEntry().

QString Addressee::uidLabel   [static]
 

Return translated label for uid field.

Definition at line 174 of file addressee.cpp.

void Addressee::setName const QString   name
 

Set name.

Definition at line 180 of file addressee.cpp.

Referenced by setNameFromString().

QString Addressee::name  
 

Return name.

Definition at line 188 of file addressee.cpp.

Referenced by assembledName(), dump(), and realName().

QString Addressee::nameLabel   [static]
 

Return translated label for name field.

Definition at line 193 of file addressee.cpp.

void Addressee::setFormattedName const QString   formattedName
 

Set formatted name.

Definition at line 199 of file addressee.cpp.

Referenced by setNameFromString().

QString Addressee::formattedName  
 

Return formatted name.

Definition at line 207 of file addressee.cpp.

Referenced by dump(), and realName().

QString Addressee::formattedNameLabel   [static]
 

Return translated label for formattedName field.

Definition at line 212 of file addressee.cpp.

void Addressee::setFamilyName const QString   familyName
 

Set family name.

Definition at line 218 of file addressee.cpp.

Referenced by setNameFromString().

QString Addressee::familyName  
 

Return family name.

Definition at line 226 of file addressee.cpp.

Referenced by assembledName(), and dump().

QString Addressee::familyNameLabel   [static]
 

Return translated label for familyName field.

Definition at line 231 of file addressee.cpp.

void Addressee::setGivenName const QString   givenName
 

Set given name.

Definition at line 237 of file addressee.cpp.

Referenced by setNameFromString().

QString Addressee::givenName  
 

Return given name.

Definition at line 245 of file addressee.cpp.

Referenced by assembledName(), and dump().

QString Addressee::givenNameLabel   [static]
 

Return translated label for givenName field.

Definition at line 250 of file addressee.cpp.

void Addressee::setAdditionalName const QString   additionalName
 

Set additional names.

Definition at line 256 of file addressee.cpp.

Referenced by setNameFromString().

QString Addressee::additionalName  
 

Return additional names.

Definition at line 264 of file addressee.cpp.

Referenced by assembledName(), dump(), and setNameFromString().

QString Addressee::additionalNameLabel   [static]
 

Return translated label for additionalName field.

Definition at line 269 of file addressee.cpp.

void Addressee::setPrefix const QString   prefix
 

Set honorific prefixes.

Definition at line 275 of file addressee.cpp.

Referenced by setNameFromString().

QString Addressee::prefix  
 

Return honorific prefixes.

Definition at line 283 of file addressee.cpp.

Referenced by assembledName(), dump(), and setNameFromString().

QString Addressee::prefixLabel   [static]
 

Return translated label for prefix field.

Definition at line 288 of file addressee.cpp.

void Addressee::setSuffix const QString   suffix
 

Set honorific suffixes.

Definition at line 294 of file addressee.cpp.

Referenced by setNameFromString().

QString Addressee::suffix  
 

Return honorific suffixes.

Definition at line 302 of file addressee.cpp.

Referenced by assembledName(), dump(), and setNameFromString().

QString Addressee::suffixLabel   [static]
 

Return translated label for suffix field.

Definition at line 307 of file addressee.cpp.

void Addressee::setNickName const QString   nickName
 

Set nick name.

Definition at line 313 of file addressee.cpp.

QString Addressee::nickName  
 

Return nick name.

Definition at line 321 of file addressee.cpp.

Referenced by dump().

QString Addressee::nickNameLabel   [static]
 

Return translated label for nickName field.

Definition at line 326 of file addressee.cpp.

void Addressee::setBirthday const QDateTime   birthday
 

Set birthday.

Definition at line 332 of file addressee.cpp.

QDateTime Addressee::birthday  
 

Return birthday.

Definition at line 340 of file addressee.cpp.

Referenced by dump().

QString Addressee::birthdayLabel   [static]
 

Return translated label for birthday field.

Definition at line 345 of file addressee.cpp.

QString Addressee::homeAddressStreetLabel   [static]
 

Return translated label for homeAddressStreet field.

Definition at line 351 of file addressee.cpp.

QString Addressee::homeAddressLocalityLabel   [static]
 

Return translated label for homeAddressLocality field.

Definition at line 357 of file addressee.cpp.

QString Addressee::homeAddressRegionLabel   [static]
 

Return translated label for homeAddressRegion field.

Definition at line 363 of file addressee.cpp.

QString Addressee::homeAddressPostalCodeLabel   [static]
 

Return translated label for homeAddressPostalCode field.

Definition at line 369 of file addressee.cpp.

QString Addressee::homeAddressCountryLabel   [static]
 

Return translated label for homeAddressCountry field.

Definition at line 375 of file addressee.cpp.

QString Addressee::homeAddressLabelLabel   [static]
 

Return translated label for homeAddressLabel field.

Definition at line 381 of file addressee.cpp.

QString Addressee::businessAddressStreetLabel   [static]
 

Return translated label for businessAddressStreet field.

Definition at line 387 of file addressee.cpp.

QString Addressee::businessAddressLocalityLabel   [static]
 

Return translated label for businessAddressLocality field.

Definition at line 393 of file addressee.cpp.

QString Addressee::businessAddressRegionLabel   [static]
 

Return translated label for businessAddressRegion field.

Definition at line 399 of file addressee.cpp.

QString Addressee::businessAddressPostalCodeLabel   [static]
 

Return translated label for businessAddressPostalCode field.

Definition at line 405 of file addressee.cpp.

QString Addressee::businessAddressCountryLabel   [static]
 

Return translated label for businessAddressCountry field.

Definition at line 411 of file addressee.cpp.

QString Addressee::businessAddressLabelLabel   [static]
 

Return translated label for businessAddressLabel field.

Definition at line 417 of file addressee.cpp.

QString Addressee::homePhoneLabel   [static]
 

Return translated label for homePhone field.

Definition at line 423 of file addressee.cpp.

QString Addressee::businessPhoneLabel   [static]
 

Return translated label for businessPhone field.

Definition at line 429 of file addressee.cpp.

QString Addressee::mobilePhoneLabel   [static]
 

Return translated label for mobilePhone field.

Definition at line 435 of file addressee.cpp.

QString Addressee::homeFaxLabel   [static]
 

Return translated label for homeFax field.

Definition at line 441 of file addressee.cpp.

QString Addressee::businessFaxLabel   [static]
 

Return translated label for businessFax field.

Definition at line 447 of file addressee.cpp.

QString Addressee::carPhoneLabel   [static]
 

Return translated label for carPhone field.

Definition at line 453 of file addressee.cpp.

QString Addressee::isdnLabel   [static]
 

Return translated label for isdn field.

Definition at line 459 of file addressee.cpp.

QString Addressee::pagerLabel   [static]
 

Return translated label for pager field.

Definition at line 465 of file addressee.cpp.

QString Addressee::emailLabel   [static]
 

Return translated label for email field.

Definition at line 471 of file addressee.cpp.

void Addressee::setMailer const QString   mailer
 

Set mail client.

Definition at line 477 of file addressee.cpp.

QString Addressee::mailer  
 

Return mail client.

Definition at line 485 of file addressee.cpp.

Referenced by dump().

QString Addressee::mailerLabel   [static]
 

Return translated label for mailer field.

Definition at line 490 of file addressee.cpp.

void Addressee::setTimeZone const TimeZone   timeZone
 

Set time zone.

Definition at line 496 of file addressee.cpp.

TimeZone Addressee::timeZone  
 

Return time zone.

Definition at line 504 of file addressee.cpp.

Referenced by dump().

QString Addressee::timeZoneLabel   [static]
 

Return translated label for timeZone field.

Definition at line 509 of file addressee.cpp.

void Addressee::setGeo const Geo   geo
 

Set geographic position.

Definition at line 515 of file addressee.cpp.

Geo Addressee::geo  
 

Return geographic position.

Definition at line 523 of file addressee.cpp.

Referenced by dump().

QString Addressee::geoLabel   [static]
 

Return translated label for geo field.

Definition at line 528 of file addressee.cpp.

void Addressee::setTitle const QString   title
 

Set title.

Definition at line 534 of file addressee.cpp.

QString Addressee::title  
 

Return title.

Definition at line 542 of file addressee.cpp.

Referenced by dump().

QString Addressee::titleLabel   [static]
 

Return translated label for title field.

Definition at line 547 of file addressee.cpp.

void Addressee::setRole const QString   role
 

Set role.

Definition at line 553 of file addressee.cpp.

QString Addressee::role  
 

Return role.

Definition at line 561 of file addressee.cpp.

Referenced by dump().

QString Addressee::roleLabel   [static]
 

Return translated label for role field.

Definition at line 566 of file addressee.cpp.

void Addressee::setOrganization const QString   organization
 

Set organization.

Definition at line 572 of file addressee.cpp.

QString Addressee::organization  
 

Return organization.

Definition at line 580 of file addressee.cpp.

Referenced by dump().

QString Addressee::organizationLabel   [static]
 

Return translated label for organization field.

Definition at line 585 of file addressee.cpp.

void Addressee::setNote const QString   note
 

Set note.

Definition at line 591 of file addressee.cpp.

QString Addressee::note  
 

Return note.

Definition at line 599 of file addressee.cpp.

Referenced by dump().

QString Addressee::noteLabel   [static]
 

Return translated label for note field.

Definition at line 604 of file addressee.cpp.

void Addressee::setProductId const QString   productId
 

Set product identifier.

Definition at line 610 of file addressee.cpp.

QString Addressee::productId  
 

Return product identifier.

Definition at line 618 of file addressee.cpp.

Referenced by dump().

QString Addressee::productIdLabel   [static]
 

Return translated label for productId field.

Definition at line 623 of file addressee.cpp.

void Addressee::setRevision const QDateTime   revision
 

Set revision date.

Definition at line 629 of file addressee.cpp.

QDateTime Addressee::revision  
 

Return revision date.

Definition at line 637 of file addressee.cpp.

Referenced by dump().

QString Addressee::revisionLabel   [static]
 

Return translated label for revision field.

Definition at line 642 of file addressee.cpp.

void Addressee::setSortString const QString   sortString
 

Set sort string.

Definition at line 648 of file addressee.cpp.

QString Addressee::sortString  
 

Return sort string.

Definition at line 656 of file addressee.cpp.

Referenced by dump().

QString Addressee::sortStringLabel   [static]
 

Return translated label for sortString field.

Definition at line 661 of file addressee.cpp.

void Addressee::setUrl const KURL   url
 

Set URL.

Definition at line 667 of file addressee.cpp.

KURL Addressee::url  
 

Return URL.

Definition at line 675 of file addressee.cpp.

Referenced by dump().

QString Addressee::urlLabel   [static]
 

Return translated label for url field.

Definition at line 680 of file addressee.cpp.

void Addressee::setSecrecy const Secrecy &    secrecy
 

Set security class.

Definition at line 686 of file addressee.cpp.

Secrecy Addressee::secrecy  
 

Return security class.

Definition at line 694 of file addressee.cpp.

Referenced by dump().

QString Addressee::secrecyLabel   [static]
 

Return translated label for secrecy field.

Definition at line 699 of file addressee.cpp.

void Addressee::setLogo const Picture &    logo
 

Set logo.

Definition at line 705 of file addressee.cpp.

Picture Addressee::logo  
 

Return logo.

Definition at line 713 of file addressee.cpp.

Referenced by dump().

QString Addressee::logoLabel   [static]
 

Return translated label for logo field.

Definition at line 718 of file addressee.cpp.

void Addressee::setPhoto const Picture &    photo
 

Set photo.

Definition at line 724 of file addressee.cpp.

Picture Addressee::photo  
 

Return photo.

Definition at line 732 of file addressee.cpp.

Referenced by dump().

QString Addressee::photoLabel   [static]
 

Return translated label for photo field.

Definition at line 737 of file addressee.cpp.

void Addressee::setSound const Sound &    sound
 

Set sound.

Definition at line 743 of file addressee.cpp.

Sound Addressee::sound  
 

Return sound.

Definition at line 751 of file addressee.cpp.

Referenced by dump().

QString Addressee::soundLabel   [static]
 

Return translated label for sound field.

Definition at line 756 of file addressee.cpp.

void Addressee::setAgent const Agent   agent
 

Set agent.

Definition at line 762 of file addressee.cpp.

Agent Addressee::agent  
 

Return agent.

Definition at line 770 of file addressee.cpp.

Referenced by dump().

QString Addressee::agentLabel   [static]
 

Return translated label for agent field.

Definition at line 775 of file addressee.cpp.

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 782 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().

QString Addressee::realName  
 

Return the name of the addressee.

This is calculated from all the name fields.

Definition at line 924 of file addressee.cpp.

References assembledName(), formattedName(), QString::isEmpty(), and name().

Referenced by KABC::AddresseeItem::AddresseeItem(), and fullEmail().

QString Addressee::assembledName  
 

Return the name that consists of all name parts.

Definition at line 937 of file addressee.cpp.

References additionalName(), familyName(), givenName(), name(), prefix(), QString::simplifyWhiteSpace(), and suffix().

Referenced by realName().

QString Addressee::fullEmail const QString   email = QString::null 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 945 of file addressee.cpp.

References QString::append(), QString::isEmpty(), QString::isNull(), preferredEmail(), and realName().

Referenced by KABC::DistributionList::emails().

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 962 of file addressee.cpp.

void Addressee::removeEmail const QString   email
 

Remove email address.

If the email address doesn't exist, nothing happens.

Definition at line 981 of file addressee.cpp.

QString Addressee::preferredEmail  
 

Return preferred email address.

This is the first email address or the last one added with isnertEmail() with a set preferred parameter.

Definition at line 991 of file addressee.cpp.

References KSharedPtr< AddresseeData >::count().

Referenced by KABC::AddresseeItem::AddresseeItem(), and fullEmail().

QStringList Addressee::emails  
 

Return list of all email addresses.

Definition at line 997 of file addressee.cpp.

Referenced by dump().

void Addressee::insertPhoneNumber const PhoneNumber   phoneNumber
 

Insert a phone number.

If a phoen number with the same id already exists in this addressee it is not duplicated.

Definition at line 1002 of file addressee.cpp.

References KABC::PhoneNumber::id().

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 1017 of file addressee.cpp.

References KABC::PhoneNumber::id().

PhoneNumber Addressee::phoneNumber int    type const
 

Return phone number, which matches the given type.

Definition at line 1030 of file addressee.cpp.

References QString::isEmpty(), and KABC::PhoneNumber::number().

PhoneNumber::List Addressee::phoneNumbers  
 

Return list of all phone numbers.

Definition at line 1046 of file addressee.cpp.

Referenced by dump().

PhoneNumber::List Addressee::phoneNumbers int    type const
 

Return list of phone numbers with a special type.

Definition at line 1051 of file addressee.cpp.

References QValueList::append().

PhoneNumber Addressee::findPhoneNumber const QString   id const
 

Return phone number with the given id.

Definition at line 1064 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.

Definition at line 1075 of file addressee.cpp.

References KABC::Key::id(), and KStdAccel::key().

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 1090 of file addressee.cpp.

References KABC::Key::id(), and KStdAccel::key().

Key Addressee::key int    type,
QString    customTypeString = QString::null
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.

Definition at line 1103 of file addressee.cpp.

References QString::isEmpty().

Key::List Addressee::keys  
 

Return list of all keys.

Definition at line 1123 of file addressee.cpp.

Referenced by dump().

Key::List Addressee::keys int    type,
QString    customTypeString = QString::null
const
 

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 1128 of file addressee.cpp.

References QValueList::append(), and QString::isEmpty().

Key Addressee::findKey const QString   id const
 

Return key with the given id.

Definition at line 1150 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 1233 of file addressee.cpp.

References KABC::Address::id().

void Addressee::removeAddress const Address   address
 

Remove address.

If no address with the given id exists for this addresse nothing happens.

Definition at line 1248 of file addressee.cpp.

References KABC::Address::id().

Address Addressee::address int    type const
 

Return address, which matches the given type.

Definition at line 1261 of file addressee.cpp.

References KABC::Address::isEmpty().

Address::List Addressee::addresses  
 

Return list of all addresses.

Definition at line 1277 of file addressee.cpp.

Referenced by dump().

Address::List Addressee::addresses int    type const
 

Return list of addresses with a special type.

Definition at line 1282 of file addressee.cpp.

References QValueList::append().

Address Addressee::findAddress const QString   id const
 

Return address with the given id.

Definition at line 1296 of file addressee.cpp.

void Addressee::insertCategory const QString  
 

Insert category.

If the category already exists it is not duplicated.

Definition at line 1307 of file addressee.cpp.

void Addressee::removeCategory const QString  
 

Remove category.

Definition at line 1317 of file addressee.cpp.

bool Addressee::hasCategory const QString   const
 

Return, if addressee has the given category.

Definition at line 1327 of file addressee.cpp.

void Addressee::setCategories const QStringList  
 

Set categories to given value.

Definition at line 1332 of file addressee.cpp.

QStringList Addressee::categories  
 

Return list of all set categories.

Definition at line 1340 of file addressee.cpp.

void 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.

Definition at line 1345 of file addressee.cpp.

References QString::isEmpty(), and QString::isNull().

void Addressee::removeCustom const QString   app,
const QString   name
 

Remove custom entry.

Definition at line 1366 of file addressee.cpp.

QString Addressee::custom const QString   app,
const QString   name
const
 

Return value of custom entry, identified by app and entry name.

Definition at line 1381 of file addressee.cpp.

References QString::mid().

void Addressee::setCustoms const QStringList  
 

Set all custom entries.

Definition at line 1397 of file addressee.cpp.

QStringList Addressee::customs  
 

Return list of all custom entries.

Definition at line 1405 of file addressee.cpp.

void Addressee::parseEmailAddress const QString   rawEmail,
QString   fullName,
QString   email
[static]
 

Parse full email address.

The result is given back in fullName and email.

Definition at line 1410 of file addressee.cpp.

References QString::find(), QString::left(), QString::length(), and QString::mid().

void Addressee::dump  
 

Debug output.

Definition at line 1166 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().

QString Addressee::asString  
 

Returns string representation of the addressee.

Definition at line 1161 of file addressee.cpp.

void Addressee::setResource Resource *    resource
 

Set resource where the addressee is from.

Definition at line 1465 of file addressee.cpp.

Referenced by KABC::AddressBook::insertAddressee(), and KABC::BinaryFormat::loadAll().

Resource * Addressee::resource  
 

Return pointer to resource.

Definition at line 1471 of file addressee.cpp.

Referenced by KABC::AddressBook::insertAddressee().

void Addressee::setChanged bool    value
 

Mark addressee as changed.

Definition at line 1476 of file addressee.cpp.

Referenced by KABC::AddressBook::insertAddressee().

bool Addressee::changed  
 

Return whether the addressee is changed.

Definition at line 1482 of file addressee.cpp.

bool KABC::Addressee::isEmpty  
 

Return, if the address book entry is empty.

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  
 

Return the name of the addressee.

This is calculated from all the name fields.

QString KABC::Addressee::assembledName  
 

Return the name that consists of all name parts.

QString KABC::Addressee::fullEmail const QString   email = QString::null 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.

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   email
 

Remove email address.

If the email address doesn't exist, nothing happens.

QString KABC::Addressee::preferredEmail  
 

Return preferred email address.

This is the first email address or the last one added with isnertEmail() with a set preferred parameter.

QStringList KABC::Addressee::emails  
 

Return list of all email addresses.

void KABC::Addressee::insertPhoneNumber const PhoneNumber   phoneNumber
 

Insert a phone number.

If a phoen 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  
 

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.

Key KABC::Addressee::key int    type,
QString    customTypeString = QString::null
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.

Key::List KABC::Addressee::keys  
 

Return list of all keys.

Key::List KABC::Addressee::keys int    type,
QString    customTypeString = QString::null
const
 

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.

Key KABC::Addressee::findKey const QString   id const
 

Return key with the given id.

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  
 

Return list of all addresses.

Address::List KABC::Addressee::addresses int    type const
 

Return list of addresses with a special type.

Address KABC::Addressee::findAddress const QString   id const
 

Return address with the given id.

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  
 

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.

void KABC::Addressee::removeCustom const QString   app,
const QString   name
 

Remove custom entry.

QString KABC::Addressee::custom const QString   app,
const QString   name
const
 

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  
 

Return list of all custom entries.

void KABC::Addressee::parseEmailAddress const QString   rawEmail,
QString   fullName,
QString   email
[static]
 

Parse full email address.

The result is given back in fullName and email.

void KABC::Addressee::dump  
 

Debug output.

QString KABC::Addressee::asString  
 

Returns string representation of the addressee.

void KABC::Addressee::setResource Resource *    resource
 

Set resource where the addressee is from.

Resource* KABC::Addressee::resource  
 

Return pointer to resource.

void KABC::Addressee::setChanged bool    value
 

Mark addressee as changed.

bool KABC::Addressee::changed  
 

Return whether the addressee is changed.


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for kdelibs Version 3.1.0.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Wed Oct 8 12:22:09 2003 by doxygen 1.2.18 written by Dimitri van Heesch, © 1997-2001