summaryrefslogtreecommitdiffabout
path: root/kabc/field.cpp
Side-by-side diff
Diffstat (limited to 'kabc/field.cpp') (more/less context) (show whitespace changes)
-rw-r--r--kabc/field.cpp20
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
Note,
Url,
Resource,
- Sip
+ Sip,
+ DefaultFormattedName,
+ MobileWorkPhone,
+ MobileHomePhone
};
int fieldId() { return mFieldId; }
@@ -126,6 +129,8 @@ QString Field::label()
switch ( mImpl->fieldId() ) {
case FieldImpl::FormattedName:
return Addressee::formattedNameLabel();
+ case FieldImpl::DefaultFormattedName:
+ return Addressee::defaultFormattedNameLabel();
case FieldImpl::FamilyName:
return Addressee::familyNameLabel();
case FieldImpl::GivenName:
@@ -170,6 +175,10 @@ QString Field::label()
return Addressee::businessPhoneLabel();
case FieldImpl::MobilePhone:
return Addressee::mobilePhoneLabel();
+ case FieldImpl::MobileHomePhone:
+ return Addressee::mobileHomePhoneLabel();
+ case FieldImpl::MobileWorkPhone:
+ return Addressee::mobileWorkPhoneLabel();
case FieldImpl::HomeFax:
return Addressee::homeFaxLabel();
case FieldImpl::BusinessFax:
@@ -239,6 +248,8 @@ QString Field::value( const KABC::Addressee &a )
switch ( mImpl->fieldId() ) {
case FieldImpl::FormattedName:
return a.formattedName();
+ case FieldImpl::DefaultFormattedName:
+ return a.defaultFormattedName();
case FieldImpl::FamilyName:
return a.familyName();
case FieldImpl::GivenName:
@@ -288,6 +299,10 @@ QString Field::value( const KABC::Addressee &a )
return a.phoneNumber( PhoneNumber::Work ).number();
case FieldImpl::MobilePhone:
return a.phoneNumber( PhoneNumber::Cell ).number();
+ case FieldImpl::MobileWorkPhone:
+ return a.phoneNumber( PhoneNumber::Cell | PhoneNumber::Work ).number();
+ case FieldImpl::MobileHomePhone:
+ return a.phoneNumber( PhoneNumber::Cell | PhoneNumber::Home ).number();
case FieldImpl::HomeFax:
return a.phoneNumber( PhoneNumber::Home | PhoneNumber::Fax ).number();
case FieldImpl::BusinessFax:
@@ -393,6 +408,7 @@ Field::List Field::allFields()
{
if ( mAllFields.isEmpty() ) {
createField( FieldImpl::FormattedName, Frequent );
+ createField( FieldImpl::DefaultFormattedName, Frequent );
createField( FieldImpl::FamilyName, Frequent );
createField( FieldImpl::GivenName, Frequent );
createField( FieldImpl::AdditionalName );
@@ -416,6 +432,8 @@ Field::List Field::allFields()
createField( FieldImpl::HomePhone, Personal|Frequent );
createField( FieldImpl::BusinessPhone, Organization|Frequent );
createField( FieldImpl::MobilePhone, Frequent );
+ createField( FieldImpl::MobileHomePhone, Frequent );
+ createField( FieldImpl::MobileWorkPhone, Frequent );
createField( FieldImpl::HomeFax );
createField( FieldImpl::BusinessFax );
createField( FieldImpl::CarPhone );