summaryrefslogtreecommitdiffabout
path: root/korganizer/koviewmanager.cpp
Side-by-side diff
Diffstat (limited to 'korganizer/koviewmanager.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koviewmanager.cpp41
1 files changed, 21 insertions, 20 deletions
diff --git a/korganizer/koviewmanager.cpp b/korganizer/koviewmanager.cpp
index ba15f7f..b551e2a 100644
--- a/korganizer/koviewmanager.cpp
+++ b/korganizer/koviewmanager.cpp
@@ -198,13 +198,13 @@ void KOViewManager::showView(KOrg::BaseView *view, bool fullScreen )
if(view == mCurrentView && view != mWhatsNextView ) {
if ( mCurrentAgendaView < 0 )
return;
full = mMainView->leftFrame()->isVisible();
} else {
if ( view == mMonthView && mMonthView)
- mMonthView->skipResize = true ;
+ ;//mMonthView->skipResize = true ;
mCurrentView = view;
// bool full = fullScreen;
bool isFull = !mMainView->leftFrame()->isVisible();
if ( isFull && KOPrefs::instance()->mViewChangeHoldFullscreen )
full = true;
if ( !isFull && KOPrefs::instance()->mViewChangeHoldNonFullscreen )
@@ -218,31 +218,16 @@ void KOViewManager::showView(KOrg::BaseView *view, bool fullScreen )
mMainView->adaptNavigationUnits();
}
void KOViewManager::raiseCurrentView( bool fullScreen, bool callUpdateView )
{
mCurrentAgendaView = 0;
- int wid = mMainView->width() ;
- int hei = mMainView->height();
- if ( mCurrentView == mMonthView ) {
- if ( true /* !KOPrefs::instance()->mMonthViewWeek*/ ) {
- mMainView->navigatorBar()->show();
- hei -= mMainView->navigatorBar()->sizeHint().height();
- }
- //mMainView->navigatorBar()->hide();
- } else {
- mMainView->navigatorBar()->hide();
- }
if ( fullScreen ) {
mMainView->leftFrame()->hide();
} else {
mMainView->leftFrame()->show();
- if ( KOPrefs::instance()->mVerticalScreen )
- hei -= mMainView->leftFrame()->height();
- else
- wid -= mMainView->leftFrame()->width();
}
emit signalFullScreen( !fullScreen );
if ( callUpdateView )
mMainView->updateView();
if ( globalFlagBlockAgenda == 5 ) {
@@ -524,17 +509,33 @@ void KOViewManager::showMonthView()
connect( mMonthView, SIGNAL( selectWeekNum( int ) ),
mMainView->dateNavigator(), SLOT ( selectWeek( int ) ) );
connect( mMonthView, SIGNAL( showDaySignal( QDate ) ),
mMainView, SLOT ( showDay( QDate ) ) );
connect(mMainView, SIGNAL(configChanged()), mMonthView, SLOT(updateConfig()));
connect( mMonthView, SIGNAL(nextMonth() ),
- mMainView->navigatorBar(), SIGNAL(goNextMonth() ) );
+ mMonthView->navigatorBar(), SIGNAL(goNextMonth() ) );
connect( mMonthView, SIGNAL(prevMonth() ),
- mMainView->navigatorBar(), SIGNAL(goPrevMonth() ) );
- connect( mMonthView, SIGNAL( showNavigator(bool) ),
- mMainView, SLOT ( showNavigatorBar(bool) ) );
+ mMonthView->navigatorBar(), SIGNAL(goPrevMonth() ) );
+ connect( mMonthView->navigatorBar(), SIGNAL( goPrevYear() ),
+ mMainView->dateNavigator(), SLOT( selectPreviousYear() ) );
+ connect( mMonthView->navigatorBar(), SIGNAL( goNextYear() ),
+ mMainView->dateNavigator(), SLOT( selectNextYear() ) );
+ connect( mMonthView->navigatorBar(), SIGNAL( goPrevMonth() ),
+ mMainView->dateNavigator(), SLOT( selectPreviousMonth() ) );
+ connect( mMonthView->navigatorBar(), SIGNAL( goNextMonth() ),
+ mMainView->dateNavigator(), SLOT( selectNextMonth() ) );
+ connect( mMonthView->navigatorBar(), SIGNAL( selectWeek( int ) ),
+ mMainView->dateNavigator(), SLOT( selectWeek( int ) ) );
+
+ connect( mMainView->dateNavigator(), SIGNAL( datesSelected( const KCal::DateList & ) ),
+ mMonthView->navigatorBar(), SLOT( selectDates( const KCal::DateList & ) ) );
+
+
+ connect( mMonthView->navigatorBar(), SIGNAL( monthSelected ( int ) ),
+ mMainView->dateNavigator(), SLOT( slotMonthSelect( int ) ) );
+
}
globalFlagBlockAgenda = 1;
//mFlagShowNextxDays = false;
// if(mMonthView == mCurrentView) return;
if ( KOPrefs::instance()->mMonthViewWeek )