author | zautrix <zautrix> | 2005-02-20 11:14:04 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-02-20 11:14:04 (UTC) |
commit | bb74ffa01010ca364e101e05a6b3e090ae363a0e (patch) (unidiff) | |
tree | 573f3b5244f064996c9cb4c73cc0ad04816bda9b /korganizer/koviewmanager.cpp | |
parent | ce9aa88149547443452a2077f5c3832fbea34f63 (diff) | |
download | kdepimpi-bb74ffa01010ca364e101e05a6b3e090ae363a0e.zip kdepimpi-bb74ffa01010ca364e101e05a6b3e090ae363a0e.tar.gz kdepimpi-bb74ffa01010ca364e101e05a6b3e090ae363a0e.tar.bz2 |
minor month-weekview fixes
-rw-r--r-- | korganizer/koviewmanager.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/korganizer/koviewmanager.cpp b/korganizer/koviewmanager.cpp index ac67b58..a9f5a41 100644 --- a/korganizer/koviewmanager.cpp +++ b/korganizer/koviewmanager.cpp | |||
@@ -432,256 +432,257 @@ void KOViewManager::showDayView() | |||
432 | globalFlagBlockLabel = 0; | 432 | globalFlagBlockLabel = 0; |
433 | mMainView->dateNavigator()->selectDates( 1 ); | 433 | mMainView->dateNavigator()->selectDates( 1 ); |
434 | mCurrentAgendaView = 1 ; | 434 | mCurrentAgendaView = 1 ; |
435 | 435 | ||
436 | } | 436 | } |
437 | 437 | ||
438 | void KOViewManager::showWorkWeekView() | 438 | void KOViewManager::showWorkWeekView() |
439 | { | 439 | { |
440 | mFlagShowNextxDays = false; | 440 | mFlagShowNextxDays = false; |
441 | globalFlagBlockAgenda = 1; | 441 | globalFlagBlockAgenda = 1; |
442 | globalFlagBlockLabel = 1; | 442 | globalFlagBlockLabel = 1; |
443 | if ( mCurrentAgendaView != 5 ) | 443 | if ( mCurrentAgendaView != 5 ) |
444 | mCurrentAgendaView = -1; | 444 | mCurrentAgendaView = -1; |
445 | showAgendaView(); | 445 | showAgendaView(); |
446 | qApp->processEvents(); | 446 | qApp->processEvents(); |
447 | globalFlagBlockAgenda = 2; | 447 | globalFlagBlockAgenda = 2; |
448 | globalFlagBlockLabel = 0; | 448 | globalFlagBlockLabel = 0; |
449 | mMainView->dateNavigator()->selectWorkWeek(); | 449 | mMainView->dateNavigator()->selectWorkWeek(); |
450 | mCurrentAgendaView = 5 ; | 450 | mCurrentAgendaView = 5 ; |
451 | 451 | ||
452 | } | 452 | } |
453 | 453 | ||
454 | void KOViewManager::showWeekView() | 454 | void KOViewManager::showWeekView() |
455 | { | 455 | { |
456 | /* | 456 | /* |
457 | globalFlagBlockAgenda = 2; | 457 | globalFlagBlockAgenda = 2; |
458 | qDebug("4globalFlagBlockAgenda = 2; "); | 458 | qDebug("4globalFlagBlockAgenda = 2; "); |
459 | //globalFlagBlockPainting = true; | 459 | //globalFlagBlockPainting = true; |
460 | mMainView->dateNavigator()->selectWeek(); | 460 | mMainView->dateNavigator()->selectWeek(); |
461 | showAgendaView(); | 461 | showAgendaView(); |
462 | */ | 462 | */ |
463 | 463 | ||
464 | 464 | ||
465 | mFlagShowNextxDays = false; | 465 | mFlagShowNextxDays = false; |
466 | globalFlagBlockAgenda = 1; | 466 | globalFlagBlockAgenda = 1; |
467 | globalFlagBlockLabel = 1; | 467 | globalFlagBlockLabel = 1; |
468 | if ( mCurrentAgendaView != 7 ) | 468 | if ( mCurrentAgendaView != 7 ) |
469 | mCurrentAgendaView = -1; | 469 | mCurrentAgendaView = -1; |
470 | showAgendaView(); | 470 | showAgendaView(); |
471 | qApp->processEvents(); | 471 | qApp->processEvents(); |
472 | globalFlagBlockAgenda = 2; | 472 | globalFlagBlockAgenda = 2; |
473 | globalFlagBlockLabel = 0; | 473 | globalFlagBlockLabel = 0; |
474 | mMainView->dateNavigator()->selectWeek(); | 474 | mMainView->dateNavigator()->selectWeek(); |
475 | mCurrentAgendaView = 7 ; | 475 | mCurrentAgendaView = 7 ; |
476 | } | 476 | } |
477 | 477 | ||
478 | void KOViewManager::showNextXView() | 478 | void KOViewManager::showNextXView() |
479 | { | 479 | { |
480 | 480 | ||
481 | globalFlagBlockAgenda = 1; | 481 | globalFlagBlockAgenda = 1; |
482 | if ( mCurrentAgendaView != 3 ) | 482 | if ( mCurrentAgendaView != 3 ) |
483 | mCurrentAgendaView = -1; | 483 | mCurrentAgendaView = -1; |
484 | showAgendaView(KOPrefs::instance()->mFullViewMonth); | 484 | showAgendaView(KOPrefs::instance()->mFullViewMonth); |
485 | globalFlagBlockAgenda = 2; | 485 | globalFlagBlockAgenda = 2; |
486 | mMainView->dateNavigator()->selectDates( QDate::currentDate(), | 486 | mMainView->dateNavigator()->selectDates( QDate::currentDate(), |
487 | KOPrefs::instance()->mNextXDays ); | 487 | KOPrefs::instance()->mNextXDays ); |
488 | mFlagShowNextxDays = true; | 488 | mFlagShowNextxDays = true; |
489 | mCurrentAgendaView = 3 ; | 489 | mCurrentAgendaView = 3 ; |
490 | } | 490 | } |
491 | bool KOViewManager::showsNextDays() | 491 | bool KOViewManager::showsNextDays() |
492 | { | 492 | { |
493 | return mFlagShowNextxDays; | 493 | return mFlagShowNextxDays; |
494 | } | 494 | } |
495 | void KOViewManager::createMonthView() | 495 | void KOViewManager::createMonthView() |
496 | { | 496 | { |
497 | if (!mMonthView) { | 497 | if (!mMonthView) { |
498 | mMonthView = new KOMonthView(mMainView->calendar(), mMainView->viewStack(), "KOViewManager::MonthView"); | 498 | mMonthView = new KOMonthView(mMainView->calendar(), mMainView->viewStack(), "KOViewManager::MonthView"); |
499 | 499 | ||
500 | addView(mMonthView); | 500 | addView(mMonthView); |
501 | // mMonthView->show(); | 501 | // mMonthView->show(); |
502 | // SIGNALS/SLOTS FOR MONTH VIEW | 502 | // SIGNALS/SLOTS FOR MONTH VIEW |
503 | connect(mMonthView, SIGNAL(newEventSignal(QDateTime)), | 503 | connect(mMonthView, SIGNAL(newEventSignal(QDateTime)), |
504 | mMainView, SLOT(newEvent(QDateTime))); | 504 | mMainView, SLOT(newEvent(QDateTime))); |
505 | 505 | ||
506 | connect(mMonthView, SIGNAL(showIncidenceSignal(Incidence *)), | 506 | connect(mMonthView, SIGNAL(showIncidenceSignal(Incidence *)), |
507 | mMainView, SLOT(showIncidence(Incidence *))); | 507 | mMainView, SLOT(showIncidence(Incidence *))); |
508 | connect(mMonthView, SIGNAL(editIncidenceSignal(Incidence *)), | 508 | connect(mMonthView, SIGNAL(editIncidenceSignal(Incidence *)), |
509 | mMainView, SLOT(editIncidence(Incidence *))); | 509 | mMainView, SLOT(editIncidence(Incidence *))); |
510 | connect(mMonthView, SIGNAL(deleteIncidenceSignal(Incidence *)), | 510 | connect(mMonthView, SIGNAL(deleteIncidenceSignal(Incidence *)), |
511 | mMainView, SLOT(deleteIncidence(Incidence *))); | 511 | mMainView, SLOT(deleteIncidence(Incidence *))); |
512 | 512 | ||
513 | connect( mMonthView, SIGNAL( incidenceSelected( Incidence * ) ), | 513 | connect( mMonthView, SIGNAL( incidenceSelected( Incidence * ) ), |
514 | mMainView, SLOT( processMainViewSelection( Incidence * ) ) ); | 514 | mMainView, SLOT( processMainViewSelection( Incidence * ) ) ); |
515 | connect( mMonthView, SIGNAL( cloneIncidenceSignal( Incidence * ) ), | 515 | connect( mMonthView, SIGNAL( cloneIncidenceSignal( Incidence * ) ), |
516 | mMainView, SLOT ( cloneIncidence( Incidence * ) ) ); | 516 | mMainView, SLOT ( cloneIncidence( Incidence * ) ) ); |
517 | connect( mMonthView, SIGNAL( cancelIncidenceSignal( Incidence * ) ), | 517 | connect( mMonthView, SIGNAL( cancelIncidenceSignal( Incidence * ) ), |
518 | mMainView, SLOT ( cancelIncidence( Incidence * ) ) ); | 518 | mMainView, SLOT ( cancelIncidence( Incidence * ) ) ); |
519 | 519 | ||
520 | connect( mMonthView, SIGNAL( moveIncidenceSignal( Incidence * ) ), | 520 | connect( mMonthView, SIGNAL( moveIncidenceSignal( Incidence * ) ), |
521 | mMainView, SLOT ( moveIncidence( Incidence * ) ) ); | 521 | mMainView, SLOT ( moveIncidence( Incidence * ) ) ); |
522 | connect( mMonthView, SIGNAL( beamIncidenceSignal( Incidence * ) ), | 522 | connect( mMonthView, SIGNAL( beamIncidenceSignal( Incidence * ) ), |
523 | mMainView, SLOT ( beamIncidence( Incidence * ) ) ); | 523 | mMainView, SLOT ( beamIncidence( Incidence * ) ) ); |
524 | connect( mMonthView, SIGNAL( selectWeekNum( int ) ), | 524 | connect( mMonthView, SIGNAL( selectWeekNum( int ) ), |
525 | mMainView->dateNavigator(), SLOT ( selectWeekFromMonthView( int ) ) ); | 525 | mMainView->dateNavigator(), SLOT ( selectWeekFromMonthView( int ) ) ); |
526 | connect( mMonthView, SIGNAL( selectMonth() ), | 526 | connect( mMonthView, SIGNAL( selectMonth() ), |
527 | mMainView->dateNavigator(), SLOT ( selectMonthFromMonthview() ) ); | 527 | mMainView->dateNavigator(), SLOT ( selectMonthFromMonthview() ) ); |
528 | connect( mMonthView, SIGNAL( showDaySignal( QDate ) ), | 528 | connect( mMonthView, SIGNAL( showDaySignal( QDate ) ), |
529 | mMainView, SLOT ( showDay( QDate ) ) ); | 529 | mMainView, SLOT ( showDay( QDate ) ) ); |
530 | connect(mMainView, SIGNAL(configChanged()), mMonthView, SLOT(updateConfig())); | 530 | connect(mMainView, SIGNAL(configChanged()), mMonthView, SLOT(updateConfig())); |
531 | connect( mMonthView, SIGNAL(nextMonth() ), | 531 | connect( mMonthView, SIGNAL(nextMonth() ), |
532 | mMonthView->navigatorBar(), SIGNAL(goNextMonth() ) ); | 532 | mMonthView->navigatorBar(), SIGNAL(goNextMonth() ) ); |
533 | connect( mMonthView, SIGNAL(prevMonth() ), | 533 | connect( mMonthView, SIGNAL(prevMonth() ), |
534 | mMonthView->navigatorBar(), SIGNAL(goPrevMonth() ) ); | 534 | mMonthView->navigatorBar(), SIGNAL(goPrevMonth() ) ); |
535 | connect( mMonthView->navigatorBar(), SIGNAL( goPrevYear() ), | 535 | connect( mMonthView->navigatorBar(), SIGNAL( goPrevYear() ), |
536 | mMainView->dateNavigator(), SLOT( selectPreviousYear() ) ); | 536 | mMainView->dateNavigator(), SLOT( selectPreviousYear() ) ); |
537 | connect( mMonthView->navigatorBar(), SIGNAL( goNextYear() ), | 537 | connect( mMonthView->navigatorBar(), SIGNAL( goNextYear() ), |
538 | mMainView->dateNavigator(), SLOT( selectNextYear() ) ); | 538 | mMainView->dateNavigator(), SLOT( selectNextYear() ) ); |
539 | connect( mMonthView->navigatorBar(), SIGNAL( goPrevMonth() ), | 539 | connect( mMonthView->navigatorBar(), SIGNAL( goPrevMonth() ), |
540 | mMainView->dateNavigator(), SLOT( selectPreviousMonth() ) ); | 540 | mMainView->dateNavigator(), SLOT( selectPreviousMonth() ) ); |
541 | connect( mMonthView->navigatorBar(), SIGNAL( goNextMonth() ), | 541 | connect( mMonthView->navigatorBar(), SIGNAL( goNextMonth() ), |
542 | mMainView->dateNavigator(), SLOT( selectNextMonth() ) ); | 542 | mMainView->dateNavigator(), SLOT( selectNextMonth() ) ); |
543 | connect( mMonthView->navigatorBar(), SIGNAL( goPrevWeek() ), | 543 | connect( mMonthView->navigatorBar(), SIGNAL( goPrevWeek() ), |
544 | mMainView->dateNavigator(), SLOT( selectPreviousWeek() ) ); | 544 | mMainView->dateNavigator(), SLOT( selectPreviousWeek() ) ); |
545 | connect( mMonthView->navigatorBar(), SIGNAL( goNextWeek() ), | 545 | connect( mMonthView->navigatorBar(), SIGNAL( goNextWeek() ), |
546 | mMainView->dateNavigator(), SLOT( selectNextWeek() ) ); | 546 | mMainView->dateNavigator(), SLOT( selectNextWeek() ) ); |
547 | 547 | ||
548 | connect( mMainView->dateNavigator(), SIGNAL( datesSelected( const KCal::DateList & ) ), | 548 | connect( mMainView->dateNavigator(), SIGNAL( datesSelected( const KCal::DateList & ) ), |
549 | mMonthView->navigatorBar(), SLOT( selectDates( const KCal::DateList & ) ) ); | 549 | mMonthView->navigatorBar(), SLOT( selectDates( const KCal::DateList & ) ) ); |
550 | 550 | ||
551 | 551 | ||
552 | connect( mMonthView->navigatorBar(), SIGNAL( monthSelected ( int ) ), | 552 | connect( mMonthView->navigatorBar(), SIGNAL( monthSelected ( int ) ), |
553 | mMainView->dateNavigator(), SLOT( slotMonthSelect( int ) ) ); | 553 | mMainView->dateNavigator(), SLOT( slotMonthSelect( int ) ) ); |
554 | 554 | ||
555 | } | 555 | } |
556 | } | 556 | } |
557 | void KOViewManager::showMonthViewWeek() | 557 | void KOViewManager::showMonthViewWeek() |
558 | { | 558 | { |
559 | createMonthView(); | 559 | createMonthView(); |
560 | globalFlagBlockAgenda = 1; | ||
560 | bool full = true; | 561 | bool full = true; |
561 | if ( mCurrentView == mMonthView) | 562 | if ( mCurrentView == mMonthView) |
562 | full = mMainView->leftFrame()->isVisible(); | 563 | full = mMainView->leftFrame()->isVisible(); |
563 | if ( !KOPrefs::instance()->mMonthViewWeek ) { | 564 | if ( !KOPrefs::instance()->mMonthViewWeek ) { |
564 | mMonthView->switchView(); | 565 | mMonthView->switchView(); |
565 | if ( KOPrefs::instance()->mViewChangeHoldNonFullscreen && mMainView->leftFrame()->isVisible() ) | 566 | if ( KOPrefs::instance()->mViewChangeHoldNonFullscreen && mMainView->leftFrame()->isVisible() ) |
566 | full = false; | 567 | full = false; |
567 | else | 568 | else |
568 | full = true; | 569 | full = true; |
569 | } | 570 | } |
570 | mMainView->dateNavigator()->selectWeek(); | 571 | mMainView->dateNavigator()->selectWeek(); |
571 | showView(mMonthView, full ); | 572 | showView(mMonthView, full ); |
572 | } | 573 | } |
573 | 574 | ||
574 | void KOViewManager::showMonthView() | 575 | void KOViewManager::showMonthView() |
575 | { | 576 | { |
576 | 577 | ||
577 | createMonthView(); | 578 | createMonthView(); |
578 | globalFlagBlockAgenda = 1; | 579 | globalFlagBlockAgenda = 1; |
579 | //mFlagShowNextxDays = false; | 580 | //mFlagShowNextxDays = false; |
580 | bool full = true; | 581 | bool full = true; |
581 | if ( mCurrentView == mMonthView) | 582 | if ( mCurrentView == mMonthView) |
582 | full = mMainView->leftFrame()->isVisible(); | 583 | full = mMainView->leftFrame()->isVisible(); |
583 | // if(mMonthView == mCurrentView) return; | 584 | // if(mMonthView == mCurrentView) return; |
584 | if ( KOPrefs::instance()->mMonthViewWeek ) { | 585 | if ( KOPrefs::instance()->mMonthViewWeek ) { |
585 | mMonthView->switchView(); | 586 | mMonthView->switchView(); |
586 | if ( KOPrefs::instance()->mViewChangeHoldNonFullscreen && mMainView->leftFrame()->isVisible() ) | 587 | if ( KOPrefs::instance()->mViewChangeHoldNonFullscreen && mMainView->leftFrame()->isVisible() ) |
587 | full = false; | 588 | full = false; |
588 | else | 589 | else |
589 | full = true; | 590 | full = true; |
590 | } | 591 | } |
591 | mMainView->dateNavigator()->selectMonth(); | 592 | mMainView->dateNavigator()->selectMonth(); |
592 | 593 | ||
593 | showView(mMonthView, full ); | 594 | showView(mMonthView, full ); |
594 | 595 | ||
595 | } | 596 | } |
596 | 597 | ||
597 | void KOViewManager::showTodoView() | 598 | void KOViewManager::showTodoView() |
598 | { | 599 | { |
599 | //mFlagShowNextxDays = false; | 600 | //mFlagShowNextxDays = false; |
600 | if ( !mTodoView ) { | 601 | if ( !mTodoView ) { |
601 | mTodoView = new KOTodoView( mMainView->calendar(), mMainView->viewStack(), | 602 | mTodoView = new KOTodoView( mMainView->calendar(), mMainView->viewStack(), |
602 | "KOViewManager::TodoView" ); | 603 | "KOViewManager::TodoView" ); |
603 | 604 | ||
604 | addView( mTodoView ); | 605 | addView( mTodoView ); |
605 | // QPEApplication::setStylusOperation( mTodoView, QPEApplication::RightOnHold ); | 606 | // QPEApplication::setStylusOperation( mTodoView, QPEApplication::RightOnHold ); |
606 | 607 | ||
607 | // SIGNALS/SLOTS FOR TODO VIEW | 608 | // SIGNALS/SLOTS FOR TODO VIEW |
608 | connect( mTodoView, SIGNAL( newTodoSignal() ), | 609 | connect( mTodoView, SIGNAL( newTodoSignal() ), |
609 | mMainView, SLOT( newTodo() ) ); | 610 | mMainView, SLOT( newTodo() ) ); |
610 | connect( mTodoView, SIGNAL( newSubTodoSignal( Todo * ) ), | 611 | connect( mTodoView, SIGNAL( newSubTodoSignal( Todo * ) ), |
611 | mMainView, SLOT( newSubTodo( Todo *) ) ); | 612 | mMainView, SLOT( newSubTodo( Todo *) ) ); |
612 | connect( mTodoView, SIGNAL( showTodoSignal( Todo *) ), | 613 | connect( mTodoView, SIGNAL( showTodoSignal( Todo *) ), |
613 | mMainView, SLOT( showTodo( Todo * ) ) ); | 614 | mMainView, SLOT( showTodo( Todo * ) ) ); |
614 | connect( mTodoView, SIGNAL( editTodoSignal( Todo * ) ), | 615 | connect( mTodoView, SIGNAL( editTodoSignal( Todo * ) ), |
615 | mMainView, SLOT( editTodo( Todo * ) ) ); | 616 | mMainView, SLOT( editTodo( Todo * ) ) ); |
616 | connect( mTodoView, SIGNAL( deleteTodoSignal( Todo * ) ), | 617 | connect( mTodoView, SIGNAL( deleteTodoSignal( Todo * ) ), |
617 | mMainView, SLOT( deleteTodo( Todo * ) ) ); | 618 | mMainView, SLOT( deleteTodo( Todo * ) ) ); |
618 | connect( mTodoView, SIGNAL( purgeCompletedSignal() ), | 619 | connect( mTodoView, SIGNAL( purgeCompletedSignal() ), |
619 | mMainView, SLOT( purgeCompleted() ) ); | 620 | mMainView, SLOT( purgeCompleted() ) ); |
620 | 621 | ||
621 | connect( mTodoView, SIGNAL( incidenceSelected( Incidence * ) ), | 622 | connect( mTodoView, SIGNAL( incidenceSelected( Incidence * ) ), |
622 | mMainView, SLOT( processMainViewSelection( Incidence * ) ) ); | 623 | mMainView, SLOT( processMainViewSelection( Incidence * ) ) ); |
623 | 624 | ||
624 | connect( mMainView, SIGNAL( configChanged() ), mTodoView, | 625 | connect( mMainView, SIGNAL( configChanged() ), mTodoView, |
625 | SLOT( updateConfig() ) ); | 626 | SLOT( updateConfig() ) ); |
626 | connect( mMainView, SIGNAL( todoModified( Todo *, int )), mTodoView, | 627 | connect( mMainView, SIGNAL( todoModified( Todo *, int )), mTodoView, |
627 | SLOT( updateTodo( Todo *, int ) ) ); | 628 | SLOT( updateTodo( Todo *, int ) ) ); |
628 | connect( mTodoView, SIGNAL( todoModifiedSignal( Todo *, int ) ), | 629 | connect( mTodoView, SIGNAL( todoModifiedSignal( Todo *, int ) ), |
629 | mMainView, SIGNAL ( todoModified( Todo *, int ) ) ); | 630 | mMainView, SIGNAL ( todoModified( Todo *, int ) ) ); |
630 | connect( mTodoView, SIGNAL( cloneTodoSignal( Incidence * ) ), | 631 | connect( mTodoView, SIGNAL( cloneTodoSignal( Incidence * ) ), |
631 | mMainView, SLOT ( cloneIncidence( Incidence * ) ) ); | 632 | mMainView, SLOT ( cloneIncidence( Incidence * ) ) ); |
632 | connect( mTodoView, SIGNAL( cancelTodoSignal( Incidence * ) ), | 633 | connect( mTodoView, SIGNAL( cancelTodoSignal( Incidence * ) ), |
633 | mMainView, SLOT ( cancelIncidence( Incidence * ) ) ); | 634 | mMainView, SLOT ( cancelIncidence( Incidence * ) ) ); |
634 | connect( mTodoView, SIGNAL( unparentTodoSignal( Todo * ) ), | 635 | connect( mTodoView, SIGNAL( unparentTodoSignal( Todo * ) ), |
635 | mMainView, SLOT ( todo_unsub( Todo * ) ) ); | 636 | mMainView, SLOT ( todo_unsub( Todo * ) ) ); |
636 | connect( mTodoView, SIGNAL( reparentTodoSignal( Todo *,Todo * ) ), | 637 | connect( mTodoView, SIGNAL( reparentTodoSignal( Todo *,Todo * ) ), |
637 | mMainView, SLOT ( todo_resub( Todo *, Todo *) ) ); | 638 | mMainView, SLOT ( todo_resub( Todo *, Todo *) ) ); |
638 | connect( mTodoView, SIGNAL( moveTodoSignal( Incidence * ) ), | 639 | connect( mTodoView, SIGNAL( moveTodoSignal( Incidence * ) ), |
639 | mMainView, SLOT ( moveIncidence( Incidence * ) ) ); | 640 | mMainView, SLOT ( moveIncidence( Incidence * ) ) ); |
640 | connect( mTodoView, SIGNAL( beamTodoSignal( Incidence * ) ), | 641 | connect( mTodoView, SIGNAL( beamTodoSignal( Incidence * ) ), |
641 | mMainView, SLOT ( beamIncidence( Incidence * ) ) ); | 642 | mMainView, SLOT ( beamIncidence( Incidence * ) ) ); |
642 | KConfig *config = KOGlobals::config(); | 643 | KConfig *config = KOGlobals::config(); |
643 | mTodoView->restoreLayout(config,"Todo View"); | 644 | mTodoView->restoreLayout(config,"Todo View"); |
644 | mTodoView->setNavigator( mMainView->dateNavigator() ); | 645 | mTodoView->setNavigator( mMainView->dateNavigator() ); |
645 | } | 646 | } |
646 | 647 | ||
647 | globalFlagBlockAgenda = 1; | 648 | globalFlagBlockAgenda = 1; |
648 | showView( mTodoView, true ); | 649 | showView( mTodoView, true ); |
649 | 650 | ||
650 | } | 651 | } |
651 | 652 | ||
652 | void KOViewManager::showJournalView() | 653 | void KOViewManager::showJournalView() |
653 | { | 654 | { |
654 | //mFlagShowNextxDays = false; | 655 | //mFlagShowNextxDays = false; |
655 | if (!mJournalView) { | 656 | if (!mJournalView) { |
656 | mJournalView = new KOJournalView(mMainView->calendar(),mMainView->viewStack(), | 657 | mJournalView = new KOJournalView(mMainView->calendar(),mMainView->viewStack(), |
657 | "KOViewManager::JournalView"); | 658 | "KOViewManager::JournalView"); |
658 | connect( mMainView, SIGNAL( configChanged() ), mJournalView, | 659 | connect( mMainView, SIGNAL( configChanged() ), mJournalView, |
659 | SLOT( updateConfig() ) ); | 660 | SLOT( updateConfig() ) ); |
660 | connect(mJournalView, SIGNAL(deleteJournal(Journal *) ), mMainView,SLOT(deleteJournal(Journal *)) ); | 661 | connect(mJournalView, SIGNAL(deleteJournal(Journal *) ), mMainView,SLOT(deleteJournal(Journal *)) ); |
661 | addView(mJournalView); | 662 | addView(mJournalView); |
662 | } | 663 | } |
663 | 664 | ||
664 | showView(mJournalView); | 665 | showView(mJournalView); |
665 | mMainView->dateNavigator()->selectDates( 1 ); | 666 | mMainView->dateNavigator()->selectDates( 1 ); |
666 | } | 667 | } |
667 | 668 | ||
668 | void KOViewManager::showTimeSpanView() | 669 | void KOViewManager::showTimeSpanView() |
669 | { | 670 | { |
670 | //mFlagShowNextxDays = false; | 671 | //mFlagShowNextxDays = false; |
671 | if (!mTimeSpanView) { | 672 | if (!mTimeSpanView) { |
672 | mTimeSpanView = new KOTimeSpanView(mMainView->calendar(),mMainView->viewStack(), | 673 | mTimeSpanView = new KOTimeSpanView(mMainView->calendar(),mMainView->viewStack(), |
673 | "KOViewManager::TimeSpanView"); | 674 | "KOViewManager::TimeSpanView"); |
674 | addView(mTimeSpanView); | 675 | addView(mTimeSpanView); |
675 | 676 | ||
676 | mTimeSpanView->readSettings(); | 677 | mTimeSpanView->readSettings(); |
677 | } | 678 | } |
678 | 679 | ||
679 | showView(mTimeSpanView); | 680 | showView(mTimeSpanView); |
680 | } | 681 | } |
681 | 682 | ||
682 | Incidence *KOViewManager::currentSelection() | 683 | Incidence *KOViewManager::currentSelection() |
683 | { | 684 | { |
684 | if (!mCurrentView) return 0; | 685 | if (!mCurrentView) return 0; |
685 | if ( mCurrentView == mListView ) { | 686 | if ( mCurrentView == mListView ) { |
686 | if ( mListView->currentItem() ) | 687 | if ( mListView->currentItem() ) |
687 | return mListView->currentItem(); | 688 | return mListView->currentItem(); |