QOrganizerItemDetail ClassThe QOrganizerItemDetail class represents a single, complete detail about an organizer item. More... #include <QOrganizerItemDetail> Inherited by: QOrganizerItemParent. Public Types
Public Functions
Related Non-Members
Detailed DescriptionThe QOrganizerItemDetail class represents a single, complete detail about an organizer item. All of the information for an organizer item is stored in one or more QOrganizerItemDetail objects. A detail is a group of logically related bits of data - for example, a QOrganizerItemTimestamp is a single detail that has multiple fields (timestamp of creation, timestamp of last update, etc). Different organizer managers may support different details for different item types, e.g. certain manager may not support the timestamp, while others do. In general, QOrganizerItemDetail and the built in subclasses (like QOrganizerEventTime) provide convenience and standardized access to values. For example, QOrganizerEventTime provides a convenient API for manipulating a QOrganizerItemDetail to describe the start and end time of an event. Subclasses also provide constants for the names of fields (like QOrganizerEventTime::FieldStartDateTime). Typically the constants for field names start with Field, and the constants for predefined values of a field start with the name of that field (e.g. TypeEvent is a predefined constant for FieldType). QOrganizerItemDetail objects act like type checked values. In general, you can assign them to and fro and have reasonable behaviour, like the following example. QOrganizerItemDescription description; description.setDescription("Some descriptive text"); // description.value(QOrganizerItemDescription::FieldDescription) == "Some descriptive text"; // description.type() == QOrganizerItemDetail::TypeDescription QOrganizerItemDetail detail = description; // detail.value(QOrganizerItemDescription::FieldDescription) == "Some descriptive text"; // detail.type() == QOrganizerItemDetail::TypeDescription QOrganizerItemDescription otherDescription = detail; // otherDescription.description() == "Some descriptive text"; // otherDescription.type() == QOrganizerItemDetail::TypeDescription QOrganizerItemDisplayLabel label = detail; // label is now a default constructed QOrganizerItemDisplayLabel // label.value(QOrganizerItemDescription::FieldDescription) is empty // label.type() == QOrganizerItemDetail::TypeDisplayLabel QOrganizerItemDisplayLabel otherLabel = description; // otherLabel is now a default constructed QOrganizerItemDisplayLabel // otherLabel.value(QOrganizerItemDescription::FieldDescription) is empty // otherLabel.type() == QOrganizerItemDetail::TypeDisplayLabel See also QOrganizerItem, QOrganizerItemDetailFilter, and QOrganizerItemDetailRangeFilter. Member Type Documentation
|
Constant | Value | Description |
---|---|---|
QOrganizerItemDetail::TypeUndefined | 0 | This detail is of type undefined. |
QOrganizerItemDetail::TypeClassification | 100 | This detail is a classification. |
QOrganizerItemDetail::TypeComment | 200 | This detail is a comment |
QOrganizerItemDetail::TypeDescription | 300 | This detail is a description. |
QOrganizerItemDetail::TypeDisplayLabel | 400 | This detail is a display label. |
QOrganizerItemDetail::TypeItemType | 500 | This detail is an item type. |
QOrganizerItemDetail::TypeGuid | 600 | This detail is a GUID. |
QOrganizerItemDetail::TypeLocation | 700 | This detail is a location. |
QOrganizerItemDetail::TypeParent | 800 | This detail is a parent. Should not be used in parent items. |
QOrganizerItemDetail::TypePriority | 900 | This detail is a priority. |
QOrganizerItemDetail::TypeRecurrence | 1000 | This detail is a recurrence. Should not be used in occurrences. |
QOrganizerItemDetail::TypeTag | 1100 | This detail is a tag. |
QOrganizerItemDetail::TypeTimestamp | 1200 | This detail is a timestamp. |
QOrganizerItemDetail::TypeVersion | 1300 | This detail is a version. |
QOrganizerItemDetail::TypeReminder | 1400 | This detail is a reminder. Should not be directly used. |
QOrganizerItemDetail::TypeAudibleReminder | 1500 | This detail is an audible reminder. |
QOrganizerItemDetail::TypeEmailReminder | 1600 | This detail is an email reminder. |
QOrganizerItemDetail::TypeVisualReminder | 1700 | This detail is a visual reminder. |
QOrganizerItemDetail::TypeExtendedDetail | 1800 | This detail is an extended detail. |
QOrganizerItemDetail::TypeEventAttendee | 1900 | This detail is an event attendee. |
QOrganizerItemDetail::TypeEventRsvp | 2000 | This detail is an event RSVP. |
QOrganizerItemDetail::TypeEventTime | 2100 | This detail is an event time. |
QOrganizerItemDetail::TypeJournalTime | 2200 | This detail is a journal time. |
QOrganizerItemDetail::TypeTodoTime | 2400 | This detail is a TODO time. |
QOrganizerItemDetail::TypeTodoProgress | 2300 | This detail is a TODO progress. |
Constructs a new, empty detail of the detailType.
Constructs a detail that is a copy of other.
Frees the memory used by this detail.
Returns true if the value of the given field has been set, or false otherwise.
Returns true if no values are contained in this detail.
Returns the key of this detail.
Removes the value stored in this detail for the given field. Returns true if a value was stored for the given field and the removing succeeds, or false otherwise.
Causes the implicitly-shared detail to be detached from any other copies, and generates a new key for it. This ensures that calling QOrganizerItem::saveDetail() will result in a new detail being saved, rather than another detail being updated.
Sets the value of the given field to be value. If the given value is invalid or null, removes the given field from the detail. Returns true on success, or false otherwise.
See also value().
Returns the detail type.
Returns the value stored in this detail for the given field. An invalid QVariant is returned if the value of field is not set.
See also setValue().
Returns the values stored in this detail as a field-to-value map.
Returns true if the values or id of this detail is different to those of the other detail
Assigns this detail to other.
Compares this detail to other. Returns true if the type and values of other are equal to those of this detail. The keys of each detail are not considered during the comparison, in order to allow details from different organizer items to be compared according to their values.
Streams the detail to the given debug stream dbg, and returns the stream.