-rw-r--r-- | kabc/address.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/kabc/address.h b/kabc/address.h index 6b53c7e..37dd851 100644 --- a/kabc/address.h +++ b/kabc/address.h | |||
@@ -1,96 +1,97 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of libkabc. | 2 | This file is part of libkabc. |
3 | Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org> | 3 | Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org> |
4 | 4 | ||
5 | This library is free software; you can redistribute it and/or | 5 | This library is free software; you can redistribute it and/or |
6 | modify it under the terms of the GNU Library General Public | 6 | modify it under the terms of the GNU Library General Public |
7 | License as published by the Free Software Foundation; either | 7 | License as published by the Free Software Foundation; either |
8 | version 2 of the License, or (at your option) any later version. | 8 | version 2 of the License, or (at your option) any later version. |
9 | 9 | ||
10 | This library is distributed in the hope that it will be useful, | 10 | This library is distributed in the hope that it will be useful, |
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
13 | Library General Public License for more details. | 13 | Library General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU Library General Public License | 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 | 16 | along with this library; see the file COPYING.LIB. If not, write to |
17 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | 17 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
18 | Boston, MA 02111-1307, USA. | 18 | Boston, MA 02111-1307, USA. |
19 | */ | 19 | */ |
20 | 20 | ||
21 | /* | 21 | /* |
22 | Enhanced Version of the file for platform independent KDE tools. | 22 | Enhanced Version of the file for platform independent KDE tools. |
23 | Copyright (c) 2004 Ulf Schenk | 23 | Copyright (c) 2004 Ulf Schenk |
24 | 24 | ||
25 | $Id$ | 25 | $Id$ |
26 | */ | 26 | */ |
27 | 27 | ||
28 | #ifndef KABC_ADDRESS_H | 28 | #ifndef KABC_ADDRESS_H |
29 | #define KABC_ADDRESS_H | 29 | #define KABC_ADDRESS_H |
30 | 30 | ||
31 | #include <qmap.h> | 31 | #include <qmap.h> |
32 | #include <qstring.h> | 32 | #include <qstring.h> |
33 | #include <qstringlist.h> | ||
33 | #include <qvaluelist.h> | 34 | #include <qvaluelist.h> |
34 | 35 | ||
35 | // template tags for address formatting localization | 36 | // template tags for address formatting localization |
36 | #define KABC_FMTTAG_realname QString("%n") | 37 | #define KABC_FMTTAG_realname QString("%n") |
37 | #define KABC_FMTTAG_REALNAME QString("%N") | 38 | #define KABC_FMTTAG_REALNAME QString("%N") |
38 | #define KABC_FMTTAG_company QString("%cm") | 39 | #define KABC_FMTTAG_company QString("%cm") |
39 | #define KABC_FMTTAG_COMPANY QString("%CM") | 40 | #define KABC_FMTTAG_COMPANY QString("%CM") |
40 | #define KABC_FMTTAG_pobox QString("%p") | 41 | #define KABC_FMTTAG_pobox QString("%p") |
41 | #define KABC_FMTTAG_street QString("%s") | 42 | #define KABC_FMTTAG_street QString("%s") |
42 | #define KABC_FMTTAG_STREET QString("%S") | 43 | #define KABC_FMTTAG_STREET QString("%S") |
43 | #define KABC_FMTTAG_zipcode QString("%z") | 44 | #define KABC_FMTTAG_zipcode QString("%z") |
44 | #define KABC_FMTTAG_location QString("%l") | 45 | #define KABC_FMTTAG_location QString("%l") |
45 | #define KABC_FMTTAG_LOCATION QString("%L") | 46 | #define KABC_FMTTAG_LOCATION QString("%L") |
46 | #define KABC_FMTTAG_region QString("%r") | 47 | #define KABC_FMTTAG_region QString("%r") |
47 | #define KABC_FMTTAG_REGION QString("%R") | 48 | #define KABC_FMTTAG_REGION QString("%R") |
48 | #define KABC_FMTTAG_newline QString("\\n") | 49 | #define KABC_FMTTAG_newline QString("\\n") |
49 | #define KABC_FMTTAG_condcomma QString("%,") | 50 | #define KABC_FMTTAG_condcomma QString("%,") |
50 | #define KABC_FMTTAG_condwhite QString("%w") | 51 | #define KABC_FMTTAG_condwhite QString("%w") |
51 | #define KABC_FMTTAG_purgeempty QString("%0") | 52 | #define KABC_FMTTAG_purgeempty QString("%0") |
52 | 53 | ||
53 | namespace KABC { | 54 | namespace KABC { |
54 | 55 | ||
55 | /** | 56 | /** |
56 | @short Postal address information. | 57 | @short Postal address information. |
57 | 58 | ||
58 | This class represents information about a postal address. | 59 | This class represents information about a postal address. |
59 | */ | 60 | */ |
60 | class Address | 61 | class Address |
61 | { | 62 | { |
62 | friend QDataStream &operator<<( QDataStream &, const Address & ); | 63 | friend QDataStream &operator<<( QDataStream &, const Address & ); |
63 | friend QDataStream &operator>>( QDataStream &, Address & ); | 64 | friend QDataStream &operator>>( QDataStream &, Address & ); |
64 | 65 | ||
65 | public: | 66 | public: |
66 | /** | 67 | /** |
67 | List of addresses. | 68 | List of addresses. |
68 | */ | 69 | */ |
69 | typedef QValueList<Address> List; | 70 | typedef QValueList<Address> List; |
70 | typedef QValueList<int> TypeList; | 71 | typedef QValueList<int> TypeList; |
71 | 72 | ||
72 | /** | 73 | /** |
73 | Address types: | 74 | Address types: |
74 | 75 | ||
75 | @li @p Dom - domestic | 76 | @li @p Dom - domestic |
76 | @li @p Intl - international | 77 | @li @p Intl - international |
77 | @li @p Postal - postal | 78 | @li @p Postal - postal |
78 | @li @p Parcel - parcel | 79 | @li @p Parcel - parcel |
79 | @li @p Home - home address | 80 | @li @p Home - home address |
80 | @li @p Work - address at work | 81 | @li @p Work - address at work |
81 | @li @p Pref - preferred address | 82 | @li @p Pref - preferred address |
82 | */ | 83 | */ |
83 | enum Type { Dom = 1, Intl = 2, Postal = 4, Parcel = 8, Home = 16, Work = 32, | 84 | enum Type { Dom = 1, Intl = 2, Postal = 4, Parcel = 8, Home = 16, Work = 32, |
84 | Pref = 64 }; | 85 | Pref = 64 }; |
85 | 86 | ||
86 | /** | 87 | /** |
87 | Constructor that creates an empty Address, which is initialized | 88 | Constructor that creates an empty Address, which is initialized |
88 | with a unique id (see @ref id()). | 89 | with a unique id (see @ref id()). |
89 | */ | 90 | */ |
90 | Address(); | 91 | Address(); |
91 | 92 | ||
92 | /** | 93 | /** |
93 | This is like @ref Address() just above, with the difference | 94 | This is like @ref Address() just above, with the difference |
94 | that you can specify the type. | 95 | that you can specify the type. |
95 | */ | 96 | */ |
96 | Address( int ); | 97 | Address( int ); |