summaryrefslogtreecommitdiffabout
path: root/korganizer/kolistview.h
Unidiff
Diffstat (limited to 'korganizer/kolistview.h') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/kolistview.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/korganizer/kolistview.h b/korganizer/kolistview.h
index f4d6879..c25592d 100644
--- a/korganizer/kolistview.h
+++ b/korganizer/kolistview.h
@@ -171,144 +171,147 @@ void pickAlarmProgram()
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 signals: 220 signals:
220 void newEvent(); 221 void newEvent();
221 void showIncidence( Incidence* ); 222 void showIncidence( Incidence* );
222 public slots: 223 public slots:
223 void popupMenu(); 224 void popupMenu();
224 private: 225 private:
225 QPoint mEventPos; 226 QPoint mEventPos;
226 QPoint mEventGlobalPos; 227 QPoint mEventGlobalPos;
227 QTimer* mPopupTimer; 228 QTimer* mPopupTimer;
228 int mYMousePos; 229 int mYMousePos;
229 void keyPressEvent ( QKeyEvent * ) ; 230 void keyPressEvent ( QKeyEvent * ) ;
230 void contentsMouseDoubleClickEvent(QMouseEvent *e); 231 void contentsMouseDoubleClickEvent(QMouseEvent *e);
231 void contentsMousePressEvent(QMouseEvent *e); 232 void contentsMousePressEvent(QMouseEvent *e);
232 void contentsMouseReleaseEvent(QMouseEvent *e); 233 void contentsMouseReleaseEvent(QMouseEvent *e);
233 void contentsMouseMoveEvent(QMouseEvent *e); 234 void contentsMouseMoveEvent(QMouseEvent *e);
234 bool mMouseDown; 235 bool mMouseDown;
235}; 236};
236 237
237class KOListView : public KOEventView 238class KOListView : public KOEventView
238{ 239{
239 Q_OBJECT 240 Q_OBJECT
240 public: 241 public:
241 KOListView(Calendar *calendar, QWidget *parent = 0, 242 KOListView(Calendar *calendar, QWidget *parent = 0,
242 const char *name = 0); 243 const char *name = 0);
243 ~KOListView(); 244 ~KOListView();
244 245
245 virtual int maxDatesHint(); 246 virtual int maxDatesHint();
246 virtual int currentDateCount(); 247 virtual int currentDateCount();
247 virtual QPtrList<Incidence> selectedIncidences(); 248 virtual QPtrList<Incidence> selectedIncidences();
248 virtual DateList selectedDates(); 249 virtual DateList selectedDates();
249 250
250 void showDates(bool show); 251 void showDates(bool show);
251 Incidence* currentItem(); 252 Incidence* currentItem();
252 void addTodos(QPtrList<Todo> eventList); 253 void addTodos(QPtrList<Todo> eventList);
253 void addJournals(QPtrList<Journal> eventList); 254 void addJournals(QPtrList<Journal> eventList);
254 virtual void printPreview(CalPrinter *calPrinter, 255 virtual void printPreview(CalPrinter *calPrinter,
255 const QDate &, const QDate &); 256 const QDate &, const QDate &);
256 257
257 void readSettings(KConfig *config, QString setting = "KOListView Layout"); 258 void readSettings(KConfig *config, QString setting = "KOListView Layout");
258 void writeSettings(KConfig *config, QString setting = "KOListView Layout"); 259 void writeSettings(KConfig *config, QString setting = "KOListView Layout");
259 void updateList(); 260 void updateList();
260 void clearList(); 261 void clearList();
261 void setStartDate(const QDate &start); 262 void setStartDate(const QDate &start);
262 int count(); 263 int count();
263 QString getWhatsThisText(QPoint p); 264 QString getWhatsThisText(QPoint p);
264 signals: 265 signals:
265 void signalNewEvent(); 266 void signalNewEvent();
266 void beamIncidenceList(QPtrList<Incidence>); 267 void beamIncidenceList(QPtrList<Incidence>);
267 268
268 public slots: 269 public slots:
270 void hideAll();
271 void printList();
269 void resetFocus(); 272 void resetFocus();
270 virtual void updateView(); 273 virtual void updateView();
271 virtual void showDates(const QDate &start, const QDate &end); 274 virtual void showDates(const QDate &start, const QDate &end);
272 virtual void showEvents(QPtrList<Event> eventList); 275 virtual void showEvents(QPtrList<Event> eventList);
273 void clearSelection(); 276 void clearSelection();
274 void allSelection(); 277 void allSelection();
275 278
276 void clear(); 279 void clear();
277 void beamDone( Ir *ir ); 280 void beamDone( Ir *ir );
278 void showDates(); 281 void showDates();
279 void hideDates(); 282 void hideDates();
280 void deleteAll(); 283 void deleteAll();
281 void saveToFile(); 284 void saveToFile();
282 void saveToFileVCS(); 285 void saveToFileVCS();
283 void saveDescriptionToFile(); 286 void saveDescriptionToFile();
284 void beamSelected(); 287 void beamSelected();
285 void updateConfig(); 288 void updateConfig();
286 void addCat(); 289 void addCat();
287 void setCat(); 290 void setCat();
288 void setAlarm(); 291 void setAlarm();
289 void setCategories( bool removeOld ); 292 void setCategories( bool removeOld );
290 void changeEventDisplay(Event *, int); 293 void changeEventDisplay(Event *, int);
291 294
292 void defaultItemAction(QListViewItem *item); 295 void defaultItemAction(QListViewItem *item);
293 void popupMenu(QListViewItem *item,const QPoint &,int); 296 void popupMenu(QListViewItem *item,const QPoint &,int);
294 297
295 protected slots: 298 protected slots:
296 void processSelectionChange(QListViewItem *); 299 void processSelectionChange(QListViewItem *);
297 300
298 protected: 301 protected:
299 void writeToFile( bool iCal ); 302 void writeToFile( bool iCal );
300 void addEvents(QPtrList<Event> eventList); 303 void addEvents(QPtrList<Event> eventList);
301 void addIncidence(Incidence *); 304 void addIncidence(Incidence *);
302 KOListViewItem *getItemForEvent(Event *event); 305 KOListViewItem *getItemForEvent(Event *event);
303 306
304 private: 307 private:
305 KOListViewWhatsThis *mKOListViewWhatsThis; 308 KOListViewWhatsThis *mKOListViewWhatsThis;
306 KOListViewListView *mListView; 309 KOListViewListView *mListView;
307 KOEventPopupMenu *mPopupMenu; 310 KOEventPopupMenu *mPopupMenu;
308 KOListViewItem *mActiveItem; 311 KOListViewItem *mActiveItem;
309 QDict<Incidence> mUidDict; 312 QDict<Incidence> mUidDict;
310 QDate mStartDate; 313 QDate mStartDate;
311 void keyPressEvent ( QKeyEvent * ) ; 314 void keyPressEvent ( QKeyEvent * ) ;
312}; 315};
313 316
314#endif 317#endif