Diffstat (limited to 'korganizer/datenavigator.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | korganizer/datenavigator.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/korganizer/datenavigator.cpp b/korganizer/datenavigator.cpp index 8b7c993..b0eac51 100644 --- a/korganizer/datenavigator.cpp +++ b/korganizer/datenavigator.cpp @@ -74,24 +74,30 @@ void DateNavigator::selectMonthByDate( const QDate & firstSelected ) int monthDay = firstSelected.day(); QDate date = firstSelected.addDays( 1-monthDay ); selectDates( date , date.daysInMonth ()); } void DateNavigator::selectMonth() { QDate date =mSelectedDates.first(); selectMonthByDate( date ); } +void DateNavigator::selectMonthFromMonthview() +{ + + QDate date =mSelectedDates.first().addDays( 7 ); + selectMonthByDate( date ); +} DateList DateNavigator::selectedDates() { return mSelectedDates; } int DateNavigator::datesCount() const { return mSelectedDates.count(); } void DateNavigator::selectDates( const DateList& dateList ) @@ -249,24 +255,33 @@ void DateNavigator::selectNextMonth() { QDate firstSelected = mSelectedDates.first(); int weekDay = firstSelected.dayOfWeek(); firstSelected = KOGlobals::self()->calendarSystem()->addMonths( firstSelected, 1 ); if ( mSelectedDates.first().day() == 1 && mSelectedDates.count() > 27 ) selectMonthByDate( firstSelected ); else selectWeekByDay( weekDay, firstSelected ); } +void DateNavigator::selectPreviousWeek() +{ + selectDates( mSelectedDates.first().addDays( -7 ), datesCount() ); +} + +void DateNavigator::selectNextWeek() +{ + selectDates( mSelectedDates.first().addDays( 7 ), datesCount() ); +} void DateNavigator::selectNextYear() { QDate firstSelected = mSelectedDates.first(); int weekDay = firstSelected.dayOfWeek(); firstSelected = KOGlobals::self()->calendarSystem()->addYears( firstSelected, 1 ); selectWeekByDay( weekDay, firstSelected ); } void DateNavigator::selectPrevious() { |