author | zautrix <zautrix> | 2005-01-29 23:23:11 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-01-29 23:23:11 (UTC) |
commit | d94b52aa95cc52aa1bef7c9cd99f43c725ed8042 (patch) (unidiff) | |
tree | 9443dfbc790a76e5d707ce762e075cdb21096f50 /korganizer/kotodoview.h | |
parent | 74c808f288bf81bc68c92a377ce64953603c2d40 (diff) | |
download | kdepimpi-d94b52aa95cc52aa1bef7c9cd99f43c725ed8042.zip kdepimpi-d94b52aa95cc52aa1bef7c9cd99f43c725ed8042.tar.gz kdepimpi-d94b52aa95cc52aa1bef7c9cd99f43c725ed8042.tar.bz2 |
todo dnd
-rw-r--r-- | korganizer/kotodoview.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/korganizer/kotodoview.h b/korganizer/kotodoview.h index f11518d..68e29bb 100644 --- a/korganizer/kotodoview.h +++ b/korganizer/kotodoview.h | |||
@@ -51,39 +51,42 @@ class QDragLeaveEvent; | |||
51 | class QDropEvent; | 51 | class QDropEvent; |
52 | 52 | ||
53 | class DocPrefs; | 53 | class DocPrefs; |
54 | 54 | ||
55 | class KOTodoListView : public KListView | 55 | class KOTodoListView : public KListView |
56 | { | 56 | { |
57 | Q_OBJECT | 57 | Q_OBJECT |
58 | public: | 58 | public: |
59 | KOTodoListView(Calendar *,QWidget *parent=0,const char *name=0); | 59 | KOTodoListView(Calendar *,QWidget *parent=0,const char *name=0); |
60 | virtual ~KOTodoListView() {} | 60 | virtual ~KOTodoListView() {} |
61 | 61 | ||
62 | signals: | 62 | signals: |
63 | void todoDropped(Todo *); | 63 | void todoDropped(Todo *, int); |
64 | void double_Clicked(QListViewItem *item); | 64 | void double_Clicked(QListViewItem *item); |
65 | 65 | void reparentTodoSignal( Todo *,Todo * ); | |
66 | void unparentTodoSignal(Todo *); | ||
67 | void deleteTodo( Todo * ); | ||
66 | protected: | 68 | protected: |
67 | void contentsDragEnterEvent(QDragEnterEvent *); | 69 | void contentsDragEnterEvent(QDragEnterEvent *); |
68 | void contentsDragMoveEvent(QDragMoveEvent *); | 70 | void contentsDragMoveEvent(QDragMoveEvent *); |
69 | void contentsDragLeaveEvent(QDragLeaveEvent *); | 71 | void contentsDragLeaveEvent(QDragLeaveEvent *); |
70 | void contentsDropEvent(QDropEvent *); | 72 | void contentsDropEvent(QDropEvent *); |
71 | 73 | ||
72 | void contentsMousePressEvent(QMouseEvent *); | 74 | void contentsMousePressEvent(QMouseEvent *); |
73 | void contentsMouseMoveEvent(QMouseEvent *); | 75 | void contentsMouseMoveEvent(QMouseEvent *); |
74 | void contentsMouseReleaseEvent(QMouseEvent *); | 76 | void contentsMouseReleaseEvent(QMouseEvent *); |
75 | void contentsMouseDoubleClickEvent(QMouseEvent *); | 77 | void contentsMouseDoubleClickEvent(QMouseEvent *); |
76 | 78 | ||
77 | private: | 79 | private: |
80 | bool internalDrop; | ||
78 | QString mName; | 81 | QString mName; |
79 | Calendar *mCalendar; | 82 | Calendar *mCalendar; |
80 | QPoint mPressPos; | 83 | QPoint mPressPos; |
81 | bool mMousePressed; | 84 | bool mMousePressed; |
82 | QListViewItem *mOldCurrent; | 85 | QListViewItem *mOldCurrent; |
83 | void keyPressEvent ( QKeyEvent * ) ; | 86 | void keyPressEvent ( QKeyEvent * ) ; |
84 | }; | 87 | }; |
85 | 88 | ||
86 | 89 | ||
87 | /** | 90 | /** |
88 | This is the line-edit on top of the todoview for fast addition of new todos | 91 | This is the line-edit on top of the todoview for fast addition of new todos |
89 | */ | 92 | */ |
@@ -188,37 +191,38 @@ class KOTodoView : public KOrg::BaseView | |||
188 | void todoModifiedSignal (Todo *, int); | 191 | void todoModifiedSignal (Todo *, int); |
189 | 192 | ||
190 | void isModified(bool); | 193 | void isModified(bool); |
191 | void cloneTodoSignal( Incidence * ); | 194 | void cloneTodoSignal( Incidence * ); |
192 | void cancelTodoSignal( Incidence * ); | 195 | void cancelTodoSignal( Incidence * ); |
193 | void moveTodoSignal( Incidence * ); | 196 | void moveTodoSignal( Incidence * ); |
194 | void beamTodoSignal( Incidence * ); | 197 | void beamTodoSignal( Incidence * ); |
195 | void purgeCompletedSignal(); | 198 | void purgeCompletedSignal(); |
196 | 199 | ||
197 | protected slots: | 200 | protected slots: |
198 | void processSelectionChange(); | 201 | void processSelectionChange(); |
199 | void addQuickTodo(); | 202 | void addQuickTodo(); |
203 | void setTodoModified( Todo* ); | ||
204 | void todoModified(Todo *, int ); | ||
200 | 205 | ||
201 | private: | 206 | private: |
202 | /* | 207 | /* |
203 | * the TodoEditor approach is rather unscaling in the long | 208 | * the TodoEditor approach is rather unscaling in the long |
204 | * run. | 209 | * run. |
205 | * Korganizer keeps it in memory and we need to update | 210 | * Korganizer keeps it in memory and we need to update |
206 | * 1. make KOTodoViewItem a QObject again? | 211 | * 1. make KOTodoViewItem a QObject again? |
207 | * 2. add a public method for setting one todo modified? | 212 | * 2. add a public method for setting one todo modified? |
208 | * 3. add a private method for setting a todo modified + friend here? | 213 | * 3. add a private method for setting a todo modified + friend here? |
209 | * -- zecke 2002-07-08 | 214 | * -- zecke 2002-07-08 |
210 | */ | 215 | */ |
211 | friend class KOTodoViewItem; | 216 | friend class KOTodoViewItem; |
212 | void setTodoModified( Todo* ); | ||
213 | QMap<Todo *,KOTodoViewItem *>::ConstIterator insertTodoItem(Todo *todo); | 217 | QMap<Todo *,KOTodoViewItem *>::ConstIterator insertTodoItem(Todo *todo); |
214 | void restoreItemState( QListViewItem * ); | 218 | void restoreItemState( QListViewItem * ); |
215 | 219 | ||
216 | bool checkTodo( Todo * ); | 220 | bool checkTodo( Todo * ); |
217 | bool isFlatDisplay; | 221 | bool isFlatDisplay; |
218 | void setOpen( QListViewItem*, bool setOpen); | 222 | void setOpen( QListViewItem*, bool setOpen); |
219 | KOTodoListView *mTodoListView; | 223 | KOTodoListView *mTodoListView; |
220 | QPopupMenu *mItemPopupMenu; | 224 | QPopupMenu *mItemPopupMenu; |
221 | QPopupMenu *mPopupMenu; | 225 | QPopupMenu *mPopupMenu; |
222 | QPopupMenu *mPriorityPopupMenu; | 226 | QPopupMenu *mPriorityPopupMenu; |
223 | QPopupMenu *mPercentageCompletedPopupMenu; | 227 | QPopupMenu *mPercentageCompletedPopupMenu; |
224 | QPopupMenu *mCategoryPopupMenu; | 228 | QPopupMenu *mCategoryPopupMenu; |
@@ -226,19 +230,18 @@ class KOTodoView : public KOrg::BaseView | |||
226 | QMap<int, int> mPercentage; | 230 | QMap<int, int> mPercentage; |
227 | QMap<int, int> mPriority; | 231 | QMap<int, int> mPriority; |
228 | QMap<int, QString> mCategory; | 232 | QMap<int, QString> mCategory; |
229 | KOTodoViewItem *mActiveItem; | 233 | KOTodoViewItem *mActiveItem; |
230 | 234 | ||
231 | QMap<Todo *,KOTodoViewItem *> mTodoMap; | 235 | QMap<Todo *,KOTodoViewItem *> mTodoMap; |
232 | QString mName; | 236 | QString mName; |
233 | 237 | ||
234 | DocPrefs *mDocPrefs; | 238 | DocPrefs *mDocPrefs; |
235 | QString mCurrentDoc; | 239 | QString mCurrentDoc; |
236 | KOQuickTodo *mQuickAdd; | 240 | KOQuickTodo *mQuickAdd; |
237 | bool mBlockUpdate; | 241 | bool mBlockUpdate; |
238 | void todoModified(Todo *, int ); | ||
239 | void keyPressEvent ( QKeyEvent * ) ; | 242 | void keyPressEvent ( QKeyEvent * ) ; |
240 | KOTodoViewItem * pendingSubtodo; | 243 | KOTodoViewItem * pendingSubtodo; |
241 | DateNavigator* mNavigator; | 244 | DateNavigator* mNavigator; |
242 | }; | 245 | }; |
243 | 246 | ||
244 | #endif | 247 | #endif |