summaryrefslogtreecommitdiffabout
path: root/kabc/address.h
authorMichael Krelin <hacker@klever.net>2007-07-04 11:23:42 (UTC)
committer Michael Krelin <hacker@klever.net>2007-07-04 11:23:42 (UTC)
commita08aff328d4393031d5ba7d622c2b05705a89d73 (patch) (unidiff)
tree8ee90d686081c52e7c69b5ce946e9b1a7d690001 /kabc/address.h
parent11edc920afe4f274c0964436633aa632c8288a40 (diff)
downloadkdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.zip
kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.gz
kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.bz2
initial public commit of qt4 portp1
Diffstat (limited to 'kabc/address.h') (more/less context) (ignore whitespace changes)
-rw-r--r--kabc/address.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/kabc/address.h b/kabc/address.h
index 38ad20b..41794fe 100644
--- a/kabc/address.h
+++ b/kabc/address.h
@@ -1,120 +1,120 @@
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/*
22Enhanced Version of the file for platform independent KDE tools. 22Enhanced Version of the file for platform independent KDE tools.
23Copyright (c) 2004 Ulf Schenk 23Copyright (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 <qregexp.h> 33#include <qregexp.h>
34#include <qstringlist.h> 34#include <qstringlist.h>
35#include <qvaluelist.h> 35#include <q3valuelist.h>
36 36
37// template tags for address formatting localization 37// template tags for address formatting localization
38#define KABC_FMTTAG_realname QString("%n") 38#define KABC_FMTTAG_realname QString("%n")
39#define KABC_FMTTAG_REALNAME QString("%N") 39#define KABC_FMTTAG_REALNAME QString("%N")
40#define KABC_FMTTAG_company QString("%cm") 40#define KABC_FMTTAG_company QString("%cm")
41#define KABC_FMTTAG_COMPANY QString("%CM") 41#define KABC_FMTTAG_COMPANY QString("%CM")
42#define KABC_FMTTAG_pobox QString("%p") 42#define KABC_FMTTAG_pobox QString("%p")
43#define KABC_FMTTAG_street QString("%s") 43#define KABC_FMTTAG_street QString("%s")
44#define KABC_FMTTAG_STREET QString("%S") 44#define KABC_FMTTAG_STREET QString("%S")
45#define KABC_FMTTAG_zipcode QString("%z") 45#define KABC_FMTTAG_zipcode QString("%z")
46#define KABC_FMTTAG_location QString("%l") 46#define KABC_FMTTAG_location QString("%l")
47#define KABC_FMTTAG_LOCATION QString("%L") 47#define KABC_FMTTAG_LOCATION QString("%L")
48#define KABC_FMTTAG_region QString("%r") 48#define KABC_FMTTAG_region QString("%r")
49#define KABC_FMTTAG_REGION QString("%R") 49#define KABC_FMTTAG_REGION QString("%R")
50#define KABC_FMTTAG_newline QString("\\n") 50#define KABC_FMTTAG_newline QString("\\n")
51#define KABC_FMTTAG_condcomma QString("%,") 51#define KABC_FMTTAG_condcomma QString("%,")
52#define KABC_FMTTAG_condwhite QString("%w") 52#define KABC_FMTTAG_condwhite QString("%w")
53#define KABC_FMTTAG_purgeempty QString("%0") 53#define KABC_FMTTAG_purgeempty QString("%0")
54 54
55namespace KABC { 55namespace KABC {
56 56
57/** 57/**
58 @short Postal address information. 58 @short Postal address information.
59 59
60 This class represents information about a postal address. 60 This class represents information about a postal address.
61*/ 61*/
62class Address 62class Address
63{ 63{
64 friend QDataStream &operator<<( QDataStream &, const Address & ); 64 friend QDataStream &operator<<( QDataStream &, const Address & );
65 friend QDataStream &operator>>( QDataStream &, Address & ); 65 friend QDataStream &operator>>( QDataStream &, Address & );
66 66
67 public: 67 public:
68 /** 68 /**
69 List of addresses. 69 List of addresses.
70 */ 70 */
71 typedef QValueList<Address> List; 71 typedef Q3ValueList<Address> List;
72 typedef QValueList<int> TypeList; 72 typedef Q3ValueList<int> TypeList;
73 73
74 /** 74 /**
75 Address types: 75 Address types:
76 76
77 @li @p Dom - domestic 77 @li @p Dom - domestic
78 @li @p Intl - international 78 @li @p Intl - international
79 @li @p Postal - postal 79 @li @p Postal - postal
80 @li @p Parcel - parcel 80 @li @p Parcel - parcel
81 @li @p Home - home address 81 @li @p Home - home address
82 @li @p Work - address at work 82 @li @p Work - address at work
83 @li @p Pref - preferred address 83 @li @p Pref - preferred address
84 */ 84 */
85 enum Type { Dom = 1, Intl = 2, Postal = 4, Parcel = 8, Home = 16, Work = 32, 85 enum Type { Dom = 1, Intl = 2, Postal = 4, Parcel = 8, Home = 16, Work = 32,
86 Pref = 64 }; 86 Pref = 64 };
87 87
88 /** 88 /**
89 Constructor that creates an empty Address, which is initialized 89 Constructor that creates an empty Address, which is initialized
90 with a unique id (see @ref id()). 90 with a unique id (see @ref id()).
91 */ 91 */
92 Address(); 92 Address();
93 93
94 /** 94 /**
95 This is like @ref Address() just above, with the difference 95 This is like @ref Address() just above, with the difference
96 that you can specify the type. 96 that you can specify the type.
97 */ 97 */
98 Address( int ); 98 Address( int );
99 bool matchAddress( QRegExp* searchExp ) const; 99 bool matchAddress( QRegExp* searchExp ) const;
100 100
101 bool operator==( const Address & ) const; 101 bool operator==( const Address & ) const;
102 bool operator!=( const Address & ) const; 102 bool operator!=( const Address & ) const;
103 103
104 /** 104 /**
105 Returns true, if the address is empty. 105 Returns true, if the address is empty.
106 */ 106 */
107 bool isEmpty() const; 107 bool isEmpty() const;
108 108
109 /** 109 /**
110 Clears all entries of the address. 110 Clears all entries of the address.
111 */ 111 */
112 void clear(); 112 void clear();
113 QStringList asList(); 113 QStringList asList();
114 114
115 /** 115 /**
116 Sets the unique id. 116 Sets the unique id.
117 */ 117 */
118 void setId( const QString & ); 118 void setId( const QString & );
119 119
120 /* 120 /*