Home · All Namespaces · All Classes · Grouped Classes · Modules · Functions |
The QOccurrenceModel class provides access to the Calendar data. More...
#include <QOccurrenceModel>
Inherits QAbstractItemModel.
The QOccurrenceModel class provides access to the Calendar data.
It is a descendant of QAbstractItemModel so is suitable for use with the Qt View classes such as QListView and QTableView, as well as any custom developer Views.
It differs from the QAppointmentModel in that it will show each occurrence of appointments as a separate item in the model. Since some appointments have infinite occurrences a date range must be specified to limit the total set of occurrences included in the model. Another important difference is that the values for the QAppointmentModel::Start and QAppointmentModel::End fields are converted to the current time zone of the device.
See also Pim Library.
Constructs an occurrence model with the given parent that contains only occurrences that end on or after the specified range start time and start before the specified range end time. Both start and end time specified should be in local time.
Constructs an occurrence model with the given parent that contains only the first count occurrences that end on or after the specified range start time. The start time specified should be in local time.
Destroys the occurrence model.
Returns the appointment with the specified identifier. The appointment does not have to be in the current filter mode for it to be returned.
This is an overloaded member function, provided for convenience.
Returns the appointment for the row specified by index. The column of index is ignored.
This is an overloaded member function, provided for convenience.
Returns the appointment for the given row.
Returns the set of identifiers for storage sources that can be shown.
Returns the category filter that occurrences are tested against for the current filter mode.
See also setCategoryFilter().
Returns true if the current filter mode of the model contains index.
This is an overloaded member function, provided for convenience.
Returns true if the current filter mode of the model contains an occurrence for the appointment with the specified identifier.
Returns the number of occurrences visible in the current filter mode.
Returns the data stored under the given role for the item referred to by the index.
The row of the index specifies which appointment to access and the column of the index is treated as a QAppointmentModel::Field.
Reimplemented from QAbstractItemModel.
See also setData() and QAppointmentModel::appointmentField().
Returns the duration type of occurrences currently included in the model.
See also setDurationType().
Returns true if the occurrence for index can be updated or removed.
This is an overloaded member function, provided for convenience.
Returns true if the appointment with the specified identifier can be updated or removed.
Return the identifier for the appointment represented by the occurrence at the row specified by index. If index is null or out of the range of the model will return a null identifier.
Returns the index of the first occurrence in the model that represents an appointment with the specified identifier. If no occurrences are found returns a null index.
See also contains().
This is an overloaded member function, provided for convenience.
If the model contains the occurrence returns the index of that occurrence. Otherwise returns a null index.
Returns a map with values for all predefined roles in the model for the item at the given index.
Reimplemented from QAbstractItemModel.
See also setItemData().
Returns the occurrence for the row specified by index. The column of index is ignored.
This is an overloaded member function, provided for convenience.
Returns the occurrence of the appointment with the specified identifier which occurs on the specified date. If the appointment does not exists or does not occur on the date, returns a null occurrence.
This is an overloaded member function, provided for convenience.
Returns the occurrence at the row specified.
Returns the end of the range specified that occurrences must start before to be included in the model, in the local time zone.
If the range was specified by a start and a count, this will return a null date time.
Returns the start of the range specified that occurrences must end at or after to be included in the model, in the local time zone.
Rebuilds the cache of repeating occurrences that fit within the range.
Ensures any recently updates to the model will be reflected in queries against the model.
This can be an expensive operation. As QOccurrenceModel automatically rebuilds the cache when required it is recommended not to call this function explicitly as this may lead to excessive processing and a subsequent loss in application performance.
Forces a refresh of the Occurrence data.
Return the number of rows under the given parent.
Reimplemented from QAbstractItemModel.
Set the model to only contain occurrences accepted by the specified filter.
See also categoryFilter().
Returns false since occurrence model does not allow editing. index, value and role are ignored.
Reimplemented from QAbstractItemModel.
See also data().
Sets the model to only contain occurrences of the specified duration type.
See also durationType().
Returns false since occurrence model does not allow editing. index and values are ignored
Reimplemented from QAbstractItemModel.
See also itemData().
Sets the model to contain only the first count occurrences that end on or after the specified range start time. The start time specified should be in local time.
This is an overloaded member function, provided for convenience.
Sets the model to only contain occurrences that start before the end of the range, and end at or after the start of the range. Both start and end should be in the local time zone.
Sets the model to show only appointments contained in the storage sources specified by list.
Also refreshes the model.
See also visibleSources().
Returns true if the appointment with the specified identifier is stored in the specified storage source.
Returns the list of sources of occurrence data that are currently shown by the occurrence model.
See also setVisibleSources().
Copyright © 2009 Trolltech | Trademarks | Qt Extended 4.4.3 |