summaryrefslogtreecommitdiff
path: root/libopie2/opiepim/otodo.h
Unidiff
Diffstat (limited to 'libopie2/opiepim/otodo.h') (more/less context) (show whitespace changes)
-rw-r--r--libopie2/opiepim/otodo.h27
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
@@ -7,42 +7,49 @@
7#include <qmap.h> 7#include <qmap.h>
8#include <qregexp.h> 8#include <qregexp.h>
9#include <qstringlist.h> 9#include <qstringlist.h>
10#include <qdatetime.h> 10#include <qdatetime.h>
11#include <qvaluelist.h> 11#include <qvaluelist.h>
12 12
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
19class OPimState;
20class ORecur;
19class OTodo : public OPimRecord { 21class OTodo : public OPimRecord {
20public: 22public:
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,
25 HasDate, 27 HasDate,
26 Completed, 28 Completed,
27 Description, 29 Description,
28 Summary, 30 Summary,
29 Priority, 31 Priority,
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
43 @param completed Is the TodoEvent completed 50 @param completed Is the TodoEvent completed
44 @param priority What is the priority of this ToDoEvent 51 @param priority What is the priority of this ToDoEvent
45 @param category Which category does it belong( uid ) 52 @param category Which category does it belong( uid )
46 @param summary A small summary of the todo 53 @param summary A small summary of the todo
47 @param description What is this ToDoEvent about 54 @param description What is this ToDoEvent about
48 @param hasDate Does this Event got a deadline 55 @param hasDate Does this Event got a deadline
@@ -102,24 +109,34 @@ public:
102 109
103 /** 110 /**
104 * The due Date 111 * The due Date
105 */ 112 */
106 QDate dueDate()const; 113 QDate dueDate()const;
107 114
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
120 */ 137 */
121 QString summary() const; 138 QString summary() const;
122 139
123 /** 140 /**
124 * @reimplemented 141 * @reimplemented
125 * Return this todoevent in a RichText formatted QString 142 * Return this todoevent in a RichText formatted QString
@@ -161,31 +178,39 @@ public:
161 void setPriority(int priority ); 178 void setPriority(int priority );
162 179
163 /** 180 /**
164 * Set the progress. 181 * Set the progress.
165 */ 182 */
166 void setProgress( ushort progress ); 183 void setProgress( ushort progress );
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;
186 bool operator<=(const OTodo &toDoEvent )const; 211 bool operator<=(const OTodo &toDoEvent )const;
187 bool operator!=(const OTodo &toDoEvent )const; 212 bool operator!=(const OTodo &toDoEvent )const;
188 bool operator>(const OTodo &toDoEvent )const; 213 bool operator>(const OTodo &toDoEvent )const;
189 bool operator>=(const OTodo &toDoEvent)const; 214 bool operator>=(const OTodo &toDoEvent)const;
190 bool operator==(const OTodo &toDoEvent )const; 215 bool operator==(const OTodo &toDoEvent )const;
191 OTodo &operator=(const OTodo &toDoEvent ); 216 OTodo &operator=(const OTodo &toDoEvent );