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  ·  Toutes les fonctions  ·  Vues d'ensemble  · 

QOrganizerManager Class Reference

The QOrganizerManager class provides an interface which allows clients with access to organizer item information stored in a particular backend. More...

 #include <QOrganizerManager>

Inherits: QObject.

This class was introduced in Qt Mobility 1.1.

Public Types

enum Error { NoError, DoesNotExistError, AlreadyExistsError, InvalidDetailError, ..., TimeoutError }
enum ManagerFeature { MutableDefinitions, ChangeLogs, Anonymous }

Public Functions

QOrganizerManager ( const QString & managerName = QString(), const QMap<QString, QString> & parameters = 0, QObject * parent = 0 )
QOrganizerManager ( const QString & managerName, int implementationVersion, const QMap<QString, QString> & parameters = 0, QObject * parent = 0 )
QOrganizerManager ( QObject * parent )
~QOrganizerManager ()
QOrganizerCollection collection ( const QOrganizerCollectionId & collectionId ) const
QList<QOrganizerCollection> collections () const
QOrganizerCollection compatibleCollection ( const QOrganizerCollection & original ) const
QOrganizerItem compatibleItem ( const QOrganizerItem & original ) const
QOrganizerCollection defaultCollection () const
QOrganizerItemDetailDefinition detailDefinition ( const QString & definitionName, const QString & organizeritemType ) const
QMap<QString, QOrganizerItemDetailDefinition> detailDefinitions ( const QString & organizeritemType ) const
QOrganizerManager::Error error () const
QMap<int, QOrganizerManager::Error> errorMap () const
bool hasFeature ( QOrganizerManager::ManagerFeature feature, const QString & organizeritemType = QOrganizerItemType::TypeEvent ) const
bool isFilterSupported ( const QOrganizerItemFilter & filter ) const
QOrganizerItem item ( const QOrganizerItemId & itemId, const QOrganizerItemFetchHint & fetchHint = QOrganizerItemFetchHint() ) const
QList<QOrganizerItemId> itemIds ( const QOrganizerItemFilter & filter = QOrganizerItemFilter(), const QList<QOrganizerItemSortOrder> & sortOrders = QList<QOrganizerItemSortOrder> () ) const
QList<QOrganizerItemId> itemIds ( const QDateTime & startDate, const QDateTime & endDate, const QOrganizerItemFilter & filter = QOrganizerItemFilter(), const QList<QOrganizerItemSortOrder> & sortOrders = QList<QOrganizerItemSortOrder> () ) const
QList<QOrganizerItem> itemOccurrences ( const QOrganizerItem & parentItem, const QDateTime & periodStart = QDateTime(), const QDateTime & periodEnd = QDateTime(), int maxCount = -1, const QOrganizerItemFetchHint & fetchHint = QOrganizerItemFetchHint() ) const
QList<QOrganizerItem> items ( const QOrganizerItemFilter & filter = QOrganizerItemFilter(), const QList<QOrganizerItemSortOrder> & sortOrders = QList<QOrganizerItemSortOrder> (), const QOrganizerItemFetchHint & fetchHint = QOrganizerItemFetchHint() ) const
QList<QOrganizerItem> items ( const QDateTime & startDate, const QDateTime & endDate, const QOrganizerItemFilter & filter = QOrganizerItemFilter(), const QList<QOrganizerItemSortOrder> & sortOrders = QList<QOrganizerItemSortOrder> (), const QOrganizerItemFetchHint & fetchHint = QOrganizerItemFetchHint() ) const
QList<QOrganizerItem> items ( const QDateTime & startDate, const QDateTime & endDate, int maxCount, const QOrganizerItemFilter & filter = QOrganizerItemFilter(), const QOrganizerItemFetchHint & fetchHint = QOrganizerItemFetchHint() ) const
QList<QOrganizerItem> itemsForExport ( const QDateTime & startDate = QDateTime(), const QDateTime & endDate = QDateTime(), const QOrganizerItemFilter & filter = QOrganizerItemFilter(), const QList<QOrganizerItemSortOrder> & sortOrders = QList<QOrganizerItemSortOrder> (), const QOrganizerItemFetchHint & fetchHint = QOrganizerItemFetchHint() ) const
QString managerName () const
QMap<QString, QString> managerParameters () const
QString managerUri () const
int managerVersion () const
bool removeCollection ( const QOrganizerCollectionId & collectionId )
bool removeDetailDefinition ( const QString & definitionName, const QString & organizeritemType )
bool removeItem ( const QOrganizerItemId & itemId )
bool removeItems ( const QList<QOrganizerItemId> & organizeritemIds )
bool saveCollection ( QOrganizerCollection * collection )
bool saveDetailDefinition ( const QOrganizerItemDetailDefinition & def, const QString & organizeritemType )
bool saveItem ( QOrganizerItem * item )
bool saveItems ( QList<QOrganizerItem> * items )
bool saveItems ( QList<QOrganizerItem> * items, const QStringList & definitionMask )
QStringList supportedItemTypes () const
  • 29 public functions inherited from QObject

Signals

void collectionsAdded ( const QList<QOrganizerCollectionId> & collectionIds )
void collectionsChanged ( const QList<QOrganizerCollectionId> & collectionIds )
void collectionsRemoved ( const QList<QOrganizerCollectionId> & collectionIds )
void dataChanged ()
void itemsAdded ( const QList<QOrganizerItemId> & itemIds )
void itemsChanged ( const QList<QOrganizerItemId> & itemIds )
void itemsRemoved ( const QList<QOrganizerItemId> & itemIds )

Static Public Members

QStringList availableManagers ()
QString buildUri ( const QString & managerName, const QMap<QString, QString> & params, int implementationVersion = -1 )
QList<QOrganizerItemId> extractIds ( const QList<QOrganizerItem> & items )
QOrganizerManager * fromUri ( const QString & storeUri, QObject * parent = 0 )
bool parseUri ( const QString & uri, QString * pManagerId, QMap<QString, QString> * pParams )
  • 4 static public members inherited from QObject

Additional Inherited Members

  • 1 property inherited from QObject
  • 1 public slot inherited from QObject
  • 1 public variable inherited from QObject
  • 7 protected functions inherited from QObject
  • 2 protected variables inherited from QObject

Detailed Description

The QOrganizerManager class provides an interface which allows clients with access to organizer item information stored in a particular backend.

This class provides an abstraction of a datastore or aggregation of datastores which contains organizer item information. It provides methods to retrieve and manipulate organizer item information, collection information and supported schema definitions. It also provides metadata and error information reporting.

The functions provided by QOrganizerManager are purely synchronous; to access the same functionality in an asynchronous manner, clients should use the use-case-specific classes derived from QOrganizerAbstractRequest.

Some functionality provided by QOrganizerManager directly is not accessible using the asynchronous API; see the synchronous and asynchronous API information from the organizer module API documentation.

Member Type Documentation

enum QOrganizerManager::Error

This enum specifies an error that occurred during the most recent operation:

ConstantValueDescription
QOrganizerManager::NoError0The most recent operation was successful
QOrganizerManager::DoesNotExistError1The most recent operation failed because the requested organizer item or detail definition does not exist
QOrganizerManager::AlreadyExistsError2The most recent operation failed because the specified organizer item or detail definition already exists
QOrganizerManager::InvalidDetailError3The most recent operation failed because the specified organizer detail definition already exists
QOrganizerManager::LockedError4The most recent operation failed because the datastore specified is currently locked
QOrganizerManager::DetailAccessError5The most recent operation failed because a detail was modified or removed and its access method does not allow that
QOrganizerManager::PermissionsError6The most recent operation failed because the caller does not have permission to perform the operation
QOrganizerManager::OutOfMemoryError7The most recent operation failed due to running out of memory
QOrganizerManager::NotSupportedError8The most recent operation failed because the requested operation is not supported in the specified store
QOrganizerManager::BadArgumentError9The most recent operation failed because one or more of the parameters to the operation were invalid
QOrganizerManager::UnspecifiedError10The most recent operation failed for an undocumented reason
QOrganizerManager::VersionMismatchError11The most recent operation failed because the backend of the manager is not of the required version
QOrganizerManager::LimitReachedError12The most recent operation failed because the limit for that type of object has been reached
QOrganizerManager::InvalidItemTypeError13The most recent operation failed because the item given was of an invalid type for the operation
QOrganizerManager::InvalidCollectionError14The most recent operation failed because the collection is invalid
QOrganizerManager::InvalidOccurrenceError15The most recent operation failed because it was an attempt to save an occurrence without a correct InstanceOrigin detail
QOrganizerManager::TimeoutError16The most recent operation failed because it took longer than expected. It may be possible to try again.

enum QOrganizerManager::ManagerFeature

This enum describes the possible features that a particular manager may support

ConstantValueDescription
QOrganizerManager::MutableDefinitions0The manager supports saving, updating or removing detail definitions. Some built-in definitions may still be immutable
QOrganizerManager::ChangeLogs2The manager supports reporting of timestamps of changes, and filtering and sorting by those timestamps
QOrganizerManager::Anonymous1The manager is isolated from other managers

This enum was introduced or modified in Qt Mobility 1.1.

Member Function Documentation

QOrganizerManager::QOrganizerManager ( const QString & managerName = QString(), const QMap<QString, QString> & parameters = 0, QObject * parent = 0 )

Constructs a QOrganizerManager whose implementation is identified by managerName with the given parameters.

The parent QObject will be used as the parent of this QOrganizerManager.

If an empty managerName is specified, the default implementation for the platform will be used.

This function was introduced in Qt Mobility 1.1.

QOrganizerManager::QOrganizerManager ( const QString & managerName, int implementationVersion, const QMap<QString, QString> & parameters = 0, QObject * parent = 0 )

Constructs a QOrganizerManager whose backend has the name managerName and version implementationVersion, where the manager is constructed with the provided parameters.

The parent QObject will be used as the parent of this QOrganizerManager.

If an empty managerName is specified, the default implementation for the platform will be instantiated. If the specified implementation version is not available, the manager with the name managerName with the default implementation version is instantiated.

This function was introduced in Qt Mobility 1.1.

QOrganizerManager::QOrganizerManager ( QObject * parent )

Constructs a QOrganizerManager whose parent QObject is parent. The default implementation for the platform will be created.

QOrganizerManager::~QOrganizerManager ()

Frees the memory used by the QOrganizerManager

QStringList QOrganizerManager::availableManagers () [static]

Returns a list of available manager ids that can be used when constructing a QOrganizerManager. If an empty id is specified to the constructor, the first value in this list will be used instead.

This function was introduced in Qt Mobility 1.1.

QString QOrganizerManager::buildUri ( const QString & managerName, const QMap<QString, QString> & params, int implementationVersion = -1 ) [static]

Returns a URI that completely describes a manager implementation, datastore, and the parameters with which to instantiate the manager, from the given managerName, params and an optional implementationVersion

This function was introduced in Qt Mobility 1.1.

QOrganizerCollection QOrganizerManager::collection ( const QOrganizerCollectionId & collectionId ) const

Returns the collection identified by the given collectionId which is managed by this manager.

This function was introduced in Qt Mobility 1.1.

QList<QOrganizerCollection> QOrganizerManager::collections () const

Returns a list of all of the collections managed by this manager.

This function was introduced in Qt Mobility 1.1.

void QOrganizerManager::collectionsAdded ( const QList<QOrganizerCollectionId> & collectionIds ) [signal]

This signal is emitted at some point once the collections identified by collectionIds have been added to a datastore managed by this manager. This signal will not be emitted if the dataChanged() signal was previously emitted for these changes.

This function was introduced in Qt Mobility 1.1.

void QOrganizerManager::collectionsChanged ( const QList<QOrganizerCollectionId> & collectionIds ) [signal]

This signal is emitted at some point once the metadata for the collections identified by collectionIds have been modified in a datastore managed by this manager. This signal is not emitted if one of the items in this collection has changed - itemsChanged() will be emitted instead. This signal will not be emitted if the dataChanged() signal was previously emitted for these changes.

This function was introduced in Qt Mobility 1.1.

void QOrganizerManager::collectionsRemoved ( const QList<QOrganizerCollectionId> & collectionIds ) [signal]

This signal is emitted at some point once the collections identified by collectionIds have been removed from a datastore managed by this manager. This signal will not be emitted if the dataChanged() signal was previously emitted for these changes.

This function was introduced in Qt Mobility 1.1.

QOrganizerCollection QOrganizerManager::compatibleCollection ( const QOrganizerCollection & original ) const

Returns a pruned or modified version of the original organizer collection which is valid and can be saved in the manager. The returned organizer collection might have meta data removed or arbitrarily changed.

This function was introduced in Qt Mobility 1.1.

QOrganizerItem QOrganizerManager::compatibleItem ( const QOrganizerItem & original ) const

Returns a pruned or modified version of the original organizer item which is valid and can be saved in the manager. The returned organizer item might have entire details removed or arbitrarily changed.

This function was introduced in Qt Mobility 1.1.

void QOrganizerManager::dataChanged () [signal]

This signal is emitted by the manager if its internal state changes, and it is unable to determine the changes which occurred, or if the manager considers the changes to be radical enough to require clients to reload all data. If this signal is emitted, no other signals will be emitted for the associated changes.

This function was introduced in Qt Mobility 1.1.

QOrganizerCollection QOrganizerManager::defaultCollection () const

Returns the id of the default collection managed by this manager

This function was introduced in Qt Mobility 1.1.

QOrganizerItemDetailDefinition QOrganizerManager::detailDefinition ( const QString & definitionName, const QString & organizeritemType ) const

Returns the definition identified by the given definitionName that is valid for the organizer items whose type is the given organizeritemType in this store, or a default-constructed QOrganizerItemDetailDefinition if no such definition exists

This function was introduced in Qt Mobility 1.1.

QMap<QString, QOrganizerItemDetailDefinition> QOrganizerManager::detailDefinitions ( const QString & organizeritemType ) const

Returns a map of identifier to detail definition for the registered detail definitions for items whose type is the given organizeritemType which are valid for the organizer items in this store

This function was introduced in Qt Mobility 1.1.

QOrganizerManager::Error QOrganizerManager::error () const

Return the error code of the most recent operation

This function was introduced in Qt Mobility 1.1.

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

Returns per-input error codes for the most recent operation. This function only returns meaningful information if the most recent operation was a batch operation. Each key in the map is the index of the element in the input list for which the error (whose error code is stored in the value for that key in the map) occurred during the batch operation.

This function was introduced in Qt Mobility 1.1.

See also error(), saveItems(), and removeItems().

QList<QOrganizerItemId> QOrganizerManager::extractIds ( const QList<QOrganizerItem> & items ) [static]

Return a list of QOrganizerItemId extracted from the items

This function was introduced in Qt Mobility 1.1.

QOrganizerManager * QOrganizerManager::fromUri ( const QString & storeUri, QObject * parent = 0 ) [static]

Constructs a QOrganizerManager whose implementation, store and parameters are specified in the given storeUri, and whose parent object is parent.

This function was introduced in Qt Mobility 1.1.

bool QOrganizerManager::hasFeature ( QOrganizerManager::ManagerFeature feature, const QString & organizeritemType = QOrganizerItemType::TypeEvent ) const

Returns true if the given feature feature is supported by the manager, for the specified type of organizer item organizeritemType

This function was introduced in Qt Mobility 1.1.

bool QOrganizerManager::isFilterSupported ( const QOrganizerItemFilter & filter ) const

Returns true if the given filter is supported natively by the manager, and false if the filter behaviour would be emulated.

Note: In some cases, the behaviour of an unsupported filter cannot be emulated. For example, a filter that requests organizer items that have changed since a given time depends on having that information available. In these cases, the filter will fail.

This function was introduced in Qt Mobility 1.1.

QOrganizerItem QOrganizerManager::item ( const QOrganizerItemId & itemId, const QOrganizerItemFetchHint & fetchHint = QOrganizerItemFetchHint() ) const

Returns the organizer item in the database identified by itemId.

If the organizer item does not exist, an empty, default constructed QOrganizerItem will be returned, and the error returned by error() will be QOrganizerManager::DoesNotExistError.

The fetchHint parameter describes the optimization hints that a manager may take. If the fetchHint is the default constructed hint, all existing details in the matching organizer items will be returned. If a client makes changes to an organizer item which has been retrieved with a fetch hint, they should save it back using a partial save, masked by the same set of detail names in order to avoid information loss.

This function was introduced in Qt Mobility 1.1.

See also QOrganizerItemFetchHint.

QList<QOrganizerItemId> QOrganizerManager::itemIds ( const QOrganizerItemFilter & filter = QOrganizerItemFilter(), const QList<QOrganizerItemSortOrder> & sortOrders = QList<QOrganizerItemSortOrder> () ) const

Returns a list of organizer item ids that match the given filter, sorted according to the given list of sortOrders. Depending on the backend, this filtering operation may involve retrieving all organizer items.

This function was introduced in Qt Mobility 1.1.

QList<QOrganizerItemId> QOrganizerManager::itemIds ( const QDateTime & startDate, const QDateTime & endDate, const QOrganizerItemFilter & filter = QOrganizerItemFilter(), const QList<QOrganizerItemSortOrder> & sortOrders = QList<QOrganizerItemSortOrder> () ) const

Returns a list of organizer item ids of persisted items that match the given filter, sorted according to the given list of sortOrders, for any item which occurs (or has an occurrence which occurs) in the range specified by the given startDate and endDate, inclusive. A default-constructed (invalid) startDate specifies an open start date (matches anything which occurs up until the endDate), and a default-constructed (invalid) endDate specifies an open end date (matches anything which occurs after the startDate). If both the startDate and endDate are invalid, this function will return the ids of all items which match the filter criteria. Depending on the backend, this filtering operation may involve retrieving all organizer items.

This function was introduced in Qt Mobility 1.1.

QList<QOrganizerItem> QOrganizerManager::itemOccurrences ( const QOrganizerItem & parentItem, const QDateTime & periodStart = QDateTime(), const QDateTime & periodEnd = QDateTime(), int maxCount = -1, const QOrganizerItemFetchHint & fetchHint = QOrganizerItemFetchHint() ) const

Return the list of a maximum of maxCount organizer item instances which are occurrences of the given parentItem recurring item, which occur between the given periodStart date and the given periodEnd date, inclusive.

If periodStart is after periodEnd, the operation will fail. If maxCount is negative, it is backend specific as to how many occurrences will be returned. Some backends may return no instances, others may return some limited number of occurrences.

The fetchHint allows clients to specify which pieces of information they are interested or not interested in, to allow backends to optimise data retrieval if possible. Note that it is simply a hint; backends can ignore the fetchHint, but if they do so they must return the full item.

This function was introduced in Qt Mobility 1.1.

QList<QOrganizerItem> QOrganizerManager::items ( const QOrganizerItemFilter & filter = QOrganizerItemFilter(), const QList<QOrganizerItemSortOrder> & sortOrders = QList<QOrganizerItemSortOrder> (), const QOrganizerItemFetchHint & fetchHint = QOrganizerItemFetchHint() ) const

Returns a list of organizer items that match the given filter, sorted according to the given list of sortOrders.

This function will return both persisted and generated occurrences of items which match the specified filter.

Depending on the manager implementation, this filtering operation might be slow and involve retrieving all organizer items and testing them against the supplied filter - see the isFilterSupported() function.

The fetchHint parameter describes the optimization hints that a manager may take. If the fetchHint is the default constructed hint, all existing details in the matching organizer items will be returned. If a client makes changes to an organizer item which has been retrieved with a fetch hint, they should save it back using a partial save, masked by the same set of detail names in order to avoid information loss.

This function was introduced in Qt Mobility 1.1.

See also QOrganizerItemFetchHint.

QList<QOrganizerItem> QOrganizerManager::items ( const QDateTime & startDate, const QDateTime & endDate, const QOrganizerItemFilter & filter = QOrganizerItemFilter(), const QList<QOrganizerItemSortOrder> & sortOrders = QList<QOrganizerItemSortOrder> (), const QOrganizerItemFetchHint & fetchHint = QOrganizerItemFetchHint() ) const

Returns a list of organizer items that match the given filter, sorted according to the given list of sortOrders, for any item or occurrence of an item which occurs in the range specified by the given startDate and endDate, inclusive. A default-constructed (invalid) startDate specifies an open start date (matches anything which occurs up until the endDate), and a default-constructed (invalid) endDate specifies an open end date (matches anything which occurs after the startDate). If both the startDate and endDate are invalid, this function will return all items which match the filter criteria.

This function will return both persisted and generated occurrences of items which match the specified criteria.

Depending on the manager implementation, this filtering operation might be slow and involve retrieving all organizer items and testing them against the supplied filter - see the isFilterSupported() function.

If no sort order is provided, the list is returned sorted by date.

The fetchHint parameter describes the optimization hints that a manager may take. If the fetchHint is the default constructed hint, all existing details in the matching organizer items will be returned. If a client makes changes to an organizer item which has been retrieved with a fetch hint, they should save it back using a partial save, masked by the same set of detail names in order to avoid information loss.

This function was introduced in Qt Mobility 1.1.

See also QOrganizerItemFetchHint.

QList<QOrganizerItem> QOrganizerManager::items ( const QDateTime & startDate, const QDateTime & endDate, int maxCount, const QOrganizerItemFilter & filter = QOrganizerItemFilter(), const QOrganizerItemFetchHint & fetchHint = QOrganizerItemFetchHint() ) const

Returns a list of organizer items in the range specified by the given startDate and endDate, inclusive. The list will contain the first maxCount such items which match the given filter. A default-constructed (invalid) startDate specifies an open start date (matches anything which occurs up until the endDate), and a default-constructed (invalid) endDate specifies an open end date (matches anything which occurs after the startDate). The list is sorted by date.

This function will return both persisted and generated occurrences of items which match the specified criteria.

Depending on the manager implementation, this filtering operation might be slow and involve retrieving all organizer items and testing them against the supplied filter - see the isFilterSupported() function.

The fetchHint parameter describes the optimization hints that a manager may take. If the fetchHint is the default constructed hint, all existing details in the matching organizer items will be returned. If a client makes changes to an organizer item which has been retrieved with a fetch hint, they should save it back using a partial save, masked by the same set of detail names in order to avoid information loss.

This function was introduced in Qt Mobility 1.2.

See also QOrganizerItemFetchHint.

void QOrganizerManager::itemsAdded ( const QList<QOrganizerItemId> & itemIds ) [signal]

This signal is emitted at some point once the items identified by itemIds have been added to a datastore managed by this manager. This signal will not be emitted if the dataChanged() signal was previously emitted for these changes.

This function was introduced in Qt Mobility 1.1.

void QOrganizerManager::itemsChanged ( const QList<QOrganizerItemId> & itemIds ) [signal]

This signal is emitted at some point once the items identified by itemIds have been modified in a datastore managed by this manager. This signal will not be emitted if the dataChanged() signal was previously emitted for these changes.

This function was introduced in Qt Mobility 1.1.

QList<QOrganizerItem> QOrganizerManager::itemsForExport ( const QDateTime & startDate = QDateTime(), const QDateTime & endDate = QDateTime(), const QOrganizerItemFilter & filter = QOrganizerItemFilter(), const QList<QOrganizerItemSortOrder> & sortOrders = QList<QOrganizerItemSortOrder> (), const QOrganizerItemFetchHint & fetchHint = QOrganizerItemFetchHint() ) const

Returns a list of organizer items that match the given filter, sorted according to the given list of sortOrders, for any item which occurs (or has an occurrence which occurs) in the range specified by the given startDate and endDate, inclusive. A default-constructed (invalid) startDate specifies an open start date (matches anything which occurs up until the endDate), and a default-constructed (invalid) endDate specifies an open end date (matches anything which occurs after the startDate). If both the startDate and endDate are invalid, this function will return all items which match the filter criteria.

This function will only return parent items and persisted exceptions which match the specified criteria; not generated occurrences.

Depending on the manager implementation, this filtering operation might be slow and involve retrieving all organizer items and testing them against the supplied filter - see the isFilterSupported() function.

The fetchHint parameter describes the optimization hints that a manager may take. If the fetchHint is the default constructed hint, all existing details in the matching organizer items will be returned. If a client makes changes to an organizer item which has been retrieved with a fetch hint, they should save it back using a partial save, masked by the same set of detail names in order to avoid information loss.

This function was introduced in Qt Mobility 1.1.

See also QOrganizerItemFetchHint.

void QOrganizerManager::itemsRemoved ( const QList<QOrganizerItemId> & itemIds ) [signal]

This signal is emitted at some point once the items identified by itemIds have been removed from a datastore managed by this manager. This signal will not be emitted if the dataChanged() signal was previously emitted for these changes.

This function was introduced in Qt Mobility 1.1.

QString QOrganizerManager::managerName () const

Returns the manager name for this QOrganizerManager

This function was introduced in Qt Mobility 1.1.

QMap<QString, QString> QOrganizerManager::managerParameters () const

Return the parameters relevant to the creation of this QOrganizerManager

This function was introduced in Qt Mobility 1.1.

QString QOrganizerManager::managerUri () const

Return the uri describing this QOrganizerManager, consisting of the manager name and any parameters.

This function was introduced in Qt Mobility 1.1.

int QOrganizerManager::managerVersion () const

Returns the engine backend implementation version number

This function was introduced in Qt Mobility 1.1.

bool QOrganizerManager::parseUri ( const QString & uri, QString * pManagerId, QMap<QString, QString> * pParams ) [static]

Splits the given uri into the manager, store, and parameters that it describes, and places the information into the memory addressed by pManagerId and pParams respectively. Returns true if uri could be split successfully, otherwise returns false

This function was introduced in Qt Mobility 1.1.

bool QOrganizerManager::removeCollection ( const QOrganizerCollectionId & collectionId )

Removes the collection identified by the given collectionId (and all items in the collection) from the manager if the given collectionId exists. Returns true on success, false on failure.

Attempting to remove the default collection will fail and calling error() will return QOrganizerManager::PermissionsError.

This function was introduced in Qt Mobility 1.1.

bool QOrganizerManager::removeDetailDefinition ( const QString & definitionName, const QString & organizeritemType )

Removes the detail definition identified by definitionName from the database, which is valid for organizer items whose type is the given organizeritemType. Returns true if the definition was removed successfully, otherwise returns false

This function was introduced in Qt Mobility 1.1.

bool QOrganizerManager::removeItem ( const QOrganizerItemId & itemId )

Remove the organizer item identified by itemId from the database. Returns true if the organizer item was removed successfully, otherwise returns false.

This function was introduced in Qt Mobility 1.1.

bool QOrganizerManager::removeItems ( const QList<QOrganizerItemId> & organizeritemIds )

Remove every organizer item whose id is contained in the list of organizer item ids organizeritemIds. Returns true if all organizer items were removed successfully, otherwise false.

Calling errorMap() will return the per-input errors for the latest batch function. The QOrganizerManager::error() function will only return QOrganizerManager::NoError if all organizer items were removed successfully.

If the given list of organizer item ids organizeritemIds is empty, the function will return false and calling error() will return QOrganizerManager::BadArgumentError. If the list is non-empty and contains ids which do not identify a valid organizer item in the manager, the function will remove any organizer items which are identified by ids in the organizeritemIds list, insert QOrganizerManager::DoesNotExist entries into the error map for the indices of invalid ids in the organizeritemIds list, return false, and set the overall operation error to QOrganizerManager::DoesNotExistError.

This function was introduced in Qt Mobility 1.1.

See also QOrganizerManager::removeItem().

bool QOrganizerManager::saveCollection ( QOrganizerCollection * collection )

Saves the given collection in the manager. Returns true on success, false on failure.

Some managers do not allow modifications to collections, and thus attempting to save a collection will always fail when attempted in such a manager.

Some managers do not allow adding new collections, and thus attempting to save a new collection will always fail when attempted in such a manager.

Some managers provide front-ends to read-only datastores, and attempting to save a new collection in such a manager will always fail.

Most managers will require a valid value for the QOrganizerCollection::KeyName meta data key to be set in a collection, before the collection can be saved correctly. Clients can call compatibleCollection() to retrieve a pruned or updated version of the collection which is compatible with the manager.

This function was introduced in Qt Mobility 1.1.

See also compatibleCollection().

bool QOrganizerManager::saveDetailDefinition ( const QOrganizerItemDetailDefinition & def, const QString & organizeritemType )

Persists the given definition def in the database, which is valid for organizer items whose type is the given organizeritemType. Returns true if the definition was saved successfully, otherwise returns false

This function was introduced in Qt Mobility 1.1.

bool QOrganizerManager::saveItem ( QOrganizerItem * item )

Adds the given item to the database if item has a default-constructed id, or an id with the manager URI set to the URI of this manager and a id of zero. It will be saved in the collection whose id is reported by calling item->collectionId() if the specified collection exists, or if no collectionId is specified in the item, or the collectionId is the default collection id, it will be saved in the collection in which the item is currently saved (if it is not a new item) or in the default collection (if it is a new item). As such, an item may be moved between collections with this save operation.

If the manager URI of the id of the item is neither empty nor equal to the URI of this manager, or id of the item is non-zero but does not exist in the manager, the operation will fail and calling error() will return QOrganizerManager::DoesNotExistError.

Alternatively, the function will update the existing organizer item in the database if item has a non-zero id and currently exists in the database.

If the item contains one or more details whose definitions have not yet been saved with the manager, the operation will fail and calling error() will return QOrganizerManager::UnsupportedError.

Returns false on failure, or true on success. On successful save of an organizer item with a null id, its id will be set to a new, valid id with the manager URI set to the URI of this manager, and the id set to a new, valid id. On successful save of an organizer item with a null collection id, the collection id will be set to the id of the default collection of the manager. The manager is not required to fetch updated details of the organizer item on save, and as such, clients should fetch an organizer item if they want the most up-to-date information by calling QOrganizerManager::item().

This function was introduced in Qt Mobility 1.1.

See also managerUri().

bool QOrganizerManager::saveItems ( QList<QOrganizerItem> * items )

Adds the list of organizer items given by items list to the database. Each item in the list will be saved in the collection whose id is reported by calling item->collectionId() if the specified collection exists. If no collectionId is specified in the item, or if the collectionId is the default collection id, it will be saved in the collection in which the item is currently saved (if it is not a new item) or in the default collection (if it is a new item). As such, an item may be moved between collections with this save operation. Returns true if the organizer items were saved successfully, otherwise false.

Calling errorMap() will return the per-input errors for the latest batch function. The QOrganizerManager::error() function will only return QOrganizerManager::NoError if all organizer items were saved successfully.

For each newly saved organizer item that was successful, the id of the organizer item in the items list will be updated with the new value.

This function was introduced in Qt Mobility 1.1.

See also QOrganizerManager::saveItem().

bool QOrganizerManager::saveItems ( QList<QOrganizerItem> * items, const QStringList & definitionMask )

Adds the list of organizer items given by items list to the database. Each item in the list will be saved in the collection whose id is reported by calling item->collectionId() if the specified collection exists. If no collectionId is specified in the item, or if the collectionId is the default collection id, it will be saved in the collection in which the item is currently saved (if it is not a new item) or in the default collection (if it is a new item). As such, an item may be moved between collections with this save operation. Returns true if the organizer items were saved successfully, otherwise false.

This function accepts a definitionMask, which specifies which details of the items should be updated. Details with definition names not included in the definitionMask will not be updated or added.

Calling errorMap() will return the per-input errors for the latest batch function. The QOrganizerManager::error() function will only return QOrganizerManager::NoError if all organizer items were saved successfully.

For each newly saved organizer item that was successful, the id of the organizer item in the items list will be updated with the new value.

This function was introduced in Qt Mobility 1.2.

See also QOrganizerManager::saveItem().

QStringList QOrganizerManager::supportedItemTypes () const

Returns the list of organizer item types which are supported by this manager. This is a convenience function, equivalent to retrieving the allowable values for the QOrganizerItemType::FieldType field of the QOrganizerItemType definition which is valid in this manager.

This function was introduced in Qt Mobility 1.1.

Publicité

Best Of

Actualités les plus lues

Semaine
Mois
Année
  1. « Quelque chose ne va vraiment pas avec les développeurs "modernes" », un développeur à "l'ancienne" critique la multiplication des bibliothèques 65
  2. Apercevoir la troisième dimension ou l'utilisation multithreadée d'OpenGL dans Qt, un article des Qt Quarterly traduit par Guillaume Belz 0
  3. Les développeurs ignorent-ils trop les failles découvertes dans leur code ? Prenez-vous en compte les remarques des autres ? 17
  4. BlackBerry 10 : premières images du prochain OS de RIM qui devrait intégrer des widgets et des tuiles inspirées de Windows Phone 0
  5. Quelles nouveautés de C++11 Visual C++ doit-il rapidement intégrer ? Donnez-nous votre avis 10
  6. Adieu qmake, bienvenue qbs : Qt Building Suite, un outil déclaratif et extensible pour la compilation de projets Qt 17
  7. La rubrique Qt a besoin de vous ! 1
Page suivante

Le Qt Developer Network au hasard

Logo

Applications mobiles modernes avec Qt et QML

Le Qt Developer Network est un réseau de développeurs Qt anglophone, où ils peuvent partager leur expérience sur le framework. Lire l'article.

Communauté

Ressources

Liens utiles

Contact

  • Vous souhaitez rejoindre la rédaction ou proposer un tutoriel, une traduction, une question... ? Postez dans le forum Contribuez ou contactez-nous par MP ou par email (voir en bas de page).

Qt dans le magazine

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 qtmobility-1.2
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