author | zautrix <zautrix> | 2004-10-29 23:13:22 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-10-29 23:13:22 (UTC) |
commit | da80b510e4643fa3f78cf3f97af108e87097583d (patch) (unidiff) | |
tree | 01c328362a6bf1898853ba26fd5d48eb5cff1e27 /kabc | |
parent | aafa695508796e86e9f267633ea5e6965d876031 (diff) | |
download | kdepimpi-da80b510e4643fa3f78cf3f97af108e87097583d.zip kdepimpi-da80b510e4643fa3f78cf3f97af108e87097583d.tar.gz kdepimpi-da80b510e4643fa3f78cf3f97af108e87097583d.tar.bz2 |
added better category handling to kapi
-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 | |||
1995 | QString Addressee::resourceLabel() | 1995 | QString Addressee::resourceLabel() |
1996 | { | 1996 | { |
1997 | return i18n("Resource"); | 1997 | return i18n("Resource"); |
1998 | } | 1998 | } |
1999 | QString Addressee::categoryLabel() | ||
2000 | { | ||
2001 | return i18n("Category"); | ||
2002 | } | ||
1999 | 2003 | ||
2000 | void Addressee::setChanged( bool value ) | 2004 | void Addressee::setChanged( bool value ) |
2001 | { | 2005 | { |
2002 | detach(); | 2006 | 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 | |||
822 | Return resourcelabel. | 822 | Return resourcelabel. |
823 | */ | 823 | */ |
824 | //US | 824 | //US |
825 | static QString resourceLabel(); | 825 | static QString resourceLabel(); |
826 | 826 | static QString categoryLabel(); | |
827 | /** | 827 | /** |
828 | Mark addressee as changed. | 828 | Mark addressee as changed. |
829 | */ | 829 | */ |
830 | void setChanged( bool value ); | 830 | 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 | |||
56 | Prefix, | 56 | Prefix, |
57 | Suffix, | 57 | Suffix, |
58 | NickName, | 58 | NickName, |
59 | Birthday, | 59 | Birthday, |
60 | Category, | ||
60 | HomeAddressStreet, | 61 | HomeAddressStreet, |
61 | HomeAddressLocality, | 62 | HomeAddressLocality, |
62 | HomeAddressRegion, | 63 | HomeAddressRegion, |
63 | HomeAddressPostalCode, | 64 | HomeAddressPostalCode, |
@@ -194,8 +195,10 @@ QString Field::label() | |||
194 | case FieldImpl::Url: | 195 | case FieldImpl::Url: |
195 | return Addressee::urlLabel(); | 196 | return Addressee::urlLabel(); |
196 | case FieldImpl::Resource: | 197 | case FieldImpl::Resource: |
197 | return Addressee::resourceLabel(); | 198 | return Addressee::resourceLabel(); |
199 | case FieldImpl::Category: | ||
200 | return Addressee::categoryLabel(); | ||
198 | case FieldImpl::Sip: | 201 | case FieldImpl::Sip: |
199 | return Addressee::sipLabel(); | 202 | return Addressee::sipLabel(); |
200 | case FieldImpl::CustomField: | 203 | case FieldImpl::CustomField: |
201 | return mImpl->label(); | 204 | return mImpl->label(); |
@@ -276,8 +279,10 @@ QString Field::value( const KABC::Addressee &a ) | |||
276 | return a.url().prettyURL(); | 279 | return a.url().prettyURL(); |
277 | //US | 280 | //US |
278 | case FieldImpl::Resource: | 281 | case FieldImpl::Resource: |
279 | return a.resource()->resourceName(); | 282 | return a.resource()->resourceName(); |
283 | case FieldImpl::Category: | ||
284 | return a.categories().join(","); | ||
280 | case FieldImpl::HomePhone: | 285 | case FieldImpl::HomePhone: |
281 | return a.phoneNumber( PhoneNumber::Home ).number(); | 286 | return a.phoneNumber( PhoneNumber::Home ).number(); |
282 | case FieldImpl::BusinessPhone: | 287 | case FieldImpl::BusinessPhone: |
283 | return a.phoneNumber( PhoneNumber::Work ).number(); | 288 | return a.phoneNumber( PhoneNumber::Work ).number(); |
@@ -394,8 +399,9 @@ Field::List Field::allFields() | |||
394 | createField( FieldImpl::Prefix ); | 399 | createField( FieldImpl::Prefix ); |
395 | createField( FieldImpl::Suffix ); | 400 | createField( FieldImpl::Suffix ); |
396 | createField( FieldImpl::NickName, Personal ); | 401 | createField( FieldImpl::NickName, Personal ); |
397 | createField( FieldImpl::Birthday, Personal ); | 402 | createField( FieldImpl::Birthday, Personal ); |
403 | createField( FieldImpl::Category ); | ||
398 | createField( FieldImpl::HomeAddressStreet, Address|Personal ); | 404 | createField( FieldImpl::HomeAddressStreet, Address|Personal ); |
399 | createField( FieldImpl::HomeAddressLocality, Address|Personal ); | 405 | createField( FieldImpl::HomeAddressLocality, Address|Personal ); |
400 | createField( FieldImpl::HomeAddressRegion, Address|Personal ); | 406 | createField( FieldImpl::HomeAddressRegion, Address|Personal ); |
401 | createField( FieldImpl::HomeAddressPostalCode, Address|Personal ); | 407 | createField( FieldImpl::HomeAddressPostalCode, Address|Personal ); |