• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdepimlibs-4.14.10 API Reference
  • KDE Home
  • Contact Us
 

kabc

  • kabc
addressee.h
1/*
2 This file is part of libkabc.
3 Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org>
4 2013 Tobias Koenig <tokoe@kde.org>
5
6 This library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Library General Public
8 License as published by the Free Software Foundation; either
9 version 2 of the License, or (at your option) any later version.
10
11 This library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Library General Public License for more details.
15
16 You should have received a copy of the GNU Library General Public License
17 along with this library; see the file COPYING.LIB. If not, write to
18 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 Boston, MA 02110-1301, USA.
20*/
21
22#ifndef KABC_ADDRESSEE_H
23#define KABC_ADDRESSEE_H
24
25#include <QtCore/QDateTime>
26#include <QtCore/QStringList>
27#include <QtCore/QSharedDataPointer>
28
29#include <kurl.h>
30
31#include "kabc/address.h"
32#include "kabc/geo.h"
33#include "kabc/key.h"
34#include "kabc/phonenumber.h"
35#include "kabc/picture.h"
36#include "kabc/secrecy.h"
37#include "kabc/sound.h"
38#include "kabc/email.h"
39#include "kabc/lang.h"
40#include "kabc/gender.h"
41#include "kabc/timezone.h"
42#include "kabc/calendarurl.h"
43#include "kabc/addresseelist.h" // for typedef QList<Addressee> List;
44
45namespace KABC {
46
47#ifndef KDEPIM_NO_KRESOURCES
48class Resource;
49#endif
50class SortMode;
51
78class KABC_EXPORT Addressee
79{
80 friend KABC_EXPORT QDataStream &operator<<( QDataStream &, const Addressee & );
81 friend KABC_EXPORT QDataStream &operator>>( QDataStream &, Addressee & );
82
83 public:
87 typedef AddresseeList List;
93 typedef QMap<QString, Addressee> Map;
94
98 Addressee();
99
103 ~Addressee();
104
108 Addressee( const Addressee & );
109
115 Addressee &operator=( const Addressee & );
116
123 bool operator==( const Addressee & ) const;
124
131 bool operator!=( const Addressee & ) const;
132
136 bool isEmpty() const;
137
143 void setUid( const QString &uid );
144
148 QString uid() const;
149
153 static QString uidLabel();
154
158 void setName( const QString &name );
159
163 QString name() const;
164
168 static QString nameLabel();
169
173 void setFormattedName( const QString &formattedName );
174
178 QString formattedName() const;
179
183 static QString formattedNameLabel();
184
188 void setFamilyName( const QString &familyName );
189
193 QString familyName() const;
194
198 static QString familyNameLabel();
199
203 void setGivenName( const QString &givenName );
204
208 QString givenName() const;
209
213 static QString givenNameLabel();
214
218 void setAdditionalName( const QString &additionalName );
219
223 QString additionalName() const;
224
228 static QString additionalNameLabel();
229
233 void setPrefix( const QString &prefix );
234
238 QString prefix() const;
239
243 static QString prefixLabel();
244
248 void setSuffix( const QString &suffix );
249
253 QString suffix() const;
254
258 static QString suffixLabel();
259
263 void setNickName( const QString &nickName );
264
268 QString nickName() const;
269
273 static QString nickNameLabel();
274
278 void setBirthday( const QDateTime &birthday );
279
283 QDateTime birthday() const;
284
288 static QString birthdayLabel();
289
293 static QString homeAddressStreetLabel();
294
298 static QString homeAddressPostOfficeBoxLabel();
299
303 static QString homeAddressLocalityLabel();
304
308 static QString homeAddressRegionLabel();
309
313 static QString homeAddressPostalCodeLabel();
314
318 static QString homeAddressCountryLabel();
319
323 static QString homeAddressLabelLabel();
324
328 static QString businessAddressStreetLabel();
329
333 static QString businessAddressPostOfficeBoxLabel();
334
338 static QString businessAddressLocalityLabel();
339
343 static QString businessAddressRegionLabel();
344
348 static QString businessAddressPostalCodeLabel();
349
353 static QString businessAddressCountryLabel();
354
358 static QString businessAddressLabelLabel();
359
363 static QString homePhoneLabel();
364
368 static QString businessPhoneLabel();
369
373 static QString mobilePhoneLabel();
374
378 static QString homeFaxLabel();
379
383 static QString businessFaxLabel();
384
388 static QString carPhoneLabel();
389
393 static QString isdnLabel();
394
398 static QString pagerLabel();
399
403 static QString emailLabel();
404
408 void setMailer( const QString &mailer );
409
413 QString mailer() const;
414
418 static QString mailerLabel();
419
423 void setTimeZone( const TimeZone &timeZone );
424
428 TimeZone timeZone() const;
429
433 static QString timeZoneLabel();
434
438 void setGeo( const Geo &geo );
439
443 Geo geo() const;
444
448 static QString geoLabel();
449
453 void setTitle( const QString &title );
454
458 QString title() const;
459
463 static QString titleLabel();
464
468 void setRole( const QString &role );
469
473 QString role() const;
474
478 static QString roleLabel();
479
483 void setOrganization( const QString &organization );
484
488 QString organization() const;
489
493 static QString organizationLabel();
494
498 void setDepartment( const QString &department );
499
503 QString department() const;
504
508 static QString departmentLabel();
509
513 void setNote( const QString &note );
514
518 QString note() const;
519
523 static QString noteLabel();
524
528 void setProductId( const QString &productId );
529
533 QString productId() const;
534
538 static QString productIdLabel();
539
543 void setRevision( const QDateTime &revision );
544
548 QDateTime revision() const;
549
553 static QString revisionLabel();
554
558 void setSortString( const QString &sortString );
559
563 QString sortString() const;
564
568 static QString sortStringLabel();
569
573 void setUrl( const KUrl &url );
574
578 KUrl url() const;
579
583 static QString urlLabel();
584
588 void setSecrecy( const Secrecy &secrecy );
589
593 Secrecy secrecy() const;
594
598 static QString secrecyLabel();
599
603 void setLogo( const Picture &logo );
604
608 Picture logo() const;
609
613 static QString logoLabel();
614
618 void setPhoto( const Picture &photo );
619
623 Picture photo() const;
624
628 static QString photoLabel();
629
633 void setSound( const Sound &sound );
634
638 Sound sound() const;
639
643 static QString soundLabel();
644
650 void setNameFromString( const QString & );
651
656 QString realName() const;
657
661 QString assembledName() const;
662
669 QString fullEmail( const QString &email=QString() ) const;
670
679 void insertEmail( const QString &email, bool preferred=false );
680
686 void removeEmail( const QString &email );
687
692 QString preferredEmail() const;
693
697 QStringList emails() const;
698
704 void setEmails( const QStringList& list);
705 void setEmailList(const Email::List &list);
712 void insertPhoneNumber( const PhoneNumber &phoneNumber );
713
720 void removePhoneNumber( const PhoneNumber &phoneNumber );
721
727 PhoneNumber phoneNumber( PhoneNumber::Type type ) const;
728
732 PhoneNumber::List phoneNumbers() const;
733
739 PhoneNumber::List phoneNumbers( PhoneNumber::Type type ) const;
740
747 PhoneNumber findPhoneNumber( const QString &id ) const;
748
755 void insertKey( const Key &key );
756
763 void removeKey( const Key &key );
764
775 Key key( Key::Type type, QString customTypeString = QString() ) const;
776
780 Key::List keys() const;
781
786 void setKeys( const Key::List& keys);
787
798 Key::List keys( Key::Type type, QString customTypeString = QString() ) const;
799
805 Key findKey( const QString &id ) const;
806
813 void insertAddress( const Address &address );
814
821 void removeAddress( const Address &address );
822
828 Address address( Address::Type type ) const;
829
833 Address::List addresses() const;
834
840 Address::List addresses( Address::Type type ) const;
841
847 Address findAddress( const QString &id ) const;
848
852 void insertCategory( const QString & );
853
857 void removeCategory( const QString & );
858
862 bool hasCategory( const QString & ) const;
863
867 void setCategories( const QStringList & );
868
872 QStringList categories() const;
873
886 void insertCustom( const QString &app, const QString &name,
887 const QString &value );
888
895 void removeCustom( const QString &app, const QString &name );
896
903 QString custom( const QString &app, const QString &name ) const;
904
908 void setCustoms( const QStringList & );
909
916 QStringList customs() const;
917
925 static void parseEmailAddress( const QString &rawEmail, QString &fullName,
926 QString &email );
927
931 QString toString() const;
932
933#ifndef KDEPIM_NO_KRESOURCES
939 void setResource( Resource *resource );
940
944 Resource *resource() const;
945#endif
946
952 void setChanged( bool value );
953
957 bool changed() const;
958
967 static void setSortMode( KABC::SortMode *mode );
968
976 bool operator< ( const Addressee &addr ) const;
977
981 static QString mimeType();
982
983 //kf5 merge with insertEmail(...)
984 void insertEmail(const QString &email, bool preferred, const QMap<QString, QStringList> &param);
985
986 KABC::Email::List emailList() const;
987
988 void removeLang(const QString &language);
989 void insertLang(const Lang &language);
990 void setLangs(const Lang::List &langs);
991 Lang::List langs() const;
992
993 void setGender(const KABC::Gender &gender);
994 KABC::Gender gender() const;
995
996 QString kind() const;
997 void setKind(const QString &kind);
998
999 void insertCalendarUrl(const KABC::CalendarUrl &calendarUrl);
1000
1001
1002 void insertExtraSound(const KABC::Sound &sound);
1003 void setExtraSoundList(const KABC::Sound::List &soundList);
1004 KABC::Sound::List extraSoundList() const;
1005
1006 void insertExtraPhoto(const KABC::Picture &picture);
1007 void setExtraPhotoList(const KABC::Picture::List &pictureList);
1008 KABC::Picture::List extraPhotoList() const;
1009
1010 void insertExtraLogo(const KABC::Picture &log);
1011 void setExtraLogoList(const KABC::Picture::List &logoList);
1012 KABC::Picture::List extraLogoList() const;
1013
1014
1015 QList<KUrl> extraUrlList() const;
1016 void setExtraUrlList(const QList<KUrl> &urlList);
1017 void insertExtraUrl(const KUrl &url);
1018
1019
1020 void insertMember(const QString &member);
1021 void setMembers(const QStringList &c);
1022 QStringList members() const;
1023
1024 void insertRelationShip(const QString &related);
1025 void setRelationShips(const QStringList &c);
1026 QStringList relationShips() const;
1027
1028 void insertSourceUrl(const KUrl &url);
1029 void setSourcesUrlList(const QList<KUrl> &urlList);
1030 QList<KUrl> sourcesUrlList() const;
1031private:
1032 class Private;
1033 QSharedDataPointer<Private> d;
1034};
1035#ifdef kabc_EXPORTS
1036KDE_DUMMY_QHASH_FUNCTION( Addressee )
1037#endif
1038
1039KABC_EXPORT QDataStream &operator<<( QDataStream &, const Addressee & );
1040KABC_EXPORT QDataStream &operator>>( QDataStream &, Addressee & );
1041
1042}
1043
1044#define KABC_ADDRESSEE_METATYPE_DEFINED 1
1045Q_DECLARE_METATYPE( KABC::Addressee )
1046
1047#endif
KABC::Address
Postal address information.
Definition address.h:38
KABC::Address::List
QList< Address > List
List of addresses.
Definition address.h:46
KABC::AddresseeList
a QValueList of Addressee, with sorting functionality
Definition addresseelist.h:289
KABC::Addressee
address book entry
Definition addressee.h:79
KABC::Addressee::List
AddresseeList List
A list of addressee objects.
Definition addressee.h:87
KABC::Addressee::Map
QMap< QString, Addressee > Map
A map from unique identifier to addressee.
Definition addressee.h:93
KABC::Geo
Geographic position.
Definition geo.h:36
KABC::Key
A class to store an encryption key.
Definition key.h:35
KABC::Key::Type
Type
Key types.
Definition key.h:48
KABC::Key::List
QList< Key > List
List of keys.
Definition key.h:43
KABC::PhoneNumber
Phonenumber information.
Definition phonenumber.h:39
KABC::PhoneNumber::List
QList< PhoneNumber > List
List of phone numbers.
Definition phonenumber.h:74
KABC::Picture
A class to store a picture of an addressee.
Definition picture.h:40
KABC::Resource
Definition resource.h:65
KABC::SortMode
Sort method for sorting an addressee list.
Definition sortmode.h:38
KABC::Sound
Class that holds a Sound clip for a contact.
Definition sound.h:59
KABC::TimeZone
Time zone information.
Definition timezone.h:36
KABC
Class that holds a Calendar Url (FBURL/CALADRURI/CALURI)
Definition address.h:29
KABC::operator<<
QDataStream & operator<<(QDataStream &stream, const Address &address)
Serializes the address object into the stream.
Definition address.cpp:680
KABC::operator>>
QDataStream & operator>>(QDataStream &stream, Address &address)
Initializes the address object from the stream.
Definition address.cpp:688
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Wed Jan 24 2024 00:00:00 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kabc

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

kdepimlibs-4.14.10 API Reference

Skip menu "kdepimlibs-4.14.10 API Reference"
  • akonadi
  •   contact
  •   kmime
  •   socialutils
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmbox
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • microblog
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal