summaryrefslogtreecommitdiffabout
path: root/kabc/field.cpp
authorzautrix <zautrix>2004-10-29 23:13:22 (UTC)
committer zautrix <zautrix>2004-10-29 23:13:22 (UTC)
commitda80b510e4643fa3f78cf3f97af108e87097583d (patch) (side-by-side diff)
tree01c328362a6bf1898853ba26fd5d48eb5cff1e27 /kabc/field.cpp
parentaafa695508796e86e9f267633ea5e6965d876031 (diff)
downloadkdepimpi-da80b510e4643fa3f78cf3f97af108e87097583d.zip
kdepimpi-da80b510e4643fa3f78cf3f97af108e87097583d.tar.gz
kdepimpi-da80b510e4643fa3f78cf3f97af108e87097583d.tar.bz2
added better category handling to kapi
Diffstat (limited to 'kabc/field.cpp') (more/less context) (show whitespace changes)
-rw-r--r--kabc/field.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/kabc/field.cpp b/kabc/field.cpp
index d95cd19..89d0b77 100644
--- a/kabc/field.cpp
+++ b/kabc/field.cpp
@@ -57,6 +57,7 @@ class Field::FieldImpl
Suffix,
NickName,
Birthday,
+ Category,
HomeAddressStreet,
HomeAddressLocality,
HomeAddressRegion,
@@ -195,6 +196,8 @@ QString Field::label()
return Addressee::urlLabel();
case FieldImpl::Resource:
return Addressee::resourceLabel();
+ case FieldImpl::Category:
+ return Addressee::categoryLabel();
case FieldImpl::Sip:
return Addressee::sipLabel();
case FieldImpl::CustomField:
@@ -277,6 +280,8 @@ QString Field::value( const KABC::Addressee &a )
//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:
@@ -395,6 +400,7 @@ Field::List Field::allFields()
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 );