summaryrefslogtreecommitdiffabout
path: root/microkde/kdatetbl.h
Unidiff
Diffstat (limited to 'microkde/kdatetbl.h') (more/less context) (ignore whitespace changes)
-rw-r--r--microkde/kdatetbl.h63
1 files changed, 63 insertions, 0 deletions
diff --git a/microkde/kdatetbl.h b/microkde/kdatetbl.h
index b4d3e16..2efa532 100644
--- a/microkde/kdatetbl.h
+++ b/microkde/kdatetbl.h
@@ -308,2 +308,65 @@ private:
308 308
309#endif // KDATETBL_H 309#endif // KDATETBL_H
310class KDateInternalWeekPicker : public QGridView
311{
312 Q_OBJECT
313protected:
314 /**
315 * Store the month that has been clicked [1..12].
316 */
317 int result;
318 /**
319 * the cell under mouse cursor when LBM is pressed
320 */
321 short int activeCol;
322 short int activeRow;
323 /**
324 * Contains the largest rectangle needed by the month names.
325 */
326 QRect max;
327signals:
328 /**
329 * This is send from the mouse click event handler.
330 */
331 void closeMe(int);
332public:
333 /**
334 * The constructor.
335 */
336 KDateInternalWeekPicker(int fontsize, QWidget* parent, const char* name=0);
337 /**
338 * The size hint.
339 */
340 QSize sizeHint() const;
341 /**
342 * Return the result. 0 means no selection (reject()), 1..12 are the
343 * months.
344 */
345 int getResult() const;
346protected:
347 /**
348 * Set up the painter.
349 */
350 void setupPainter(QPainter *p);
351 /**
352 * The resize event.
353 */
354 void viewportResizeEvent(QResizeEvent*);
355 /**
356 * Paint a cell. This simply draws the month names in it.
357 */
358 virtual void paintCell(QPainter* painter, int row, int col);
359 /**
360 * Catch mouse click and move events to paint a rectangle around the item.
361 */
362 void contentsMousePressEvent(QMouseEvent *e);
363 void contentsMouseMoveEvent(QMouseEvent *e);
364 /**
365 * Emit monthSelected(int) when a cell has been released.
366 */
367 void contentsMouseReleaseEvent(QMouseEvent *e);
368
369private:
370 class KDateInternalMonthPrivate;
371 KDateInternalMonthPrivate *d;
372};