kabc Library API Documentation

KABC::Addressee Class Reference

address book entry More...

#include <addressee.h>

Collaboration diagram for KABC::Addressee:

Collaboration graph
[legend]
List of all members.

Public Types

typedef QValueList< AddresseeList
typedef QMap< QString, AddresseeMap
typedef QValueList< AddresseeList
typedef QMap< QString, AddresseeMap

Public Member Functions

 Addressee ()
 Addressee (const Addressee &)
Addresseeoperator= (const Addressee &)
bool operator== (const Addressee &) const
bool operator!= (const Addressee &) const
bool isEmpty () const
void setUid (const QString &uid)
QString uid () const
void setName (const QString &name)
QString name () const
void setFormattedName (const QString &formattedName)
QString formattedName () const
void setFamilyName (const QString &familyName)
QString familyName () const
void setGivenName (const QString &givenName)
QString givenName () const
void setAdditionalName (const QString &additionalName)
QString additionalName () const
void setPrefix (const QString &prefix)
QString prefix () const
void setSuffix (const QString &suffix)
QString suffix () const
void setNickName (const QString &nickName)
QString nickName () const
void setBirthday (const QDateTime &birthday)
QDateTime birthday () const
void setMailer (const QString &mailer)
QString mailer () const
void setTimeZone (const TimeZone &timeZone)
TimeZone timeZone () const
void setGeo (const Geo &geo)
Geo geo () const
void setTitle (const QString &title)
QString title () const
void setRole (const QString &role)
QString role () const
void setOrganization (const QString &organization)
QString organization () const
void setNote (const QString &note)
QString note () const
void setProductId (const QString &productId)
QString productId () const
void setRevision (const QDateTime &revision)
QDateTime revision () const
void setSortString (const QString &sortString)
QString sortString () const
void setUrl (const KURL &url)
KURL url () const
void setSecrecy (const Secrecy &secrecy)
Secrecy secrecy () const
void setLogo (const Picture &logo)
Picture logo () const
void setPhoto (const Picture &photo)
Picture photo () const
void setSound (const Sound &sound)
Sound sound () const
void setAgent (const Agent &agent)
Agent agent () const
void setNameFromString (const QString &)
QString realName () const
QString assembledName () const
QString fullEmail (const QString &email=QString::null) const
void insertEmail (const QString &email, bool preferred=false)
void removeEmail (const QString &email)
QString preferredEmail () const
QStringList emails () const
void setEmails (const QStringList &list)
void insertPhoneNumber (const PhoneNumber &phoneNumber)
void removePhoneNumber (const PhoneNumber &phoneNumber)
PhoneNumber phoneNumber (int type) const
PhoneNumber::List phoneNumbers () const
PhoneNumber::List phoneNumbers (int type) const
PhoneNumber findPhoneNumber (const QString &id) const
void insertKey (const Key &key)
void removeKey (const Key &key)
Key key (int type, QString customTypeString=QString::null) const
Key::List keys () const
void setKeys (const Key::List &keys)
Key::List keys (int type, QString customTypeString=QString::null) const
Key findKey (const QString &id) const
void insertAddress (const Address &address)
void removeAddress (const Address &address)
Address address (int type) const
Address::List addresses () const
Address::List addresses (int type) const
Address findAddress (const QString &id) const
void insertCategory (const QString &)
void removeCategory (const QString &)
bool hasCategory (const QString &) const
void setCategories (const QStringList &)
QStringList categories () const
void insertCustom (const QString &app, const QString &name, const QString &value)
void removeCustom (const QString &app, const QString &name)
QString custom (const QString &app, const QString &name) const
void setCustoms (const QStringList &)
QStringList customs () const
void dump () const
QString asString () const
void setResource (Resource *resource)
Resource * resource () const
void setChanged (bool value)
bool changed () const
bool operator< (const Addressee &addr)
 Addressee ()
 Addressee (const Addressee &)
Addresseeoperator= (const Addressee &)
bool operator== (const Addressee &) const
bool operator!= (const Addressee &) const
bool isEmpty () const
void setUid (const QString &uid)
QString uid () const
DECLARATIONS void setNameFromString (const QString &)
QString realName () const
QString assembledName () const
QString fullEmail (const QString &email=QString::null) const
void insertEmail (const QString &email, bool preferred=false)
void removeEmail (const QString &email)
QString preferredEmail () const
QStringList emails () const
void setEmails (const QStringList &list)
void insertPhoneNumber (const PhoneNumber &phoneNumber)
void removePhoneNumber (const PhoneNumber &phoneNumber)
PhoneNumber phoneNumber (int type) const
PhoneNumber::List phoneNumbers () const
PhoneNumber::List phoneNumbers (int type) const
PhoneNumber findPhoneNumber (const QString &id) const
void insertKey (const Key &key)
void removeKey (const Key &key)
Key key (int type, QString customTypeString=QString::null) const
Key::List keys () const
void setKeys (const Key::List &keys)
Key::List keys (int type, QString customTypeString=QString::null) const
Key findKey (const QString &id) const
void insertAddress (const Address &address)
void removeAddress (const Address &address)
Address address (int type) const
Address::List addresses () const
Address::List addresses (int type) const
Address findAddress (const QString &id) const
void insertCategory (const QString &)
void removeCategory (const QString &)
bool hasCategory (const QString &) const
void setCategories (const QStringList &)
QStringList categories () const
void insertCustom (const QString &app, const QString &name, const QString &value)
void removeCustom (const QString &app, const QString &name)
QString custom (const QString &app, const QString &name) const
void setCustoms (const QStringList &)
QStringList customs () const
void dump () const
QString asString () const
void setResource (Resource *resource)
Resource * resource () const
void setChanged (bool value)
bool changed () const
bool operator< (const Addressee &addr)

Static Public Member Functions

static QString uidLabel ()
static QString nameLabel ()
static QString formattedNameLabel ()
static QString familyNameLabel ()
static QString givenNameLabel ()
static QString additionalNameLabel ()
static QString prefixLabel ()
static QString suffixLabel ()
static QString nickNameLabel ()
static QString birthdayLabel ()
static QString homeAddressStreetLabel ()
static QString homeAddressLocalityLabel ()
static QString homeAddressRegionLabel ()
static QString homeAddressPostalCodeLabel ()
static QString homeAddressCountryLabel ()
static QString homeAddressLabelLabel ()
static QString businessAddressStreetLabel ()
static QString businessAddressLocalityLabel ()
static QString businessAddressRegionLabel ()
static QString businessAddressPostalCodeLabel ()
static QString businessAddressCountryLabel ()
static QString businessAddressLabelLabel ()
static QString homePhoneLabel ()
static QString businessPhoneLabel ()
static QString mobilePhoneLabel ()
static QString homeFaxLabel ()
static QString businessFaxLabel ()
static QString carPhoneLabel ()
static QString isdnLabel ()
static QString pagerLabel ()
static QString emailLabel ()
static QString mailerLabel ()
static QString timeZoneLabel ()
static QString geoLabel ()
static QString titleLabel ()
static QString roleLabel ()
static QString organizationLabel ()
static QString noteLabel ()
static QString productIdLabel ()
static QString revisionLabel ()
static QString sortStringLabel ()
static QString urlLabel ()
static QString secrecyLabel ()
static QString logoLabel ()
static QString photoLabel ()
static QString soundLabel ()
static QString agentLabel ()
static void parseEmailAddress (const QString &rawEmail, QString &fullName, QString &email)
static void setSortMode (KABC::SortMode *mode)
static QString uidLabel ()
static void parseEmailAddress (const QString &rawEmail, QString &fullName, QString &email)
static void setSortMode (KABC::SortMode *mode)

Friends

KABC_EXPORT QDataStreamoperator<< (QDataStream &, const Addressee &)
KABC_EXPORT QDataStreamoperator>> (QDataStream &, Addressee &)
KABC_EXPORT QDataStreamoperator<< (QDataStream &, const Addressee &)
KABC_EXPORT QDataStreamoperator>> (QDataStream &, Addressee &)

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 75 of file addressee.h.


Constructor & Destructor Documentation

KABC::Addressee::Addressee  ) 
 

Construct an empty address book entry.

KABC::Addressee::Addressee  ) 
 

Construct an empty address book entry.


Member Function Documentation

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.

void KABC::Addressee::setName const QString name  ) 
 

Set name.

QString KABC::Addressee::name  )  const
 

Return name.

static QString KABC::Addressee::nameLabel  )  [static]
 

Return translated label for name field.

void KABC::Addressee::setFormattedName const QString formattedName  ) 
 

Set formatted name.

Referenced by KABC::VCard21Parser::readFromString().

QString KABC::Addressee::formattedName  )  const
 

Return formatted name.

static QString KABC::Addressee::formattedNameLabel  )  [static]
 

Return translated label for formattedName field.

void KABC::Addressee::setFamilyName const QString familyName  ) 
 

Set family name.

Referenced by KABC::VCard21Parser::readFromString().

QString KABC::Addressee::familyName  )  const
 

Return family name.

static QString KABC::Addressee::familyNameLabel  )  [static]
 

Return translated label for familyName field.

void KABC::Addressee::setGivenName const QString givenName  ) 
 

Set given name.

Referenced by KABC::VCard21Parser::readFromString().

QString KABC::Addressee::givenName  )  const
 

Return given name.

static QString KABC::Addressee::givenNameLabel  )  [static]
 

Return translated label for givenName field.

void KABC::Addressee::setAdditionalName const QString additionalName  ) 
 

Set additional names.

Referenced by KABC::VCard21Parser::readFromString().

QString KABC::Addressee::additionalName  )  const
 

Return additional names.

static QString KABC::Addressee::additionalNameLabel  )  [static]
 

Return translated label for additionalName field.

void KABC::Addressee::setPrefix const QString prefix  ) 
 

Set honorific prefixes.

Referenced by KABC::VCard21Parser::readFromString().

QString KABC::Addressee::prefix  )  const
 

Return honorific prefixes.

static QString KABC::Addressee::prefixLabel  )  [static]
 

Return translated label for prefix field.

void KABC::Addressee::setSuffix const QString suffix  ) 
 

Set honorific suffixes.

Referenced by KABC::VCard21Parser::readFromString().

QString KABC::Addressee::suffix  )  const
 

Return honorific suffixes.

static QString KABC::Addressee::suffixLabel  )  [static]
 

Return translated label for suffix field.

void KABC::Addressee::setNickName const QString nickName  ) 
 

Set nick name.

Referenced by KABC::VCard21Parser::readFromString().

QString KABC::Addressee::nickName  )  const
 

Return nick name.

static QString KABC::Addressee::nickNameLabel  )  [static]
 

Return translated label for nickName field.

void KABC::Addressee::setBirthday const QDateTime birthday  ) 
 

Set birthday.

Referenced by KABC::VCard21Parser::readFromString().

QDateTime KABC::Addressee::birthday  )  const
 

Return birthday.

static QString KABC::Addressee::birthdayLabel  )  [static]
 

Return translated label for birthday field.

static QString KABC::Addressee::homeAddressStreetLabel  )  [static]
 

Return translated label for homeAddressStreet field.

static QString KABC::Addressee::homeAddressLocalityLabel  )  [static]
 

Return translated label for homeAddressLocality field.

static QString KABC::Addressee::homeAddressRegionLabel  )  [static]
 

Return translated label for homeAddressRegion field.

static QString KABC::Addressee::homeAddressPostalCodeLabel  )  [static]
 

Return translated label for homeAddressPostalCode field.

static QString KABC::Addressee::homeAddressCountryLabel  )  [static]
 

Return translated label for homeAddressCountry field.

static QString KABC::Addressee::homeAddressLabelLabel  )  [static]
 

Return translated label for homeAddressLabel field.

static QString KABC::Addressee::businessAddressStreetLabel  )  [static]
 

Return translated label for businessAddressStreet field.

static QString KABC::Addressee::businessAddressLocalityLabel  )  [static]
 

Return translated label for businessAddressLocality field.

static QString KABC::Addressee::businessAddressRegionLabel  )  [static]
 

Return translated label for businessAddressRegion field.

static QString KABC::Addressee::businessAddressPostalCodeLabel  )  [static]
 

Return translated label for businessAddressPostalCode field.

static QString KABC::Addressee::businessAddressCountryLabel  )  [static]
 

Return translated label for businessAddressCountry field.

static QString KABC::Addressee::businessAddressLabelLabel  )  [static]
 

Return translated label for businessAddressLabel field.

static QString KABC::Addressee::homePhoneLabel  )  [static]
 

Return translated label for homePhone field.

static QString KABC::Addressee::businessPhoneLabel  )  [static]
 

Return translated label for businessPhone field.

static QString KABC::Addressee::mobilePhoneLabel  )  [static]
 

Return translated label for mobilePhone field.

static QString KABC::Addressee::homeFaxLabel  )  [static]
 

Return translated label for homeFax field.

static QString KABC::Addressee::businessFaxLabel  )  [static]
 

Return translated label for businessFax field.

static QString KABC::Addressee::carPhoneLabel  )  [static]
 

Return translated label for carPhone field.

static QString KABC::Addressee::isdnLabel  )  [static]
 

Return translated label for isdn field.

static QString KABC::Addressee::pagerLabel  )  [static]
 

Return translated label for pager field.

static QString KABC::Addressee::emailLabel  )  [static]
 

Return translated label for email field.

void KABC::Addressee::setMailer const QString mailer  ) 
 

Set mail client.

QString KABC::Addressee::mailer  )  const
 

Return mail client.

static QString KABC::Addressee::mailerLabel  )  [static]
 

Return translated label for mailer field.

void KABC::Addressee::setTimeZone const TimeZone timeZone  ) 
 

Set time zone.

Referenced by KABC::VCard21Parser::readFromString().

TimeZone KABC::Addressee::timeZone  )  const
 

Return time zone.

static QString KABC::Addressee::timeZoneLabel  )  [static]
 

Return translated label for timeZone field.

void KABC::Addressee::setGeo const Geo geo  ) 
 

Set geographic position.

Referenced by KABC::VCard21Parser::readFromString().

Geo KABC::Addressee::geo  )  const
 

Return geographic position.

static QString KABC::Addressee::geoLabel  )  [static]
 

Return translated label for geo field.

void KABC::Addressee::setTitle const QString title  ) 
 

Set title.

Referenced by KABC::VCard21Parser::readFromString().

QString KABC::Addressee::title  )  const
 

Return title.

static QString KABC::Addressee::titleLabel  )  [static]
 

Return translated label for title field.

void KABC::Addressee::setRole const QString role  ) 
 

Set role.

Referenced by KABC::VCard21Parser::readFromString().

QString KABC::Addressee::role  )  const
 

Return role.

static QString KABC::Addressee::roleLabel  )  [static]
 

Return translated label for role field.

void KABC::Addressee::setOrganization const QString organization  ) 
 

Set organization.

Referenced by KABC::VCard21Parser::readFromString().

QString KABC::Addressee::organization  )  const
 

Return organization.

static QString KABC::Addressee::organizationLabel  )  [static]
 

Return translated label for organization field.

void KABC::Addressee::setNote const QString note  ) 
 

Set note.

Referenced by KABC::VCard21Parser::readFromString().

QString KABC::Addressee::note  )  const
 

Return note.

static QString KABC::Addressee::noteLabel  )  [static]
 

Return translated label for note field.

void KABC::Addressee::setProductId const QString productId  ) 
 

Set product identifier.

QString KABC::Addressee::productId  )  const
 

Return product identifier.

static QString KABC::Addressee::productIdLabel  )  [static]
 

Return translated label for productId field.

void KABC::Addressee::setRevision const QDateTime revision  ) 
 

Set revision date.

Referenced by KABC::VCard21Parser::readFromString().

QDateTime KABC::Addressee::revision  )  const
 

Return revision date.

static QString KABC::Addressee::revisionLabel  )  [static]
 

Return translated label for revision field.

void KABC::Addressee::setSortString const QString sortString  ) 
 

Set sort string.

QString KABC::Addressee::sortString  )  const
 

Return sort string.

static QString KABC::Addressee::sortStringLabel  )  [static]
 

Return translated label for sortString field.

void KABC::Addressee::setUrl const KURL url  ) 
 

Set homepage.

Referenced by KABC::VCard21Parser::readFromString().

KURL KABC::Addressee::url  )  const
 

Return homepage.

static QString KABC::Addressee::urlLabel  )  [static]
 

Return translated label for url field.

void KABC::Addressee::setSecrecy const Secrecy &  secrecy  ) 
 

Set security class.

Secrecy KABC::Addressee::secrecy  )  const
 

Return security class.

static QString KABC::Addressee::secrecyLabel  )  [static]
 

Return translated label for secrecy field.

void KABC::Addressee::setLogo const Picture &  logo  ) 
 

Set logo.

Picture KABC::Addressee::logo  )  const
 

Return logo.

static QString KABC::Addressee::logoLabel  )  [static]
 

Return translated label for logo field.

void KABC::Addressee::setPhoto const Picture &  photo  ) 
 

Set photo.

Picture KABC::Addressee::photo  )  const
 

Return photo.

static QString KABC::Addressee::photoLabel  )  [static]
 

Return translated label for photo field.

void KABC::Addressee::setSound const Sound &  sound  ) 
 

Set sound.

Sound KABC::Addressee::sound  )  const
 

Return sound.

static QString KABC::Addressee::soundLabel  )  [static]
 

Return translated label for sound field.

void KABC::Addressee::setAgent const Agent agent  ) 
 

Set agent.

Agent KABC::Addressee::agent  )  const
 

Return agent.

static QString KABC::Addressee::agentLabel  )  [static]
 

Return translated label for agent field.

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.

Referenced by KABC::AddresseeItem::AddresseeItem().

QString KABC::Addressee::assembledName  )  const
 

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.

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

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.

Referenced by KABC::VCard21Parser::readFromString().

void KABC::Addressee::removeEmail const QString email  ) 
 

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.

Referenced by KABC::AddresseeItem::AddresseeItem().

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.

Referenced by KABC::VCard21Parser::readFromString().

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.

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

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.

Referenced by KABC::VCard21Parser::readFromString().

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.

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  )  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)

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  )  const
 

Return list of all custom entries.

static 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  )  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.

Referenced by KABC::VCardFormatPlugin::loadAll(), and KABC::BinaryFormat::loadAll().

Resource* KABC::Addressee::resource  )  const
 

Return pointer to resource.

void KABC::Addressee::setChanged bool  value  ) 
 

Mark addressee as changed.

Referenced by KABC::VCardFormatPlugin::loadAll(), and KABC::BinaryFormat::loadAll().

bool KABC::Addressee::changed  )  const
 

Return whether the addressee is changed.

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.

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

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

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  )  const
 

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  )  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)

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  )  const
 

Return list of all custom entries.

static 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  )  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:
KDE Logo
This file is part of the documentation for kabc Library Version 3.4.0.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Tue Mar 22 19:53:44 2005 by doxygen 1.4.1 written by Dimitri van Heesch, © 1997-2003