• 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
address.h
1 /*
2  This file is part of libkabc.
3  Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org>
4 
5  This library is free software; you can redistribute it and/or
6  modify it under the terms of the GNU Library General Public
7  License as published by the Free Software Foundation; either
8  version 2 of the License, or (at your option) any later version.
9 
10  This library is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  Library General Public License for more details.
14 
15  You should have received a copy of the GNU Library General Public License
16  along with this library; see the file COPYING.LIB. If not, write to
17  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18  Boston, MA 02110-1301, USA.
19 */
20 
21 #ifndef KABC_ADDRESS_H
22 #define KABC_ADDRESS_H
23 
24 #include <QtCore/QSharedDataPointer>
25 #include <QtCore/QString>
26 
27 #include "kabc_export.h"
28 
29 namespace KABC {
30 
37 class KABC_EXPORT Address
38 {
39  friend KABC_EXPORT QDataStream &operator<<( QDataStream &s, const Address &addr );
40  friend KABC_EXPORT QDataStream &operator>>( QDataStream &s, Address &addr );
41 
42  public:
46  typedef QList<Address> List;
47 
51  enum TypeFlag {
52  Dom = 1,
53  Intl = 2,
54  Postal = 4,
55  Parcel = 8,
56  Home = 16,
57  Work = 32,
58  Pref = 64
59  };
60 
61  Q_DECLARE_FLAGS( Type, TypeFlag )
62 
63 
66  typedef QList<TypeFlag> TypeList;
67 
71  Address();
72 
76  Address( Type type );
77 
81  Address( const Address &address );
82 
86  ~Address();
87 
94  bool operator==( const Address &addr ) const;
95 
102  bool operator!=( const Address &addr ) const;
103 
110  Address &operator=( const Address &addr );
111 
115  bool isEmpty() const;
116 
120  void clear();
121 
125  void setId( const QString &identifier );
126 
130  QString id() const;
131 
137  void setType( Type type );
138 
142  Type type() const;
143 
147  QString typeLabel() const;
148 
152  void setPostOfficeBox( const QString &postOfficeBox );
153 
157  QString postOfficeBox() const;
158 
162  static QString postOfficeBoxLabel();
163 
167  void setExtended( const QString &extended );
168 
172  QString extended() const;
173 
177  static QString extendedLabel();
178 
182  void setStreet( const QString &street );
183 
187  QString street() const;
188 
192  static QString streetLabel();
193 
199  void setLocality( const QString &locality );
200 
204  QString locality() const;
205 
209  static QString localityLabel();
210 
216  void setRegion( const QString &region );
217 
221  QString region() const;
222 
226  static QString regionLabel();
227 
231  void setPostalCode( const QString &code );
232 
236  QString postalCode() const;
237 
241  static QString postalCodeLabel();
242 
246  void setCountry( const QString &country );
247 
251  QString country() const;
252 
256  static QString countryLabel();
257 
263  void setLabel( const QString &label );
264 
268  QString label() const;
269 
273  static QString labelLabel();
274 
278  static TypeList typeList();
279 
283  static QString typeLabel( Type type );
284 
288  QString toString() const;
289 
301  QString formattedAddress( const QString &realName = QString(),
302  const QString &orgaName = QString() ) const;
303 
311  static QString countryToISO( const QString &cname );
312 
319  static QString ISOtoCountry( const QString &ISOname );
320 
321  private:
322  class Private;
323  QSharedDataPointer<Private> d;
324 };
325 
326 Q_DECLARE_OPERATORS_FOR_FLAGS( Address::Type )
327 
331 KABC_EXPORT QDataStream &operator<<( QDataStream &stream, const Address &address );
332 
336 KABC_EXPORT QDataStream &operator>>( QDataStream &stream, Address &address );
337 
338 }
339 
340 #endif
KABC::Address
Postal address information.
Definition: address.h:37
KABC::Address::TypeFlag
TypeFlag
Address types:
Definition: address.h:51
KABC::Address::List
QList< Address > List
List of addresses.
Definition: address.h:46
KABC::Address::TypeList
QList< TypeFlag > TypeList
List of address types.
Definition: address.h:66
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