23 #ifndef KALARM_KARECURRENCE_H
24 #define KALARM_KARECURRENCE_H
26 #include "kalarmcal_export.h"
28 #ifndef KALARMCAL_USE_KRESOURCES
29 #include <kcalcore/recurrencerule.h>
31 namespace KCalCore {
class Recurrence; }
33 #include <kcal/recurrencerule.h>
34 #include <kcal/duration.h>
35 namespace KCal {
class Recurrence; }
38 #include <QtCore/QBitArray>
87 #ifndef KALARMCAL_USE_KRESOURCES
117 bool set(
const QString& icalRRULE);
127 bool set(Type t,
int freq,
int count,
const KDateTime& start,
const KDateTime& end);
134 bool set(Type t,
int freq,
int count,
const KDateTime& start,
const KDateTime& end, Feb29Type f29);
143 #ifndef KALARMCAL_USE_KRESOURCES
146 bool init(KCal::RecurrenceRule::PeriodType t,
int freq,
int count,
const KDateTime& start,
const KDateTime& end);
155 #ifndef KALARMCAL_USE_KRESOURCES
158 bool init(KCal::RecurrenceRule::PeriodType t,
int freq,
int count,
const KDateTime& start,
const KDateTime& end, Feb29Type f29);
167 #ifndef KALARMCAL_USE_KRESOURCES
170 void writeRecurrence(KCal::Recurrence&)
const;
186 KDateTime startDateTime()
const;
188 QDate startDate()
const;
194 void setStartDateTime(
const KDateTime& dt,
bool dateOnly);
197 KDateTime endDateTime()
const;
200 QDate endDate()
const;
206 void setEndDate(
const QDate& endDate);
211 void setEndDateTime(
const KDateTime& endDateTime);
223 void setRecurReadOnly(
bool readOnly);
226 bool recurReadOnly()
const;
235 #ifndef KALARMCAL_USE_KRESOURCES
279 #ifndef KALARMCAL_USE_KRESOURCES
288 void addWeeklyDays(
const QBitArray& days);
296 void addYearlyDay(
int day);
306 void addYearlyDate(
int date);
313 void addYearlyMonth(
short month);
331 void addYearlyPos(
short pos,
const QBitArray& days);
340 void addMonthlyPos(
short pos,
const QBitArray& days);
341 void addMonthlyPos(
short pos, ushort day);
347 void addMonthlyDate(
short day);
350 KDateTime getNextDateTime(
const KDateTime& preDateTime)
const;
353 KDateTime getPreviousDateTime(
const KDateTime& afterDateTime)
const;
357 bool recursOn(
const QDate&,
const KDateTime::Spec&)
const;
365 bool recursAt(
const KDateTime& dt)
const;
373 #ifndef KALARMCAL_USE_KRESOURCES
374 KCalCore::TimeList recurTimesOn(
const QDate& date,
const KDateTime::Spec& timeSpec)
const;
376 KCal::TimeList recurTimesOn(
const QDate& date,
const KDateTime::Spec& timeSpec)
const;
391 #ifndef KALARMCAL_USE_KRESOURCES
394 KCal::DateTimeList timesInInterval(
const KDateTime& start,
const KDateTime& end)
const;
398 int frequency()
const;
401 void setFrequency(
int freq);
407 int duration()
const;
412 void setDuration(
int duration);
417 int durationTo(
const KDateTime& dt)
const;
422 int durationTo(
const QDate& date)
const;
427 #ifndef KALARMCAL_USE_KRESOURCES
430 KCal::Duration longestInterval()
const;
437 #ifndef KALARMCAL_USE_KRESOURCES
440 KCal::Duration regularInterval()
const;
442 #ifndef KALARMCAL_USE_KRESOURCES
448 KCal::DateTimeList exDateTimes()
const;
449 KCal::DateList exDates()
const;
450 void setExDateTimes(
const KCal::DateTimeList& exdates);
451 void setExDates(
const KCal::DateList& exdates);
453 void addExDateTime(
const KDateTime& exdate);
454 void addExDate(
const QDate& exdate);
470 void shiftTimes(
const KDateTime::Spec& oldSpec,
const KDateTime::Spec& newSpec);
472 #ifndef KALARMCAL_USE_KRESOURCES
475 KCal::RecurrenceRule* defaultRRuleConst()
const;
481 #ifndef KALARMCAL_USE_KRESOURCES
484 static Type type(
const KCal::RecurrenceRule*);
488 #ifndef KALARMCAL_USE_KRESOURCES
491 static bool dailyType(
const KCal::RecurrenceRule*);
495 Feb29Type feb29Type()
const;
501 static Feb29Type defaultFeb29Type();
507 static void setDefaultFeb29Type(Feb29Type t);
518 #endif // KALARM_KARECURRENCE_H
yearly, on a specified date in each of the specified months
weekly, on specified weekdays
Type
The recurrence's period type.
Feb29Type
When annual February 29th recurrences should occur in non-leap years.
occurs on 1 March in non-leap years
Represents recurrences for KAlarm.
bool operator!=(const KARecurrence &r) const
Comparison operator for inequality.
monthly, on specified weekdays in a specified week of the month
at an hours/minutes interval
monthly, on a specified day of the month
occurs on 28 February in non-leap years