-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 | |||
@@ -496,128 +496,129 @@ 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 | ||