author | mickeyl <mickeyl> | 2004-11-16 19:14:18 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2004-11-16 19:14:18 (UTC) |
commit | ea3945a9bd8f9830f70b1efa133f9df13b19362f (patch) (unidiff) | |
tree | f2ea22cc50e9aa8aa73ee7dea148f41c563c9666 /noncore/unsupported/libopie/pim/otodoaccess.cpp | |
parent | 1c6f490e8541626f68422e0a3a7c7281d7f5b7d3 (diff) | |
download | opie-ea3945a9bd8f9830f70b1efa133f9df13b19362f.zip opie-ea3945a9bd8f9830f70b1efa133f9df13b19362f.tar.gz opie-ea3945a9bd8f9830f70b1efa133f9df13b19362f.tar.bz2 |
libopie1 goes into unsupported
Diffstat (limited to 'noncore/unsupported/libopie/pim/otodoaccess.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/unsupported/libopie/pim/otodoaccess.cpp | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/noncore/unsupported/libopie/pim/otodoaccess.cpp b/noncore/unsupported/libopie/pim/otodoaccess.cpp new file mode 100644 index 0000000..37f6fbc --- a/dev/null +++ b/noncore/unsupported/libopie/pim/otodoaccess.cpp | |||
@@ -0,0 +1,62 @@ | |||
1 | #include <qdatetime.h> | ||
2 | |||
3 | #include <qpe/alarmserver.h> | ||
4 | |||
5 | // #include "otodoaccesssql.h" | ||
6 | #include "otodoaccess.h" | ||
7 | #include "obackendfactory.h" | ||
8 | |||
9 | OTodoAccess::OTodoAccess( OTodoAccessBackend* end, enum Access ) | ||
10 | : QObject(), OPimAccessTemplate<OTodo>( end ), m_todoBackEnd( end ) | ||
11 | { | ||
12 | // if (end == 0l ) | ||
13 | // m_todoBackEnd = new OTodoAccessBackendSQL( QString::null); | ||
14 | |||
15 | // Zecke: Du musst hier noch für das XML-Backend einen Appnamen übergeben ! | ||
16 | if (end == 0l ) | ||
17 | m_todoBackEnd = OBackendFactory<OTodoAccessBackend>::Default ("todo", QString::null); | ||
18 | |||
19 | setBackEnd( m_todoBackEnd ); | ||
20 | } | ||
21 | OTodoAccess::~OTodoAccess() { | ||
22 | // qWarning("~OTodoAccess"); | ||
23 | } | ||
24 | void OTodoAccess::mergeWith( const QValueList<OTodo>& list ) { | ||
25 | QValueList<OTodo>::ConstIterator it; | ||
26 | for ( it = list.begin(); it != list.end(); ++it ) { | ||
27 | replace( (*it) ); | ||
28 | } | ||
29 | } | ||
30 | OTodoAccess::List OTodoAccess::effectiveToDos( const QDate& start, | ||
31 | const QDate& end, | ||
32 | bool includeNoDates ) { | ||
33 | QArray<int> ints = m_todoBackEnd->effectiveToDos( start, end, includeNoDates ); | ||
34 | |||
35 | List lis( ints, this ); | ||
36 | return lis; | ||
37 | } | ||
38 | OTodoAccess::List OTodoAccess::effectiveToDos( const QDate& start, | ||
39 | bool includeNoDates ) { | ||
40 | return effectiveToDos( start, QDate::currentDate(), | ||
41 | includeNoDates ); | ||
42 | } | ||
43 | OTodoAccess::List OTodoAccess::overDue() { | ||
44 | List lis( m_todoBackEnd->overDue(), this ); | ||
45 | return lis; | ||
46 | } | ||
47 | /* sort order */ | ||
48 | OTodoAccess::List OTodoAccess::sorted( bool ascending, int sort,int filter, int cat ) { | ||
49 | QArray<int> ints = m_todoBackEnd->sorted( ascending, sort, | ||
50 | filter, cat ); | ||
51 | OTodoAccess::List list( ints, this ); | ||
52 | return list; | ||
53 | } | ||
54 | void OTodoAccess::removeAllCompleted() { | ||
55 | m_todoBackEnd->removeAllCompleted(); | ||
56 | } | ||
57 | QBitArray OTodoAccess::backendSupport( const QString& ) const{ | ||
58 | return m_todoBackEnd->supports(); | ||
59 | } | ||
60 | bool OTodoAccess::backendSupports( int attr, const QString& ar) const{ | ||
61 | return backendSupport(ar).testBit( attr ); | ||
62 | } | ||