-rw-r--r-- | core/pim/todo/mainwindow.h | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/core/pim/todo/mainwindow.h b/core/pim/todo/mainwindow.h index fd0e1bd..6a7296b 100644 --- a/core/pim/todo/mainwindow.h +++ b/core/pim/todo/mainwindow.h | |||
@@ -22,102 +22,104 @@ | |||
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 | 33 | ||
34 | #include <opie/otodoaccess.h> | 34 | #include <opie2/otodoaccess.h> |
35 | #include <opie/otodo.h> | 35 | #include <opie2/opimtodo.h> |
36 | #include <opie/opimmainwindow.h> | 36 | #include <opie2/opimmainwindow.h> |
37 | #include <opie2/owidgetstack.h> | ||
37 | 38 | ||
38 | #include "smalltodo.h" | 39 | #include "smalltodo.h" |
39 | #include "todoview.h" | 40 | #include "todoview.h" |
40 | #include "quickedit.h" | 41 | #include "quickedit.h" |
41 | #include "todomanager.h" | 42 | #include "todomanager.h" |
42 | 43 | ||
43 | class QPopupMenu; | 44 | class QPopupMenu; |
44 | class QMenuBar; | 45 | class QMenuBar; |
45 | class QToolBar; | 46 | class QToolBar; |
46 | class QAction; | 47 | class QAction; |
47 | class OWidgetStack; | ||
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 | |||
52 | namespace Todo { | 54 | namespace Todo { |
53 | typedef TodoView View; | 55 | typedef TodoView View; |
54 | class TemplateManager; | 56 | class TemplateManager; |
55 | class Editor; | 57 | class Editor; |
56 | class TodoShow; | 58 | class TodoShow; |
57 | class TemplateEditor; | 59 | class TemplateEditor; |
58 | struct QuickEditBase; | 60 | struct QuickEditBase; |
59 | 61 | ||
60 | class MainWindow : public OPimMainWindow { | 62 | class MainWindow : public OPimMainWindow { |
61 | Q_OBJECT | 63 | Q_OBJECT |
62 | friend class TodoView; // avoid QObject here.... | 64 | friend class TodoView; // avoid QObject here.... |
63 | friend class TodoShow; // avoid QObject | 65 | friend class TodoShow; // avoid QObject |
64 | public: | 66 | public: |
65 | /* OApplicationFactory application Name */ | 67 | /* OApplicationFactory application Name */ |
66 | static QString appName() { return QString::fromLatin1("todolist"); } | 68 | static QString appName() { return QString::fromLatin1("todolist"); } |
67 | 69 | ||
68 | MainWindow( QWidget *parent = 0, | 70 | MainWindow( QWidget *parent = 0, |
69 | const char* name = 0, WFlags fl = 0 ); | 71 | const char* name = 0, WFlags fl = 0 ); |
70 | ~MainWindow(); | 72 | ~MainWindow(); |
71 | 73 | ||
72 | /** return a context menu for an OTodo */ | 74 | /** return a context menu for an OPimTodo */ |
73 | QPopupMenu* contextMenu(int uid, bool doesRecur = FALSE ); | 75 | QPopupMenu* contextMenu(int uid, bool doesRecur = FALSE ); |
74 | QPopupMenu* options(); | 76 | QPopupMenu* options(); |
75 | QPopupMenu* edit(); | 77 | QPopupMenu* edit(); |
76 | QToolBar* toolbar(); | 78 | QToolBar* toolbar(); |
77 | 79 | ||
78 | 80 | ||
79 | void updateList(); | 81 | void updateList(); |
80 | OTodoAccess::List list()const; | 82 | OPimTodoAccess::List list()const; |
81 | OTodoAccess::List sorted( bool asc, int sortOrder ); | 83 | OPimTodoAccess::List sorted( bool asc, int sortOrder ); |
82 | OTodoAccess::List sorted( bool asc, int sortOrder, int addFilter ); | 84 | OPimTodoAccess::List sorted( bool asc, int sortOrder, int addFilter ); |
83 | 85 | ||
84 | OTodo event(int uid ); | 86 | OPimTodo event(int uid ); |
85 | 87 | ||
86 | bool isSyncing()const; | 88 | bool isSyncing()const; |
87 | bool showCompleted()const; | 89 | bool showCompleted()const; |
88 | bool showDeadline()const; | 90 | bool showDeadline()const; |
89 | bool showOverDue()const; | 91 | bool showOverDue()const; |
90 | bool showQuickTask()const; | 92 | bool showQuickTask()const; |
91 | QString currentCategory()const; | 93 | QString currentCategory()const; |
92 | int currentCatId(); | 94 | int currentCatId(); |
93 | TemplateManager* templateManager(); | 95 | TemplateManager* templateManager(); |
94 | QuickEditBase* quickEditor(); | 96 | QuickEditBase* quickEditor(); |
95 | 97 | ||
96 | void updateTodo( const OTodo& ); | 98 | void updateTodo( const OPimTodo& ); |
97 | void populateTemplates(); | 99 | void populateTemplates(); |
98 | Editor* currentEditor(); | 100 | Editor* currentEditor(); |
99 | void setReadAhead(uint count ); | 101 | void setReadAhead(uint count ); |
100 | private slots: | 102 | private slots: |
101 | void slotQuickEntered(); | 103 | void slotQuickEntered(); |
102 | void populateCategories(); | 104 | void populateCategories(); |
103 | void slotReload(); | 105 | void slotReload(); |
104 | void slotFlush(); | 106 | void slotFlush(); |
105 | 107 | ||
106 | protected: | 108 | protected: |
107 | void closeEvent( QCloseEvent* e ); | 109 | void closeEvent( QCloseEvent* e ); |
108 | 110 | ||
109 | private: | 111 | private: |
110 | /* handle setting and removing alarms */ | 112 | /* handle setting and removing alarms */ |
111 | void handleAlarms( const OTodo& oldTodo, const OTodo& newTodo ); | 113 | void handleAlarms( const OPimTodo& oldTodo, const OPimTodo& newTodo ); |
112 | void receiveFile( const QString& filename ); | 114 | void receiveFile( const QString& filename ); |
113 | void connectBase( ViewBase* ); | 115 | void connectBase( ViewBase* ); |
114 | void initUI(); | 116 | void initUI(); |
115 | void initActions(); | 117 | void initActions(); |
116 | void initConfig(); | 118 | void initConfig(); |
117 | void initViews(); | 119 | void initViews(); |
118 | void initEditor(); | 120 | void initEditor(); |
119 | void initShow(); | 121 | void initShow(); |
120 | void initTemplate(); | 122 | void initTemplate(); |
121 | void raiseCurrentView(); | 123 | void raiseCurrentView(); |
122 | ViewBase* currentView(); | 124 | ViewBase* currentView(); |
123 | ViewBase* m_curView; | 125 | ViewBase* m_curView; |
@@ -156,25 +158,25 @@ private slots: | |||
156 | TodoManager m_todoMgr; | 158 | TodoManager m_todoMgr; |
157 | QString m_curCat; | 159 | QString m_curCat; |
158 | QList<ViewBase> m_views; | 160 | QList<ViewBase> m_views; |
159 | uint m_counter; | 161 | uint m_counter; |
160 | TemplateManager* m_tempManager; | 162 | TemplateManager* m_tempManager; |
161 | 163 | ||
162 | 164 | ||
163 | private slots: | 165 | private slots: |
164 | void slotShow(int); | 166 | void slotShow(int); |
165 | void slotEdit(int); | 167 | void slotEdit(int); |
166 | void slotUpdate3( QWidget* ); | 168 | void slotUpdate3( QWidget* ); |
167 | void slotComplete( int uid ); | 169 | void slotComplete( int uid ); |
168 | void slotComplete( const OTodo& ev ); | 170 | void slotComplete( const OPimTodo& ev ); |
169 | void slotNewFromTemplate(int id ); | 171 | void slotNewFromTemplate(int id ); |
170 | void slotNew(); | 172 | void slotNew(); |
171 | void slotDuplicate(); | 173 | void slotDuplicate(); |
172 | 174 | ||
173 | void slotDelete(); | 175 | void slotDelete(); |
174 | void slotDelete(int uid ); | 176 | void slotDelete(int uid ); |
175 | void slotDeleteAll(); | 177 | void slotDeleteAll(); |
176 | void slotDeleteCompleted(); | 178 | void slotDeleteCompleted(); |
177 | 179 | ||
178 | void slotEdit(); | 180 | void slotEdit(); |
179 | void slotFind(); | 181 | void slotFind(); |
180 | 182 | ||