![]() |
Home · All Classes · All Functions · | ![]() |
The QVersitContactExporter class exports QContact(s) into QVersitDocument(s). More...
#include <QVersitContactExporter>
Inherits QObject.
QVersitContactExporter () | |
~QVersitContactExporter () | |
QVersitDocument | exportContact ( const QContact & contact, QVersitDocument::VersitType versitType = QVersitDocument::VCard21 ) |
QList<QContactDetail> | unknownContactDetails () |
void | scale ( const QString & imageFileName, QByteArray & imageData ) |
The QVersitContactExporter class exports QContact(s) into QVersitDocument(s).
If the exported QContact has some detail with an image as its value, signal QVersitContactExporter::scale() is emitted and the client can scale the image's data to the size it wishes. The client may retrieve the list contact details which were not exported using QVersitContactExporter::unknownContactDetails().
// An example of exporting a QContact: QVersitContactExporter contactExporter; QContact contact; // Create a name QContactName name; name.setFirst(QString::fromAscii("John")); contact.saveDetail(&name); // Create an avatar type which is not supported by the exporter QContactAvatar contactAvatar; contactAvatar.setAvatar(QString::fromAscii("/my/image/avatar_path/texture.type")); contactAvatar.setSubType(QContactAvatar::SubTypeTexturedMesh); contact.saveDetail(&contactAvatar); // Create an organization detail with a title and a logo QContactOrganization organization; organization.setTitle(QString::fromAscii("Developer")); organization.setLogo(QString::fromAscii("/my/image/logo_path/logo.jpg")); contact.saveDetail(&organization); QVersitDocument versitDocument = contactExporter.exportContact(contact); // Client will receive the signal "scale" with the logo image path QList<QContactDetail> unknownDetails = contactExporter.unknownContactDetails(); // The returned unknownDetails can be processed by the client and // the client can append details directly into QVersitDocument if needed. // (In this example QContactAvatar::SubTypeTexturedMesh. // Currently for QContactAvatar details, // only exporting subtypes QContactAvatar::SubTypeImage and // QContactAvatar::SubTypeAudioRingtone is supported.)
See also QVersitDocument and QVersitProperty.
Constructs a new contact exporter
Frees any memory in use by this contact exporter.
Returns the versit document corresponding to the contact and versitType.
This signal is emitted by QVersitContactExporter::exportContact(), when a contact detail containing an image is found in a QContact. The input for the client is the path of the image in imageFileName. When the client has performed the scaling, it should write the result to imageData. Image scaling can be done for example by using class QImage.
Returns the list of contact details, which were not exported by the most recent call of QVersitContactExporter::exportContact().
Copyright © 2009 Nokia Corporation and/or its subsidiary(-ies) | Trademarks | Qt Mobility Project 1.0.0 (Technology Preview) |