-rw-r--r-- | libopie2/opiepim/otodo.h | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/libopie2/opiepim/otodo.h b/libopie2/opiepim/otodo.h index 5bd91d6..2cdc587 100644 --- a/libopie2/opiepim/otodo.h +++ b/libopie2/opiepim/otodo.h | |||
@@ -13,12 +13,14 @@ | |||
13 | #include <qpe/recordfields.h> | 13 | #include <qpe/recordfields.h> |
14 | #include <qpe/palmtopuidgen.h> | 14 | #include <qpe/palmtopuidgen.h> |
15 | 15 | ||
16 | #include <opie/opimrecord.h> | 16 | #include <opie/opimrecord.h> |
17 | 17 | ||
18 | 18 | ||
19 | class OPimState; | ||
20 | class ORecur; | ||
19 | class OTodo : public OPimRecord { | 21 | class OTodo : public OPimRecord { |
20 | public: | 22 | public: |
21 | typedef QValueList<OTodo> ValueList; | 23 | typedef QValueList<OTodo> ValueList; |
22 | enum RecordFields { | 24 | enum RecordFields { |
23 | Uid = Qtopia::UID_ID, | 25 | Uid = Qtopia::UID_ID, |
24 | Category = Qtopia::CATEGORY_ID, | 26 | Category = Qtopia::CATEGORY_ID, |
@@ -30,13 +32,18 @@ public: | |||
30 | DateDay, | 32 | DateDay, |
31 | DateMonth, | 33 | DateMonth, |
32 | DateYear, | 34 | DateYear, |
33 | Progress, | 35 | Progress, |
34 | CrossReference, | 36 | CrossReference, |
35 | HasAlarmDateTime, | 37 | HasAlarmDateTime, |
36 | AlarmDateTime | 38 | AlarmDateTime, |
39 | State, | ||
40 | Recurrance, | ||
41 | Alarms, | ||
42 | Reminders, | ||
43 | Notifiers | ||
37 | }; | 44 | }; |
38 | public: | 45 | public: |
39 | // priorities from Very low to very high | 46 | // priorities from Very low to very high |
40 | enum TaskPriority { VeryHigh=1, High, Normal, Low, VeryLow }; | 47 | enum TaskPriority { VeryHigh=1, High, Normal, Low, VeryLow }; |
41 | 48 | ||
42 | /* Constructs a new ToDoEvent | 49 | /* Constructs a new ToDoEvent |
@@ -108,12 +115,22 @@ public: | |||
108 | /** | 115 | /** |
109 | * Alarm Date and Time | 116 | * Alarm Date and Time |
110 | */ | 117 | */ |
111 | QDateTime alarmDateTime()const; | 118 | QDateTime alarmDateTime()const; |
112 | 119 | ||
113 | /** | 120 | /** |
121 | * What is the state of this OTodo? | ||
122 | */ | ||
123 | OPimState state()const; | ||
124 | |||
125 | /** | ||
126 | * the recurrance of this | ||
127 | */ | ||
128 | ORecur recurrence()const; | ||
129 | |||
130 | /** | ||
114 | * The description of the todo | 131 | * The description of the todo |
115 | */ | 132 | */ |
116 | QString description()const; | 133 | QString description()const; |
117 | 134 | ||
118 | /** | 135 | /** |
119 | * A small summary of the todo | 136 | * A small summary of the todo |
@@ -167,19 +184,27 @@ public: | |||
167 | 184 | ||
168 | /** | 185 | /** |
169 | * set the end date | 186 | * set the end date |
170 | */ | 187 | */ |
171 | void setDueDate( QDate date ); | 188 | void setDueDate( QDate date ); |
172 | 189 | ||
190 | |||
191 | void setRecurrence( const ORecur& ); | ||
173 | /** | 192 | /** |
174 | * set the alarm time | 193 | * set the alarm time |
175 | */ | 194 | */ |
176 | void setAlarmDateTime ( const QDateTime& alarm ); | 195 | void setAlarmDateTime ( const QDateTime& alarm ); |
177 | 196 | ||
178 | void setDescription(const QString& ); | 197 | void setDescription(const QString& ); |
179 | void setSummary(const QString& ); | 198 | void setSummary(const QString& ); |
199 | |||
200 | /** | ||
201 | * set the state of a Todo | ||
202 | * @param state State what the todo should take | ||
203 | */ | ||
204 | void setState( const OPimState& state); | ||
180 | bool isOverdue(); | 205 | bool isOverdue(); |
181 | 206 | ||
182 | 207 | ||
183 | bool match( const QRegExp &r )const; | 208 | bool match( const QRegExp &r )const; |
184 | 209 | ||
185 | bool operator<(const OTodo &toDoEvent )const; | 210 | bool operator<(const OTodo &toDoEvent )const; |