Diffstat (limited to 'korganizer/koviewmanager.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | korganizer/koviewmanager.cpp | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/korganizer/koviewmanager.cpp b/korganizer/koviewmanager.cpp index 792a7b8..ba3bc05 100644 --- a/korganizer/koviewmanager.cpp +++ b/korganizer/koviewmanager.cpp | |||
@@ -510,134 +510,131 @@ void KOViewManager::showAgendaView( bool fullScreen ) | |||
510 | connect(mAgendaView, SIGNAL(deleteIncidenceSignal(Incidence *)), | 510 | connect(mAgendaView, SIGNAL(deleteIncidenceSignal(Incidence *)), |
511 | mMainView, SLOT(deleteIncidence(Incidence *))); | 511 | mMainView, SLOT(deleteIncidence(Incidence *))); |
512 | 512 | ||
513 | connect( mAgendaView, SIGNAL( incidenceSelected( Incidence * ) ), | 513 | connect( mAgendaView, SIGNAL( incidenceSelected( Incidence * ) ), |
514 | mMainView, SLOT( processMainViewSelection( Incidence * ) ) ); | 514 | mMainView, SLOT( processMainViewSelection( Incidence * ) ) ); |
515 | 515 | ||
516 | connect(mAgendaView, SIGNAL( toggleExpand() ), | 516 | connect(mAgendaView, SIGNAL( toggleExpand() ), |
517 | mMainView, SLOT( toggleExpand() ) ); | 517 | mMainView, SLOT( toggleExpand() ) ); |
518 | 518 | ||
519 | connect( mAgendaView, SIGNAL( cloneIncidenceSignal(Incidence *) ), | 519 | connect( mAgendaView, SIGNAL( cloneIncidenceSignal(Incidence *) ), |
520 | mMainView, SLOT(cloneIncidence(Incidence *) ) ) ; | 520 | mMainView, SLOT(cloneIncidence(Incidence *) ) ) ; |
521 | connect( mAgendaView, SIGNAL( cancelIncidenceSignal(Incidence *) ), | 521 | connect( mAgendaView, SIGNAL( cancelIncidenceSignal(Incidence *) ), |
522 | mMainView, SLOT(cancelIncidence(Incidence *) ) ) ; | 522 | mMainView, SLOT(cancelIncidence(Incidence *) ) ) ; |
523 | connect(mMainView, SIGNAL(configChanged()), mAgendaView, SLOT(updateConfig())); | 523 | connect(mMainView, SIGNAL(configChanged()), mAgendaView, SLOT(updateConfig())); |
524 | connect( mMainView, SIGNAL( todoModified( Todo *, int )), mAgendaView, | 524 | connect( mMainView, SIGNAL( todoModified( Todo *, int )), mAgendaView, |
525 | SLOT( updateTodo( Todo *, int ) ) ); | 525 | SLOT( updateTodo( Todo *, int ) ) ); |
526 | connect( mAgendaView,SIGNAL( todoMoved( Todo *, int )), | 526 | connect( mAgendaView,SIGNAL( todoMoved( Todo *, int )), |
527 | mMainView, SIGNAL( todoModified( Todo *, int ))); | 527 | mMainView, SIGNAL( todoModified( Todo *, int ))); |
528 | connect( mAgendaView, SIGNAL( moveIncidenceSignal( Incidence * ) ), | 528 | connect( mAgendaView, SIGNAL( moveIncidenceSignal( Incidence * ) ), |
529 | mMainView, SLOT ( moveIncidence( Incidence * ) ) ); | 529 | mMainView, SLOT ( moveIncidence( Incidence * ) ) ); |
530 | connect( mAgendaView, SIGNAL( beamIncidenceSignal( Incidence * ) ), | 530 | connect( mAgendaView, SIGNAL( beamIncidenceSignal( Incidence * ) ), |
531 | mMainView, SLOT ( beamIncidence( Incidence * ) ) ); | 531 | mMainView, SLOT ( beamIncidence( Incidence * ) ) ); |
532 | connect( mAgendaView, SIGNAL( selectWeekNum( int ) ), | 532 | connect( mAgendaView, SIGNAL( selectWeekNum( int ) ), |
533 | mMainView->dateNavigator(), SLOT ( selectWeek( int ) ) ); | 533 | mMainView->dateNavigator(), SLOT ( selectWeek( int ) ) ); |
534 | mAgendaView->readSettings(); | 534 | mAgendaView->readSettings(); |
535 | mAgendaView->updateConfig(); | 535 | mAgendaView->updateConfig(); |
536 | } | 536 | } |
537 | 537 | ||
538 | KOPrefs::instance()->mCurrentDisplayedView = VIEW_A_VIEW; | 538 | KOPrefs::instance()->mCurrentDisplayedView = VIEW_A_VIEW; |
539 | showView( mAgendaView, full); | 539 | showView( mAgendaView, full); |
540 | KOPrefs::instance()->mCurrentDisplayedView = VIEW_A_VIEW; | 540 | KOPrefs::instance()->mCurrentDisplayedView = VIEW_A_VIEW; |
541 | mMainView->setScrollBarStep( 1 ); | 541 | mMainView->setScrollBarStep( 1 ); |
542 | } | 542 | } |
543 | 543 | ||
544 | void KOViewManager::showDayView() | 544 | void KOViewManager::showDayView() |
545 | { | 545 | { |
546 | mCurrentAgendaView = mMainView->dateNavigator()->selectedDates().count(); | 546 | mCurrentAgendaView = mMainView->dateNavigator()->selectedDates().count(); |
547 | mFlagShowNextxDays = false; | 547 | mFlagShowNextxDays = false; |
548 | globalFlagBlockLabel = 1; | 548 | globalFlagBlockLabel = 1; |
549 | globalFlagBlockAgenda = 1; | 549 | globalFlagBlockAgenda = 1; |
550 | if ( mCurrentAgendaView != 1 ) | 550 | if ( mCurrentAgendaView != 1 ) |
551 | mCurrentAgendaView = -1; | 551 | mCurrentAgendaView = -1; |
552 | showAgendaView(); | 552 | showAgendaView(); |
553 | qApp->processEvents(); | 553 | qApp->processEvents(); |
554 | globalFlagBlockAgenda = 2; | 554 | globalFlagBlockAgenda = 2; |
555 | globalFlagBlockLabel = 0; | 555 | globalFlagBlockLabel = 0; |
556 | mMainView->dateNavigator()->selectDates( 1 ); | 556 | mMainView->dateNavigator()->selectDates( 1 ); |
557 | mCurrentAgendaView = 1 ; | 557 | mCurrentAgendaView = 1 ; |
558 | mMainView->setScrollBarStep( 1 ); | ||
559 | 558 | ||
560 | } | 559 | } |
561 | 560 | ||
562 | void KOViewManager::showWorkWeekView() | 561 | void KOViewManager::showWorkWeekView() |
563 | { | 562 | { |
564 | mCurrentAgendaView = mMainView->dateNavigator()->selectedDates().count(); | 563 | mCurrentAgendaView = mMainView->dateNavigator()->selectedDates().count(); |
565 | mFlagShowNextxDays = false; | 564 | mFlagShowNextxDays = false; |
566 | globalFlagBlockAgenda = 1; | 565 | globalFlagBlockAgenda = 1; |
567 | globalFlagBlockLabel = 1; | 566 | globalFlagBlockLabel = 1; |
568 | if ( mCurrentAgendaView != 5 ) | 567 | if ( mCurrentAgendaView != 5 ) |
569 | mCurrentAgendaView = -1; | 568 | mCurrentAgendaView = -1; |
570 | showAgendaView(); | 569 | showAgendaView(); |
571 | qApp->processEvents(); | 570 | qApp->processEvents(); |
572 | globalFlagBlockAgenda = 2; | 571 | globalFlagBlockAgenda = 2; |
573 | globalFlagBlockLabel = 0; | 572 | globalFlagBlockLabel = 0; |
574 | mMainView->dateNavigator()->selectWorkWeek(); | 573 | mMainView->dateNavigator()->selectWorkWeek(); |
575 | mCurrentAgendaView = 5 ; | 574 | mCurrentAgendaView = 5 ; |
576 | mMainView->setScrollBarStep( 1 ); | ||
577 | 575 | ||
578 | } | 576 | } |
579 | 577 | ||
580 | void KOViewManager::showWeekView() | 578 | void KOViewManager::showWeekView() |
581 | { | 579 | { |
582 | 580 | ||
583 | mCurrentAgendaView = mMainView->dateNavigator()->selectedDates().count(); | 581 | mCurrentAgendaView = mMainView->dateNavigator()->selectedDates().count(); |
584 | mFlagShowNextxDays = false; | 582 | mFlagShowNextxDays = false; |
585 | globalFlagBlockAgenda = 1; | 583 | globalFlagBlockAgenda = 1; |
586 | globalFlagBlockLabel = 1; | 584 | globalFlagBlockLabel = 1; |
587 | if ( mCurrentAgendaView != 7 ) | 585 | if ( mCurrentAgendaView != 7 ) |
588 | mCurrentAgendaView = -1; | 586 | mCurrentAgendaView = -1; |
589 | showAgendaView(); | 587 | showAgendaView(); |
590 | qApp->processEvents(); | 588 | qApp->processEvents(); |
591 | globalFlagBlockAgenda = 2; | 589 | globalFlagBlockAgenda = 2; |
592 | globalFlagBlockLabel = 0; | 590 | globalFlagBlockLabel = 0; |
593 | mMainView->dateNavigator()->selectWeek(); | 591 | mMainView->dateNavigator()->selectWeek(); |
594 | mCurrentAgendaView = 7 ; | 592 | mCurrentAgendaView = 7 ; |
595 | mMainView->setScrollBarStep( 1 ); | ||
596 | } | 593 | } |
597 | 594 | ||
598 | void KOViewManager::showNextXView() | 595 | void KOViewManager::showNextXView() |
599 | { | 596 | { |
600 | 597 | ||
601 | KOPrefs::instance()->mCurrentDisplayedView = VIEW_NX_VIEW; | 598 | KOPrefs::instance()->mCurrentDisplayedView = VIEW_NX_VIEW; |
602 | globalFlagBlockAgenda = 1; | 599 | globalFlagBlockAgenda = 1; |
603 | if ( mCurrentAgendaView != 3 ) | 600 | if ( mCurrentAgendaView != 3 ) |
604 | mCurrentAgendaView = -1; | 601 | mCurrentAgendaView = -1; |
605 | showAgendaView(KOPrefs::instance()->mFullViewMonth); | 602 | showAgendaView(KOPrefs::instance()->mFullViewMonth); |
606 | globalFlagBlockAgenda = 2; | 603 | globalFlagBlockAgenda = 2; |
607 | mMainView->dateNavigator()->selectDates( QDate::currentDate(), | 604 | mMainView->dateNavigator()->selectDates( QDate::currentDate(), |
608 | KOPrefs::instance()->mNextXDays ); | 605 | KOPrefs::instance()->mNextXDays ); |
609 | mFlagShowNextxDays = true; | 606 | mFlagShowNextxDays = true; |
610 | mCurrentAgendaView = 3 ; | 607 | mCurrentAgendaView = 3 ; |
611 | KOPrefs::instance()->mCurrentDisplayedView = VIEW_NX_VIEW; | 608 | KOPrefs::instance()->mCurrentDisplayedView = VIEW_NX_VIEW; |
612 | mMainView->setScrollBarStep( KOPrefs::instance()->mNextXDays ); | 609 | mMainView->setScrollBarStep( KOPrefs::instance()->mNextXDays ); |
613 | } | 610 | } |
614 | bool KOViewManager::showsNextDays() | 611 | bool KOViewManager::showsNextDays() |
615 | { | 612 | { |
616 | return mFlagShowNextxDays; | 613 | return mFlagShowNextxDays; |
617 | } | 614 | } |
618 | void KOViewManager::createMonthView() | 615 | void KOViewManager::createMonthView() |
619 | { | 616 | { |
620 | if (!mMonthView) { | 617 | if (!mMonthView) { |
621 | mMonthView = new KOMonthView(mMainView->calendar(), mMainView->viewStack(), "KOViewManager::MonthView"); | 618 | mMonthView = new KOMonthView(mMainView->calendar(), mMainView->viewStack(), "KOViewManager::MonthView"); |
622 | 619 | ||
623 | addView(mMonthView); | 620 | addView(mMonthView); |
624 | // mMonthView->show(); | 621 | // mMonthView->show(); |
625 | // SIGNALS/SLOTS FOR MONTH VIEW | 622 | // SIGNALS/SLOTS FOR MONTH VIEW |
626 | 623 | ||
627 | connect(mMonthView,SIGNAL(showJournalSignal( int, QDate )),SLOT(showDateView( int, QDate ))); | 624 | connect(mMonthView,SIGNAL(showJournalSignal( int, QDate )),SLOT(showDateView( int, QDate ))); |
628 | 625 | ||
629 | connect(mMonthView, SIGNAL(newTodoSignal(QDateTime,bool)), | 626 | connect(mMonthView, SIGNAL(newTodoSignal(QDateTime,bool)), |
630 | mMainView, SLOT(newTodoDateTime(QDateTime, bool))); | 627 | mMainView, SLOT(newTodoDateTime(QDateTime, bool))); |
631 | 628 | ||
632 | 629 | ||
633 | connect(mMonthView, SIGNAL(newEventSignal(QDateTime)), | 630 | connect(mMonthView, SIGNAL(newEventSignal(QDateTime)), |
634 | mMainView, SLOT(newEvent(QDateTime))); | 631 | mMainView, SLOT(newEvent(QDateTime))); |
635 | 632 | ||
636 | connect(mMonthView, SIGNAL(showIncidenceSignal(Incidence *)), | 633 | connect(mMonthView, SIGNAL(showIncidenceSignal(Incidence *)), |
637 | mMainView, SLOT(showIncidence(Incidence *))); | 634 | mMainView, SLOT(showIncidence(Incidence *))); |
638 | connect(mMonthView, SIGNAL(editIncidenceSignal(Incidence *)), | 635 | connect(mMonthView, SIGNAL(editIncidenceSignal(Incidence *)), |
639 | mMainView, SLOT(editIncidence(Incidence *))); | 636 | mMainView, SLOT(editIncidence(Incidence *))); |
640 | connect(mMonthView, SIGNAL(deleteIncidenceSignal(Incidence *)), | 637 | connect(mMonthView, SIGNAL(deleteIncidenceSignal(Incidence *)), |
641 | mMainView, SLOT(deleteIncidence(Incidence *))); | 638 | mMainView, SLOT(deleteIncidence(Incidence *))); |
642 | 639 | ||
643 | connect( mMonthView, SIGNAL( incidenceSelected( Incidence * ) ), | 640 | connect( mMonthView, SIGNAL( incidenceSelected( Incidence * ) ), |