author | zecke <zecke> | 2002-11-30 11:28:47 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-11-30 11:28:47 (UTC) |
commit | 9b8b30fa6cbdf1424b29cde21fae112e8bf96e6d (patch) (unidiff) | |
tree | 896dd858dc2ec2f0b7e1b265cae66ccceecc82da /libopie/pim/orecur.h | |
parent | 599c58c6ab2ab936890cbbfa4e6299493c141f8a (diff) | |
download | opie-9b8b30fa6cbdf1424b29cde21fae112e8bf96e6d.zip opie-9b8b30fa6cbdf1424b29cde21fae112e8bf96e6d.tar.gz opie-9b8b30fa6cbdf1424b29cde21fae112e8bf96e6d.tar.bz2 |
More infrastructure
ORecur has now the nextOccurence function
exceptions
We've now Notifers like Alarms and DatebookEntries
we may add to execute applications...
AppName replaced with service cause it is a service
Add rtti to OPimRecord as a static function
This is used inside the BackEnd classes to static_cast...
added removeAllCompleted to the todobackends...
add a common Opie PIM mainwindow which takes care of some simple
scripting enchangements..
much more
-rw-r--r-- | libopie/pim/orecur.h | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/libopie/pim/orecur.h b/libopie/pim/orecur.h index d24d72d..8713d97 100644 --- a/libopie/pim/orecur.h +++ b/libopie/pim/orecur.h | |||
@@ -8,11 +8,12 @@ | |||
8 | #include <sys/types.h> | 8 | #include <sys/types.h> |
9 | 9 | ||
10 | #include <qdatetime.h> | 10 | #include <qdatetime.h> |
11 | 11 | #include <qvaluelist.h> | |
12 | 12 | ||
13 | 13 | ||
14 | class ORecur { | 14 | class ORecur { |
15 | public: | 15 | public: |
16 | typedef QValueList<QDate> ExceptionList; | ||
16 | enum RepeatType{ NoRepeat = -1, Daily, Weekly, MonthlyDay, | 17 | enum RepeatType{ NoRepeat = -1, Daily, Weekly, MonthlyDay, |
17 | MonthlyDate, Yearly }; | 18 | MonthlyDate, Yearly }; |
18 | enum Days { MON = 0x01, TUE = 0x02, WED = 0x04, THU = 0x08, | 19 | enum Days { MON = 0x01, TUE = 0x02, WED = 0x04, THU = 0x08, |
@@ -23,14 +24,37 @@ public: | |||
23 | 24 | ||
24 | ORecur &operator=( const ORecur& ); | 25 | ORecur &operator=( const ORecur& ); |
25 | bool operator==(const ORecur& )const; | 26 | bool operator==(const ORecur& )const; |
27 | |||
28 | bool doesRecur()const; | ||
29 | /* if it recurrs on that day */ | ||
30 | bool doesRecur( const QDate& ); | ||
26 | RepeatType type()const; | 31 | RepeatType type()const; |
27 | int frequency()const; | 32 | int frequency()const; |
28 | int position()const; | 33 | int position()const; |
29 | char days()const; | 34 | char days()const; |
30 | bool hasEndDate()const; | 35 | bool hasEndDate()const; |
36 | QDate start()const; | ||
31 | QDate endDate()const; | 37 | QDate endDate()const; |
32 | time_t endDateUTC()const; | 38 | time_t endDateUTC()const; |
33 | time_t createTime()const; | 39 | time_t createTime()const; |
40 | |||
41 | /** | ||
42 | * FromWhereToStart is not included!!! | ||
43 | */ | ||
44 | bool nextOcurrence( const QDate& FromWhereToStart, QDate &recurDate ); | ||
45 | /** | ||
46 | * The module this ORecur belongs to | ||
47 | */ | ||
48 | QString service()const; | ||
49 | |||
50 | /* | ||
51 | * reference to the exception list | ||
52 | */ | ||
53 | ExceptionList &exceptions(); | ||
54 | |||
55 | /** | ||
56 | * the current repetition | ||
57 | */ | ||
34 | int repetition()const; | 58 | int repetition()const; |
35 | 59 | ||
36 | void setType( const RepeatType& ); | 60 | void setType( const RepeatType& ); |
@@ -38,10 +62,13 @@ public: | |||
38 | void setPosition( int pos ); | 62 | void setPosition( int pos ); |
39 | void setDays( char c); | 63 | void setDays( char c); |
40 | void setEndDate( const QDate& dt ); | 64 | void setEndDate( const QDate& dt ); |
65 | void setStart( const QDate& dt ); | ||
41 | void setEndDateUTC( time_t ); | 66 | void setEndDateUTC( time_t ); |
42 | void setCreateTime( time_t ); | 67 | void setCreateTime( time_t ); |
43 | void setHasEndDate( bool b ); | 68 | void setHasEndDate( bool b ); |
44 | void setRepitition(int ); | 69 | void setRepitition(int ); |
70 | |||
71 | void setService( const QString& ser ); | ||
45 | private: | 72 | private: |
46 | void deref(); | 73 | void deref(); |
47 | inline void checkOrModify(); | 74 | inline void checkOrModify(); |