summaryrefslogtreecommitdiffabout
path: root/korganizer/koviewmanager.cpp
Unidiff
Diffstat (limited to 'korganizer/koviewmanager.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koviewmanager.cpp10
1 files changed, 1 insertions, 9 deletions
diff --git a/korganizer/koviewmanager.cpp b/korganizer/koviewmanager.cpp
index f1f2dd2..3aa9b6c 100644
--- a/korganizer/koviewmanager.cpp
+++ b/korganizer/koviewmanager.cpp
@@ -505,105 +505,97 @@ void KOViewManager::showAgendaView( bool fullScreen )
505 connect( mAgendaView, SIGNAL( beamIncidenceSignal( Incidence * ) ), 505 connect( mAgendaView, SIGNAL( beamIncidenceSignal( Incidence * ) ),
506 mMainView, SLOT ( beamIncidence( Incidence * ) ) ); 506 mMainView, SLOT ( beamIncidence( Incidence * ) ) );
507 connect( mAgendaView, SIGNAL( selectWeekNum( int ) ), 507 connect( mAgendaView, SIGNAL( selectWeekNum( int ) ),
508 mMainView->dateNavigator(), SLOT ( selectWeek( int ) ) ); 508 mMainView->dateNavigator(), SLOT ( selectWeek( int ) ) );
509 mAgendaView->readSettings(); 509 mAgendaView->readSettings();
510 mAgendaView->updateConfig(); 510 mAgendaView->updateConfig();
511 } 511 }
512 512
513 showView( mAgendaView, full); 513 showView( mAgendaView, full);
514 KOPrefs::instance()->mCurrentDisplayedView = VIEW_A_VIEW; 514 KOPrefs::instance()->mCurrentDisplayedView = VIEW_A_VIEW;
515} 515}
516 516
517void KOViewManager::showDayView() 517void KOViewManager::showDayView()
518{ 518{
519 mCurrentAgendaView = mMainView->dateNavigator()->selectedDates().count(); 519 mCurrentAgendaView = mMainView->dateNavigator()->selectedDates().count();
520 mFlagShowNextxDays = false; 520 mFlagShowNextxDays = false;
521 globalFlagBlockLabel = 1; 521 globalFlagBlockLabel = 1;
522 globalFlagBlockAgenda = 1; 522 globalFlagBlockAgenda = 1;
523 if ( mCurrentAgendaView != 1 ) 523 if ( mCurrentAgendaView != 1 )
524 mCurrentAgendaView = -1; 524 mCurrentAgendaView = -1;
525 showAgendaView(); 525 showAgendaView();
526 qApp->processEvents(); 526 qApp->processEvents();
527 globalFlagBlockAgenda = 2; 527 globalFlagBlockAgenda = 2;
528 globalFlagBlockLabel = 0; 528 globalFlagBlockLabel = 0;
529 mMainView->dateNavigator()->selectDates( 1 ); 529 mMainView->dateNavigator()->selectDates( 1 );
530 mCurrentAgendaView = 1 ; 530 mCurrentAgendaView = 1 ;
531 531
532} 532}
533 533
534void KOViewManager::showWorkWeekView() 534void KOViewManager::showWorkWeekView()
535{ 535{
536 mCurrentAgendaView = mMainView->dateNavigator()->selectedDates().count(); 536 mCurrentAgendaView = mMainView->dateNavigator()->selectedDates().count();
537 mFlagShowNextxDays = false; 537 mFlagShowNextxDays = false;
538 globalFlagBlockAgenda = 1; 538 globalFlagBlockAgenda = 1;
539 globalFlagBlockLabel = 1; 539 globalFlagBlockLabel = 1;
540 if ( mCurrentAgendaView != 5 ) 540 if ( mCurrentAgendaView != 5 )
541 mCurrentAgendaView = -1; 541 mCurrentAgendaView = -1;
542 showAgendaView(); 542 showAgendaView();
543 qApp->processEvents(); 543 qApp->processEvents();
544 globalFlagBlockAgenda = 2; 544 globalFlagBlockAgenda = 2;
545 globalFlagBlockLabel = 0; 545 globalFlagBlockLabel = 0;
546 mMainView->dateNavigator()->selectWorkWeek(); 546 mMainView->dateNavigator()->selectWorkWeek();
547 mCurrentAgendaView = 5 ; 547 mCurrentAgendaView = 5 ;
548 548
549} 549}
550 550
551void KOViewManager::showWeekView() 551void KOViewManager::showWeekView()
552{ 552{
553 /* 553
554 globalFlagBlockAgenda = 2;
555 qDebug("4globalFlagBlockAgenda = 2; ");
556 //globalFlagBlockPainting = true;
557 mMainView->dateNavigator()->selectWeek();
558 showAgendaView();
559 */
560
561
562 mCurrentAgendaView = mMainView->dateNavigator()->selectedDates().count(); 554 mCurrentAgendaView = mMainView->dateNavigator()->selectedDates().count();
563 mFlagShowNextxDays = false; 555 mFlagShowNextxDays = false;
564 globalFlagBlockAgenda = 1; 556 globalFlagBlockAgenda = 1;
565 globalFlagBlockLabel = 1; 557 globalFlagBlockLabel = 1;
566 if ( mCurrentAgendaView != 7 ) 558 if ( mCurrentAgendaView != 7 )
567 mCurrentAgendaView = -1; 559 mCurrentAgendaView = -1;
568 showAgendaView(); 560 showAgendaView();
569 qApp->processEvents(); 561 qApp->processEvents();
570 globalFlagBlockAgenda = 2; 562 globalFlagBlockAgenda = 2;
571 globalFlagBlockLabel = 0; 563 globalFlagBlockLabel = 0;
572 mMainView->dateNavigator()->selectWeek(); 564 mMainView->dateNavigator()->selectWeek();
573 mCurrentAgendaView = 7 ; 565 mCurrentAgendaView = 7 ;
574} 566}
575 567
576void KOViewManager::showNextXView() 568void KOViewManager::showNextXView()
577{ 569{
578 570
579 globalFlagBlockAgenda = 1; 571 globalFlagBlockAgenda = 1;
580 if ( mCurrentAgendaView != 3 ) 572 if ( mCurrentAgendaView != 3 )
581 mCurrentAgendaView = -1; 573 mCurrentAgendaView = -1;
582 showAgendaView(KOPrefs::instance()->mFullViewMonth); 574 showAgendaView(KOPrefs::instance()->mFullViewMonth);
583 globalFlagBlockAgenda = 2; 575 globalFlagBlockAgenda = 2;
584 mMainView->dateNavigator()->selectDates( QDate::currentDate(), 576 mMainView->dateNavigator()->selectDates( QDate::currentDate(),
585 KOPrefs::instance()->mNextXDays ); 577 KOPrefs::instance()->mNextXDays );
586 mFlagShowNextxDays = true; 578 mFlagShowNextxDays = true;
587 mCurrentAgendaView = 3 ; 579 mCurrentAgendaView = 3 ;
588 KOPrefs::instance()->mCurrentDisplayedView = VIEW_NX_VIEW; 580 KOPrefs::instance()->mCurrentDisplayedView = VIEW_NX_VIEW;
589} 581}
590bool KOViewManager::showsNextDays() 582bool KOViewManager::showsNextDays()
591{ 583{
592 return mFlagShowNextxDays; 584 return mFlagShowNextxDays;
593} 585}
594void KOViewManager::createMonthView() 586void KOViewManager::createMonthView()
595{ 587{
596if (!mMonthView) { 588if (!mMonthView) {
597 mMonthView = new KOMonthView(mMainView->calendar(), mMainView->viewStack(), "KOViewManager::MonthView"); 589 mMonthView = new KOMonthView(mMainView->calendar(), mMainView->viewStack(), "KOViewManager::MonthView");
598 590
599 addView(mMonthView); 591 addView(mMonthView);
600 // mMonthView->show(); 592 // mMonthView->show();
601 // SIGNALS/SLOTS FOR MONTH VIEW 593 // SIGNALS/SLOTS FOR MONTH VIEW
602 594
603 connect(mMonthView,SIGNAL(showJournalSignal( int, QDate )),SLOT(showDateView( int, QDate ))); 595 connect(mMonthView,SIGNAL(showJournalSignal( int, QDate )),SLOT(showDateView( int, QDate )));
604 596
605 connect(mMonthView, SIGNAL(newTodoSignal(QDateTime,bool)), 597 connect(mMonthView, SIGNAL(newTodoSignal(QDateTime,bool)),
606 mMainView, SLOT(newTodoDateTime(QDateTime, bool))); 598 mMainView, SLOT(newTodoDateTime(QDateTime, bool)));
607 599
608 600
609 connect(mMonthView, SIGNAL(newEventSignal(QDateTime)), 601 connect(mMonthView, SIGNAL(newEventSignal(QDateTime)),