author | ulf69 <ulf69> | 2004-09-09 18:57:57 (UTC) |
---|---|---|
committer | ulf69 <ulf69> | 2004-09-09 18:57:57 (UTC) |
commit | 880518b6f1d4b06e3df45224c244d9c62f6fb7a9 (patch) (side-by-side diff) | |
tree | 2b0b5a0c7e40481c31f29ff2bd98aa6abb4c6c90 /kabc/field.cpp | |
parent | 72860f2b84ba97de9223238d9fb97edc0804cc68 (diff) | |
download | kdepimpi-880518b6f1d4b06e3df45224c244d9c62f6fb7a9.zip kdepimpi-880518b6f1d4b06e3df45224c244d9c62f6fb7a9.tar.gz kdepimpi-880518b6f1d4b06e3df45224c244d9c62f6fb7a9.tar.bz2 |
added sip type to phonnumbers
-rw-r--r-- | kabc/field.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/kabc/field.cpp b/kabc/field.cpp index e27970e..d95cd19 100644 --- a/kabc/field.cpp +++ b/kabc/field.cpp @@ -71,33 +71,34 @@ class Field::FieldImpl BusinessAddressLabel, HomePhone, BusinessPhone, MobilePhone, HomeFax, BusinessFax, CarPhone, Isdn, Pager, Email, Mailer, Title, Role, Organization, Note, Url, - Resource + Resource, + Sip }; int fieldId() { return mFieldId; } int category() { return mCategory; } QString label() { return mLabel; } QString key() { return mKey; } QString app() { return mApp; } private: int mFieldId; int mCategory; QString mLabel; QString mKey; QString mApp; @@ -181,32 +182,34 @@ QString Field::label() case FieldImpl::Email: return Addressee::emailLabel(); case FieldImpl::Mailer: return Addressee::mailerLabel(); case FieldImpl::Title: return Addressee::titleLabel(); case FieldImpl::Role: return Addressee::roleLabel(); case FieldImpl::Organization: return Addressee::organizationLabel(); case FieldImpl::Note: return Addressee::noteLabel(); case FieldImpl::Url: return Addressee::urlLabel(); case FieldImpl::Resource: return Addressee::resourceLabel(); + case FieldImpl::Sip: + return Addressee::sipLabel(); case FieldImpl::CustomField: return mImpl->label(); default: return i18n("Unknown Field"); } } int Field::category() { return mImpl->category(); } QString Field::categoryLabel( int category ) { switch ( category ) { case All: @@ -277,32 +280,34 @@ QString Field::value( const KABC::Addressee &a ) 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(); case FieldImpl::HomeFax: return a.phoneNumber( PhoneNumber::Home | PhoneNumber::Fax ).number(); case FieldImpl::BusinessFax: return a.phoneNumber( PhoneNumber::Work | PhoneNumber::Fax ).number(); case FieldImpl::CarPhone: return a.phoneNumber( PhoneNumber::Car ).number(); case FieldImpl::Isdn: return a.phoneNumber( PhoneNumber::Isdn ).number(); case FieldImpl::Pager: return a.phoneNumber( PhoneNumber::Pager ).number(); + case FieldImpl::Sip: + return a.phoneNumber( PhoneNumber::Sip ).number(); case FieldImpl::HomeAddressStreet: return a.address( Address::Home ).street(); case FieldImpl::HomeAddressLocality: return a.address( Address::Home ).locality(); case FieldImpl::HomeAddressRegion: return a.address( Address::Home ).region(); case FieldImpl::HomeAddressPostalCode: return a.address( Address::Home ).postalCode(); case FieldImpl::HomeAddressCountry: return a.address( Address::Home ).country(); case FieldImpl::BusinessAddressStreet: return a.address( Address::Work ).street(); case FieldImpl::BusinessAddressLocality: return a.address( Address::Work ).locality(); case FieldImpl::BusinessAddressRegion: return a.address( Address::Work ).region(); @@ -405,32 +410,33 @@ Field::List Field::allFields() createField( FieldImpl::HomePhone, Personal|Frequent ); createField( FieldImpl::BusinessPhone, Organization|Frequent ); createField( FieldImpl::MobilePhone, Frequent ); createField( FieldImpl::HomeFax ); createField( FieldImpl::BusinessFax ); createField( FieldImpl::CarPhone ); createField( FieldImpl::Isdn ); createField( FieldImpl::Pager ); createField( FieldImpl::Email, Email|Frequent ); createField( FieldImpl::Mailer, Email ); createField( FieldImpl::Title, Organization ); createField( FieldImpl::Role, Organization ); createField( FieldImpl::Organization, Organization ); createField( FieldImpl::Note ); createField( FieldImpl::Url ); createField( FieldImpl::Resource ); + createField( FieldImpl::Sip ); } return mAllFields; } Field::List Field::defaultFields() { if ( mDefaultFields.isEmpty() ) { createDefaultField( FieldImpl::GivenName ); createDefaultField( FieldImpl::FamilyName ); createDefaultField( FieldImpl::Email ); } return mDefaultFields; } |