author | eilers <eilers> | 2003-09-29 07:44:26 (UTC) |
---|---|---|
committer | eilers <eilers> | 2003-09-29 07:44:26 (UTC) |
commit | 36d6b0096c41b01e69bb0d12e6c29648cbbf8290 (patch) (unidiff) | |
tree | c87f4f92c4a1fbdf57e502a9c5e3e44fd9e98540 /libopie/pim/ocontactfields.cpp | |
parent | b2e22408970ef548e23e9bbdcd87302f35fc6d4d (diff) | |
download | opie-36d6b0096c41b01e69bb0d12e6c29648cbbf8290.zip opie-36d6b0096c41b01e69bb0d12e6c29648cbbf8290.tar.gz opie-36d6b0096c41b01e69bb0d12e6c29648cbbf8290.tar.bz2 |
Improvement of PIM-SQL Databases, but search queries are still limited.
Addressbook: Changed table layout. Now, we just need 1/3 of disk-space.
Todo: Started to add new attributes. Some type conversions missing.
Diffstat (limited to 'libopie/pim/ocontactfields.cpp') (more/less context) (show 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 | |||
@@ -164,24 +164,27 @@ QStringList OContactFields::trfields( bool sorted ) | |||
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 ); |
@@ -202,24 +205,27 @@ QStringList OContactFields::untrfields( bool 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" ) ); |
@@ -265,24 +271,27 @@ QMap<int, QString> OContactFields::idToTrFields() | |||
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" ); |
@@ -319,24 +328,25 @@ QMap<int, QString> OContactFields::idToUntrFields() | |||
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; |