-rw-r--r-- | korganizer/kodaymatrix.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/korganizer/kodaymatrix.h b/korganizer/kodaymatrix.h index c049942..39946de 100644 --- a/korganizer/kodaymatrix.h +++ b/korganizer/kodaymatrix.h | |||
@@ -125,96 +125,97 @@ public: | |||
125 | ~KODayMatrix(); | 125 | ~KODayMatrix(); |
126 | 126 | ||
127 | /** updates the day matrix to start with the given date. Does all the necessary | 127 | /** updates the day matrix to start with the given date. Does all the necessary |
128 | * checks for holidays or events on a day and stores them for display later on. | 128 | * checks for holidays or events on a day and stores them for display later on. |
129 | * Does NOT update the view visually. Call repaint() for this. | 129 | * Does NOT update the view visually. Call repaint() for this. |
130 | * | 130 | * |
131 | * @param actdate recalculates the day matrix to show NUMDAYS starting from this | 131 | * @param actdate recalculates the day matrix to show NUMDAYS starting from this |
132 | * date. | 132 | * date. |
133 | */ | 133 | */ |
134 | void updateView(QDate actdate); | 134 | void updateView(QDate actdate); |
135 | void updateEvents(); | 135 | void updateEvents(); |
136 | 136 | ||
137 | /** returns the QDate object associated with day indexed by the | 137 | /** returns the QDate object associated with day indexed by the |
138 | * supplied offset. | 138 | * supplied offset. |
139 | */ | 139 | */ |
140 | const QDate& getDate(int offset); | 140 | const QDate& getDate(int offset); |
141 | void setCalendar( Calendar * ); | 141 | void setCalendar( Calendar * ); |
142 | /** returns the official name of this holy day or 0 if there is no label | 142 | /** returns the official name of this holy day or 0 if there is no label |
143 | * for this day. | 143 | * for this day. |
144 | */ | 144 | */ |
145 | QString getHolidayLabel(int offset); | 145 | QString getHolidayLabel(int offset); |
146 | 146 | ||
147 | /** adds all actual selected days from mSelStart to mSelEnd to the supplied | 147 | /** adds all actual selected days from mSelStart to mSelEnd to the supplied |
148 | * DateList. | 148 | * DateList. |
149 | */ | 149 | */ |
150 | void addSelectedDaysTo(DateList&); | 150 | void addSelectedDaysTo(DateList&); |
151 | 151 | ||
152 | /** sets the actual to be displayed selection in the day matrix starting from | 152 | /** sets the actual to be displayed selection in the day matrix starting from |
153 | * start and ending with end. Theview must be manually updated by calling | 153 | * start and ending with end. Theview must be manually updated by calling |
154 | * repaint. (?) | 154 | * repaint. (?) |
155 | */ | 155 | */ |
156 | void setSelectedDaysFrom(const QDate& start, const QDate& end); | 156 | void setSelectedDaysFrom(const QDate& start, const QDate& end); |
157 | void clearSelection(); | 157 | void clearSelection(); |
158 | 158 | ||
159 | /** Is today visible in the view? Keep this in sync with | 159 | /** Is today visible in the view? Keep this in sync with |
160 | * the values today (below) can take. | 160 | * the values today (below) can take. |
161 | */ | 161 | */ |
162 | bool isTodayVisible() const { return today>=0; } ; | 162 | bool isTodayVisible() const { return today>=0; } ; |
163 | 163 | ||
164 | /** If today is visible, then we can find out if today is | 164 | /** If today is visible, then we can find out if today is |
165 | * near the beginning or the end of the month. | 165 | * near the beginning or the end of the month. |
166 | * This is dependent on today remaining the index | 166 | * This is dependent on today remaining the index |
167 | * in the array of visible dates and going from | 167 | * in the array of visible dates and going from |
168 | * top left (0) to bottom right (41). | 168 | * top left (0) to bottom right (41). |
169 | */ | 169 | */ |
170 | bool isBeginningOfMonth() const { return today<=8; } ; | 170 | bool isBeginningOfMonth() const { return today<=8; } ; |
171 | bool isEndOfMonth() const { return today>=27; } ; | 171 | bool isEndOfMonth() const { return today>=27; } ; |
172 | QString getWhatsThisText( QPoint ) ; | 172 | QString getWhatsThisText( QPoint ) ; |
173 | QSize sizeHint() const; | ||
173 | 174 | ||
174 | public slots: | 175 | public slots: |
175 | /** Recalculates all the flags of the days in the matrix like holidays or events | 176 | /** Recalculates all the flags of the days in the matrix like holidays or events |
176 | * on a day (Actually calls above method with the actual startdate). | 177 | * on a day (Actually calls above method with the actual startdate). |
177 | */ | 178 | */ |
178 | void updateView(); | 179 | void updateView(); |
179 | void updateViewTimed(); | 180 | void updateViewTimed(); |
180 | void repaintViewTimed(); | 181 | void repaintViewTimed(); |
181 | 182 | ||
182 | /** | 183 | /** |
183 | * Calculate which square in the matrix should be | 184 | * Calculate which square in the matrix should be |
184 | * hilighted to indicate it's today. | 185 | * hilighted to indicate it's today. |
185 | */ | 186 | */ |
186 | void recalculateToday(); | 187 | void recalculateToday(); |
187 | 188 | ||
188 | /* | 189 | /* |
189 | void setStartDate(QDate); | 190 | void setStartDate(QDate); |
190 | */ | 191 | */ |
191 | 192 | ||
192 | signals: | 193 | signals: |
193 | 194 | ||
194 | /** emitted if the user selects a block of days with the mouse by dragging a rectangle | 195 | /** emitted if the user selects a block of days with the mouse by dragging a rectangle |
195 | * inside the matrix | 196 | * inside the matrix |
196 | * | 197 | * |
197 | * @param daylist list of days that have been selected by the user | 198 | * @param daylist list of days that have been selected by the user |
198 | */ | 199 | */ |
199 | void selected( const KCal::DateList &daylist ); | 200 | void selected( const KCal::DateList &daylist ); |
200 | 201 | ||
201 | /** emitted if the user has dropped an event inside the matrix | 202 | /** emitted if the user has dropped an event inside the matrix |
202 | * | 203 | * |
203 | * @param event the dropped calendar event | 204 | * @param event the dropped calendar event |
204 | */ | 205 | */ |
205 | void eventDropped(Event *event); | 206 | void eventDropped(Event *event); |
206 | 207 | ||
207 | protected: | 208 | protected: |
208 | 209 | ||
209 | void paintEvent(QPaintEvent *ev); | 210 | void paintEvent(QPaintEvent *ev); |
210 | 211 | ||
211 | void mousePressEvent (QMouseEvent* e); | 212 | void mousePressEvent (QMouseEvent* e); |
212 | 213 | ||
213 | void mouseReleaseEvent (QMouseEvent* e); | 214 | void mouseReleaseEvent (QMouseEvent* e); |
214 | 215 | ||
215 | void mouseMoveEvent (QMouseEvent* e); | 216 | void mouseMoveEvent (QMouseEvent* e); |
216 | 217 | ||
217 | void dragEnterEvent(QDragEnterEvent *); | 218 | void dragEnterEvent(QDragEnterEvent *); |
218 | 219 | ||
219 | void dragMoveEvent(QDragMoveEvent *); | 220 | void dragMoveEvent(QDragMoveEvent *); |
220 | 221 | ||