-rw-r--r-- | core/pim/todo/mainwindow.h | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/core/pim/todo/mainwindow.h b/core/pim/todo/mainwindow.h index 270cbd1..14cfa82 100644 --- a/core/pim/todo/mainwindow.h +++ b/core/pim/todo/mainwindow.h | |||
@@ -21,62 +21,62 @@ | |||
21 | -_. . . )=. = Library General Public License along with | 21 | -_. . . )=. = Library General Public License along with |
22 | -- :-=` this library; see the file COPYING.LIB. | 22 | -- :-=` this library; see the file COPYING.LIB. |
23 | If not, write to the Free Software Foundation, | 23 | If not, write to the Free Software Foundation, |
24 | Inc., 59 Temple Place - Suite 330, | 24 | Inc., 59 Temple Place - Suite 330, |
25 | Boston, MA 02111-1307, USA. | 25 | Boston, MA 02111-1307, USA. |
26 | 26 | ||
27 | */ | 27 | */ |
28 | 28 | ||
29 | #ifndef TODO_MAIN_WINDOW_H | 29 | #ifndef TODO_MAIN_WINDOW_H |
30 | #define TODO_MAIN_WINDOW_H | 30 | #define TODO_MAIN_WINDOW_H |
31 | 31 | ||
32 | #include <qlist.h> | 32 | #include <qlist.h> |
33 | #include <qmainwindow.h> | ||
34 | 33 | ||
35 | #include <opie/otodoaccess.h> | 34 | #include <opie/otodoaccess.h> |
36 | #include <opie/otodo.h> | 35 | #include <opie/otodo.h> |
36 | #include <opie/opimmainwindow.h> | ||
37 | 37 | ||
38 | #include "smalltodo.h" | 38 | #include "smalltodo.h" |
39 | #include "todoview.h" | 39 | #include "todoview.h" |
40 | #include "quickedit.h" | 40 | #include "quickedit.h" |
41 | #include "todomanager.h" | 41 | #include "todomanager.h" |
42 | 42 | ||
43 | class QPopupMenu; | 43 | class QPopupMenu; |
44 | class QMenuBar; | 44 | class QMenuBar; |
45 | class QToolBar; | 45 | class QToolBar; |
46 | class QAction; | 46 | class QAction; |
47 | class QWidgetStack; | 47 | class QWidgetStack; |
48 | class Ir; | 48 | class Ir; |
49 | class QVBox; | 49 | class QVBox; |
50 | 50 | ||
51 | namespace Todo { | 51 | namespace Todo { |
52 | typedef TodoView View; | 52 | typedef TodoView View; |
53 | class TemplateManager; | 53 | class TemplateManager; |
54 | class Editor; | 54 | class Editor; |
55 | class TodoShow; | 55 | class TodoShow; |
56 | class TemplateEditor; | 56 | class TemplateEditor; |
57 | struct QuickEditBase; | 57 | struct QuickEditBase; |
58 | 58 | ||
59 | class MainWindow : public QMainWindow { | 59 | class MainWindow : public OPimMainWindow { |
60 | Q_OBJECT | 60 | Q_OBJECT |
61 | friend class TodoView; // avoid QObject here.... | ||
61 | public: | 62 | public: |
62 | MainWindow( QWidget *parent = 0, | 63 | MainWindow( QWidget *parent = 0, |
63 | const char* name = 0 ); | 64 | const char* name = 0 ); |
64 | ~MainWindow(); | 65 | ~MainWindow(); |
65 | 66 | ||
66 | /** return a context menu for an OTodo */ | 67 | /** return a context menu for an OTodo */ |
67 | QPopupMenu* contextMenu(int uid ); | 68 | QPopupMenu* contextMenu(int uid, bool doesRecur = FALSE ); |
68 | QPopupMenu* options(); | 69 | QPopupMenu* options(); |
69 | QPopupMenu* edit(); | 70 | QPopupMenu* edit(); |
70 | QPopupMenu* view(); | ||
71 | QToolBar* toolbar(); | 71 | QToolBar* toolbar(); |
72 | 72 | ||
73 | 73 | ||
74 | void updateList(); | 74 | void updateList(); |
75 | OTodoAccess::List list()const; | 75 | OTodoAccess::List list()const; |
76 | OTodoAccess::List sorted( bool asc, int sortOrder ); | 76 | OTodoAccess::List sorted( bool asc, int sortOrder ); |
77 | OTodoAccess::List sorted( bool asc, int sortOrder, int addFilter ); | 77 | OTodoAccess::List sorted( bool asc, int sortOrder, int addFilter ); |
78 | 78 | ||
79 | OTodo event(int uid ); | 79 | OTodo event(int uid ); |
80 | 80 | ||
81 | bool isSyncing()const; | 81 | bool isSyncing()const; |
82 | bool showCompleted()const; | 82 | bool showCompleted()const; |
@@ -127,65 +127,77 @@ private slots: | |||
127 | *m_findAction, | 127 | *m_findAction, |
128 | *m_completedAction, | 128 | *m_completedAction, |
129 | *m_showDeadLineAction, | 129 | *m_showDeadLineAction, |
130 | *m_deleteAllAction, | 130 | *m_deleteAllAction, |
131 | *m_deleteCompleteAction, | 131 | *m_deleteCompleteAction, |
132 | *m_duplicateAction, | 132 | *m_duplicateAction, |
133 | *m_showOverDueAction, | 133 | *m_showOverDueAction, |
134 | *m_effectiveAction; | 134 | *m_effectiveAction; |
135 | QWidgetStack *m_stack; | 135 | QWidgetStack *m_stack; |
136 | QPopupMenu* m_catMenu, | 136 | QPopupMenu* m_catMenu, |
137 | *m_edit, | 137 | *m_edit, |
138 | *m_options, | 138 | *m_options, |
139 | *m_view, | ||
140 | *m_template; | 139 | *m_template; |
141 | /* box with two rows | 140 | /* box with two rows |
142 | * top will be the quick edit | 141 | * top will be the quick edit |
143 | * this will bite my ass once | 142 | * this will bite my ass once |
144 | * we want to have all parts | 143 | * we want to have all parts |
145 | * exchangeable | 144 | * exchangeable |
146 | */ | 145 | */ |
147 | QVBox* m_mainBox; | 146 | QVBox* m_mainBox; |
148 | 147 | ||
149 | bool m_syncing:1; | 148 | bool m_syncing:1; |
150 | bool m_deadline:1; | 149 | bool m_deadline:1; |
151 | bool m_completed:1; | 150 | bool m_completed:1; |
152 | bool m_overdue:1; | 151 | bool m_overdue:1; |
153 | TodoManager m_todoMgr; | 152 | TodoManager m_todoMgr; |
154 | QString m_curCat; | 153 | QString m_curCat; |
155 | QList<ViewBase> m_views; | 154 | QList<ViewBase> m_views; |
156 | QList<QuickEditBase> m_quickEdit; | 155 | QList<QuickEditBase> m_quickEdit; |
157 | uint m_counter; | 156 | uint m_counter; |
158 | TemplateManager* m_tempManager; | 157 | TemplateManager* m_tempManager; |
159 | 158 | ||
160 | 159 | ||
161 | private slots: | 160 | private slots: |
162 | void slotShow(int); | 161 | void slotShow(int); |
163 | void slotEdit(int); | 162 | void slotEdit(int); |
164 | private slots: | ||
165 | void slotUpdate3( QWidget* ); | 163 | void slotUpdate3( QWidget* ); |
164 | void slotComplete( int uid ); | ||
165 | void slotComplete( const OTodo& ev ); | ||
166 | void slotNewFromTemplate(int id ); | 166 | void slotNewFromTemplate(int id ); |
167 | void slotNew(); | 167 | void slotNew(); |
168 | void slotDuplicate(); | 168 | void slotDuplicate(); |
169 | |||
169 | void slotDelete(); | 170 | void slotDelete(); |
170 | void slotDeleteAll(); | 171 | void slotDeleteAll(); |
171 | void slotDeleteCompleted(); | 172 | void slotDeleteCompleted(); |
172 | 173 | ||
173 | void slotEdit(); | 174 | void slotEdit(); |
174 | void slotFind(); | 175 | void slotFind(); |
175 | 176 | ||
176 | void setCategory( int ); | 177 | void setCategory( int ); |
177 | 178 | ||
178 | void slotShowDeadLine( bool ); | 179 | void slotShowDeadLine( bool ); |
179 | void slotShowCompleted( bool ); | 180 | void slotShowCompleted( bool ); |
180 | 181 | ||
181 | void setDocument( const QString& ); | 182 | void setDocument( const QString& ); |
182 | 183 | ||
183 | 184 | ||
184 | void slotBeam(); | 185 | void slotBeam(); |
185 | void beamDone( Ir* ); | 186 | void beamDone( Ir* ); |
186 | void slotShowDetails(); | 187 | void slotShowDetails(); |
187 | void slotShowDue( bool ); | 188 | void slotShowDue( bool ); |
189 | /* reimplementation from opimmainwindow */ | ||
190 | protected slots: | ||
191 | void flush(); | ||
192 | void reload(); | ||
193 | int create(); | ||
194 | bool remove( int uid ); | ||
195 | void beam(int uid, int transport = IrDa ); | ||
196 | void show( int uid ); | ||
197 | void edit( int uid ); | ||
198 | void add( const OPimRecord& ); | ||
199 | OPimRecord* record( int rtti, const QByteArray& ); | ||
188 | }; | 200 | }; |
189 | }; | 201 | }; |
190 | 202 | ||
191 | #endif | 203 | #endif |