summaryrefslogtreecommitdiffabout
path: root/korganizer/kodaymatrix.h
Unidiff
Diffstat (limited to 'korganizer/kodaymatrix.h') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/kodaymatrix.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/korganizer/kodaymatrix.h b/korganizer/kodaymatrix.h
index 0e9640a..ac2f59c 100644
--- a/korganizer/kodaymatrix.h
+++ b/korganizer/kodaymatrix.h
@@ -179,96 +179,97 @@ public slots:
179 * Calculate which square in the matrix should be 179 * Calculate which square in the matrix should be
180 * hilighted to indicate it's today. 180 * hilighted to indicate it's today.
181 */ 181 */
182 void recalculateToday(); 182 void recalculateToday();
183 183
184/* 184/*
185 void setStartDate(QDate); 185 void setStartDate(QDate);
186*/ 186*/
187 187
188signals: 188signals:
189 189
190 /** emitted if the user selects a block of days with the mouse by dragging a rectangle 190 /** emitted if the user selects a block of days with the mouse by dragging a rectangle
191 * inside the matrix 191 * inside the matrix
192 * 192 *
193 * @param daylist list of days that have been selected by the user 193 * @param daylist list of days that have been selected by the user
194 */ 194 */
195 void selected( const KCal::DateList &daylist ); 195 void selected( const KCal::DateList &daylist );
196 196
197 /** emitted if the user has dropped an event inside the matrix 197 /** emitted if the user has dropped an event inside the matrix
198 * 198 *
199 * @param event the dropped calendar event 199 * @param event the dropped calendar event
200 */ 200 */
201 void eventDropped(Event *event); 201 void eventDropped(Event *event);
202 202
203protected: 203protected:
204 204
205 void paintEvent(QPaintEvent *ev); 205 void paintEvent(QPaintEvent *ev);
206 206
207 void mousePressEvent (QMouseEvent* e); 207 void mousePressEvent (QMouseEvent* e);
208 208
209 void mouseReleaseEvent (QMouseEvent* e); 209 void mouseReleaseEvent (QMouseEvent* e);
210 210
211 void mouseMoveEvent (QMouseEvent* e); 211 void mouseMoveEvent (QMouseEvent* e);
212 212
213 void dragEnterEvent(QDragEnterEvent *); 213 void dragEnterEvent(QDragEnterEvent *);
214 214
215 void dragMoveEvent(QDragMoveEvent *); 215 void dragMoveEvent(QDragMoveEvent *);
216 216
217 void dragLeaveEvent(QDragLeaveEvent *); 217 void dragLeaveEvent(QDragLeaveEvent *);
218 218
219 void dropEvent(QDropEvent *); 219 void dropEvent(QDropEvent *);
220 220
221 void resizeEvent(QResizeEvent *); 221 void resizeEvent(QResizeEvent *);
222 222
223private: 223private:
224 QTimer* mUpdateTimer; 224 QTimer* mUpdateTimer;
225 QTimer* mRepaintTimer; 225 QTimer* mRepaintTimer;
226 bool mDayChanged; 226 bool mDayChanged;
227 bool mPendingUpdateBeforeRepaint;
227 228
228 /** returns the index of the day located at the matrix's widget (x,y) position. 229 /** returns the index of the day located at the matrix's widget (x,y) position.
229 * 230 *
230 * @param x horizontal coordinate 231 * @param x horizontal coordinate
231 * @param y vertical coordinate 232 * @param y vertical coordinate
232 */ 233 */
233 int getDayIndexFrom(int x, int y); 234 int getDayIndexFrom(int x, int y);
234 235
235 /** calculates a "shaded" color from the supplied color object. 236 /** calculates a "shaded" color from the supplied color object.
236 * (Copied from Cornelius's kdpdatebutton.cpp) 237 * (Copied from Cornelius's kdpdatebutton.cpp)
237 * 238 *
238 * @param color source based on which a shaded color should be calculated. 239 * @param color source based on which a shaded color should be calculated.
239 */ 240 */
240 QColor getShadedColor(QColor color); 241 QColor getShadedColor(QColor color);
241 242
242 /** number of days to be displayed. For now there is no support for any other number then 42. 243 /** number of days to be displayed. For now there is no support for any other number then 42.
243 so change it at your own risk :o) */ 244 so change it at your own risk :o) */
244 static const int NUMDAYS; 245 static const int NUMDAYS;
245 246
246 /** calendar instance to be queried for holidays, events, ... */ 247 /** calendar instance to be queried for holidays, events, ... */
247 Calendar *mCalendar; 248 Calendar *mCalendar;
248 249
249 /** starting date of the matrix */ 250 /** starting date of the matrix */
250 QDate startdate; 251 QDate startdate;
251 252
252 /** array of day labels to optimeize drawing performance. */ 253 /** array of day labels to optimeize drawing performance. */
253 QString *daylbls; 254 QString *daylbls;
254 255
255 /** array of days displayed to reduce memory consumption by 256 /** array of days displayed to reduce memory consumption by
256 subsequently calling QDate::addDays(). */ 257 subsequently calling QDate::addDays(). */
257 QDate *days; 258 QDate *days;
258 259
259 /** array of storing the number of events on a given day. 260 /** array of storing the number of events on a given day.
260 * used for drawing a bold font if there is at least one event on that day. 261 * used for drawing a bold font if there is at least one event on that day.
261 */ 262 */
262 int *events; 263 int *events;
263 264
264 /** stores holiday names of the days shown in the matrix. */ 265 /** stores holiday names of the days shown in the matrix. */
265 QMap<int,QString> mHolidays; 266 QMap<int,QString> mHolidays;
266 267
267 /** indey of today or -1 if today is not visible in the matrix. */ 268 /** indey of today or -1 if today is not visible in the matrix. */
268 int today; 269 int today;
269 270
270 /** index of day where dragged selection was initiated. 271 /** index of day where dragged selection was initiated.
271 used to detect "negative" timely selections */ 272 used to detect "negative" timely selections */
272 int mSelInit; 273 int mSelInit;
273 274
274 /** if mSelStart has this value it indicates that there is no 275 /** if mSelStart has this value it indicates that there is no