Diffstat (limited to 'libopie2/opiepim/core/orecur.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie2/opiepim/core/orecur.h | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/libopie2/opiepim/core/orecur.h b/libopie2/opiepim/core/orecur.h new file mode 100644 index 0000000..89258f8 --- a/dev/null +++ b/libopie2/opiepim/core/orecur.h | |||
@@ -0,0 +1,54 @@ | |||
1 | /* | ||
2 | * GPL from TT | ||
3 | */ | ||
4 | |||
5 | #ifndef OPIE_RECUR_H | ||
6 | #define OPIE_RECUR_H | ||
7 | |||
8 | #include <sys/types.h> | ||
9 | |||
10 | #include <qdatetime.h> | ||
11 | |||
12 | |||
13 | |||
14 | class ORecur { | ||
15 | public: | ||
16 | enum RepeatType{ NoRepeat = -1, Daily, Weekly, MonthlyDay, | ||
17 | MonthlyDate, Yearly }; | ||
18 | enum Days { MON = 0x01, TUE = 0x02, WED = 0x04, THU = 0x08, | ||
19 | FRI = 0x10, SAT = 0x20, SUN = 0x40 }; | ||
20 | ORecur(); | ||
21 | ORecur( const ORecur& ); | ||
22 | ~ORecur(); | ||
23 | |||
24 | ORecur &operator=( const ORecur& ); | ||
25 | bool operator==(const ORecur& )const; | ||
26 | RepeatType type()const; | ||
27 | int frequency()const; | ||
28 | int position()const; | ||
29 | char days()const; | ||
30 | bool hasEndDate()const; | ||
31 | QDate endDate()const; | ||
32 | time_t endDateUTC()const; | ||
33 | time_t createTime()const; | ||
34 | |||
35 | void setType( const RepeatType& ); | ||
36 | void setFrequency( int freq ); | ||
37 | void setPosition( int pos ); | ||
38 | void setDays( char c); | ||
39 | void setEndDate( const QDate& dt ); | ||
40 | void setEndDateUTC( time_t ); | ||
41 | void setCreateTime( time_t ); | ||
42 | void setHasEndDate( bool b ); | ||
43 | private: | ||
44 | void deref(); | ||
45 | inline void checkOrModify(); | ||
46 | |||
47 | |||
48 | class Data; | ||
49 | Data* data; | ||
50 | class ORecurPrivate; | ||
51 | ORecurPrivate *d; | ||
52 | }; | ||
53 | |||
54 | #endif | ||