-rw-r--r-- | korganizer/kodaymatrix.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/korganizer/kodaymatrix.h b/korganizer/kodaymatrix.h index 2a1959c..38a7f92 100644 --- a/korganizer/kodaymatrix.h +++ b/korganizer/kodaymatrix.h | |||
@@ -209,89 +209,91 @@ signals: | |||
209 | protected: | 209 | protected: |
210 | 210 | ||
211 | void paintEvent(QPaintEvent *ev); | 211 | void paintEvent(QPaintEvent *ev); |
212 | 212 | ||
213 | void mousePressEvent (QMouseEvent* e); | 213 | void mousePressEvent (QMouseEvent* e); |
214 | 214 | ||
215 | void mouseReleaseEvent (QMouseEvent* e); | 215 | void mouseReleaseEvent (QMouseEvent* e); |
216 | 216 | ||
217 | void mouseMoveEvent (QMouseEvent* e); | 217 | void mouseMoveEvent (QMouseEvent* e); |
218 | 218 | ||
219 | void dragEnterEvent(QDragEnterEvent *); | 219 | void dragEnterEvent(QDragEnterEvent *); |
220 | 220 | ||
221 | void dragMoveEvent(QDragMoveEvent *); | 221 | void dragMoveEvent(QDragMoveEvent *); |
222 | 222 | ||
223 | void dragLeaveEvent(QDragLeaveEvent *); | 223 | void dragLeaveEvent(QDragLeaveEvent *); |
224 | 224 | ||
225 | void dropEvent(QDropEvent *); | 225 | void dropEvent(QDropEvent *); |
226 | 226 | ||
227 | void resizeEvent(QResizeEvent *); | 227 | void resizeEvent(QResizeEvent *); |
228 | 228 | ||
229 | private: | 229 | private: |
230 | KODaymatrixWhatsThis* mKODaymatrixWhatsThis; | 230 | KODaymatrixWhatsThis* mKODaymatrixWhatsThis; |
231 | bool mouseDown; | 231 | bool mouseDown; |
232 | QBitArray bDays; | 232 | QBitArray bDays; |
233 | QBitArray hDays; | ||
234 | QBitArray eDays; | ||
233 | QPixmap myPix; | 235 | QPixmap myPix; |
234 | QTimer* mUpdateTimer; | 236 | QTimer* mUpdateTimer; |
235 | QTimer* mRepaintTimer; | 237 | QTimer* mRepaintTimer; |
236 | bool mDayChanged; | 238 | bool mDayChanged; |
237 | bool mPendingUpdateBeforeRepaint; | 239 | bool mPendingUpdateBeforeRepaint; |
238 | 240 | ||
239 | /** returns the index of the day located at the matrix's widget (x,y) position. | 241 | /** returns the index of the day located at the matrix's widget (x,y) position. |
240 | * | 242 | * |
241 | * @param x horizontal coordinate | 243 | * @param x horizontal coordinate |
242 | * @param y vertical coordinate | 244 | * @param y vertical coordinate |
243 | */ | 245 | */ |
244 | int getDayIndexFrom(int x, int y); | 246 | int getDayIndexFrom(int x, int y); |
245 | 247 | ||
246 | /** calculates a "shaded" color from the supplied color object. | 248 | /** calculates a "shaded" color from the supplied color object. |
247 | * (Copied from Cornelius's kdpdatebutton.cpp) | 249 | * (Copied from Cornelius's kdpdatebutton.cpp) |
248 | * | 250 | * |
249 | * @param color source based on which a shaded color should be calculated. | 251 | * @param color source based on which a shaded color should be calculated. |
250 | */ | 252 | */ |
251 | QColor getShadedColor(QColor color); | 253 | QColor getShadedColor(QColor color); |
252 | 254 | ||
253 | /** number of days to be displayed. For now there is no support for any other number then 42. | 255 | /** number of days to be displayed. For now there is no support for any other number then 42. |
254 | so change it at your own risk :o) */ | 256 | so change it at your own risk :o) */ |
255 | static const int NUMDAYS; | 257 | static const int NUMDAYS; |
256 | 258 | ||
257 | /** calendar instance to be queried for holidays, events, ... */ | 259 | /** calendar instance to be queried for holidays, events, ... */ |
258 | Calendar *mCalendar; | 260 | Calendar *mCalendar; |
259 | 261 | ||
260 | /** starting date of the matrix */ | 262 | /** starting date of the matrix */ |
261 | QDate startdate; | 263 | QDate startdate; |
262 | 264 | ||
263 | /** array of day labels to optimeize drawing performance. */ | 265 | /** array of day labels to optimeize drawing performance. */ |
264 | QString *daylbls; | 266 | QString *daylbls; |
265 | 267 | ||
266 | /** array of days displayed to reduce memory consumption by | 268 | /** array of days displayed to reduce memory consumption by |
267 | subsequently calling QDate::addDays(). */ | 269 | subsequently calling QDate::addDays(). */ |
268 | QDate *days; | 270 | QDate *days; |
269 | 271 | ||
270 | /** array of storing the number of events on a given day. | 272 | /** array of storing the number of events on a given day. |
271 | * used for drawing a bold font if there is at least one event on that day. | 273 | * used for drawing a bold font if there is at least one event on that day. |
272 | */ | 274 | */ |
273 | int *events; | 275 | //int *events; |
274 | 276 | ||
275 | /** stores holiday names of the days shown in the matrix. */ | 277 | /** stores holiday names of the days shown in the matrix. */ |
276 | QMap<int,QString> mHolidays; | 278 | QMap<int,QString> mHolidays; |
277 | 279 | ||
278 | /** indey of today or -1 if today is not visible in the matrix. */ | 280 | /** indey of today or -1 if today is not visible in the matrix. */ |
279 | int today; | 281 | int today; |
280 | 282 | ||
281 | /** index of day where dragged selection was initiated. | 283 | /** index of day where dragged selection was initiated. |
282 | used to detect "negative" timely selections */ | 284 | used to detect "negative" timely selections */ |
283 | int mSelInit; | 285 | int mSelInit; |
284 | 286 | ||
285 | /** if mSelStart has this value it indicates that there is no | 287 | /** if mSelStart has this value it indicates that there is no |
286 | actual selection in the matrix. */ | 288 | actual selection in the matrix. */ |
287 | static const int NOSELECTION; | 289 | static const int NOSELECTION; |
288 | 290 | ||
289 | /** index of first selected day. */ | 291 | /** index of first selected day. */ |
290 | int mSelStart; | 292 | int mSelStart; |
291 | 293 | ||
292 | /** index of last selected day. */ | 294 | /** index of last selected day. */ |
293 | int mSelEnd; | 295 | int mSelEnd; |
294 | 296 | ||
295 | /** dynamic tooltip to handle mouse dependent tips for each day in the matrix. */ | 297 | /** dynamic tooltip to handle mouse dependent tips for each day in the matrix. */ |
296 | DynamicTip* mToolTip; | 298 | DynamicTip* mToolTip; |
297 | 299 | ||