summaryrefslogtreecommitdiffabout
path: root/libkcal/recurrence.h
Side-by-side diff
Diffstat (limited to 'libkcal/recurrence.h') (more/less context) (ignore whitespace changes)
-rw-r--r--libkcal/recurrence.h26
1 files changed, 14 insertions, 12 deletions
diff --git a/libkcal/recurrence.h b/libkcal/recurrence.h
index b13d14f..5b5aab1 100644
--- a/libkcal/recurrence.h
+++ b/libkcal/recurrence.h
@@ -21,13 +21,15 @@
*/
#ifndef KCAL_RECURRENCE_H
#define KCAL_RECURRENCE_H
#include <qstring.h>
#include <qbitarray.h>
-#include <qptrlist.h>
+#include <q3ptrlist.h>
+//Added by qt3to4:
+#include <Q3ValueList>
namespace KCal {
class Incidence;
/**
@@ -245,15 +247,15 @@ class Recurrence
void addMonthlyPos(short _rPos, const QBitArray &_rDays);
/** Adds a position the the recursMonthlyDay list.
* @var _rDay the date in the month to recur.
*/
void addMonthlyDay(short _rDay);
/** Returns list of day positions in months. */
- const QPtrList<rMonthPos> &monthPositions() const;
+ const Q3PtrList<rMonthPos> &monthPositions() const;
/** Returns list of day numbers of a month. */
- const QPtrList<int> &monthDays() const;
+ const Q3PtrList<int> &monthDays() const;
/** Sets an event to recur yearly.
* @var type rYearlyMonth, rYearlyPos or rYearlyDay
* @var freq the frequency to recur, e.g. 3 for every third year.
* @var duration the number of times the event is to occur, or -1 to recur indefinitely.
*/
@@ -276,29 +278,29 @@ class Recurrence
/** 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().
*/
void addYearlyMonthPos(short _rPos, const QBitArray &_rDays);
/** Returns positions of days or months in year. */
- const QPtrList<int> &yearNums() const;
+ const Q3PtrList<int> &yearNums() const;
/** Returns list of day positions in months, for a recursYearlyPos recurrence rule. */
- const QPtrList<rMonthPos> &yearMonthPositions() const;
+ const Q3PtrList<rMonthPos> &yearMonthPositions() const;
/** Returns how yearly recurrences of February 29th are handled. */
Feb29Type feb29YearlyType() const { return mFeb29YearlyType; }
/** Sets the default method for handling yearly recurrences of February 29th. */
static void setFeb29YearlyTypeDefault(Feb29Type t) { mFeb29YearlyDefaultType = t; }
/** Returns the default method for handling yearly recurrences of February 29th. */
static Feb29Type setFeb29YearlyTypeDefault() { return mFeb29YearlyDefaultType; }
void addYearlyMonth(short _rPos ); // added LR
/**
Debug output.
*/
void dump() const;
QString recurrenceText() const;
- bool getYearlyMonthMonths(int day, QValueList<int>&,
- QValueList<int> &leaplist) const;
+ bool getYearlyMonthMonths(int day, Q3ValueList<int>&,
+ Q3ValueList<int> &leaplist) const;
protected:
enum PeriodFunc { END_DATE_AND_COUNT, COUNT_TO_DATE, NEXT_AFTER_DATE };
struct MonthlyData; friend struct MonthlyData;
struct YearlyMonthData; friend struct YearlyMonthData;
struct YearlyPosData; friend struct YearlyPosData;
@@ -342,15 +344,15 @@ class Recurrence
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;
int countMonthlyPosDays() const;
- void getMonthlyPosDays(QValueList<int>&, int daysInMonth,
+ void getMonthlyPosDays(Q3ValueList<int>&, int daysInMonth,
int startDayOfWeek) const;
- bool getMonthlyDayDays(QValueList<int>&, int daysInMonth) const;
+ bool getMonthlyDayDays(Q3ValueList<int>&, int daysInMonth) const;
int getFirstDayInWeek(int startDay, bool useWeekStart = true) const;
int getLastDayInWeek(int endDay, bool useWeekStart = true) const;
QDate getFirstDateInMonth(const QDate& earliestDate) const;
QDate getLastDateInMonth(const QDate& latestDate) const;
QDate getFirstDateInYear(const QDate& earliestDate) const;
@@ -363,19 +365,19 @@ class Recurrence
short recurs; // should be one of the enums.
int rWeekStart; // day which starts the week, Monday=1 .. Sunday=7
QBitArray rDays; // array of days during week it recurs
- QPtrList<rMonthPos> rMonthPositions; // list of positions during a month
+ Q3PtrList<rMonthPos> rMonthPositions; // list of positions during a month
// on which an event recurs
- QPtrList<int> rMonthDays; // list of days during a month on
+ Q3PtrList<int> rMonthDays; // list of days during a month on
// which the event recurs
- QPtrList<int> rYearNums; // either months/days to recur on for rYearly,
+ Q3PtrList<int> rYearNums; // either months/days to recur on for rYearly,
// sorted in numerical order
int rFreq; // frequency of period
// one of the following must be specified
int rDuration; // num times to recur (inc. first occurrence), -1 = infinite