[Kde-pim] Where is kabc/resourcefile.h ?
Tobias Koenig
tokoe at kde.org
Wed Oct 21 16:10:54 BST 2009
On Wed, Oct 21, 2009 at 08:55:59PM +0700, Robin Atwood wrote:
Hej Robin,
> I want to process an arbitrary vcf file as an addressbook, so it seems I want
> to create an KABC::ResourceFile instance and then access its AddressBook
> member. But I cannot seem to be able to locate the header file anywhere!
> Neither Google nor the find command are helping.
Nope, you want to use something like the following:
QFile file( "mycontacts.vcf" );
file.open( QIODevice::ReadOnly );
const QByteArray data = file.readAll();
KABC::VCardConverter converter;
const KABC::Addressee::List contacts = converter.parseVCards( data );
foreach ( const KABC::Addressee &contact, contacts )
qDebug() << "Name=" << contact.fullName();
StdAddressBook and the rest of the kresource framework shouldn't be
used anymore!
Ciao,
Tobias
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20091021/631d2e41/attachment.sig>
-------------- next part --------------
_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/
More information about the kde-pim
mailing list