author | zecke <zecke> | 2002-09-25 11:59:24 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-09-25 11:59:24 (UTC) |
commit | 38240090027bd68d8dd15d7d46ecf17792edb732 (patch) (unidiff) | |
tree | 589ef486d7169c57592ed8667f6c84d43f882d48 /libopie/pim/otodoaccess.h | |
parent | 5f2dd0a2340914b4983ebce3813187034e2cb9dc (diff) | |
download | opie-38240090027bd68d8dd15d7d46ecf17792edb732.zip opie-38240090027bd68d8dd15d7d46ecf17792edb732.tar.gz opie-38240090027bd68d8dd15d7d46ecf17792edb732.tar.bz2 |
Add a sort function and filter function to TodoAccess
This would allow us todo a paint hack in QTable
-rw-r--r-- | libopie/pim/otodoaccess.h | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/libopie/pim/otodoaccess.h b/libopie/pim/otodoaccess.h index c43efe9..12997aa 100644 --- a/libopie/pim/otodoaccess.h +++ b/libopie/pim/otodoaccess.h | |||
@@ -14,16 +14,23 @@ | |||
14 | * the class to get access to | 14 | * the class to get access to |
15 | * the todolist | 15 | * the todolist |
16 | */ | 16 | */ |
17 | class OTodoAccess : public QObject, public OPimAccessTemplate<OTodo> { | 17 | class OTodoAccess : public QObject, public OPimAccessTemplate<OTodo> { |
18 | Q_OBJECT | 18 | Q_OBJECT |
19 | public: | 19 | public: |
20 | enum SortOrder { Completed = 0, | ||
21 | Priority, | ||
22 | Description, | ||
23 | Deadline }; | ||
24 | enum SortFilter{ ShowOverdue = 0, | ||
25 | Category =1, | ||
26 | OnlyOverDue= 2 }; | ||
20 | /** | 27 | /** |
21 | * if you use 0l | 28 | * if you use 0l |
22 | * the default resource will be | 29 | * the default resource will be |
23 | * icked up | 30 | * picked up |
24 | */ | 31 | */ |
25 | OTodoAccess( OTodoAccessBackend* = 0l); | 32 | OTodoAccess( OTodoAccessBackend* = 0l); |
26 | ~OTodoAccess(); | 33 | ~OTodoAccess(); |
27 | 34 | ||
28 | 35 | ||
29 | /* our functions here */ | 36 | /* our functions here */ |
@@ -45,12 +52,18 @@ public: | |||
45 | 52 | ||
46 | 53 | ||
47 | /** | 54 | /** |
48 | * return overdue OTodos | 55 | * return overdue OTodos |
49 | */ | 56 | */ |
50 | List overDue(); | 57 | List overDue(); |
58 | |||
59 | /** | ||
60 | * | ||
61 | */ | ||
62 | List sorted( bool ascending, int sortOrder, int sortFilter, int cat ); | ||
63 | |||
51 | /** | 64 | /** |
52 | * merge a list of OTodos into | 65 | * merge a list of OTodos into |
53 | * the resource | 66 | * the resource |
54 | */ | 67 | */ |
55 | void mergeWith( const QValueList<OTodo>& ); | 68 | void mergeWith( const QValueList<OTodo>& ); |
56 | 69 | ||
@@ -68,12 +81,13 @@ public: | |||
68 | signals: | 81 | signals: |
69 | /** | 82 | /** |
70 | * if the OTodoAccess was changed | 83 | * if the OTodoAccess was changed |
71 | */ | 84 | */ |
72 | void signalChanged( const OTodoAccess* ); | 85 | void signalChanged( const OTodoAccess* ); |
73 | private: | 86 | private: |
87 | int m_cat; | ||
74 | OTodoAccessBackend* m_todoBackEnd; | 88 | OTodoAccessBackend* m_todoBackEnd; |
75 | class OTodoAccessPrivate; | 89 | class OTodoAccessPrivate; |
76 | OTodoAccessPrivate* d; | 90 | OTodoAccessPrivate* d; |
77 | }; | 91 | }; |
78 | 92 | ||
79 | #endif | 93 | #endif |