summaryrefslogtreecommitdiff
path: root/include/opie/tododb.h
Unidiff
Diffstat (limited to 'include/opie/tododb.h') (more/less context) (ignore whitespace changes)
-rw-r--r--include/opie/tododb.h40
1 files changed, 40 insertions, 0 deletions
diff --git a/include/opie/tododb.h b/include/opie/tododb.h
new file mode 100644
index 0000000..6478363
--- a/dev/null
+++ b/include/opie/tododb.h
@@ -0,0 +1,40 @@
1
2#ifndef tododb_h
3#define tododb_h
4
5#include <qvaluelist.h>
6
7#include <opie/todoevent.h>
8
9class ToDoDB
10{
11 public:
12 // if no argument is supplied pick the default book
13 ToDoDB(const QString &fileName = QString::null );
14 ~ToDoDB();
15 QValueList<ToDoEvent> effectiveToDos(const QDate &from,
16 const QDate &to,
17 bool includeNoDates = true);
18 QValueList<ToDoEvent> effectiveToDos(const QDate &start, bool includeNoDates = true );
19 QValueList<ToDoEvent> rawToDos(); // all events
20 QValueList<ToDoEvent> overDue();
21
22 void addEvent(const ToDoEvent &event );
23 void editEvent(const ToDoEvent &editEvent );
24 void removeEvent(const ToDoEvent &event);
25
26 void reload();
27 void setFileName(const QString & );
28 QString fileName()const;
29 bool save();
30
31 private:
32 class ToDoDBPrivate;
33 ToDoDBPrivate *d;
34 QString m_fileName;
35 QValueList<ToDoEvent> m_todos;
36 void load();
37};
38
39
40#endif