author | zecke <zecke> | 2002-12-10 17:01:18 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-12-10 17:01:18 (UTC) |
commit | 4ecbf7407c19b59fc136c334f9386c53db453930 (patch) (unidiff) | |
tree | 1cba438e2533f7109af169b0b77988cec6664192 /libopie2/opiepim/core/otodoaccess.cpp | |
parent | 36375df6ff103e52455823f7afd64c4f4ae7fcb8 (diff) | |
download | opie-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.cpp | 32 |
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 | |||
@@ -1,21 +1,21 @@ | |||
1 | #include <qdatetime.h> | 1 | #include <qdatetime.h> |
2 | 2 | ||
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 | ||
9 | OTodoAccess::OTodoAccess( OTodoAccessBackend* end ) | 9 | OTodoAccess::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 ! |
16 | if (end == 0l ) | 16 | if (end == 0l ) |
17 | m_todoBackEnd = OBackendFactory<OTodoAccessBackend>::Default ("todo", QString::null); | 17 | m_todoBackEnd = OBackendFactory<OTodoAccessBackend>::Default ("todo", QString::null); |
18 | 18 | ||
19 | setBackEnd( m_todoBackEnd ); | 19 | setBackEnd( m_todoBackEnd ); |
20 | } | 20 | } |
21 | OTodoAccess::~OTodoAccess() { | 21 | OTodoAccess::~OTodoAccess() { |
@@ -35,52 +35,22 @@ OTodoAccess::List OTodoAccess::effectiveToDos( const QDate& start, | |||
35 | List lis( ints, this ); | 35 | List lis( ints, this ); |
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) { | ||
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 | } | ||
63 | void 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 */ |
78 | OTodoAccess::List OTodoAccess::sorted( bool ascending, int sort,int filter, int cat ) { | 48 | OTodoAccess::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; |
83 | } | 53 | } |
84 | void OTodoAccess::removeAllCompleted() { | 54 | void OTodoAccess::removeAllCompleted() { |
85 | m_todoBackEnd->removeAllCompleted(); | 55 | m_todoBackEnd->removeAllCompleted(); |
86 | } | 56 | } |