-rw-r--r-- | korganizer/kotodoview.h | 58 |
1 files changed, 34 insertions, 24 deletions
diff --git a/korganizer/kotodoview.h b/korganizer/kotodoview.h index 0cbc087..a9e7f30 100644 --- a/korganizer/kotodoview.h +++ b/korganizer/kotodoview.h | |||
@@ -23,21 +23,31 @@ | |||
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 <q3ptrlist.h> |
30 | #include <qstrlist.h> | 30 | #include <q3strlist.h> |
31 | #include <qlistbox.h> | 31 | #include <q3listbox.h> |
32 | #include <qpopupmenu.h> | 32 | #include <q3popupmenu.h> |
33 | #include <qlabel.h> | 33 | #include <qlabel.h> |
34 | #include <qmap.h> | 34 | #include <qmap.h> |
35 | #include <qdialog.h> | 35 | #include <qdialog.h> |
36 | #include <qlabel.h> | 36 | #include <qlabel.h> |
37 | #include <qlistview.h> | 37 | #include <q3listview.h> |
38 | //Added by qt3to4: | ||
39 | #include <QDragMoveEvent> | ||
40 | #include <QDropEvent> | ||
41 | #include <QDragLeaveEvent> | ||
42 | #include <QWheelEvent> | ||
43 | #include <QPaintEvent> | ||
44 | #include <QFocusEvent> | ||
45 | #include <QMouseEvent> | ||
46 | #include <QKeyEvent> | ||
47 | #include <QDragEnterEvent> | ||
38 | #include <klistview.h> | 48 | #include <klistview.h> |
39 | 49 | ||
40 | #include <libkcal/calendar.h> | 50 | #include <libkcal/calendar.h> |
41 | #include <libkcal/todo.h> | 51 | #include <libkcal/todo.h> |
42 | 52 | ||
43 | #include <korganizer/baseview.h> | 53 | #include <korganizer/baseview.h> |
@@ -98,13 +108,13 @@ class KOTodoListView : public KListView | |||
98 | KOTodoListView(Calendar *,QWidget *parent=0,const char *name=0); | 108 | KOTodoListView(Calendar *,QWidget *parent=0,const char *name=0); |
99 | virtual ~KOTodoListView() {} | 109 | virtual ~KOTodoListView() {} |
100 | 110 | ||
101 | signals: | 111 | signals: |
102 | void paintNeeded(); | 112 | void paintNeeded(); |
103 | void todoDropped(Todo *, int); | 113 | void todoDropped(Todo *, int); |
104 | void double_Clicked(QListViewItem *item); | 114 | void double_Clicked(Q3ListViewItem *item); |
105 | void reparentTodoSignal( Todo *,Todo * ); | 115 | void reparentTodoSignal( Todo *,Todo * ); |
106 | void unparentTodoSignal(Todo *); | 116 | void unparentTodoSignal(Todo *); |
107 | void deleteTodo( Todo * ); | 117 | void deleteTodo( Todo * ); |
108 | protected: | 118 | protected: |
109 | void wheelEvent (QWheelEvent *e); | 119 | void wheelEvent (QWheelEvent *e); |
110 | void contentsDragEnterEvent(QDragEnterEvent *); | 120 | void contentsDragEnterEvent(QDragEnterEvent *); |
@@ -121,13 +131,13 @@ class KOTodoListView : public KListView | |||
121 | void paintEvent(QPaintEvent * pevent); | 131 | void paintEvent(QPaintEvent * pevent); |
122 | bool internalDrop; | 132 | bool internalDrop; |
123 | QString mName; | 133 | QString mName; |
124 | Calendar *mCalendar; | 134 | Calendar *mCalendar; |
125 | QPoint mPressPos; | 135 | QPoint mPressPos; |
126 | bool mMousePressed; | 136 | bool mMousePressed; |
127 | QListViewItem *mOldCurrent; | 137 | Q3ListViewItem *mOldCurrent; |
128 | bool mFlagKeyPressed; | 138 | bool mFlagKeyPressed; |
129 | void keyPressEvent ( QKeyEvent * ) ; | 139 | void keyPressEvent ( QKeyEvent * ) ; |
130 | void keyReleaseEvent ( QKeyEvent * ) ; | 140 | void keyReleaseEvent ( QKeyEvent * ) ; |
131 | }; | 141 | }; |
132 | 142 | ||
133 | 143 | ||
@@ -154,14 +164,14 @@ class KOTodoView : public KOrg::BaseView | |||
154 | { | 164 | { |
155 | Q_OBJECT | 165 | Q_OBJECT |
156 | public: | 166 | public: |
157 | KOTodoView(Calendar *, QWidget* parent=0, const char* name=0 ); | 167 | KOTodoView(Calendar *, QWidget* parent=0, const char* name=0 ); |
158 | ~KOTodoView(); | 168 | ~KOTodoView(); |
159 | 169 | ||
160 | QPtrList<Incidence> selectedIncidences(); | 170 | Q3PtrList<Incidence> selectedIncidences(); |
161 | QPtrList<Todo> selectedTodos(); | 171 | Q3PtrList<Todo> selectedTodos(); |
162 | 172 | ||
163 | DateList selectedDates() | 173 | DateList selectedDates() |
164 | {DateList q; | 174 | {DateList q; |
165 | return q;} | 175 | return q;} |
166 | 176 | ||
167 | /** Return number of shown dates. TodoView does not show dates, */ | 177 | /** Return number of shown dates. TodoView does not show dates, */ |
@@ -181,20 +191,20 @@ class KOTodoView : public KOrg::BaseView | |||
181 | void updateView(); | 191 | void updateView(); |
182 | void updateConfig(); | 192 | void updateConfig(); |
183 | 193 | ||
184 | void changeEventDisplay(Event *, int); | 194 | void changeEventDisplay(Event *, int); |
185 | 195 | ||
186 | void showDates(const QDate &start, const QDate &end); | 196 | void showDates(const QDate &start, const QDate &end); |
187 | void showEvents(QPtrList<Event> eventList); | 197 | void showEvents(Q3PtrList<Event> eventList); |
188 | 198 | ||
189 | void clearSelection(); | 199 | void clearSelection(); |
190 | void jumpToDate (); | 200 | void jumpToDate (); |
191 | 201 | ||
192 | void editItem(QListViewItem *item); | 202 | void editItem(Q3ListViewItem *item); |
193 | void showItem(QListViewItem *item,const QPoint &,int); | 203 | void showItem(Q3ListViewItem *item,const QPoint &,int); |
194 | void popupMenu(QListViewItem *item,const QPoint &,int); | 204 | void popupMenu(Q3ListViewItem *item,const QPoint &,int); |
195 | void newTodo(); | 205 | void newTodo(); |
196 | void newSubTodo(); | 206 | void newSubTodo(); |
197 | void unparentTodo(); | 207 | void unparentTodo(); |
198 | void reparentTodo(); | 208 | void reparentTodo(); |
199 | void showTodo(); | 209 | void showTodo(); |
200 | void editTodo(); | 210 | void editTodo(); |
@@ -216,16 +226,16 @@ class KOTodoView : public KOrg::BaseView | |||
216 | void purgeCompleted(); | 226 | void purgeCompleted(); |
217 | void toggleCompleted(); | 227 | void toggleCompleted(); |
218 | void toggleRunning(); | 228 | void toggleRunning(); |
219 | void toggleQuickTodo(); | 229 | void toggleQuickTodo(); |
220 | void updateTodo( Todo *, int ); | 230 | void updateTodo( Todo *, int ); |
221 | 231 | ||
222 | void itemClicked(QListViewItem *); | 232 | void itemClicked(Q3ListViewItem *); |
223 | void itemStateChanged(QListViewItem *); | 233 | void itemStateChanged(Q3ListViewItem *); |
224 | void modified(bool); | 234 | void modified(bool); |
225 | void itemDoubleClicked(QListViewItem *item); | 235 | void itemDoubleClicked(Q3ListViewItem *item); |
226 | void resetFocusToList(); | 236 | void resetFocusToList(); |
227 | void fillCategories (); | 237 | void fillCategories (); |
228 | void fillCal (); | 238 | void fillCal (); |
229 | void changedCal (int); | 239 | void changedCal (int); |
230 | 240 | ||
231 | signals: | 241 | signals: |
@@ -270,24 +280,24 @@ class KOTodoView : public KOrg::BaseView | |||
270 | KOTodoViewWhatsThis* mKOTodoViewWhatsThis; | 280 | KOTodoViewWhatsThis* mKOTodoViewWhatsThis; |
271 | friend class KOTodoListView; | 281 | friend class KOTodoListView; |
272 | void paintEvent(QPaintEvent * pevent); | 282 | void paintEvent(QPaintEvent * pevent); |
273 | bool mPendingUpdateBeforeRepaint; | 283 | bool mPendingUpdateBeforeRepaint; |
274 | friend class KOTodoViewItem; | 284 | friend class KOTodoViewItem; |
275 | QMap<Todo *,KOTodoViewItem *>::ConstIterator insertTodoItem(Todo *todo); | 285 | QMap<Todo *,KOTodoViewItem *>::ConstIterator insertTodoItem(Todo *todo); |
276 | void restoreItemState( QListViewItem * ); | 286 | void restoreItemState( Q3ListViewItem * ); |
277 | 287 | ||
278 | bool checkTodo( Todo * ); | 288 | bool checkTodo( Todo * ); |
279 | bool isFlatDisplay; | 289 | bool isFlatDisplay; |
280 | void setOpen( QListViewItem*, bool setOpen); | 290 | void setOpen( Q3ListViewItem*, bool setOpen); |
281 | KOTodoListView *mTodoListView; | 291 | KOTodoListView *mTodoListView; |
282 | QPopupMenu *mItemPopupMenu; | 292 | Q3PopupMenu *mItemPopupMenu; |
283 | QPopupMenu *mPopupMenu; | 293 | Q3PopupMenu *mPopupMenu; |
284 | QPopupMenu *mPriorityPopupMenu; | 294 | Q3PopupMenu *mPriorityPopupMenu; |
285 | QPopupMenu *mPercentageCompletedPopupMenu; | 295 | Q3PopupMenu *mPercentageCompletedPopupMenu; |
286 | QPopupMenu *mCategoryPopupMenu; | 296 | Q3PopupMenu *mCategoryPopupMenu; |
287 | QPopupMenu *mCalPopupMenu; | 297 | Q3PopupMenu *mCalPopupMenu; |
288 | 298 | ||
289 | QMap<int, int> mPercentage; | 299 | QMap<int, int> mPercentage; |
290 | QMap<int, int> mPriority; | 300 | QMap<int, int> mPriority; |
291 | QMap<int, QString> mCategory; | 301 | QMap<int, QString> mCategory; |
292 | KOTodoViewItem *mActiveItem; | 302 | KOTodoViewItem *mActiveItem; |
293 | 303 | ||