summaryrefslogtreecommitdiff
path: root/libopie2/opiepim/core/otodoaccess.cpp
authorzecke <zecke>2002-12-10 17:01:18 (UTC)
committer zecke <zecke>2002-12-10 17:01:18 (UTC)
commit4ecbf7407c19b59fc136c334f9386c53db453930 (patch) (unidiff)
tree1cba438e2533f7109af169b0b77988cec6664192 /libopie2/opiepim/core/otodoaccess.cpp
parent36375df6ff103e52455823f7afd64c4f4ae7fcb8 (diff)
downloadopie-4ecbf7407c19b59fc136c334f9386c53db453930.zip
opie-4ecbf7407c19b59fc136c334f9386c53db453930.tar.gz
opie-4ecbf7407c19b59fc136c334f9386c53db453930.tar.bz2
get in sync with HEAD again
-OPimBase was added to be used as a default struct inside OPimResolver and to work with DSOs -TodoListXML backend now uses mmap and madvise to load data -OContact added/changed rtti -OTodo added changed rtti OPimAccess* added stuff necessary for the Resolver and a 'state'/'hint' on how to load data OPimResolver which resolves uid + services to Records, rtti to QCOPChannels loads arbitary Service backends ( will work with DSOs soon ) -OPimMainWindow added some setDocument scripting possibility and internal marshalling and demarshalling of Records -OPimRecord added loadDataFromm and saveDataTo for marshalling purposes much more :)
Diffstat (limited to 'libopie2/opiepim/core/otodoaccess.cpp') (more/less context) (show whitespace changes)
-rw-r--r--libopie2/opiepim/core/otodoaccess.cpp32
1 files changed, 1 insertions, 31 deletions
diff --git a/libopie2/opiepim/core/otodoaccess.cpp b/libopie2/opiepim/core/otodoaccess.cpp
index d860411..5e89a1b 100644
--- a/libopie2/opiepim/core/otodoaccess.cpp
+++ b/libopie2/opiepim/core/otodoaccess.cpp
@@ -3,13 +3,13 @@
3#include <qpe/alarmserver.h> 3#include <qpe/alarmserver.h>
4 4
5// #include "otodoaccesssql.h" 5// #include "otodoaccesssql.h"
6#include "otodoaccess.h" 6#include "otodoaccess.h"
7#include "obackendfactory.h" 7#include "obackendfactory.h"
8 8
9OTodoAccess::OTodoAccess( OTodoAccessBackend* end ) 9OTodoAccess::OTodoAccess( OTodoAccessBackend* end, enum Access )
10 : QObject(), OPimAccessTemplate<OTodo>( end ), m_todoBackEnd( end ) 10 : QObject(), OPimAccessTemplate<OTodo>( end ), m_todoBackEnd( end )
11{ 11{
12// if (end == 0l ) 12// if (end == 0l )
13// m_todoBackEnd = new OTodoAccessBackendSQL( QString::null); 13// m_todoBackEnd = new OTodoAccessBackendSQL( QString::null);
14 14
15 // Zecke: Du musst hier noch für das XML-Backend einen Appnamen übergeben ! 15 // Zecke: Du musst hier noch für das XML-Backend einen Appnamen übergeben !
@@ -41,42 +41,12 @@ OTodoAccess::List OTodoAccess::effectiveToDos( const QDate& start,
41 includeNoDates ); 41 includeNoDates );
42} 42}
43OTodoAccess::List OTodoAccess::overDue() { 43OTodoAccess::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}
47void OTodoAccess::addAlarm( const OTodo& event) {
48/* FIXME use the new notifier architecture
49 if (!event.hasAlarmDateTime() )
50 return;
51
52 QDateTime now = QDateTime::currentDateTime();
53 QDateTime schedule = event.alarmDateTime();
54
55 if ( schedule > now ){
56 AlarmServer::addAlarm( schedule,
57 "QPE/Application/todolist",
58 "alarm(QDateTime,int)", event.uid() );
59
60 }
61*/
62}
63void OTodoAccess::delAlarm( int uid) {
64
65 QDateTime schedule; // Create null DateTime
66
67 // I hope this will remove all scheduled alarms
68 // with the given uid !?
69 // If not: I have to rethink how to remove already
70 // scheduled events... (se)
71 // it should be fine -zecke
72// qWarning("Removing alarm for event with uid %d", uid );
73 AlarmServer::deleteAlarm( schedule ,
74 "QPE/Application/todolist",
75 "alarm(QDateTime,int)", uid );
76}
77/* sort order */ 47/* sort order */
78OTodoAccess::List OTodoAccess::sorted( bool ascending, int sort,int filter, int cat ) { 48OTodoAccess::List OTodoAccess::sorted( bool ascending, int sort,int filter, int cat ) {
79 QArray<int> ints = m_todoBackEnd->sorted( ascending, sort, 49 QArray<int> ints = m_todoBackEnd->sorted( ascending, sort,
80 filter, cat ); 50 filter, cat );
81 OTodoAccess::List list( ints, this ); 51 OTodoAccess::List list( ints, this );
82 return list; 52 return list;