KDateInternalMonthPicker Class Reference
A table containing month names. More...
#include <mkdatetbl.h>
Inheritance diagram for KDateInternalMonthPicker:

Signals | |
| void | closeMe (int) |
| This is send from the mouse click event handler. | |
Public Member Functions | |
| KDateInternalMonthPicker (int fontsize, QWidget *parent, int year=2000, KCalendarSystem *cSystem=KCalendarSystemFactory::create(), const char *name=0) | |
| The constructor. | |
| QSize | sizeHint () const |
| The size hint. | |
| int | getResult () const |
| Return the result. | |
Protected Member Functions | |
| void | setupPainter (QPainter *p) |
| Set up the painter. | |
| void | viewportResizeEvent (QResizeEvent *) |
| The resize event. | |
| virtual void | paintCell (QPainter *painter, int row, int col) |
| Paint a cell. | |
| void | contentsMousePressEvent (QMouseEvent *e) |
| Catch mouse click and move events to paint a rectangle around the item. | |
| void | contentsMouseMoveEvent (QMouseEvent *e) |
| void | contentsMouseReleaseEvent (QMouseEvent *e) |
| Emit monthSelected(int) when a cell has been released. | |
Protected Attributes | |
| int | result |
| Store the month that has been clicked [1..12]. | |
| short int | activeCol |
| the cell under mouse cursor when LBM is pressed | |
| short int | activeRow |
| QRect | max |
| Contains the largest rectangle needed by the month names. | |
Detailed Description
A table containing month names.It is used to pick a month directly.
Definition at line 34 of file mkdatetbl.h.
Constructor & Destructor Documentation
|
||||||||||||||||||||||||
|
The constructor.
Definition at line 463 of file mkdatetbl.cpp. References QFontMetrics::boundingRect(), QRect::height(), QFont::setPointSize(), and QRect::width(). |
Member Function Documentation
|
|
This is send from the mouse click event handler.
Referenced by contentsMouseReleaseEvent(). |
|
|
The size hint.
Definition at line 503 of file mkdatetbl.cpp. References QRect::height(), max, QGridView::numCols(), QGridView::numRows(), and QRect::width(). |
|
|
Return the result. 0 means no selection (reject()), 1..12 are the months. Definition at line 510 of file mkdatetbl.cpp. References result. |
|
|
Set up the painter.
Definition at line 516 of file mkdatetbl.cpp. References QPainter::setPen(). |
|
|
The resize event.
Definition at line 522 of file mkdatetbl.cpp. References QGridView::setCellHeight(), and QGridView::setCellWidth(). |
|
||||||||||||||||
|
Paint a cell. This simply draws the month names in it. Reimplemented from QGridView. Definition at line 529 of file mkdatetbl.cpp. References activeCol, QGridView::cellHeight(), QGridView::cellWidth(), QPainter::drawRect(), QPainter::drawText(), and KCalendarSystem::monthName(). |
|
|
Catch mouse click and move events to paint a rectangle around the item.
Definition at line 544 of file mkdatetbl.cpp. References activeCol, QMouseEvent::button(), QGridView::columnAt(), QMouseEvent::pos(), QGridView::rowAt(), QGridView::updateCell(), QPoint::x(), and QPoint::y(). |
|
|
Emit monthSelected(int) when a cell has been released.
Definition at line 611 of file mkdatetbl.cpp. References closeMe(), QGridView::columnAt(), QMouseEvent::pos(), result, QGridView::rowAt(), QPoint::x(), and QPoint::y(). |
Member Data Documentation
|
|
Store the month that has been clicked [1..12].
Definition at line 41 of file mkdatetbl.h. Referenced by contentsMouseReleaseEvent(), and getResult(). |
|
|
the cell under mouse cursor when LBM is pressed
Definition at line 45 of file mkdatetbl.h. Referenced by contentsMousePressEvent(), and paintCell(). |
|
|
Contains the largest rectangle needed by the month names.
Definition at line 50 of file mkdatetbl.h. Referenced by sizeHint(). |
The documentation for this class was generated from the following files:
