Viadeo Twitter Google Bookmarks ! Facebook Digg del.icio.us MySpace Yahoo MyWeb Blinklist Netvouz Reddit Simpy StumbleUpon Bookmarks Windows Live Favorites 
Logo Documentation Qt ·  Page d'accueil  ·  Toutes les classes  ·  Classes principales  ·  Annotées  ·  Classes groupées  ·  Modules  ·  Fonctions  · 

QVersitOrganizerImporter Class

The QVersitOrganizerImporter class converts QVersitDocuments to QOrganizerItems. More...

 #include <QVersitOrganizerImporter>

Public Types

enum Error { NoError, InvalidDocumentError, EmptyDocumentError }

Public Functions

QVersitOrganizerImporter()
QVersitOrganizerImporter(const QString & profile)
~QVersitOrganizerImporter()
QMap<int, Error> errorMap() const
bool importDocument(const QVersitDocument & document)
QList<QOrganizerItem> items() const
void setPropertyHandler(QVersitOrganizerImporterPropertyHandler * handler)

Detailed Description

The QVersitOrganizerImporter class converts QVersitDocuments to QOrganizerItems.

This class is used to convert a QVersitDocument (which may be produced by a QVersitReader) to lists of QOrganizerItems (which may be saved into a QOrganizerManager. Unless there is an error, there is a one-to-one mapping between sub-documents of the input Versit document and QOrganizerItems.

Member Type Documentation

enum QVersitOrganizerImporter::Error

This enum specifies an error that occurred during the most recent call to importDocument()

ConstantValueDescription
QVersitOrganizerImporter::NoError0The most recent operation was successful
QVersitOrganizerImporter::InvalidDocumentError1One of the documents is not an iCalendar file
QVersitOrganizerImporter::EmptyDocumentError2One of the documents is empty

Member Function Documentation

QVersitOrganizerImporter::QVersitOrganizerImporter()

Constructs a new importer

QVersitOrganizerImporter::QVersitOrganizerImporter(const QString & profile)

Constructs a new importer 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 importer.

QVersitOrganizerImporter::~QVersitOrganizerImporter()

Frees the memory used by the importer

QMap<int, Error> QVersitOrganizerImporter::errorMap() const

Returns the map of errors encountered in the most recent call to importDocument().

The key is the zero based index of the sub document within the container document, or -1 for an error with the container document itself. The value is the error that occurred on that document.

See also importDocument().

bool QVersitOrganizerImporter::importDocument(const QVersitDocument & document)

Converts document into a corresponding list of QOrganizerItems. After calling this, the converted organizer items can be retrieved by calling items().

Returns true on success. The document should contain at least one subdocument. In the importing process, each subdocument roughly corresponds to a QOrganizerItem. If any of the subdocuments cannot be imported as organizer items (eg. they don't conform to the iCalendar format), false is returned and errorMap() will return a list describing the errors that occurred. The successfully imported items will still be available via items().

See also items() and errorMap().

QList<QOrganizerItem> QVersitOrganizerImporter::items() const

Returns the organizer items imported in the most recent call to importDocument().

See also importDocument().

void QVersitOrganizerImporter::setPropertyHandler(QVersitOrganizerImporterPropertyHandler * handler)

Sets handler to be the handler for processing QVersitProperties, 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 importer.

Only one property handler can be set. If another property handler was previously set, it will no longer be associated with the importer.

Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. Qt 5.0-snapshot
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD.
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP !
 
 
 
 
Partenaires

Hébergement Web