author | zautrix <zautrix> | 2005-04-07 07:42:53 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-04-07 07:42:53 (UTC) |
commit | c82f9b40f6023dc7b39ac555cba8c4c313f15ca8 (patch) (unidiff) | |
tree | e9e4f0c0ed3243ec060a475983b271bd27b40d15 /kabc/field.cpp | |
parent | 76e220bf1236ae6afa9d91f18f0cd9ced730cff0 (diff) | |
download | kdepimpi-c82f9b40f6023dc7b39ac555cba8c4c313f15ca8.zip kdepimpi-c82f9b40f6023dc7b39ac555cba8c4c313f15ca8.tar.gz kdepimpi-c82f9b40f6023dc7b39ac555cba8c4c313f15ca8.tar.bz2 |
added fields to kapi
-rw-r--r-- | kabc/field.cpp | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/kabc/field.cpp b/kabc/field.cpp index 89d0b77..5c561c3 100644 --- a/kabc/field.cpp +++ b/kabc/field.cpp | |||
@@ -86,7 +86,10 @@ class Field::FieldImpl | |||
86 | Note, | 86 | Note, |
87 | Url, | 87 | Url, |
88 | Resource, | 88 | Resource, |
89 | Sip | 89 | Sip, |
90 | DefaultFormattedName, | ||
91 | MobileWorkPhone, | ||
92 | MobileHomePhone | ||
90 | }; | 93 | }; |
91 | 94 | ||
92 | int fieldId() { return mFieldId; } | 95 | int fieldId() { return mFieldId; } |
@@ -126,6 +129,8 @@ QString Field::label() | |||
126 | switch ( mImpl->fieldId() ) { | 129 | switch ( mImpl->fieldId() ) { |
127 | case FieldImpl::FormattedName: | 130 | case FieldImpl::FormattedName: |
128 | return Addressee::formattedNameLabel(); | 131 | return Addressee::formattedNameLabel(); |
132 | case FieldImpl::DefaultFormattedName: | ||
133 | return Addressee::defaultFormattedNameLabel(); | ||
129 | case FieldImpl::FamilyName: | 134 | case FieldImpl::FamilyName: |
130 | return Addressee::familyNameLabel(); | 135 | return Addressee::familyNameLabel(); |
131 | case FieldImpl::GivenName: | 136 | case FieldImpl::GivenName: |
@@ -170,6 +175,10 @@ QString Field::label() | |||
170 | return Addressee::businessPhoneLabel(); | 175 | return Addressee::businessPhoneLabel(); |
171 | case FieldImpl::MobilePhone: | 176 | case FieldImpl::MobilePhone: |
172 | return Addressee::mobilePhoneLabel(); | 177 | return Addressee::mobilePhoneLabel(); |
178 | case FieldImpl::MobileHomePhone: | ||
179 | return Addressee::mobileHomePhoneLabel(); | ||
180 | case FieldImpl::MobileWorkPhone: | ||
181 | return Addressee::mobileWorkPhoneLabel(); | ||
173 | case FieldImpl::HomeFax: | 182 | case FieldImpl::HomeFax: |
174 | return Addressee::homeFaxLabel(); | 183 | return Addressee::homeFaxLabel(); |
175 | case FieldImpl::BusinessFax: | 184 | case FieldImpl::BusinessFax: |
@@ -239,6 +248,8 @@ QString Field::value( const KABC::Addressee &a ) | |||
239 | switch ( mImpl->fieldId() ) { | 248 | switch ( mImpl->fieldId() ) { |
240 | case FieldImpl::FormattedName: | 249 | case FieldImpl::FormattedName: |
241 | return a.formattedName(); | 250 | return a.formattedName(); |
251 | case FieldImpl::DefaultFormattedName: | ||
252 | return a.defaultFormattedName(); | ||
242 | case FieldImpl::FamilyName: | 253 | case FieldImpl::FamilyName: |
243 | return a.familyName(); | 254 | return a.familyName(); |
244 | case FieldImpl::GivenName: | 255 | case FieldImpl::GivenName: |
@@ -288,6 +299,10 @@ QString Field::value( const KABC::Addressee &a ) | |||
288 | return a.phoneNumber( PhoneNumber::Work ).number(); | 299 | return a.phoneNumber( PhoneNumber::Work ).number(); |
289 | case FieldImpl::MobilePhone: | 300 | case FieldImpl::MobilePhone: |
290 | return a.phoneNumber( PhoneNumber::Cell ).number(); | 301 | return a.phoneNumber( PhoneNumber::Cell ).number(); |
302 | case FieldImpl::MobileWorkPhone: | ||
303 | return a.phoneNumber( PhoneNumber::Cell | PhoneNumber::Work ).number(); | ||
304 | case FieldImpl::MobileHomePhone: | ||
305 | return a.phoneNumber( PhoneNumber::Cell | PhoneNumber::Home ).number(); | ||
291 | case FieldImpl::HomeFax: | 306 | case FieldImpl::HomeFax: |
292 | return a.phoneNumber( PhoneNumber::Home | PhoneNumber::Fax ).number(); | 307 | return a.phoneNumber( PhoneNumber::Home | PhoneNumber::Fax ).number(); |
293 | case FieldImpl::BusinessFax: | 308 | case FieldImpl::BusinessFax: |
@@ -393,6 +408,7 @@ Field::List Field::allFields() | |||
393 | { | 408 | { |
394 | if ( mAllFields.isEmpty() ) { | 409 | if ( mAllFields.isEmpty() ) { |
395 | createField( FieldImpl::FormattedName, Frequent ); | 410 | createField( FieldImpl::FormattedName, Frequent ); |
411 | createField( FieldImpl::DefaultFormattedName, Frequent ); | ||
396 | createField( FieldImpl::FamilyName, Frequent ); | 412 | createField( FieldImpl::FamilyName, Frequent ); |
397 | createField( FieldImpl::GivenName, Frequent ); | 413 | createField( FieldImpl::GivenName, Frequent ); |
398 | createField( FieldImpl::AdditionalName ); | 414 | createField( FieldImpl::AdditionalName ); |
@@ -416,6 +432,8 @@ Field::List Field::allFields() | |||
416 | createField( FieldImpl::HomePhone, Personal|Frequent ); | 432 | createField( FieldImpl::HomePhone, Personal|Frequent ); |
417 | createField( FieldImpl::BusinessPhone, Organization|Frequent ); | 433 | createField( FieldImpl::BusinessPhone, Organization|Frequent ); |
418 | createField( FieldImpl::MobilePhone, Frequent ); | 434 | createField( FieldImpl::MobilePhone, Frequent ); |
435 | createField( FieldImpl::MobileHomePhone, Frequent ); | ||
436 | createField( FieldImpl::MobileWorkPhone, Frequent ); | ||
419 | createField( FieldImpl::HomeFax ); | 437 | createField( FieldImpl::HomeFax ); |
420 | createField( FieldImpl::BusinessFax ); | 438 | createField( FieldImpl::BusinessFax ); |
421 | createField( FieldImpl::CarPhone ); | 439 | createField( FieldImpl::CarPhone ); |