-rw-r--r-- | core/pim/todo/mainwindow.h | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/core/pim/todo/mainwindow.h b/core/pim/todo/mainwindow.h index 5a18e64..270cbd1 100644 --- a/core/pim/todo/mainwindow.h +++ b/core/pim/todo/mainwindow.h | |||
@@ -28,40 +28,42 @@ | |||
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> | 33 | #include <qmainwindow.h> |
34 | 34 | ||
35 | #include <opie/otodoaccess.h> | 35 | #include <opie/otodoaccess.h> |
36 | #include <opie/otodo.h> | 36 | #include <opie/otodo.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 "todomanager.h" | 41 | #include "todomanager.h" |
41 | 42 | ||
42 | class QPopupMenu; | 43 | class QPopupMenu; |
43 | class QMenuBar; | 44 | class QMenuBar; |
44 | class QToolBar; | 45 | class QToolBar; |
45 | class QAction; | 46 | class QAction; |
46 | class QWidgetStack; | 47 | class QWidgetStack; |
47 | class Ir; | 48 | class Ir; |
48 | 49 | class QVBox; | |
49 | 50 | ||
50 | namespace Todo { | 51 | namespace Todo { |
51 | typedef TodoView View; | 52 | typedef TodoView View; |
52 | class TemplateManager; | 53 | class TemplateManager; |
53 | class Editor; | 54 | class Editor; |
54 | class TodoShow; | 55 | class TodoShow; |
55 | class TemplateEditor; | 56 | class TemplateEditor; |
57 | struct QuickEditBase; | ||
56 | 58 | ||
57 | class MainWindow : public QMainWindow { | 59 | class MainWindow : public QMainWindow { |
58 | Q_OBJECT | 60 | Q_OBJECT |
59 | public: | 61 | public: |
60 | MainWindow( QWidget *parent = 0, | 62 | MainWindow( QWidget *parent = 0, |
61 | const char* name = 0 ); | 63 | const char* name = 0 ); |
62 | ~MainWindow(); | 64 | ~MainWindow(); |
63 | 65 | ||
64 | /** return a context menu for an OTodo */ | 66 | /** return a context menu for an OTodo */ |
65 | QPopupMenu* contextMenu(int uid ); | 67 | QPopupMenu* contextMenu(int uid ); |
66 | QPopupMenu* options(); | 68 | QPopupMenu* options(); |
67 | QPopupMenu* edit(); | 69 | QPopupMenu* edit(); |
@@ -74,85 +76,97 @@ namespace Todo { | |||
74 | OTodoAccess::List sorted( bool asc, int sortOrder ); | 76 | OTodoAccess::List sorted( bool asc, int sortOrder ); |
75 | OTodoAccess::List sorted( bool asc, int sortOrder, int addFilter ); | 77 | OTodoAccess::List sorted( bool asc, int sortOrder, int addFilter ); |
76 | 78 | ||
77 | OTodo event(int uid ); | 79 | OTodo event(int uid ); |
78 | 80 | ||
79 | bool isSyncing()const; | 81 | bool isSyncing()const; |
80 | bool showCompleted()const; | 82 | bool showCompleted()const; |
81 | bool showDeadline()const; | 83 | bool showDeadline()const; |
82 | bool showOverDue()const; | 84 | bool showOverDue()const; |
83 | QString currentCategory()const; | 85 | QString currentCategory()const; |
84 | int currentCatId(); | 86 | int currentCatId(); |
85 | TemplateManager* templateManager(); | 87 | TemplateManager* templateManager(); |
88 | QuickEditBase* quickEditor(); | ||
86 | 89 | ||
87 | void updateTodo( const OTodo& ); | 90 | void updateTodo( const OTodo& ); |
88 | void populateTemplates(); | 91 | void populateTemplates(); |
89 | Editor* currentEditor(); | 92 | Editor* currentEditor(); |
90 | void setReadAhead(uint count ); | 93 | void setReadAhead(uint count ); |
91 | private slots: | 94 | private slots: |
95 | void slotQuickEntered(); | ||
92 | void populateCategories(); | 96 | void populateCategories(); |
93 | void slotReload(); | 97 | void slotReload(); |
94 | void slotFlush(); | 98 | void slotFlush(); |
95 | 99 | ||
96 | protected: | 100 | protected: |
97 | void closeEvent( QCloseEvent* e ); | 101 | void closeEvent( QCloseEvent* e ); |
98 | 102 | ||
99 | private: | 103 | private: |
100 | void receiveFile( const QString& filename ); | 104 | void receiveFile( const QString& filename ); |
101 | void connectBase( ViewBase* ); | 105 | void connectBase( ViewBase* ); |
102 | void initUI(); | 106 | void initUI(); |
103 | void initActions(); | 107 | void initActions(); |
104 | void initConfig(); | 108 | void initConfig(); |
105 | void initViews(); | 109 | void initViews(); |
106 | void initEditor(); | 110 | void initEditor(); |
107 | void initShow(); | 111 | void initShow(); |
108 | void initTemplate(); | 112 | void initTemplate(); |
109 | void raiseCurrentView(); | 113 | void raiseCurrentView(); |
110 | ViewBase* currentView(); | 114 | ViewBase* currentView(); |
111 | ViewBase* m_curView; | 115 | ViewBase* m_curView; |
116 | QuickEditBase* m_curQuick; | ||
112 | Editor* m_curEdit; | 117 | Editor* m_curEdit; |
113 | TodoShow* currentShow(); | 118 | TodoShow* currentShow(); |
114 | TodoShow* m_curShow; | 119 | TodoShow* m_curShow; |
115 | TemplateEditor* currentTemplateEditor(); | 120 | TemplateEditor* currentTemplateEditor(); |
116 | TemplateEditor* m_curTempEd; | 121 | TemplateEditor* m_curTempEd; |
117 | 122 | ||
118 | QMenuBar* m_bar; | 123 | QMenuBar* m_bar; |
119 | QToolBar* m_tool; | 124 | QToolBar* m_tool; |
120 | QAction* m_editAction, | 125 | QAction* m_editAction, |
121 | *m_deleteAction, | 126 | *m_deleteAction, |
122 | *m_findAction, | 127 | *m_findAction, |
123 | *m_completedAction, | 128 | *m_completedAction, |
124 | *m_showDeadLineAction, | 129 | *m_showDeadLineAction, |
125 | *m_deleteAllAction, | 130 | *m_deleteAllAction, |
126 | *m_deleteCompleteAction, | 131 | *m_deleteCompleteAction, |
127 | *m_duplicateAction, | 132 | *m_duplicateAction, |
128 | *m_showOverDueAction, | 133 | *m_showOverDueAction, |
129 | *m_effectiveAction; | 134 | *m_effectiveAction; |
130 | QWidgetStack *m_stack; | 135 | QWidgetStack *m_stack; |
131 | QPopupMenu* m_catMenu, | 136 | QPopupMenu* m_catMenu, |
132 | *m_edit, | 137 | *m_edit, |
133 | *m_options, | 138 | *m_options, |
134 | *m_view, | 139 | *m_view, |
135 | *m_template; | 140 | *m_template; |
141 | /* box with two rows | ||
142 | * top will be the quick edit | ||
143 | * this will bite my ass once | ||
144 | * we want to have all parts | ||
145 | * exchangeable | ||
146 | */ | ||
147 | QVBox* m_mainBox; | ||
136 | 148 | ||
137 | bool m_syncing:1; | 149 | bool m_syncing:1; |
138 | bool m_deadline:1; | 150 | bool m_deadline:1; |
139 | bool m_completed:1; | 151 | bool m_completed:1; |
140 | bool m_overdue:1; | 152 | bool m_overdue:1; |
141 | TodoManager m_todoMgr; | 153 | TodoManager m_todoMgr; |
142 | QString m_curCat; | 154 | QString m_curCat; |
143 | QList<ViewBase> m_views; | 155 | QList<ViewBase> m_views; |
156 | QList<QuickEditBase> m_quickEdit; | ||
144 | uint m_counter; | 157 | uint m_counter; |
145 | TemplateManager* m_tempManager; | 158 | TemplateManager* m_tempManager; |
146 | 159 | ||
160 | |||
147 | private slots: | 161 | private slots: |
148 | void slotShow(int); | 162 | void slotShow(int); |
149 | void slotEdit(int); | 163 | void slotEdit(int); |
150 | private slots: | 164 | private slots: |
151 | void slotUpdate3( QWidget* ); | 165 | void slotUpdate3( QWidget* ); |
152 | void slotNewFromTemplate(int id ); | 166 | void slotNewFromTemplate(int id ); |
153 | void slotNew(); | 167 | void slotNew(); |
154 | void slotDuplicate(); | 168 | void slotDuplicate(); |
155 | void slotDelete(); | 169 | void slotDelete(); |
156 | void slotDeleteAll(); | 170 | void slotDeleteAll(); |
157 | void slotDeleteCompleted(); | 171 | void slotDeleteCompleted(); |
158 | 172 | ||