summaryrefslogtreecommitdiff
path: root/libopie/pim/ocontactfields.cpp
authoreilers <eilers>2003-09-29 07:44:26 (UTC)
committer eilers <eilers>2003-09-29 07:44:26 (UTC)
commit36d6b0096c41b01e69bb0d12e6c29648cbbf8290 (patch) (side-by-side diff)
treec87f4f92c4a1fbdf57e502a9c5e3e44fd9e98540 /libopie/pim/ocontactfields.cpp
parentb2e22408970ef548e23e9bbdcd87302f35fc6d4d (diff)
downloadopie-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.cpp10
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 )
return list;
}
/*!
\internal
Returns an untranslated list of field names for a contact.
*/
QStringList OContactFields::untrfields( bool sorted )
{
QStringList list;
QMap<int, QString> mapIdToStr = idToUntrFields();
+ list.append( mapIdToStr[ Qtopia::AddressUid ] );
+ list.append( mapIdToStr[ Qtopia::AddressCategory ] );
+
list.append( mapIdToStr[ Qtopia::Title ] );
list.append( mapIdToStr[ Qtopia::FirstName ] );
list.append( mapIdToStr[ Qtopia::MiddleName ] );
list.append( mapIdToStr[ Qtopia::LastName ] );
list.append( mapIdToStr[ Qtopia::Suffix ] );
list.append( mapIdToStr[ Qtopia::FileAs ] );
list.append( mapIdToStr[ Qtopia::JobTitle ] );
list.append( mapIdToStr[ Qtopia::Department ] );
list.append( mapIdToStr[ Qtopia::Company ] );
list += untrphonefields( sorted );
@@ -202,24 +205,27 @@ QStringList OContactFields::untrfields( bool sorted )
list.append( mapIdToStr[ Qtopia::Notes ] );
list.append( mapIdToStr[ Qtopia::Groups ] );
if (sorted) list.sort();
return list;
}
QMap<int, QString> OContactFields::idToTrFields()
{
QMap<int, QString> ret_map;
+ ret_map.insert( Qtopia::AddressUid, QObject::tr( "User Id" ) );
+ ret_map.insert( Qtopia::AddressCategory, QObject::tr( "Categories" ) );
+
ret_map.insert( Qtopia::Title, QObject::tr( "Name Title") );
ret_map.insert( Qtopia::FirstName, QObject::tr( "First Name" ) );
ret_map.insert( Qtopia::MiddleName, QObject::tr( "Middle Name" ) );
ret_map.insert( Qtopia::LastName, QObject::tr( "Last Name" ) );
ret_map.insert( Qtopia::Suffix, QObject::tr( "Suffix" ));
ret_map.insert( Qtopia::FileAs, QObject::tr( "File As" ) );
ret_map.insert( Qtopia::JobTitle, QObject::tr( "Job Title" ) );
ret_map.insert( Qtopia::Department, QObject::tr( "Department" ) );
ret_map.insert( Qtopia::Company, QObject::tr( "Company" ) );
ret_map.insert( Qtopia::BusinessPhone, QObject::tr( "Business Phone" ) );
ret_map.insert( Qtopia::BusinessFax, QObject::tr( "Business Fax" ) );
@@ -265,24 +271,27 @@ QMap<int, QString> OContactFields::idToTrFields()
// other
ret_map.insert( Qtopia::Notes, QObject::tr( "Notes" ) );
return ret_map;
}
QMap<int, QString> OContactFields::idToUntrFields()
{
QMap<int, QString> ret_map;
+ ret_map.insert( Qtopia::AddressUid, "User Id" );
+ ret_map.insert( Qtopia::AddressCategory, "Categories" );
+
ret_map.insert( Qtopia::Title, "Name Title" );
ret_map.insert( Qtopia::FirstName, "First Name" );
ret_map.insert( Qtopia::MiddleName, "Middle Name" );
ret_map.insert( Qtopia::LastName, "Last Name" );
ret_map.insert( Qtopia::Suffix, "Suffix" );
ret_map.insert( Qtopia::FileAs, "File As" );
ret_map.insert( Qtopia::JobTitle, "Job Title" );
ret_map.insert( Qtopia::Department, "Department" );
ret_map.insert( Qtopia::Company, "Company" );
ret_map.insert( Qtopia::BusinessPhone, "Business Phone" );
ret_map.insert( Qtopia::BusinessFax, "Business Fax" );
@@ -319,24 +328,25 @@ QMap<int, QString> OContactFields::idToUntrFields()
ret_map.insert( Qtopia::HomeWebPage, "Home Web Page" );
//personal
ret_map.insert( Qtopia::Spouse, "Spouse" );
ret_map.insert( Qtopia::Gender, "Gender" );
ret_map.insert( Qtopia::Birthday, "Birthday" );
ret_map.insert( Qtopia::Anniversary, "Anniversary" );
ret_map.insert( Qtopia::Nickname, "Nickname" );
ret_map.insert( Qtopia::Children, "Children" );
// other
ret_map.insert( Qtopia::Notes, "Notes" );
+ ret_map.insert( Qtopia::Groups, "Groups" );
return ret_map;
}
QMap<QString, int> OContactFields::trFieldsToId()
{
QMap<int, QString> idtostr = idToTrFields();
QMap<QString, int> ret_map;
QMap<int, QString>::Iterator it;