summaryrefslogtreecommitdiffabout
path: root/korganizer/kdatenavigator.h
Unidiff
Diffstat (limited to 'korganizer/kdatenavigator.h') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/kdatenavigator.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/korganizer/kdatenavigator.h b/korganizer/kdatenavigator.h
index 292e71c..3177687 100644
--- a/korganizer/kdatenavigator.h
+++ b/korganizer/kdatenavigator.h
@@ -44,49 +44,54 @@ class KDateNavigator: public QFrame
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);
69 bool fontChanged() {return mFontChanged; }
70 void unsetFontChanged() { mFontChanged = false; }
68 KODayMatrix *dayMatrix() { return daymatrix ;} 71 KODayMatrix *dayMatrix() { return daymatrix ;}
72 QSize sizeHint() const;
73 void changeFont ( QFont fo );
69 public slots: 74 public slots:
70 void selectDates( const KCal::DateList & ); 75 void selectDates( const KCal::DateList & );
71 void updateView(); 76 void updateView();
72 void updateConfig(); 77 void updateConfig();
73 void updateDayMatrix(); 78 void updateDayMatrix();
74 79
75 signals: 80 signals:
76 void datesSelected( const KCal::DateList & ); 81 void datesSelected( const KCal::DateList & );
77 void eventDropped( Event * ); 82 void eventDropped( Event * );
78 void weekClicked( const QDate &); 83 void weekClicked( const QDate &);
79 84
80 void goPrevious(); 85 void goPrevious();
81 void goNext(); 86 void goNext();
82 87
83 void goNextMonth(); 88 void goNextMonth();
84 void goPrevMonth(); 89 void goPrevMonth();
85 void goNextYear(); 90 void goNextYear();
86 void goPrevYear(); 91 void goPrevYear();
87 void monthSelected( int ); 92 void monthSelected( int );
88 93
89 // Signals emitted at midnight carrying the new date. 94 // Signals emitted at midnight carrying the new date.
90 void dayPassed( QDate ); 95 void dayPassed( QDate );
91 void monthPassed( QDate ); 96 void monthPassed( QDate );
92 97
@@ -96,48 +101,49 @@ class KDateNavigator: public QFrame
96 * Called regularly to see if we need to update the view 101 * Called regularly to see if we need to update the view
97 * wrt. the today box and the month box. Only important 102 * wrt. the today box and the month box. Only important
98 * if you leave KOrganizer idle for long periods of time. 103 * if you leave KOrganizer idle for long periods of time.
99 * 104 *
100 * Until we have a reliable way of setting QTimers to go 105 * Until we have a reliable way of setting QTimers to go
101 * off at a particular wall-clock time, we need this, 106 * off at a particular wall-clock time, we need this,
102 * which calls passedMidnight() at the right moments. 107 * which calls passedMidnight() at the right moments.
103 */ 108 */
104 void possiblyPastMidnight(); 109 void possiblyPastMidnight();
105 110
106 /** handles updating the view when midnight has come by due to idle time. 111 /** handles updating the view when midnight has come by due to idle time.
107 * 112 *
108 */ 113 */
109 void passedMidnight(); 114 void passedMidnight();
110 void slotMonthSelected( int m ); 115 void slotMonthSelected( int m );
111 protected: 116 protected:
112 void updateDates(); 117 void updateDates();
113 118
114 void wheelEvent (QWheelEvent *); 119 void wheelEvent (QWheelEvent *);
115 120
116 bool eventFilter (QObject *,QEvent *); 121 bool eventFilter (QObject *,QEvent *);
117 122
118 private: 123 private:
119 QSize mySizeHint; 124 QSize mySizeHint;
125 bool mFontChanged;
120 int mMonthSignalOffset; 126 int mMonthSignalOffset;
121 NavigatorBar *mNavigatorBar; 127 NavigatorBar *mNavigatorBar;
122 128
123 QFrame *headingSep; 129 QFrame *headingSep;
124 QFrame *weeknumSep; 130 QFrame *weeknumSep;
125 QLabel *headings[7]; 131 QLabel *headings[7];
126 QLabel *weeknos[7]; 132 QLabel *weeknos[7];
127 KODayMatrix *daymatrix; 133 KODayMatrix *daymatrix;
128 134
129 KCal::DateList mSelectedDates; 135 KCal::DateList mSelectedDates;
130 QDate m_MthYr; 136 QDate m_MthYr;
131 int m_fstDayOfWk; 137 int m_fstDayOfWk;
132 bool m_bShowWeekNums; 138 bool m_bShowWeekNums;
133 139
134 int dayNum(int row, int col); 140 int dayNum(int row, int col);
135 int dayToIndex(int dayNum); 141 int dayToIndex(int dayNum);
136 142
137 Calendar *mCalendar; 143 Calendar *mCalendar;
138 KCalendarSystem *mCalendarSystem; 144 KCalendarSystem *mCalendarSystem;
139 145
140 const QString *curHeaders; 146 const QString *curHeaders;
141 147
142 /** used to update the day view periodically, in particular every 148 /** used to update the day view periodically, in particular every
143 * midnight to move the "today" rectangle. 149 * midnight to move the "today" rectangle.