-rw-r--r-- | korganizer/calendarview.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/korganizer/calendarview.h b/korganizer/calendarview.h index fac9a9e..16e671f 100644 --- a/korganizer/calendarview.h +++ b/korganizer/calendarview.h | |||
@@ -342,276 +342,276 @@ class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Obser | |||
342 | /** pop up a dialog to show an existing appointment. */ | 342 | /** pop up a dialog to show an existing appointment. */ |
343 | void appointment_show(); | 343 | void appointment_show(); |
344 | /** | 344 | /** |
345 | * pop up an Appointment Dialog to edit an existing appointment.Get | 345 | * pop up an Appointment Dialog to edit an existing appointment.Get |
346 | * information on the appointment from the list of unique IDs that is | 346 | * information on the appointment from the list of unique IDs that is |
347 | * currently in the View, called currIds. | 347 | * currently in the View, called currIds. |
348 | */ | 348 | */ |
349 | void appointment_edit(); | 349 | void appointment_edit(); |
350 | /** | 350 | /** |
351 | * pop up dialog confirming deletion of currently selected event in the | 351 | * pop up dialog confirming deletion of currently selected event in the |
352 | * View. | 352 | * View. |
353 | */ | 353 | */ |
354 | void appointment_delete(); | 354 | void appointment_delete(); |
355 | 355 | ||
356 | /** mails the currently selected event to a particular user as a vCalendar | 356 | /** mails the currently selected event to a particular user as a vCalendar |
357 | attachment. */ | 357 | attachment. */ |
358 | void action_mail(); | 358 | void action_mail(); |
359 | 359 | ||
360 | /* frees a subtodo from it's relation */ | 360 | /* frees a subtodo from it's relation */ |
361 | void todo_unsub( Todo * ); | 361 | void todo_unsub( Todo * ); |
362 | void todo_resub( Todo * parent, Todo * sub ); | 362 | void todo_resub( Todo * parent, Todo * sub ); |
363 | 363 | ||
364 | /** Take ownership of selected event. */ | 364 | /** Take ownership of selected event. */ |
365 | void takeOverEvent(); | 365 | void takeOverEvent(); |
366 | 366 | ||
367 | /** Take ownership of all events in calendar. */ | 367 | /** Take ownership of all events in calendar. */ |
368 | void takeOverCalendar(); | 368 | void takeOverCalendar(); |
369 | 369 | ||
370 | /** query whether or not the calendar is "dirty". */ | 370 | /** query whether or not the calendar is "dirty". */ |
371 | bool isModified(); | 371 | bool isModified(); |
372 | /** set the state of calendar. Modified means "dirty", i.e. needing a save. */ | 372 | /** set the state of calendar. Modified means "dirty", i.e. needing a save. */ |
373 | void setModified(bool modified=true); | 373 | void setModified(bool modified=true); |
374 | 374 | ||
375 | /** query if the calendar is read-only. */ | 375 | /** query if the calendar is read-only. */ |
376 | bool isReadOnly(); | 376 | bool isReadOnly(); |
377 | /** set state of calendar to read-only */ | 377 | /** set state of calendar to read-only */ |
378 | void setReadOnly(bool readOnly=true); | 378 | void setReadOnly(bool readOnly=true); |
379 | 379 | ||
380 | void eventUpdated(Incidence *); | 380 | void eventUpdated(Incidence *); |
381 | 381 | ||
382 | /* iTIP scheduling actions */ | 382 | /* iTIP scheduling actions */ |
383 | void schedule_publish(Incidence *incidence = 0); | 383 | void schedule_publish(Incidence *incidence = 0); |
384 | void schedule_request(Incidence *incidence = 0); | 384 | void schedule_request(Incidence *incidence = 0); |
385 | void schedule_refresh(Incidence *incidence = 0); | 385 | void schedule_refresh(Incidence *incidence = 0); |
386 | void schedule_cancel(Incidence *incidence = 0); | 386 | void schedule_cancel(Incidence *incidence = 0); |
387 | void schedule_add(Incidence *incidence = 0); | 387 | void schedule_add(Incidence *incidence = 0); |
388 | void schedule_reply(Incidence *incidence = 0); | 388 | void schedule_reply(Incidence *incidence = 0); |
389 | void schedule_counter(Incidence *incidence = 0); | 389 | void schedule_counter(Incidence *incidence = 0); |
390 | void schedule_declinecounter(Incidence *incidence = 0); | 390 | void schedule_declinecounter(Incidence *incidence = 0); |
391 | void schedule_publish_freebusy(int daysToPublish = 30); | 391 | void schedule_publish_freebusy(int daysToPublish = 30); |
392 | 392 | ||
393 | void openAddressbook(); | 393 | void openAddressbook(); |
394 | 394 | ||
395 | void editFilters(); | 395 | void editFilters(); |
396 | void toggleFilerEnabled(); | 396 | void toggleFilerEnabled(); |
397 | QPtrList<CalFilter> filters(); | 397 | QPtrList<CalFilter> filters(); |
398 | void toggleFilter(); | 398 | void toggleFilter(); |
399 | void showFilter(bool visible); | 399 | void showFilter(bool visible); |
400 | void updateFilter(); | 400 | void updateFilter(); |
401 | void filterEdited(); | 401 | void filterEdited(); |
402 | void selectFilter( int ); | 402 | void selectFilter( int ); |
403 | KOFilterView *filterView(); | 403 | KOFilterView *filterView(); |
404 | 404 | ||
405 | void showIntro(); | 405 | void showIntro(); |
406 | 406 | ||
407 | /** Move the curdatepient view date to today */ | 407 | /** Move the curdatepient view date to today */ |
408 | void goToday(); | 408 | void goToday(); |
409 | 409 | ||
410 | /** Move to the next date(s) in the current view */ | 410 | /** Move to the next date(s) in the current view */ |
411 | void goNext(); | 411 | void goNext(); |
412 | 412 | ||
413 | /** Move to the previous date(s) in the current view */ | 413 | /** Move to the previous date(s) in the current view */ |
414 | void goPrevious(); | 414 | void goPrevious(); |
415 | /** Move to the next date(s) in the current view */ | 415 | /** Move to the next date(s) in the current view */ |
416 | void goNextMonth(); | 416 | void goNextMonth(); |
417 | 417 | ||
418 | /** Move to the previous date(s) in the current view */ | 418 | /** Move to the previous date(s) in the current view */ |
419 | void goPreviousMonth(); | 419 | void goPreviousMonth(); |
420 | 420 | ||
421 | void toggleExpand(); | 421 | void toggleExpand(); |
422 | void toggleDateNavigatorWidget(); | 422 | void toggleDateNavigatorWidget(); |
423 | void toggleAllDaySize(); | 423 | void toggleAllDaySize(); |
424 | void dialogClosing(Incidence *); | 424 | void dialogClosing(Incidence *); |
425 | 425 | ||
426 | /** Look for new messages in the inbox */ | 426 | /** Look for new messages in the inbox */ |
427 | void lookForIncomingMessages(); | 427 | void lookForIncomingMessages(); |
428 | /** Look for new messages in the outbox */ | 428 | /** Look for new messages in the outbox */ |
429 | void lookForOutgoingMessages(); | 429 | void lookForOutgoingMessages(); |
430 | 430 | ||
431 | void processMainViewSelection( Incidence * ); | 431 | void processMainViewSelection( Incidence * ); |
432 | void processTodoListSelection( Incidence * ); | 432 | void processTodoListSelection( Incidence * ); |
433 | 433 | ||
434 | void processIncidenceSelection( Incidence * ); | 434 | void processIncidenceSelection( Incidence * ); |
435 | 435 | ||
436 | void purgeCompleted(); | 436 | void purgeCompleted(); |
437 | bool removeCompletedSubTodos( Todo* ); | 437 | bool removeCompletedSubTodos( Todo* ); |
438 | void slotCalendarChanged(); | 438 | void slotCalendarChanged(); |
439 | bool importBday(); | 439 | bool importBday(); |
440 | bool addAnniversary( QDate data, QString name, KCal::Attendee* a , bool birthday ); | 440 | bool addAnniversary( QDate data, QString name, KCal::Attendee* a , bool birthday ); |
441 | bool importQtopia( const QString &categoriesFile, | 441 | bool importQtopia( const QString &categoriesFile, |
442 | const QString &datebookFile, | 442 | const QString &datebookFile, |
443 | const QString &tasklistFile ); | 443 | const QString &tasklistFile ); |
444 | void syncExternal( int mode ); | 444 | void syncExternal( int mode ); |
445 | void slotSelectPickerDate( QDate ) ; | 445 | void slotSelectPickerDate( QDate ) ; |
446 | void showDatePicker() ; | 446 | void showDatePicker() ; |
447 | void showDatePickerPopup() ; | 447 | void showDatePickerPopup() ; |
448 | void moveIncidence(Incidence *) ; | 448 | void moveIncidence(Incidence *) ; |
449 | void beamIncidence(Incidence *) ; | 449 | void beamIncidence(Incidence *) ; |
450 | void beamCalendar() ; | 450 | void beamCalendar() ; |
451 | void beamFilteredCalendar() ; | 451 | void beamFilteredCalendar() ; |
452 | void beamIncidenceList(QPtrList<Incidence>) ; | 452 | void beamIncidenceList(QPtrList<Incidence>) ; |
453 | void manageCategories(); | 453 | void manageCategories(); |
454 | int addCategories(); | 454 | int addCategories(); |
455 | void removeCategories(); | 455 | void removeCategories(); |
456 | void setSyncDevice( QString ); | 456 | void setSyncDevice( QString ); |
457 | void setSyncName( QString ); | 457 | void setSyncName( QString ); |
458 | void showDay( QDate ); | 458 | void showDay( QDate ); |
459 | void undo_delete(); | 459 | void undo_delete(); |
460 | protected slots: | 460 | protected slots: |
461 | void resetFocus(); | 461 | void resetFocus(); |
462 | void slotViewerClosed(); | 462 | void slotViewerClosed(); |
463 | void timerAlarm(); | 463 | void timerAlarm(); |
464 | void suspendAlarm(); | 464 | void suspendAlarm(); |
465 | void beamDone( Ir *ir ); | 465 | void beamDone( Ir *ir ); |
466 | /** Select a view or adapt the current view to display the specified dates. */ | 466 | /** Select a view or adapt the current view to display the specified dates. */ |
467 | void showDates( const KCal::DateList & ); | 467 | void showDates( const KCal::DateList & ); |
468 | void selectWeekNum ( int ); | 468 | void selectWeekNum ( int ); |
469 | 469 | ||
470 | public: | 470 | public: |
471 | // show a standard warning | 471 | // show a standard warning |
472 | // returns KMsgBox::yesNoCancel() | 472 | // returns KMsgBox::yesNoCancel() |
473 | int msgCalModified(); | 473 | int msgCalModified(); |
474 | virtual bool sync(KSyncManager* manager, QString filename, int mode); | 474 | virtual bool sync(KSyncManager* manager, QString filename, int mode); |
475 | 475 | ||
476 | virtual bool syncExternal(KSyncManager* manager, QString resource); | 476 | virtual bool syncExternal(KSyncManager* manager, QString resource); |
477 | virtual void removeSyncInfo( QString syncProfile); | 477 | virtual void removeSyncInfo( QString syncProfile); |
478 | void setSyncManager(KSyncManager* manager); | 478 | void setSyncManager(KSyncManager* manager); |
479 | void setLoadedFileVersion(QDateTime); | 479 | void setLoadedFileVersion(QDateTime); |
480 | bool checkFileVersion(QString fn); | 480 | bool checkFileVersion(QString fn); |
481 | bool checkFileChanged(QString fn); | 481 | bool checkFileChanged(QString fn); |
482 | Event* getLastSyncEvent(); | 482 | Event* getLastSyncEvent(); |
483 | /** Adapt navigation units correpsonding to step size of navigation of the | 483 | /** Adapt navigation units correpsonding to step size of navigation of the |
484 | * current view. | 484 | * current view. |
485 | */ | 485 | */ |
486 | void adaptNavigationUnits(); | 486 | void adaptNavigationUnits(); |
487 | bool synchronizeCalendar( Calendar* local, Calendar* remote, int mode ); | 487 | bool synchronizeCalendar( Calendar* local, Calendar* remote, int mode ); |
488 | int takeEvent( Incidence* local, Incidence* remote, int mode, bool full = false ); | 488 | int takeEvent( Incidence* local, Incidence* remote, int mode, bool full = false ); |
489 | //Attendee* getYourAttendee(Event *event); | 489 | //Attendee* getYourAttendee(Event *event); |
490 | void setBlockShowDates( bool b ) { mBlockShowDates = b ;} | 490 | void setBlockShowDates( bool b ) { mBlockShowDates = b ;} |
491 | protected: | 491 | protected: |
492 | void schedule(Scheduler::Method, Incidence *incidence = 0); | 492 | void schedule(Scheduler::Method, Incidence *incidence = 0); |
493 | 493 | ||
494 | // returns KMsgBox::OKCandel() | 494 | // returns KMsgBox::OKCandel() |
495 | int msgItemDelete(const QString name); | 495 | int msgItemDelete(const QString name); |
496 | void showEventEditor(); | 496 | void showEventEditor(); |
497 | void showTodoEditor(); | 497 | void showTodoEditor(); |
498 | void writeLocale(); | 498 | void writeLocale(); |
499 | Todo *selectedTodo(); | 499 | Todo *selectedTodo(); |
500 | 500 | ||
501 | private: | 501 | private: |
502 | bool mViewerCallerIsSearchDialog; | 502 | bool mViewerCallerIsSearchDialog; |
503 | bool mBlockShowDates; | 503 | bool mBlockShowDates; |
504 | KSyncManager* mSyncManager; | 504 | KSyncManager* mSyncManager; |
505 | AlarmDialog * mAlarmDialog; | 505 | AlarmDialog * mAlarmDialog; |
506 | QString mAlarmNotification; | 506 | QString mAlarmNotification; |
507 | QString mSuspendAlarmNotification; | 507 | QString mSuspendAlarmNotification; |
508 | QTimer* mSuspendTimer; | 508 | QTimer* mSuspendTimer; |
509 | QTimer* mAlarmTimer; | 509 | QTimer* mAlarmTimer; |
510 | QTimer* mRecheckAlarmTimer; | 510 | QTimer* mRecheckAlarmTimer; |
511 | void computeAlarm( QString ); | 511 | void computeAlarm( QString ); |
512 | void startAlarm( QString, QString ); | 512 | void startAlarm( QString, QString ); |
513 | void setSyncEventsReadOnly(); | 513 | void setSyncEventsReadOnly(); |
514 | 514 | ||
515 | QDateTime loadedFileVersion; | 515 | QDateTime loadedFileVersion; |
516 | void checkExternSyncEvent( QPtrList<Event> lastSync , Incidence* toDelete ); | 516 | void checkExternSyncEvent( QPtrList<Event> lastSync , Incidence* toDelete ); |
517 | void checkExternalId( Incidence * inc ); | 517 | void checkExternalId( Incidence * inc ); |
518 | int mGlobalSyncMode; | 518 | int mGlobalSyncMode; |
519 | QString mCurrentSyncDevice; | 519 | QString mCurrentSyncDevice; |
520 | QString mCurrentSyncName; | 520 | QString mCurrentSyncName; |
521 | KOBeamPrefs* beamDialog; | 521 | KOBeamPrefs* beamDialog; |
522 | void init(); | 522 | void init(); |
523 | int mDatePickerMode; | 523 | int mDatePickerMode; |
524 | bool mFlagEditDescription; | 524 | bool mFlagEditDescription; |
525 | QDateTime mLastCalendarSync; | 525 | QDateTime mLastCalendarSync; |
526 | void createPrinter(); | 526 | void createPrinter(); |
527 | 527 | ||
528 | void calendarModified( bool, Calendar * ); | 528 | void calendarModified( bool, Calendar * ); |
529 | 529 | ||
530 | CalPrinter *mCalPrinter; | 530 | CalPrinter *mCalPrinter; |
531 | 531 | ||
532 | QSplitter *mPanner; | 532 | QSplitter *mPanner; |
533 | QSplitter *mLeftSplitter; | 533 | QSplitter *mLeftSplitter; |
534 | KDGanttMinimizeSplitter *mLeftFrame; | 534 | KDGanttMinimizeSplitter *mLeftFrame, *mMainFrame; |
535 | QWidgetStack *mRightFrame; | 535 | QWidgetStack *mRightFrame; |
536 | 536 | ||
537 | KDatePicker* mDatePicker; | 537 | KDatePicker* mDatePicker; |
538 | QVBox* mDateFrame; | 538 | QVBox* mDateFrame; |
539 | 539 | ||
540 | DateNavigatorContainer *mDateNavigator; // widget showing small month view. | 540 | DateNavigatorContainer *mDateNavigator; // widget showing small month view. |
541 | 541 | ||
542 | KOFilterView *mFilterView; | 542 | KOFilterView *mFilterView; |
543 | 543 | ||
544 | ResourceView *mResourceView; | 544 | ResourceView *mResourceView; |
545 | 545 | ||
546 | // calendar object for this viewing instance | 546 | // calendar object for this viewing instance |
547 | Calendar *mCalendar; | 547 | Calendar *mCalendar; |
548 | 548 | ||
549 | CalendarResourceManager *mResourceManager; | 549 | CalendarResourceManager *mResourceManager; |
550 | 550 | ||
551 | FileStorage *mStorage; | 551 | FileStorage *mStorage; |
552 | 552 | ||
553 | DateNavigator *mNavigator; | 553 | DateNavigator *mNavigator; |
554 | 554 | ||
555 | KOViewManager *mViewManager; | 555 | KOViewManager *mViewManager; |
556 | KODialogManager *mDialogManager; | 556 | KODialogManager *mDialogManager; |
557 | 557 | ||
558 | // Calendar filters | 558 | // Calendar filters |
559 | QPtrList<CalFilter> mFilters; | 559 | QPtrList<CalFilter> mFilters; |
560 | 560 | ||
561 | // various housekeeping variables. | 561 | // various housekeeping variables. |
562 | bool mModified; // flag indicating if calendar is modified | 562 | bool mModified; // flag indicating if calendar is modified |
563 | bool mReadOnly; // flag indicating if calendar is read-only | 563 | bool mReadOnly; // flag indicating if calendar is read-only |
564 | QDate mSaveSingleDate; | 564 | QDate mSaveSingleDate; |
565 | 565 | ||
566 | Incidence *mSelectedIncidence; | 566 | Incidence *mSelectedIncidence; |
567 | Incidence *mMoveIncidence; | 567 | Incidence *mMoveIncidence; |
568 | QDate mMoveIncidenceOldDate; | 568 | QDate mMoveIncidenceOldDate; |
569 | KOTodoView *mTodoList; | 569 | KOTodoView *mTodoList; |
570 | KOEventEditor * mEventEditor; | 570 | KOEventEditor * mEventEditor; |
571 | KOTodoEditor * mTodoEditor; | 571 | KOTodoEditor * mTodoEditor; |
572 | KOEventViewerDialog * mEventViewerDialog; | 572 | KOEventViewerDialog * mEventViewerDialog; |
573 | void keyPressEvent ( QKeyEvent *e) ; | 573 | void keyPressEvent ( QKeyEvent *e) ; |
574 | //QMap<Incidence*,KOIncidenceEditor*> mDialogList; | 574 | //QMap<Incidence*,KOIncidenceEditor*> mDialogList; |
575 | }; | 575 | }; |
576 | 576 | ||
577 | 577 | ||
578 | class CalendarViewVisitor : public Incidence::Visitor | 578 | class CalendarViewVisitor : public Incidence::Visitor |
579 | { | 579 | { |
580 | public: | 580 | public: |
581 | CalendarViewVisitor() : mView( 0 ) {} | 581 | CalendarViewVisitor() : mView( 0 ) {} |
582 | 582 | ||
583 | bool act( Incidence *incidence, CalendarView *view ) | 583 | bool act( Incidence *incidence, CalendarView *view ) |
584 | { | 584 | { |
585 | mView = view; | 585 | mView = view; |
586 | return incidence->accept( *this ); | 586 | return incidence->accept( *this ); |
587 | } | 587 | } |
588 | 588 | ||
589 | protected: | 589 | protected: |
590 | CalendarView *mView; | 590 | CalendarView *mView; |
591 | }; | 591 | }; |
592 | 592 | ||
593 | class ShowIncidenceVisitor : public CalendarViewVisitor | 593 | class ShowIncidenceVisitor : public CalendarViewVisitor |
594 | { | 594 | { |
595 | protected: | 595 | protected: |
596 | bool visit( Event *event ) { mView->showEvent( event ); return true; } | 596 | bool visit( Event *event ) { mView->showEvent( event ); return true; } |
597 | bool visit( Todo *todo ) { mView->showTodo( todo ); return true; } | 597 | bool visit( Todo *todo ) { mView->showTodo( todo ); return true; } |
598 | bool visit( Journal * j ) { mView->showJournal( j );return true; } | 598 | bool visit( Journal * j ) { mView->showJournal( j );return true; } |
599 | }; | 599 | }; |
600 | 600 | ||
601 | class EditIncidenceVisitor : public CalendarViewVisitor | 601 | class EditIncidenceVisitor : public CalendarViewVisitor |
602 | { | 602 | { |
603 | protected: | 603 | protected: |
604 | bool visit( Event *event ) { mView->editEvent( event ); return true; } | 604 | bool visit( Event *event ) { mView->editEvent( event ); return true; } |
605 | bool visit( Todo *todo ) { mView->editTodo( todo ); return true; } | 605 | bool visit( Todo *todo ) { mView->editTodo( todo ); return true; } |
606 | bool visit( Journal *j ) { mView->editJournal( j); return true; } | 606 | bool visit( Journal *j ) { mView->editJournal( j); return true; } |
607 | }; | 607 | }; |
608 | 608 | ||
609 | class DeleteIncidenceVisitor : public CalendarViewVisitor | 609 | class DeleteIncidenceVisitor : public CalendarViewVisitor |
610 | { | 610 | { |
611 | protected: | 611 | protected: |
612 | bool visit( Event *event ) { mView->deleteEvent( event ); return true; } | 612 | bool visit( Event *event ) { mView->deleteEvent( event ); return true; } |
613 | bool visit( Todo *todo ) { mView->deleteTodo( todo ); return true; } | 613 | bool visit( Todo *todo ) { mView->deleteTodo( todo ); return true; } |
614 | bool visit( Journal * j) {mView->deleteJournal( j ); return true; } | 614 | bool visit( Journal * j) {mView->deleteJournal( j ); return true; } |
615 | }; | 615 | }; |
616 | 616 | ||
617 | #endif | 617 | #endif |