Diffstat (limited to 'libopie2/opiepim/core/otodoaccess.h') (more/less context) (show whitespace changes)
-rw-r--r-- | libopie2/opiepim/core/otodoaccess.h | 36 |
1 files changed, 6 insertions, 30 deletions
diff --git a/libopie2/opiepim/core/otodoaccess.h b/libopie2/opiepim/core/otodoaccess.h index 3f5af30..8338586 100644 --- a/libopie2/opiepim/core/otodoaccess.h +++ b/libopie2/opiepim/core/otodoaccess.h | |||
@@ -43,19 +43,17 @@ namespace Opie { | |||
43 | * the class to get access to | 43 | * the class to get access to |
44 | * the todolist | 44 | * the todolist |
45 | */ | 45 | */ |
46 | class OPimTodoAccess : public QObject, public OPimAccessTemplate<OPimTodo> { | 46 | class OPimTodoAccess : public QObject, public OPimAccessTemplate<OPimTodo> { |
47 | Q_OBJECT | 47 | Q_OBJECT |
48 | public: | 48 | public: |
49 | enum SortOrder { Completed = 0, | 49 | enum SortOrder { Completed = SortCustom, |
50 | Priority, | 50 | Priority, |
51 | Description, | ||
52 | Deadline }; | 51 | Deadline }; |
53 | enum SortFilter{ Category =1, | 52 | enum SortFilter{ OnlyOverDue= FilterCustom, |
54 | OnlyOverDue= 2, | 53 | DoNotShowCompleted = FilterCustom<<1 }; |
55 | DoNotShowCompleted =4 }; | ||
56 | /** | 54 | /** |
57 | * if you use 0l | 55 | * if you use 0l |
58 | * the default resource will be | 56 | * the default resource will be |
59 | * picked up | 57 | * picked up |
60 | */ | 58 | */ |
61 | OPimTodoAccess( OPimTodoAccessBackend* = 0l, enum Access acc = Random ); | 59 | OPimTodoAccess( OPimTodoAccessBackend* = 0l, enum Access acc = Random ); |
@@ -67,31 +65,26 @@ public: | |||
67 | * include todos from start to end | 65 | * include todos from start to end |
68 | * includeNoDates whether or not to include | 66 | * includeNoDates whether or not to include |
69 | * events with no dates | 67 | * events with no dates |
70 | */ | 68 | */ |
71 | List effectiveToDos( const QDate& start, | 69 | List effectiveToDos( const QDate& start, |
72 | const QDate& end, | 70 | const QDate& end, |
73 | bool includeNoDates = true ); | 71 | bool includeNoDates = true )const; |
74 | 72 | ||
75 | /** | 73 | /** |
76 | * start | 74 | * start |
77 | * end date taken from the currentDate() | 75 | * end date taken from the currentDate() |
78 | */ | 76 | */ |
79 | List effectiveToDos( const QDate& start, | 77 | List effectiveToDos( const QDate& start, |
80 | bool includeNoDates = true ); | 78 | bool includeNoDates = true )const; |
81 | 79 | ||
82 | 80 | ||
83 | /** | 81 | /** |
84 | * return overdue OPimTodos | 82 | * return overdue OPimTodos |
85 | */ | 83 | */ |
86 | List overDue(); | 84 | List overDue()const; |
87 | |||
88 | /** | ||
89 | * | ||
90 | */ | ||
91 | List sorted( bool ascending, int sortOrder, int sortFilter, int cat ); | ||
92 | 85 | ||
93 | /** | 86 | /** |
94 | * merge a list of OPimTodos into | 87 | * merge a list of OPimTodos into |
95 | * the resource | 88 | * the resource |
96 | */ | 89 | */ |
97 | void mergeWith( const QValueList<OPimTodo>& ); | 90 | void mergeWith( const QValueList<OPimTodo>& ); |
@@ -99,29 +92,12 @@ public: | |||
99 | /** | 92 | /** |
100 | * delete all already completed items | 93 | * delete all already completed items |
101 | */ | 94 | */ |
102 | void removeAllCompleted(); | 95 | void removeAllCompleted(); |
103 | 96 | ||
104 | /** | 97 | /** |
105 | * request information about what a backend supports. | ||
106 | * Supports in the sense of beeing able to store. | ||
107 | * This is related to the enum in OPimTodo | ||
108 | * | ||
109 | * @param backend Will be used in the future when we support multiple backend | ||
110 | */ | ||
111 | QBitArray backendSupport( const QString& backend = QString::null )const; | ||
112 | |||
113 | /** | ||
114 | * see above but for a specefic attribute. This method was added for convience | ||
115 | * @param attr The attribute to be queried for | ||
116 | * @param backend Will be used in the future when we support multiple backends | ||
117 | */ | ||
118 | bool backendSupports( int attr, const QString& backend = QString::null )const; | ||
119 | |||
120 | |||
121 | /** | ||
122 | * Return identification of used records | 98 | * Return identification of used records |
123 | */ | 99 | */ |
124 | int rtti() const; | 100 | int rtti() const; |
125 | signals: | 101 | signals: |
126 | /** | 102 | /** |
127 | * if the OPimTodoAccess was changed | 103 | * if the OPimTodoAccess was changed |