author | eilers <eilers> | 2002-10-13 11:20:14 (UTC) |
---|---|---|
committer | eilers <eilers> | 2002-10-13 11:20:14 (UTC) |
commit | 1cbed80910293516879d9b9308ae36072033f70e (patch) (unidiff) | |
tree | 8120412641f9937eab9f2bb2fd60fb705ef10708 | |
parent | 901531f0afcd36e5260cc4b452dde359d82bce85 (diff) | |
download | opie-1cbed80910293516879d9b9308ae36072033f70e.zip opie-1cbed80910293516879d9b9308ae36072033f70e.tar.gz opie-1cbed80910293516879d9b9308ae36072033f70e.tar.bz2 |
Now returning untranslated field names, too
-rw-r--r-- | libopie/pim/ocontact.cpp | 62 | ||||
-rw-r--r-- | libopie/pim/ocontact.h | 1 | ||||
-rw-r--r-- | libopie2/opiepim/ocontact.cpp | 62 | ||||
-rw-r--r-- | libopie2/opiepim/ocontact.h | 1 |
4 files changed, 126 insertions, 0 deletions
diff --git a/libopie/pim/ocontact.cpp b/libopie/pim/ocontact.cpp index a63753e..6f648ac 100644 --- a/libopie/pim/ocontact.cpp +++ b/libopie/pim/ocontact.cpp | |||
@@ -931,48 +931,110 @@ QStringList OContact::trfields() | |||
931 | list.append( QObject::tr( "Assistant" ) ); | 931 | list.append( QObject::tr( "Assistant" ) ); |
932 | list.append( QObject::tr( "Manager" ) ); | 932 | list.append( QObject::tr( "Manager" ) ); |
933 | 933 | ||
934 | list.append( QObject::tr( "Home Street" ) ); | 934 | list.append( QObject::tr( "Home Street" ) ); |
935 | list.append( QObject::tr( "Home City" ) ); | 935 | list.append( QObject::tr( "Home City" ) ); |
936 | list.append( QObject::tr( "Home State" ) ); | 936 | list.append( QObject::tr( "Home State" ) ); |
937 | list.append( QObject::tr( "Home Zip" ) ); | 937 | list.append( QObject::tr( "Home Zip" ) ); |
938 | list.append( QObject::tr( "Home Country" ) ); | 938 | list.append( QObject::tr( "Home Country" ) ); |
939 | list.append( QObject::tr( "Home Web Page" ) ); | 939 | list.append( QObject::tr( "Home Web Page" ) ); |
940 | 940 | ||
941 | list.append( QObject::tr( "Spouse" ) ); | 941 | list.append( QObject::tr( "Spouse" ) ); |
942 | list.append( QObject::tr( "Gender" ) ); | 942 | list.append( QObject::tr( "Gender" ) ); |
943 | list.append( QObject::tr( "Birthday" ) ); | 943 | list.append( QObject::tr( "Birthday" ) ); |
944 | list.append( QObject::tr( "Anniversary" ) ); | 944 | list.append( QObject::tr( "Anniversary" ) ); |
945 | list.append( QObject::tr( "Nickname" ) ); | 945 | list.append( QObject::tr( "Nickname" ) ); |
946 | list.append( QObject::tr( "Children" ) ); | 946 | list.append( QObject::tr( "Children" ) ); |
947 | 947 | ||
948 | list.append( QObject::tr( "Notes" ) ); | 948 | list.append( QObject::tr( "Notes" ) ); |
949 | list.append( QObject::tr( "Groups" ) ); | 949 | list.append( QObject::tr( "Groups" ) ); |
950 | 950 | ||
951 | return list; | 951 | return list; |
952 | } | 952 | } |
953 | 953 | ||
954 | /*! | 954 | /*! |
955 | \internal | ||
956 | Returns an untranslated list of field names for a contact. | ||
957 | */ | ||
958 | QStringList OContact::untrfields() | ||
959 | { | ||
960 | QStringList list; | ||
961 | |||
962 | list.append( "Name Title" ); | ||
963 | list.append( "First Name" ); | ||
964 | list.append( "Middle Name" ); | ||
965 | list.append( "Last Name" ); | ||
966 | list.append( "Suffix" ); | ||
967 | list.append( "File As" ); | ||
968 | |||
969 | list.append( "Job Title" ); | ||
970 | list.append( "Department" ); | ||
971 | list.append( "Company" ); | ||
972 | list.append( "Business Phone" ); | ||
973 | list.append( "Business Fax" ); | ||
974 | list.append( "Business Mobile" ); | ||
975 | |||
976 | list.append( "Default Email" ); | ||
977 | list.append( "Emails" ); | ||
978 | |||
979 | list.append( "Home Phone" ); | ||
980 | list.append( "Home Fax" ); | ||
981 | list.append( "Home Mobile" ); | ||
982 | |||
983 | list.append( "Business Street" ); | ||
984 | list.append( "Business City" ); | ||
985 | list.append( "Business State" ); | ||
986 | list.append( "Business Zip" ); | ||
987 | list.append( "Business Country" ); | ||
988 | list.append( "Business Pager" ); | ||
989 | list.append( "Business WebPage" ); | ||
990 | |||
991 | list.append( "Office" ); | ||
992 | list.append( "Profession" ); | ||
993 | list.append( "Assistant" ); | ||
994 | list.append( "Manager" ); | ||
995 | |||
996 | list.append( "Home Street" ); | ||
997 | list.append( "Home City" ); | ||
998 | list.append( "Home State" ); | ||
999 | list.append( "Home Zip" ); | ||
1000 | list.append( "Home Country" ); | ||
1001 | list.append( "Home Web Page" ); | ||
1002 | |||
1003 | list.append( "Spouse" ); | ||
1004 | list.append( "Gender" ); | ||
1005 | list.append( "Birthday" ); | ||
1006 | list.append( "Anniversary" ); | ||
1007 | list.append( "Nickname" ); | ||
1008 | list.append( "Children" ); | ||
1009 | |||
1010 | list.append( "Notes" ); | ||
1011 | list.append( "Groups" ); | ||
1012 | |||
1013 | return list; | ||
1014 | } | ||
1015 | |||
1016 | /*! | ||
955 | Sets the list of email address for contact to those contained in \a str. | 1017 | Sets the list of email address for contact to those contained in \a str. |
956 | Email address should be separated by ';'s. | 1018 | Email address should be separated by ';'s. |
957 | */ | 1019 | */ |
958 | void OContact::setEmails( const QString &str ) | 1020 | void OContact::setEmails( const QString &str ) |
959 | { | 1021 | { |
960 | replace( Qtopia::Emails, str ); | 1022 | replace( Qtopia::Emails, str ); |
961 | if ( str.isEmpty() ) | 1023 | if ( str.isEmpty() ) |
962 | setDefaultEmail( QString::null ); | 1024 | setDefaultEmail( QString::null ); |
963 | } | 1025 | } |
964 | 1026 | ||
965 | /*! | 1027 | /*! |
966 | Sets the list of children for the contact to those contained in \a str. | 1028 | Sets the list of children for the contact to those contained in \a str. |
967 | */ | 1029 | */ |
968 | void OContact::setChildren( const QString &str ) | 1030 | void OContact::setChildren( const QString &str ) |
969 | { | 1031 | { |
970 | replace( Qtopia::Children, str ); | 1032 | replace( Qtopia::Children, str ); |
971 | } | 1033 | } |
972 | 1034 | ||
973 | // vcard conversion code | 1035 | // vcard conversion code |
974 | /*! | 1036 | /*! |
975 | \internal | 1037 | \internal |
976 | */ | 1038 | */ |
977 | static inline VObject *safeAddPropValue( VObject *o, const char *prop, const QString &value ) | 1039 | static inline VObject *safeAddPropValue( VObject *o, const char *prop, const QString &value ) |
978 | { | 1040 | { |
diff --git a/libopie/pim/ocontact.h b/libopie/pim/ocontact.h index 756c87d..f916cf2 100644 --- a/libopie/pim/ocontact.h +++ b/libopie/pim/ocontact.h | |||
@@ -169,48 +169,49 @@ public: | |||
169 | * Country | 169 | * Country |
170 | */ | 170 | */ |
171 | QString displayBusinessAddress() const; | 171 | QString displayBusinessAddress() const; |
172 | 172 | ||
173 | //personal | 173 | //personal |
174 | QString spouse() const { return find( Qtopia::Spouse ); } | 174 | QString spouse() const { return find( Qtopia::Spouse ); } |
175 | QString gender() const { return find( Qtopia::Gender ); } | 175 | QString gender() const { return find( Qtopia::Gender ); } |
176 | QString birthday() const { return find( Qtopia::Birthday ); } | 176 | QString birthday() const { return find( Qtopia::Birthday ); } |
177 | QString anniversary() const { return find( Qtopia::Anniversary ); } | 177 | QString anniversary() const { return find( Qtopia::Anniversary ); } |
178 | QString nickname() const { return find( Qtopia::Nickname ); } | 178 | QString nickname() const { return find( Qtopia::Nickname ); } |
179 | QString children() const { return find( Qtopia::Children ); } | 179 | QString children() const { return find( Qtopia::Children ); } |
180 | QStringList childrenList() const; | 180 | QStringList childrenList() const; |
181 | 181 | ||
182 | // other | 182 | // other |
183 | QString notes() const { return find( Qtopia::Notes ); } | 183 | QString notes() const { return find( Qtopia::Notes ); } |
184 | QString groups() const { return find( Qtopia::Groups ); } | 184 | QString groups() const { return find( Qtopia::Groups ); } |
185 | QStringList groupList() const; | 185 | QStringList groupList() const; |
186 | 186 | ||
187 | // // custom | 187 | // // custom |
188 | // const QString &customField( const QString &key ) | 188 | // const QString &customField( const QString &key ) |
189 | // { return find( Custom- + key ); } | 189 | // { return find( Custom- + key ); } |
190 | 190 | ||
191 | static QStringList fields(); | 191 | static QStringList fields(); |
192 | static QStringList trfields(); | 192 | static QStringList trfields(); |
193 | static QStringList untrfields(); | ||
193 | 194 | ||
194 | QString toRichText() const; | 195 | QString toRichText() const; |
195 | QMap<int, QString> toMap() const; | 196 | QMap<int, QString> toMap() const; |
196 | QString field( int key ) const { return find( key ); } | 197 | QString field( int key ) const { return find( key ); } |
197 | 198 | ||
198 | 199 | ||
199 | // journaling... | 200 | // journaling... |
200 | void saveJournal( journal_action action, const QString &key = QString::null ); | 201 | void saveJournal( journal_action action, const QString &key = QString::null ); |
201 | void save( QString &buf ) const; | 202 | void save( QString &buf ) const; |
202 | 203 | ||
203 | void setUid( int i ) | 204 | void setUid( int i ) |
204 | { Record::setUid(i); replace( Qtopia::AddressUid , QString::number(i)); } | 205 | { Record::setUid(i); replace( Qtopia::AddressUid , QString::number(i)); } |
205 | 206 | ||
206 | QString toShortText()const; | 207 | QString toShortText()const; |
207 | QString OContact::type()const; | 208 | QString OContact::type()const; |
208 | QMap<QString,QString> OContact::toExtraMap() const; | 209 | QMap<QString,QString> OContact::toExtraMap() const; |
209 | class QString OContact::recordField(int) const; | 210 | class QString OContact::recordField(int) const; |
210 | 211 | ||
211 | // Why private ? (eilers,se) | 212 | // Why private ? (eilers,se) |
212 | QString emailSeparator() const { return " "; } | 213 | QString emailSeparator() const { return " "; } |
213 | // the emails should be seperated by a comma | 214 | // the emails should be seperated by a comma |
214 | void setEmails( const QString &v ); | 215 | void setEmails( const QString &v ); |
215 | QString emails() const { return find( Qtopia::Emails ); } | 216 | QString emails() const { return find( Qtopia::Emails ); } |
216 | 217 | ||
diff --git a/libopie2/opiepim/ocontact.cpp b/libopie2/opiepim/ocontact.cpp index a63753e..6f648ac 100644 --- a/libopie2/opiepim/ocontact.cpp +++ b/libopie2/opiepim/ocontact.cpp | |||
@@ -931,48 +931,110 @@ QStringList OContact::trfields() | |||
931 | list.append( QObject::tr( "Assistant" ) ); | 931 | list.append( QObject::tr( "Assistant" ) ); |
932 | list.append( QObject::tr( "Manager" ) ); | 932 | list.append( QObject::tr( "Manager" ) ); |
933 | 933 | ||
934 | list.append( QObject::tr( "Home Street" ) ); | 934 | list.append( QObject::tr( "Home Street" ) ); |
935 | list.append( QObject::tr( "Home City" ) ); | 935 | list.append( QObject::tr( "Home City" ) ); |
936 | list.append( QObject::tr( "Home State" ) ); | 936 | list.append( QObject::tr( "Home State" ) ); |
937 | list.append( QObject::tr( "Home Zip" ) ); | 937 | list.append( QObject::tr( "Home Zip" ) ); |
938 | list.append( QObject::tr( "Home Country" ) ); | 938 | list.append( QObject::tr( "Home Country" ) ); |
939 | list.append( QObject::tr( "Home Web Page" ) ); | 939 | list.append( QObject::tr( "Home Web Page" ) ); |
940 | 940 | ||
941 | list.append( QObject::tr( "Spouse" ) ); | 941 | list.append( QObject::tr( "Spouse" ) ); |
942 | list.append( QObject::tr( "Gender" ) ); | 942 | list.append( QObject::tr( "Gender" ) ); |
943 | list.append( QObject::tr( "Birthday" ) ); | 943 | list.append( QObject::tr( "Birthday" ) ); |
944 | list.append( QObject::tr( "Anniversary" ) ); | 944 | list.append( QObject::tr( "Anniversary" ) ); |
945 | list.append( QObject::tr( "Nickname" ) ); | 945 | list.append( QObject::tr( "Nickname" ) ); |
946 | list.append( QObject::tr( "Children" ) ); | 946 | list.append( QObject::tr( "Children" ) ); |
947 | 947 | ||
948 | list.append( QObject::tr( "Notes" ) ); | 948 | list.append( QObject::tr( "Notes" ) ); |
949 | list.append( QObject::tr( "Groups" ) ); | 949 | list.append( QObject::tr( "Groups" ) ); |
950 | 950 | ||
951 | return list; | 951 | return list; |
952 | } | 952 | } |
953 | 953 | ||
954 | /*! | 954 | /*! |
955 | \internal | ||
956 | Returns an untranslated list of field names for a contact. | ||
957 | */ | ||
958 | QStringList OContact::untrfields() | ||
959 | { | ||
960 | QStringList list; | ||
961 | |||
962 | list.append( "Name Title" ); | ||
963 | list.append( "First Name" ); | ||
964 | list.append( "Middle Name" ); | ||
965 | list.append( "Last Name" ); | ||
966 | list.append( "Suffix" ); | ||
967 | list.append( "File As" ); | ||
968 | |||
969 | list.append( "Job Title" ); | ||
970 | list.append( "Department" ); | ||
971 | list.append( "Company" ); | ||
972 | list.append( "Business Phone" ); | ||
973 | list.append( "Business Fax" ); | ||
974 | list.append( "Business Mobile" ); | ||
975 | |||
976 | list.append( "Default Email" ); | ||
977 | list.append( "Emails" ); | ||
978 | |||
979 | list.append( "Home Phone" ); | ||
980 | list.append( "Home Fax" ); | ||
981 | list.append( "Home Mobile" ); | ||
982 | |||
983 | list.append( "Business Street" ); | ||
984 | list.append( "Business City" ); | ||
985 | list.append( "Business State" ); | ||
986 | list.append( "Business Zip" ); | ||
987 | list.append( "Business Country" ); | ||
988 | list.append( "Business Pager" ); | ||
989 | list.append( "Business WebPage" ); | ||
990 | |||
991 | list.append( "Office" ); | ||
992 | list.append( "Profession" ); | ||
993 | list.append( "Assistant" ); | ||
994 | list.append( "Manager" ); | ||
995 | |||
996 | list.append( "Home Street" ); | ||
997 | list.append( "Home City" ); | ||
998 | list.append( "Home State" ); | ||
999 | list.append( "Home Zip" ); | ||
1000 | list.append( "Home Country" ); | ||
1001 | list.append( "Home Web Page" ); | ||
1002 | |||
1003 | list.append( "Spouse" ); | ||
1004 | list.append( "Gender" ); | ||
1005 | list.append( "Birthday" ); | ||
1006 | list.append( "Anniversary" ); | ||
1007 | list.append( "Nickname" ); | ||
1008 | list.append( "Children" ); | ||
1009 | |||
1010 | list.append( "Notes" ); | ||
1011 | list.append( "Groups" ); | ||
1012 | |||
1013 | return list; | ||
1014 | } | ||
1015 | |||
1016 | /*! | ||
955 | Sets the list of email address for contact to those contained in \a str. | 1017 | Sets the list of email address for contact to those contained in \a str. |
956 | Email address should be separated by ';'s. | 1018 | Email address should be separated by ';'s. |
957 | */ | 1019 | */ |
958 | void OContact::setEmails( const QString &str ) | 1020 | void OContact::setEmails( const QString &str ) |
959 | { | 1021 | { |
960 | replace( Qtopia::Emails, str ); | 1022 | replace( Qtopia::Emails, str ); |
961 | if ( str.isEmpty() ) | 1023 | if ( str.isEmpty() ) |
962 | setDefaultEmail( QString::null ); | 1024 | setDefaultEmail( QString::null ); |
963 | } | 1025 | } |
964 | 1026 | ||
965 | /*! | 1027 | /*! |
966 | Sets the list of children for the contact to those contained in \a str. | 1028 | Sets the list of children for the contact to those contained in \a str. |
967 | */ | 1029 | */ |
968 | void OContact::setChildren( const QString &str ) | 1030 | void OContact::setChildren( const QString &str ) |
969 | { | 1031 | { |
970 | replace( Qtopia::Children, str ); | 1032 | replace( Qtopia::Children, str ); |
971 | } | 1033 | } |
972 | 1034 | ||
973 | // vcard conversion code | 1035 | // vcard conversion code |
974 | /*! | 1036 | /*! |
975 | \internal | 1037 | \internal |
976 | */ | 1038 | */ |
977 | static inline VObject *safeAddPropValue( VObject *o, const char *prop, const QString &value ) | 1039 | static inline VObject *safeAddPropValue( VObject *o, const char *prop, const QString &value ) |
978 | { | 1040 | { |
diff --git a/libopie2/opiepim/ocontact.h b/libopie2/opiepim/ocontact.h index 756c87d..f916cf2 100644 --- a/libopie2/opiepim/ocontact.h +++ b/libopie2/opiepim/ocontact.h | |||
@@ -169,48 +169,49 @@ public: | |||
169 | * Country | 169 | * Country |
170 | */ | 170 | */ |
171 | QString displayBusinessAddress() const; | 171 | QString displayBusinessAddress() const; |
172 | 172 | ||
173 | //personal | 173 | //personal |
174 | QString spouse() const { return find( Qtopia::Spouse ); } | 174 | QString spouse() const { return find( Qtopia::Spouse ); } |
175 | QString gender() const { return find( Qtopia::Gender ); } | 175 | QString gender() const { return find( Qtopia::Gender ); } |
176 | QString birthday() const { return find( Qtopia::Birthday ); } | 176 | QString birthday() const { return find( Qtopia::Birthday ); } |
177 | QString anniversary() const { return find( Qtopia::Anniversary ); } | 177 | QString anniversary() const { return find( Qtopia::Anniversary ); } |
178 | QString nickname() const { return find( Qtopia::Nickname ); } | 178 | QString nickname() const { return find( Qtopia::Nickname ); } |
179 | QString children() const { return find( Qtopia::Children ); } | 179 | QString children() const { return find( Qtopia::Children ); } |
180 | QStringList childrenList() const; | 180 | QStringList childrenList() const; |
181 | 181 | ||
182 | // other | 182 | // other |
183 | QString notes() const { return find( Qtopia::Notes ); } | 183 | QString notes() const { return find( Qtopia::Notes ); } |
184 | QString groups() const { return find( Qtopia::Groups ); } | 184 | QString groups() const { return find( Qtopia::Groups ); } |
185 | QStringList groupList() const; | 185 | QStringList groupList() const; |
186 | 186 | ||
187 | // // custom | 187 | // // custom |
188 | // const QString &customField( const QString &key ) | 188 | // const QString &customField( const QString &key ) |
189 | // { return find( Custom- + key ); } | 189 | // { return find( Custom- + key ); } |
190 | 190 | ||
191 | static QStringList fields(); | 191 | static QStringList fields(); |
192 | static QStringList trfields(); | 192 | static QStringList trfields(); |
193 | static QStringList untrfields(); | ||
193 | 194 | ||
194 | QString toRichText() const; | 195 | QString toRichText() const; |
195 | QMap<int, QString> toMap() const; | 196 | QMap<int, QString> toMap() const; |
196 | QString field( int key ) const { return find( key ); } | 197 | QString field( int key ) const { return find( key ); } |
197 | 198 | ||
198 | 199 | ||
199 | // journaling... | 200 | // journaling... |
200 | void saveJournal( journal_action action, const QString &key = QString::null ); | 201 | void saveJournal( journal_action action, const QString &key = QString::null ); |
201 | void save( QString &buf ) const; | 202 | void save( QString &buf ) const; |
202 | 203 | ||
203 | void setUid( int i ) | 204 | void setUid( int i ) |
204 | { Record::setUid(i); replace( Qtopia::AddressUid , QString::number(i)); } | 205 | { Record::setUid(i); replace( Qtopia::AddressUid , QString::number(i)); } |
205 | 206 | ||
206 | QString toShortText()const; | 207 | QString toShortText()const; |
207 | QString OContact::type()const; | 208 | QString OContact::type()const; |
208 | QMap<QString,QString> OContact::toExtraMap() const; | 209 | QMap<QString,QString> OContact::toExtraMap() const; |
209 | class QString OContact::recordField(int) const; | 210 | class QString OContact::recordField(int) const; |
210 | 211 | ||
211 | // Why private ? (eilers,se) | 212 | // Why private ? (eilers,se) |
212 | QString emailSeparator() const { return " "; } | 213 | QString emailSeparator() const { return " "; } |
213 | // the emails should be seperated by a comma | 214 | // the emails should be seperated by a comma |
214 | void setEmails( const QString &v ); | 215 | void setEmails( const QString &v ); |
215 | QString emails() const { return find( Qtopia::Emails ); } | 216 | QString emails() const { return find( Qtopia::Emails ); } |
216 | 217 | ||