• Skip to content
  • Skip to link menu
KDE 4.0 API Reference
  • KDE API Reference
  • KDE-PIM Libraries
  • 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 72 of file addressee.h.


Public Types

typedef AddresseeList List
typedef QMap< QString, Addressee > Map

Public Member Functions

 Addressee ()
 ~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 setNameFromString (const QString &)
QString realName () const
QString assembledName () const
QString fullEmail (const QString &email=QString()) 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 (PhoneNumber::Type type) const
PhoneNumber::List phoneNumbers () const
PhoneNumber::List phoneNumbers (PhoneNumber::Type type) const
PhoneNumber findPhoneNumber (const QString &id) const
void insertKey (const Key &key)
void removeKey (const Key &key)
Key key (Key::Type type, QString customTypeString=QString()) const
Key::List keys () const
void setKeys (const Key::List &keys)
Key::List keys (Key::Type type, QString customTypeString=QString()) const
Key findKey (const QString &id) const
void insertAddress (const Address &address)
void removeAddress (const Address &address)
Address address (Address::Type type) const
Address::List addresses () const
Address::List addresses (Address::Type 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
QString toString () const
void setResource (Resource *resource)
Resource * resource () const
void setChanged (bool value)
bool changed () const
bool operator< (const Addressee &addr) const

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 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 void parseEmailAddress (const QString &rawEmail, QString &fullName, QString &email)
static void setSortMode (KABC::SortMode *mode)

Friends

QDataStream & operator<< (QDataStream &, const Addressee &)
QDataStream & operator>> (QDataStream &, Addressee &)

Member Typedef Documentation

typedef AddresseeList KABC::Addressee::List

A list of addressee objects.

Definition at line 81 of file addressee.h.

typedef QMap<QString, Addressee> KABC::Addressee::Map

A map from unique identifier to addressee.

See also:
uid()

Definition at line 87 of file addressee.h.


Constructor & Destructor Documentation

Addressee::Addressee (  ) 

Construct an empty address book entry.

Definition at line 147 of file addressee.cpp.

Addressee::~Addressee (  ) 

Destroys the address book entry.

Definition at line 152 of file addressee.cpp.

Addressee::Addressee ( const Addressee &  other  ) 

Copy constructor.

Definition at line 156 of file addressee.cpp.


Member Function Documentation

Addressee & Addressee::operator= ( const Addressee &  other  ) 

Assignment operator.

Returns:
a reference to this

Definition at line 161 of file addressee.cpp.

bool Addressee::operator== ( const Addressee &  a  )  const

Equality operator.

Returns:
true if this and the given addressee are equal, otherwise false

Definition at line 169 of file addressee.cpp.

bool Addressee::operator!= ( const Addressee &  a  )  const

Not-equal operator.

Returns:
true if this and the given addressee are not equal, otherwise false

Definition at line 316 of file addressee.cpp.

bool Addressee::isEmpty (  )  const

Return, if the address book entry is empty.

Definition at line 321 of file addressee.cpp.

void Addressee::setUid ( const QString &  uid  ) 

Set unique identifier.

Parameters:
uid the KABC unique identifier

Definition at line 326 of file addressee.cpp.

QString Addressee::uid (  )  const

Return unique identifier.

Definition at line 333 of file addressee.cpp.

QString Addressee::uidLabel (  )  [static]

Return translated label for uid field.

Definition at line 338 of file addressee.cpp.

void Addressee::setName ( const QString &  name  ) 

Set name.

Definition at line 343 of file addressee.cpp.

QString Addressee::name (  )  const

Return name.

Definition at line 350 of file addressee.cpp.

QString Addressee::nameLabel (  )  [static]

Return translated label for name field.

Definition at line 355 of file addressee.cpp.

void Addressee::setFormattedName ( const QString &  formattedName  ) 

Set formatted name.

Definition at line 361 of file addressee.cpp.

QString Addressee::formattedName (  )  const

Return formatted name.

Definition at line 368 of file addressee.cpp.

QString Addressee::formattedNameLabel (  )  [static]

Return translated label for formattedName field.

Definition at line 373 of file addressee.cpp.

void Addressee::setFamilyName ( const QString &  familyName  ) 

Set family name.

Definition at line 379 of file addressee.cpp.

QString Addressee::familyName (  )  const

Return family name.

Definition at line 386 of file addressee.cpp.

QString Addressee::familyNameLabel (  )  [static]

Return translated label for familyName field.

Definition at line 391 of file addressee.cpp.

void Addressee::setGivenName ( const QString &  givenName  ) 

Set given name.

Definition at line 397 of file addressee.cpp.

QString Addressee::givenName (  )  const

Return given name.

Definition at line 404 of file addressee.cpp.

QString Addressee::givenNameLabel (  )  [static]

Return translated label for givenName field.

Definition at line 409 of file addressee.cpp.

void Addressee::setAdditionalName ( const QString &  additionalName  ) 

Set additional names.

Definition at line 415 of file addressee.cpp.

QString Addressee::additionalName (  )  const

Return additional names.

Definition at line 422 of file addressee.cpp.

QString Addressee::additionalNameLabel (  )  [static]

Return translated label for additionalName field.

Definition at line 427 of file addressee.cpp.

void Addressee::setPrefix ( const QString &  prefix  ) 

Set honorific prefixes.

Definition at line 433 of file addressee.cpp.

QString Addressee::prefix (  )  const

Return honorific prefixes.

Definition at line 440 of file addressee.cpp.

QString Addressee::prefixLabel (  )  [static]

Return translated label for prefix field.

Definition at line 445 of file addressee.cpp.

void Addressee::setSuffix ( const QString &  suffix  ) 

Set honorific suffixes.

Definition at line 451 of file addressee.cpp.

QString Addressee::suffix (  )  const

Return honorific suffixes.

Definition at line 458 of file addressee.cpp.

QString Addressee::suffixLabel (  )  [static]

Return translated label for suffix field.

Definition at line 463 of file addressee.cpp.

void Addressee::setNickName ( const QString &  nickName  ) 

Set nick name.

Definition at line 469 of file addressee.cpp.

QString Addressee::nickName (  )  const

Return nick name.

Definition at line 476 of file addressee.cpp.

QString Addressee::nickNameLabel (  )  [static]

Return translated label for nickName field.

Definition at line 481 of file addressee.cpp.

void Addressee::setBirthday ( const QDateTime &  birthday  ) 

Set birthday.

Definition at line 487 of file addressee.cpp.

QDateTime Addressee::birthday (  )  const

Return birthday.

Definition at line 494 of file addressee.cpp.

QString Addressee::birthdayLabel (  )  [static]

Return translated label for birthday field.

Definition at line 499 of file addressee.cpp.

QString Addressee::homeAddressStreetLabel (  )  [static]

Return translated label for homeAddressStreet field.

Definition at line 505 of file addressee.cpp.

QString Addressee::homeAddressLocalityLabel (  )  [static]

Return translated label for homeAddressLocality field.

Definition at line 511 of file addressee.cpp.

QString Addressee::homeAddressRegionLabel (  )  [static]

Return translated label for homeAddressRegion field.

Definition at line 517 of file addressee.cpp.

QString Addressee::homeAddressPostalCodeLabel (  )  [static]

Return translated label for homeAddressPostalCode field.

Definition at line 523 of file addressee.cpp.

QString Addressee::homeAddressCountryLabel (  )  [static]

Return translated label for homeAddressCountry field.

Definition at line 529 of file addressee.cpp.

QString Addressee::homeAddressLabelLabel (  )  [static]

Return translated label for homeAddressLabel field.

Definition at line 535 of file addressee.cpp.

QString Addressee::businessAddressStreetLabel (  )  [static]

Return translated label for businessAddressStreet field.

Definition at line 541 of file addressee.cpp.

QString Addressee::businessAddressLocalityLabel (  )  [static]

Return translated label for businessAddressLocality field.

Definition at line 547 of file addressee.cpp.

QString Addressee::businessAddressRegionLabel (  )  [static]

Return translated label for businessAddressRegion field.

Definition at line 553 of file addressee.cpp.

QString Addressee::businessAddressPostalCodeLabel (  )  [static]

Return translated label for businessAddressPostalCode field.

Definition at line 559 of file addressee.cpp.

QString Addressee::businessAddressCountryLabel (  )  [static]

Return translated label for businessAddressCountry field.

Definition at line 565 of file addressee.cpp.

QString Addressee::businessAddressLabelLabel (  )  [static]

Return translated label for businessAddressLabel field.

Definition at line 571 of file addressee.cpp.

QString Addressee::homePhoneLabel (  )  [static]

Return translated label for homePhone field.

Definition at line 577 of file addressee.cpp.

QString Addressee::businessPhoneLabel (  )  [static]

Return translated label for businessPhone field.

Definition at line 583 of file addressee.cpp.

QString Addressee::mobilePhoneLabel (  )  [static]

Return translated label for mobilePhone field.

Definition at line 589 of file addressee.cpp.

QString Addressee::homeFaxLabel (  )  [static]

Return translated label for homeFax field.

Definition at line 595 of file addressee.cpp.

QString Addressee::businessFaxLabel (  )  [static]

Return translated label for businessFax field.

Definition at line 601 of file addressee.cpp.

QString Addressee::carPhoneLabel (  )  [static]

Return translated label for carPhone field.

Definition at line 607 of file addressee.cpp.

QString Addressee::isdnLabel (  )  [static]

Return translated label for isdn field.

Definition at line 613 of file addressee.cpp.

QString Addressee::pagerLabel (  )  [static]

Return translated label for pager field.

Definition at line 619 of file addressee.cpp.

QString Addressee::emailLabel (  )  [static]

Return translated label for email field.

Definition at line 625 of file addressee.cpp.

void Addressee::setMailer ( const QString &  mailer  ) 

Set mail client.

Definition at line 631 of file addressee.cpp.

QString Addressee::mailer (  )  const

Return mail client.

Definition at line 638 of file addressee.cpp.

QString Addressee::mailerLabel (  )  [static]

Return translated label for mailer field.

Definition at line 643 of file addressee.cpp.

void Addressee::setTimeZone ( const TimeZone &  timeZone  ) 

Set time zone.

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

QString Addressee::geoLabel (  )  [static]

Return translated label for geo field.

Definition at line 679 of file addressee.cpp.

void Addressee::setTitle ( const QString &  title  ) 

Set title.

Definition at line 685 of file addressee.cpp.

QString Addressee::title (  )  const

Return title.

Definition at line 692 of file addressee.cpp.

QString Addressee::titleLabel (  )  [static]

Return translated label for title field.

Definition at line 697 of file addressee.cpp.

void Addressee::setRole ( const QString &  role  ) 

Set role.

Definition at line 703 of file addressee.cpp.

QString Addressee::role (  )  const

Return role.

Definition at line 710 of file addressee.cpp.

QString Addressee::roleLabel (  )  [static]

Return translated label for role field.

Definition at line 715 of file addressee.cpp.