Diffstat (limited to 'libopie/pim/ocontactfields.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie/pim/ocontactfields.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libopie/pim/ocontactfields.cpp b/libopie/pim/ocontactfields.cpp index 831a596..7206f0d 100644 --- a/libopie/pim/ocontactfields.cpp +++ b/libopie/pim/ocontactfields.cpp | |||
@@ -152,86 +152,92 @@ QStringList OContactFields::trfields( bool sorted ) | |||
152 | list.append( mapIdToStr[Qtopia::HomeCity] ); | 152 | list.append( mapIdToStr[Qtopia::HomeCity] ); |
153 | list.append( mapIdToStr[Qtopia::HomeState] ); | 153 | list.append( mapIdToStr[Qtopia::HomeState] ); |
154 | list.append( mapIdToStr[Qtopia::HomeZip] ); | 154 | list.append( mapIdToStr[Qtopia::HomeZip] ); |
155 | list.append( mapIdToStr[Qtopia::HomeCountry] ); | 155 | list.append( mapIdToStr[Qtopia::HomeCountry] ); |
156 | 156 | ||
157 | list += trdetailsfields( sorted ); | 157 | list += trdetailsfields( sorted ); |
158 | 158 | ||
159 | list.append( mapIdToStr[Qtopia::Notes] ); | 159 | list.append( mapIdToStr[Qtopia::Notes] ); |
160 | list.append( mapIdToStr[Qtopia::Groups] ); | 160 | list.append( mapIdToStr[Qtopia::Groups] ); |
161 | 161 | ||
162 | if (sorted) list.sort(); | 162 | if (sorted) list.sort(); |
163 | 163 | ||
164 | return list; | 164 | return list; |
165 | } | 165 | } |
166 | 166 | ||
167 | /*! | 167 | /*! |
168 | \internal | 168 | \internal |
169 | Returns an untranslated list of field names for a contact. | 169 | Returns an untranslated list of field names for a contact. |
170 | */ | 170 | */ |
171 | QStringList OContactFields::untrfields( bool sorted ) | 171 | QStringList OContactFields::untrfields( bool sorted ) |
172 | { | 172 | { |
173 | QStringList list; | 173 | QStringList list; |
174 | QMap<int, QString> mapIdToStr = idToUntrFields(); | 174 | QMap<int, QString> mapIdToStr = idToUntrFields(); |
175 | 175 | ||
176 | list.append( mapIdToStr[ Qtopia::AddressUid ] ); | ||
177 | list.append( mapIdToStr[ Qtopia::AddressCategory ] ); | ||
178 | |||
176 | list.append( mapIdToStr[ Qtopia::Title ] ); | 179 | list.append( mapIdToStr[ Qtopia::Title ] ); |
177 | list.append( mapIdToStr[ Qtopia::FirstName ] ); | 180 | list.append( mapIdToStr[ Qtopia::FirstName ] ); |
178 | list.append( mapIdToStr[ Qtopia::MiddleName ] ); | 181 | list.append( mapIdToStr[ Qtopia::MiddleName ] ); |
179 | list.append( mapIdToStr[ Qtopia::LastName ] ); | 182 | list.append( mapIdToStr[ Qtopia::LastName ] ); |
180 | list.append( mapIdToStr[ Qtopia::Suffix ] ); | 183 | list.append( mapIdToStr[ Qtopia::Suffix ] ); |
181 | list.append( mapIdToStr[ Qtopia::FileAs ] ); | 184 | list.append( mapIdToStr[ Qtopia::FileAs ] ); |
182 | 185 | ||
183 | list.append( mapIdToStr[ Qtopia::JobTitle ] ); | 186 | list.append( mapIdToStr[ Qtopia::JobTitle ] ); |
184 | list.append( mapIdToStr[ Qtopia::Department ] ); | 187 | list.append( mapIdToStr[ Qtopia::Department ] ); |
185 | list.append( mapIdToStr[ Qtopia::Company ] ); | 188 | list.append( mapIdToStr[ Qtopia::Company ] ); |
186 | 189 | ||
187 | list += untrphonefields( sorted ); | 190 | list += untrphonefields( sorted ); |
188 | 191 | ||
189 | list.append( mapIdToStr[ Qtopia::BusinessStreet ] ); | 192 | list.append( mapIdToStr[ Qtopia::BusinessStreet ] ); |
190 | list.append( mapIdToStr[ Qtopia::BusinessCity ] ); | 193 | list.append( mapIdToStr[ Qtopia::BusinessCity ] ); |
191 | list.append( mapIdToStr[ Qtopia::BusinessState ] ); | 194 | list.append( mapIdToStr[ Qtopia::BusinessState ] ); |
192 | list.append( mapIdToStr[ Qtopia::BusinessZip ] ); | 195 | list.append( mapIdToStr[ Qtopia::BusinessZip ] ); |
193 | list.append( mapIdToStr[ Qtopia::BusinessCountry ] ); | 196 | list.append( mapIdToStr[ Qtopia::BusinessCountry ] ); |
194 | 197 | ||
195 | list.append( mapIdToStr[ Qtopia::HomeStreet ] ); | 198 | list.append( mapIdToStr[ Qtopia::HomeStreet ] ); |
196 | list.append( mapIdToStr[ Qtopia::HomeCity ] ); | 199 | list.append( mapIdToStr[ Qtopia::HomeCity ] ); |
197 | list.append( mapIdToStr[ Qtopia::HomeState ] ); | 200 | list.append( mapIdToStr[ Qtopia::HomeState ] ); |
198 | list.append( mapIdToStr[ Qtopia::HomeZip ] ); | 201 | list.append( mapIdToStr[ Qtopia::HomeZip ] ); |
199 | list.append( mapIdToStr[ Qtopia::HomeCountry ] ); | 202 | list.append( mapIdToStr[ Qtopia::HomeCountry ] ); |
200 | 203 | ||
201 | list += untrdetailsfields( sorted ); | 204 | list += untrdetailsfields( sorted ); |
202 | 205 | ||
203 | list.append( mapIdToStr[ Qtopia::Notes ] ); | 206 | list.append( mapIdToStr[ Qtopia::Notes ] ); |
204 | list.append( mapIdToStr[ Qtopia::Groups ] ); | 207 | list.append( mapIdToStr[ Qtopia::Groups ] ); |
205 | 208 | ||
206 | if (sorted) list.sort(); | 209 | if (sorted) list.sort(); |
207 | 210 | ||
208 | return list; | 211 | return list; |
209 | } | 212 | } |
210 | QMap<int, QString> OContactFields::idToTrFields() | 213 | QMap<int, QString> OContactFields::idToTrFields() |
211 | { | 214 | { |
212 | QMap<int, QString> ret_map; | 215 | QMap<int, QString> ret_map; |
213 | 216 | ||
217 | ret_map.insert( Qtopia::AddressUid, QObject::tr( "User Id" ) ); | ||
218 | ret_map.insert( Qtopia::AddressCategory, QObject::tr( "Categories" ) ); | ||
219 | |||
214 | ret_map.insert( Qtopia::Title, QObject::tr( "Name Title") ); | 220 | ret_map.insert( Qtopia::Title, QObject::tr( "Name Title") ); |
215 | ret_map.insert( Qtopia::FirstName, QObject::tr( "First Name" ) ); | 221 | ret_map.insert( Qtopia::FirstName, QObject::tr( "First Name" ) ); |
216 | ret_map.insert( Qtopia::MiddleName, QObject::tr( "Middle Name" ) ); | 222 | ret_map.insert( Qtopia::MiddleName, QObject::tr( "Middle Name" ) ); |
217 | ret_map.insert( Qtopia::LastName, QObject::tr( "Last Name" ) ); | 223 | ret_map.insert( Qtopia::LastName, QObject::tr( "Last Name" ) ); |
218 | ret_map.insert( Qtopia::Suffix, QObject::tr( "Suffix" )); | 224 | ret_map.insert( Qtopia::Suffix, QObject::tr( "Suffix" )); |
219 | ret_map.insert( Qtopia::FileAs, QObject::tr( "File As" ) ); | 225 | ret_map.insert( Qtopia::FileAs, QObject::tr( "File As" ) ); |
220 | 226 | ||
221 | ret_map.insert( Qtopia::JobTitle, QObject::tr( "Job Title" ) ); | 227 | ret_map.insert( Qtopia::JobTitle, QObject::tr( "Job Title" ) ); |
222 | ret_map.insert( Qtopia::Department, QObject::tr( "Department" ) ); | 228 | ret_map.insert( Qtopia::Department, QObject::tr( "Department" ) ); |
223 | ret_map.insert( Qtopia::Company, QObject::tr( "Company" ) ); | 229 | ret_map.insert( Qtopia::Company, QObject::tr( "Company" ) ); |
224 | ret_map.insert( Qtopia::BusinessPhone, QObject::tr( "Business Phone" ) ); | 230 | ret_map.insert( Qtopia::BusinessPhone, QObject::tr( "Business Phone" ) ); |
225 | ret_map.insert( Qtopia::BusinessFax, QObject::tr( "Business Fax" ) ); | 231 | ret_map.insert( Qtopia::BusinessFax, QObject::tr( "Business Fax" ) ); |
226 | ret_map.insert( Qtopia::BusinessMobile, QObject::tr( "Business Mobile" )); | 232 | ret_map.insert( Qtopia::BusinessMobile, QObject::tr( "Business Mobile" )); |
227 | 233 | ||
228 | 234 | ||
229 | ret_map.insert( Qtopia::DefaultEmail, QObject::tr( "Default Email" ) ); | 235 | ret_map.insert( Qtopia::DefaultEmail, QObject::tr( "Default Email" ) ); |
230 | ret_map.insert( Qtopia::Emails, QObject::tr( "Emails" ) ); | 236 | ret_map.insert( Qtopia::Emails, QObject::tr( "Emails" ) ); |
231 | 237 | ||
232 | ret_map.insert( Qtopia::HomePhone, QObject::tr( "Home Phone" ) ); | 238 | ret_map.insert( Qtopia::HomePhone, QObject::tr( "Home Phone" ) ); |
233 | ret_map.insert( Qtopia::HomeFax, QObject::tr( "Home Fax" ) ); | 239 | ret_map.insert( Qtopia::HomeFax, QObject::tr( "Home Fax" ) ); |
234 | ret_map.insert( Qtopia::HomeMobile, QObject::tr( "Home Mobile" ) ); | 240 | ret_map.insert( Qtopia::HomeMobile, QObject::tr( "Home Mobile" ) ); |
235 | 241 | ||
236 | // business | 242 | // business |
237 | ret_map.insert( Qtopia::BusinessStreet, QObject::tr( "Business Street" ) ); | 243 | ret_map.insert( Qtopia::BusinessStreet, QObject::tr( "Business Street" ) ); |
@@ -253,48 +259,51 @@ QMap<int, QString> OContactFields::idToTrFields() | |||
253 | ret_map.insert( Qtopia::HomeState, QObject::tr( "Home State" ) ); | 259 | ret_map.insert( Qtopia::HomeState, QObject::tr( "Home State" ) ); |
254 | ret_map.insert( Qtopia::HomeZip, QObject::tr( "Home Zip" ) ); | 260 | ret_map.insert( Qtopia::HomeZip, QObject::tr( "Home Zip" ) ); |
255 | ret_map.insert( Qtopia::HomeCountry, QObject::tr( "Home Country" ) ); | 261 | ret_map.insert( Qtopia::HomeCountry, QObject::tr( "Home Country" ) ); |
256 | ret_map.insert( Qtopia::HomeWebPage, QObject::tr( "Home Web Page" ) ); | 262 | ret_map.insert( Qtopia::HomeWebPage, QObject::tr( "Home Web Page" ) ); |
257 | 263 | ||
258 | //personal | 264 | //personal |
259 | ret_map.insert( Qtopia::Spouse, QObject::tr( "Spouse" ) ); | 265 | ret_map.insert( Qtopia::Spouse, QObject::tr( "Spouse" ) ); |
260 | ret_map.insert( Qtopia::Gender, QObject::tr( "Gender" ) ); | 266 | ret_map.insert( Qtopia::Gender, QObject::tr( "Gender" ) ); |
261 | ret_map.insert( Qtopia::Birthday, QObject::tr( "Birthday" ) ); | 267 | ret_map.insert( Qtopia::Birthday, QObject::tr( "Birthday" ) ); |
262 | ret_map.insert( Qtopia::Anniversary, QObject::tr( "Anniversary" ) ); | 268 | ret_map.insert( Qtopia::Anniversary, QObject::tr( "Anniversary" ) ); |
263 | ret_map.insert( Qtopia::Nickname, QObject::tr( "Nickname" ) ); | 269 | ret_map.insert( Qtopia::Nickname, QObject::tr( "Nickname" ) ); |
264 | ret_map.insert( Qtopia::Children, QObject::tr( "Children" ) ); | 270 | ret_map.insert( Qtopia::Children, QObject::tr( "Children" ) ); |
265 | 271 | ||
266 | // other | 272 | // other |
267 | ret_map.insert( Qtopia::Notes, QObject::tr( "Notes" ) ); | 273 | ret_map.insert( Qtopia::Notes, QObject::tr( "Notes" ) ); |
268 | 274 | ||
269 | 275 | ||
270 | return ret_map; | 276 | return ret_map; |
271 | } | 277 | } |
272 | 278 | ||
273 | QMap<int, QString> OContactFields::idToUntrFields() | 279 | QMap<int, QString> OContactFields::idToUntrFields() |
274 | { | 280 | { |
275 | QMap<int, QString> ret_map; | 281 | QMap<int, QString> ret_map; |
276 | 282 | ||
283 | ret_map.insert( Qtopia::AddressUid, "User Id" ); | ||
284 | ret_map.insert( Qtopia::AddressCategory, "Categories" ); | ||
285 | |||
277 | ret_map.insert( Qtopia::Title, "Name Title" ); | 286 | ret_map.insert( Qtopia::Title, "Name Title" ); |
278 | ret_map.insert( Qtopia::FirstName, "First Name" ); | 287 | ret_map.insert( Qtopia::FirstName, "First Name" ); |
279 | ret_map.insert( Qtopia::MiddleName, "Middle Name" ); | 288 | ret_map.insert( Qtopia::MiddleName, "Middle Name" ); |
280 | ret_map.insert( Qtopia::LastName, "Last Name" ); | 289 | ret_map.insert( Qtopia::LastName, "Last Name" ); |
281 | ret_map.insert( Qtopia::Suffix, "Suffix" ); | 290 | ret_map.insert( Qtopia::Suffix, "Suffix" ); |
282 | ret_map.insert( Qtopia::FileAs, "File As" ); | 291 | ret_map.insert( Qtopia::FileAs, "File As" ); |
283 | 292 | ||
284 | ret_map.insert( Qtopia::JobTitle, "Job Title" ); | 293 | ret_map.insert( Qtopia::JobTitle, "Job Title" ); |
285 | ret_map.insert( Qtopia::Department, "Department" ); | 294 | ret_map.insert( Qtopia::Department, "Department" ); |
286 | ret_map.insert( Qtopia::Company, "Company" ); | 295 | ret_map.insert( Qtopia::Company, "Company" ); |
287 | ret_map.insert( Qtopia::BusinessPhone, "Business Phone" ); | 296 | ret_map.insert( Qtopia::BusinessPhone, "Business Phone" ); |
288 | ret_map.insert( Qtopia::BusinessFax, "Business Fax" ); | 297 | ret_map.insert( Qtopia::BusinessFax, "Business Fax" ); |
289 | ret_map.insert( Qtopia::BusinessMobile, "Business Mobile" ); | 298 | ret_map.insert( Qtopia::BusinessMobile, "Business Mobile" ); |
290 | 299 | ||
291 | 300 | ||
292 | ret_map.insert( Qtopia::DefaultEmail, "Default Email" ); | 301 | ret_map.insert( Qtopia::DefaultEmail, "Default Email" ); |
293 | ret_map.insert( Qtopia::Emails, "Emails" ); | 302 | ret_map.insert( Qtopia::Emails, "Emails" ); |
294 | 303 | ||
295 | ret_map.insert( Qtopia::HomePhone, "Home Phone" ); | 304 | ret_map.insert( Qtopia::HomePhone, "Home Phone" ); |
296 | ret_map.insert( Qtopia::HomeFax, "Home Fax" ); | 305 | ret_map.insert( Qtopia::HomeFax, "Home Fax" ); |
297 | ret_map.insert( Qtopia::HomeMobile, "Home Mobile" ); | 306 | ret_map.insert( Qtopia::HomeMobile, "Home Mobile" ); |
298 | 307 | ||
299 | // business | 308 | // business |
300 | ret_map.insert( Qtopia::BusinessStreet, "Business Street" ); | 309 | ret_map.insert( Qtopia::BusinessStreet, "Business Street" ); |
@@ -307,48 +316,49 @@ QMap<int, QString> OContactFields::idToUntrFields() | |||
307 | 316 | ||
308 | ret_map.insert( Qtopia::Office, "Office" ); | 317 | ret_map.insert( Qtopia::Office, "Office" ); |
309 | ret_map.insert( Qtopia::Profession, "Profession" ); | 318 | ret_map.insert( Qtopia::Profession, "Profession" ); |
310 | ret_map.insert( Qtopia::Assistant, "Assistant" ); | 319 | ret_map.insert( Qtopia::Assistant, "Assistant" ); |
311 | ret_map.insert( Qtopia::Manager, "Manager" ); | 320 | ret_map.insert( Qtopia::Manager, "Manager" ); |
312 | 321 | ||
313 | // home | 322 | // home |
314 | ret_map.insert( Qtopia::HomeStreet, "Home Street" ); | 323 | ret_map.insert( Qtopia::HomeStreet, "Home Street" ); |
315 | ret_map.insert( Qtopia::HomeCity, "Home City" ); | 324 | ret_map.insert( Qtopia::HomeCity, "Home City" ); |
316 | ret_map.insert( Qtopia::HomeState, "Home State" ); | 325 | ret_map.insert( Qtopia::HomeState, "Home State" ); |
317 | ret_map.insert( Qtopia::HomeZip, "Home Zip" ); | 326 | ret_map.insert( Qtopia::HomeZip, "Home Zip" ); |
318 | ret_map.insert( Qtopia::HomeCountry, "Home Country" ); | 327 | ret_map.insert( Qtopia::HomeCountry, "Home Country" ); |
319 | ret_map.insert( Qtopia::HomeWebPage, "Home Web Page" ); | 328 | ret_map.insert( Qtopia::HomeWebPage, "Home Web Page" ); |
320 | 329 | ||
321 | //personal | 330 | //personal |
322 | ret_map.insert( Qtopia::Spouse, "Spouse" ); | 331 | ret_map.insert( Qtopia::Spouse, "Spouse" ); |
323 | ret_map.insert( Qtopia::Gender, "Gender" ); | 332 | ret_map.insert( Qtopia::Gender, "Gender" ); |
324 | ret_map.insert( Qtopia::Birthday, "Birthday" ); | 333 | ret_map.insert( Qtopia::Birthday, "Birthday" ); |
325 | ret_map.insert( Qtopia::Anniversary, "Anniversary" ); | 334 | ret_map.insert( Qtopia::Anniversary, "Anniversary" ); |
326 | ret_map.insert( Qtopia::Nickname, "Nickname" ); | 335 | ret_map.insert( Qtopia::Nickname, "Nickname" ); |
327 | ret_map.insert( Qtopia::Children, "Children" ); | 336 | ret_map.insert( Qtopia::Children, "Children" ); |
328 | 337 | ||
329 | // other | 338 | // other |
330 | ret_map.insert( Qtopia::Notes, "Notes" ); | 339 | ret_map.insert( Qtopia::Notes, "Notes" ); |
340 | ret_map.insert( Qtopia::Groups, "Groups" ); | ||
331 | 341 | ||
332 | 342 | ||
333 | return ret_map; | 343 | return ret_map; |
334 | } | 344 | } |
335 | 345 | ||
336 | QMap<QString, int> OContactFields::trFieldsToId() | 346 | QMap<QString, int> OContactFields::trFieldsToId() |
337 | { | 347 | { |
338 | QMap<int, QString> idtostr = idToTrFields(); | 348 | QMap<int, QString> idtostr = idToTrFields(); |
339 | QMap<QString, int> ret_map; | 349 | QMap<QString, int> ret_map; |
340 | 350 | ||
341 | 351 | ||
342 | QMap<int, QString>::Iterator it; | 352 | QMap<int, QString>::Iterator it; |
343 | for( it = idtostr.begin(); it != idtostr.end(); ++it ) | 353 | for( it = idtostr.begin(); it != idtostr.end(); ++it ) |
344 | ret_map.insert( *it, it.key() ); | 354 | ret_map.insert( *it, it.key() ); |
345 | 355 | ||
346 | 356 | ||
347 | return ret_map; | 357 | return ret_map; |
348 | } | 358 | } |
349 | 359 | ||
350 | QMap<QString, int> OContactFields::untrFieldsToId() | 360 | QMap<QString, int> OContactFields::untrFieldsToId() |
351 | { | 361 | { |
352 | QMap<int, QString> idtostr = idToUntrFields(); | 362 | QMap<int, QString> idtostr = idToUntrFields(); |
353 | QMap<QString, int> ret_map; | 363 | QMap<QString, int> ret_map; |
354 | 364 | ||