• Skip to content
  • Skip to link menu
KDE 3.5 API Reference
  • KDE API Reference
  • @topname@
  • Sitemap
  • Contact Us
 

kabc

KABC::VCardConverter

KABC::VCardConverter Class Reference

#include <vcardconverter.h>

List of all members.


Detailed Description

Class to converting contact objects into vCard format and vice versa.

This class implements reading and writing of contact using from/to the vCard format. Currently vCard version 2.1 and 3.0 is supported.

Example:

  QFile file( "myfile.vcf" );
  file.open( IO_ReadOnly );
  
  QString data = file.readAll();

  VCardConverter converter;
  Addressee::List list = converter.parseVCards( data );

  // print formatted name of first contact
  qDebug( "name=%s", list[ 0 ].formattedName().latin1() );

Definition at line 53 of file vcardconverter.h.


Public Types

enum  Version { v2_1, v3_0 }

Public Member Functions

 VCardConverter ()
 ~VCardConverter ()
QString createVCard (const Addressee &addr, Version version=v3_0)
QString createVCards (Addressee::List list, Version version=v3_0)
Addressee parseVCard (const QString &vcard)
Addressee::List parseVCards (const QString &vcard)
bool vCardToAddressee (const QString &, Addressee &, Version version=v3_0) KDE_DEPRECATED
bool addresseeToVCard (const Addressee &, QString &, Version version=v3_0) KDE_DEPRECATED

Member Enumeration Documentation

enum KABC::VCardConverter::Version

  • v2_1 - VCard format version 2.1
  • v3_0 - VCard format version 3.0

Definition at line 61 of file vcardconverter.h.


Constructor & Destructor Documentation

VCardConverter::VCardConverter (  ) 

Constructor.

Definition at line 35 of file vcardconverter.cpp.

VCardConverter::~VCardConverter (  ) 

Destructor.

Definition at line 40 of file vcardconverter.cpp.


Member Function Documentation

QString VCardConverter::createVCard ( const Addressee &  addr,
Version  version = v3_0 
)

Creates a string in vCard format which contains the given contact.

Parameters:
addr The contact object
version The version of the generated vCard format

Definition at line 46 of file vcardconverter.cpp.

QString VCardConverter::createVCards ( Addressee::List  list,
Version  version = v3_0 
)

Creates a string in vCard format which contains the given list of contact.

Parameters:
list The list of contact objects
version The version of the generated vCard format

Definition at line 54 of file vcardconverter.cpp.

Addressee VCardConverter::parseVCard ( const QString &  vcard  ) 

Parses a string in vCard format and returns the first contact.

Definition at line 61 of file vcardconverter.cpp.

Addressee::List VCardConverter::parseVCards ( const QString &  vcard  ) 

Parses a string in vCard format and returns a list of contact objects.

Definition at line 68 of file vcardconverter.cpp.

bool VCardConverter::vCardToAddressee ( const QString &  str,
Addressee &  addr,
Version  version = v3_0 
)

Deprecated:

Definition at line 77 of file vcardconverter.cpp.

bool VCardConverter::addresseeToVCard ( const Addressee &  addr,
QString &  str,
Version  version = v3_0 
)

Deprecated:

Definition at line 90 of file vcardconverter.cpp.


The documentation for this class was generated from the following files:
  • vcardconverter.h
  • vcardconverter.cpp

kabc

Skip menu "kabc"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

@topname@

Skip menu "@topname@"
  •     kdnssd-avahi
  • arts
  • dcop
  • dnssd
  • interfaces
  •     interface
  •     library
  •   kspeech
  •   ktexteditor
  • kabc
  • kate
  • kcmshell
  • kdecore
  • kded
  • kdefx
  • kdeprint
  • kdesu
  • kdeui
  • kdoctools
  • khtml
  • kimgio
  • kinit
  • kio
  •   bookmarks
  •   httpfilter
  •   kfile
  •   kio
  •   kioexec
  •   kpasswdserver
  •   kssl
  • kioslave
  •   http
  • kjs
  • kmdi
  •   kmdi
  • knewstuff
  • kparts
  • kresources
  • kspell2
  • kunittest
  • kutils
  • kwallet
  • libkmid
  • libkscreensaver
Generated for @topname@ by doxygen 1.5.5
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal