-rw-r--r-- | core/pim/todo/todoview.h | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/core/pim/todo/todoview.h b/core/pim/todo/todoview.h index e5ed66f..a5ea9f5 100644 --- a/core/pim/todo/todoview.h +++ b/core/pim/todo/todoview.h | |||
@@ -25,28 +25,30 @@ | |||
25 | Boston, MA 02111-1307, USA. | 25 | Boston, MA 02111-1307, USA. |
26 | 26 | ||
27 | */ | 27 | */ |
28 | 28 | ||
29 | #ifndef TODO_VIEW_H | 29 | #ifndef TODO_VIEW_H |
30 | #define TODO_VIEW_H | 30 | #define TODO_VIEW_H |
31 | 31 | ||
32 | #include <qarray.h> | 32 | #include <qarray.h> |
33 | #include <qstring.h> | 33 | #include <qstring.h> |
34 | #include <qvaluelist.h> | 34 | #include <qvaluelist.h> |
35 | #include <qwidget.h> | 35 | #include <qwidget.h> |
36 | 36 | ||
37 | #include <opie/otodoaccess.h> | 37 | #include <opie2/otodoaccess.h> |
38 | 38 | ||
39 | #include "smalltodo.h" | 39 | #include "smalltodo.h" |
40 | 40 | ||
41 | using Opie::OPimTodo; | ||
42 | using Opie::OPimTodoAccess; | ||
41 | 43 | ||
42 | namespace Todo { | 44 | namespace Todo { |
43 | class MainWindow; | 45 | class MainWindow; |
44 | 46 | ||
45 | /** | 47 | /** |
46 | * due to inheretince problems we need this base class | 48 | * due to inheretince problems we need this base class |
47 | */ | 49 | */ |
48 | struct ViewBase { | 50 | struct ViewBase { |
49 | public: | 51 | public: |
50 | virtual QWidget* widget() = 0; | 52 | virtual QWidget* widget() = 0; |
51 | virtual QString type()const = 0; | 53 | virtual QString type()const = 0; |
52 | virtual int current() = 0; | 54 | virtual int current() = 0; |
@@ -59,26 +61,26 @@ namespace Todo { | |||
59 | virtual int next() = 0; | 61 | virtual int next() = 0; |
60 | 62 | ||
61 | /** | 63 | /** |
62 | * the previous record or 0 if none is there.. | 64 | * the previous record or 0 if none is there.. |
63 | */ | 65 | */ |
64 | virtual int prev() = 0; | 66 | virtual int prev() = 0; |
65 | 67 | ||
66 | /* | 68 | /* |
67 | * update the view | 69 | * update the view |
68 | */ | 70 | */ |
69 | virtual void updateView() = 0; | 71 | virtual void updateView() = 0; |
70 | 72 | ||
71 | virtual void addEvent( const OTodo& ) = 0; | 73 | virtual void addEvent( const OPimTodo& ) = 0; |
72 | virtual void replaceEvent( const OTodo& ) = 0; | 74 | virtual void replaceEvent( const OPimTodo& ) = 0; |
73 | virtual void removeEvent( int uid ) = 0; | 75 | virtual void removeEvent( int uid ) = 0; |
74 | virtual void setShowCompleted( bool ) = 0; | 76 | virtual void setShowCompleted( bool ) = 0; |
75 | virtual void setShowDeadline( bool ) = 0; | 77 | virtual void setShowDeadline( bool ) = 0; |
76 | virtual void setShowCategory( const QString& = QString::null ) = 0; | 78 | virtual void setShowCategory( const QString& = QString::null ) = 0; |
77 | virtual void clear() = 0; | 79 | virtual void clear() = 0; |
78 | virtual void newDay() = 0; | 80 | virtual void newDay() = 0; |
79 | }; | 81 | }; |
80 | 82 | ||
81 | /** | 83 | /** |
82 | * A base class for all TodoView which are showing | 84 | * A base class for all TodoView which are showing |
83 | * a list of todos. | 85 | * a list of todos. |
84 | * Either in a QTable, QListView or any other QWidget | 86 | * Either in a QTable, QListView or any other QWidget |
@@ -95,42 +97,42 @@ namespace Todo { | |||
95 | /** | 97 | /** |
96 | * c'tor | 98 | * c'tor |
97 | */ | 99 | */ |
98 | TodoView( MainWindow* win ); | 100 | TodoView( MainWindow* win ); |
99 | 101 | ||
100 | /** | 102 | /** |
101 | *d'tor | 103 | *d'tor |
102 | */ | 104 | */ |
103 | virtual ~TodoView(); | 105 | virtual ~TodoView(); |
104 | 106 | ||
105 | protected: | 107 | protected: |
106 | MainWindow* todoWindow(); | 108 | MainWindow* todoWindow(); |
107 | OTodo event(int uid ); | 109 | OPimTodo event(int uid ); |
108 | OTodoAccess::List list(); | 110 | OPimTodoAccess::List list(); |
109 | OTodoAccess::List sorted()const; | 111 | OPimTodoAccess::List sorted()const; |
110 | void sort(); | 112 | void sort(); |
111 | void sort(int sort ); | 113 | void sort(int sort ); |
112 | void setSortOrder( int order ); | 114 | void setSortOrder( int order ); |
113 | void setAscending( bool ); | 115 | void setAscending( bool ); |
114 | 116 | ||
115 | /* | 117 | /* |
116 | * These things needs to be implemented | 118 | * These things needs to be implemented |
117 | * in a implementation | 119 | * in a implementation |
118 | */ | 120 | */ |
119 | void showTodo( int uid ); | 121 | void showTodo( int uid ); |
120 | void edit( int uid ); | 122 | void edit( int uid ); |
121 | void update(int uid, const SmallTodo& to ); | 123 | void update(int uid, const SmallTodo& to ); |
122 | void update(int uid, const OTodo& ev); | 124 | void update(int uid, const OPimTodo& ev); |
123 | void remove( int uid ); | 125 | void remove( int uid ); |
124 | /* will ask the user if the item should be deleted */ | 126 | /* will ask the user if the item should be deleted */ |
125 | void removeQuery(int uid ); | 127 | void removeQuery(int uid ); |
126 | void complete( int uid ); | 128 | void complete( int uid ); |
127 | void complete( const OTodo& ev ); | 129 | void complete( const OPimTodo& ev ); |
128 | private: | 130 | private: |
129 | MainWindow *m_main; | 131 | MainWindow *m_main; |
130 | OTodoAccess::List m_sort; | 132 | OPimTodoAccess::List m_sort; |
131 | bool m_asc : 1; | 133 | bool m_asc : 1; |
132 | int m_sortOrder; | 134 | int m_sortOrder; |
133 | }; | 135 | }; |
134 | }; | 136 | }; |
135 | 137 | ||
136 | #endif | 138 | #endif |