From 6427570041c902840fe0f557415a07bb7aa8c031 Mon Sep 17 00:00:00 2001 From: zautrix Date: Fri, 25 Mar 2005 21:08:48 +0000 Subject: fix --- (limited to 'korganizer') diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index 6ed6a1c..92fd59c 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp @@ -370,6 +370,10 @@ void CalendarView::init() mDateNavigator, SLOT( selectDates( const KCal::DateList & ) ) ); + + connect( mDateNavigator, SIGNAL( showMonth( const QDate & ) ), + mViewManager, SLOT( showMonth( const QDate & ) ) ); + connect( mDateNavigator, SIGNAL( weekClicked( const QDate & ) ), mNavigator, SLOT( selectWeek( const QDate & ) ) ); diff --git a/korganizer/datenavigatorcontainer.cpp b/korganizer/datenavigatorcontainer.cpp index 11dc592..edeebdf 100644 --- a/korganizer/datenavigatorcontainer.cpp +++ b/korganizer/datenavigatorcontainer.cpp @@ -71,6 +71,8 @@ void DateNavigatorContainer::connectNavigatorView( KDateNavigator *v ) #endif connect( v, SIGNAL( weekClicked( const QDate & ) ), SIGNAL( weekClicked( const QDate & ) ) ); + connect( v, SIGNAL( showMonth( const QDate & ) ), + SIGNAL( showMonth( const QDate & ) ) ); connect( v, SIGNAL( goPrevious() ), SIGNAL( goPrevious() ) ); connect( v, SIGNAL( goNext() ), SIGNAL( goNext() ) ); diff --git a/korganizer/datenavigatorcontainer.h b/korganizer/datenavigatorcontainer.h index ac9745d..87cc59f 100644 --- a/korganizer/datenavigatorcontainer.h +++ b/korganizer/datenavigatorcontainer.h @@ -78,6 +78,7 @@ class DateNavigatorContainer: public QWidget void goPrevMonth(); void goNextYear(); void goPrevYear(); + void showMonth( const QDate & ); void monthSelected( int month ); diff --git a/korganizer/kdatenavigator.cpp b/korganizer/kdatenavigator.cpp index 5eccfd6..38bddc2 100644 --- a/korganizer/kdatenavigator.cpp +++ b/korganizer/kdatenavigator.cpp @@ -447,6 +447,8 @@ bool KDateNavigator::eventFilter (QObject *o,QEvent *e) if (o == headings[i]) { KCal::DateList selDays; QDate date = daymatrix->getDate(14); + emit showMonth(date ); +#if 0 int dio = date.daysInMonth(); int j; int ye = date.year(); @@ -455,6 +457,7 @@ bool KDateNavigator::eventFilter (QObject *o,QEvent *e) selDays.append( QDate( ye, mo, j ) ); } emit datesSelected( selDays ); +#endif break; } } diff --git a/korganizer/kdatenavigator.h b/korganizer/kdatenavigator.h index 93bbceb..780ebb8 100644 --- a/korganizer/kdatenavigator.h +++ b/korganizer/kdatenavigator.h @@ -86,6 +86,7 @@ class KDateNavigator: public QFrame void datesSelected( const KCal::DateList & ); void eventDropped( Event * ); void weekClicked( const QDate &); + void showMonth( const QDate & ); void goPrevious(); void goNext(); diff --git a/korganizer/koviewmanager.cpp b/korganizer/koviewmanager.cpp index c6e76c4..5a2dce3 100644 --- a/korganizer/koviewmanager.cpp +++ b/korganizer/koviewmanager.cpp @@ -128,8 +128,9 @@ void KOViewManager::showDateView( int view, QDate date) lastDate = mMainView->dateNavigator()->selectedDates().first(); lastCount = mMainView->dateNavigator()->selectedDates().count(); lastNDMode = savemFlagShowNextxDays; - mMainView->showDay( date ); + mMainView->dateNavigator()->selectDate( date ); lastMode = 1; + mCurrentAgendaView = 1 ; } else if (view == 4 ) { mCurrentAgendaView = 7 ; mMainView->dateNavigator()->selectDates( date, 7 ); @@ -577,6 +578,13 @@ void KOViewManager::showMonthViewWeek() showView(mMonthView, full ); } +void KOViewManager::showMonth( const QDate & date ) +{ + mMainView->dateNavigator()->blockSignals( true ); + mMainView->dateNavigator()->selectDate( date ); + mMainView->dateNavigator()->blockSignals( false ); + showMonthView(); +} void KOViewManager::showMonthView() { diff --git a/korganizer/koviewmanager.h b/korganizer/koviewmanager.h index 8f0bf82..6290227 100644 --- a/korganizer/koviewmanager.h +++ b/korganizer/koviewmanager.h @@ -81,7 +81,8 @@ class KOViewManager : public QObject void printWNV(); void signalFullScreen( bool ); void signalAgendaView( bool ); - public slots: + public slots: + void showMonth( const QDate & ); void showDateView( int, QDate ); void updateView(); void showWhatsNextView(); -- cgit v0.9.0.2