Home · All Namespaces · All Classes · Grouped Classes · Modules · Functions |
The QAppointment class holds the data of a calendar appointment. More...
#include <QAppointment>
Inherits QPimRecord.
The QAppointment class holds the data of a calendar appointment.
This data includes descriptive data of the appointment and scheduling information. Appointments can also repeat and have exceptions to their repeat rules. Repetition of appointments is defined by the appointment's repeatRule(), frequency(), weekFlags() and start(). The repeat rule defines what type of repetition the appointment has and how to interpret the other aspect of repetition information. For instance Daily indicates that the appointment repeats every N days, where N is provided by the frequency() of the appointment. Whereas Weekly would indicate every N weeks, where N is the frequency() and the weekFlags() function indicates on which days of the week the appointment occurs.
The start date is used to determine the Instance of the occurrence. For example if the start date of the appointment is the 16th of April, then for the purposes of the repeat MonthlyDate rule, the Instance is 16. This differs from some other systems that explicitly store the Instance information separate from the start information. In Qt Extended the start of an appointment must always be a valid occurrence for the appointments repetition behavior.
See also Pim Library.
This enum type defines the sound that is made when an appointment alarm occurs The currently defined types are:
Constant | Value | Description |
---|---|---|
QAppointment::NoAlarm | 0x00 | The appointment has no alarm set |
QAppointment::Visible | 0x01 | The appointment has dialog popup alarm set |
QAppointment::Audible | 0x02 | Visible | The appointment has an audible alarm set. |
The AlarmFlags type is a typedef for QFlags<AlarmFlag>. It stores an OR combination of AlarmFlag values.
See also setAlarm() and alarm().
This enum type defines how an appointment repeats.
Constant | Value | Description |
---|---|---|
QAppointment::NoRepeat | 0 | appointment occurs only once |
QAppointment::Daily | 1 | appointment occurs every N days |
QAppointment::Weekly | 2 | appointment occurs every N weeks |
QAppointment::MonthlyDate | 3 | appointment occurs on the Xth day of the month every N months |
QAppointment::MonthlyDay | 4 | appointment occurs on the Xth week of the month every N months |
QAppointment::MonthlyEndDay | 6 | appointment occurs on the Xth last week of the month every N months |
QAppointment::Yearly | 5 | appointment occurs every N years |
See also frequency(), weekOffset(), showOnNearest(), and repeatOnWeekDay().
The WeekFlags only apply to appointments that have a RepeatRule of Weekly, MonthlyDay or MonthlyEndDay.
Constant | Value | Description |
---|---|---|
QAppointment::OccurMonday | 0x01 | The appointment occurs on each Monday |
QAppointment::OccurTuesday | 0x02 | The appointment occurs on each Tuesday |
QAppointment::OccurWednesday | 0x04 | The appointment occurs on each Wednesday |
QAppointment::OccurThursday | 0x08 | The appointment occurs on each Thursday |
QAppointment::OccurFriday | 0x10 | The appointment occurs on each Friday |
QAppointment::OccurSaturday | 0x20 | The appointment occurs on each Saturday |
QAppointment::OccurSunday | 0x40 | The appointment occurs on each Sunday |
The WeekFlags type is a typedef for QFlags<WeekFlag>. It stores an OR combination of WeekFlag values.
Constructs a new QAppointment. The start time is set to the current time, and the end time is five minutes after the current time.
Constructs a new QAppointment as a copy of appointment.
Constructs a new QAppointment starting at start and running until end. If end is less than five minutes after start, the appointment will be created with an end time of five minutes after the start value.
Destroys the appointment.
Returns the type of alarm to sound.
See also setAlarm() and AlarmFlags.
Returns the number of minutes before the appointment to activate the alarm for the appointment.
See also setAlarm().
Reimplemented from QPimRecord.
This is an overloaded member function, provided for convenience.
Reimplemented from QPimRecord.
Clears any alarms set for the appointment.
See also setAlarm().
Removes all exceptions from the appointment.
Note: clearing exceptions and updating appointment in the QAppointmentModel will NOT store the exception changes. Use the functions QAppointmentModel::removeOccurrence(), QAppointmentModel::replaceOccurrence() and QAppointmentModel::replaceRemaining() instead.
Reimplemented from QPimRecord.
This is an overloaded member function, provided for convenience.
Reimplemented from QPimRecord.
Returns the description of the appointment.
See also setDescription().
Returns when the first occurrence of the appointment ends.
See also endInCurrentTZ() and setEnd().
Returns the end time of the appointment in the current system timezone.
See also end().
Returns the date of the repeating appointment to which this appointment is an exception.
Returns the identifier of the repeating appointment to which this appointment is an exception.
See also setExceptionParent().
Returns the list of exceptions to the appointment's repeat rule.
See also setExceptions().
Returns the first occurrence for the appointment.
If there are no valid occurrence for the appointment will return a null occurrence.
Returns how often the appointment repeats.
See also setFrequency().
Returns the WeekFlag associated with day as a Qt::DayOfWeek.
Returns true if there is an alarm set for the appointment. Otherwise returns false.
See also setAlarm().
Returns if there are any exceptions to the appointments recurrence rule.
Returns false if the appointment has repeat type NoRepeat. Otherwise returns true.
See also setRepeatRule() and RepeatRule.
Returns true if the appointment is an all day appointment. Otherwise returns false.
See also setAllDay().
Returns true if the appointment is an exception of another repeating appointment.
Returns true if the appointment can occur. Otherwise returns false.
Returns the location of the appointment.
See also setLocation().
Returns the first date on or after from that the appointment will next occur.
If the appointment does not occur on or after from then a null occurrence is returned.
Returns the notes of the appointment.
Reimplemented from QPimRecord.
See also setNotes().
Reads a list of vCalendars from the given device and returns the equivalent set of appointments.
See also writeVCalendar().
This function is deprecated.
This is an overloaded member function, provided for convenience.
Reads the file specified by filename as a list of vCalendar objects and returns the list of near equivalent appointments.
See also writeVCalendar().
This function is deprecated.
This is an overloaded member function, provided for convenience.
Reads the given VCalendar data in vcal and returns the list of near equivalent appointments.
See also writeVCalendar().
This function is deprecated.
Reads the data of len bytes as a list of vCalendar objects and returns the list of near equivalent appointments.
See also writeVCalendar().
Returns true if the appointment will repeat forever. Otherwise returns false.
See also repeatUntil() and setRepeatForever().
If the appointment is set to repeat on the given day of the week, then returns true. Otherwise returns false.
See also setRepeatOnWeekDay().
Returns the RepeatRule of the appointment.
See also setRepeatRule() and RepeatRule.
Returns the date the appointment will repeat until
See also repeatForever() and setRepeatUntil().
Returns the date the appointment will repeat until in the current system timezone.
See also repeatUntil().
Sets the alarm action to precede the start of the appointment by the specified minutes.
See also clearAlarm(), hasAlarm(), alarm(), and alarmDelay().
Sets the appointment to an all day appointment if enable is true. All day appointments have a no set time-zone.
See also isAllDay() and setTimeZone().
Sets the appointment to be an exception to the recurring appointment with the specified identifier. The appointment is specified to replace the occurrence that occurs on the given date.
Sets the description of the appointment to text.
See also description().
Sets the end time of the appointment to time. This will also change the duration of the appointment. time must be at least 5 minutes after the start time of the appointment.
See also end() and endInCurrentTZ().
Sets this appointment to be an exception to an appointment with the specified identifier.
See also exceptionParent().
Sets the exceptions for the appointment to the specified list.
Note: setting exceptions and updating appointment in the QAppointmentModel will NOT store the exception. Use the functions QAppointmentModel::removeOccurrence(), QAppointmentModel::replaceOccurrence() and QAppointmentModel::replaceRemaining() instead.
See also exceptions().
Sets the repeat frequency of the appointment. If the specified frequency is less than 1 will set the repeat frequency of the appointment to 1.
See also frequency().
Set the location of the appointment to text.
See also location().
Sets the notes of the appointment to text.
Reimplemented from QPimRecord.
See also notes().
Sets the appointment to repeat forever.
See also repeatForever().
Sets the appointment to repeat on the specified day of the week if enable is true. Otherwise sets the appointment not to repeat on the specified day of the week.
Event will always repeat on the day of the week that it started on.
See also repeatOnWeekDay().
Sets the repeat type of the appointment to t.
See also repeatRule(), hasRepeat(), and RepeatRule.
Sets the appointment to repeat until the specified date. If the date is before the end of the first appointment will set the appointment to occur once.
See also repeatUntil() and repeatForever().
If nearest is true sets the repeating appointment to occur on the nearest previous date if the day it would would normally occur on does not exist.
As an example, for an appointment repeats on the 31st of each month passing true to this function will cause the appointment to occur on the 30th in June as the 31st of June is not a valid date.
See also showOnNearest().
Sets the start time of the appointment to time. This will change the end time of the appointment to maintain the same duration.
See also start() and startInCurrentTZ().
Sets the time zone of the appointment to zone. This will affect when the appointment occurs in UTC. All day appointments cannot have a time zone set.
Setting the time zone to an invalid QTimeZone will cause the appointment to have no associated time zone.
See also timeZone() and isAllDay().
Sets the days of the week the appointment occurs on to the specified days.
See also weekFlags().
Returns true if the repeating appointment occurs on the nearest previous date in cases where the date it would normally occur on is invalid.
As an example, an appointment that normally repeats on the 31st of each month and returns true for this function will occur on the 30th in June as the 31st of June is not a valid date.
See also setShowOnNearest().
Returns when the first occurrence of the appointment starts.
See also startInCurrentTZ() and setStart().
Returns the start time of the appointment in the current system timezone.
See also start().
Returns the time zone of the appointment or an invalid QTimeZone if the appointment has no time zone. All day appointments always have no time zone.
See also setTimeZone() and isAllDay().
Returns the Qt::DayOfWeek associated with day.
Reimplemented from QPimRecord.
This is an overloaded member function, provided for convenience.
Reimplemented from QPimRecord.
Returns the flags representing the days of the week the appointment occurs on when set as a Weekly recurring event.
See also setWeekFlags().
Returns the instance of the week the appointment will occur for the repeat types MonthlyDay and MonthlyEndDay. The week offset is determined by the starting date of the appointment.
if (weekOffset() == 1) appointment occurs in first week of the month. if (weekOffset() == 3) appointment occurs in third week of the month. if (weekOffset() == -1) appointment occurs in last week of the month.
Returns 0 if there is no week offset for the appointment.
Writes the given list of appointments to the given device as vCalendars.
Returns true on success.
See also readVCalendar().
This is an overloaded member function, provided for convenience.
Writes the given appointment to the given device as vCalendars.
Returns true on success.
See also readVCalendar().
This function is deprecated.
This is an overloaded member function, provided for convenience.
Write the list of appointments as vCalendar objects to the file specified by filename.
See also readVCalendar().
This function is deprecated.
This is an overloaded member function, provided for convenience.
Write the appointment as a vCalendar to the file specified by filename.
See also readVCalendar().
This function is deprecated.
This is an overloaded member function, provided for convenience.
Writes the appointment as a vCalendar object to the file specified by filename.
Returns true on success, false on fail.
See also readVCalendar().
This function is deprecated.
This is an overloaded member function, provided for convenience.
Writes the appointment as a vCalendar object to the given file, which must be already open for writing.
See also readVCalendar().
This function is deprecated.
This is an overloaded member function, provided for convenience.
Writes the appointment as a vCalendar object to the given stream, which must be writable.
See also readVCalendar().
Returns true if this appointment is not equal to other. Otherwise returns false.
Sets the appointment to be a copy of other.
Returns true if this appointment is equal to other. Otherwise returns false.
Copyright © 2009 Nokia | Trademarks | Qt Extended 4.4.3 |