The QVersitOrganizerExporter class converts QOrganizerItems into QVersitDocuments. More...
#include <QVersitOrganizerExporter>
This class was introduced in Qt Mobility 1.1.
enum | Error { NoError, EmptyOrganizerError, UnknownComponentTypeError, UnderspecifiedOccurrenceError } |
QVersitOrganizerExporter () | |
QVersitOrganizerExporter ( const QString & profile ) | |
~QVersitOrganizerExporter () | |
QVersitDocument | document () const |
QMap<int, Error> | errorMap () const |
bool | exportItems ( const QList<QOrganizerItem> & items, QVersitDocument::VersitType versitType = QVersitDocument::ICalendar20Type ) |
void | setDetailHandler ( QVersitOrganizerExporterDetailHandler * handler ) |
The QVersitOrganizerExporter class converts QOrganizerItems into QVersitDocuments.
This class is used to convert a list of QOrganizerItems (which may be stored in a QOrganizerManager) into a QVersitDocument (which may be written to an I/O device using QVersitReader. While multiple items are provided as input, a single QVersitDocument is produced as output. Unless there is an error, there is a one-to-one mapping between organizer items and sub-documents of the result.
This enum specifies an error that occurred during the most recent call to exportItems()
Constant | Value | Description |
---|---|---|
QVersitOrganizerExporter::NoError | 0 | The most recent operation was successful |
QVersitOrganizerExporter::EmptyOrganizerError | 1 | One of the organizer items was empty |
QVersitOrganizerExporter::UnknownComponentTypeError | 2 | One of the components in the iCalendar file is not supported |
QVersitOrganizerExporter::UnderspecifiedOccurrenceError | 3 | An event or todo exception was found which did not specify both its parent and a specifier for which instance to override |
Constructs a new exporter
Constructs a new exporter for the given profile. The profile strings should be one of those defined by QVersitOrganizerHandlerFactory, or a value otherwise agreed to by a Versit plugin.
The profile determines which plugins will be loaded to supplement the exporter.
Frees the memory used by the exporter
Returns the document exported in the most recent call to exportItems().
See also exportItems().
Returns the map of errors encountered in the most recent call to exportItems(). The key is the index into the input list of organizer items and the value is the error that occurred on that item. If errors occur, export does not generate EmptyContactError or NoNameError errors but just succeeds in creating the empty, albeit invalid, vCard. QVersitContactExporter never fails.
See also exportItems().
Converts items into a QVersitDocument, using the format given by versitType. Returns true on success. If any of the items could not be exported, false is returned and errorMap() will return a list describing the errors that occurred. The successfully exported components will still be available via document().
See also document() and errorMap().
Sets handler to be the handler for processing QOrganizerItemDetails, or 0 to have no handler.
Does not take ownership of the handler. The client should ensure the handler remains valid for the lifetime of the exporter.
Only one detail handler can be set. If another detail handler was previously set, it will no longer be associated with the exporter.
© 2008-2011 Nokia Corporation and/or its subsidiaries. Nokia, Qt and their respective logos are trademarks of Nokia Corporation in Finland and/or other countries worldwide.
All other trademarks are property of their respective owners. Privacy Policy
Licensees holding valid Qt Commercial licenses may use this document in accordance with the Qt Commercial License Agreement provided with the Software or, alternatively, in accordance with the terms contained in a written agreement between you and Nokia.
Alternatively, this document may be used under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation.