22 #ifndef KABC_ADDRESSEE_H
23 #define KABC_ADDRESSEE_H
25 #include <QtCore/QDateTime>
26 #include <QtCore/QStringList>
27 #include <QtCore/QSharedDataPointer>
31 #include "kabc/address.h"
34 #include "kabc/phonenumber.h"
35 #include "kabc/picture.h"
36 #include "kabc/secrecy.h"
37 #include "kabc/sound.h"
38 #include "kabc/timezone.h"
39 #include "kabc/addresseelist.h"
43 #ifndef KDEPIM_NO_KRESOURCES
76 friend KABC_EXPORT QDataStream &operator<<( QDataStream &,
const Addressee & );
77 friend KABC_EXPORT QDataStream &operator>>( QDataStream &,
Addressee & );
89 typedef QMap<QString, Addressee>
Map;
119 bool operator==(
const Addressee & )
const;
127 bool operator!=(
const Addressee & )
const;
132 bool isEmpty()
const;
139 void setUid(
const QString &uid );
149 static QString uidLabel();
154 void setName(
const QString &name );
159 QString name()
const;
164 static QString nameLabel();
169 void setFormattedName(
const QString &formattedName );
174 QString formattedName()
const;
179 static QString formattedNameLabel();
184 void setFamilyName(
const QString &familyName );
189 QString familyName()
const;
194 static QString familyNameLabel();
199 void setGivenName(
const QString &givenName );
204 QString givenName()
const;
209 static QString givenNameLabel();
214 void setAdditionalName(
const QString &additionalName );
219 QString additionalName()
const;
224 static QString additionalNameLabel();
229 void setPrefix(
const QString &prefix );
234 QString prefix()
const;
239 static QString prefixLabel();
244 void setSuffix(
const QString &suffix );
249 QString suffix()
const;
254 static QString suffixLabel();
259 void setNickName(
const QString &nickName );
264 QString nickName()
const;
269 static QString nickNameLabel();
274 void setBirthday(
const QDateTime &birthday );
279 QDateTime birthday()
const;
284 static QString birthdayLabel();
289 static QString homeAddressStreetLabel();
294 static QString homeAddressPostOfficeBoxLabel();
299 static QString homeAddressLocalityLabel();
304 static QString homeAddressRegionLabel();
309 static QString homeAddressPostalCodeLabel();
314 static QString homeAddressCountryLabel();
319 static QString homeAddressLabelLabel();
324 static QString businessAddressStreetLabel();
329 static QString businessAddressPostOfficeBoxLabel();
334 static QString businessAddressLocalityLabel();
339 static QString businessAddressRegionLabel();
344 static QString businessAddressPostalCodeLabel();
349 static QString businessAddressCountryLabel();
354 static QString businessAddressLabelLabel();
359 static QString homePhoneLabel();
364 static QString businessPhoneLabel();
369 static QString mobilePhoneLabel();
374 static QString homeFaxLabel();
379 static QString businessFaxLabel();
384 static QString carPhoneLabel();
389 static QString isdnLabel();
394 static QString pagerLabel();
399 static QString emailLabel();
404 void setMailer(
const QString &mailer );
409 QString mailer()
const;
414 static QString mailerLabel();
419 void setTimeZone(
const TimeZone &timeZone );
429 static QString timeZoneLabel();
434 void setGeo(
const Geo &geo );
444 static QString geoLabel();
449 void setTitle(
const QString &title );
454 QString title()
const;
459 static QString titleLabel();
464 void setRole(
const QString &role );
469 QString role()
const;
474 static QString roleLabel();
479 void setOrganization(
const QString &organization );
484 QString organization()
const;
489 static QString organizationLabel();
494 void setDepartment(
const QString &department );
499 QString department()
const;
504 static QString departmentLabel();
509 void setNote(
const QString ¬e );
514 QString note()
const;
519 static QString noteLabel();
524 void setProductId(
const QString &productId );
529 QString productId()
const;
534 static QString productIdLabel();
539 void setRevision(
const QDateTime &revision );
544 QDateTime revision()
const;
549 static QString revisionLabel();
554 void setSortString(
const QString &sortString );
559 QString sortString()
const;
564 static QString sortStringLabel();
569 void setUrl(
const KUrl &url );
579 static QString urlLabel();
584 void setSecrecy(
const Secrecy &secrecy );
589 Secrecy secrecy()
const;
594 static QString secrecyLabel();
599 void setLogo(
const Picture &logo );
609 static QString logoLabel();
614 void setPhoto(
const Picture &photo );
624 static QString photoLabel();
629 void setSound(
const Sound &sound );
639 static QString soundLabel();
646 void setNameFromString(
const QString & );
652 QString realName()
const;
657 QString assembledName()
const;
665 QString fullEmail(
const QString &email=QString() )
const;
675 void insertEmail(
const QString &email,
bool preferred=
false );
682 void removeEmail(
const QString &email );
688 QString preferredEmail()
const;
693 QStringList emails()
const;
700 void setEmails(
const QStringList& list);
708 void insertPhoneNumber(
const PhoneNumber &phoneNumber );
716 void removePhoneNumber(
const PhoneNumber &phoneNumber );
723 PhoneNumber phoneNumber( PhoneNumber::Type type )
const;
743 PhoneNumber findPhoneNumber(
const QString &
id )
const;
751 void insertKey(
const Key &key );
759 void removeKey(
const Key &key );
771 Key key(
Key::Type type, QString customTypeString = QString() )
const;
801 Key findKey(
const QString &
id )
const;
809 void insertAddress(
const Address &address );
817 void removeAddress(
const Address &address );
824 Address address( Address::Type type )
const;
843 Address findAddress(
const QString &
id )
const;
848 void insertCategory(
const QString & );
853 void removeCategory(
const QString & );
858 bool hasCategory(
const QString & )
const;
863 void setCategories(
const QStringList & );
868 QStringList categories()
const;
882 void insertCustom(
const QString &app,
const QString &name,
883 const QString &value );
891 void removeCustom(
const QString &app,
const QString &name );
899 QString custom(
const QString &app,
const QString &name )
const;
904 void setCustoms(
const QStringList & );
912 QStringList customs()
const;
921 static void parseEmailAddress(
const QString &rawEmail, QString &fullName,
927 QString toString()
const;
929 #ifndef KDEPIM_NO_KRESOURCES
935 void setResource(
Resource *resource );
948 void setChanged(
bool value );
953 bool changed()
const;
972 bool operator< (
const Addressee &addr )
const;
977 static QString mimeType();
981 QSharedDataPointer<Private> d;
987 KABC_EXPORT QDataStream &operator<<( QDataStream &,
const Addressee & );
988 KABC_EXPORT QDataStream &operator>>( QDataStream &,
Addressee & );
992 #define KABC_ADDRESSEE_METATYPE_DEFINED 1
Class that holds a Sound clip for a contact.
QList< Key > List
List of keys.
Postal address information.
A class to store a picture of an addressee.
a QValueList of Addressee, with sorting functionality
Sort method for sorting an addressee list.
A class to store an encryption key.
QList< PhoneNumber > List
List of phone numbers.
QList< Address > List
List of addresses.
QMap< QString, Addressee > Map
A map from unique identifier to addressee.
AddresseeList List
A list of addressee objects.