The QOrganizerCollection class represents a collection of items in a manager. More...
#include <QOrganizerCollection>
This class was introduced in Qt Mobility 1.1.
QOrganizerCollection () | |
QOrganizerCollection ( const QOrganizerCollection & other ) | |
~QOrganizerCollection () | |
QOrganizerCollectionId | id () const |
QVariantMap | metaData () const |
QVariant | metaData ( const QString & key ) const |
void | setId ( const QOrganizerCollectionId & id ) |
void | setMetaData ( const QVariantMap & metaData ) |
void | setMetaData ( const QString & key, const QVariant & value ) |
bool | operator!= ( const QOrganizerCollection & other ) const |
QOrganizerCollection & | operator= ( const QOrganizerCollection & other ) |
bool | operator== ( const QOrganizerCollection & other ) const |
const QLatin1Constant | KeyColor |
const QLatin1Constant | KeyDescription |
const QLatin1Constant | KeyImage |
const QLatin1Constant | KeyName |
The QOrganizerCollection class represents a collection of items in a manager.
A collection has an id and optionally some metadata, and contains zero or more items. Each different manager will have different requirements before a collection may be saved in it. Some managers do not allow collections to be saved at all, while others may require a collection to have some minimal amount of meta data defined in it prior to save. For example, most managers require a valid value for the QOrganizerCollection::KeyName meta data key to be set prior to save.
Every QOrganizerItem is contained within a collection when stored in a manager. To save an item in a collection, the client should call QOrganizerItem::setCollectionId() on the item, passing in the id of the destination collection as the argument, and then save the item in the manager. To move an item from one collection to another, the client must fetch the item from the manager, set the collection id in the item to the id of the collection to which the client wishes the item to be moved, and then resave the item in the manager. That is, the collection which an item is part of is treated as a property of the item.
Constructs a new collection
Constructs a new copy of the other collection
This function was introduced in Qt Mobility 1.1.
Cleans up any memory in use by the collection
Returns the complete id of the collection, which includes the manager uri and the manager id of the collection
This function was introduced in Qt Mobility 1.1.
See also setId().
Returns the meta data of the collection
This function was introduced in Qt Mobility 1.1.
See also setMetaData().
Returns the meta data of the collection for the given key
This function was introduced in Qt Mobility 1.1.
Sets the id of the collection to id. If the id is set to a null (default-constructed) id, saving the collection will cause the manager to save the collection as a new collection (if it supports that operation).
This function was introduced in Qt Mobility 1.1.
See also id().
Sets the meta data of the collection to metaData. Not all managers support arbitrary meta data for collections. You can see whether the meta data is compatible with the manager by calling QOrganizerManager::compatibleCollection(). Attempting to save a collection with unsupported meta data in a manager will cause an error in the operation.
This function was introduced in Qt Mobility 1.1.
See also metaData().
Sets the meta data of the collection for the given key to the given value. Not all managers support all of the standard meta data keys (see QOrganizerCollection), and some will support extra or even arbitrary keys. Similarly, not all managers support all possible data types for the meta data value. Attempting to save a collection with unsupported meta data in a manager will cause an error in the operation.
This function was introduced in Qt Mobility 1.1.
Returns true if the id of the collection is not the same as that of the other collection. Does not check that the metadata of the collections is not equal.
This function was introduced in Qt Mobility 1.1.
Assigns this collection to be equal to the other collection
This function was introduced in Qt Mobility 1.1.
Returns true if the id of the collection is the same as that of the other collection. Does not check that the metadata of the collections is equal.
This function was introduced in Qt Mobility 1.1.
The constant key value which identifies the color meta data of a collection.
The constant key value which identifies the description meta data of a collection.
The constant key value which identifies the image meta data of a collection.
The constant key value which identifies the name meta data of a collection.