kaddressbook
addresseeutil.cpp
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #include <kabc/stdaddressbook.h>
00025 #include <kabc/vcardconverter.h>
00026 #include <kdebug.h>
00027 #include <klocale.h>
00028 #include <kmessagebox.h>
00029
00030 #include "addresseeutil.h"
00031
00032 QByteArray AddresseeUtil::addresseesToClipboard( const KABC::Addressee::List &list )
00033 {
00034 KABC::VCardConverter converter;
00035
00036 return converter.createVCards( list );
00037 }
00038
00039 KABC::Addressee::List AddresseeUtil::clipboardToAddressees( const QByteArray &data )
00040 {
00041 KABC::VCardConverter converter;
00042
00043 return converter.parseVCards( data );
00044 }
00045
00046 QString AddresseeUtil::addresseesToEmails( const KABC::Addressee::List &addrList )
00047 {
00048 QStringList emails;
00049
00050 KABC::Addressee::List::ConstIterator it;
00051 for ( it = addrList.begin(); it != addrList.end(); ++it )
00052 emails.append( (*it).fullEmail() );
00053
00054 return emails.join( "," );
00055 }