QVersitOrganizerExporter Class Reference
The QVersitOrganizerExporter class converts QOrganizerItems into QVersitDocuments. More...
#include <QVersitOrganizerExporter>
Public Types
enum | Error { NoError, EmptyOrganizerError, UnknownComponentTypeError, UnderspecifiedOccurrenceError } |
Public Functions
Detailed Description
The QVersitOrganizerExporter class converts QOrganizerItems into QVersitDocuments.
This class is used to convert a list of QOrganizerItems (which may be stored in a QOrganizerItemManager) 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.
Member Type Documentation
enum QVersitOrganizerExporter::Error
Member Function Documentation
QVersitOrganizerExporter::QVersitOrganizerExporter ()
Constructs a new importer
QVersitOrganizerExporter::~QVersitOrganizerExporter ()
Frees the memory used by the importer
QVersitDocument QVersitOrganizerExporter::document () const
Returns the document exported in the most recent call to exportItems().
See also exportItems().
QMap<int, Error> QVersitOrganizerExporter::errors () const
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.
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 errors() will return a list describing the errors that occurred. The successfully exported components will still be available via document().
QVersitResourceHandler * QVersitOrganizerExporter::resourceHandler () const
This function is under development and is subject to change.
Returns the associated resource handler.
NOTE: Resource handlers for organizer items have not been implemented yet.
See also setResourceHandler().
void QVersitOrganizerExporter::setDetailHandler ( QVersitOrganizerExporterDetailHandler * handler )
This function is under development and is subject to change.
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 (of any version) was previously set, it will no longer be associated with the exporter.
NOTE: Detail handlers for organizer items have not been implemented yet.
void QVersitOrganizerExporter::setResourceHandler ( QVersitResourceHandler * handler )
This function is under development and is subject to change.
Sets handler to be the handler to load files with, 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.
NOTE: Resource handlers for organizer items have not been implemented yet.
See also resourceHandler().