Diffstat (limited to 'libopie2/opiepim/core/otodoaccess.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie2/opiepim/core/otodoaccess.cpp | 23 |
1 files changed, 5 insertions, 18 deletions
diff --git a/libopie2/opiepim/core/otodoaccess.cpp b/libopie2/opiepim/core/otodoaccess.cpp index 26a68a0..4ad5950 100644 --- a/libopie2/opiepim/core/otodoaccess.cpp +++ b/libopie2/opiepim/core/otodoaccess.cpp | |||
@@ -41,61 +41,48 @@ OPimTodoAccess::OPimTodoAccess( OPimTodoAccessBackend* end, enum Access ) | |||
41 | : QObject(), OPimAccessTemplate<OPimTodo>( end ), m_todoBackEnd( end ) | 41 | : QObject(), OPimAccessTemplate<OPimTodo>( end ), m_todoBackEnd( end ) |
42 | { | 42 | { |
43 | // if (end == 0l ) | 43 | // if (end == 0l ) |
44 | // m_todoBackEnd = new OPimTodoAccessBackendSQL( QString::null); | 44 | // m_todoBackEnd = new OPimTodoAccessBackendSQL( QString::null); |
45 | 45 | ||
46 | // Zecke: Du musst hier noch fr das XML-Backend einen Appnamen bergeben ! | 46 | // Zecke: Du musst hier noch fr das XML-Backend einen Appnamen bergeben ! |
47 | if (end == 0l ) | 47 | if (end == 0l ) |
48 | m_todoBackEnd = OBackendFactory<OPimTodoAccessBackend>::defaultBackend (OPimGlobal::TODOLIST, QString::null); | 48 | m_todoBackEnd = OBackendFactory<OPimTodoAccessBackend>::defaultBackend (OPimGlobal::TODOLIST, QString::null); |
49 | 49 | ||
50 | setBackEnd( m_todoBackEnd ); | 50 | setBackEnd( m_todoBackEnd ); |
51 | } | 51 | } |
52 | OPimTodoAccess::~OPimTodoAccess() { | 52 | OPimTodoAccess::~OPimTodoAccess() { |
53 | // owarn << "~OPimTodoAccess" << oendl; | ||
54 | } | 53 | } |
54 | |||
55 | void OPimTodoAccess::mergeWith( const QValueList<OPimTodo>& list ) { | 55 | void OPimTodoAccess::mergeWith( const QValueList<OPimTodo>& list ) { |
56 | QValueList<OPimTodo>::ConstIterator it; | 56 | QValueList<OPimTodo>::ConstIterator it; |
57 | for ( it = list.begin(); it != list.end(); ++it ) { | 57 | for ( it = list.begin(); it != list.end(); ++it ) { |
58 | replace( (*it) ); | 58 | replace( (*it) ); |
59 | } | 59 | } |
60 | } | 60 | } |
61 | OPimTodoAccess::List OPimTodoAccess::effectiveToDos( const QDate& start, | 61 | OPimTodoAccess::List OPimTodoAccess::effectiveToDos( const QDate& start, |
62 | const QDate& end, | 62 | const QDate& end, |
63 | bool includeNoDates ) { | 63 | bool includeNoDates )const { |
64 | QArray<int> ints = m_todoBackEnd->effectiveToDos( start, end, includeNoDates ); | 64 | QArray<int> ints = m_todoBackEnd->effectiveToDos( start, end, includeNoDates ); |
65 | 65 | ||
66 | List lis( ints, this ); | 66 | List lis( ints, this ); |
67 | return lis; | 67 | return lis; |
68 | } | 68 | } |
69 | OPimTodoAccess::List OPimTodoAccess::effectiveToDos( const QDate& start, | 69 | OPimTodoAccess::List OPimTodoAccess::effectiveToDos( const QDate& start, |
70 | bool includeNoDates ) { | 70 | bool includeNoDates )const { |
71 | return effectiveToDos( start, QDate::currentDate(), | 71 | return effectiveToDos( start, QDate::currentDate(), |
72 | includeNoDates ); | 72 | includeNoDates ); |
73 | } | 73 | } |
74 | OPimTodoAccess::List OPimTodoAccess::overDue() { | 74 | OPimTodoAccess::List OPimTodoAccess::overDue()const { |
75 | List lis( m_todoBackEnd->overDue(), this ); | 75 | List lis( m_todoBackEnd->overDue(), this ); |
76 | return lis; | 76 | return lis; |
77 | } | 77 | } |
78 | /* sort order */ | 78 | |
79 | OPimTodoAccess::List OPimTodoAccess::sorted( bool ascending, int sort,int filter, int cat ) { | ||
80 | QArray<int> ints = m_todoBackEnd->sorted( ascending, sort, | ||
81 | filter, cat ); | ||
82 | OPimTodoAccess::List list( ints, this ); | ||
83 | return list; | ||
84 | } | ||
85 | void OPimTodoAccess::removeAllCompleted() { | 79 | void OPimTodoAccess::removeAllCompleted() { |
86 | m_todoBackEnd->removeAllCompleted(); | 80 | m_todoBackEnd->removeAllCompleted(); |
87 | } | 81 | } |
88 | QBitArray OPimTodoAccess::backendSupport( const QString& ) const{ | ||
89 | return m_todoBackEnd->supports(); | ||
90 | } | ||
91 | bool OPimTodoAccess::backendSupports( int attr, const QString& ar) const{ | ||
92 | return backendSupport(ar).testBit( attr ); | ||
93 | } | ||
94 | |||
95 | 82 | ||
96 | int OPimTodoAccess::rtti() const | 83 | int OPimTodoAccess::rtti() const |
97 | { | 84 | { |
98 | return OPimResolver::TodoList; | 85 | return OPimResolver::TodoList; |
99 | } | 86 | } |
100 | 87 | ||
101 | } | 88 | } |