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

kabc

  • sources
  • kde-4.12
  • kdepimlibs
  • 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/timezone.h"
39 #include "kabc/addresseelist.h" // for typedef QList<Addressee> List;
40 
41 namespace KABC {
42 
43 #ifndef KDEPIM_NO_KRESOURCES
44 class Resource;
45 #endif
46 class SortMode;
47 
74 class KABC_EXPORT Addressee
75 {
76  friend KABC_EXPORT QDataStream &operator<<( QDataStream &, const Addressee & );
77  friend KABC_EXPORT QDataStream &operator>>( QDataStream &, Addressee & );
78 
79  public:
83  typedef AddresseeList List;
89  typedef QMap<QString, Addressee> Map;
90 
94  Addressee();
95 
99  ~Addressee();
100 
104  Addressee( const Addressee & );
105 
111  Addressee &operator=( const Addressee & );
112 
119  bool operator==( const Addressee & ) const;
120 
127  bool operator!=( const Addressee & ) const;
128 
132  bool isEmpty() const;
133 
139  void setUid( const QString &uid );
140 
144  QString uid() const;
145 
149  static QString uidLabel();
150 
154  void setName( const QString &name );
155 
159  QString name() const;
160 
164  static QString nameLabel();
165 
169  void setFormattedName( const QString &formattedName );
170 
174  QString formattedName() const;
175 
179  static QString formattedNameLabel();
180 
184  void setFamilyName( const QString &familyName );
185 
189  QString familyName() const;
190 
194  static QString familyNameLabel();
195 
199  void setGivenName( const QString &givenName );
200 
204  QString givenName() const;
205 
209  static QString givenNameLabel();
210 
214  void setAdditionalName( const QString &additionalName );
215 
219  QString additionalName() const;
220 
224  static QString additionalNameLabel();
225 
229  void setPrefix( const QString &prefix );
230 
234  QString prefix() const;
235 
239  static QString prefixLabel();
240 
244  void setSuffix( const QString &suffix );
245 
249  QString suffix() const;
250 
254  static QString suffixLabel();
255 
259  void setNickName( const QString &nickName );
260 
264  QString nickName() const;
265 
269  static QString nickNameLabel();
270 
274  void setBirthday( const QDateTime &birthday );
275 
279  QDateTime birthday() const;
280 
284  static QString birthdayLabel();
285 
289  static QString homeAddressStreetLabel();
290 
294  static QString homeAddressPostOfficeBoxLabel();
295 
299  static QString homeAddressLocalityLabel();
300 
304  static QString homeAddressRegionLabel();
305 
309  static QString homeAddressPostalCodeLabel();
310 
314  static QString homeAddressCountryLabel();
315 
319  static QString homeAddressLabelLabel();
320 
324  static QString businessAddressStreetLabel();
325 
329  static QString businessAddressPostOfficeBoxLabel();
330 
334  static QString businessAddressLocalityLabel();
335 
339  static QString businessAddressRegionLabel();
340 
344  static QString businessAddressPostalCodeLabel();
345 
349  static QString businessAddressCountryLabel();
350 
354  static QString businessAddressLabelLabel();
355 
359  static QString homePhoneLabel();
360 
364  static QString businessPhoneLabel();
365 
369  static QString mobilePhoneLabel();
370 
374  static QString homeFaxLabel();
375 
379  static QString businessFaxLabel();
380 
384  static QString carPhoneLabel();
385 
389  static QString isdnLabel();
390 
394  static QString pagerLabel();
395 
399  static QString emailLabel();
400 
404  void setMailer( const QString &mailer );
405 
409  QString mailer() const;
410 
414  static QString mailerLabel();
415 
419  void setTimeZone( const TimeZone &timeZone );
420 
424  TimeZone timeZone() const;
425 
429  static QString timeZoneLabel();
430 
434  void setGeo( const Geo &geo );
435 
439  Geo geo() const;
440 
444  static QString geoLabel();
445 
449  void setTitle( const QString &title );
450 
454  QString title() const;
455 
459  static QString titleLabel();
460 
464  void setRole( const QString &role );
465 
469  QString role() const;
470 
474  static QString roleLabel();
475 
479  void setOrganization( const QString &organization );
480 
484  QString organization() const;
485 
489  static QString organizationLabel();
490 
494  void setDepartment( const QString &department );
495 
499  QString department() const;
500 
504  static QString departmentLabel();
505 
509  void setNote( const QString &note );
510 
514  QString note() const;
515 
519  static QString noteLabel();
520 
524  void setProductId( const QString &productId );
525 
529  QString productId() const;
530 
534  static QString productIdLabel();
535 
539  void setRevision( const QDateTime &revision );
540 
544  QDateTime revision() const;
545 
549  static QString revisionLabel();
550 
554  void setSortString( const QString &sortString );
555 
559  QString sortString() const;
560 
564  static QString sortStringLabel();
565 
569  void setUrl( const KUrl &url );
570 
574  KUrl url() const;
575 
579  static QString urlLabel();
580 
584  void setSecrecy( const Secrecy &secrecy );
585 
589  Secrecy secrecy() const;
590 
594  static QString secrecyLabel();
595 
599  void setLogo( const Picture &logo );
600 
604  Picture logo() const;
605 
609  static QString logoLabel();
610 
614  void setPhoto( const Picture &photo );
615 
619  Picture photo() const;
620 
624  static QString photoLabel();
625 
629  void setSound( const Sound &sound );
630 
634  Sound sound() const;
635 
639  static QString soundLabel();
640 
646  void setNameFromString( const QString & );
647 
652  QString realName() const;
653 
657  QString assembledName() const;
658 
665  QString fullEmail( const QString &email=QString() ) const;
666 
675  void insertEmail( const QString &email, bool preferred=false );
676 
682  void removeEmail( const QString &email );
683 
688  QString preferredEmail() const;
689 
693  QStringList emails() const;
694 
700  void setEmails( const QStringList& list);
701 
708  void insertPhoneNumber( const PhoneNumber &phoneNumber );
709 
716  void removePhoneNumber( const PhoneNumber &phoneNumber );
717 
723  PhoneNumber phoneNumber( PhoneNumber::Type type ) const;
724 
728  PhoneNumber::List phoneNumbers() const;
729 
735  PhoneNumber::List phoneNumbers( PhoneNumber::Type type ) const;
736 
743  PhoneNumber findPhoneNumber( const QString &id ) const;
744 
751  void insertKey( const Key &key );
752 
759  void removeKey( const Key &key );
760 
771  Key key( Key::Type type, QString customTypeString = QString() ) const;
772 
776  Key::List keys() const;
777 
782  void setKeys( const Key::List& keys);
783 
794  Key::List keys( Key::Type type, QString customTypeString = QString() ) const;
795 
801  Key findKey( const QString &id ) const;
802 
809  void insertAddress( const Address &address );
810 
817  void removeAddress( const Address &address );
818 
824  Address address( Address::Type type ) const;
825 
829  Address::List addresses() const;
830 
836  Address::List addresses( Address::Type type ) const;
837 
843  Address findAddress( const QString &id ) const;
844 
848  void insertCategory( const QString & );
849 
853  void removeCategory( const QString & );
854 
858  bool hasCategory( const QString & ) const;
859 
863  void setCategories( const QStringList & );
864 
868  QStringList categories() const;
869 
882  void insertCustom( const QString &app, const QString &name,
883  const QString &value );
884 
891  void removeCustom( const QString &app, const QString &name );
892 
899  QString custom( const QString &app, const QString &name ) const;
900 
904  void setCustoms( const QStringList & );
905 
912  QStringList customs() const;
913 
921  static void parseEmailAddress( const QString &rawEmail, QString &fullName,
922  QString &email );
923 
927  QString toString() const;
928 
929 #ifndef KDEPIM_NO_KRESOURCES
930 
935  void setResource( Resource *resource );
936 
940  Resource *resource() const;
941 #endif
942 
948  void setChanged( bool value );
949 
953  bool changed() const;
954 
963  static void setSortMode( KABC::SortMode *mode );
964 
972  bool operator< ( const Addressee &addr ) const;
973 
977  static QString mimeType();
978 
979  private:
980  class Private;
981  QSharedDataPointer<Private> d;
982 };
983 #ifdef kabc_EXPORTS
984 KDE_DUMMY_QHASH_FUNCTION( Addressee )
985 #endif
986 
987 KABC_EXPORT QDataStream &operator<<( QDataStream &, const Addressee & );
988 KABC_EXPORT QDataStream &operator>>( QDataStream &, Addressee & );
989 
990 }
991 
992 #define KABC_ADDRESSEE_METATYPE_DEFINED 1
993 Q_DECLARE_METATYPE( KABC::Addressee )
994 
995 #endif
KABC::Sound
Class that holds a Sound clip for a contact.
Definition: sound.h:58
KABC::Key::List
QList< Key > List
List of keys.
Definition: key.h:43
KABC::Address
Postal address information.
Definition: address.h:37
KABC::PhoneNumber
Phonenumber information.
Definition: phonenumber.h:38
KABC::Picture
A class to store a picture of an addressee.
Definition: picture.h:39
KABC::AddresseeList
a QValueList of Addressee, with sorting functionality
Definition: addresseelist.h:288
KABC::SortMode
Sort method for sorting an addressee list.
Definition: sortmode.h:37
KABC::Key
A class to store an encryption key.
Definition: key.h:34
KABC::Key::Type
Type
Key types.
Definition: key.h:48
KABC::PhoneNumber::List
QList< PhoneNumber > List
List of phone numbers.
Definition: phonenumber.h:74
KABC::TimeZone
Time zone information.
Definition: timezone.h:35
KABC::Address::List
QList< Address > List
List of addresses.
Definition: address.h:46
KABC::Addressee::Map
QMap< QString, Addressee > Map
A map from unique identifier to addressee.
Definition: addressee.h:89
KABC::Addressee
address book entry
Definition: addressee.h:74
KABC::Resource
Definition: resource.h:64
KABC::Geo
Geographic position.
Definition: geo.h:35
KABC::Addressee::List
AddresseeList List
A list of addressee objects.
Definition: addressee.h:83
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:01:05 by doxygen 1.8.7 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 API Reference

Skip menu "kdepimlibs API Reference"
  • akonadi
  •   contact
  •   kmime
  •   socialutils
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kldap
  • kmbox
  • kmime
  • kpimidentities
  • kpimtextedit
  • kresources
  • ktnef
  • kxmlrpcclient
  • microblog

Search



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