Detailed Description
The QAppointmentContext class represents a storage context of appointment data.
The class can be used to perform operations that relate to a specific context of PIM data, such as appointments stored on a device in the native Qt Extended format, or appointments stored in an on-line calendaring service.
Currently there is no way for applications to implement their own contexts. This feature is being considered for future versions of Qtopia.
See also QAppointmentModel and Pim Library.
Member Function Documentation
QAppointmentContext::QAppointmentContext ( QObject * parent = 0 ) [protected]
Constructs a QAppointmentContext with parent parent.
QUniqueId QAppointmentContext::addAppointment ( const QAppointment & appointment, const QPimSource & source ) [virtual]
Adds the appointment to the PIM data source if it is controlled by this context. If the appointment is successfully added, returns the new unique id for this appointment, otherwise returns a null id.
QAppointment QAppointmentContext::exportAppointment ( const QUniqueId & id, bool & ok ) const [virtual]
Exports a single appointment identified by id. If successful sets ok to true, otherwise sets ok to false.
See also exportAppointments().
QList<QAppointment> QAppointmentContext::exportAppointments ( const QPimSource & source, bool & ok ) const [virtual]
Exports the appointments stored in the PIM data source and returns them as a list. The source must be controlled by this context. If successful sets ok to true, otherwise sets ok to false.
There isn't necessarily going to be a one to one match to appointments in the PIM data source. Appointments may be merged or split over multiple appointments to form the list.
bool QAppointmentContext::importAppointment ( const QPimSource & source, const QAppointment & appointment ) [virtual]
Imports a single appointment to the PIM data source. If successful returns true, otherwise returns false.
See also importAppointments().
bool QAppointmentContext::importAppointments ( const QPimSource & source, const QList<QAppointment> & appointments ) [virtual]
Imports the appointments and merges them with the appointments listed in the PIM data source. The source must be controlled by this context. If successful returns true, otherwise returns false.
There isn't necessarily going to be a one to one match to appointments in the PIM data source. Appointments may be merged or split over multiple appointments. Also appointments that match in name will be updated from the list rather than additional appointments created.
bool QAppointmentContext::removeAppointment ( const QUniqueId & id ) [virtual]
Removes the appointment with the identifier id if it exists in this context. Returns true upon success; otherwise returns false.
bool QAppointmentContext::removeOccurrence ( const QUniqueId & id, const QDate & date ) [virtual]
Mark the repeating appointment identified by id in this context so as not to occur on date. Returns true if the appointment was successfully updated, otherwise returns false.
QUniqueId QAppointmentContext::replaceOccurrence ( const QUniqueId & id, const QOccurrence & occurrence, const QDate & date = QDate() ) [virtual]
Replaces an occurrence that occurs on date of the appointment identified by id with occurrence. If date is null, the date of the supplied occurrence will be used. Returns true if the appointment was successfully updated, otherwise returns false.
QUniqueId QAppointmentContext::replaceRemaining ( const QUniqueId & id, const QAppointment & appointment, const QDate & date = QDate() ) [virtual]
Modifies the appointment identified by id to not repeat after date and adds appointment to the PIM data source that stores the appointment identified by id. If date is null, the date of the first occurrence of appointment will be used. Returns the unique id for the new appointment if successful, otherwise returns a null id.
bool QAppointmentContext::restoreOccurrence ( const QUniqueId & identifier, const QDate & date ) [virtual]
If an recurring appointment with the specified identifier has an exception listed for the given date, restores the original occurrence for that date. If the exception included a replacement appointment will also remove the replacement.
Returns true if the appointment was successfully updated.
bool QAppointmentContext::updateAppointment ( const QAppointment & appointment ) [virtual]
Updates the appointment with the same identifier as appointment if it exists in this context. Returns true upon success; otherwise returns false.