summaryrefslogtreecommitdiffabout
path: root/korganizer/kolistview.h
Unidiff
Diffstat (limited to 'korganizer/kolistview.h') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/kolistview.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/korganizer/kolistview.h b/korganizer/kolistview.h
index d384af0..bcef0f0 100644
--- a/korganizer/kolistview.h
+++ b/korganizer/kolistview.h
@@ -170,152 +170,154 @@ void pickAlarmProgram()
170}; 170};
171 171
172}; 172};
173 173
174 174
175 175
176 176
177 177
178 178
179 179
180typedef CustomListViewItem<Incidence *> KOListViewItem; 180typedef CustomListViewItem<Incidence *> KOListViewItem;
181 181
182/** 182/**
183 This class provides the initialisation of a KOListViewItem for calendar 183 This class provides the initialisation of a KOListViewItem for calendar
184 components using the Incidence::Visitor. 184 components using the Incidence::Visitor.
185*/ 185*/
186class ListItemVisitor : public Incidence::Visitor 186class ListItemVisitor : public Incidence::Visitor
187{ 187{
188 public: 188 public:
189 ListItemVisitor(KOListViewItem *, QDate d); 189 ListItemVisitor(KOListViewItem *, QDate d);
190 ~ListItemVisitor(); 190 ~ListItemVisitor();
191 191
192 bool visit(Event *); 192 bool visit(Event *);
193 bool visit(Todo *); 193 bool visit(Todo *);
194 bool visit(Journal *); 194 bool visit(Journal *);
195 195
196 private: 196 private:
197 KOListViewItem *mItem; 197 KOListViewItem *mItem;
198 QDate mDate; 198 QDate mDate;
199}; 199};
200 200
201/** 201/**
202 This class provides a multi-column list view of events. It can 202 This class provides a multi-column list view of events. It can
203 display events from one particular day or several days, it doesn't 203 display events from one particular day or several days, it doesn't
204 matter. To use a view that only handles one day at a time, use 204 matter. To use a view that only handles one day at a time, use
205 KODayListView. 205 KODayListView.
206 206
207 @short multi-column list view of various events. 207 @short multi-column list view of various events.
208 @author Preston Brown <pbrown@kde.org> 208 @author Preston Brown <pbrown@kde.org>
209 @see KOBaseView, KODayListView 209 @see KOBaseView, KODayListView
210*/ 210*/
211class KOListView; 211class KOListView;
212 212
213class KOListViewListView : public KListView 213class KOListViewListView : public KListView
214{ 214{
215 Q_OBJECT 215 Q_OBJECT
216 public: 216 public:
217 KOListViewListView(KOListView * lv ); 217 KOListViewListView(KOListView * lv );
218 bool hasMultiSelection(QListViewItem*); 218 bool hasMultiSelection(QListViewItem*);
219 void printList(); 219 void printList();
220 signals: 220 signals:
221 void newEvent(); 221 void newEvent();
222 void showIncidence( Incidence* ); 222 void showIncidence( Incidence* );
223 public slots: 223 public slots:
224 void popupMenu(); 224 void popupMenu();
225 private: 225 private:
226 QPoint mEventPos; 226 QPoint mEventPos;
227 QPoint mEventGlobalPos; 227 QPoint mEventGlobalPos;
228 QTimer* mPopupTimer; 228 QTimer* mPopupTimer;
229 int mYMousePos; 229 int mYMousePos;
230 void keyPressEvent ( QKeyEvent * ) ; 230 void keyPressEvent ( QKeyEvent * ) ;
231 void contentsMouseDoubleClickEvent(QMouseEvent *e); 231 void contentsMouseDoubleClickEvent(QMouseEvent *e);
232 void contentsMousePressEvent(QMouseEvent *e); 232 void contentsMousePressEvent(QMouseEvent *e);
233 void contentsMouseReleaseEvent(QMouseEvent *e); 233 void contentsMouseReleaseEvent(QMouseEvent *e);
234 void contentsMouseMoveEvent(QMouseEvent *e); 234 void contentsMouseMoveEvent(QMouseEvent *e);
235 bool mMouseDown; 235 bool mMouseDown;
236}; 236};
237 237
238class KOListView : public KOEventView 238class KOListView : public KOEventView
239{ 239{
240 Q_OBJECT 240 Q_OBJECT
241 public: 241 public:
242 KOListView(Calendar *calendar, QWidget *parent = 0, 242 KOListView(Calendar *calendar, QWidget *parent = 0,
243 const char *name = 0); 243 const char *name = 0);
244 ~KOListView(); 244 ~KOListView();
245 245
246 virtual int maxDatesHint(); 246 virtual int maxDatesHint();
247 virtual int currentDateCount(); 247 virtual int currentDateCount();
248 virtual QPtrList<Incidence> selectedIncidences(); 248 virtual QPtrList<Incidence> selectedIncidences();
249 virtual DateList selectedDates(); 249 virtual DateList selectedDates();
250 250
251 void showDates(bool show); 251 void showDates(bool show);
252 Incidence* currentItem(); 252 Incidence* currentItem();
253 void addTodos(QPtrList<Todo> eventList); 253 void addTodos(QPtrList<Todo> eventList);
254 void addJournals(QPtrList<Journal> eventList); 254 void addJournals(QPtrList<Journal> eventList);
255 virtual void printPreview(CalPrinter *calPrinter, 255 virtual void printPreview(CalPrinter *calPrinter,
256 const QDate &, const QDate &); 256 const QDate &, const QDate &);
257 257
258 void readSettings(KConfig *config, QString setting = "KOListView Layout"); 258 void readSettings(KConfig *config, QString setting = "KOListView Layout");
259 void writeSettings(KConfig *config, QString setting = "KOListView Layout"); 259 void writeSettings(KConfig *config, QString setting = "KOListView Layout");
260 void updateList(); 260 void updateList();
261 void clearList(); 261 void clearList();
262 void setStartDate(const QDate &start); 262 void setStartDate(const QDate &start);
263 int count(); 263 int count();
264 QString getWhatsThisText(QPoint p); 264 QString getWhatsThisText(QPoint p);
265 QPtrList<Incidence> KOListView::getSelectedIncidences( bool includeEvents = true, bool includeTodos = true , bool includeJournals = true, bool onlyDueTodos = false ); 265 QPtrList<Incidence> KOListView::getSelectedIncidences( bool includeEvents = true, bool includeTodos = true , bool includeJournals = true, bool onlyDueTodos = false );
266 void showCompletedTodos();
266 signals: 267 signals:
267 void signalNewEvent(); 268 void signalNewEvent();
268 void beamIncidenceList(QPtrList<Incidence>); 269 void beamIncidenceList(QPtrList<Incidence>);
269 270
270 public slots: 271 public slots:
271 void hideAll(); 272 void hideAll();
272 void printList(); 273 void printList();
273 void resetFocus(); 274 void resetFocus();
274 virtual void updateView(); 275 virtual void updateView();
275 virtual void showDates(const QDate &start, const QDate &end); 276 virtual void showDates(const QDate &start, const QDate &end);
276 virtual void showEvents(QPtrList<Event> eventList); 277 virtual void showEvents(QPtrList<Event> eventList);
277 void clearSelection(); 278 void clearSelection();
278 void allSelection(); 279 void allSelection();
279 280
280 void clear(); 281 void clear();
281 void beamDone( Ir *ir ); 282 void beamDone( Ir *ir );
282 void showDates(); 283 void showDates();
283 void hideDates(); 284 void hideDates();
284 void deleteAll(); 285 void deleteAll();
285 void saveToFile(); 286 void saveToFile();
286 void saveToFileVCS(); 287 void saveToFileVCS();
287 void saveDescriptionToFile(); 288 void saveDescriptionToFile();
288 void beamSelected(); 289 void beamSelected();
289 void updateConfig(); 290 void updateConfig();
290 void addCat(); 291 void addCat();
291 void setCat(); 292 void setCat();
292 void setAlarm(); 293 void setAlarm();
293 void setCategories( bool removeOld ); 294 void setCategories( bool removeOld );
294 void changeEventDisplay(Event *, int); 295 void changeEventDisplay(Event *, int);
295 296
296 void defaultItemAction(QListViewItem *item); 297 void defaultItemAction(QListViewItem *item);
297 void popupMenu(QListViewItem *item,const QPoint &,int); 298 void popupMenu(QListViewItem *item,const QPoint &,int);
298 void setCalendar( int c ); 299 void setCalendar( int c );
299 void populateCalPopup(); 300 void populateCalPopup();
300 301
301 protected slots: 302 protected slots:
302 void processSelectionChange(QListViewItem *); 303 void processSelectionChange(QListViewItem *);
303 304
304 protected: 305 protected:
305 void writeToFile( bool iCal ); 306 void writeToFile( bool iCal );
306 void addEvents(QPtrList<Event> eventList); 307 void addEvents(QPtrList<Event> eventList);
307 void addIncidence(Incidence *); 308 void addIncidence(Incidence *);
308 KOListViewItem *getItemForEvent(Incidence *event); 309 KOListViewItem *getItemForEvent(Incidence *event);
309 310
310 private: 311 private:
312 bool mForceShowCompletedTodos;
311 QPopupMenu* mCalPopup; 313 QPopupMenu* mCalPopup;
312 KOListViewWhatsThis *mKOListViewWhatsThis; 314 KOListViewWhatsThis *mKOListViewWhatsThis;
313 KOListViewListView *mListView; 315 KOListViewListView *mListView;
314 KOEventPopupMenu *mPopupMenu; 316 KOEventPopupMenu *mPopupMenu;
315 KOListViewItem *mActiveItem; 317 KOListViewItem *mActiveItem;
316 QDict<Incidence> mUidDict; 318 QDict<Incidence> mUidDict;
317 QDate mStartDate; 319 QDate mStartDate;
318 void keyPressEvent ( QKeyEvent * ) ; 320 void keyPressEvent ( QKeyEvent * ) ;
319}; 321};
320 322
321#endif 323#endif