author | zautrix <zautrix> | 2005-03-22 21:37:48 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-03-22 21:37:48 (UTC) |
commit | 53ac6d1f931c50d89a44d9d46daceb7ed9d4ddc6 (patch) (side-by-side diff) | |
tree | a6a9f1e42252edec30b334d2ae6df245d69912b2 | |
parent | cce0a3b5e884db3d2d7d84a347e14f8694b556e2 (diff) | |
download | kdepimpi-53ac6d1f931c50d89a44d9d46daceb7ed9d4ddc6.zip kdepimpi-53ac6d1f931c50d89a44d9d46daceb7ed9d4ddc6.tar.gz kdepimpi-53ac6d1f931c50d89a44d9d46daceb7ed9d4ddc6.tar.bz2 |
fix
-rw-r--r-- | korganizer/kdatenavigator.cpp | 16 | ||||
-rw-r--r-- | korganizer/koviewmanager.cpp | 5 |
2 files changed, 20 insertions, 1 deletions
diff --git a/korganizer/kdatenavigator.cpp b/korganizer/kdatenavigator.cpp index 83a57ca..1474e4b 100644 --- a/korganizer/kdatenavigator.cpp +++ b/korganizer/kdatenavigator.cpp @@ -80,12 +80,13 @@ KDateNavigator::KDateNavigator( QWidget *parent, const char *name ) // Set up the heading fields. for( i = 0; i < 7; i++ ) { headings[i] = new QLabel("",this); //headings[i]->setFont(QFont("Arial", 10, QFont::Bold)); headings[i]->setAlignment(AlignCenter); + headings[i]->installEventFilter(this); topLayout->addWidget(headings[i],1,i+1); } // Create the weeknumber labels for( i = 0; i < 6; i++ ) { @@ -436,12 +437,27 @@ bool KDateNavigator::eventFilter (QObject *o,QEvent *e) if (o == weeknos[i]) { QDate weekstart = daymatrix->getDate(i*7); emit weekClicked(weekstart); break; } } + for(i=0;i<7;++i) { + if (o == headings[i]) { + KCal::DateList selDays; + QDate date = daymatrix->getDate(14); + int dio = date.daysInMonth(); + int j; + int ye = date.year(); + int mo = date.month(); + for ( j = 1; j <= dio; ++j ) { + selDays.append( QDate( ye, mo, j ) ); + } + emit datesSelected( selDays ); + break; + } + } return true; } else { return false; } } diff --git a/korganizer/koviewmanager.cpp b/korganizer/koviewmanager.cpp index a9f5a41..cc0ce9b 100644 --- a/korganizer/koviewmanager.cpp +++ b/korganizer/koviewmanager.cpp @@ -417,13 +417,14 @@ void KOViewManager::showAgendaView( bool fullScreen ) showView( mAgendaView, full); } void KOViewManager::showDayView() -{ +{ + mCurrentAgendaView = mMainView->dateNavigator()->selectedDates().count(); mFlagShowNextxDays = false; globalFlagBlockLabel = 1; globalFlagBlockAgenda = 1; if ( mCurrentAgendaView != 1 ) mCurrentAgendaView = -1; showAgendaView(); @@ -434,12 +435,13 @@ void KOViewManager::showDayView() mCurrentAgendaView = 1 ; } void KOViewManager::showWorkWeekView() { + mCurrentAgendaView = mMainView->dateNavigator()->selectedDates().count(); mFlagShowNextxDays = false; globalFlagBlockAgenda = 1; globalFlagBlockLabel = 1; if ( mCurrentAgendaView != 5 ) mCurrentAgendaView = -1; showAgendaView(); @@ -459,12 +461,13 @@ void KOViewManager::showWeekView() //globalFlagBlockPainting = true; mMainView->dateNavigator()->selectWeek(); showAgendaView(); */ + mCurrentAgendaView = mMainView->dateNavigator()->selectedDates().count(); mFlagShowNextxDays = false; globalFlagBlockAgenda = 1; globalFlagBlockLabel = 1; if ( mCurrentAgendaView != 7 ) mCurrentAgendaView = -1; showAgendaView(); |