-rw-r--r-- | korganizer/kotodoview.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/korganizer/kotodoview.h b/korganizer/kotodoview.h index 0c08677..5ca0362 100644 --- a/korganizer/kotodoview.h +++ b/korganizer/kotodoview.h | |||
@@ -30,32 +30,33 @@ | |||
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 | 47 | ||
47 | class QDragEnterEvent; | 48 | class QDragEnterEvent; |
48 | class QDragMoveEvent; | 49 | class QDragMoveEvent; |
49 | class QDragLeaveEvent; | 50 | class QDragLeaveEvent; |
50 | class QDropEvent; | 51 | class QDropEvent; |
51 | 52 | ||
52 | class DocPrefs; | 53 | class DocPrefs; |
53 | 54 | ||
54 | class KOTodoListView : public KListView | 55 | class KOTodoListView : public KListView |
55 | { | 56 | { |
56 | Q_OBJECT | 57 | Q_OBJECT |
57 | public: | 58 | public: |
58 | KOTodoListView(Calendar *,QWidget *parent=0,const char *name=0); | 59 | KOTodoListView(Calendar *,QWidget *parent=0,const char *name=0); |
59 | virtual ~KOTodoListView() {} | 60 | virtual ~KOTodoListView() {} |
60 | 61 | ||
61 | signals: | 62 | signals: |
@@ -105,42 +106,42 @@ class KOQuickTodo : public QLineEdit | |||
105 | class KOTodoView : public KOrg::BaseView | 106 | class KOTodoView : public KOrg::BaseView |
106 | { | 107 | { |
107 | Q_OBJECT | 108 | Q_OBJECT |
108 | public: | 109 | public: |
109 | KOTodoView(Calendar *, QWidget* parent=0, const char* name=0 ); | 110 | KOTodoView(Calendar *, QWidget* parent=0, const char* name=0 ); |
110 | ~KOTodoView(); | 111 | ~KOTodoView(); |
111 | 112 | ||
112 | QPtrList<Incidence> selectedIncidences(); | 113 | QPtrList<Incidence> selectedIncidences(); |
113 | QPtrList<Todo> selectedTodos(); | 114 | QPtrList<Todo> selectedTodos(); |
114 | 115 | ||
115 | DateList selectedDates() | 116 | DateList selectedDates() |
116 | {DateList q; | 117 | {DateList q; |
117 | return q;} | 118 | return q;} |
118 | 119 | ||
119 | /** Return number of shown dates. TodoView does not show dates, */ | 120 | /** Return number of shown dates. TodoView does not show dates, */ |
120 | int currentDateCount() { return 0; } | 121 | int currentDateCount() { return 0; } |
121 | void setNarrow(); | ||
122 | 122 | ||
123 | void printPreview(CalPrinter *calPrinter, const QDate &fd, const QDate &td); | 123 | void printPreview(CalPrinter *calPrinter, const QDate &fd, const QDate &td); |
124 | 124 | ||
125 | void setDocumentId( const QString & ); | 125 | void setDocumentId( const QString & ); |
126 | 126 | ||
127 | void saveLayout(KConfig *config, const QString &group) const; | 127 | void saveLayout(KConfig *config, const QString &group) const; |
128 | void restoreLayout(KConfig *config, const QString &group); | 128 | void restoreLayout(KConfig *config, const QString &group); |
129 | /** Create a popup menu to set categories */ | 129 | /** Create a popup menu to set categories */ |
130 | QPopupMenu *getCategoryPopupMenu (KOTodoViewItem *todoItem); | 130 | QPopupMenu *getCategoryPopupMenu (KOTodoViewItem *todoItem); |
131 | void setNavigator( DateNavigator* nav ) {mNavigator = nav;} | ||
131 | 132 | ||
132 | public slots: | 133 | public slots: |
133 | void updateView(); | 134 | void updateView(); |
134 | void updateConfig(); | 135 | void updateConfig(); |
135 | 136 | ||
136 | void changeEventDisplay(Event *, int); | 137 | void changeEventDisplay(Event *, int); |
137 | 138 | ||
138 | void showDates(const QDate &start, const QDate &end); | 139 | void showDates(const QDate &start, const QDate &end); |
139 | void showEvents(QPtrList<Event> eventList); | 140 | void showEvents(QPtrList<Event> eventList); |
140 | 141 | ||
141 | void clearSelection(); | 142 | void clearSelection(); |
142 | void jumpToDate (); | 143 | void jumpToDate (); |
143 | 144 | ||
144 | void editItem(QListViewItem *item); | 145 | void editItem(QListViewItem *item); |
145 | void showItem(QListViewItem *item,const QPoint &,int); | 146 | void showItem(QListViewItem *item,const QPoint &,int); |
146 | void popupMenu(QListViewItem *item,const QPoint &,int); | 147 | void popupMenu(QListViewItem *item,const QPoint &,int); |
@@ -149,32 +150,33 @@ class KOTodoView : public KOrg::BaseView | |||
149 | void unparentTodo(); | 150 | void unparentTodo(); |
150 | void reparentTodo(); | 151 | void reparentTodo(); |
151 | void showTodo(); | 152 | void showTodo(); |
152 | void editTodo(); | 153 | void editTodo(); |
153 | void cloneTodo(); | 154 | void cloneTodo(); |
154 | void cancelTodo(); | 155 | void cancelTodo(); |
155 | void moveTodo(); | 156 | void moveTodo(); |
156 | void beamTodo(); | 157 | void beamTodo(); |
157 | void deleteTodo(); | 158 | void deleteTodo(); |
158 | 159 | ||
159 | void setNewPriority(int); | 160 | void setNewPriority(int); |
160 | void setNewPercentage(int); | 161 | void setNewPercentage(int); |
161 | void changedCategories(int); | 162 | void changedCategories(int); |
162 | 163 | ||
163 | void purgeCompleted(); | 164 | void purgeCompleted(); |
164 | void toggleCompleted(); | 165 | void toggleCompleted(); |
166 | void toggleRunning(); | ||
165 | void toggleQuickTodo(); | 167 | void toggleQuickTodo(); |
166 | void updateTodo( Todo *, int ); | 168 | void updateTodo( Todo *, int ); |
167 | 169 | ||
168 | void itemClicked(QListViewItem *); | 170 | void itemClicked(QListViewItem *); |
169 | void itemStateChanged(QListViewItem *); | 171 | void itemStateChanged(QListViewItem *); |
170 | void modified(bool); | 172 | void modified(bool); |
171 | void itemDoubleClicked(QListViewItem *item); | 173 | void itemDoubleClicked(QListViewItem *item); |
172 | 174 | ||
173 | signals: | 175 | signals: |
174 | void newTodoSignal(); | 176 | void newTodoSignal(); |
175 | void newSubTodoSignal(Todo *); | 177 | void newSubTodoSignal(Todo *); |
176 | void unparentTodoSignal(Todo *); | 178 | void unparentTodoSignal(Todo *); |
177 | void reparentTodoSignal( Todo *,Todo * ); | 179 | void reparentTodoSignal( Todo *,Todo * ); |
178 | void showTodoSignal(Todo *); | 180 | void showTodoSignal(Todo *); |
179 | 181 | ||
180 | void editTodoSignal(Todo *); | 182 | void editTodoSignal(Todo *); |
@@ -194,41 +196,44 @@ class KOTodoView : public KOrg::BaseView | |||
194 | 196 | ||
195 | private: | 197 | private: |
196 | /* | 198 | /* |
197 | * the TodoEditor approach is rather unscaling in the long | 199 | * the TodoEditor approach is rather unscaling in the long |
198 | * run. | 200 | * run. |
199 | * Korganizer keeps it in memory and we need to update | 201 | * Korganizer keeps it in memory and we need to update |
200 | * 1. make KOTodoViewItem a QObject again? | 202 | * 1. make KOTodoViewItem a QObject again? |
201 | * 2. add a public method for setting one todo modified? | 203 | * 2. add a public method for setting one todo modified? |
202 | * 3. add a private method for setting a todo modified + friend here? | 204 | * 3. add a private method for setting a todo modified + friend here? |
203 | * -- zecke 2002-07-08 | 205 | * -- zecke 2002-07-08 |
204 | */ | 206 | */ |
205 | friend class KOTodoViewItem; | 207 | friend class KOTodoViewItem; |
206 | void setTodoModified( Todo* ); | 208 | void setTodoModified( Todo* ); |
207 | QMap<Todo *,KOTodoViewItem *>::ConstIterator insertTodoItem(Todo *todo); | 209 | QMap<Todo *,KOTodoViewItem *>::ConstIterator insertTodoItem(Todo *todo); |
208 | void restoreItemState( QListViewItem * ); | 210 | void restoreItemState( QListViewItem * ); |
209 | 211 | ||
212 | bool checkTodo( Todo * ); | ||
213 | |||
210 | KOTodoListView *mTodoListView; | 214 | KOTodoListView *mTodoListView; |
211 | QPopupMenu *mItemPopupMenu; | 215 | QPopupMenu *mItemPopupMenu; |
212 | QPopupMenu *mPopupMenu; | 216 | QPopupMenu *mPopupMenu; |
213 | QPopupMenu *mPriorityPopupMenu; | 217 | QPopupMenu *mPriorityPopupMenu; |
214 | QPopupMenu *mPercentageCompletedPopupMenu; | 218 | QPopupMenu *mPercentageCompletedPopupMenu; |
215 | QPopupMenu *mCategoryPopupMenu; | 219 | QPopupMenu *mCategoryPopupMenu; |
216 | 220 | ||
217 | QMap<int, int> mPercentage; | 221 | QMap<int, int> mPercentage; |
218 | QMap<int, int> mPriority; | 222 | QMap<int, int> mPriority; |
219 | QMap<int, QString> mCategory; | 223 | QMap<int, QString> mCategory; |
220 | KOTodoViewItem *mActiveItem; | 224 | KOTodoViewItem *mActiveItem; |
221 | 225 | ||
222 | QMap<Todo *,KOTodoViewItem *> mTodoMap; | 226 | QMap<Todo *,KOTodoViewItem *> mTodoMap; |
223 | QString mName; | 227 | QString mName; |
224 | 228 | ||
225 | DocPrefs *mDocPrefs; | 229 | DocPrefs *mDocPrefs; |
226 | QString mCurrentDoc; | 230 | QString mCurrentDoc; |
227 | KOQuickTodo *mQuickAdd; | 231 | KOQuickTodo *mQuickAdd; |
228 | bool mBlockUpdate; | 232 | bool mBlockUpdate; |
229 | void todoModified(Todo *, int ); | 233 | void todoModified(Todo *, int ); |
230 | void keyPressEvent ( QKeyEvent * ) ; | 234 | void keyPressEvent ( QKeyEvent * ) ; |
231 | KOTodoViewItem * pendingSubtodo; | 235 | KOTodoViewItem * pendingSubtodo; |
236 | DateNavigator* mNavigator; | ||
232 | }; | 237 | }; |
233 | 238 | ||
234 | #endif | 239 | #endif |