KCal::Recurrence Class Reference
This class represents a recurrence rule for a calendar incidence. More...
#include <recurrence.h>
Public Types | |
enum | { rNone = 0, rMinutely = 0x001, rHourly = 0x0002, rDaily = 0x0003, rWeekly = 0x0004, rMonthlyPos = 0x0005, rMonthlyDay = 0x0006, rYearlyMonth = 0x0007, rYearlyDay = 0x0008, rYearlyPos = 0x0009 } |
enum | Feb29Type { rMar1, rFeb28, rFeb29 } |
Public Member Functions | |
Recurrence (Incidence *parent, int compatVersion=0) | |
Recurrence (const Recurrence &, Incidence *parent) | |
bool | operator== (const Recurrence &) const |
bool | operator!= (const Recurrence &r) const |
Incidence * | parent () |
QDateTime | recurStart () const |
void | setRecurStart (const QDateTime &start) |
void | setRecurStart (const QDate &start) |
void | setFloats (bool f) |
bool | doesFloat () const |
void | setRecurReadOnly (bool readOnly) |
bool | recurReadOnly () const |
void | setCompatVersion (int version=0) |
ushort | doesRecur () const |
bool | recursOnPure (const QDate &qd) const |
bool | recursAtPure (const QDateTime &) const |
void | unsetRecurs () |
QValueList< QTime > | recurTimesOn (const QDate &date) const |
QDate | getNextDate (const QDate &preDate, bool *last=0) const |
QDateTime | getNextDateTime (const QDateTime &preDateTime, bool *last=0) const |
QDate | getPreviousDate (const QDate &afterDate, bool *last=0) const |
QDateTime | getPreviousDateTime (const QDateTime &afterDateTime, bool *last=0) const |
int | frequency () const |
void | setFrequency (int freq) |
int | duration () const |
void | setDuration (int duration) |
int | durationTo (const QDate &) const |
int | durationTo (const QDateTime &) const |
QDate | endDate (bool *result=0) const |
QDateTime | endDateTime (bool *result=0) const |
QString | endDateStr (bool shortfmt=true) const |
void | setEndDate (const QDate &endDate) |
void | setEndDateTime (const QDateTime &endDateTime) |
void | setMinutely (int _rFreq, int duration) |
void | setMinutely (int _rFreq, const QDateTime &endDateTime) |
void | setHourly (int _rFreq, int duration) |
void | setHourly (int _rFreq, const QDateTime &endDateTime) |
void | setDaily (int _rFreq, int duration) |
void | setDaily (int _rFreq, const QDate &endDate) |
void | setWeekly (int _rFreq, const QBitArray &_rDays, int duration, int weekStart=1) |
void | setWeekly (int _rFreq, const QBitArray &_rDays, const QDate &endDate, int weekStart=1) |
int | weekStart () const |
const QBitArray & | days () const |
void | setMonthly (short type, int _rFreq, int duration) |
void | setMonthly (short type, int _rFreq, const QDate &endDate) |
void | addMonthlyPos (short _rPos, const QBitArray &_rDays) |
void | addMonthlyDay (short _rDay) |
const QPtrList< rMonthPos > & | monthPositions () const |
const QPtrList< int > & | monthDays () const |
void | setYearly (int type, int freq, int duration) |
void | setYearly (int type, int freq, const QDate &endDate) |
void | setYearlyByDate (Feb29Type type, int freq, int duration) |
void | setYearlyByDate (Feb29Type type, int freq, const QDate &endDate) |
void | setYearlyByDate (int day, Feb29Type type, int freq, int duration) |
void | setYearlyByDate (int day, Feb29Type type, int freq, const QDate &endDate) |
void | addYearlyNum (short _rNum) |
void | addYearlyMonthPos (short _rPos, const QBitArray &_rDays) |
const QPtrList< int > & | yearNums () const |
const QPtrList< rMonthPos > & | yearMonthPositions () const |
Feb29Type | feb29YearlyType () const |
int | countMonthlyPosDays () const |
void | getMonthlyPosDays (QValueList< int > &list, int daysInMonth, int startDayOfWeek) const |
bool | getMonthlyDayDays (QValueList< int > &list, int daysInMonth) const |
bool | getYearlyMonthMonths (int day, QValueList< int > &list, QValueList< int > &leaplist) const |
void | dump () const |
Static Public Member Functions | |
void | setFeb29YearlyTypeDefault (Feb29Type t) |
Feb29Type | setFeb29YearlyTypeDefault () |
Static Public Attributes | |
const QDate | MAX_DATE |
Protected Types | |
enum | PeriodFunc { END_DATE_AND_COUNT, COUNT_TO_DATE, NEXT_AFTER_DATE } |
Protected Member Functions | |
bool | recursSecondly (const QDate &, int secondFreq) const |
bool | recursMinutelyAt (const QDateTime &dt, int minuteFreq) const |
bool | recursDaily (const QDate &) const |
bool | recursWeekly (const QDate &) const |
bool | recursMonthly (const QDate &) const |
bool | recursYearlyByMonth (const QDate &) const |
bool | recursYearlyByPos (const QDate &) const |
bool | recursYearlyByDay (const QDate &) const |
QDate | getNextDateNoTime (const QDate &preDate, bool *last) const |
QDate | getPreviousDateNoTime (const QDate &afterDate, bool *last) const |
void | addMonthlyPos_ (short _rPos, const QBitArray &_rDays) |
void | setDailySub (short type, int freq, int duration) |
void | setYearly_ (short type, Feb29Type, int freq, int duration) |
int | recurCalc (PeriodFunc, QDate &enddate) const |
int | recurCalc (PeriodFunc, QDateTime &endtime) const |
int | secondlyCalc (PeriodFunc, QDateTime &endtime, int freq) const |
int | dailyCalc (PeriodFunc, QDate &enddate) const |
int | weeklyCalc (PeriodFunc, QDate &enddate) const |
int | weeklyCalcEndDate (QDate &enddate, int daysPerWeek) const |
int | weeklyCalcToDate (const QDate &enddate, int daysPerWeek) const |
int | weeklyCalcNextAfter (QDate &enddate, int daysPerWeek) const |
int | monthlyCalc (PeriodFunc, QDate &enddate) const |
int | monthlyCalcEndDate (QDate &enddate, MonthlyData &) const |
int | monthlyCalcToDate (const QDate &enddate, MonthlyData &) const |
int | monthlyCalcNextAfter (QDate &enddate, MonthlyData &) const |
int | yearlyMonthCalc (PeriodFunc, QDate &enddate) const |
int | yearlyMonthCalcEndDate (QDate &enddate, YearlyMonthData &) const |
int | yearlyMonthCalcToDate (const QDate &enddate, YearlyMonthData &) const |
int | yearlyMonthCalcNextAfter (QDate &enddate, YearlyMonthData &) const |
int | yearlyPosCalc (PeriodFunc, QDate &enddate) const |
int | yearlyPosCalcEndDate (QDate &enddate, YearlyPosData &) const |
int | yearlyPosCalcToDate (const QDate &enddate, YearlyPosData &) const |
int | yearlyPosCalcNextAfter (QDate &enddate, YearlyPosData &) const |
int | yearlyDayCalc (PeriodFunc, QDate &enddate) const |
int | yearlyDayCalcEndDate (QDate &enddate, YearlyDayData &) const |
int | yearlyDayCalcToDate (const QDate &enddate, YearlyDayData &) const |
int | yearlyDayCalcNextAfter (QDate &enddate, YearlyDayData &) const |
Detailed Description
This class represents a recurrence rule for a calendar incidence.
Definition at line 37 of file recurrence.h.
Member Enumeration Documentation
|
enumeration for describing how an event recurs, if at all.
Definition at line 41 of file recurrence.h. |
|
Enumeration for specifying what date yearly recurrences of February 29th occur in non-leap years.
Definition at line 47 of file recurrence.h. Referenced by setFeb29YearlyTypeDefault(). |
Member Function Documentation
|
Return the start of the recurrence.
Definition at line 70 of file recurrence.h. Referenced by KCal::Todo::setDtDue(). |
|
Set start of recurrence, as a date and time.
Referenced by KCal::ResourceKABC::doLoad(), KCal::Todo::setDtDue(), and KCal::Todo::setDtStart(). |
|
Set start of recurrence, as a date with no time. Recurrence types which are sub-daily (e.g. rHourly) always have a time; the time is set to 00:00:00 in these cases. |
|
Set whether the recurrence has no time, just a date. Recurrence types which are sub-daily (e.g. rHourly) always have a time and cannot be set to float. N.B. This property is derived by default from the parent incidence, or according to whether a time is specified in setRecurStart(). |
|
Returns whether the recurrence has no time, just a date.
Definition at line 86 of file recurrence.h. |
|
Set if recurrence is read-only or can be changed.
Definition at line 89 of file recurrence.h. References setRecurReadOnly(). Referenced by setRecurReadOnly(). |
|
Returns true if the recurrence is read-only, or false if it can be changed.
Definition at line 91 of file recurrence.h. |
|
Set the calendar file version for backwards compatibility.
|
|
Returns the event's recurrence status. See the enumeration at the top of this file for possible values. Referenced by KCal::VCalFormat::eventToVEvent(). |
|
Returns true if the date specified is one on which the event will recur.
|
|
Returns true if the date/time specified is one at which the event will recur. Times are rounded down to the nearest minute to determine the result. |
|
Turns off recurrence for the event.
Referenced by KCal::Calendar::dissociateOccurrence(). |
|
Returns a list of the times on the specified date at which the recurrence will occur.
|
|
Returns the date of the next recurrence, after the specified date.
|
|
Returns the date and time of the next recurrence, after the specified date/time. If the recurrence has no time, the next date after the specified date is returned.
Referenced by KCal::CalendarLocal::appendRecurringAlarms(). |
|
Returns the date of the last previous recurrence, before the specified date.
|
|
Returns the date and time of the last previous recurrence, before the specified date/time. If a time later than 00:00:00 is specified and the recurrence has no time, 00:00:00 on the specified date is returned if that date recurs.
|
|
Returns frequency of recurrence, in terms of the recurrence time period type.
Referenced by KCal::VCalFormat::eventToVEvent(). |
|
Sets the frequency of recurrence, in terms of the recurrence time period type.
|
|
Returns -1 if the event recurs infinitely, 0 if the end date is set, otherwise the total number of recurrences, including the initial occurrence.
Referenced by KCal::Calendar::dissociateOccurrence(), KCal::VCalFormat::eventToVEvent(), and KCal::CalendarLocal::rawEvents(). |
|
Sets the total number of times the event is to occur, including both the first and last.
Referenced by KCal::Calendar::dissociateOccurrence(). |
|
Returns the number of recurrences up to and including the date specified.
Referenced by KCal::Calendar::dissociateOccurrence(). |
|
Returns the number of recurrences up to and including the date/time specified.
|
|
Returns the date of the last recurrence. An invalid date is returned if the recurrence has no end.
Referenced by KCal::VCalFormat::eventToVEvent(), and KCal::CalendarLocal::rawEvents(). |
|
Returns the date and time of the last recurrence. An invalid date is returned if the recurrence has no end.
|
|
Returns a string representing the recurrence end date in the format according to the user's locale settings.
|
|
Sets the date of the last recurrence. The end time is set to the recurrence start time.
Referenced by KCal::Calendar::dissociateOccurrence(). |
|
Sets the date and time of the last recurrence.
|
|
Sets an event to recur minutely.
|
|
Sets an event to recur minutely.
|
|
Sets an event to recur hourly.
|
|
Sets an event to recur hourly.
|
|
Sets an event to recur daily.
Referenced by KCal::VCalFormat::VEventToEvent(). |
|
Sets an event to recur daily.
|
|
Sets an event to recur weekly.
Referenced by KCal::VCalFormat::VEventToEvent(). |
|
Sets an event to recur weekly.
|
|
Returns the first day of the week. Monday=1 .. Sunday=7. Definition at line 237 of file recurrence.h. |
|
Returns week day mask (bit 0 = Monday).
Referenced by KCal::VCalFormat::eventToVEvent(). |
|
Sets an event to recur monthly.
Referenced by KCal::VCalFormat::VEventToEvent(). |
|
same as above, but with ending date not number of recurrences
|
|
Adds a position to the recursMonthlyPos recurrence rule, if it is set.
Referenced by KCal::VCalFormat::VEventToEvent(). |
|
Adds a position to the recursMonthlyDay list.
Referenced by KCal::VCalFormat::VEventToEvent(). |
|
Returns list of day positions in months.
Referenced by KCal::VCalFormat::eventToVEvent(). |
|
Returns list of day numbers of a month.
Referenced by KCal::VCalFormat::eventToVEvent(). |
|
Sets an event to recur yearly.
Referenced by KCal::ResourceKABC::doLoad(), and KCal::VCalFormat::VEventToEvent(). |
|
Sets an event to recur yearly ending at endDate.
|
|
Sets an event to recur yearly on a set of months, on the same day of the month as the event start date. The months must be specified by calling addYearlyNum().
|
|
Sets an event to recur yearly ending at endDate.
|
|
Sets an event to recur yearly of a set of months, on the specified day of the month. The months must be specified by calling addYearlyNum().
|
|
Sets an event to recur yearly ending at endDate.
|
|
Adds position of day or month in year. N.B. for recursYearlyPos, addYearlyMonthPos() must also be called to add positions within the month. Referenced by KCal::ResourceKABC::doLoad(), and KCal::VCalFormat::VEventToEvent(). |
|
Adds a position to the recursYearlyPos recurrence rule, if it is set. N.B. addYearlyNum() must also be called to add recurrence months. Parameters are the same as for addMonthlyPos(). |
|
Returns positions of days or months in year.
Referenced by KCal::VCalFormat::eventToVEvent(). |
|
Returns list of day positions in months, for a recursYearlyPos recurrence rule.
|
|
Returns how yearly recurrences of February 29th are handled.
Definition at line 309 of file recurrence.h. |
|
Sets the default method for handling yearly recurrences of February 29th.
Definition at line 311 of file recurrence.h. |
|
Returns the default method for handling yearly recurrences of February 29th.
Definition at line 313 of file recurrence.h. References Feb29Type. |
|
Returns the number of days in the month which recur. Reply = -1 if the number varies from month to month. |
|
Returns the days in a specified month which recur, in numerical order.
|
|
Returns the days in a specified month which recur, in numerical order.
|
|
Get the months which recur, in numerical order, for both leap years and non-leap years. N.B. If February 29th recurs on March 1st in non-leap years, February (not March) is included in the non-leap year month list.
|
|
Debug output.
|
Member Data Documentation
|
Upper date limit for recurrences.
Definition at line 344 of file recurrence.h. |
The documentation for this class was generated from the following file: