diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-02-20 16:27:27 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-02-20 16:27:27 -0600 |
commit | 94273bcb909fac42ef9427e3d8a614cab8c29c66 (patch) | |
tree | 91b99186971ecb475db3ca41b1b12df24029e389 /kaddressbook/kabtools.cpp | |
parent | 41b65d69967ad0d35f8b4dd37ac63aad1cebdae9 (diff) | |
download | tdepim-94273bcb909fac42ef9427e3d8a614cab8c29c66.tar.gz tdepim-94273bcb909fac42ef9427e3d8a614cab8c29c66.zip |
Rename KABC namespace
Diffstat (limited to 'kaddressbook/kabtools.cpp')
-rw-r--r-- | kaddressbook/kabtools.cpp | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/kaddressbook/kabtools.cpp b/kaddressbook/kabtools.cpp index cfa16df81..ddebac13e 100644 --- a/kaddressbook/kabtools.cpp +++ b/kaddressbook/kabtools.cpp @@ -31,7 +31,7 @@ #include "kabtools.h" -static TQString uniqueFileName( const KABC::Addressee &addressee, TQStringList &existingFiles ) +static TQString uniqueFileName( const TDEABC::Addressee &addressee, TQStringList &existingFiles ) { TQString name; TQString uniquePart; @@ -51,7 +51,7 @@ static TQString uniqueFileName( const KABC::Addressee &addressee, TQStringList & return name; } -void KABTools::mailVCards( const TQStringList &uids, KABC::AddressBook *ab ) +void KABTools::mailVCards( const TQStringList &uids, TDEABC::AddressBook *ab ) { KURL::List urls; @@ -65,7 +65,7 @@ void KABTools::mailVCards( const TQStringList &uids, KABC::AddressBook *ab ) TQStringList::ConstIterator it( uids.begin() ); const TQStringList::ConstIterator endIt( uids.end() ); for ( ; it != endIt; ++it ) { - KABC::Addressee addressee = ab->findByUid( *it ); + TDEABC::Addressee addressee = ab->findByUid( *it ); if ( addressee.isEmpty() ) continue; @@ -77,14 +77,14 @@ void KABTools::mailVCards( const TQStringList &uids, KABC::AddressBook *ab ) TQFile file( path ); if ( file.open( IO_WriteOnly ) ) { - KABC::VCardConverter converter; - KABC::Addressee::List list; + TDEABC::VCardConverter converter; + TDEABC::Addressee::List list; list.append( addressee ); #if defined(KABC_VCARD_ENCODING_FIX) - const TQCString vcard = converter.createVCardsRaw( list, KABC::VCardConverter::v3_0 ); + const TQCString vcard = converter.createVCardsRaw( list, TDEABC::VCardConverter::v3_0 ); file.writeBlock( vcard, vcard.length() ); #else - TQString vcard = converter.createVCards( list, KABC::VCardConverter::v3_0 ); + TQString vcard = converter.createVCards( list, TDEABC::VCardConverter::v3_0 ); TQTextStream t( &file ); t.setEncoding( TQTextStream::UnicodeUTF8 ); t << vcard; @@ -104,7 +104,7 @@ void KABTools::mailVCards( const TQStringList &uids, KABC::AddressBook *ab ) urls.toStringList() ); } -static void mergePictures( KABC::Picture &master, const KABC::Picture &slave ) +static void mergePictures( TDEABC::Picture &master, const TDEABC::Picture &slave ) { if ( master.isIntern() ) { if ( master.data().isNull() ) { @@ -123,23 +123,23 @@ static void mergePictures( KABC::Picture &master, const KABC::Picture &slave ) } } -KABC::Addressee KABTools::mergeContacts( const KABC::Addressee::List &list ) +TDEABC::Addressee KABTools::mergeContacts( const TDEABC::Addressee::List &list ) { if ( list.count() == 0 ) //emtpy - return KABC::Addressee(); + return TDEABC::Addressee(); else if ( list.count() == 1 ) // nothing to merge return list.first(); - KABC::Addressee masterAddressee = list.first(); + TDEABC::Addressee masterAddressee = list.first(); - KABC::Addressee::List::ConstIterator contactIt( list.begin() ); - const KABC::Addressee::List::ConstIterator contactEndIt( list.end() ); + TDEABC::Addressee::List::ConstIterator contactIt( list.begin() ); + const TDEABC::Addressee::List::ConstIterator contactEndIt( list.end() ); for ( ++contactIt; contactIt != contactEndIt; ++contactIt ) { // ADR + LABEL - const KABC::Address::List addresses = (*contactIt).addresses(); - KABC::Address::List masterAddresses = masterAddressee.addresses(); - KABC::Address::List::ConstIterator addrIt( addresses.begin() ); - const KABC::Address::List::ConstIterator addrEndIt( addresses.end() ); + const TDEABC::Address::List addresses = (*contactIt).addresses(); + TDEABC::Address::List masterAddresses = masterAddressee.addresses(); + TDEABC::Address::List::ConstIterator addrIt( addresses.begin() ); + const TDEABC::Address::List::ConstIterator addrEndIt( addresses.end() ); for ( ; addrIt != addrEndIt; ++addrIt ) { if ( !masterAddresses.contains( *addrIt ) ) masterAddressee.insertAddress( *addrIt ); @@ -184,7 +184,7 @@ KABC::Addressee KABTools::mergeContacts( const KABC::Addressee::List &list ) // KEY */ // LOGO - KABC::Picture logo = masterAddressee.logo(); + TDEABC::Picture logo = masterAddressee.logo(); mergePictures( logo, (*contactIt).logo() ); masterAddressee.setLogo( logo ); @@ -209,7 +209,7 @@ KABC::Addressee KABTools::mergeContacts( const KABC::Addressee::List &list ) masterAddressee.setOrganization( (*contactIt).organization() ); // PHOTO - KABC::Picture photo = masterAddressee.photo(); + TDEABC::Picture photo = masterAddressee.photo(); mergePictures( photo, (*contactIt).photo() ); masterAddressee.setPhoto( photo ); @@ -234,10 +234,10 @@ KABC::Addressee KABTools::mergeContacts( const KABC::Addressee::List &list ) */ // TEL - const KABC::PhoneNumber::List phones = (*contactIt).phoneNumbers(); - const KABC::PhoneNumber::List masterPhones = masterAddressee.phoneNumbers(); - KABC::PhoneNumber::List::ConstIterator phoneIt( phones.begin() ); - const KABC::PhoneNumber::List::ConstIterator phoneEndIt( phones.end() ); + const TDEABC::PhoneNumber::List phones = (*contactIt).phoneNumbers(); + const TDEABC::PhoneNumber::List masterPhones = masterAddressee.phoneNumbers(); + TDEABC::PhoneNumber::List::ConstIterator phoneIt( phones.begin() ); + const TDEABC::PhoneNumber::List::ConstIterator phoneEndIt( phones.end() ); for ( ; phoneIt != phoneEndIt; ++phoneIt ) if ( !masterPhones.contains( *phoneIt ) ) masterAddressee.insertPhoneNumber( *phoneIt ); |