Diffstat (limited to 'libopie2/opiepim/core/orecur.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie2/opiepim/core/orecur.h | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/libopie2/opiepim/core/orecur.h b/libopie2/opiepim/core/orecur.h index 60508f5..7808897 100644 --- a/libopie2/opiepim/core/orecur.h +++ b/libopie2/opiepim/core/orecur.h | |||
@@ -26,32 +26,34 @@ | |||
26 | Inc., 59 Temple Place - Suite 330, | 26 | Inc., 59 Temple Place - Suite 330, |
27 | Boston, MA 02111-1307, USA. | 27 | Boston, MA 02111-1307, USA. |
28 | */ | 28 | */ |
29 | 29 | ||
30 | #ifndef OPIE_RECUR_H | 30 | #ifndef ORECUR_H |
31 | #define OPIE_RECUR_H | 31 | #define ORECUR_H |
32 | |||
33 | #include <sys/types.h> | ||
34 | 32 | ||
33 | /* QT */ | ||
35 | #include <qdatetime.h> | 34 | #include <qdatetime.h> |
36 | #include <qvaluelist.h> | 35 | #include <qvaluelist.h> |
37 | #include <qmap.h> | 36 | #include <qmap.h> |
38 | 37 | ||
38 | /* STD */ | ||
39 | #include <sys/types.h> | ||
39 | 40 | ||
40 | namespace Opie { | 41 | namespace Opie { |
41 | /** | 42 | /** |
42 | * Class to handle Recurrencies.. | 43 | * Class to handle Recurrencies.. |
43 | */ | 44 | */ |
44 | 45 | ||
45 | class ORecur { | 46 | class ORecur { |
46 | public: | 47 | |
48 | public: | ||
47 | typedef QValueList<QDate> ExceptionList; | 49 | typedef QValueList<QDate> ExceptionList; |
48 | enum RepeatType{ NoRepeat = -1, Daily, Weekly, MonthlyDay, | 50 | enum RepeatType{ NoRepeat = -1, Daily, Weekly, MonthlyDay, |
49 | MonthlyDate, Yearly }; | 51 | MonthlyDate, Yearly }; |
50 | enum Days { MON = 0x01, TUE = 0x02, WED = 0x04, THU = 0x08, | 52 | enum Days { MON = 0x01, TUE = 0x02, WED = 0x04, THU = 0x08, |
51 | FRI = 0x10, SAT = 0x20, SUN = 0x40 }; | 53 | FRI = 0x10, SAT = 0x20, SUN = 0x40 }; |
52 | enum Fields{ RType = 0, RWeekdays, RPosition, RFreq, RHasEndDate, | 54 | enum Fields{ RType = 0, RWeekdays, RPosition, RFreq, RHasEndDate, |
53 | EndDate, Created, Exceptions }; | 55 | EndDate, Created, Exceptions }; |
54 | 56 | ||
55 | ORecur(); | 57 | ORecur(); |
56 | ORecur( const QMap<int, QString>& map ); | 58 | ORecur( const QMap<int, QString>& map ); |
57 | ORecur( const ORecur& ); | 59 | ORecur( const ORecur& ); |
@@ -113,9 +115,10 @@ public: | |||
113 | void fromMap( const QMap<int, QString>& map ); | 115 | void fromMap( const QMap<int, QString>& map ); |
114 | 116 | ||
115 | /* almost internal */ | 117 | /* almost internal */ |
116 | QString toString()const; | 118 | QString toString()const; |
117 | private: | 119 | |
120 | private: | ||
118 | bool p_nextOccurrence( const QDate& from, QDate& next ); | 121 | bool p_nextOccurrence( const QDate& from, QDate& next ); |
119 | void deref(); | 122 | void deref(); |
120 | inline void checkOrModify(); | 123 | inline void checkOrModify(); |
121 | 124 | ||