Diffstat (limited to 'libopie2/opiepim/core/otodoaccess.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | libopie2/opiepim/core/otodoaccess.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libopie2/opiepim/core/otodoaccess.cpp b/libopie2/opiepim/core/otodoaccess.cpp index c258de6..d860411 100644 --- a/libopie2/opiepim/core/otodoaccess.cpp +++ b/libopie2/opiepim/core/otodoaccess.cpp | |||
@@ -36,46 +36,51 @@ OTodoAccess::List OTodoAccess::effectiveToDos( const QDate& start, | |||
36 | return lis; | 36 | return lis; |
37 | } | 37 | } |
38 | OTodoAccess::List OTodoAccess::effectiveToDos( const QDate& start, | 38 | OTodoAccess::List OTodoAccess::effectiveToDos( const QDate& start, |
39 | bool includeNoDates ) { | 39 | bool includeNoDates ) { |
40 | return effectiveToDos( start, QDate::currentDate(), | 40 | return effectiveToDos( start, QDate::currentDate(), |
41 | includeNoDates ); | 41 | includeNoDates ); |
42 | } | 42 | } |
43 | OTodoAccess::List OTodoAccess::overDue() { | 43 | OTodoAccess::List OTodoAccess::overDue() { |
44 | List lis( m_todoBackEnd->overDue(), this ); | 44 | List lis( m_todoBackEnd->overDue(), this ); |
45 | return lis; | 45 | return lis; |
46 | } | 46 | } |
47 | void OTodoAccess::addAlarm( const OTodo& event) { | 47 | void OTodoAccess::addAlarm( const OTodo& event) { |
48 | /* FIXME use the new notifier architecture | ||
48 | if (!event.hasAlarmDateTime() ) | 49 | if (!event.hasAlarmDateTime() ) |
49 | return; | 50 | return; |
50 | 51 | ||
51 | QDateTime now = QDateTime::currentDateTime(); | 52 | QDateTime now = QDateTime::currentDateTime(); |
52 | QDateTime schedule = event.alarmDateTime(); | 53 | QDateTime schedule = event.alarmDateTime(); |
53 | 54 | ||
54 | if ( schedule > now ){ | 55 | if ( schedule > now ){ |
55 | AlarmServer::addAlarm( schedule, | 56 | AlarmServer::addAlarm( schedule, |
56 | "QPE/Application/todolist", | 57 | "QPE/Application/todolist", |
57 | "alarm(QDateTime,int)", event.uid() ); | 58 | "alarm(QDateTime,int)", event.uid() ); |
58 | 59 | ||
59 | } | 60 | } |
61 | */ | ||
60 | } | 62 | } |
61 | void OTodoAccess::delAlarm( int uid) { | 63 | void OTodoAccess::delAlarm( int uid) { |
62 | 64 | ||
63 | QDateTime schedule; // Create null DateTime | 65 | QDateTime schedule; // Create null DateTime |
64 | 66 | ||
65 | // I hope this will remove all scheduled alarms | 67 | // I hope this will remove all scheduled alarms |
66 | // with the given uid !? | 68 | // with the given uid !? |
67 | // If not: I have to rethink how to remove already | 69 | // If not: I have to rethink how to remove already |
68 | // scheduled events... (se) | 70 | // scheduled events... (se) |
69 | // it should be fine -zecke | 71 | // it should be fine -zecke |
70 | // qWarning("Removing alarm for event with uid %d", uid ); | 72 | // qWarning("Removing alarm for event with uid %d", uid ); |
71 | AlarmServer::deleteAlarm( schedule , | 73 | AlarmServer::deleteAlarm( schedule , |
72 | "QPE/Application/todolist", | 74 | "QPE/Application/todolist", |
73 | "alarm(QDateTime,int)", uid ); | 75 | "alarm(QDateTime,int)", uid ); |
74 | } | 76 | } |
75 | /* sort order */ | 77 | /* sort order */ |
76 | OTodoAccess::List OTodoAccess::sorted( bool ascending, int sort,int filter, int cat ) { | 78 | OTodoAccess::List OTodoAccess::sorted( bool ascending, int sort,int filter, int cat ) { |
77 | QArray<int> ints = m_todoBackEnd->sorted( ascending, sort, | 79 | QArray<int> ints = m_todoBackEnd->sorted( ascending, sort, |
78 | filter, cat ); | 80 | filter, cat ); |
79 | OTodoAccess::List list( ints, this ); | 81 | OTodoAccess::List list( ints, this ); |
80 | return list; | 82 | return list; |
81 | } | 83 | } |
84 | void OTodoAccess::removeAllCompleted() { | ||
85 | m_todoBackEnd->removeAllCompleted(); | ||
86 | } | ||