otodoaccess.h
Go to the documentation of this file.00001 #ifndef OPIE_TODO_ACCESS_H
00002 #define OPIE_TODO_ACCESS_H
00003
00004 #include <qobject.h>
00005 #include <qvaluelist.h>
00006
00007 #include "otodo.h"
00008 #include "otodoaccessbackend.h"
00009 #include "opimaccesstemplate.h"
00010
00011
00017 class OTodoAccess : public QObject, public OPimAccessTemplate<OTodo> {
00018 Q_OBJECT
00019 public:
00020 enum SortOrder { Completed = 0,
00021 Priority,
00022 Description,
00023 Deadline };
00024 enum SortFilter{ Category =1,
00025 OnlyOverDue= 2,
00026 DoNotShowCompleted =4 };
00032 OTodoAccess( OTodoAccessBackend* = 0l, enum Access acc = Random );
00033 ~OTodoAccess();
00034
00035
00036
00042 List effectiveToDos( const QDate& start,
00043 const QDate& end,
00044 bool includeNoDates = true );
00045
00050 List effectiveToDos( const QDate& start,
00051 bool includeNoDates = true );
00052
00053
00057 List overDue();
00058
00062 List sorted( bool ascending, int sortOrder, int sortFilter, int cat );
00063
00068 void mergeWith( const QValueList<OTodo>& );
00069
00073 void removeAllCompleted();
00074
00082 QBitArray backendSupport( const QString& backend = QString::null )const;
00083
00089 bool backendSupports( int attr, const QString& backend = QString::null )const;
00090 signals:
00094 void changed( const OTodoAccess* );
00095 void changed( const OTodoAccess*, int uid );
00096 void added( const OTodoAccess*, int uid );
00097 void removed( const OTodoAccess*, int uid );
00098 private:
00099 int m_cat;
00100 OTodoAccessBackend* m_todoBackEnd;
00101 class OTodoAccessPrivate;
00102 OTodoAccessPrivate* d;
00103 };
00104
00105 #endif
This file is part of the documentation for OPIE Version 1.1.