QtMobility Reference Documentation

QOrganizerItemSaveRequest Class Reference

The QOrganizerItemSaveRequest class allows a client to asynchronously request that certain organizer items be saved to an organizer item store. More...

 #include <QOrganizerItemSaveRequest>

Inherits: QOrganizerAbstractRequest.

This class was introduced in Qt Mobility 1.1.

Public Functions

QOrganizerItemSaveRequest ( QObject * parent = 0 )
~QOrganizerItemSaveRequest ()
QStringList definitionMask () const
QMap<int, QOrganizerManager::Error> errorMap () const
QList<QOrganizerItem> items () const
void setDefinitionMask ( const QStringList & definitionMask )
void setItem ( const QOrganizerItem & organizeritem )
void setItems ( const QList<QOrganizerItem> & organizeritems )

Additional Inherited Members

Detailed Description

The QOrganizerItemSaveRequest class allows a client to asynchronously request that certain organizer items be saved to an organizer item store.

For a QOrganizerItemSaveRequest, the resultsAvailable() signal will be emitted when either the individual item errors (which may be retrieved by calling errorMap()), or the resultant organizer items (which may be retrieved by calling items()), are updated, as well as if the overall operation error (which may be retrieved by calling error()) is updated.

Member Function Documentation

QOrganizerItemSaveRequest::QOrganizerItemSaveRequest ( QObject * parent = 0 )

Constructs a new organizer item save request whose parent is the specified parent

QOrganizerItemSaveRequest::~QOrganizerItemSaveRequest ()

Frees memory in use by this request

This function was introduced in Qt Mobility 1.2.

QStringList QOrganizerItemSaveRequest::definitionMask () const

Returns the list of definitions that this request will operate on.

If the list is empty, the request will operate on all details.

This function was introduced in Qt Mobility 1.2.

See also setDefinitionMask().

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

Returns the map of input definition list indices to errors which occurred

This function was introduced in Qt Mobility 1.1.

QList<QOrganizerItem> QOrganizerItemSaveRequest::items () const

Returns the list of organizer items which will be saved if called prior to calling start(), otherwise returns the list of organizer items as they were saved in the organizer item store

This function was introduced in Qt Mobility 1.1.

See also setItems().

void QOrganizerItemSaveRequest::setDefinitionMask ( const QStringList & definitionMask )

Set the list of definitions to restrict saving to definitionMask. This allows you to perform partial save (and remove) operations on existing items.

If definitionMask is empty (the default), no restrictions will apply, and the passed in items will be saved as is. Otherwise, only details whose definitions are in the list will be saved. If a definition name is present in the list, but there are no corresponding details in the item passed into this request, any existing details in the manager for that item will be removed.

This is useful if you've used a fetch hint to fetch a partial item from a manager so that you can save changes to the details you actually fetched without removing the details you didn't.

Additionally, when performing synchronization operations with other managers that don't support the full range of details, you can restrict the update operation to only those details so that you don't lose the extra details that are supported in this manager.

Note: Some managers do not support partial updates natively, in which case the QtOrganizer framework will emulate the functionality (fetching the whole item, applying the new restricted details, and saving the item back).

This function was introduced in Qt Mobility 1.2.

See also definitionMask().

void QOrganizerItemSaveRequest::setItem ( const QOrganizerItem & organizeritem )

Sets the organizer item to be saved to organizeritem. Equivalent to calling:

 setOrganizerItems(QList<QOrganizerItem>() << organizeritem);

This function was introduced in Qt Mobility 1.1.

void QOrganizerItemSaveRequest::setItems ( const QList<QOrganizerItem> & organizeritems )

Sets the list of organizer items to be saved to organizeritems

This function was introduced in Qt Mobility 1.1.

See also items().

X

Thank you for giving your feedback.

Make sure it is related to this specific page. For more general bugs and requests, please use the Qt Bug Tracker.