summaryrefslogtreecommitdiff
path: root/libopie/pim/otodo.cpp
Side-by-side diff
Diffstat (limited to 'libopie/pim/otodo.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie/pim/otodo.cpp23
1 files changed, 21 insertions, 2 deletions
diff --git a/libopie/pim/otodo.cpp b/libopie/pim/otodo.cpp
index 765d5a9..0d5b1d3 100644
--- a/libopie/pim/otodo.cpp
+++ b/libopie/pim/otodo.cpp
@@ -14,3 +14,4 @@
-
+#include "opimstate.h"
+#include "orecur.h"
#include "otodo.h"
@@ -32,2 +33,4 @@ struct OTodo::OTodoData : public QShared {
QDateTime alarmDateTime;
+ OPimState state;
+ ORecur recur;
};
@@ -146,2 +149,8 @@ QString OTodo::description()const
}
+OPimState OTodo::state()const {
+ return data->state;
+}
+ORecur OTodo::recurrence()const {
+ return data->recur;
+}
void OTodo::setCompleted( bool completed )
@@ -187,2 +196,10 @@ void OTodo::setAlarmDateTime( const QDateTime& alarm )
}
+void OTodo::setState( const OPimState& state ) {
+ changeOrModify();
+ data->state = state;
+}
+void OTodo::setRecurrence( const ORecur& rec) {
+ changeOrModify();
+ data->recur = rec;
+}
bool OTodo::isOverdue( )
@@ -360,3 +377,3 @@ void OTodo::changeOrModify() {
if ( data->count != 1 ) {
-// qWarning("changeOrModify");
+ qWarning("changeOrModify");
data->deref();
@@ -378,2 +395,4 @@ void OTodo::copy( OTodoData* src, OTodoData* dest ) {
dest->alarmDateTime = src->alarmDateTime;
+ dest->state = src->state;
+ dest->recur = src->recur;
}