From cc29364f06178f8f6b457384f2ec37a042bd9d43 Mon Sep 17 00:00:00 2001 From: tpearson Date: Wed, 1 Sep 2010 00:37:02 +0000 Subject: * Massive set of changes to bring in all fixes and enhancements from the Enterprise PIM branch * Ensured that the Trinity changes were applied on top of those enhancements, and any redundancy removed * Added journal read support to the CalDAV resource * Fixed CalDAV resource to use events URL for tasks and journals when separate URL checkbox unchecked git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1170461 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- korganizer/datenavigator.h | 47 ++++++++++++++++++++++++++++++++++------------ 1 file changed, 35 insertions(+), 12 deletions(-) (limited to 'korganizer/datenavigator.h') diff --git a/korganizer/datenavigator.h b/korganizer/datenavigator.h index d91bad318..ddb6cf2c8 100644 --- a/korganizer/datenavigator.h +++ b/korganizer/datenavigator.h @@ -49,38 +49,61 @@ class DateNavigator : public QObject void selectDate( const TQDate & ); void selectDates( int count ); - void selectDates( const TQDate &, int count ); + void selectDates( const TQDate &, int count, const TQDate &preferredMonth = TQDate() ); void selectWeek(); - void selectWeek( const TQDate & ); + void selectWeek( const TQDate &, const TQDate &preferredMonth = TQDate() ); void selectWorkWeek(); void selectWorkWeek( const TQDate & ); - void selectWeekByDay( int weekDay, const TQDate & ); - + void selectWeekByDay( int weekDay, const TQDate &, const TQDate &preferredMonth = TQDate() ); + void selectToday(); - + void selectPreviousYear(); - void selectPreviousMonth(); + void selectPreviousMonth( const TQDate ¤tMonth = TQDate(), + const TQDate &selectionLowerLimit = TQDate(), + const TQDate &selectionUpperLimit = TQDate() ); void selectPreviousWeek(); void selectNextWeek(); - void selectNextMonth(); + void selectNextMonth( const TQDate ¤tMonth = TQDate(), + const TQDate &selectionLowerLimit = TQDate(), + const TQDate &selectionUpperLimit = TQDate() ); void selectNextYear(); - + void selectPrevious(); void selectNext(); - void selectMonth(int month); - + void selectMonth( int month ); + void selectYear( int year ); + signals: - void datesSelected( const KCal::DateList & ); + /* preferredMonth is useful when the datelist crosses months, + if valid, any month-like component should honour it + */ + void datesSelected( const KCal::DateList &, const TQDate &preferredMonth ); protected: - void emitSelected(); + void emitSelected( const TQDate &preferredMonth = TQDate() ); private: + + /* + Selects next month if offset equals 1, or previous month + if offset equals -1. + Bigger offsets are accepted. + */ + void shiftMonth( const TQDate &date, + const TQDate &selectionLowerLimit, + const TQDate &selectionUpperLimit, + int offset ); + KCal::DateList mSelectedDates; + + enum { + MAX_SELECTABLE_DAYS = 50 + }; }; #endif -- cgit v1.2.1