-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 @@ -1993,12 +1993,16 @@ Resource *Addressee::resource() const //US QString Addressee::resourceLabel() { return i18n("Resource"); } +QString Addressee::categoryLabel() +{ + return i18n("Category"); +} void Addressee::setChanged( bool value ) { detach(); mData->changed = value; } diff --git a/kabc/addressee.h b/kabc/addressee.h index 2c81c1a..08d2f56 100644 --- a/kabc/addressee.h +++ b/kabc/addressee.h @@ -820,13 +820,13 @@ 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 @@ -54,12 +54,13 @@ class Field::FieldImpl GivenName, AdditionalName, Prefix, Suffix, NickName, Birthday, + Category, HomeAddressStreet, HomeAddressLocality, HomeAddressRegion, HomeAddressPostalCode, HomeAddressCountry, HomeAddressLabel, @@ -192,12 +193,14 @@ QString Field::label() case FieldImpl::Note: return Addressee::noteLabel(); 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(); default: return i18n("Unknown Field"); @@ -274,12 +277,14 @@ QString Field::value( const KABC::Addressee &a ) return QString::null; case FieldImpl::Url: 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(); case FieldImpl::MobilePhone: return a.phoneNumber( PhoneNumber::Cell ).number(); @@ -392,12 +397,13 @@ Field::List Field::allFields() createField( FieldImpl::GivenName, Frequent ); createField( FieldImpl::AdditionalName ); 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 ); createField( FieldImpl::HomeAddressCountry, Address|Personal ); createField( FieldImpl::HomeAddressLabel, Address|Personal ); |