author | zautrix <zautrix> | 2004-09-19 11:44:45 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-09-19 11:44:45 (UTC) |
commit | 5a78d90ce7a9824e52e70f40f41aa6e17f0d3d0d (patch) (unidiff) | |
tree | 45ccbce00f69f5bb75878b4cbb0ffa38260628d4 /kabc | |
parent | eea0ff04703dffdbe8b67a0dc9f592597d7450c1 (diff) | |
download | kdepimpi-5a78d90ce7a9824e52e70f40f41aa6e17f0d3d0d.zip kdepimpi-5a78d90ce7a9824e52e70f40f41aa6e17f0d3d0d.tar.gz kdepimpi-5a78d90ce7a9824e52e70f40f41aa6e17f0d3d0d.tar.bz2 |
more AB sync
-rw-r--r-- | kabc/addressee.cpp | 28 | ||||
-rw-r--r-- | kabc/addressee.h | 2 |
2 files changed, 17 insertions, 13 deletions
diff --git a/kabc/addressee.cpp b/kabc/addressee.cpp index 711c261..0157721 100644 --- a/kabc/addressee.cpp +++ b/kabc/addressee.cpp | |||
@@ -1,673 +1,677 @@ | |||
1 | /*** Warning! This file has been generated by the script makeaddressee ***/ | 1 | /*** Warning! This file has been generated by the script makeaddressee ***/ |
2 | /* | 2 | /* |
3 | This file is part of libkabc. | 3 | This file is part of libkabc. |
4 | Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org> | 4 | Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org> |
5 | 5 | ||
6 | This library is free software; you can redistribute it and/or | 6 | This library is free software; you can redistribute it and/or |
7 | modify it under the terms of the GNU Library General Public | 7 | modify it under the terms of the GNU Library General Public |
8 | License as published by the Free Software Foundation; either | 8 | License as published by the Free Software Foundation; either |
9 | version 2 of the License, or (at your option) any later version. | 9 | version 2 of the License, or (at your option) any later version. |
10 | 10 | ||
11 | This library is distributed in the hope that it will be useful, | 11 | This library is distributed in the hope that it will be useful, |
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
14 | Library General Public License for more details. | 14 | Library General Public License for more details. |
15 | 15 | ||
16 | You should have received a copy of the GNU Library General Public License | 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 | 17 | along with this library; see the file COPYING.LIB. If not, write to |
18 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | 18 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
19 | Boston, MA 02111-1307, USA. | 19 | Boston, MA 02111-1307, USA. |
20 | */ | 20 | */ |
21 | 21 | ||
22 | /* | 22 | /* |
23 | Enhanced Version of the file for platform independent KDE tools. | 23 | Enhanced Version of the file for platform independent KDE tools. |
24 | Copyright (c) 2004 Ulf Schenk | 24 | Copyright (c) 2004 Ulf Schenk |
25 | 25 | ||
26 | $Id$ | 26 | $Id$ |
27 | */ | 27 | */ |
28 | 28 | ||
29 | #include <kconfig.h> | 29 | #include <kconfig.h> |
30 | 30 | ||
31 | #include <ksharedptr.h> | 31 | #include <ksharedptr.h> |
32 | #include <kdebug.h> | 32 | #include <kdebug.h> |
33 | #include <kapplication.h> | 33 | #include <kapplication.h> |
34 | #include <klocale.h> | 34 | #include <klocale.h> |
35 | #include <kidmanager.h> | 35 | #include <kidmanager.h> |
36 | //US | 36 | //US |
37 | #include <kstandarddirs.h> | 37 | #include <kstandarddirs.h> |
38 | #include <libkcal/syncdefines.h> | 38 | #include <libkcal/syncdefines.h> |
39 | 39 | ||
40 | //US #include "resource.h" | 40 | //US #include "resource.h" |
41 | #include "addressee.h" | 41 | #include "addressee.h" |
42 | 42 | ||
43 | using namespace KABC; | 43 | using namespace KABC; |
44 | 44 | ||
45 | static bool matchBinaryPattern( int value, int pattern ); | 45 | static bool matchBinaryPattern( int value, int pattern ); |
46 | 46 | ||
47 | struct Addressee::AddresseeData : public KShared | 47 | struct Addressee::AddresseeData : public KShared |
48 | { | 48 | { |
49 | QString uid; | 49 | QString uid; |
50 | QString name; | 50 | QString name; |
51 | QString formattedName; | 51 | QString formattedName; |
52 | QString familyName; | 52 | QString familyName; |
53 | QString givenName; | 53 | QString givenName; |
54 | QString additionalName; | 54 | QString additionalName; |
55 | QString prefix; | 55 | QString prefix; |
56 | QString suffix; | 56 | QString suffix; |
57 | QString nickName; | 57 | QString nickName; |
58 | QDateTime birthday; | 58 | QDateTime birthday; |
59 | QString mailer; | 59 | QString mailer; |
60 | TimeZone timeZone; | 60 | TimeZone timeZone; |
61 | Geo geo; | 61 | Geo geo; |
62 | QString title; | 62 | QString title; |
63 | QString role; | 63 | QString role; |
64 | QString organization; | 64 | QString organization; |
65 | QString note; | 65 | QString note; |
66 | QString productId; | 66 | QString productId; |
67 | QDateTime revision; | 67 | QDateTime revision; |
68 | QString sortString; | 68 | QString sortString; |
69 | QString externalUID; | 69 | QString externalUID; |
70 | KURL url; | 70 | KURL url; |
71 | Secrecy secrecy; | 71 | Secrecy secrecy; |
72 | Picture logo; | 72 | Picture logo; |
73 | Picture photo; | 73 | Picture photo; |
74 | Sound sound; | 74 | Sound sound; |
75 | Agent agent; | 75 | Agent agent; |
76 | QString mExternalId; | 76 | QString mExternalId; |
77 | PhoneNumber::List phoneNumbers; | 77 | PhoneNumber::List phoneNumbers; |
78 | Address::List addresses; | 78 | Address::List addresses; |
79 | Key::List keys; | 79 | Key::List keys; |
80 | QStringList emails; | 80 | QStringList emails; |
81 | QStringList categories; | 81 | QStringList categories; |
82 | QStringList custom; | 82 | QStringList custom; |
83 | int mTempSyncStat; | 83 | int mTempSyncStat; |
84 | Resource *resource; | 84 | Resource *resource; |
85 | 85 | ||
86 | bool empty :1; | 86 | bool empty :1; |
87 | bool changed :1; | 87 | bool changed :1; |
88 | }; | 88 | }; |
89 | 89 | ||
90 | Addressee::Addressee() | 90 | Addressee::Addressee() |
91 | { | 91 | { |
92 | mData = new AddresseeData; | 92 | mData = new AddresseeData; |
93 | mData->empty = true; | 93 | mData->empty = true; |
94 | mData->changed = false; | 94 | mData->changed = false; |
95 | mData->resource = 0; | 95 | mData->resource = 0; |
96 | mData->mExternalId = ":"; | 96 | mData->mExternalId = ":"; |
97 | mData->revision = QDateTime ( QDate( 2004,1,1)); | 97 | mData->revision = QDateTime ( QDate( 2004,1,1)); |
98 | mData->mTempSyncStat = SYNC_TEMPSTATE_INITIAL; | 98 | mData->mTempSyncStat = SYNC_TEMPSTATE_INITIAL; |
99 | } | 99 | } |
100 | 100 | ||
101 | Addressee::~Addressee() | 101 | Addressee::~Addressee() |
102 | { | 102 | { |
103 | } | 103 | } |
104 | 104 | ||
105 | Addressee::Addressee( const Addressee &a ) | 105 | Addressee::Addressee( const Addressee &a ) |
106 | { | 106 | { |
107 | mData = a.mData; | 107 | mData = a.mData; |
108 | } | 108 | } |
109 | 109 | ||
110 | Addressee &Addressee::operator=( const Addressee &a ) | 110 | Addressee &Addressee::operator=( const Addressee &a ) |
111 | { | 111 | { |
112 | mData = a.mData; | 112 | mData = a.mData; |
113 | return (*this); | 113 | return (*this); |
114 | } | 114 | } |
115 | 115 | ||
116 | Addressee Addressee::copy() | 116 | Addressee Addressee::copy() |
117 | { | 117 | { |
118 | Addressee a; | 118 | Addressee a; |
119 | *(a.mData) = *mData; | 119 | *(a.mData) = *mData; |
120 | return a; | 120 | return a; |
121 | } | 121 | } |
122 | 122 | ||
123 | void Addressee::detach() | 123 | void Addressee::detach() |
124 | { | 124 | { |
125 | if ( mData.count() == 1 ) return; | 125 | if ( mData.count() == 1 ) return; |
126 | *this = copy(); | 126 | *this = copy(); |
127 | } | 127 | } |
128 | 128 | ||
129 | bool Addressee::operator==( const Addressee &a ) const | 129 | bool Addressee::operator==( const Addressee &a ) const |
130 | { | 130 | { |
131 | if ( uid() != a.uid() ) return false; | 131 | if ( uid() != a.uid() ) return false; |
132 | if ( mData->name != a.mData->name ) return false; | 132 | if ( mData->name != a.mData->name ) return false; |
133 | if ( mData->formattedName != a.mData->formattedName ) return false; | 133 | if ( mData->formattedName != a.mData->formattedName ) return false; |
134 | if ( mData->familyName != a.mData->familyName ) return false; | 134 | if ( mData->familyName != a.mData->familyName ) return false; |
135 | if ( mData->givenName != a.mData->givenName ) return false; | 135 | if ( mData->givenName != a.mData->givenName ) return false; |
136 | if ( mData->additionalName != a.mData->additionalName ) return false; | 136 | if ( mData->additionalName != a.mData->additionalName ) return false; |
137 | if ( mData->prefix != a.mData->prefix ) return false; | 137 | if ( mData->prefix != a.mData->prefix ) return false; |
138 | if ( mData->suffix != a.mData->suffix ) return false; | 138 | if ( mData->suffix != a.mData->suffix ) return false; |
139 | if ( mData->nickName != a.mData->nickName ) return false; | 139 | if ( mData->nickName != a.mData->nickName ) return false; |
140 | if ( mData->birthday != a.mData->birthday ) return false; | 140 | if ( mData->birthday != a.mData->birthday ) return false; |
141 | if ( mData->mailer != a.mData->mailer ) return false; | 141 | if ( mData->mailer != a.mData->mailer ) return false; |
142 | if ( mData->timeZone != a.mData->timeZone ) return false; | 142 | if ( mData->timeZone != a.mData->timeZone ) return false; |
143 | if ( mData->geo != a.mData->geo ) return false; | 143 | if ( mData->geo != a.mData->geo ) return false; |
144 | if ( mData->title != a.mData->title ) return false; | 144 | if ( mData->title != a.mData->title ) return false; |
145 | if ( mData->role != a.mData->role ) return false; | 145 | if ( mData->role != a.mData->role ) return false; |
146 | if ( mData->organization != a.mData->organization ) return false; | 146 | if ( mData->organization != a.mData->organization ) return false; |
147 | if ( mData->note != a.mData->note ) return false; | 147 | if ( mData->note != a.mData->note ) return false; |
148 | if ( mData->productId != a.mData->productId ) return false; | 148 | if ( mData->productId != a.mData->productId ) return false; |
149 | if ( mData->revision != a.mData->revision ) return false; | 149 | if ( mData->revision != a.mData->revision ) return false; |
150 | if ( mData->sortString != a.mData->sortString ) return false; | 150 | if ( mData->sortString != a.mData->sortString ) return false; |
151 | if ( mData->secrecy != a.mData->secrecy ) return false; | 151 | if ( mData->secrecy != a.mData->secrecy ) return false; |
152 | if ( mData->logo != a.mData->logo ) return false; | 152 | if ( mData->logo != a.mData->logo ) return false; |
153 | if ( mData->photo != a.mData->photo ) return false; | 153 | if ( mData->photo != a.mData->photo ) return false; |
154 | if ( mData->sound != a.mData->sound ) return false; | 154 | if ( mData->sound != a.mData->sound ) return false; |
155 | if ( mData->agent != a.mData->agent ) return false; | 155 | if ( mData->agent != a.mData->agent ) return false; |
156 | if ( ( mData->url.isValid() || a.mData->url.isValid() ) && | 156 | if ( ( mData->url.isValid() || a.mData->url.isValid() ) && |
157 | ( mData->url != a.mData->url ) ) return false; | 157 | ( mData->url != a.mData->url ) ) return false; |
158 | if ( mData->phoneNumbers != a.mData->phoneNumbers ) return false; | 158 | if ( mData->phoneNumbers != a.mData->phoneNumbers ) return false; |
159 | if ( mData->addresses != a.mData->addresses ) return false; | 159 | if ( mData->addresses != a.mData->addresses ) return false; |
160 | if ( mData->keys != a.mData->keys ) return false; | 160 | if ( mData->keys != a.mData->keys ) return false; |
161 | if ( mData->emails != a.mData->emails ) return false; | 161 | if ( mData->emails != a.mData->emails ) return false; |
162 | if ( mData->categories != a.mData->categories ) return false; | 162 | if ( mData->categories != a.mData->categories ) return false; |
163 | if ( mData->custom != a.mData->custom ) return false; | 163 | if ( mData->custom != a.mData->custom ) return false; |
164 | 164 | ||
165 | return true; | 165 | return true; |
166 | } | 166 | } |
167 | 167 | ||
168 | bool Addressee::operator!=( const Addressee &a ) const | 168 | bool Addressee::operator!=( const Addressee &a ) const |
169 | { | 169 | { |
170 | return !( a == *this ); | 170 | return !( a == *this ); |
171 | } | 171 | } |
172 | 172 | ||
173 | bool Addressee::isEmpty() const | 173 | bool Addressee::isEmpty() const |
174 | { | 174 | { |
175 | return mData->empty; | 175 | return mData->empty; |
176 | } | 176 | } |
177 | ulong Addressee::getCsum4List( const QStringList & attList) | 177 | ulong Addressee::getCsum4List( const QStringList & attList) |
178 | { | 178 | { |
179 | int max = attList.count(); | 179 | int max = attList.count(); |
180 | ulong cSum = 0; | 180 | ulong cSum = 0; |
181 | int j,k,i; | 181 | int j,k,i; |
182 | int add; | 182 | int add; |
183 | for ( i = 0; i < max ; ++i ) { | 183 | for ( i = 0; i < max ; ++i ) { |
184 | QString s = attList[i]; | 184 | QString s = attList[i]; |
185 | if ( ! s.isEmpty() ){ | 185 | if ( ! s.isEmpty() ){ |
186 | j = s.length(); | 186 | j = s.length(); |
187 | for ( k = 0; k < j; ++k ) { | 187 | for ( k = 0; k < j; ++k ) { |
188 | int mul = k +1; | 188 | int mul = k +1; |
189 | add = s[k].unicode (); | 189 | add = s[k].unicode (); |
190 | if ( k < 16 ) | 190 | if ( k < 16 ) |
191 | mul = mul * mul; | 191 | mul = mul * mul; |
192 | int ii = i+1; | 192 | int ii = i+1; |
193 | add = add * mul *ii*ii*ii; | 193 | add = add * mul *ii*ii*ii; |
194 | cSum += add; | 194 | cSum += add; |
195 | } | 195 | } |
196 | } | 196 | } |
197 | 197 | ||
198 | } | 198 | } |
199 | //QString dump = attList.join(","); | 199 | //QString dump = attList.join(","); |
200 | //qDebug("csum: %d %s", cSum,dump.latin1()); | 200 | //qDebug("csum: %d %s", cSum,dump.latin1()); |
201 | 201 | ||
202 | return cSum; | 202 | return cSum; |
203 | 203 | ||
204 | } | 204 | } |
205 | void Addressee::computeCsum(const QString &dev) | 205 | void Addressee::computeCsum(const QString &dev) |
206 | { | 206 | { |
207 | QStringList l; | 207 | QStringList l; |
208 | if ( !mData->name.isEmpty() ) l.append(mData->name); | 208 | if ( !mData->name.isEmpty() ) l.append(mData->name); |
209 | if ( !mData->formattedName.isEmpty() ) l.append(mData->formattedName ); | 209 | if ( !mData->formattedName.isEmpty() ) l.append(mData->formattedName ); |
210 | if ( !mData->familyName.isEmpty() ) l.append( mData->familyName ); | 210 | if ( !mData->familyName.isEmpty() ) l.append( mData->familyName ); |
211 | if ( !mData->givenName.isEmpty() ) l.append(mData->givenName ); | 211 | if ( !mData->givenName.isEmpty() ) l.append(mData->givenName ); |
212 | if ( !mData->additionalName ) l.append( mData->additionalName ); | 212 | if ( !mData->additionalName ) l.append( mData->additionalName ); |
213 | if ( !mData->prefix.isEmpty() ) l.append( mData->prefix ); | 213 | if ( !mData->prefix.isEmpty() ) l.append( mData->prefix ); |
214 | if ( !mData->suffix.isEmpty() ) l.append( mData->suffix ); | 214 | if ( !mData->suffix.isEmpty() ) l.append( mData->suffix ); |
215 | if ( !mData->nickName.isEmpty() ) l.append( mData->nickName ); | 215 | if ( !mData->nickName.isEmpty() ) l.append( mData->nickName ); |
216 | if ( mData->birthday.isValid() ) l.append( mData->birthday.toString() ); | 216 | if ( mData->birthday.isValid() ) l.append( mData->birthday.toString() ); |
217 | if ( !mData->mailer.isEmpty() ) l.append( mData->mailer ); | 217 | if ( !mData->mailer.isEmpty() ) l.append( mData->mailer ); |
218 | if ( mData->timeZone.isValid() ) l.append( mData->timeZone.asString() ); | 218 | if ( mData->timeZone.isValid() ) l.append( mData->timeZone.asString() ); |
219 | if ( mData->geo.isValid() ) l.append( mData->geo.asString() ); | 219 | if ( mData->geo.isValid() ) l.append( mData->geo.asString() ); |
220 | if ( !mData->title .isEmpty() ) l.append( mData->title ); | 220 | if ( !mData->title .isEmpty() ) l.append( mData->title ); |
221 | if ( !mData->role.isEmpty() ) l.append( mData->role ); | 221 | if ( !mData->role.isEmpty() ) l.append( mData->role ); |
222 | if ( !mData->organization.isEmpty() ) l.append( mData->organization ); | 222 | if ( !mData->organization.isEmpty() ) l.append( mData->organization ); |
223 | if ( !mData->note.isEmpty() ) l.append( mData->note ); | 223 | if ( !mData->note.isEmpty() ) l.append( mData->note ); |
224 | if ( !mData->productId.isEmpty() ) l.append(mData->productId ); | 224 | if ( !mData->productId.isEmpty() ) l.append(mData->productId ); |
225 | if ( !mData->sortString.isEmpty() ) l.append( mData->sortString ); | 225 | if ( !mData->sortString.isEmpty() ) l.append( mData->sortString ); |
226 | if ( mData->secrecy.isValid() ) l.append( mData->secrecy.asString()); | 226 | if ( mData->secrecy.isValid() ) l.append( mData->secrecy.asString()); |
227 | // if ( !mData->logo.isEmpty() ) l.append( ); | 227 | // if ( !mData->logo.isEmpty() ) l.append( ); |
228 | //if ( !mData->photo.isEmpty() ) l.append( ); | 228 | //if ( !mData->photo.isEmpty() ) l.append( ); |
229 | //if ( !mData->sound.isEmpty() ) l.append( ); | 229 | //if ( !mData->sound.isEmpty() ) l.append( ); |
230 | //if ( !mData->agent.isEmpty() ) l.append( ); | 230 | //if ( !mData->agent.isEmpty() ) l.append( ); |
231 | //if ( mData->url.isValid() ) l.append( ); | 231 | //if ( mData->url.isValid() ) l.append( ); |
232 | #if 0 | 232 | #if 0 |
233 | if ( !mData->phoneNumbers.isEmpty() ) l.append( ); | 233 | if ( !mData->phoneNumbers.isEmpty() ) l.append( ); |
234 | if ( !mData->addresses.isEmpty() ) l.append( ); | 234 | if ( !mData->addresses.isEmpty() ) l.append( ); |
235 | //if ( !mData->keys.isEmpty() ) l.append( ); | 235 | //if ( !mData->keys.isEmpty() ) l.append( ); |
236 | if ( !mData->emails.isEmpty() ) l.append( ); | 236 | if ( !mData->emails.isEmpty() ) l.append( ); |
237 | if ( !mData->categories .isEmpty() ) l.append( ); | 237 | if ( !mData->categories .isEmpty() ) l.append( ); |
238 | if ( !mData->custom.isEmpty() ) l.append( ); | 238 | if ( !mData->custom.isEmpty() ) l.append( ); |
239 | #endif | 239 | #endif |
240 | KABC::PhoneNumber::List phoneNumbers; | 240 | KABC::PhoneNumber::List phoneNumbers; |
241 | KABC::PhoneNumber::List::Iterator phoneIter; | 241 | KABC::PhoneNumber::List::Iterator phoneIter; |
242 | 242 | ||
243 | QStringList t; | 243 | QStringList t; |
244 | for ( phoneIter = mData->phoneNumbers.begin(); phoneIter != mData->phoneNumbers.end(); | 244 | for ( phoneIter = mData->phoneNumbers.begin(); phoneIter != mData->phoneNumbers.end(); |
245 | ++phoneIter ) | 245 | ++phoneIter ) |
246 | t.append( ( *phoneIter ).number()+QString::number( ( *phoneIter ).type() ) ); | 246 | t.append( ( *phoneIter ).number()+QString::number( ( *phoneIter ).type() ) ); |
247 | t.sort(); | 247 | t.sort(); |
248 | uint iii; | 248 | uint iii; |
249 | for ( iii = 0; iii < t.count(); ++iii) | 249 | for ( iii = 0; iii < t.count(); ++iii) |
250 | l.append( t[iii] ); | 250 | l.append( t[iii] ); |
251 | t = mData->emails; | 251 | t = mData->emails; |
252 | t.sort(); | 252 | t.sort(); |
253 | for ( iii = 0; iii < t.count(); ++iii) | 253 | for ( iii = 0; iii < t.count(); ++iii) |
254 | l.append( t[iii] ); | 254 | l.append( t[iii] ); |
255 | t = mData->categories; | 255 | t = mData->categories; |
256 | t.sort(); | 256 | t.sort(); |
257 | for ( iii = 0; iii < t.count(); ++iii) | 257 | for ( iii = 0; iii < t.count(); ++iii) |
258 | l.append( t[iii] ); | 258 | l.append( t[iii] ); |
259 | t = mData->custom; | 259 | t = mData->custom; |
260 | t.sort(); | 260 | t.sort(); |
261 | for ( iii = 0; iii < t.count(); ++iii) | 261 | for ( iii = 0; iii < t.count(); ++iii) |
262 | l.append( t[iii] ); | 262 | l.append( t[iii] ); |
263 | KABC::Address::List::Iterator addressIter; | 263 | KABC::Address::List::Iterator addressIter; |
264 | for ( addressIter = mData->addresses.begin(); addressIter != mData->addresses.end(); | 264 | for ( addressIter = mData->addresses.begin(); addressIter != mData->addresses.end(); |
265 | ++addressIter ) { | 265 | ++addressIter ) { |
266 | t = (*addressIter).asList(); | 266 | t = (*addressIter).asList(); |
267 | t.sort(); | 267 | t.sort(); |
268 | for ( iii = 0; iii < t.count(); ++iii) | 268 | for ( iii = 0; iii < t.count(); ++iii) |
269 | l.append( t[iii] ); | 269 | l.append( t[iii] ); |
270 | } | 270 | } |
271 | uint cs = getCsum4List(l); | 271 | uint cs = getCsum4List(l); |
272 | // qDebug("CSUM computed %d %s %s", cs,QString::number (cs ).latin1(), uid().latin1() ); | 272 | // qDebug("CSUM computed %d %s %s", cs,QString::number (cs ).latin1(), uid().latin1() ); |
273 | setCsum( dev, QString::number (cs )); | 273 | setCsum( dev, QString::number (cs )); |
274 | } | 274 | } |
275 | 275 | ||
276 | void Addressee::mergeContact( Addressee ad ) | 276 | void Addressee::mergeContact( const Addressee& ad ) |
277 | { | 277 | { |
278 | |||
279 | detach(); | ||
280 | if ( mData->name.isEmpty() ) mData->name = ad.mData->name; | ||
281 | if ( mData->formattedName.isEmpty() ) mData->formattedName = ad.mData->formattedName; | ||
282 | if ( mData->familyName.isEmpty() ) mData->familyName = ad.mData->familyName; | ||
283 | if ( mData->givenName.isEmpty() ) mData->givenName = ad.mData->givenName ; | ||
284 | if ( mData->additionalName ) mData->additionalName = ad.mData->additionalName; | ||
285 | if ( mData->prefix.isEmpty() ) mData->prefix = ad.mData->prefix; | ||
286 | if ( mData->suffix.isEmpty() ) mData->suffix = ad.mData->suffix; | ||
287 | if ( mData->nickName.isEmpty() ) mData->nickName = ad.mData->nickName; | ||
288 | if ( !mData->birthday.isValid() ) | ||
289 | if ( ad.mData->birthday.isValid()) | ||
290 | mData->birthday = ad.mData->birthday; | ||
291 | if ( mData->mailer.isEmpty() ) mData->mailer = ad.mData->mailer; | ||
278 | #if 0 | 292 | #if 0 |
279 | if ( !mData->name.isEmpty() ) l.append(mData->name); | 293 | if ( !mData->timeZone.isValid() ) l.append( mData->timeZone.asString() ); |
280 | if ( !mData->formattedName.isEmpty() ) l.append(mData->formattedName ); | ||
281 | if ( !mData->familyName.isEmpty() ) l.append( mData->familyName ); | ||
282 | if ( !mData->givenName.isEmpty() ) l.append(mData->givenName ); | ||
283 | if ( !mData->additionalName ) l.append( mData->additionalName ); | ||
284 | if ( !mData->prefix.isEmpty() ) l.append( mData->prefix ); | ||
285 | if ( !mData->suffix.isEmpty() ) l.append( mData->suffix ); | ||
286 | if ( !mData->nickName.isEmpty() ) l.append( mData->nickName ); | ||
287 | if ( mData->birthday.isValid() ) l.append( mData->birthday.toString() ); | ||
288 | if ( !mData->mailer.isEmpty() ) l.append( mData->mailer ); | ||
289 | if ( mData->timeZone.isValid() ) l.append( mData->timeZone.asString() ); | ||
290 | if ( mData->geo.isValid() ) l.append( mData->geo.asString() ); | 294 | if ( mData->geo.isValid() ) l.append( mData->geo.asString() ); |
291 | if ( !mData->title .isEmpty() ) l.append( mData->title ); | 295 | if ( !mData->title .isEmpty() ) l.append( mData->title ); |
292 | if ( !mData->role.isEmpty() ) l.append( mData->role ); | 296 | if ( !mData->role.isEmpty() ) l.append( mData->role ); |
293 | if ( !mData->organization.isEmpty() ) l.append( mData->organization ); | 297 | if ( !mData->organization.isEmpty() ) l.append( mData->organization ); |
294 | if ( !mData->note.isEmpty() ) l.append( mData->note ); | 298 | if ( !mData->note.isEmpty() ) l.append( mData->note ); |
295 | if ( !mData->productId.isEmpty() ) l.append(mData->productId ); | 299 | if ( !mData->productId.isEmpty() ) l.append(mData->productId ); |
296 | if ( !mData->sortString.isEmpty() ) l.append( mData->sortString ); | 300 | if ( !mData->sortString.isEmpty() ) l.append( mData->sortString ); |
297 | if ( mData->secrecy.isValid() ) l.append( mData->secrecy.asString()); | 301 | if ( mData->secrecy.isValid() ) l.append( mData->secrecy.asString()); |
298 | #endif | 302 | #endif |
299 | } | 303 | } |
300 | 304 | ||
301 | void Addressee::removeID(const QString &prof) | 305 | void Addressee::removeID(const QString &prof) |
302 | { | 306 | { |
303 | detach(); | 307 | detach(); |
304 | mData->mExternalId = KIdManager::removeId ( mData->mExternalId, prof); | 308 | mData->mExternalId = KIdManager::removeId ( mData->mExternalId, prof); |
305 | 309 | ||
306 | } | 310 | } |
307 | void Addressee::setID( const QString & prof , const QString & id ) | 311 | void Addressee::setID( const QString & prof , const QString & id ) |
308 | { | 312 | { |
309 | detach(); | 313 | detach(); |
310 | mData->mExternalId = KIdManager::setId ( mData->mExternalId, prof, id ); | 314 | mData->mExternalId = KIdManager::setId ( mData->mExternalId, prof, id ); |
311 | //qDebug("setID2 %s %s %s",mData->mExternalId.latin1(), prof.latin1(), id.latin1() ); | 315 | //qDebug("setID2 %s %s %s",mData->mExternalId.latin1(), prof.latin1(), id.latin1() ); |
312 | } | 316 | } |
313 | void Addressee::setTempSyncStat( int id ) | 317 | void Addressee::setTempSyncStat( int id ) |
314 | { | 318 | { |
315 | if ( mData->mTempSyncStat == id ) return; | 319 | if ( mData->mTempSyncStat == id ) return; |
316 | detach(); | 320 | detach(); |
317 | mData->mTempSyncStat = id; | 321 | mData->mTempSyncStat = id; |
318 | } | 322 | } |
319 | int Addressee::tempSyncStat() const | 323 | int Addressee::tempSyncStat() const |
320 | { | 324 | { |
321 | return mData->mTempSyncStat; | 325 | return mData->mTempSyncStat; |
322 | } | 326 | } |
323 | 327 | ||
324 | QString Addressee::getID( const QString & prof) | 328 | QString Addressee::getID( const QString & prof) |
325 | { | 329 | { |
326 | return KIdManager::getId ( mData->mExternalId, prof ); | 330 | return KIdManager::getId ( mData->mExternalId, prof ); |
327 | } | 331 | } |
328 | 332 | ||
329 | void Addressee::setCsum( const QString & prof , const QString & id ) | 333 | void Addressee::setCsum( const QString & prof , const QString & id ) |
330 | { | 334 | { |
331 | detach(); | 335 | detach(); |
332 | //qDebug("setcsum1 %s %s %s",mData->mExternalId.latin1(), prof.latin1(), id.latin1() ); | 336 | //qDebug("setcsum1 %s %s %s",mData->mExternalId.latin1(), prof.latin1(), id.latin1() ); |
333 | mData->mExternalId = KIdManager::setCsum ( mData->mExternalId, prof, id ); | 337 | mData->mExternalId = KIdManager::setCsum ( mData->mExternalId, prof, id ); |
334 | //qDebug("setcsum2 %s ",mData->mExternalId.latin1() ); | 338 | //qDebug("setcsum2 %s ",mData->mExternalId.latin1() ); |
335 | } | 339 | } |
336 | 340 | ||
337 | QString Addressee::getCsum( const QString & prof) | 341 | QString Addressee::getCsum( const QString & prof) |
338 | { | 342 | { |
339 | return KIdManager::getCsum ( mData->mExternalId, prof ); | 343 | return KIdManager::getCsum ( mData->mExternalId, prof ); |
340 | } | 344 | } |
341 | 345 | ||
342 | void Addressee::setIDStr( const QString & s ) | 346 | void Addressee::setIDStr( const QString & s ) |
343 | { | 347 | { |
344 | detach(); | 348 | detach(); |
345 | mData->mExternalId = s; | 349 | mData->mExternalId = s; |
346 | } | 350 | } |
347 | 351 | ||
348 | QString Addressee::IDStr() const | 352 | QString Addressee::IDStr() const |
349 | { | 353 | { |
350 | return mData->mExternalId; | 354 | return mData->mExternalId; |
351 | } | 355 | } |
352 | 356 | ||
353 | void Addressee::setExternalUID( const QString &id ) | 357 | void Addressee::setExternalUID( const QString &id ) |
354 | { | 358 | { |
355 | if ( id == mData->externalUID ) return; | 359 | if ( id == mData->externalUID ) return; |
356 | detach(); | 360 | detach(); |
357 | mData->empty = false; | 361 | mData->empty = false; |
358 | mData->externalUID = id; | 362 | mData->externalUID = id; |
359 | } | 363 | } |
360 | 364 | ||
361 | QString Addressee::externalUID() const | 365 | QString Addressee::externalUID() const |
362 | { | 366 | { |
363 | return mData->externalUID; | 367 | return mData->externalUID; |
364 | } | 368 | } |
365 | 369 | ||
366 | void Addressee::setUid( const QString &id ) | 370 | void Addressee::setUid( const QString &id ) |
367 | { | 371 | { |
368 | if ( id == mData->uid ) return; | 372 | if ( id == mData->uid ) return; |
369 | detach(); | 373 | detach(); |
370 | mData->empty = false; | 374 | mData->empty = false; |
371 | mData->uid = id; | 375 | mData->uid = id; |
372 | } | 376 | } |
373 | 377 | ||
374 | QString Addressee::uid() const | 378 | QString Addressee::uid() const |
375 | { | 379 | { |
376 | if ( mData->uid.isEmpty() ) | 380 | if ( mData->uid.isEmpty() ) |
377 | mData->uid = KApplication::randomString( 10 ); | 381 | mData->uid = KApplication::randomString( 10 ); |
378 | 382 | ||
379 | return mData->uid; | 383 | return mData->uid; |
380 | } | 384 | } |
381 | 385 | ||
382 | QString Addressee::uidLabel() | 386 | QString Addressee::uidLabel() |
383 | { | 387 | { |
384 | return i18n("Unique Identifier"); | 388 | return i18n("Unique Identifier"); |
385 | } | 389 | } |
386 | 390 | ||
387 | void Addressee::setName( const QString &name ) | 391 | void Addressee::setName( const QString &name ) |
388 | { | 392 | { |
389 | if ( name == mData->name ) return; | 393 | if ( name == mData->name ) return; |
390 | detach(); | 394 | detach(); |
391 | mData->empty = false; | 395 | mData->empty = false; |
392 | mData->name = name; | 396 | mData->name = name; |
393 | } | 397 | } |
394 | 398 | ||
395 | QString Addressee::name() const | 399 | QString Addressee::name() const |
396 | { | 400 | { |
397 | return mData->name; | 401 | return mData->name; |
398 | } | 402 | } |
399 | 403 | ||
400 | QString Addressee::nameLabel() | 404 | QString Addressee::nameLabel() |
401 | { | 405 | { |
402 | return i18n("Name"); | 406 | return i18n("Name"); |
403 | } | 407 | } |
404 | 408 | ||
405 | 409 | ||
406 | void Addressee::setFormattedName( const QString &formattedName ) | 410 | void Addressee::setFormattedName( const QString &formattedName ) |
407 | { | 411 | { |
408 | if ( formattedName == mData->formattedName ) return; | 412 | if ( formattedName == mData->formattedName ) return; |
409 | detach(); | 413 | detach(); |
410 | mData->empty = false; | 414 | mData->empty = false; |
411 | mData->formattedName = formattedName; | 415 | mData->formattedName = formattedName; |
412 | } | 416 | } |
413 | 417 | ||
414 | QString Addressee::formattedName() const | 418 | QString Addressee::formattedName() const |
415 | { | 419 | { |
416 | return mData->formattedName; | 420 | return mData->formattedName; |
417 | } | 421 | } |
418 | 422 | ||
419 | QString Addressee::formattedNameLabel() | 423 | QString Addressee::formattedNameLabel() |
420 | { | 424 | { |
421 | return i18n("Formatted Name"); | 425 | return i18n("Formatted Name"); |
422 | } | 426 | } |
423 | 427 | ||
424 | 428 | ||
425 | void Addressee::setFamilyName( const QString &familyName ) | 429 | void Addressee::setFamilyName( const QString &familyName ) |
426 | { | 430 | { |
427 | if ( familyName == mData->familyName ) return; | 431 | if ( familyName == mData->familyName ) return; |
428 | detach(); | 432 | detach(); |
429 | mData->empty = false; | 433 | mData->empty = false; |
430 | mData->familyName = familyName; | 434 | mData->familyName = familyName; |
431 | } | 435 | } |
432 | 436 | ||
433 | QString Addressee::familyName() const | 437 | QString Addressee::familyName() const |
434 | { | 438 | { |
435 | return mData->familyName; | 439 | return mData->familyName; |
436 | } | 440 | } |
437 | 441 | ||
438 | QString Addressee::familyNameLabel() | 442 | QString Addressee::familyNameLabel() |
439 | { | 443 | { |
440 | return i18n("Family Name"); | 444 | return i18n("Family Name"); |
441 | } | 445 | } |
442 | 446 | ||
443 | 447 | ||
444 | void Addressee::setGivenName( const QString &givenName ) | 448 | void Addressee::setGivenName( const QString &givenName ) |
445 | { | 449 | { |
446 | if ( givenName == mData->givenName ) return; | 450 | if ( givenName == mData->givenName ) return; |
447 | detach(); | 451 | detach(); |
448 | mData->empty = false; | 452 | mData->empty = false; |
449 | mData->givenName = givenName; | 453 | mData->givenName = givenName; |
450 | } | 454 | } |
451 | 455 | ||
452 | QString Addressee::givenName() const | 456 | QString Addressee::givenName() const |
453 | { | 457 | { |
454 | return mData->givenName; | 458 | return mData->givenName; |
455 | } | 459 | } |
456 | 460 | ||
457 | QString Addressee::givenNameLabel() | 461 | QString Addressee::givenNameLabel() |
458 | { | 462 | { |
459 | return i18n("Given Name"); | 463 | return i18n("Given Name"); |
460 | } | 464 | } |
461 | 465 | ||
462 | 466 | ||
463 | void Addressee::setAdditionalName( const QString &additionalName ) | 467 | void Addressee::setAdditionalName( const QString &additionalName ) |
464 | { | 468 | { |
465 | if ( additionalName == mData->additionalName ) return; | 469 | if ( additionalName == mData->additionalName ) return; |
466 | detach(); | 470 | detach(); |
467 | mData->empty = false; | 471 | mData->empty = false; |
468 | mData->additionalName = additionalName; | 472 | mData->additionalName = additionalName; |
469 | } | 473 | } |
470 | 474 | ||
471 | QString Addressee::additionalName() const | 475 | QString Addressee::additionalName() const |
472 | { | 476 | { |
473 | return mData->additionalName; | 477 | return mData->additionalName; |
474 | } | 478 | } |
475 | 479 | ||
476 | QString Addressee::additionalNameLabel() | 480 | QString Addressee::additionalNameLabel() |
477 | { | 481 | { |
478 | return i18n("Additional Names"); | 482 | return i18n("Additional Names"); |
479 | } | 483 | } |
480 | 484 | ||
481 | 485 | ||
482 | void Addressee::setPrefix( const QString &prefix ) | 486 | void Addressee::setPrefix( const QString &prefix ) |
483 | { | 487 | { |
484 | if ( prefix == mData->prefix ) return; | 488 | if ( prefix == mData->prefix ) return; |
485 | detach(); | 489 | detach(); |
486 | mData->empty = false; | 490 | mData->empty = false; |
487 | mData->prefix = prefix; | 491 | mData->prefix = prefix; |
488 | } | 492 | } |
489 | 493 | ||
490 | QString Addressee::prefix() const | 494 | QString Addressee::prefix() const |
491 | { | 495 | { |
492 | return mData->prefix; | 496 | return mData->prefix; |
493 | } | 497 | } |
494 | 498 | ||
495 | QString Addressee::prefixLabel() | 499 | QString Addressee::prefixLabel() |
496 | { | 500 | { |
497 | return i18n("Honorific Prefixes"); | 501 | return i18n("Honorific Prefixes"); |
498 | } | 502 | } |
499 | 503 | ||
500 | 504 | ||
501 | void Addressee::setSuffix( const QString &suffix ) | 505 | void Addressee::setSuffix( const QString &suffix ) |
502 | { | 506 | { |
503 | if ( suffix == mData->suffix ) return; | 507 | if ( suffix == mData->suffix ) return; |
504 | detach(); | 508 | detach(); |
505 | mData->empty = false; | 509 | mData->empty = false; |
506 | mData->suffix = suffix; | 510 | mData->suffix = suffix; |
507 | } | 511 | } |
508 | 512 | ||
509 | QString Addressee::suffix() const | 513 | QString Addressee::suffix() const |
510 | { | 514 | { |
511 | return mData->suffix; | 515 | return mData->suffix; |
512 | } | 516 | } |
513 | 517 | ||
514 | QString Addressee::suffixLabel() | 518 | QString Addressee::suffixLabel() |
515 | { | 519 | { |
516 | return i18n("Honorific Suffixes"); | 520 | return i18n("Honorific Suffixes"); |
517 | } | 521 | } |
518 | 522 | ||
519 | 523 | ||
520 | void Addressee::setNickName( const QString &nickName ) | 524 | void Addressee::setNickName( const QString &nickName ) |
521 | { | 525 | { |
522 | if ( nickName == mData->nickName ) return; | 526 | if ( nickName == mData->nickName ) return; |
523 | detach(); | 527 | detach(); |
524 | mData->empty = false; | 528 | mData->empty = false; |
525 | mData->nickName = nickName; | 529 | mData->nickName = nickName; |
526 | } | 530 | } |
527 | 531 | ||
528 | QString Addressee::nickName() const | 532 | QString Addressee::nickName() const |
529 | { | 533 | { |
530 | return mData->nickName; | 534 | return mData->nickName; |
531 | } | 535 | } |
532 | 536 | ||
533 | QString Addressee::nickNameLabel() | 537 | QString Addressee::nickNameLabel() |
534 | { | 538 | { |
535 | return i18n("Nick Name"); | 539 | return i18n("Nick Name"); |
536 | } | 540 | } |
537 | 541 | ||
538 | 542 | ||
539 | void Addressee::setBirthday( const QDateTime &birthday ) | 543 | void Addressee::setBirthday( const QDateTime &birthday ) |
540 | { | 544 | { |
541 | if ( birthday == mData->birthday ) return; | 545 | if ( birthday == mData->birthday ) return; |
542 | detach(); | 546 | detach(); |
543 | mData->empty = false; | 547 | mData->empty = false; |
544 | mData->birthday = birthday; | 548 | mData->birthday = birthday; |
545 | } | 549 | } |
546 | 550 | ||
547 | QDateTime Addressee::birthday() const | 551 | QDateTime Addressee::birthday() const |
548 | { | 552 | { |
549 | return mData->birthday; | 553 | return mData->birthday; |
550 | } | 554 | } |
551 | 555 | ||
552 | QString Addressee::birthdayLabel() | 556 | QString Addressee::birthdayLabel() |
553 | { | 557 | { |
554 | return i18n("Birthday"); | 558 | return i18n("Birthday"); |
555 | } | 559 | } |
556 | 560 | ||
557 | 561 | ||
558 | QString Addressee::homeAddressStreetLabel() | 562 | QString Addressee::homeAddressStreetLabel() |
559 | { | 563 | { |
560 | return i18n("Home Address Street"); | 564 | return i18n("Home Address Street"); |
561 | } | 565 | } |
562 | 566 | ||
563 | 567 | ||
564 | QString Addressee::homeAddressLocalityLabel() | 568 | QString Addressee::homeAddressLocalityLabel() |
565 | { | 569 | { |
566 | return i18n("Home Address Locality"); | 570 | return i18n("Home Address Locality"); |
567 | } | 571 | } |
568 | 572 | ||
569 | 573 | ||
570 | QString Addressee::homeAddressRegionLabel() | 574 | QString Addressee::homeAddressRegionLabel() |
571 | { | 575 | { |
572 | return i18n("Home Address Region"); | 576 | return i18n("Home Address Region"); |
573 | } | 577 | } |
574 | 578 | ||
575 | 579 | ||
576 | QString Addressee::homeAddressPostalCodeLabel() | 580 | QString Addressee::homeAddressPostalCodeLabel() |
577 | { | 581 | { |
578 | return i18n("Home Address Postal Code"); | 582 | return i18n("Home Address Postal Code"); |
579 | } | 583 | } |
580 | 584 | ||
581 | 585 | ||
582 | QString Addressee::homeAddressCountryLabel() | 586 | QString Addressee::homeAddressCountryLabel() |
583 | { | 587 | { |
584 | return i18n("Home Address Country"); | 588 | return i18n("Home Address Country"); |
585 | } | 589 | } |
586 | 590 | ||
587 | 591 | ||
588 | QString Addressee::homeAddressLabelLabel() | 592 | QString Addressee::homeAddressLabelLabel() |
589 | { | 593 | { |
590 | return i18n("Home Address Label"); | 594 | return i18n("Home Address Label"); |
591 | } | 595 | } |
592 | 596 | ||
593 | 597 | ||
594 | QString Addressee::businessAddressStreetLabel() | 598 | QString Addressee::businessAddressStreetLabel() |
595 | { | 599 | { |
596 | return i18n("Business Address Street"); | 600 | return i18n("Business Address Street"); |
597 | } | 601 | } |
598 | 602 | ||
599 | 603 | ||
600 | QString Addressee::businessAddressLocalityLabel() | 604 | QString Addressee::businessAddressLocalityLabel() |
601 | { | 605 | { |
602 | return i18n("Business Address Locality"); | 606 | return i18n("Business Address Locality"); |
603 | } | 607 | } |
604 | 608 | ||
605 | 609 | ||
606 | QString Addressee::businessAddressRegionLabel() | 610 | QString Addressee::businessAddressRegionLabel() |
607 | { | 611 | { |
608 | return i18n("Business Address Region"); | 612 | return i18n("Business Address Region"); |
609 | } | 613 | } |
610 | 614 | ||
611 | 615 | ||
612 | QString Addressee::businessAddressPostalCodeLabel() | 616 | QString Addressee::businessAddressPostalCodeLabel() |
613 | { | 617 | { |
614 | return i18n("Business Address Postal Code"); | 618 | return i18n("Business Address Postal Code"); |
615 | } | 619 | } |
616 | 620 | ||
617 | 621 | ||
618 | QString Addressee::businessAddressCountryLabel() | 622 | QString Addressee::businessAddressCountryLabel() |
619 | { | 623 | { |
620 | return i18n("Business Address Country"); | 624 | return i18n("Business Address Country"); |
621 | } | 625 | } |
622 | 626 | ||
623 | 627 | ||
624 | QString Addressee::businessAddressLabelLabel() | 628 | QString Addressee::businessAddressLabelLabel() |
625 | { | 629 | { |
626 | return i18n("Business Address Label"); | 630 | return i18n("Business Address Label"); |
627 | } | 631 | } |
628 | 632 | ||
629 | 633 | ||
630 | QString Addressee::homePhoneLabel() | 634 | QString Addressee::homePhoneLabel() |
631 | { | 635 | { |
632 | return i18n("Home Phone"); | 636 | return i18n("Home Phone"); |
633 | } | 637 | } |
634 | 638 | ||
635 | 639 | ||
636 | QString Addressee::businessPhoneLabel() | 640 | QString Addressee::businessPhoneLabel() |
637 | { | 641 | { |
638 | return i18n("Business Phone"); | 642 | return i18n("Business Phone"); |
639 | } | 643 | } |
640 | 644 | ||
641 | 645 | ||
642 | QString Addressee::mobilePhoneLabel() | 646 | QString Addressee::mobilePhoneLabel() |
643 | { | 647 | { |
644 | return i18n("Mobile Phone"); | 648 | return i18n("Mobile Phone"); |
645 | } | 649 | } |
646 | 650 | ||
647 | 651 | ||
648 | QString Addressee::homeFaxLabel() | 652 | QString Addressee::homeFaxLabel() |
649 | { | 653 | { |
650 | return i18n("Home Fax"); | 654 | return i18n("Home Fax"); |
651 | } | 655 | } |
652 | 656 | ||
653 | 657 | ||
654 | QString Addressee::businessFaxLabel() | 658 | QString Addressee::businessFaxLabel() |
655 | { | 659 | { |
656 | return i18n("Business Fax"); | 660 | return i18n("Business Fax"); |
657 | } | 661 | } |
658 | 662 | ||
659 | 663 | ||
660 | QString Addressee::carPhoneLabel() | 664 | QString Addressee::carPhoneLabel() |
661 | { | 665 | { |
662 | return i18n("Car Phone"); | 666 | return i18n("Car Phone"); |
663 | } | 667 | } |
664 | 668 | ||
665 | 669 | ||
666 | QString Addressee::isdnLabel() | 670 | QString Addressee::isdnLabel() |
667 | { | 671 | { |
668 | return i18n("ISDN"); | 672 | return i18n("ISDN"); |
669 | } | 673 | } |
670 | 674 | ||
671 | 675 | ||
672 | QString Addressee::pagerLabel() | 676 | QString Addressee::pagerLabel() |
673 | { | 677 | { |
diff --git a/kabc/addressee.h b/kabc/addressee.h index 59fcbd8..3ba7777 100644 --- a/kabc/addressee.h +++ b/kabc/addressee.h | |||
@@ -1,501 +1,501 @@ | |||
1 | /*** Warning! This file has been generated by the script makeaddressee ***/ | 1 | /*** Warning! This file has been generated by the script makeaddressee ***/ |
2 | /* | 2 | /* |
3 | This file is part of libkabc. | 3 | This file is part of libkabc. |
4 | Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org> | 4 | Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org> |
5 | 5 | ||
6 | This library is free software; you can redistribute it and/or | 6 | This library is free software; you can redistribute it and/or |
7 | modify it under the terms of the GNU Library General Public | 7 | modify it under the terms of the GNU Library General Public |
8 | License as published by the Free Software Foundation; either | 8 | License as published by the Free Software Foundation; either |
9 | version 2 of the License, or (at your option) any later version. | 9 | version 2 of the License, or (at your option) any later version. |
10 | 10 | ||
11 | This library is distributed in the hope that it will be useful, | 11 | This library is distributed in the hope that it will be useful, |
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
14 | Library General Public License for more details. | 14 | Library General Public License for more details. |
15 | 15 | ||
16 | You should have received a copy of the GNU Library General Public License | 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 | 17 | along with this library; see the file COPYING.LIB. If not, write to |
18 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | 18 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
19 | Boston, MA 02111-1307, USA. | 19 | Boston, MA 02111-1307, USA. |
20 | */ | 20 | */ |
21 | 21 | ||
22 | /* | 22 | /* |
23 | Enhanced Version of the file for platform independent KDE tools. | 23 | Enhanced Version of the file for platform independent KDE tools. |
24 | Copyright (c) 2004 Ulf Schenk | 24 | Copyright (c) 2004 Ulf Schenk |
25 | 25 | ||
26 | $Id$ | 26 | $Id$ |
27 | */ | 27 | */ |
28 | 28 | ||
29 | #ifndef KABC_ADDRESSEE_H | 29 | #ifndef KABC_ADDRESSEE_H |
30 | #define KABC_ADDRESSEE_H | 30 | #define KABC_ADDRESSEE_H |
31 | 31 | ||
32 | #include <qdatetime.h> | 32 | #include <qdatetime.h> |
33 | #include <qstring.h> | 33 | #include <qstring.h> |
34 | #include <qstringlist.h> | 34 | #include <qstringlist.h> |
35 | #include <qvaluelist.h> | 35 | #include <qvaluelist.h> |
36 | 36 | ||
37 | #include <ksharedptr.h> | 37 | #include <ksharedptr.h> |
38 | #include <kurl.h> | 38 | #include <kurl.h> |
39 | 39 | ||
40 | #include "address.h" | 40 | #include "address.h" |
41 | #include "agent.h" | 41 | #include "agent.h" |
42 | #include "geo.h" | 42 | #include "geo.h" |
43 | #include "key.h" | 43 | #include "key.h" |
44 | #include "phonenumber.h" | 44 | #include "phonenumber.h" |
45 | #include "picture.h" | 45 | #include "picture.h" |
46 | #include "secrecy.h" | 46 | #include "secrecy.h" |
47 | #include "sound.h" | 47 | #include "sound.h" |
48 | #include "timezone.h" | 48 | #include "timezone.h" |
49 | 49 | ||
50 | namespace KABC { | 50 | namespace KABC { |
51 | 51 | ||
52 | class Resource; | 52 | class Resource; |
53 | 53 | ||
54 | /** | 54 | /** |
55 | @short address book entry | 55 | @short address book entry |
56 | 56 | ||
57 | This class represents an entry in the address book. | 57 | This class represents an entry in the address book. |
58 | 58 | ||
59 | The data of this class is implicitly shared. You can pass this class by value. | 59 | The data of this class is implicitly shared. You can pass this class by value. |
60 | 60 | ||
61 | If you need the name of a field for presenting it to the user you should use | 61 | If you need the name of a field for presenting it to the user you should use |
62 | the functions ending in Label(). They return a translated string which can be | 62 | the functions ending in Label(). They return a translated string which can be |
63 | used as label for the corresponding field. | 63 | used as label for the corresponding field. |
64 | 64 | ||
65 | About the name fields: | 65 | About the name fields: |
66 | 66 | ||
67 | givenName() is the first name and familyName() the last name. In some | 67 | givenName() is the first name and familyName() the last name. In some |
68 | countries the family name comes first, that's the reason for the | 68 | countries the family name comes first, that's the reason for the |
69 | naming. formattedName() is the full name with the correct formatting. | 69 | naming. formattedName() is the full name with the correct formatting. |
70 | It is used as an override, when the correct formatting can't be generated | 70 | It is used as an override, when the correct formatting can't be generated |
71 | from the other name fields automatically. | 71 | from the other name fields automatically. |
72 | 72 | ||
73 | realName() returns a fully formatted name(). It uses formattedName, if set, | 73 | realName() returns a fully formatted name(). It uses formattedName, if set, |
74 | otherwise it constucts the name from the name fields. As fallback, if | 74 | otherwise it constucts the name from the name fields. As fallback, if |
75 | nothing else is set it uses name(). | 75 | nothing else is set it uses name(). |
76 | 76 | ||
77 | name() is the NAME type of RFC2426. It can be used as internal name for the | 77 | name() is the NAME type of RFC2426. It can be used as internal name for the |
78 | data enty, but shouldn't be used for displaying the data to the user. | 78 | data enty, but shouldn't be used for displaying the data to the user. |
79 | */ | 79 | */ |
80 | class Addressee | 80 | class Addressee |
81 | { | 81 | { |
82 | friend QDataStream &operator<<( QDataStream &, const Addressee & ); | 82 | friend QDataStream &operator<<( QDataStream &, const Addressee & ); |
83 | friend QDataStream &operator>>( QDataStream &, Addressee & ); | 83 | friend QDataStream &operator>>( QDataStream &, Addressee & ); |
84 | 84 | ||
85 | public: | 85 | public: |
86 | typedef QValueList<Addressee> List; | 86 | typedef QValueList<Addressee> List; |
87 | 87 | ||
88 | /** | 88 | /** |
89 | Construct an empty address book entry. | 89 | Construct an empty address book entry. |
90 | */ | 90 | */ |
91 | Addressee(); | 91 | Addressee(); |
92 | ~Addressee(); | 92 | ~Addressee(); |
93 | 93 | ||
94 | Addressee( const Addressee & ); | 94 | Addressee( const Addressee & ); |
95 | Addressee &operator=( const Addressee & ); | 95 | Addressee &operator=( const Addressee & ); |
96 | 96 | ||
97 | bool operator==( const Addressee & ) const; | 97 | bool operator==( const Addressee & ) const; |
98 | bool operator!=( const Addressee & ) const; | 98 | bool operator!=( const Addressee & ) const; |
99 | // sync stuff | 99 | // sync stuff |
100 | void setTempSyncStat(int id); | 100 | void setTempSyncStat(int id); |
101 | int tempSyncStat() const; | 101 | int tempSyncStat() const; |
102 | void setIDStr( const QString & ); | 102 | void setIDStr( const QString & ); |
103 | QString IDStr() const; | 103 | QString IDStr() const; |
104 | void setID( const QString &, const QString & ); | 104 | void setID( const QString &, const QString & ); |
105 | QString getID( const QString & ); | 105 | QString getID( const QString & ); |
106 | void setCsum( const QString &, const QString & ); | 106 | void setCsum( const QString &, const QString & ); |
107 | QString getCsum( const QString & ); | 107 | QString getCsum( const QString & ); |
108 | void removeID(const QString &); | 108 | void removeID(const QString &); |
109 | void computeCsum(const QString &dev); | 109 | void computeCsum(const QString &dev); |
110 | ulong getCsum4List( const QStringList & attList); | 110 | ulong getCsum4List( const QStringList & attList); |
111 | /** | 111 | /** |
112 | Return, if the address book entry is empty. | 112 | Return, if the address book entry is empty. |
113 | */ | 113 | */ |
114 | bool isEmpty() const; | 114 | bool isEmpty() const; |
115 | void setExternalUID( const QString &id ); | 115 | void setExternalUID( const QString &id ); |
116 | QString externalUID() const; | 116 | QString externalUID() const; |
117 | void mergeContact( Addressee ad ); | 117 | void mergeContact( const Addressee& ad ); |
118 | /** | 118 | /** |
119 | Set unique identifier. | 119 | Set unique identifier. |
120 | */ | 120 | */ |
121 | void setUid( const QString &uid ); | 121 | void setUid( const QString &uid ); |
122 | /** | 122 | /** |
123 | Return unique identifier. | 123 | Return unique identifier. |
124 | */ | 124 | */ |
125 | QString uid() const; | 125 | QString uid() const; |
126 | /** | 126 | /** |
127 | Return translated label for uid field. | 127 | Return translated label for uid field. |
128 | */ | 128 | */ |
129 | static QString uidLabel(); | 129 | static QString uidLabel(); |
130 | 130 | ||
131 | /** | 131 | /** |
132 | Set name. | 132 | Set name. |
133 | */ | 133 | */ |
134 | void setName( const QString &name ); | 134 | void setName( const QString &name ); |
135 | /** | 135 | /** |
136 | Return name. | 136 | Return name. |
137 | */ | 137 | */ |
138 | QString name() const; | 138 | QString name() const; |
139 | /** | 139 | /** |
140 | Return translated label for name field. | 140 | Return translated label for name field. |
141 | */ | 141 | */ |
142 | static QString nameLabel(); | 142 | static QString nameLabel(); |
143 | 143 | ||
144 | /** | 144 | /** |
145 | Set formatted name. | 145 | Set formatted name. |
146 | */ | 146 | */ |
147 | void setFormattedName( const QString &formattedName ); | 147 | void setFormattedName( const QString &formattedName ); |
148 | /** | 148 | /** |
149 | Return formatted name. | 149 | Return formatted name. |
150 | */ | 150 | */ |
151 | QString formattedName() const; | 151 | QString formattedName() const; |
152 | /** | 152 | /** |
153 | Return translated label for formattedName field. | 153 | Return translated label for formattedName field. |
154 | */ | 154 | */ |
155 | static QString formattedNameLabel(); | 155 | static QString formattedNameLabel(); |
156 | 156 | ||
157 | /** | 157 | /** |
158 | Set family name. | 158 | Set family name. |
159 | */ | 159 | */ |
160 | void setFamilyName( const QString &familyName ); | 160 | void setFamilyName( const QString &familyName ); |
161 | /** | 161 | /** |
162 | Return family name. | 162 | Return family name. |
163 | */ | 163 | */ |
164 | QString familyName() const; | 164 | QString familyName() const; |
165 | /** | 165 | /** |
166 | Return translated label for familyName field. | 166 | Return translated label for familyName field. |
167 | */ | 167 | */ |
168 | static QString familyNameLabel(); | 168 | static QString familyNameLabel(); |
169 | 169 | ||
170 | /** | 170 | /** |
171 | Set given name. | 171 | Set given name. |
172 | */ | 172 | */ |
173 | void setGivenName( const QString &givenName ); | 173 | void setGivenName( const QString &givenName ); |
174 | /** | 174 | /** |
175 | Return given name. | 175 | Return given name. |
176 | */ | 176 | */ |
177 | QString givenName() const; | 177 | QString givenName() const; |
178 | /** | 178 | /** |
179 | Return translated label for givenName field. | 179 | Return translated label for givenName field. |
180 | */ | 180 | */ |
181 | static QString givenNameLabel(); | 181 | static QString givenNameLabel(); |
182 | 182 | ||
183 | /** | 183 | /** |
184 | Set additional names. | 184 | Set additional names. |
185 | */ | 185 | */ |
186 | void setAdditionalName( const QString &additionalName ); | 186 | void setAdditionalName( const QString &additionalName ); |
187 | /** | 187 | /** |
188 | Return additional names. | 188 | Return additional names. |
189 | */ | 189 | */ |
190 | QString additionalName() const; | 190 | QString additionalName() const; |
191 | /** | 191 | /** |
192 | Return translated label for additionalName field. | 192 | Return translated label for additionalName field. |
193 | */ | 193 | */ |
194 | static QString additionalNameLabel(); | 194 | static QString additionalNameLabel(); |
195 | 195 | ||
196 | /** | 196 | /** |
197 | Set honorific prefixes. | 197 | Set honorific prefixes. |
198 | */ | 198 | */ |
199 | void setPrefix( const QString &prefix ); | 199 | void setPrefix( const QString &prefix ); |
200 | /** | 200 | /** |
201 | Return honorific prefixes. | 201 | Return honorific prefixes. |
202 | */ | 202 | */ |
203 | QString prefix() const; | 203 | QString prefix() const; |
204 | /** | 204 | /** |
205 | Return translated label for prefix field. | 205 | Return translated label for prefix field. |
206 | */ | 206 | */ |
207 | static QString prefixLabel(); | 207 | static QString prefixLabel(); |
208 | 208 | ||
209 | /** | 209 | /** |
210 | Set honorific suffixes. | 210 | Set honorific suffixes. |
211 | */ | 211 | */ |
212 | void setSuffix( const QString &suffix ); | 212 | void setSuffix( const QString &suffix ); |
213 | /** | 213 | /** |
214 | Return honorific suffixes. | 214 | Return honorific suffixes. |
215 | */ | 215 | */ |
216 | QString suffix() const; | 216 | QString suffix() const; |
217 | /** | 217 | /** |
218 | Return translated label for suffix field. | 218 | Return translated label for suffix field. |
219 | */ | 219 | */ |
220 | static QString suffixLabel(); | 220 | static QString suffixLabel(); |
221 | 221 | ||
222 | /** | 222 | /** |
223 | Set nick name. | 223 | Set nick name. |
224 | */ | 224 | */ |
225 | void setNickName( const QString &nickName ); | 225 | void setNickName( const QString &nickName ); |
226 | /** | 226 | /** |
227 | Return nick name. | 227 | Return nick name. |
228 | */ | 228 | */ |
229 | QString nickName() const; | 229 | QString nickName() const; |
230 | /** | 230 | /** |
231 | Return translated label for nickName field. | 231 | Return translated label for nickName field. |
232 | */ | 232 | */ |
233 | static QString nickNameLabel(); | 233 | static QString nickNameLabel(); |
234 | 234 | ||
235 | /** | 235 | /** |
236 | Set birthday. | 236 | Set birthday. |
237 | */ | 237 | */ |
238 | void setBirthday( const QDateTime &birthday ); | 238 | void setBirthday( const QDateTime &birthday ); |
239 | /** | 239 | /** |
240 | Return birthday. | 240 | Return birthday. |
241 | */ | 241 | */ |
242 | QDateTime birthday() const; | 242 | QDateTime birthday() const; |
243 | /** | 243 | /** |
244 | Return translated label for birthday field. | 244 | Return translated label for birthday field. |
245 | */ | 245 | */ |
246 | static QString birthdayLabel(); | 246 | static QString birthdayLabel(); |
247 | 247 | ||
248 | /** | 248 | /** |
249 | Return translated label for homeAddressStreet field. | 249 | Return translated label for homeAddressStreet field. |
250 | */ | 250 | */ |
251 | static QString homeAddressStreetLabel(); | 251 | static QString homeAddressStreetLabel(); |
252 | 252 | ||
253 | /** | 253 | /** |
254 | Return translated label for homeAddressLocality field. | 254 | Return translated label for homeAddressLocality field. |
255 | */ | 255 | */ |
256 | static QString homeAddressLocalityLabel(); | 256 | static QString homeAddressLocalityLabel(); |
257 | 257 | ||
258 | /** | 258 | /** |
259 | Return translated label for homeAddressRegion field. | 259 | Return translated label for homeAddressRegion field. |
260 | */ | 260 | */ |
261 | static QString homeAddressRegionLabel(); | 261 | static QString homeAddressRegionLabel(); |
262 | 262 | ||
263 | /** | 263 | /** |
264 | Return translated label for homeAddressPostalCode field. | 264 | Return translated label for homeAddressPostalCode field. |
265 | */ | 265 | */ |
266 | static QString homeAddressPostalCodeLabel(); | 266 | static QString homeAddressPostalCodeLabel(); |
267 | 267 | ||
268 | /** | 268 | /** |
269 | Return translated label for homeAddressCountry field. | 269 | Return translated label for homeAddressCountry field. |
270 | */ | 270 | */ |
271 | static QString homeAddressCountryLabel(); | 271 | static QString homeAddressCountryLabel(); |
272 | 272 | ||
273 | /** | 273 | /** |
274 | Return translated label for homeAddressLabel field. | 274 | Return translated label for homeAddressLabel field. |
275 | */ | 275 | */ |
276 | static QString homeAddressLabelLabel(); | 276 | static QString homeAddressLabelLabel(); |
277 | 277 | ||
278 | /** | 278 | /** |
279 | Return translated label for businessAddressStreet field. | 279 | Return translated label for businessAddressStreet field. |
280 | */ | 280 | */ |
281 | static QString businessAddressStreetLabel(); | 281 | static QString businessAddressStreetLabel(); |
282 | 282 | ||
283 | /** | 283 | /** |
284 | Return translated label for businessAddressLocality field. | 284 | Return translated label for businessAddressLocality field. |
285 | */ | 285 | */ |
286 | static QString businessAddressLocalityLabel(); | 286 | static QString businessAddressLocalityLabel(); |
287 | 287 | ||
288 | /** | 288 | /** |
289 | Return translated label for businessAddressRegion field. | 289 | Return translated label for businessAddressRegion field. |
290 | */ | 290 | */ |
291 | static QString businessAddressRegionLabel(); | 291 | static QString businessAddressRegionLabel(); |
292 | 292 | ||
293 | /** | 293 | /** |
294 | Return translated label for businessAddressPostalCode field. | 294 | Return translated label for businessAddressPostalCode field. |
295 | */ | 295 | */ |
296 | static QString businessAddressPostalCodeLabel(); | 296 | static QString businessAddressPostalCodeLabel(); |
297 | 297 | ||
298 | /** | 298 | /** |
299 | Return translated label for businessAddressCountry field. | 299 | Return translated label for businessAddressCountry field. |
300 | */ | 300 | */ |
301 | static QString businessAddressCountryLabel(); | 301 | static QString businessAddressCountryLabel(); |
302 | 302 | ||
303 | /** | 303 | /** |
304 | Return translated label for businessAddressLabel field. | 304 | Return translated label for businessAddressLabel field. |
305 | */ | 305 | */ |
306 | static QString businessAddressLabelLabel(); | 306 | static QString businessAddressLabelLabel(); |
307 | 307 | ||
308 | /** | 308 | /** |
309 | Return translated label for homePhone field. | 309 | Return translated label for homePhone field. |
310 | */ | 310 | */ |
311 | static QString homePhoneLabel(); | 311 | static QString homePhoneLabel(); |
312 | 312 | ||
313 | /** | 313 | /** |
314 | Return translated label for businessPhone field. | 314 | Return translated label for businessPhone field. |
315 | */ | 315 | */ |
316 | static QString businessPhoneLabel(); | 316 | static QString businessPhoneLabel(); |
317 | 317 | ||
318 | /** | 318 | /** |
319 | Return translated label for mobilePhone field. | 319 | Return translated label for mobilePhone field. |
320 | */ | 320 | */ |
321 | static QString mobilePhoneLabel(); | 321 | static QString mobilePhoneLabel(); |
322 | 322 | ||
323 | /** | 323 | /** |
324 | Return translated label for homeFax field. | 324 | Return translated label for homeFax field. |
325 | */ | 325 | */ |
326 | static QString homeFaxLabel(); | 326 | static QString homeFaxLabel(); |
327 | 327 | ||
328 | /** | 328 | /** |
329 | Return translated label for businessFax field. | 329 | Return translated label for businessFax field. |
330 | */ | 330 | */ |
331 | static QString businessFaxLabel(); | 331 | static QString businessFaxLabel(); |
332 | 332 | ||
333 | /** | 333 | /** |
334 | Return translated label for carPhone field. | 334 | Return translated label for carPhone field. |
335 | */ | 335 | */ |
336 | static QString carPhoneLabel(); | 336 | static QString carPhoneLabel(); |
337 | 337 | ||
338 | /** | 338 | /** |
339 | Return translated label for isdn field. | 339 | Return translated label for isdn field. |
340 | */ | 340 | */ |
341 | static QString isdnLabel(); | 341 | static QString isdnLabel(); |
342 | 342 | ||
343 | /** | 343 | /** |
344 | Return translated label for pager field. | 344 | Return translated label for pager field. |
345 | */ | 345 | */ |
346 | static QString pagerLabel(); | 346 | static QString pagerLabel(); |
347 | 347 | ||
348 | /** | 348 | /** |
349 | Return translated label for sip field. | 349 | Return translated label for sip field. |
350 | */ | 350 | */ |
351 | static QString sipLabel(); | 351 | static QString sipLabel(); |
352 | 352 | ||
353 | /** | 353 | /** |
354 | Return translated label for email field. | 354 | Return translated label for email field. |
355 | */ | 355 | */ |
356 | static QString emailLabel(); | 356 | static QString emailLabel(); |
357 | 357 | ||
358 | /** | 358 | /** |
359 | Set mail client. | 359 | Set mail client. |
360 | */ | 360 | */ |
361 | void setMailer( const QString &mailer ); | 361 | void setMailer( const QString &mailer ); |
362 | /** | 362 | /** |
363 | Return mail client. | 363 | Return mail client. |
364 | */ | 364 | */ |
365 | QString mailer() const; | 365 | QString mailer() const; |
366 | /** | 366 | /** |
367 | Return translated label for mailer field. | 367 | Return translated label for mailer field. |
368 | */ | 368 | */ |
369 | static QString mailerLabel(); | 369 | static QString mailerLabel(); |
370 | 370 | ||
371 | /** | 371 | /** |
372 | Set time zone. | 372 | Set time zone. |
373 | */ | 373 | */ |
374 | void setTimeZone( const TimeZone &timeZone ); | 374 | void setTimeZone( const TimeZone &timeZone ); |
375 | /** | 375 | /** |
376 | Return time zone. | 376 | Return time zone. |
377 | */ | 377 | */ |
378 | TimeZone timeZone() const; | 378 | TimeZone timeZone() const; |
379 | /** | 379 | /** |
380 | Return translated label for timeZone field. | 380 | Return translated label for timeZone field. |
381 | */ | 381 | */ |
382 | static QString timeZoneLabel(); | 382 | static QString timeZoneLabel(); |
383 | 383 | ||
384 | /** | 384 | /** |
385 | Set geographic position. | 385 | Set geographic position. |
386 | */ | 386 | */ |
387 | void setGeo( const Geo &geo ); | 387 | void setGeo( const Geo &geo ); |
388 | /** | 388 | /** |
389 | Return geographic position. | 389 | Return geographic position. |
390 | */ | 390 | */ |
391 | Geo geo() const; | 391 | Geo geo() const; |
392 | /** | 392 | /** |
393 | Return translated label for geo field. | 393 | Return translated label for geo field. |
394 | */ | 394 | */ |
395 | static QString geoLabel(); | 395 | static QString geoLabel(); |
396 | 396 | ||
397 | /** | 397 | /** |
398 | Set title. | 398 | Set title. |
399 | */ | 399 | */ |
400 | void setTitle( const QString &title ); | 400 | void setTitle( const QString &title ); |
401 | /** | 401 | /** |
402 | Return title. | 402 | Return title. |
403 | */ | 403 | */ |
404 | QString title() const; | 404 | QString title() const; |
405 | /** | 405 | /** |
406 | Return translated label for title field. | 406 | Return translated label for title field. |
407 | */ | 407 | */ |
408 | static QString titleLabel(); | 408 | static QString titleLabel(); |
409 | 409 | ||
410 | /** | 410 | /** |
411 | Set role. | 411 | Set role. |
412 | */ | 412 | */ |
413 | void setRole( const QString &role ); | 413 | void setRole( const QString &role ); |
414 | /** | 414 | /** |
415 | Return role. | 415 | Return role. |
416 | */ | 416 | */ |
417 | QString role() const; | 417 | QString role() const; |
418 | /** | 418 | /** |
419 | Return translated label for role field. | 419 | Return translated label for role field. |
420 | */ | 420 | */ |
421 | static QString roleLabel(); | 421 | static QString roleLabel(); |
422 | 422 | ||
423 | /** | 423 | /** |
424 | Set organization. | 424 | Set organization. |
425 | */ | 425 | */ |
426 | void setOrganization( const QString &organization ); | 426 | void setOrganization( const QString &organization ); |
427 | /** | 427 | /** |
428 | Return organization. | 428 | Return organization. |
429 | */ | 429 | */ |
430 | QString organization() const; | 430 | QString organization() const; |
431 | /** | 431 | /** |
432 | Return translated label for organization field. | 432 | Return translated label for organization field. |
433 | */ | 433 | */ |
434 | static QString organizationLabel(); | 434 | static QString organizationLabel(); |
435 | 435 | ||
436 | /** | 436 | /** |
437 | Set note. | 437 | Set note. |
438 | */ | 438 | */ |
439 | void setNote( const QString ¬e ); | 439 | void setNote( const QString ¬e ); |
440 | /** | 440 | /** |
441 | Return note. | 441 | Return note. |
442 | */ | 442 | */ |
443 | QString note() const; | 443 | QString note() const; |
444 | /** | 444 | /** |
445 | Return translated label for note field. | 445 | Return translated label for note field. |
446 | */ | 446 | */ |
447 | static QString noteLabel(); | 447 | static QString noteLabel(); |
448 | 448 | ||
449 | /** | 449 | /** |
450 | Set product identifier. | 450 | Set product identifier. |
451 | */ | 451 | */ |
452 | void setProductId( const QString &productId ); | 452 | void setProductId( const QString &productId ); |
453 | /** | 453 | /** |
454 | Return product identifier. | 454 | Return product identifier. |
455 | */ | 455 | */ |
456 | QString productId() const; | 456 | QString productId() const; |
457 | /** | 457 | /** |
458 | Return translated label for productId field. | 458 | Return translated label for productId field. |
459 | */ | 459 | */ |
460 | static QString productIdLabel(); | 460 | static QString productIdLabel(); |
461 | 461 | ||
462 | /** | 462 | /** |
463 | Set revision date. | 463 | Set revision date. |
464 | */ | 464 | */ |
465 | void setRevision( const QDateTime &revision ); | 465 | void setRevision( const QDateTime &revision ); |
466 | /** | 466 | /** |
467 | Return revision date. | 467 | Return revision date. |
468 | */ | 468 | */ |
469 | QDateTime revision() const; | 469 | QDateTime revision() const; |
470 | /** | 470 | /** |
471 | Return translated label for revision field. | 471 | Return translated label for revision field. |
472 | */ | 472 | */ |
473 | static QString revisionLabel(); | 473 | static QString revisionLabel(); |
474 | 474 | ||
475 | /** | 475 | /** |
476 | Set sort string. | 476 | Set sort string. |
477 | */ | 477 | */ |
478 | void setSortString( const QString &sortString ); | 478 | void setSortString( const QString &sortString ); |
479 | /** | 479 | /** |
480 | Return sort string. | 480 | Return sort string. |
481 | */ | 481 | */ |
482 | QString sortString() const; | 482 | QString sortString() const; |
483 | /** | 483 | /** |
484 | Return translated label for sortString field. | 484 | Return translated label for sortString field. |
485 | */ | 485 | */ |
486 | static QString sortStringLabel(); | 486 | static QString sortStringLabel(); |
487 | 487 | ||
488 | /** | 488 | /** |
489 | Set URL. | 489 | Set URL. |
490 | */ | 490 | */ |
491 | void setUrl( const KURL &url ); | 491 | void setUrl( const KURL &url ); |
492 | /** | 492 | /** |
493 | Return URL. | 493 | Return URL. |
494 | */ | 494 | */ |
495 | KURL url() const; | 495 | KURL url() const; |
496 | /** | 496 | /** |
497 | Return translated label for url field. | 497 | Return translated label for url field. |
498 | */ | 498 | */ |
499 | static QString urlLabel(); | 499 | static QString urlLabel(); |
500 | 500 | ||
501 | /** | 501 | /** |