summaryrefslogtreecommitdiff
path: root/libopie/pim/otodo.h
Unidiff
Diffstat (limited to 'libopie/pim/otodo.h') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie/pim/otodo.h26
1 files changed, 16 insertions, 10 deletions
diff --git a/libopie/pim/otodo.h b/libopie/pim/otodo.h
index 429108a..e1729db 100644
--- a/libopie/pim/otodo.h
+++ b/libopie/pim/otodo.h
@@ -9,25 +9,25 @@
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 OTodo : public OPimRecord { 19class OTodo : public OPimRecord {
20public: 20public:
21 typedef QValueList<ToDoEvent> ValueList; 21 typedef QValueList<OTodo> ValueList;
22 enum RecordFields { 22 enum RecordFields {
23 Uid = Qtopia::UID_ID, 23 Uid = Qtopia::UID_ID,
24 Category = Qtopia::CATEGORY_ID, 24 Category = Qtopia::CATEGORY_ID,
25 HasDate, 25 HasDate,
26 Completed, 26 Completed,
27 Description, 27 Description,
28 Summary, 28 Summary,
29 Priority, 29 Priority,
30 DateDay, 30 DateDay,
31 DateMonth, 31 DateMonth,
32 DateYear, 32 DateYear,
33 Progress, 33 Progress,
@@ -109,24 +109,31 @@ public:
109 109
110 /** 110 /**
111 * A small summary of the todo 111 * A small summary of the todo
112 */ 112 */
113 QString summary() const; 113 QString summary() const;
114 114
115 /** 115 /**
116 * @reimplemented 116 * @reimplemented
117 * Return this todoevent in a RichText formatted QString 117 * Return this todoevent in a RichText formatted QString
118 */ 118 */
119 QString toRichText() const; 119 QString toRichText() const;
120 120
121 /**
122 * reimplementation
123 */
124 QString type()const;
125 QString toShortText()const;
126 QMap<QString, QString> toExtraMap()const;
127 QString recordField(int id )const;
121 128
122 /** 129 /**
123 * returns a list of apps which have related items 130 * returns a list of apps which have related items
124 */ 131 */
125 QStringList relatedApps()const; 132 QStringList relatedApps()const;
126 133
127 /** 134 /**
128 * returns all relations for one app 135 * returns all relations for one app
129 */ 136 */
130 QArray<int> relations( const QString& app )const; 137 QArray<int> relations( const QString& app )const;
131 138
132 /** 139 /**
@@ -174,32 +181,31 @@ public:
174 void setSummary(const QString& ); 181 void setSummary(const QString& );
175 bool isOverdue(); 182 bool isOverdue();
176 183
177 184
178 bool match( const QRegExp &r )const; 185 bool match( const QRegExp &r )const;
179 186
180 bool operator<(const OTodo &toDoEvent )const; 187 bool operator<(const OTodo &toDoEvent )const;
181 bool operator<=(const OTodo &toDoEvent )const; 188 bool operator<=(const OTodo &toDoEvent )const;
182 bool operator!=(const OTodo &toDoEvent )const; 189 bool operator!=(const OTodo &toDoEvent )const;
183 bool operator>(const OTodo &toDoEvent )const; 190 bool operator>(const OTodo &toDoEvent )const;
184 bool operator>=(const OTodo &toDoEvent)const; 191 bool operator>=(const OTodo &toDoEvent)const;
185 bool operator==(const OTodo &toDoEvent )const; 192 bool operator==(const OTodo &toDoEvent )const;
186 ToDoEvent &operator=(const OTodo &toDoEvent ); 193 OTodo &operator=(const OTodo &toDoEvent );
187 194
188 private: 195 private:
189 class OTodoPrivate; 196 class OTodoPrivate;
190 struct OTodoEventData; 197 struct OTodoData;
191 198
192 void deref(); 199 void deref();
193 void changeOrModify(); 200 void changeOrModify();
194 void copy( OTodoData* src, OTodoData* dest ); 201 void copy( OTodoData* src, OTodoData* dest );
195 ToDoEventPrivate *d; 202 OTodoPrivate *d;
196 ToDoEventData *data; 203 OTodoData *data;
197 204
198 static Qtopia::UidGen m_gen;
199};
200 inline bool ToDoEvent::operator!=(const ToDoEvent &toDoEvent )const {
201 return !(*this == toDoEvent);
202 }
203}; 205};
206inline bool OTodo::operator!=(const OTodo &toDoEvent )const {
207 return !(*this == toDoEvent);
208}
209
204 210
205#endif 211#endif