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 | |||
@@ -78,16 +78,22 @@ void DateNavigator::selectMonthByDate( const QDate & firstSelected ) | |||
78 | 78 | ||
79 | } | 79 | } |
80 | void DateNavigator::selectMonth() | 80 | void DateNavigator::selectMonth() |
81 | { | 81 | { |
82 | 82 | ||
83 | QDate date =mSelectedDates.first(); | 83 | QDate date =mSelectedDates.first(); |
84 | selectMonthByDate( date ); | 84 | selectMonthByDate( date ); |
85 | } | 85 | } |
86 | void DateNavigator::selectMonthFromMonthview() | ||
87 | { | ||
88 | |||
89 | QDate date =mSelectedDates.first().addDays( 7 ); | ||
90 | selectMonthByDate( date ); | ||
91 | } | ||
86 | 92 | ||
87 | DateList DateNavigator::selectedDates() | 93 | DateList DateNavigator::selectedDates() |
88 | { | 94 | { |
89 | return mSelectedDates; | 95 | return mSelectedDates; |
90 | } | 96 | } |
91 | 97 | ||
92 | int DateNavigator::datesCount() const | 98 | int DateNavigator::datesCount() const |
93 | { | 99 | { |
@@ -253,16 +259,25 @@ void DateNavigator::selectNextMonth() | |||
253 | firstSelected = KOGlobals::self()->calendarSystem()->addMonths( firstSelected, 1 ); | 259 | firstSelected = KOGlobals::self()->calendarSystem()->addMonths( firstSelected, 1 ); |
254 | 260 | ||
255 | if ( mSelectedDates.first().day() == 1 && mSelectedDates.count() > 27 ) | 261 | if ( mSelectedDates.first().day() == 1 && mSelectedDates.count() > 27 ) |
256 | selectMonthByDate( firstSelected ); | 262 | selectMonthByDate( firstSelected ); |
257 | else | 263 | else |
258 | selectWeekByDay( weekDay, firstSelected ); | 264 | selectWeekByDay( weekDay, firstSelected ); |
259 | 265 | ||
260 | } | 266 | } |
267 | void DateNavigator::selectPreviousWeek() | ||
268 | { | ||
269 | selectDates( mSelectedDates.first().addDays( -7 ), datesCount() ); | ||
270 | } | ||
271 | |||
272 | void DateNavigator::selectNextWeek() | ||
273 | { | ||
274 | selectDates( mSelectedDates.first().addDays( 7 ), datesCount() ); | ||
275 | } | ||
261 | 276 | ||
262 | void DateNavigator::selectNextYear() | 277 | void DateNavigator::selectNextYear() |
263 | { | 278 | { |
264 | QDate firstSelected = mSelectedDates.first(); | 279 | QDate firstSelected = mSelectedDates.first(); |
265 | int weekDay = firstSelected.dayOfWeek(); | 280 | int weekDay = firstSelected.dayOfWeek(); |
266 | firstSelected = KOGlobals::self()->calendarSystem()->addYears( firstSelected, 1 ); | 281 | firstSelected = KOGlobals::self()->calendarSystem()->addYears( firstSelected, 1 ); |
267 | 282 | ||
268 | selectWeekByDay( weekDay, firstSelected ); | 283 | selectWeekByDay( weekDay, firstSelected ); |