-rw-r--r-- | korganizer/kotodoview.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/korganizer/kotodoview.h b/korganizer/kotodoview.h index 462f0a6..eab0754 100644 --- a/korganizer/kotodoview.h +++ b/korganizer/kotodoview.h | |||
@@ -20,64 +20,65 @@ | |||
20 | with any edition of Qt, and distribute the resulting executable, | 20 | with any edition of Qt, and distribute the resulting executable, |
21 | without including the source code for Qt in the source distribution. | 21 | without including the source code for Qt in the source distribution. |
22 | */ | 22 | */ |
23 | #ifndef KOTODOVIEW_H | 23 | #ifndef KOTODOVIEW_H |
24 | #define KOTODOVIEW_H | 24 | #define KOTODOVIEW_H |
25 | 25 | ||
26 | #include <qfont.h> | 26 | #include <qfont.h> |
27 | #include <qfontmetrics.h> | 27 | #include <qfontmetrics.h> |
28 | #include <qlineedit.h> | 28 | #include <qlineedit.h> |
29 | #include <qptrlist.h> | 29 | #include <qptrlist.h> |
30 | #include <qstrlist.h> | 30 | #include <qstrlist.h> |
31 | #include <qlistbox.h> | 31 | #include <qlistbox.h> |
32 | #include <qpopupmenu.h> | 32 | #include <qpopupmenu.h> |
33 | #include <qlabel.h> | 33 | #include <qlabel.h> |
34 | #include <qmap.h> | 34 | #include <qmap.h> |
35 | #include <qlistview.h> | 35 | #include <qlistview.h> |
36 | #include <klistview.h> | 36 | #include <klistview.h> |
37 | 37 | ||
38 | #include <libkcal/calendar.h> | 38 | #include <libkcal/calendar.h> |
39 | #include <libkcal/todo.h> | 39 | #include <libkcal/todo.h> |
40 | 40 | ||
41 | #include <korganizer/baseview.h> | 41 | #include <korganizer/baseview.h> |
42 | 42 | ||
43 | #include "kotodoviewitem.h" | 43 | #include "kotodoviewitem.h" |
44 | #include "koprefs.h" | 44 | #include "koprefs.h" |
45 | #include "koglobals.h" | 45 | #include "koglobals.h" |
46 | #include "datenavigator.h" | 46 | #include "datenavigator.h" |
47 | 47 | ||
48 | class QDragEnterEvent; | 48 | class QDragEnterEvent; |
49 | class QDragMoveEvent; | 49 | class QDragMoveEvent; |
50 | class QDragLeaveEvent; | 50 | class QDragLeaveEvent; |
51 | class QDropEvent; | 51 | class QDropEvent; |
52 | class KOTodoViewWhatsThis; | ||
52 | 53 | ||
53 | class DocPrefs; | 54 | class DocPrefs; |
54 | 55 | ||
55 | class KOTodoListView : public KListView | 56 | class KOTodoListView : public KListView |
56 | { | 57 | { |
57 | Q_OBJECT | 58 | Q_OBJECT |
58 | public: | 59 | public: |
59 | KOTodoListView(Calendar *,QWidget *parent=0,const char *name=0); | 60 | KOTodoListView(Calendar *,QWidget *parent=0,const char *name=0); |
60 | virtual ~KOTodoListView() {} | 61 | virtual ~KOTodoListView() {} |
61 | 62 | ||
62 | signals: | 63 | signals: |
63 | void paintNeeded(); | 64 | void paintNeeded(); |
64 | void todoDropped(Todo *, int); | 65 | void todoDropped(Todo *, int); |
65 | void double_Clicked(QListViewItem *item); | 66 | void double_Clicked(QListViewItem *item); |
66 | void reparentTodoSignal( Todo *,Todo * ); | 67 | void reparentTodoSignal( Todo *,Todo * ); |
67 | void unparentTodoSignal(Todo *); | 68 | void unparentTodoSignal(Todo *); |
68 | void deleteTodo( Todo * ); | 69 | void deleteTodo( Todo * ); |
69 | protected: | 70 | protected: |
70 | void contentsDragEnterEvent(QDragEnterEvent *); | 71 | void contentsDragEnterEvent(QDragEnterEvent *); |
71 | void contentsDragMoveEvent(QDragMoveEvent *); | 72 | void contentsDragMoveEvent(QDragMoveEvent *); |
72 | void contentsDragLeaveEvent(QDragLeaveEvent *); | 73 | void contentsDragLeaveEvent(QDragLeaveEvent *); |
73 | void contentsDropEvent(QDropEvent *); | 74 | void contentsDropEvent(QDropEvent *); |
74 | 75 | ||
75 | void contentsMousePressEvent(QMouseEvent *); | 76 | void contentsMousePressEvent(QMouseEvent *); |
76 | void contentsMouseMoveEvent(QMouseEvent *); | 77 | void contentsMouseMoveEvent(QMouseEvent *); |
77 | void contentsMouseReleaseEvent(QMouseEvent *); | 78 | void contentsMouseReleaseEvent(QMouseEvent *); |
78 | void contentsMouseDoubleClickEvent(QMouseEvent *); | 79 | void contentsMouseDoubleClickEvent(QMouseEvent *); |
79 | 80 | ||
80 | private: | 81 | private: |
81 | void paintEvent(QPaintEvent * pevent); | 82 | void paintEvent(QPaintEvent * pevent); |
82 | bool internalDrop; | 83 | bool internalDrop; |
83 | QString mName; | 84 | QString mName; |
@@ -189,64 +190,65 @@ class KOTodoView : public KOrg::BaseView | |||
189 | void unparentTodoSignal(Todo *); | 190 | void unparentTodoSignal(Todo *); |
190 | void reparentTodoSignal( Todo *,Todo * ); | 191 | void reparentTodoSignal( Todo *,Todo * ); |
191 | void showTodoSignal(Todo *); | 192 | void showTodoSignal(Todo *); |
192 | 193 | ||
193 | void editTodoSignal(Todo *); | 194 | void editTodoSignal(Todo *); |
194 | void deleteTodoSignal(Todo *); | 195 | void deleteTodoSignal(Todo *); |
195 | void todoModifiedSignal (Todo *, int); | 196 | void todoModifiedSignal (Todo *, int); |
196 | 197 | ||
197 | void isModified(bool); | 198 | void isModified(bool); |
198 | void cloneTodoSignal( Incidence * ); | 199 | void cloneTodoSignal( Incidence * ); |
199 | void cancelTodoSignal( Incidence * ); | 200 | void cancelTodoSignal( Incidence * ); |
200 | void moveTodoSignal( Incidence * ); | 201 | void moveTodoSignal( Incidence * ); |
201 | void beamTodoSignal( Incidence * ); | 202 | void beamTodoSignal( Incidence * ); |
202 | void purgeCompletedSignal(); | 203 | void purgeCompletedSignal(); |
203 | 204 | ||
204 | protected slots: | 205 | protected slots: |
205 | void paintNeeded(); | 206 | void paintNeeded(); |
206 | void processSelectionChange(); | 207 | void processSelectionChange(); |
207 | void addQuickTodo(); | 208 | void addQuickTodo(); |
208 | void setTodoModified( Todo* ); | 209 | void setTodoModified( Todo* ); |
209 | void todoModified(Todo *, int ); | 210 | void todoModified(Todo *, int ); |
210 | 211 | ||
211 | private: | 212 | private: |
212 | /* | 213 | /* |
213 | * the TodoEditor approach is rather unscaling in the long | 214 | * the TodoEditor approach is rather unscaling in the long |
214 | * run. | 215 | * run. |
215 | * Korganizer keeps it in memory and we need to update | 216 | * Korganizer keeps it in memory and we need to update |
216 | * 1. make KOTodoViewItem a QObject again? | 217 | * 1. make KOTodoViewItem a QObject again? |
217 | * 2. add a public method for setting one todo modified? | 218 | * 2. add a public method for setting one todo modified? |
218 | * 3. add a private method for setting a todo modified + friend here? | 219 | * 3. add a private method for setting a todo modified + friend here? |
219 | * -- zecke 2002-07-08 | 220 | * -- zecke 2002-07-08 |
220 | */ | 221 | */ |
222 | KOTodoViewWhatsThis* mKOTodoViewWhatsThis; | ||
221 | friend class KOTodoListView; | 223 | friend class KOTodoListView; |
222 | void paintEvent(QPaintEvent * pevent); | 224 | void paintEvent(QPaintEvent * pevent); |
223 | bool mPendingUpdateBeforeRepaint; | 225 | bool mPendingUpdateBeforeRepaint; |
224 | friend class KOTodoViewItem; | 226 | friend class KOTodoViewItem; |
225 | QMap<Todo *,KOTodoViewItem *>::ConstIterator insertTodoItem(Todo *todo); | 227 | QMap<Todo *,KOTodoViewItem *>::ConstIterator insertTodoItem(Todo *todo); |
226 | void restoreItemState( QListViewItem * ); | 228 | void restoreItemState( QListViewItem * ); |
227 | 229 | ||
228 | bool checkTodo( Todo * ); | 230 | bool checkTodo( Todo * ); |
229 | bool isFlatDisplay; | 231 | bool isFlatDisplay; |
230 | void setOpen( QListViewItem*, bool setOpen); | 232 | void setOpen( QListViewItem*, bool setOpen); |
231 | KOTodoListView *mTodoListView; | 233 | KOTodoListView *mTodoListView; |
232 | QPopupMenu *mItemPopupMenu; | 234 | QPopupMenu *mItemPopupMenu; |
233 | QPopupMenu *mPopupMenu; | 235 | QPopupMenu *mPopupMenu; |
234 | QPopupMenu *mPriorityPopupMenu; | 236 | QPopupMenu *mPriorityPopupMenu; |
235 | QPopupMenu *mPercentageCompletedPopupMenu; | 237 | QPopupMenu *mPercentageCompletedPopupMenu; |
236 | QPopupMenu *mCategoryPopupMenu; | 238 | QPopupMenu *mCategoryPopupMenu; |
237 | 239 | ||
238 | QMap<int, int> mPercentage; | 240 | QMap<int, int> mPercentage; |
239 | QMap<int, int> mPriority; | 241 | QMap<int, int> mPriority; |
240 | QMap<int, QString> mCategory; | 242 | QMap<int, QString> mCategory; |
241 | KOTodoViewItem *mActiveItem; | 243 | KOTodoViewItem *mActiveItem; |
242 | 244 | ||
243 | QMap<Todo *,KOTodoViewItem *> mTodoMap; | 245 | QMap<Todo *,KOTodoViewItem *> mTodoMap; |
244 | QString mName; | 246 | QString mName; |
245 | 247 | ||
246 | DocPrefs *mDocPrefs; | 248 | DocPrefs *mDocPrefs; |
247 | QString mCurrentDoc; | 249 | QString mCurrentDoc; |
248 | KOQuickTodo *mQuickAdd; | 250 | KOQuickTodo *mQuickAdd; |
249 | bool mBlockUpdate; | 251 | bool mBlockUpdate; |
250 | void keyPressEvent ( QKeyEvent * ) ; | 252 | void keyPressEvent ( QKeyEvent * ) ; |
251 | KOTodoViewItem * pendingSubtodo; | 253 | KOTodoViewItem * pendingSubtodo; |
252 | DateNavigator* mNavigator; | 254 | DateNavigator* mNavigator; |