author | drw <drw> | 2004-02-25 16:32:24 (UTC) |
---|---|---|
committer | drw <drw> | 2004-02-25 16:32:24 (UTC) |
commit | bea97f98bfb31994425908e7ce982b2450696706 (patch) (unidiff) | |
tree | 2f2bc2f55d4656b7c63a06cdce6bc35346d9388f /core/pim/todo/todomanager.h | |
parent | f84a46fce6c1b7702ec1eaebd40e363b67253649 (diff) | |
download | opie-bea97f98bfb31994425908e7ce982b2450696706.zip opie-bea97f98bfb31994425908e7ce982b2450696706.tar.gz opie-bea97f98bfb31994425908e7ce982b2450696706.tar.bz2 |
Todo: libopie->libopie2
-rw-r--r-- | core/pim/todo/todomanager.h | 38 |
1 files changed, 20 insertions, 18 deletions
diff --git a/core/pim/todo/todomanager.h b/core/pim/todo/todomanager.h index 8544277..865b47b 100644 --- a/core/pim/todo/todomanager.h +++ b/core/pim/todo/todomanager.h | |||
@@ -26,81 +26,83 @@ | |||
26 | 26 | ||
27 | */ | 27 | */ |
28 | 28 | ||
29 | #ifndef OPIE_TODO_MANAGER_H | 29 | #ifndef OPIE_TODO_MANAGER_H |
30 | #define OPIE_TODO_MANAGER_H | 30 | #define OPIE_TODO_MANAGER_H |
31 | 31 | ||
32 | #include <qarray.h> | 32 | #include <opie2/opimtodo.h> |
33 | #include <qobject.h> | 33 | #include <opie2/otodoaccess.h> |
34 | #include <qstring.h> | ||
35 | 34 | ||
36 | #include <qpe/categories.h> | 35 | #include <qpe/categories.h> |
37 | 36 | ||
38 | #include <opie/otodo.h> | 37 | #include <qarray.h> |
39 | #include <opie/otodoaccess.h> | 38 | #include <qobject.h> |
39 | #include <qstring.h> | ||
40 | 40 | ||
41 | #include "smalltodo.h" | 41 | #include "smalltodo.h" |
42 | 42 | ||
43 | using Opie::OPimTodo; | ||
44 | using Opie::OPimTodoAccess; | ||
43 | 45 | ||
44 | namespace Todo { | 46 | namespace Todo { |
45 | class TodoManager : public QObject{ | 47 | class TodoManager : public QObject{ |
46 | Q_OBJECT | 48 | Q_OBJECT |
47 | public: | 49 | public: |
48 | bool isLoaded()const; | 50 | bool isLoaded()const; |
49 | void load(); | 51 | void load(); |
50 | TodoManager(QObject* obj = 0); | 52 | TodoManager(QObject* obj = 0); |
51 | ~TodoManager(); | 53 | ~TodoManager(); |
52 | 54 | ||
53 | QStringList categories()/*const*/; | 55 | QStringList categories()/*const*/; |
54 | int catId(const QString&); | 56 | int catId(const QString&); |
55 | OTodo event(int uid ); | 57 | OPimTodo event(int uid ); |
56 | 58 | ||
57 | void updateList(); | 59 | void updateList(); |
58 | /** returns the iterator sorted if set sorted*/ | 60 | /** returns the iterator sorted if set sorted*/ |
59 | OTodoAccess::List list()const; | 61 | OPimTodoAccess::List list()const; |
60 | OTodoAccess::List sorted( bool asc, int so, int f, int cat ); | 62 | OPimTodoAccess::List sorted( bool asc, int so, int f, int cat ); |
61 | 63 | ||
62 | OTodoAccess::List::Iterator overDue(); | 64 | OPimTodoAccess::List::Iterator overDue(); |
63 | OTodoAccess::List::Iterator fromTo( const QDate& start, | 65 | OPimTodoAccess::List::Iterator fromTo( const QDate& start, |
64 | const QDate& end ); | 66 | const QDate& end ); |
65 | OTodoAccess::List::Iterator query( const OTodo& ev, int query ); | 67 | OPimTodoAccess::List::Iterator query( const OPimTodo& ev, int query ); |
66 | 68 | ||
67 | void setCategory( bool sort, int category = -1); | 69 | void setCategory( bool sort, int category = -1); |
68 | void setShowOverDue( bool show ); | 70 | void setShowOverDue( bool show ); |
69 | void setSortOrder( int sortOrder ); | 71 | void setSortOrder( int sortOrder ); |
70 | void setSortASC( bool ); | 72 | void setSortASC( bool ); |
71 | void sort(); | 73 | void sort(); |
72 | 74 | ||
73 | OTodoAccess* todoDB(); | 75 | OPimTodoAccess* todoDB(); |
74 | bool saveAll(); | 76 | bool saveAll(); |
75 | 77 | ||
76 | 78 | ||
77 | signals: | 79 | signals: |
78 | void update(); | 80 | void update(); |
79 | void updateCategories(); | 81 | void updateCategories(); |
80 | 82 | ||
81 | public slots: | 83 | public slots: |
82 | void add( const OTodo& ); | 84 | void add( const OPimTodo& ); |
83 | void update( int uid, const SmallTodo& ); | 85 | void update( int uid, const SmallTodo& ); |
84 | void update( int uid, const OTodo& ); | 86 | void update( int uid, const OPimTodo& ); |
85 | bool remove( int uid ); | 87 | bool remove( int uid ); |
86 | void remove( const QArray<int>& ); | 88 | void remove( const QArray<int>& ); |
87 | 89 | ||
88 | /** | 90 | /** |
89 | * remove all completed | 91 | * remove all completed |
90 | */ | 92 | */ |
91 | void removeCompleted(); | 93 | void removeCompleted(); |
92 | void removeAll(); | 94 | void removeAll(); |
93 | void reload(); | 95 | void reload(); |
94 | void save(); | 96 | void save(); |
95 | 97 | ||
96 | private: | 98 | private: |
97 | OTodoAccess* m_db; | 99 | OPimTodoAccess* m_db; |
98 | OTodoAccess::List m_list; | 100 | OPimTodoAccess::List m_list; |
99 | OTodoAccess::List::Iterator m_it; | 101 | OPimTodoAccess::List::Iterator m_it; |
100 | OTodoAccess::List m_sorted; | 102 | OPimTodoAccess::List m_sorted; |
101 | Categories m_cat; | 103 | Categories m_cat; |
102 | int m_ca; | 104 | int m_ca; |
103 | /* sort cat */ | 105 | /* sort cat */ |
104 | bool m_shCat; | 106 | bool m_shCat; |
105 | int m_sortOrder; | 107 | int m_sortOrder; |
106 | bool m_asc; | 108 | bool m_asc; |