QOrganizerCollection ClassThe QOrganizerCollection class represents a collection of items in a manager. More... #include <QOrganizerCollection>
Public Types
Public Functions
Related Non-Members
Detailed DescriptionThe 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. Member Type Documentation
|
Constant | Value | Description |
---|---|---|
QOrganizerCollection::KeyName | 0 | This metadata describes the name of the collection. |
QOrganizerCollection::KeyDescription | 1 | This metadata gives a description of the collection. |
QOrganizerCollection::KeyColor | 2 | This metadata describes the color of the collection. |
QOrganizerCollection::KeyImage | 3 | This metadata describes the image of the collection. |
QOrganizerCollection::KeyExtended | 4 | This is an extened metadata, which is stored as a QVariantMap. |
Constructs a new collection.
Constructs a new copy of the other collection.
Cleans up any memory in use by the collection.
Returns the value of extended metadata with the given key.
See also setExtendedMetaData().
Returns the ID of the collection.
See also setId().
Returns the meta data of the collection for the given key.
See also setMetaData().
Returns the meta data of the collection.
Sets the value of the extended metadata with the given key to value.
See also extendedMetaData().
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.
See also id().
Sets the meta data of the collection for the given key to the given value.
See also metaData().
Sets the metadata of the collection to be metaData.
Returns true if the collection is not the same as the other collection.
Assigns this collection to be equal to the other collection.
Returns true if the collection is the same as that of the other collection, false if either the ID or any of the stored metadata are not the same.
Streams the collection to the given debug stream dbg, and returns the stream.