summaryrefslogtreecommitdiff
path: root/libopie/tododb.h
authorharlekin <harlekin>2002-03-18 21:24:16 (UTC)
committer harlekin <harlekin>2002-03-18 21:24:16 (UTC)
commit0a553fa7c46beb00d2a852ecf61233569b5a5e4e (patch) (side-by-side diff)
treef13c2b8ebb57c064a51ac4e132b2a030338263b8 /libopie/tododb.h
parent29628f9eaa9f2436d8f590c014bb41d35c8cf65f (diff)
downloadopie-0a553fa7c46beb00d2a852ecf61233569b5a5e4e.zip
opie-0a553fa7c46beb00d2a852ecf61233569b5a5e4e.tar.gz
opie-0a553fa7c46beb00d2a852ecf61233569b5a5e4e.tar.bz2
tododb - simular to datebookdb but for todos, initial import
Diffstat (limited to 'libopie/tododb.h') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie/tododb.h40
1 files changed, 40 insertions, 0 deletions
diff --git a/libopie/tododb.h b/libopie/tododb.h
new file mode 100644
index 0000000..6478363
--- a/dev/null
+++ b/libopie/tododb.h
@@ -0,0 +1,40 @@
+
+#ifndef tododb_h
+#define tododb_h
+
+#include <qvaluelist.h>
+
+#include <opie/todoevent.h>
+
+class ToDoDB
+{
+ public:
+ // if no argument is supplied pick the default book
+ ToDoDB(const QString &fileName = QString::null );
+ ~ToDoDB();
+ QValueList<ToDoEvent> effectiveToDos(const QDate &from,
+ const QDate &to,
+ bool includeNoDates = true);
+ QValueList<ToDoEvent> effectiveToDos(const QDate &start, bool includeNoDates = true );
+ QValueList<ToDoEvent> rawToDos(); // all events
+ QValueList<ToDoEvent> overDue();
+
+ void addEvent(const ToDoEvent &event );
+ void editEvent(const ToDoEvent &editEvent );
+ void removeEvent(const ToDoEvent &event);
+
+ void reload();
+ void setFileName(const QString & );
+ QString fileName()const;
+ bool save();
+
+ private:
+ class ToDoDBPrivate;
+ ToDoDBPrivate *d;
+ QString m_fileName;
+ QValueList<ToDoEvent> m_todos;
+ void load();
+};
+
+
+#endif