-rw-r--r-- | korganizer/kdatenavigator.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/korganizer/kdatenavigator.h b/korganizer/kdatenavigator.h index 3177687..d1f32b6 100644 --- a/korganizer/kdatenavigator.h +++ b/korganizer/kdatenavigator.h | |||
@@ -25,96 +25,97 @@ | |||
25 | 25 | ||
26 | #include <qframe.h> | 26 | #include <qframe.h> |
27 | #include <qdatetime.h> | 27 | #include <qdatetime.h> |
28 | #include <qlabel.h> | 28 | #include <qlabel.h> |
29 | 29 | ||
30 | #include <libkcal/calendar.h> | 30 | #include <libkcal/calendar.h> |
31 | 31 | ||
32 | #include "kodaymatrix.h" | 32 | #include "kodaymatrix.h" |
33 | 33 | ||
34 | class QPushButton; | 34 | class QPushButton; |
35 | class QTimer; | 35 | class QTimer; |
36 | 36 | ||
37 | class KCalendarSystem; | 37 | class KCalendarSystem; |
38 | 38 | ||
39 | class NavigatorBar; | 39 | class NavigatorBar; |
40 | 40 | ||
41 | class KDateNavigator: public QFrame | 41 | class KDateNavigator: public QFrame |
42 | { | 42 | { |
43 | Q_OBJECT | 43 | Q_OBJECT |
44 | public: | 44 | public: |
45 | KDateNavigator( QWidget *parent = 0,const char *name = 0 ); | 45 | KDateNavigator( QWidget *parent = 0,const char *name = 0 ); |
46 | ~KDateNavigator(); | 46 | ~KDateNavigator(); |
47 | 47 | ||
48 | /** The DateNavigator automatically checks for | 48 | /** The DateNavigator automatically checks for |
49 | * the passage of midnight. If rollover type is | 49 | * the passage of midnight. If rollover type is |
50 | * set to None, no signals are emitted and no | 50 | * set to None, no signals are emitted and no |
51 | * processing is done. With rollover set to | 51 | * processing is done. With rollover set to |
52 | * FollowDay, the day highlighter changes at | 52 | * FollowDay, the day highlighter changes at |
53 | * midnight and dayPassed() is emitted. | 53 | * midnight and dayPassed() is emitted. |
54 | * With FollowMonth, it has the same effect | 54 | * With FollowMonth, it has the same effect |
55 | * as FollowDay but also adjusts the month that is | 55 | * as FollowDay but also adjusts the month that is |
56 | * visible and emits monthPassed() when the month changes. | 56 | * visible and emits monthPassed() when the month changes. |
57 | */ | 57 | */ |
58 | enum RolloverType { None, FollowDay, FollowMonth } ; | 58 | enum RolloverType { None, FollowDay, FollowMonth } ; |
59 | void enableRollover( RolloverType ); | 59 | void enableRollover( RolloverType ); |
60 | 60 | ||
61 | void setShowWeekNums( bool enabled ); | 61 | void setShowWeekNums( bool enabled ); |
62 | void setCalendar( Calendar * ); | 62 | void setCalendar( Calendar * ); |
63 | void setBaseDate( const QDate & , bool doRepaint = true ); | 63 | void setBaseDate( const QDate & , bool doRepaint = true ); |
64 | KCal::DateList selectedDates() const { return mSelectedDates; } | 64 | KCal::DateList selectedDates() const { return mSelectedDates; } |
65 | NavigatorBar *navigatorBar() const { return mNavigatorBar; } | 65 | NavigatorBar *navigatorBar() const { return mNavigatorBar; } |
66 | void setMonthSignalOffset ( int off ) { mMonthSignalOffset = off;} | 66 | void setMonthSignalOffset ( int off ) { mMonthSignalOffset = off;} |
67 | QSize yourSizeHint() { return mySizeHint; } | 67 | QSize yourSizeHint() { return mySizeHint; } |
68 | QFont yourFontHint( QSize , bool * b); | 68 | QFont yourFontHint( QSize , bool * b); |
69 | bool fontChanged() {return mFontChanged; } | 69 | bool fontChanged() {return mFontChanged; } |
70 | void unsetFontChanged() { mFontChanged = false; } | 70 | void unsetFontChanged() { mFontChanged = false; } |
71 | KODayMatrix *dayMatrix() { return daymatrix ;} | 71 | KODayMatrix *dayMatrix() { return daymatrix ;} |
72 | QSize sizeHint() const; | 72 | QSize sizeHint() const; |
73 | QSize sizeHintTwoButtons() const; | ||
73 | void changeFont ( QFont fo ); | 74 | void changeFont ( QFont fo ); |
74 | public slots: | 75 | public slots: |
75 | void selectDates( const KCal::DateList & ); | 76 | void selectDates( const KCal::DateList & ); |
76 | void updateView(); | 77 | void updateView(); |
77 | void updateConfig(); | 78 | void updateConfig(); |
78 | void updateDayMatrix(); | 79 | void updateDayMatrix(); |
79 | 80 | ||
80 | signals: | 81 | signals: |
81 | void datesSelected( const KCal::DateList & ); | 82 | void datesSelected( const KCal::DateList & ); |
82 | void eventDropped( Event * ); | 83 | void eventDropped( Event * ); |
83 | void weekClicked( const QDate &); | 84 | void weekClicked( const QDate &); |
84 | 85 | ||
85 | void goPrevious(); | 86 | void goPrevious(); |
86 | void goNext(); | 87 | void goNext(); |
87 | 88 | ||
88 | void goNextMonth(); | 89 | void goNextMonth(); |
89 | void goPrevMonth(); | 90 | void goPrevMonth(); |
90 | void goNextYear(); | 91 | void goNextYear(); |
91 | void goPrevYear(); | 92 | void goPrevYear(); |
92 | void monthSelected( int ); | 93 | void monthSelected( int ); |
93 | 94 | ||
94 | // Signals emitted at midnight carrying the new date. | 95 | // Signals emitted at midnight carrying the new date. |
95 | void dayPassed( QDate ); | 96 | void dayPassed( QDate ); |
96 | void monthPassed( QDate ); | 97 | void monthPassed( QDate ); |
97 | 98 | ||
98 | protected slots: | 99 | protected slots: |
99 | 100 | ||
100 | /** | 101 | /** |
101 | * Called regularly to see if we need to update the view | 102 | * Called regularly to see if we need to update the view |
102 | * wrt. the today box and the month box. Only important | 103 | * wrt. the today box and the month box. Only important |
103 | * if you leave KOrganizer idle for long periods of time. | 104 | * if you leave KOrganizer idle for long periods of time. |
104 | * | 105 | * |
105 | * Until we have a reliable way of setting QTimers to go | 106 | * Until we have a reliable way of setting QTimers to go |
106 | * off at a particular wall-clock time, we need this, | 107 | * off at a particular wall-clock time, we need this, |
107 | * which calls passedMidnight() at the right moments. | 108 | * which calls passedMidnight() at the right moments. |
108 | */ | 109 | */ |
109 | void possiblyPastMidnight(); | 110 | void possiblyPastMidnight(); |
110 | 111 | ||
111 | /** handles updating the view when midnight has come by due to idle time. | 112 | /** handles updating the view when midnight has come by due to idle time. |
112 | * | 113 | * |
113 | */ | 114 | */ |
114 | void passedMidnight(); | 115 | void passedMidnight(); |
115 | void slotMonthSelected( int m ); | 116 | void slotMonthSelected( int m ); |
116 | protected: | 117 | protected: |
117 | void updateDates(); | 118 | void updateDates(); |
118 | 119 | ||
119 | void wheelEvent (QWheelEvent *); | 120 | void wheelEvent (QWheelEvent *); |
120 | 121 | ||