-rw-r--r-- | kabc/addressee.cpp | 4 | ||||
-rw-r--r-- | kabc/addressee.h | 2 | ||||
-rw-r--r-- | kabc/field.cpp | 6 |
3 files changed, 11 insertions, 1 deletions
diff --git a/kabc/addressee.cpp b/kabc/addressee.cpp index eec0f1f..3ce733d 100644 --- a/kabc/addressee.cpp +++ b/kabc/addressee.cpp @@ -1995,8 +1995,12 @@ Resource *Addressee::resource() const QString Addressee::resourceLabel() { return i18n("Resource"); } +QString Addressee::categoryLabel() +{ + return i18n("Category"); +} void Addressee::setChanged( bool value ) { detach(); diff --git a/kabc/addressee.h b/kabc/addressee.h index 2c81c1a..08d2f56 100644 --- a/kabc/addressee.h +++ b/kabc/addressee.h @@ -822,9 +822,9 @@ class Addressee Return resourcelabel. */ //US static QString resourceLabel(); - + static QString categoryLabel(); /** Mark addressee as changed. */ void setChanged( bool value ); diff --git a/kabc/field.cpp b/kabc/field.cpp index d95cd19..89d0b77 100644 --- a/kabc/field.cpp +++ b/kabc/field.cpp @@ -56,8 +56,9 @@ class Field::FieldImpl Prefix, Suffix, NickName, Birthday, + Category, HomeAddressStreet, HomeAddressLocality, HomeAddressRegion, HomeAddressPostalCode, @@ -194,8 +195,10 @@ QString Field::label() case FieldImpl::Url: return Addressee::urlLabel(); case FieldImpl::Resource: return Addressee::resourceLabel(); + case FieldImpl::Category: + return Addressee::categoryLabel(); case FieldImpl::Sip: return Addressee::sipLabel(); case FieldImpl::CustomField: return mImpl->label(); @@ -276,8 +279,10 @@ QString Field::value( const KABC::Addressee &a ) return a.url().prettyURL(); //US case FieldImpl::Resource: return a.resource()->resourceName(); + case FieldImpl::Category: + return a.categories().join(","); case FieldImpl::HomePhone: return a.phoneNumber( PhoneNumber::Home ).number(); case FieldImpl::BusinessPhone: return a.phoneNumber( PhoneNumber::Work ).number(); @@ -394,8 +399,9 @@ Field::List Field::allFields() createField( FieldImpl::Prefix ); createField( FieldImpl::Suffix ); createField( FieldImpl::NickName, Personal ); createField( FieldImpl::Birthday, Personal ); + createField( FieldImpl::Category ); createField( FieldImpl::HomeAddressStreet, Address|Personal ); createField( FieldImpl::HomeAddressLocality, Address|Personal ); createField( FieldImpl::HomeAddressRegion, Address|Personal ); createField( FieldImpl::HomeAddressPostalCode, Address|Personal ); |