Diffstat (limited to 'libopie2/opiepim/core/orecur.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie2/opiepim/core/orecur.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/libopie2/opiepim/core/orecur.h b/libopie2/opiepim/core/orecur.h index 8713d97..1e0014b 100644 --- a/libopie2/opiepim/core/orecur.h +++ b/libopie2/opiepim/core/orecur.h | |||
@@ -14,70 +14,74 @@ | |||
14 | class ORecur { | 14 | class ORecur { |
15 | public: | 15 | public: |
16 | typedef QValueList<QDate> ExceptionList; | 16 | typedef QValueList<QDate> ExceptionList; |
17 | enum RepeatType{ NoRepeat = -1, Daily, Weekly, MonthlyDay, | 17 | enum RepeatType{ NoRepeat = -1, Daily, Weekly, MonthlyDay, |
18 | MonthlyDate, Yearly }; | 18 | MonthlyDate, Yearly }; |
19 | enum Days { MON = 0x01, TUE = 0x02, WED = 0x04, THU = 0x08, | 19 | enum Days { MON = 0x01, TUE = 0x02, WED = 0x04, THU = 0x08, |
20 | FRI = 0x10, SAT = 0x20, SUN = 0x40 }; | 20 | FRI = 0x10, SAT = 0x20, SUN = 0x40 }; |
21 | ORecur(); | 21 | ORecur(); |
22 | ORecur( const ORecur& ); | 22 | ORecur( const ORecur& ); |
23 | ~ORecur(); | 23 | ~ORecur(); |
24 | 24 | ||
25 | ORecur &operator=( const ORecur& ); | 25 | ORecur &operator=( const ORecur& ); |
26 | bool operator==(const ORecur& )const; | 26 | bool operator==(const ORecur& )const; |
27 | 27 | ||
28 | bool doesRecur()const; | 28 | bool doesRecur()const; |
29 | /* if it recurrs on that day */ | 29 | /* if it recurrs on that day */ |
30 | bool doesRecur( const QDate& ); | 30 | bool doesRecur( const QDate& ); |
31 | RepeatType type()const; | 31 | RepeatType type()const; |
32 | int frequency()const; | 32 | int frequency()const; |
33 | int position()const; | 33 | int position()const; |
34 | char days()const; | 34 | char days()const; |
35 | bool hasEndDate()const; | 35 | bool hasEndDate()const; |
36 | QDate start()const; | 36 | QDate start()const; |
37 | QDate endDate()const; | 37 | QDate endDate()const; |
38 | time_t endDateUTC()const; | 38 | QDateTime createdDateTime()const; |
39 | time_t createTime()const; | 39 | /** |
40 | * starting on monday=0, sunday=6 | ||
41 | * for convience | ||
42 | */ | ||
43 | bool repeatOnWeekDay( int day )const; | ||
40 | 44 | ||
41 | /** | 45 | /** |
42 | * FromWhereToStart is not included!!! | 46 | * FromWhereToStart is not included!!! |
43 | */ | 47 | */ |
44 | bool nextOcurrence( const QDate& FromWhereToStart, QDate &recurDate ); | 48 | bool nextOcurrence( const QDate& FromWhereToStart, QDate &recurDate ); |
49 | |||
45 | /** | 50 | /** |
46 | * The module this ORecur belongs to | 51 | * The module this ORecur belongs to |
47 | */ | 52 | */ |
48 | QString service()const; | 53 | QString service()const; |
49 | 54 | ||
50 | /* | 55 | /* |
51 | * reference to the exception list | 56 | * reference to the exception list |
52 | */ | 57 | */ |
53 | ExceptionList &exceptions(); | 58 | ExceptionList &exceptions(); |
54 | 59 | ||
55 | /** | 60 | /** |
56 | * the current repetition | 61 | * the current repetition |
57 | */ | 62 | */ |
58 | int repetition()const; | 63 | int repetition()const; |
59 | 64 | ||
60 | void setType( const RepeatType& ); | 65 | void setType( const RepeatType& ); |
61 | void setFrequency( int freq ); | 66 | void setFrequency( int freq ); |
62 | void setPosition( int pos ); | 67 | void setPosition( int pos ); |
63 | void setDays( char c); | 68 | void setDays( char c); |
64 | void setEndDate( const QDate& dt ); | 69 | void setEndDate( const QDate& dt ); |
65 | void setStart( const QDate& dt ); | 70 | void setStart( const QDate& dt ); |
66 | void setEndDateUTC( time_t ); | 71 | void setCreatedDateTime( const QDateTime& ); |
67 | void setCreateTime( time_t ); | ||
68 | void setHasEndDate( bool b ); | 72 | void setHasEndDate( bool b ); |
69 | void setRepitition(int ); | 73 | void setRepitition(int ); |
70 | 74 | ||
71 | void setService( const QString& ser ); | 75 | void setService( const QString& ser ); |
72 | private: | 76 | private: |
73 | void deref(); | 77 | void deref(); |
74 | inline void checkOrModify(); | 78 | inline void checkOrModify(); |
75 | 79 | ||
76 | 80 | ||
77 | class Data; | 81 | class Data; |
78 | Data* data; | 82 | Data* data; |
79 | class ORecurPrivate; | 83 | class ORecurPrivate; |
80 | ORecurPrivate *d; | 84 | ORecurPrivate *d; |
81 | }; | 85 | }; |
82 | 86 | ||
83 | #endif | 87 | #endif |