addressee.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
#ifndef KABC_ADDRESSEE_H
00023
#define KABC_ADDRESSEE_H
00024
00025
#include <qdatetime.h>
00026
#include <qstring.h>
00027
#include <qstringlist.h>
00028
#include <qvaluelist.h>
00029
00030
#include <ksharedptr.h>
00031
#include <kurl.h>
00032
00033
#include "address.h"
00034
#include "agent.h"
00035
#include "geo.h"
00036
#include "key.h"
00037
#include "phonenumber.h"
00038
#include "picture.h"
00039
#include "secrecy.h"
00040
#include "sound.h"
00041
#include "timezone.h"
00042
00043
namespace KABC {
00044
00045
class Resource;
00046
class Field;
00047
00074 class Addressee
00075 {
00076
friend QDataStream &operator<<(
QDataStream &,
const Addressee & );
00077
friend QDataStream &operator>>(
QDataStream &,
Addressee & );
00078
00079
public:
00080
typedef QValueList<Addressee> List;
00081
typedef QMap<QString, Addressee> Map;
00082
00086
Addressee();
00087 ~
Addressee();
00088
00089
Addressee(
const Addressee & );
00090
Addressee &operator=(
const Addressee & );
00091
00092
bool operator==(
const Addressee & )
const;
00093
bool operator!=(
const Addressee & )
const;
00094
00098
bool isEmpty()
const;
00099
00103
void setUid(
const QString &
uid );
00107
QString uid()
const;
00111
static QString uidLabel();
00112
00116
void setName(
const QString &
name );
00120
QString name()
const;
00124
static QString nameLabel();
00125
00129
void setFormattedName(
const QString &
formattedName );
00133
QString formattedName()
const;
00137
static QString formattedNameLabel();
00138
00142
void setFamilyName(
const QString &
familyName );
00146
QString familyName()
const;
00150
static QString familyNameLabel();
00151
00155
void setGivenName(
const QString &
givenName );
00159
QString givenName()
const;
00163
static QString givenNameLabel();
00164
00168
void setAdditionalName(
const QString &
additionalName );
00172
QString additionalName()
const;
00176
static QString additionalNameLabel();
00177
00181
void setPrefix(
const QString &
prefix );
00185
QString prefix()
const;
00189
static QString prefixLabel();
00190
00194
void setSuffix(
const QString &
suffix );
00198
QString suffix()
const;
00202
static QString suffixLabel();
00203
00207
void setNickName(
const QString &
nickName );
00211
QString nickName()
const;
00215
static QString nickNameLabel();
00216
00220
void setBirthday(
const QDateTime &
birthday );
00224
QDateTime birthday()
const;
00228
static QString birthdayLabel();
00229
00233
static QString homeAddressStreetLabel();
00234
00238
static QString homeAddressLocalityLabel();
00239
00243
static QString homeAddressRegionLabel();
00244
00248
static QString homeAddressPostalCodeLabel();
00249
00253
static QString homeAddressCountryLabel();
00254
00258
static QString homeAddressLabelLabel();
00259
00263
static QString businessAddressStreetLabel();
00264
00268
static QString businessAddressLocalityLabel();
00269
00273
static QString businessAddressRegionLabel();
00274
00278
static QString businessAddressPostalCodeLabel();
00279
00283
static QString businessAddressCountryLabel();
00284
00288
static QString businessAddressLabelLabel();
00289
00293
static QString homePhoneLabel();
00294
00298
static QString businessPhoneLabel();
00299
00303
static QString mobilePhoneLabel();
00304
00308
static QString homeFaxLabel();
00309
00313
static QString businessFaxLabel();
00314
00318
static QString carPhoneLabel();
00319
00323
static QString isdnLabel();
00324
00328
static QString pagerLabel();
00329
00333
static QString emailLabel();
00334
00338
void setMailer(
const QString &
mailer );
00342
QString mailer()
const;
00346
static QString mailerLabel();
00347
00351
void setTimeZone(
const TimeZone &
timeZone );
00355
TimeZone timeZone()
const;
00359
static QString timeZoneLabel();
00360
00364
void setGeo(
const Geo &
geo );
00368
Geo geo()
const;
00372
static QString geoLabel();
00373
00377
void setTitle(
const QString &
title );
00381
QString title()
const;
00385
static QString titleLabel();
00386
00390
void setRole(
const QString &
role );
00394
QString role()
const;
00398
static QString roleLabel();
00399
00403
void setOrganization(
const QString &
organization );
00407
QString organization()
const;
00411
static QString organizationLabel();
00412
00416
void setNote(
const QString &
note );
00420
QString note()
const;
00424
static QString noteLabel();
00425
00429
void setProductId(
const QString &
productId );
00433
QString productId()
const;
00437
static QString productIdLabel();
00438
00442
void setRevision(
const QDateTime &
revision );
00446
QDateTime revision()
const;
00450
static QString revisionLabel();
00451
00455
void setSortString(
const QString &
sortString );
00459
QString sortString()
const;
00463
static QString sortStringLabel();
00464
00468
void setUrl(
const KURL &
url );
00472
KURL url()
const;
00476
static QString urlLabel();
00477
00481
void setSecrecy(
const Secrecy &
secrecy );
00485 Secrecy
secrecy()
const;
00489
static QString secrecyLabel();
00490
00494
void setLogo(
const Picture &
logo );
00498 Picture
logo()
const;
00502
static QString logoLabel();
00503
00507
void setPhoto(
const Picture &
photo );
00511 Picture
photo()
const;
00515
static QString photoLabel();
00516
00520
void setSound(
const Sound &
sound );
00524 Sound
sound()
const;
00528
static QString soundLabel();
00529
00533
void setAgent(
const Agent &
agent );
00537
Agent agent()
const;
00541
static QString agentLabel();
00542
00548
void setNameFromString(
const QString & );
00549
00554
QString realName()
const;
00555
00559
QString assembledName()
const;
00560
00567
QString fullEmail(
const QString &email=QString::null )
const;
00568
00577
void insertEmail(
const QString &email,
bool preferred=
false );
00578
00582
void removeEmail(
const QString &email );
00583
00588
QString preferredEmail()
const;
00589
00593
QStringList emails()
const;
00594
00600
void setEmails(
const QStringList& list);
00601
00606
void insertPhoneNumber(
const PhoneNumber &
phoneNumber );
00607
00612
void removePhoneNumber(
const PhoneNumber &phoneNumber );
00613
00617
PhoneNumber phoneNumber(
int type )
const;
00618
00622
PhoneNumber::List phoneNumbers()
const;
00623
00627
PhoneNumber::List phoneNumbers(
int type )
const;
00628
00632
PhoneNumber findPhoneNumber(
const QString &
id )
const;
00633
00638
void insertKey(
const Key &
key );
00639
00644
void removeKey(
const Key &key );
00645
00652
Key key(
int type,
QString customTypeString = QString::null )
const;
00653
00657
Key::List keys()
const;
00658
00663
void setKeys(
const Key::List&
keys);
00664
00671
Key::List keys(
int type,
QString customTypeString = QString::null )
const;
00672
00676
Key findKey(
const QString &
id )
const;
00677
00682
void insertAddress(
const Address &
address );
00683
00688
void removeAddress(
const Address &address );
00689
00693
Address address(
int type )
const;
00694
00698
Address::List addresses()
const;
00699
00703
Address::List addresses(
int type )
const;
00704
00708
Address findAddress(
const QString &
id )
const;
00709
00713
void insertCategory(
const QString & );
00714
00718
void removeCategory(
const QString & );
00719
00723
bool hasCategory(
const QString & )
const;
00724
00728
void setCategories(
const QStringList & );
00729
00733
QStringList categories()
const;
00734
00740
void insertCustom(
const QString &app,
const QString &name,
00741
const QString &value );
00742
00746
void removeCustom(
const QString &app,
const QString &name );
00747
00751
QString custom(
const QString &app,
const QString &name )
const;
00752
00756
void setCustoms(
const QStringList & );
00757
00761
QStringList customs()
const;
00762
00766
static void parseEmailAddress(
const QString &rawEmail,
QString &fullName,
00767
QString &email );
00768
00772
void dump()
const;
00773
00777
QString asString()
const;
00778
00782
void setResource( Resource *
resource );
00783
00787 Resource *
resource()
const;
00788
00792
void setChanged(
bool value );
00793
00797
bool changed()
const;
00798
00799
static void setSortKey( KABC::Field *field );
00800
00801
bool operator< (
const Addressee &addr );
00802
00803
private:
00804
void detach();
00805
00806
struct AddresseeData;
00807
mutable KSharedPtr<AddresseeData> mData;
00808
00809
private:
00810
static AddresseeData* shared_null;
00811
static AddresseeData* makeSharedNull();
00812
static KABC::Field *mSortField;
00813 };
00814
00815
QDataStream &
operator<<(
QDataStream &,
const Addressee & );
00816
QDataStream &operator>>(
QDataStream &,
Addressee & );
00817
00818 }
00819
00820
#endif
This file is part of the documentation for kabc Library Version 3.3.1.