• Skip to content
  • Skip to link menu
KDE 3.5 API Reference
  • KDE API Reference
  • @topname@
  • Sitemap
  • Contact Us
 

kabc

KABC::Addressee

KABC::Addressee Class Reference

#include <addressee.h>

List of all members.


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.


Public Types

typedef QValueList< Addressee > List
typedef QMap< QString, Addressee > Map
typedef QValueList< Addressee > List
typedef QMap< QString, Addressee > Map

Public Member Functions

 Addressee ()
 Addressee (const Addressee &)
Addressee & operator= (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 setDepartment (const QString &department)
QString department () 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 &)
Addressee & operator= (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 homeAddressPostOfficeBoxLabel ()
static QString homeAddressLocalityLabel ()
static QString homeAddressRegionLabel ()
static QString homeAddressPostalCodeLabel ()
static QString homeAddressCountryLabel ()
static QString homeAddressLabelLabel ()
static QString businessAddressStreetLabel ()
static QString businessAddressPostOfficeBoxLabel ()
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 departmentLabel ()
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 QDataStream & operator<< (QDataStream &, const Addressee &)
KABC_EXPORT QDataStream & operator>> (QDataStream &, Addressee &)
KABC_EXPORT QDataStream & operator<< (QDataStream &, const Addressee &)
KABC_EXPORT QDataStream & operator>> (QDataStream &, Addressee &)

Constructor & Destructor Documentation

Addressee::Addressee (  ) 

Construct an empty address book entry.

Definition at line 103 of file addressee.cpp.

KABC::Addressee::Addressee (  ) 

Construct an empty address book entry.


Member Function Documentation

bool Addressee::isEmpty (  )  const

Return, if the address book entry is empty.

Definition at line 297 of file addressee.cpp.

void Addressee::setUid ( const QString &  uid  ) 

Set unique identifier.

Definition at line 302 of file addressee.cpp.

QString Addressee::uid (  )  const

Return unique identifier.

Definition at line 310 of file addressee.cpp.

QString Addressee::uidLabel (  )  [static]

Return translated label for uid field.

Definition at line 315 of file addressee.cpp.

void Addressee::setName ( const QString &  name  ) 

Set name.

Definition at line 320 of file addressee.cpp.

QString Addressee::name (  )  const

Return name.

Definition at line 328 of file addressee.cpp.

QString Addressee::nameLabel (  )  [static]

Return translated label for name field.

Definition at line 333 of file addressee.cpp.

void Addressee::setFormattedName ( const QString &  formattedName  ) 

Set formatted name.

Definition at line 339 of file addressee.cpp.

QString Addressee::formattedName (  )  const

Return formatted name.

Definition at line 347 of file addressee.cpp.

QString Addressee::formattedNameLabel (  )  [static]

Return translated label for formattedName field.

Definition at line 352 of file addressee.cpp.

void Addressee::setFamilyName ( const QString &  familyName  ) 

Set family name.

Definition at line 358 of file addressee.cpp.

QString Addressee::familyName (  )  const

Return family name.

Definition at line 366 of file addressee.cpp.

QString Addressee::familyNameLabel (  )  [static]

Return translated label for familyName field.

Definition at line 371 of file addressee.cpp.

void Addressee::setGivenName ( const QString &  givenName  ) 

Set given name.

Definition at line 377 of file addressee.cpp.

QString Addressee::givenName (  )  const

Return given name.

Definition at line 385 of file addressee.cpp.

QString Addressee::givenNameLabel (  )  [static]

Return translated label for givenName field.

Definition at line 390 of file addressee.cpp.

void Addressee::setAdditionalName ( const QString &  additionalName  ) 

Set additional names.

Definition at line 396 of file addressee.cpp.

QString Addressee::additionalName (  )  const

Return additional names.

Definition at line 404 of file addressee.cpp.

QString Addressee::additionalNameLabel (  )  [static]

Return translated label for additionalName field.

Definition at line 409 of file addressee.cpp.

void Addressee::setPrefix ( const QString &  prefix  ) 

Set honorific prefixes.

Definition at line 415 of file addressee.cpp.

QString Addressee::prefix (  )  const

Return honorific prefixes.

Definition at line 423 of file addressee.cpp.

QString Addressee::prefixLabel (  )  [static]

Return translated label for prefix field.

Definition at line 428 of file addressee.cpp.

void Addressee::setSuffix ( const QString &  suffix  ) 

Set honorific suffixes.

Definition at line 434 of file addressee.cpp.

QString Addressee::suffix (  )  const

Return honorific suffixes.

Definition at line 442 of file addressee.cpp.

QString Addressee::suffixLabel (  )  [static]

Return translated label for suffix field.

Definition at line 447 of file addressee.cpp.

void Addressee::setNickName ( const QString &  nickName  ) 

Set nick name.

Definition at line 453 of file addressee.cpp.

QString Addressee::nickName (  )  const

Return nick name.

Definition at line 461 of file addressee.cpp.

QString Addressee::nickNameLabel (  )  [static]

Return translated label for nickName field.

Definition at line 466 of file addressee.cpp.

void Addressee::setBirthday ( const QDateTime &  birthday  ) 

Set birthday.

Definition at line 472 of file addressee.cpp.

QDateTime Addressee::birthday (  )  const

Return birthday.

Definition at line 480 of file addressee.cpp.

QString Addressee::birthdayLabel (  )  [static]

Return translated label for birthday field.

Definition at line 485 of file addressee.cpp.

QString Addressee::homeAddressStreetLabel (  )  [static]

Return translated label for homeAddressStreet field.

Definition at line 491 of file addressee.cpp.

QString Addressee::homeAddressPostOfficeBoxLabel (  )  [static]

Return translated label for homeAddressPostOfficeBox field.

Definition at line 497 of file addressee.cpp.

QString Addressee::homeAddressLocalityLabel (  )  [static]

Return translated label for homeAddressLocality field.

Definition at line 503 of file addressee.cpp.

QString Addressee::homeAddressRegionLabel (  )  [static]

Return translated label for homeAddressRegion field.

Definition at line 509 of file addressee.cpp.

QString Addressee::homeAddressPostalCodeLabel (  )  [static]

Return translated label for homeAddressPostalCode field.

Definition at line 515 of file addressee.cpp.

QString Addressee::homeAddressCountryLabel (  )  [static]

Return translated label for homeAddressCountry field.

Definition at line 521 of file addressee.cpp.

QString Addressee::homeAddressLabelLabel (  )  [static]

Return translated label for homeAddressLabel field.

Definition at line 527 of file addressee.cpp.

QString Addressee::businessAddressStreetLabel (  )  [static]

Return translated label for businessAddressStreet field.

Definition at line 533 of file addressee.cpp.

QString Addressee::businessAddressPostOfficeBoxLabel (  )  [static]

Return translated label for businessAddressPostOfficeBox field.

Definition at line 539 of file addressee.cpp.

QString Addressee::businessAddressLocalityLabel (  )  [static]

Return translated label for businessAddressLocality field.

Definition at line 545 of file addressee.cpp.

QString Addressee::businessAddressRegionLabel (  )  [static]

Return translated label for businessAddressRegion field.

Definition at line 551 of file addressee.cpp.

QString Addressee::businessAddressPostalCodeLabel (  )  [static]

Return translated label for businessAddressPostalCode field.

Definition at line 557 of file addressee.cpp.

QString Addressee::businessAddressCountryLabel (  )  [static]

Return translated label for businessAddressCountry field.

Definition at line 563 of file addressee.cpp.

QString Addressee::businessAddressLabelLabel (  )  [static]

Return translated label for businessAddressLabel field.

Definition at line 569 of file addressee.cpp.

QString Addressee::homePhoneLabel (  )  [static]

Return translated label for homePhone field.

Definition at line 575 of file addressee.cpp.

QString Addressee::businessPhoneLabel (  )  [static]

Return translated label for businessPhone field.

Definition at line 581 of file addressee.cpp.

QString Addressee::mobilePhoneLabel (  )  [static]

Return translated label for mobilePhone field.

Definition at line 587 of file addressee.cpp.

QString Addressee::homeFaxLabel (  )  [static]

Return translated label for homeFax field.

Definition at line 593 of file addressee.cpp.

QString Addressee::businessFaxLabel (  )  [static]

Return translated label for businessFax field.

Definition at line 599 of file addressee.cpp.

QString Addressee::carPhoneLabel (  )  [static]

Return translated label for carPhone field.

Definition at line 605 of file addressee.cpp.

QString Addressee::isdnLabel (  )  [static]

Return translated label for isdn field.

Definition at line 611 of file addressee.cpp.

QString Addressee::pagerLabel (  )  [static]

Return translated label for pager field.

Definition at line 617 of file addressee.cpp.

QString Addressee::emailLabel (  )  [static]

Return translated label for email field.

Definition at line 623 of file addressee.cpp.

void Addressee::setMailer ( const QString &  mailer  ) 

Set mail client.

Definition at line 629 of file addressee.cpp.

QString Addressee::mailer (  )  const

Return mail client.

Definition at line 637 of file addressee.cpp.

QString Addressee::mailerLabel (  )  [static]

Return translated label for mailer field.

Definition at line 642 of file addressee.cpp.

void Addressee::setTimeZone ( const TimeZone &  timeZone  ) 

Set time zone.

Definition at line 648 of file addressee.cpp.

TimeZone Addressee::timeZone (  )  const

Return time zone.

Definition at line 656 of file addressee.cpp.

QString Addressee::timeZoneLabel (  )  [static]

Return translated label for timeZone field.

Definition at line 661 of file addressee.cpp.

void Addressee::setGeo ( const Geo &  geo  ) 

Set geographic position.

Definition at line 667 of file addressee.cpp.

Geo Addressee::geo (  )  const

Return geographic position.

Definition at line 675 of file addressee.cpp.

QString Addressee::geoLabel (  )  [static]

Return translated label for geo field.

Definition at line 680 of file addressee.cpp.

void Addressee::setTitle ( const QString &  title  ) 

Set title.

Definition at line 686 of file addressee.cpp.

QString Addressee::title (  )  const

Return title.

Definition at line 694 of file addressee.cpp.

QString Addressee::titleLabel (  )  [static]

Return translated label for title field.

Definition at line 699 of file addressee.cpp.

void Addressee::setRole ( const QString &  role  ) 

Set role.

Definition at line 705 of file addressee.cpp.

QString Addressee::role (  )  const

Return role.

Definition at line 713 of file addressee.cpp.

QString Addressee::roleLabel (  )  [static]

Return translated label for role field.

Definition at line 718 of file addressee.cpp.

void Addressee::setOrganization ( const QString &  organization  ) 

Set organization.

Definition at line 724 of file addressee.cpp.

QString Addressee::organization (  )  const

Return organization.

Definition at line 732 of file addressee.cpp.

QString Addressee::organizationLabel (  )  [static]

Return translated label for organization field.

Definition at line 737 of file addressee.cpp.

void Addressee::setDepartment ( const QString &  department  ) 

Set department.

Definition at line 743 of file addressee.cpp.

QString Addressee::department (  )  const

Return department.

Definition at line 751 of file addressee.cpp.

QString Addressee::departmentLabel (  )  [static]

Return translated label for department field.

Definition at line 756 of file addressee.cpp.

void Addressee::setNote ( const QString &  note  ) 

Set note.

Definition at line 762 of file addressee.cpp.

QString Addressee::note (  )  const

Return note.

Definition at line 770 of file addressee.cpp.

QString Addressee::noteLabel (  )  [static]

Return translated label for note field.

Definition at line 775 of file addressee.cpp.

void Addressee::setProductId ( const QString &  productId  ) 

Set product identifier.

Definition at line 781 of file addressee.cpp.

QString Addressee::productId (  )  const

Return product identifier.

Definition at line 789 of file addressee.cpp.

QString Addressee::productIdLabel (  )  [static]

Return translated label for productId field.

Definition at line 794 of file addressee.cpp.

void Addressee::setRevision ( const QDateTime &  revision  ) 

Set revision date.

Definition at line 800 of file addressee.cpp.

QDateTime Addressee::revision (  )  const

Return revision date.

Definition at line 808 of file addressee.cpp.

QString Addressee::revisionLabel (  )  [static]

Return translated label for revision field.

Definition at line 813 of file addressee.cpp.

void Addressee::setSortString ( const QString &  sortString  ) 

Set sort string.

Definition at line 819 of file addressee.cpp.

QString Addressee::sortString (  )  const

Return sort string.

Definition at line 827 of file addressee.cpp.

QString Addressee::sortStringLabel (  )  [static]

Return translated label for sortString field.

Definition at line 832 of file addressee.cpp.

void Addressee::setUrl ( const KURL &  url  ) 

Set homepage.

Definition at line 838 of file addressee.cpp.

KURL Addressee::url (  )  const

Return homepage.

Definition at line 846 of file addressee.cpp.

QString Addressee::urlLabel (  )  [static]

Return translated label for url field.

Definition at line 851 of file addressee.cpp.

void Addressee::setSecrecy ( const Secrecy &  secrecy  ) 

Set security class.

Definition at line 857 of file addressee.cpp.

Secrecy Addressee::secrecy (  )  const

Return security class.

Definition at line 865 of file addressee.cpp.

QString Addressee::secrecyLabel (  )  [static]

Return translated label for secrecy field.

Definition at line 870 of file addressee.cpp.

void Addressee::setLogo ( const Picture &  logo  ) 

Set logo.

Definition at line 876 of file addressee.cpp.

Picture Addressee::logo (  )  const

Return logo.

Definition at line 884 of file addressee.cpp.

QString Addressee::logoLabel (  )  [static]

Return translated label for logo field.

Definition at line 889 of file addressee.cpp.

void Addressee::setPhoto ( const Picture &  photo  ) 

Set photo.

Definition at line 895 of file addressee.cpp.

Picture Addressee::photo (  )  const

Return photo.

Definition at line 903 of file addressee.cpp.

QString Addressee::photoLabel (  )  [static]

Return translated label for photo field.

Definition at line 908 of file addressee.cpp.

void Addressee::setSound ( const Sound &  sound  ) 

Set sound.

Definition at line 914 of file addressee.cpp.

Sound Addressee::sound (  )  const

Return sound.

Definition at line 922 of file addressee.cpp.

QString Addressee::soundLabel (  )  [static]

Return translated label for sound field.

Definition at line 927 of file addressee.cpp.

void Addressee::setAgent ( const Agent &  agent  ) 

Set agent.

Definition at line 933 of file addressee.cpp.

Agent Addressee::agent (  )  const

Return agent.

Definition at line 941 of file addressee.cpp.

QString Addressee::agentLabel (  )  [static]

Return translated label for agent field.

Definition at line 946 of file addressee.cpp.

DEFINITIONS void Addressee::setNameFromString ( const QString &  s  ) 

Set name fields by parsing the given string and trying to associate the parts of the string with according fields.

This function should probably be a bit more clever.

Definition at line 953 of file addressee.cpp.

QString Addressee::realName (  )  const

Return the name of the addressee.

This is calculated from all the name fields.

Definition at line 1110 of file addressee.cpp.

QString Addressee::assembledName (  )  const

Return the name that consists of all name parts.

Definition at line 1127 of file addressee.cpp.

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

void Addressee::insertEmail ( const QString &  email,
bool  preferred = false 
)

Insert an email address.

If the email address already exists in this addressee it is not duplicated.

Parameters:
email Email address
preferred Set to true, if this is the preferred email address of the addressee.

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

QString Addressee::preferredEmail (  )  const

Return preferred email address.

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

Definition at line 1194 of file addressee.cpp.

QStringList Addressee::emails (  )  const

Return list of all email addresses.

Definition at line 1200 of file addressee.cpp.

void Addressee::setEmails ( const QStringList &  list  ) 

Set the emails to list.

The first email address gets the preferred one!

Parameters:
list The list of email addresses.

Definition at line 1204 of file addressee.cpp.

void Addressee::insertPhoneNumber ( const PhoneNumber &  phoneNumber  ) 

Insert a phone number.

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

Definition at line 1209 of file addressee.cpp.

void Addressee::removePhoneNumber ( const PhoneNumber &  phoneNumber  ) 

Remove phone number.

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

Definition at line 1225 of file addressee.cpp.

PhoneNumber Addressee::phoneNumber ( int  type  )  const

Return phone number, which matches the given type.

Definition at line 1238 of file addressee.cpp.

PhoneNumber::List Addressee::phoneNumbers (  )  const

Return list of all phone numbers.

Definition at line 1254 of file addressee.cpp.

PhoneNumber::List Addressee::phoneNumbers ( int  type  )  const

Return list of phone numbers with a special type.

Definition at line 1259 of file addressee.cpp.

PhoneNumber Addressee::findPhoneNumber ( const QString &  id  )  const

Return phone number with the given id.

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

void Addressee::removeKey ( const Key &  key  ) 

Remove a key.

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

Definition at line 1298 of file addressee.cpp.

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

Key::List Addressee::keys (  )  const

Return list of all keys.

Definition at line 1337 of file addressee.cpp.

void Addressee::setKeys ( const Key::List &  keys  ) 

Set the list of keys.

Parameters:
keys The keys to be set.

Definition at line 1331 of file addressee.cpp.

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

Key Addressee::findKey ( const QString &  id  )  const

Return key with the given id.

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

void Addressee::removeAddress ( const Address &  address  ) 

Remove address.

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

Definition at line 1468 of file addressee.cpp.

Address Addressee::address ( int  type  )  const

Return address, which matches the given type.

Definition at line 1481 of file addressee.cpp.

Address::List Addressee::addresses (  )  const

Return list of all addresses.

Definition at line 1497 of file addressee.cpp.

Address::List Addressee::addresses ( int  type  )  const

Return list of addresses with a special type.

Definition at line 1502 of file addressee.cpp.

Address Addressee::findAddress ( const QString &  id  )  const

Return address with the given id.

Definition at line 1516 of file addressee.cpp.

void Addressee::insertCategory ( const QString &  c  ) 

Insert category.

If the category already exists it is not duplicated.

Definition at line 1527 of file addressee.cpp.

void Addressee::removeCategory ( const QString &  c  ) 

Remove category.

Definition at line 1537 of file addressee.cpp.

bool Addressee::hasCategory ( const QString &  c  )  const

Return, if addressee has the given category.

Definition at line 1547 of file addressee.cpp.

void Addressee::setCategories ( const QStringList &  c  ) 

Set categories to given value.

Definition at line 1552 of file addressee.cpp.

QStringList Addressee::categories (  )  const

Return list of all set categories.

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

An empty value isn't allowed (nothing happens if this is called with any of the three arguments being empty)

Definition at line 1565 of file addressee.cpp.

void Addressee::removeCustom ( const QString &  app,
const QString &  name 
)

Remove custom entry.

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

void Addressee::setCustoms ( const QStringList &  l  ) 

Set all custom entries.

Definition at line 1617 of file addressee.cpp.

QStringList Addressee::customs (  )  const

Return list of all custom entries.

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

void Addressee::dump (  )  const

Debug output.

Definition at line 1380 of file addressee.cpp.

QString Addressee::asString (  )  const

Returns string representation of the addressee.

Definition at line 1375 of file addressee.cpp.

void Addressee::setResource ( Resource *  resource  ) 

Set resource where the addressee is from.

Definition at line 1787 of file addressee.cpp.

Resource * Addressee::resource (  )  const

Return pointer to resource.

Definition at line 1793 of file addressee.cpp.

void Addressee::setChanged ( bool  value  ) 

Mark addressee as changed.

Definition at line 1798 of file addressee.cpp.

bool Addressee::changed (  )  const

Return whether the addressee is changed.

Definition at line 1804 of file addressee.cpp.

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:
  • addressee.h
  • addressee.src.h
  • addressee.cpp
  • addressee.src.cpp

kabc

Skip menu "kabc"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

@topname@

Skip menu "@topname@"
  •     kdnssd-avahi
  • arts
  • dcop
  • dnssd
  • interfaces
  •     interface
  •     library
  •   kspeech
  •   ktexteditor
  • kabc
  • kate
  • kcmshell
  • kdecore
  • kded
  • kdefx
  • kdeprint
  • kdesu
  • kdeui
  • kdoctools
  • khtml
  • kimgio
  • kinit
  • kio
  •   bookmarks
  •   httpfilter
  •   kfile
  •   kio
  •   kioexec
  •   kpasswdserver
  •   kssl
  • kioslave
  •   http
  • kjs
  • kmdi
  •   kmdi
  • knewstuff
  • kparts
  • kresources
  • kspell2
  • kunittest
  • kutils
  • kwallet
  • libkmid
  • libkscreensaver
Generated for @topname@ by doxygen 1.5.5
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal