-rw-r--r-- | korganizer/calendarview.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/korganizer/calendarview.h b/korganizer/calendarview.h index 16e671f..9782ffe 100644 --- a/korganizer/calendarview.h +++ b/korganizer/calendarview.h | |||
@@ -83,192 +83,193 @@ using namespace KCal; | |||
83 | class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Observer, public KSyncInterface | 83 | class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Observer, public KSyncInterface |
84 | { | 84 | { |
85 | Q_OBJECT | 85 | Q_OBJECT |
86 | public: | 86 | public: |
87 | /** | 87 | /** |
88 | Constructs a new calendar view widget. | 88 | Constructs a new calendar view widget. |
89 | 89 | ||
90 | @param calendar calendar document | 90 | @param calendar calendar document |
91 | @param parent parent window | 91 | @param parent parent window |
92 | @param name Qt internal widget object name | 92 | @param name Qt internal widget object name |
93 | */ | 93 | */ |
94 | CalendarView( CalendarResources *calendar, QWidget *parent = 0, | 94 | CalendarView( CalendarResources *calendar, QWidget *parent = 0, |
95 | const char *name = 0 ); | 95 | const char *name = 0 ); |
96 | CalendarView( Calendar *calendar, QWidget *parent = 0, | 96 | CalendarView( Calendar *calendar, QWidget *parent = 0, |
97 | const char *name = 0 ); | 97 | const char *name = 0 ); |
98 | virtual ~CalendarView(); | 98 | virtual ~CalendarView(); |
99 | 99 | ||
100 | Calendar *calendar() { return mCalendar; } | 100 | Calendar *calendar() { return mCalendar; } |
101 | 101 | ||
102 | KOViewManager *viewManager(); | 102 | KOViewManager *viewManager(); |
103 | KODialogManager *dialogManager(); | 103 | KODialogManager *dialogManager(); |
104 | 104 | ||
105 | QDate startDate(); | 105 | QDate startDate(); |
106 | QDate endDate(); | 106 | QDate endDate(); |
107 | 107 | ||
108 | QWidgetStack *viewStack(); | 108 | QWidgetStack *viewStack(); |
109 | QWidget *leftFrame(); | 109 | QWidget *leftFrame(); |
110 | 110 | ||
111 | DateNavigator *dateNavigator(); | 111 | DateNavigator *dateNavigator(); |
112 | KDateNavigator *dateNavigatorWidget(); | 112 | KDateNavigator *dateNavigatorWidget(); |
113 | 113 | ||
114 | void addView(KOrg::BaseView *); | 114 | void addView(KOrg::BaseView *); |
115 | void showView(KOrg::BaseView *); | 115 | void showView(KOrg::BaseView *); |
116 | KOEventViewerDialog* getEventViewerDialog(); | 116 | KOEventViewerDialog* getEventViewerDialog(); |
117 | Incidence *currentSelection(); | 117 | Incidence *currentSelection(); |
118 | 118 | ||
119 | signals: | 119 | signals: |
120 | void save (); | 120 | void save (); |
121 | void saveStopTimer (); | 121 | void saveStopTimer (); |
122 | void tempDisableBR(bool); | 122 | void tempDisableBR(bool); |
123 | /** This todo has been modified */ | 123 | /** This todo has been modified */ |
124 | void todoModified(Todo *, int); | 124 | void todoModified(Todo *, int); |
125 | 125 | ||
126 | /** when change is made to options dialog, the topwidget will catch this | 126 | /** when change is made to options dialog, the topwidget will catch this |
127 | * and emit this signal which notifies all widgets which have registered | 127 | * and emit this signal which notifies all widgets which have registered |
128 | * for notification to update their settings. */ | 128 | * for notification to update their settings. */ |
129 | void configChanged(); | 129 | void configChanged(); |
130 | /** emitted when the topwidget is closing down, so that any attached | 130 | /** emitted when the topwidget is closing down, so that any attached |
131 | child windows can also close. */ | 131 | child windows can also close. */ |
132 | void closingDown(); | 132 | void closingDown(); |
133 | /** emitted right before we die */ | 133 | /** emitted right before we die */ |
134 | void closed(QWidget *); | 134 | void closed(QWidget *); |
135 | 135 | ||
136 | /** Emitted when state of modified flag changes */ | 136 | /** Emitted when state of modified flag changes */ |
137 | void modifiedChanged(bool); | 137 | void modifiedChanged(bool); |
138 | void signalmodified(); | 138 | void signalmodified(); |
139 | 139 | ||
140 | /** Emitted when state of read-only flag changes */ | 140 | /** Emitted when state of read-only flag changes */ |
141 | void readOnlyChanged(bool); | 141 | void readOnlyChanged(bool); |
142 | 142 | ||
143 | /** Emitted when the unit of navigation changes */ | 143 | /** Emitted when the unit of navigation changes */ |
144 | void changeNavStringPrev(const QString &); | 144 | void changeNavStringPrev(const QString &); |
145 | void changeNavStringNext(const QString &); | 145 | void changeNavStringNext(const QString &); |
146 | 146 | ||
147 | /** Emitted when state of events selection has changed and user is organizer*/ | 147 | /** Emitted when state of events selection has changed and user is organizer*/ |
148 | void organizerEventsSelected(bool); | 148 | void organizerEventsSelected(bool); |
149 | /** Emitted when state of events selection has changed and user is attendee*/ | 149 | /** Emitted when state of events selection has changed and user is attendee*/ |
150 | void groupEventsSelected(bool); | 150 | void groupEventsSelected(bool); |
151 | /** | 151 | /** |
152 | Emitted when an incidence gets selected. If the selection is cleared the | 152 | Emitted when an incidence gets selected. If the selection is cleared the |
153 | signal is emitted with 0 as argument. | 153 | signal is emitted with 0 as argument. |
154 | */ | 154 | */ |
155 | void incidenceSelected( Incidence * ); | 155 | void incidenceSelected( Incidence * ); |
156 | /** Emitted, when a todoitem is selected or deselected. */ | 156 | /** Emitted, when a todoitem is selected or deselected. */ |
157 | void todoSelected( bool ); | 157 | void todoSelected( bool ); |
158 | 158 | ||
159 | /** | 159 | /** |
160 | Emitted, when clipboard content changes. Parameter indicates if paste | 160 | Emitted, when clipboard content changes. Parameter indicates if paste |
161 | is possible or not. | 161 | is possible or not. |
162 | */ | 162 | */ |
163 | void pasteEnabled(bool); | 163 | void pasteEnabled(bool); |
164 | 164 | ||
165 | /** Emitted, when the number of incoming messages has changed. */ | 165 | /** Emitted, when the number of incoming messages has changed. */ |
166 | void numIncomingChanged(int); | 166 | void numIncomingChanged(int); |
167 | 167 | ||
168 | /** Emitted, when the number of outgoing messages has changed. */ | 168 | /** Emitted, when the number of outgoing messages has changed. */ |
169 | void numOutgoingChanged(int); | 169 | void numOutgoingChanged(int); |
170 | 170 | ||
171 | /** Send status message, which can e.g. be displayed in the status bar. */ | 171 | /** Send status message, which can e.g. be displayed in the status bar. */ |
172 | void statusMessage(const QString &); | 172 | void statusMessage(const QString &); |
173 | 173 | ||
174 | void calendarViewExpanded( bool ); | 174 | void calendarViewExpanded( bool ); |
175 | void updateSearchDialog(); | 175 | void updateSearchDialog(); |
176 | 176 | ||
177 | 177 | ||
178 | public slots: | 178 | public slots: |
179 | void showNextAlarms(); | ||
179 | void showOpenError(); | 180 | void showOpenError(); |
180 | void watchSavedFile(); | 181 | void watchSavedFile(); |
181 | void recheckTimerAlarm(); | 182 | void recheckTimerAlarm(); |
182 | void checkNextTimerAlarm(); | 183 | void checkNextTimerAlarm(); |
183 | void addAlarm(const QDateTime &qdt, const QString ¬i ); | 184 | void addAlarm(const QDateTime &qdt, const QString ¬i ); |
184 | void addSuspendAlarm(const QDateTime &qdt, const QString ¬i ); | 185 | void addSuspendAlarm(const QDateTime &qdt, const QString ¬i ); |
185 | void removeAlarm(const QDateTime &qdt, const QString ¬i ); | 186 | void removeAlarm(const QDateTime &qdt, const QString ¬i ); |
186 | 187 | ||
187 | /** options dialog made a changed to the configuration. we catch this | 188 | /** options dialog made a changed to the configuration. we catch this |
188 | * and notify all widgets which need to update their configuration. */ | 189 | * and notify all widgets which need to update their configuration. */ |
189 | void updateConfig(); | 190 | void updateConfig(); |
190 | 191 | ||
191 | void insertBirthdays(const QString& uid, const QStringList& birthdayList, | 192 | void insertBirthdays(const QString& uid, const QStringList& birthdayList, |
192 | const QStringList& anniversaryList, const QStringList& realNameList, | 193 | const QStringList& anniversaryList, const QStringList& realNameList, |
193 | const QStringList& emailList, const QStringList& assembledNameList, | 194 | const QStringList& emailList, const QStringList& assembledNameList, |
194 | const QStringList& uidList); | 195 | const QStringList& uidList); |
195 | 196 | ||
196 | /** | 197 | /** |
197 | Load calendar from file \a filename. If \a merge is true, load | 198 | Load calendar from file \a filename. If \a merge is true, load |
198 | calendar into existing one, if it is false, clear calendar, before | 199 | calendar into existing one, if it is false, clear calendar, before |
199 | loading. Return true, if calendar could be successfully loaded. | 200 | loading. Return true, if calendar could be successfully loaded. |
200 | */ | 201 | */ |
201 | bool openCalendar(QString filename, bool merge=false); | 202 | bool openCalendar(QString filename, bool merge=false); |
202 | bool syncCalendar(QString filename,int mode = 0 ); | 203 | bool syncCalendar(QString filename,int mode = 0 ); |
203 | 204 | ||
204 | /** | 205 | /** |
205 | Save calendar data to file. Return true if calendar could be | 206 | Save calendar data to file. Return true if calendar could be |
206 | successfully saved. | 207 | successfully saved. |
207 | */ | 208 | */ |
208 | bool saveCalendar(QString filename); | 209 | bool saveCalendar(QString filename); |
209 | 210 | ||
210 | /** | 211 | /** |
211 | Close calendar. Clear calendar data and reset views to display an empty | 212 | Close calendar. Clear calendar data and reset views to display an empty |
212 | calendar. | 213 | calendar. |
213 | */ | 214 | */ |
214 | void closeCalendar(); | 215 | void closeCalendar(); |
215 | 216 | ||
216 | /** Archive old events of calendar */ | 217 | /** Archive old events of calendar */ |
217 | void archiveCalendar(); | 218 | void archiveCalendar(); |
218 | 219 | ||
219 | void showIncidence(); | 220 | void showIncidence(); |
220 | void editIncidence(); | 221 | void editIncidence(); |
221 | void editIncidenceDescription(); | 222 | void editIncidenceDescription(); |
222 | void deleteIncidence(); | 223 | void deleteIncidence(); |
223 | void cloneIncidence(); | 224 | void cloneIncidence(); |
224 | void moveIncidence(); | 225 | void moveIncidence(); |
225 | void beamIncidence(); | 226 | void beamIncidence(); |
226 | void toggleCancelIncidence(); | 227 | void toggleCancelIncidence(); |
227 | 228 | ||
228 | /** create an editeventwin with supplied date/time, and if bool is true, | 229 | /** create an editeventwin with supplied date/time, and if bool is true, |
229 | * make the event take all day. */ | 230 | * make the event take all day. */ |
230 | void newEvent(QDateTime, QDateTime, bool allDay ); | 231 | void newEvent(QDateTime, QDateTime, bool allDay ); |
231 | void newEvent(QDateTime, QDateTime); | 232 | void newEvent(QDateTime, QDateTime); |
232 | void newEvent(QDateTime fh); | 233 | void newEvent(QDateTime fh); |
233 | void newEvent(QDate dt); | 234 | void newEvent(QDate dt); |
234 | /** create new event without having a date hint. Takes current date as | 235 | /** create new event without having a date hint. Takes current date as |
235 | default hint. */ | 236 | default hint. */ |
236 | void newEvent(); | 237 | void newEvent(); |
237 | void newFloatingEvent(); | 238 | void newFloatingEvent(); |
238 | 239 | ||
239 | /** Create a read-only viewer dialog for the supplied incidence. It calls the correct showXXX method*/ | 240 | /** Create a read-only viewer dialog for the supplied incidence. It calls the correct showXXX method*/ |
240 | void showIncidence(Incidence *); | 241 | void showIncidence(Incidence *); |
241 | /** Create an editor for the supplied incidence. It calls the correct editXXX method*/ | 242 | /** Create an editor for the supplied incidence. It calls the correct editXXX method*/ |
242 | void editIncidence(Incidence *); | 243 | void editIncidence(Incidence *); |
243 | /** Delete the supplied incidence. It calls the correct deleteXXX method*/ | 244 | /** Delete the supplied incidence. It calls the correct deleteXXX method*/ |
244 | void deleteIncidence(Incidence *); | 245 | void deleteIncidence(Incidence *); |
245 | void cloneIncidence(Incidence *); | 246 | void cloneIncidence(Incidence *); |
246 | void cancelIncidence(Incidence *); | 247 | void cancelIncidence(Incidence *); |
247 | /** Create an editor for the supplied event. */ | 248 | /** Create an editor for the supplied event. */ |
248 | void editEvent(Event *); | 249 | void editEvent(Event *); |
249 | /** Delete the supplied event. */ | 250 | /** Delete the supplied event. */ |
250 | void deleteEvent(Event *); | 251 | void deleteEvent(Event *); |
251 | /** Delete the event with the given unique ID. Returns false, if event wasn't | 252 | /** Delete the event with the given unique ID. Returns false, if event wasn't |
252 | found. */ | 253 | found. */ |
253 | bool deleteEvent(const QString &uid); | 254 | bool deleteEvent(const QString &uid); |
254 | /** Create a read-only viewer dialog for the supplied event. */ | 255 | /** Create a read-only viewer dialog for the supplied event. */ |
255 | void showEvent(Event *); | 256 | void showEvent(Event *); |
256 | 257 | ||
257 | void editJournal(Journal *); | 258 | void editJournal(Journal *); |
258 | void showJournal(Journal *); | 259 | void showJournal(Journal *); |
259 | void deleteJournal(Journal *); | 260 | void deleteJournal(Journal *); |
260 | /** Create an editor dialog for a todo */ | 261 | /** Create an editor dialog for a todo */ |
261 | void editTodo(Todo *); | 262 | void editTodo(Todo *); |
262 | /** Create a read-only viewer dialog for the supplied todo */ | 263 | /** Create a read-only viewer dialog for the supplied todo */ |
263 | void showTodo(Todo *); | 264 | void showTodo(Todo *); |
264 | /** create new todo */ | 265 | /** create new todo */ |
265 | void newTodo(); | 266 | void newTodo(); |
266 | void newTodoDateTime(QDateTime, bool allday); | 267 | void newTodoDateTime(QDateTime, bool allday); |
267 | /** create new todo with a parent todo */ | 268 | /** create new todo with a parent todo */ |
268 | void newSubTodo(); | 269 | void newSubTodo(); |
269 | /** create new todo with a parent todo */ | 270 | /** create new todo with a parent todo */ |
270 | void newSubTodo(Todo *); | 271 | void newSubTodo(Todo *); |
271 | /** Delete todo */ | 272 | /** Delete todo */ |
272 | void deleteTodo(Todo *); | 273 | void deleteTodo(Todo *); |
273 | 274 | ||
274 | 275 | ||
@@ -406,192 +407,193 @@ class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Obser | |||
406 | 407 | ||
407 | /** Move the curdatepient view date to today */ | 408 | /** Move the curdatepient view date to today */ |
408 | void goToday(); | 409 | void goToday(); |
409 | 410 | ||
410 | /** Move to the next date(s) in the current view */ | 411 | /** Move to the next date(s) in the current view */ |
411 | void goNext(); | 412 | void goNext(); |
412 | 413 | ||
413 | /** Move to the previous date(s) in the current view */ | 414 | /** Move to the previous date(s) in the current view */ |
414 | void goPrevious(); | 415 | void goPrevious(); |
415 | /** Move to the next date(s) in the current view */ | 416 | /** Move to the next date(s) in the current view */ |
416 | void goNextMonth(); | 417 | void goNextMonth(); |
417 | 418 | ||
418 | /** Move to the previous date(s) in the current view */ | 419 | /** Move to the previous date(s) in the current view */ |
419 | void goPreviousMonth(); | 420 | void goPreviousMonth(); |
420 | 421 | ||
421 | void toggleExpand(); | 422 | void toggleExpand(); |
422 | void toggleDateNavigatorWidget(); | 423 | void toggleDateNavigatorWidget(); |
423 | void toggleAllDaySize(); | 424 | void toggleAllDaySize(); |
424 | void dialogClosing(Incidence *); | 425 | void dialogClosing(Incidence *); |
425 | 426 | ||
426 | /** Look for new messages in the inbox */ | 427 | /** Look for new messages in the inbox */ |
427 | void lookForIncomingMessages(); | 428 | void lookForIncomingMessages(); |
428 | /** Look for new messages in the outbox */ | 429 | /** Look for new messages in the outbox */ |
429 | void lookForOutgoingMessages(); | 430 | void lookForOutgoingMessages(); |
430 | 431 | ||
431 | void processMainViewSelection( Incidence * ); | 432 | void processMainViewSelection( Incidence * ); |
432 | void processTodoListSelection( Incidence * ); | 433 | void processTodoListSelection( Incidence * ); |
433 | 434 | ||
434 | void processIncidenceSelection( Incidence * ); | 435 | void processIncidenceSelection( Incidence * ); |
435 | 436 | ||
436 | void purgeCompleted(); | 437 | void purgeCompleted(); |
437 | bool removeCompletedSubTodos( Todo* ); | 438 | bool removeCompletedSubTodos( Todo* ); |
438 | void slotCalendarChanged(); | 439 | void slotCalendarChanged(); |
439 | bool importBday(); | 440 | bool importBday(); |
440 | bool addAnniversary( QDate data, QString name, KCal::Attendee* a , bool birthday ); | 441 | bool addAnniversary( QDate data, QString name, KCal::Attendee* a , bool birthday ); |
441 | bool importQtopia( const QString &categoriesFile, | 442 | bool importQtopia( const QString &categoriesFile, |
442 | const QString &datebookFile, | 443 | const QString &datebookFile, |
443 | const QString &tasklistFile ); | 444 | const QString &tasklistFile ); |
444 | void syncExternal( int mode ); | 445 | void syncExternal( int mode ); |
445 | void slotSelectPickerDate( QDate ) ; | 446 | void slotSelectPickerDate( QDate ) ; |
446 | void showDatePicker() ; | 447 | void showDatePicker() ; |
447 | void showDatePickerPopup() ; | 448 | void showDatePickerPopup() ; |
448 | void moveIncidence(Incidence *) ; | 449 | void moveIncidence(Incidence *) ; |
449 | void beamIncidence(Incidence *) ; | 450 | void beamIncidence(Incidence *) ; |
450 | void beamCalendar() ; | 451 | void beamCalendar() ; |
451 | void beamFilteredCalendar() ; | 452 | void beamFilteredCalendar() ; |
452 | void beamIncidenceList(QPtrList<Incidence>) ; | 453 | void beamIncidenceList(QPtrList<Incidence>) ; |
453 | void manageCategories(); | 454 | void manageCategories(); |
454 | int addCategories(); | 455 | int addCategories(); |
455 | void removeCategories(); | 456 | void removeCategories(); |
456 | void setSyncDevice( QString ); | 457 | void setSyncDevice( QString ); |
457 | void setSyncName( QString ); | 458 | void setSyncName( QString ); |
458 | void showDay( QDate ); | 459 | void showDay( QDate ); |
459 | void undo_delete(); | 460 | void undo_delete(); |
460 | protected slots: | 461 | protected slots: |
461 | void resetFocus(); | 462 | void resetFocus(); |
462 | void slotViewerClosed(); | 463 | void slotViewerClosed(); |
463 | void timerAlarm(); | 464 | void timerAlarm(); |
464 | void suspendAlarm(); | 465 | void suspendAlarm(); |
465 | void beamDone( Ir *ir ); | 466 | void beamDone( Ir *ir ); |
466 | /** Select a view or adapt the current view to display the specified dates. */ | 467 | /** Select a view or adapt the current view to display the specified dates. */ |
467 | void showDates( const KCal::DateList & ); | 468 | void showDates( const KCal::DateList & ); |
468 | void selectWeekNum ( int ); | 469 | void selectWeekNum ( int ); |
469 | 470 | ||
470 | public: | 471 | public: |
471 | // show a standard warning | 472 | // show a standard warning |
472 | // returns KMsgBox::yesNoCancel() | 473 | // returns KMsgBox::yesNoCancel() |
473 | int msgCalModified(); | 474 | int msgCalModified(); |
474 | virtual bool sync(KSyncManager* manager, QString filename, int mode); | 475 | virtual bool sync(KSyncManager* manager, QString filename, int mode); |
475 | 476 | ||
476 | virtual bool syncExternal(KSyncManager* manager, QString resource); | 477 | virtual bool syncExternal(KSyncManager* manager, QString resource); |
477 | virtual void removeSyncInfo( QString syncProfile); | 478 | virtual void removeSyncInfo( QString syncProfile); |
478 | void setSyncManager(KSyncManager* manager); | 479 | void setSyncManager(KSyncManager* manager); |
479 | void setLoadedFileVersion(QDateTime); | 480 | void setLoadedFileVersion(QDateTime); |
480 | bool checkFileVersion(QString fn); | 481 | bool checkFileVersion(QString fn); |
481 | bool checkFileChanged(QString fn); | 482 | bool checkFileChanged(QString fn); |
482 | Event* getLastSyncEvent(); | 483 | Event* getLastSyncEvent(); |
483 | /** Adapt navigation units correpsonding to step size of navigation of the | 484 | /** Adapt navigation units correpsonding to step size of navigation of the |
484 | * current view. | 485 | * current view. |
485 | */ | 486 | */ |
486 | void adaptNavigationUnits(); | 487 | void adaptNavigationUnits(); |
487 | bool synchronizeCalendar( Calendar* local, Calendar* remote, int mode ); | 488 | bool synchronizeCalendar( Calendar* local, Calendar* remote, int mode ); |
488 | int takeEvent( Incidence* local, Incidence* remote, int mode, bool full = false ); | 489 | int takeEvent( Incidence* local, Incidence* remote, int mode, bool full = false ); |
489 | //Attendee* getYourAttendee(Event *event); | 490 | //Attendee* getYourAttendee(Event *event); |
490 | void setBlockShowDates( bool b ) { mBlockShowDates = b ;} | 491 | void setBlockShowDates( bool b ) { mBlockShowDates = b ;} |
491 | protected: | 492 | protected: |
492 | void schedule(Scheduler::Method, Incidence *incidence = 0); | 493 | void schedule(Scheduler::Method, Incidence *incidence = 0); |
493 | 494 | ||
494 | // returns KMsgBox::OKCandel() | 495 | // returns KMsgBox::OKCandel() |
495 | int msgItemDelete(const QString name); | 496 | int msgItemDelete(const QString name); |
496 | void showEventEditor(); | 497 | void showEventEditor(); |
497 | void showTodoEditor(); | 498 | void showTodoEditor(); |
498 | void writeLocale(); | 499 | void writeLocale(); |
499 | Todo *selectedTodo(); | 500 | Todo *selectedTodo(); |
500 | 501 | ||
501 | private: | 502 | private: |
503 | QDateTime mNextAlarmDateTime; | ||
502 | bool mViewerCallerIsSearchDialog; | 504 | bool mViewerCallerIsSearchDialog; |
503 | bool mBlockShowDates; | 505 | bool mBlockShowDates; |
504 | KSyncManager* mSyncManager; | 506 | KSyncManager* mSyncManager; |
505 | AlarmDialog * mAlarmDialog; | 507 | AlarmDialog * mAlarmDialog; |
506 | QString mAlarmNotification; | 508 | QString mAlarmNotification; |
507 | QString mSuspendAlarmNotification; | 509 | QString mSuspendAlarmNotification; |
508 | QTimer* mSuspendTimer; | 510 | QTimer* mSuspendTimer; |
509 | QTimer* mAlarmTimer; | 511 | QTimer* mAlarmTimer; |
510 | QTimer* mRecheckAlarmTimer; | 512 | QTimer* mRecheckAlarmTimer; |
511 | void computeAlarm( QString ); | 513 | void computeAlarm( QString ); |
512 | void startAlarm( QString, QString ); | 514 | void startAlarm( QString, QString ); |
513 | void setSyncEventsReadOnly(); | 515 | void setSyncEventsReadOnly(); |
514 | 516 | ||
515 | QDateTime loadedFileVersion; | 517 | QDateTime loadedFileVersion; |
516 | void checkExternSyncEvent( QPtrList<Event> lastSync , Incidence* toDelete ); | 518 | void checkExternSyncEvent( QPtrList<Event> lastSync , Incidence* toDelete ); |
517 | void checkExternalId( Incidence * inc ); | 519 | void checkExternalId( Incidence * inc ); |
518 | int mGlobalSyncMode; | 520 | int mGlobalSyncMode; |
519 | QString mCurrentSyncDevice; | 521 | QString mCurrentSyncDevice; |
520 | QString mCurrentSyncName; | 522 | QString mCurrentSyncName; |
521 | KOBeamPrefs* beamDialog; | 523 | KOBeamPrefs* beamDialog; |
522 | void init(); | 524 | void init(); |
523 | int mDatePickerMode; | 525 | int mDatePickerMode; |
524 | bool mFlagEditDescription; | 526 | bool mFlagEditDescription; |
525 | QDateTime mLastCalendarSync; | 527 | QDateTime mLastCalendarSync; |
526 | void createPrinter(); | 528 | void createPrinter(); |
527 | 529 | ||
528 | void calendarModified( bool, Calendar * ); | 530 | void calendarModified( bool, Calendar * ); |
529 | 531 | ||
530 | CalPrinter *mCalPrinter; | 532 | CalPrinter *mCalPrinter; |
531 | 533 | ||
532 | QSplitter *mPanner; | 534 | QSplitter *mPanner; |
533 | QSplitter *mLeftSplitter; | 535 | QSplitter *mLeftSplitter; |
534 | KDGanttMinimizeSplitter *mLeftFrame, *mMainFrame; | 536 | KDGanttMinimizeSplitter *mLeftFrame, *mMainFrame; |
535 | QWidgetStack *mRightFrame; | 537 | QWidgetStack *mRightFrame; |
536 | 538 | ||
537 | KDatePicker* mDatePicker; | 539 | KDatePicker* mDatePicker; |
538 | QVBox* mDateFrame; | 540 | QVBox* mDateFrame; |
539 | 541 | ||
540 | DateNavigatorContainer *mDateNavigator; // widget showing small month view. | 542 | DateNavigatorContainer *mDateNavigator; // widget showing small month view. |
541 | 543 | ||
542 | KOFilterView *mFilterView; | 544 | KOFilterView *mFilterView; |
543 | 545 | ||
544 | ResourceView *mResourceView; | 546 | ResourceView *mResourceView; |
545 | 547 | ||
546 | // calendar object for this viewing instance | 548 | // calendar object for this viewing instance |
547 | Calendar *mCalendar; | 549 | Calendar *mCalendar; |
548 | 550 | ||
549 | CalendarResourceManager *mResourceManager; | 551 | CalendarResourceManager *mResourceManager; |
550 | 552 | ||
551 | FileStorage *mStorage; | 553 | FileStorage *mStorage; |
552 | 554 | ||
553 | DateNavigator *mNavigator; | 555 | DateNavigator *mNavigator; |
554 | 556 | ||
555 | KOViewManager *mViewManager; | 557 | KOViewManager *mViewManager; |
556 | KODialogManager *mDialogManager; | 558 | KODialogManager *mDialogManager; |
557 | 559 | ||
558 | // Calendar filters | 560 | // Calendar filters |
559 | QPtrList<CalFilter> mFilters; | 561 | QPtrList<CalFilter> mFilters; |
560 | 562 | ||
561 | // various housekeeping variables. | 563 | // various housekeeping variables. |
562 | bool mModified; // flag indicating if calendar is modified | 564 | bool mModified; // flag indicating if calendar is modified |
563 | bool mReadOnly; // flag indicating if calendar is read-only | 565 | bool mReadOnly; // flag indicating if calendar is read-only |
564 | QDate mSaveSingleDate; | 566 | QDate mSaveSingleDate; |
565 | 567 | ||
566 | Incidence *mSelectedIncidence; | 568 | Incidence *mSelectedIncidence; |
567 | Incidence *mMoveIncidence; | 569 | Incidence *mMoveIncidence; |
568 | QDate mMoveIncidenceOldDate; | 570 | QDate mMoveIncidenceOldDate; |
569 | KOTodoView *mTodoList; | 571 | KOTodoView *mTodoList; |
570 | KOEventEditor * mEventEditor; | 572 | KOEventEditor * mEventEditor; |
571 | KOTodoEditor * mTodoEditor; | 573 | KOTodoEditor * mTodoEditor; |
572 | KOEventViewerDialog * mEventViewerDialog; | 574 | KOEventViewerDialog * mEventViewerDialog; |
573 | void keyPressEvent ( QKeyEvent *e) ; | 575 | void keyPressEvent ( QKeyEvent *e) ; |
574 | //QMap<Incidence*,KOIncidenceEditor*> mDialogList; | 576 | //QMap<Incidence*,KOIncidenceEditor*> mDialogList; |
575 | }; | 577 | }; |
576 | 578 | ||
577 | 579 | ||
578 | class CalendarViewVisitor : public Incidence::Visitor | 580 | class CalendarViewVisitor : public Incidence::Visitor |
579 | { | 581 | { |
580 | public: | 582 | public: |
581 | CalendarViewVisitor() : mView( 0 ) {} | 583 | CalendarViewVisitor() : mView( 0 ) {} |
582 | 584 | ||
583 | bool act( Incidence *incidence, CalendarView *view ) | 585 | bool act( Incidence *incidence, CalendarView *view ) |
584 | { | 586 | { |
585 | mView = view; | 587 | mView = view; |
586 | return incidence->accept( *this ); | 588 | return incidence->accept( *this ); |
587 | } | 589 | } |
588 | 590 | ||
589 | protected: | 591 | protected: |
590 | CalendarView *mView; | 592 | CalendarView *mView; |
591 | }; | 593 | }; |
592 | 594 | ||
593 | class ShowIncidenceVisitor : public CalendarViewVisitor | 595 | class ShowIncidenceVisitor : public CalendarViewVisitor |
594 | { | 596 | { |
595 | protected: | 597 | protected: |
596 | bool visit( Event *event ) { mView->showEvent( event ); return true; } | 598 | bool visit( Event *event ) { mView->showEvent( event ); return true; } |
597 | bool visit( Todo *todo ) { mView->showTodo( todo ); return true; } | 599 | bool visit( Todo *todo ) { mView->showTodo( todo ); return true; } |