summaryrefslogtreecommitdiffabout
path: root/korganizer/koviewmanager.cpp
Unidiff
Diffstat (limited to 'korganizer/koviewmanager.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koviewmanager.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/korganizer/koviewmanager.cpp b/korganizer/koviewmanager.cpp
index a74c5fe..dcb51dc 100644
--- a/korganizer/koviewmanager.cpp
+++ b/korganizer/koviewmanager.cpp
@@ -113,25 +113,25 @@ void KOViewManager::showDateView( int view, QDate date)
113 //mCurrentAgendaView = 1 ; 113 //mCurrentAgendaView = 1 ;
114 lastDate = mMainView->dateNavigator()->selectedDates().first(); 114 lastDate = mMainView->dateNavigator()->selectedDates().first();
115 lastCount = mMainView->dateNavigator()->selectedDates().count(); 115 lastCount = mMainView->dateNavigator()->selectedDates().count();
116 lastNDMode = savemFlagShowNextxDays; 116 lastNDMode = savemFlagShowNextxDays;
117 mMainView->showDay( date ); 117 mMainView->showDay( date );
118 } else if (view == 4 ) { 118 } else if (view == 4 ) {
119 mCurrentAgendaView = 7 ; 119 mCurrentAgendaView = 7 ;
120 mMainView->dateNavigator()->selectDates( date, 7 ); 120 mMainView->dateNavigator()->selectDates( date, 7 );
121 } else if (view == 5 ) { 121 } else if (view == 5 ) {
122 mCurrentAgendaView = 14 ; 122 mCurrentAgendaView = 14 ;
123 mMainView->dateNavigator()->selectDates( date, 14); 123 mMainView->dateNavigator()->selectDates( date, 14);
124 } else if (view == 6 ) { 124 } else if (view == 6 ) {
125 mMainView->dateNavigator()->selectDates( date, 7 ); 125 //mMainView->dateNavigator()->selectDates( date, 7 );
126 showMonthView(); 126 showMonthView();
127 } else if (view == 7 ) { 127 } else if (view == 7 ) {
128 mMainView->dateNavigator()->selectDate( date ); 128 mMainView->dateNavigator()->selectDate( date );
129 showJournalView(); 129 showJournalView();
130 } else if (view == 8 ) { 130 } else if (view == 8 ) {
131 globalFlagBlockAgenda = 1; 131 globalFlagBlockAgenda = 1;
132 if ( mCurrentAgendaView != 3 ) 132 if ( mCurrentAgendaView != 3 )
133 mCurrentAgendaView = -1; 133 mCurrentAgendaView = -1;
134 showAgendaView(KOPrefs::instance()->mFullViewMonth); 134 showAgendaView(KOPrefs::instance()->mFullViewMonth);
135 globalFlagBlockAgenda = 2; 135 globalFlagBlockAgenda = 2;
136 mMainView->dateNavigator()->selectDates( date , 136 mMainView->dateNavigator()->selectDates( date ,
137 KOPrefs::instance()->mNextXDays ); 137 KOPrefs::instance()->mNextXDays );
@@ -214,24 +214,25 @@ void KOViewManager::showView(KOrg::BaseView *view, bool fullScreen )
214 //mMainView->updateView(); 214 //mMainView->updateView();
215 raiseCurrentView( full, true ); 215 raiseCurrentView( full, true );
216 mMainView->adaptNavigationUnits(); 216 mMainView->adaptNavigationUnits();
217} 217}
218 218
219void KOViewManager::raiseCurrentView( bool fullScreen, bool callUpdateView ) 219void KOViewManager::raiseCurrentView( bool fullScreen, bool callUpdateView )
220{ 220{
221 mCurrentAgendaView = 0; 221 mCurrentAgendaView = 0;
222 int wid = mMainView->width() ; 222 int wid = mMainView->width() ;
223 int hei = mMainView->height(); 223 int hei = mMainView->height();
224 if ( mCurrentView == mMonthView ) { 224 if ( mCurrentView == mMonthView ) {
225 if ( true /* !KOPrefs::instance()->mMonthViewWeek*/ ) { 225 if ( true /* !KOPrefs::instance()->mMonthViewWeek*/ ) {
226 mMonthView->setIgnoreResizeEvent( 2 );
226 mMainView->navigatorBar()->show(); 227 mMainView->navigatorBar()->show();
227 hei -= mMainView->navigatorBar()->sizeHint().height(); 228 hei -= mMainView->navigatorBar()->sizeHint().height();
228 } 229 }
229 //mMainView->navigatorBar()->hide(); 230 //mMainView->navigatorBar()->hide();
230 } else { 231 } else {
231 mMainView->navigatorBar()->hide(); 232 mMainView->navigatorBar()->hide();
232 } 233 }
233 if ( fullScreen ) { 234 if ( fullScreen ) {
234 mMainView->leftFrame()->hide(); 235 mMainView->leftFrame()->hide();
235 } else { 236 } else {
236 mMainView->leftFrame()->show(); 237 mMainView->leftFrame()->show();
237 if ( KOPrefs::instance()->mVerticalScreen ) 238 if ( KOPrefs::instance()->mVerticalScreen )
@@ -482,25 +483,25 @@ void KOViewManager::showNextXView()
482 showAgendaView(KOPrefs::instance()->mFullViewMonth); 483 showAgendaView(KOPrefs::instance()->mFullViewMonth);
483 globalFlagBlockAgenda = 2; 484 globalFlagBlockAgenda = 2;
484 mMainView->dateNavigator()->selectDates( QDate::currentDate(), 485 mMainView->dateNavigator()->selectDates( QDate::currentDate(),
485 KOPrefs::instance()->mNextXDays ); 486 KOPrefs::instance()->mNextXDays );
486 mFlagShowNextxDays = true; 487 mFlagShowNextxDays = true;
487 mCurrentAgendaView = 3 ; 488 mCurrentAgendaView = 3 ;
488} 489}
489bool KOViewManager::showsNextDays() 490bool KOViewManager::showsNextDays()
490{ 491{
491 return mFlagShowNextxDays; 492 return mFlagShowNextxDays;
492} 493}
493void KOViewManager::showMonthView() 494void KOViewManager::showMonthView()
494{ 495 {
495 if (!mMonthView) { 496 if (!mMonthView) {
496 mMonthView = new KOMonthView(mMainView->calendar(), mMainView->viewStack(), "KOViewManager::MonthView"); 497 mMonthView = new KOMonthView(mMainView->calendar(), mMainView->viewStack(), "KOViewManager::MonthView");
497 498
498 addView(mMonthView); 499 addView(mMonthView);
499 // mMonthView->show(); 500 // mMonthView->show();
500 // SIGNALS/SLOTS FOR MONTH VIEW 501 // SIGNALS/SLOTS FOR MONTH VIEW
501 connect(mMonthView, SIGNAL(newEventSignal(QDateTime)), 502 connect(mMonthView, SIGNAL(newEventSignal(QDateTime)),
502 mMainView, SLOT(newEvent(QDateTime))); 503 mMainView, SLOT(newEvent(QDateTime)));
503 504
504 connect(mMonthView, SIGNAL(showIncidenceSignal(Incidence *)), 505 connect(mMonthView, SIGNAL(showIncidenceSignal(Incidence *)),
505 mMainView, SLOT(showIncidence(Incidence *))); 506 mMainView, SLOT(showIncidence(Incidence *)));
506 connect(mMonthView, SIGNAL(editIncidenceSignal(Incidence *)), 507 connect(mMonthView, SIGNAL(editIncidenceSignal(Incidence *)),