-rw-r--r-- | core/pim/todo/mainwindow.h | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/core/pim/todo/mainwindow.h b/core/pim/todo/mainwindow.h index 6a7296b..b35a42b 100644 --- a/core/pim/todo/mainwindow.h +++ b/core/pim/todo/mainwindow.h | |||
@@ -28,59 +28,57 @@ | |||
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 | 33 | ||
34 | #include <opie2/otodoaccess.h> | 34 | #include <opie2/otodoaccess.h> |
35 | #include <opie2/opimtodo.h> | 35 | #include <opie2/opimtodo.h> |
36 | #include <opie2/opimmainwindow.h> | 36 | #include <opie2/opimmainwindow.h> |
37 | #include <opie2/owidgetstack.h> | 37 | #include <opie2/owidgetstack.h> |
38 | 38 | ||
39 | #include "smalltodo.h" | 39 | #include "smalltodo.h" |
40 | #include "todoview.h" | 40 | #include "todoview.h" |
41 | #include "quickedit.h" | 41 | #include "quickedit.h" |
42 | #include "todomanager.h" | 42 | #include "todomanager.h" |
43 | 43 | ||
44 | class QPopupMenu; | 44 | class QPopupMenu; |
45 | class QMenuBar; | 45 | class QMenuBar; |
46 | class QToolBar; | 46 | class QToolBar; |
47 | class QAction; | 47 | class QAction; |
48 | class Ir; | 48 | class Ir; |
49 | class QVBox; | 49 | class QVBox; |
50 | class QLineEdit; | 50 | class QLineEdit; |
51 | 51 | ||
52 | using namespace Opie; | ||
53 | |||
54 | namespace Todo { | 52 | namespace Todo { |
55 | typedef TodoView View; | 53 | typedef TodoView View; |
56 | class TemplateManager; | 54 | class TemplateManager; |
57 | class Editor; | 55 | class Editor; |
58 | class TodoShow; | 56 | class TodoShow; |
59 | class TemplateEditor; | 57 | class TemplateEditor; |
60 | struct QuickEditBase; | 58 | struct QuickEditBase; |
61 | 59 | ||
62 | class MainWindow : public OPimMainWindow { | 60 | class MainWindow : public Opie::OPimMainWindow { |
63 | Q_OBJECT | 61 | Q_OBJECT |
64 | friend class TodoView; // avoid QObject here.... | 62 | friend class TodoView; // avoid QObject here.... |
65 | friend class TodoShow; // avoid QObject | 63 | friend class TodoShow; // avoid QObject |
66 | public: | 64 | public: |
67 | /* OApplicationFactory application Name */ | 65 | /* OApplicationFactory application Name */ |
68 | static QString appName() { return QString::fromLatin1("todolist"); } | 66 | static QString appName() { return QString::fromLatin1("todolist"); } |
69 | 67 | ||
70 | MainWindow( QWidget *parent = 0, | 68 | MainWindow( QWidget *parent = 0, |
71 | const char* name = 0, WFlags fl = 0 ); | 69 | const char* name = 0, WFlags fl = 0 ); |
72 | ~MainWindow(); | 70 | ~MainWindow(); |
73 | 71 | ||
74 | /** return a context menu for an OPimTodo */ | 72 | /** return a context menu for an OPimTodo */ |
75 | QPopupMenu* contextMenu(int uid, bool doesRecur = FALSE ); | 73 | QPopupMenu* contextMenu(int uid, bool doesRecur = FALSE ); |
76 | QPopupMenu* options(); | 74 | QPopupMenu* options(); |
77 | QPopupMenu* edit(); | 75 | QPopupMenu* edit(); |
78 | QToolBar* toolbar(); | 76 | QToolBar* toolbar(); |
79 | 77 | ||
80 | 78 | ||
81 | void updateList(); | 79 | void updateList(); |
82 | OPimTodoAccess::List list()const; | 80 | OPimTodoAccess::List list()const; |
83 | OPimTodoAccess::List sorted( bool asc, int sortOrder ); | 81 | OPimTodoAccess::List sorted( bool asc, int sortOrder ); |
84 | OPimTodoAccess::List sorted( bool asc, int sortOrder, int addFilter ); | 82 | OPimTodoAccess::List sorted( bool asc, int sortOrder, int addFilter ); |
85 | 83 | ||
86 | OPimTodo event(int uid ); | 84 | OPimTodo event(int uid ); |
@@ -123,49 +121,49 @@ private slots: | |||
123 | void raiseCurrentView(); | 121 | void raiseCurrentView(); |
124 | ViewBase* currentView(); | 122 | ViewBase* currentView(); |
125 | ViewBase* m_curView; | 123 | ViewBase* m_curView; |
126 | bool m_showing : 1; // used to see if we show a todo in the cases we shouldn't change the table | 124 | bool m_showing : 1; // used to see if we show a todo in the cases we shouldn't change the table |
127 | QuickEditBase* m_curQuick; | 125 | QuickEditBase* m_curQuick; |
128 | Editor* m_curEdit; | 126 | Editor* m_curEdit; |
129 | TodoShow* currentShow(); | 127 | TodoShow* currentShow(); |
130 | TodoShow* m_curShow; | 128 | TodoShow* m_curShow; |
131 | TemplateEditor* currentTemplateEditor(); | 129 | TemplateEditor* currentTemplateEditor(); |
132 | TemplateEditor* m_curTempEd; | 130 | TemplateEditor* m_curTempEd; |
133 | 131 | ||
134 | QMenuBar* m_bar; | 132 | QMenuBar* m_bar; |
135 | QToolBar* m_tool; | 133 | QToolBar* m_tool; |
136 | QAction* m_editAction, | 134 | QAction* m_editAction, |
137 | *m_deleteAction, | 135 | *m_deleteAction, |
138 | *m_findAction, | 136 | *m_findAction, |
139 | *m_completedAction, | 137 | *m_completedAction, |
140 | *m_showDeadLineAction, | 138 | *m_showDeadLineAction, |
141 | *m_deleteAllAction, | 139 | *m_deleteAllAction, |
142 | *m_deleteCompleteAction, | 140 | *m_deleteCompleteAction, |
143 | *m_duplicateAction, | 141 | *m_duplicateAction, |
144 | *m_showOverDueAction, | 142 | *m_showOverDueAction, |
145 | *m_showQuickTaskAction, | 143 | *m_showQuickTaskAction, |
146 | *m_effectiveAction; | 144 | *m_effectiveAction; |
147 | OWidgetStack *m_stack; | 145 | Opie::OWidgetStack *m_stack; |
148 | QPopupMenu* m_catMenu, | 146 | QPopupMenu* m_catMenu, |
149 | *m_edit, | 147 | *m_edit, |
150 | *m_options, | 148 | *m_options, |
151 | *m_template; | 149 | *m_template; |
152 | 150 | ||
153 | bool m_syncing:1; | 151 | bool m_syncing:1; |
154 | bool m_deadline:1; | 152 | bool m_deadline:1; |
155 | bool m_completed:1; | 153 | bool m_completed:1; |
156 | bool m_overdue:1; | 154 | bool m_overdue:1; |
157 | bool m_quicktask:1; | 155 | bool m_quicktask:1; |
158 | TodoManager m_todoMgr; | 156 | TodoManager m_todoMgr; |
159 | QString m_curCat; | 157 | QString m_curCat; |
160 | QList<ViewBase> m_views; | 158 | QList<ViewBase> m_views; |
161 | uint m_counter; | 159 | uint m_counter; |
162 | TemplateManager* m_tempManager; | 160 | TemplateManager* m_tempManager; |
163 | 161 | ||
164 | 162 | ||
165 | private slots: | 163 | private slots: |
166 | void slotShow(int); | 164 | void slotShow(int); |
167 | void slotEdit(int); | 165 | void slotEdit(int); |
168 | void slotUpdate3( QWidget* ); | 166 | void slotUpdate3( QWidget* ); |
169 | void slotComplete( int uid ); | 167 | void slotComplete( int uid ); |
170 | void slotComplete( const OPimTodo& ev ); | 168 | void slotComplete( const OPimTodo& ev ); |
171 | void slotNewFromTemplate(int id ); | 169 | void slotNewFromTemplate(int id ); |
@@ -184,30 +182,30 @@ private slots: | |||
184 | 182 | ||
185 | void slotShowDeadLine( bool ); | 183 | void slotShowDeadLine( bool ); |
186 | void slotShowCompleted( bool ); | 184 | void slotShowCompleted( bool ); |
187 | void slotShowQuickTask( bool ); | 185 | void slotShowQuickTask( bool ); |
188 | 186 | ||
189 | void setDocument( const QString& ); | 187 | void setDocument( const QString& ); |
190 | 188 | ||
191 | 189 | ||
192 | void slotBeam(); | 190 | void slotBeam(); |
193 | void beamDone( Ir* ); | 191 | void beamDone( Ir* ); |
194 | void slotShowDetails(); | 192 | void slotShowDetails(); |
195 | void slotShowNext(); | 193 | void slotShowNext(); |
196 | void slotShowPrev(); | 194 | void slotShowPrev(); |
197 | void slotShowDue( bool ); | 195 | void slotShowDue( bool ); |
198 | void slotReturnFromView(); // for TodoShow... | 196 | void slotReturnFromView(); // for TodoShow... |
199 | /* reimplementation from opimmainwindow */ | 197 | /* reimplementation from opimmainwindow */ |
200 | protected slots: | 198 | protected slots: |
201 | void flush(); | 199 | void flush(); |
202 | void reload(); | 200 | void reload(); |
203 | int create(); | 201 | int create(); |
204 | bool remove( int uid ); | 202 | bool remove( int uid ); |
205 | void beam(int uid); | 203 | void beam(int uid); |
206 | void show( int uid ); | 204 | void show( int uid ); |
207 | void edit( int uid ); | 205 | void edit( int uid ); |
208 | void add( const OPimRecord& ); | 206 | void add( const Opie::OPimRecord& ); |
209 | void doAlarm( const QDateTime& dt, int uid ); | 207 | void doAlarm( const QDateTime& dt, int uid ); |
210 | }; | 208 | }; |
211 | } | 209 | } |
212 | 210 | ||
213 | #endif | 211 | #endif |