author | eilers <eilers> | 2003-12-08 15:18:10 (UTC) |
---|---|---|
committer | eilers <eilers> | 2003-12-08 15:18:10 (UTC) |
commit | 6974a4bbdc674a2a5d41d801f80035a183faedb5 (patch) (unidiff) | |
tree | 09a719ef263047e92ffb866da13168b7f7d41f23 /libopie/pim/orecur.h | |
parent | 7f2f736597490fd1592d7ed1f40e4abf824673c0 (diff) | |
download | opie-6974a4bbdc674a2a5d41d801f80035a183faedb5.zip opie-6974a4bbdc674a2a5d41d801f80035a183faedb5.tar.gz opie-6974a4bbdc674a2a5d41d801f80035a183faedb5.tar.bz2 |
Committing unfinished sql implementation before merging to libopie2 starts..
-rw-r--r-- | libopie/pim/orecur.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libopie/pim/orecur.h b/libopie/pim/orecur.h index 47901b0..7750c12 100644 --- a/libopie/pim/orecur.h +++ b/libopie/pim/orecur.h | |||
@@ -1,72 +1,73 @@ | |||
1 | /* | 1 | /* |
2 | * GPL from TT | 2 | * GPL from TT |
3 | */ | 3 | */ |
4 | 4 | ||
5 | #ifndef OPIE_RECUR_H | 5 | #ifndef OPIE_RECUR_H |
6 | #define OPIE_RECUR_H | 6 | #define OPIE_RECUR_H |
7 | 7 | ||
8 | #include <sys/types.h> | 8 | #include <sys/types.h> |
9 | 9 | ||
10 | #include <qdatetime.h> | 10 | #include <qdatetime.h> |
11 | #include <qvaluelist.h> | 11 | #include <qvaluelist.h> |
12 | #include <qmap.h> | 12 | #include <qmap.h> |
13 | 13 | ||
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 | enum Fields{ RType = 0, RWeekdays, RPosition, RFreq, RHasEndDate, | 21 | enum Fields{ RType = 0, RWeekdays, RPosition, RFreq, RHasEndDate, |
22 | EndDate, Created, Exceptions }; | 22 | EndDate, Created, Exceptions }; |
23 | 23 | ||
24 | ORecur(); | 24 | ORecur(); |
25 | ORecur( const QMap<int, QString>& map ); | ||
25 | ORecur( const ORecur& ); | 26 | ORecur( const ORecur& ); |
26 | ~ORecur(); | 27 | ~ORecur(); |
27 | 28 | ||
28 | ORecur &operator=( const ORecur& ); | 29 | ORecur &operator=( const ORecur& ); |
29 | bool operator==(const ORecur& )const; | 30 | bool operator==(const ORecur& )const; |
30 | 31 | ||
31 | bool doesRecur()const; | 32 | bool doesRecur()const; |
32 | /* if it recurrs on that day */ | 33 | /* if it recurrs on that day */ |
33 | bool doesRecur( const QDate& ); | 34 | bool doesRecur( const QDate& ); |
34 | RepeatType type()const; | 35 | RepeatType type()const; |
35 | int frequency()const; | 36 | int frequency()const; |
36 | int position()const; | 37 | int position()const; |
37 | char days()const; | 38 | char days()const; |
38 | bool hasEndDate()const; | 39 | bool hasEndDate()const; |
39 | QDate start()const; | 40 | QDate start()const; |
40 | QDate endDate()const; | 41 | QDate endDate()const; |
41 | QDateTime createdDateTime()const; | 42 | QDateTime createdDateTime()const; |
42 | /** | 43 | /** |
43 | * starting on monday=0, sunday=6 | 44 | * starting on monday=0, sunday=6 |
44 | * for convience | 45 | * for convience |
45 | */ | 46 | */ |
46 | bool repeatOnWeekDay( int day )const; | 47 | bool repeatOnWeekDay( int day )const; |
47 | 48 | ||
48 | /** | 49 | /** |
49 | * FromWhereToStart is not included!!! | 50 | * FromWhereToStart is not included!!! |
50 | */ | 51 | */ |
51 | bool nextOcurrence( const QDate& FromWhereToStart, QDate &recurDate ); | 52 | bool nextOcurrence( const QDate& FromWhereToStart, QDate &recurDate ); |
52 | 53 | ||
53 | /** | 54 | /** |
54 | * The module this ORecur belongs to | 55 | * The module this ORecur belongs to |
55 | */ | 56 | */ |
56 | QString service()const; | 57 | QString service()const; |
57 | 58 | ||
58 | /* | 59 | /* |
59 | * reference to the exception list | 60 | * reference to the exception list |
60 | */ | 61 | */ |
61 | ExceptionList &exceptions(); | 62 | ExceptionList &exceptions(); |
62 | 63 | ||
63 | /** | 64 | /** |
64 | * the current repetition | 65 | * the current repetition |
65 | */ | 66 | */ |
66 | int repetition()const; | 67 | int repetition()const; |
67 | 68 | ||
68 | void setType( const RepeatType& ); | 69 | void setType( const RepeatType& ); |
69 | void setFrequency( int freq ); | 70 | void setFrequency( int freq ); |
70 | void setPosition( int pos ); | 71 | void setPosition( int pos ); |
71 | void setDays( char c); | 72 | void setDays( char c); |
72 | void setEndDate( const QDate& dt ); | 73 | void setEndDate( const QDate& dt ); |