#include <kptdatetable.h>
Signals | |
void | closeMe (int) |
Public Member Functions | |
DateInternalMonthPicker (int fontsize, QWidget *parent, const char *name=0) | |
QSize | sizeHint () const |
QSize | minimumSizeHint () const |
int | getResult () const |
Protected Member Functions | |
void | setupPainter (QPainter *p) |
virtual void | viewportResizeEvent (QResizeEvent *) |
virtual void | paintCell (QPainter *painter, int row, int col) |
virtual void | contentsMousePressEvent (QMouseEvent *e) |
virtual void | contentsMouseMoveEvent (QMouseEvent *e) |
virtual void | contentsMouseReleaseEvent (QMouseEvent *e) |
Protected Attributes | |
int | result |
short int | activeCol |
short int | activeRow |
QRect | max |
Private Attributes | |
DateInternalMonthPrivate * | d |
Definition at line 82 of file kptdatetable.h.
KPlato::DateInternalMonthPicker::DateInternalMonthPicker | ( | int | fontsize, | |
QWidget * | parent, | |||
const char * | name = 0 | |||
) |
The constructor.
Definition at line 766 of file kptdatetable.cc.
void KPlato::DateInternalMonthPicker::closeMe | ( | int | ) | [signal] |
This is send from the mouse click event handler.
Referenced by contentsMouseReleaseEvent().
QSize KPlato::DateInternalMonthPicker::sizeHint | ( | ) | const |
The size hint.
Definition at line 799 of file kptdatetable.cc.
References max.
Referenced by minimumSizeHint(), and KPlato::CalendarPanel::selectMonthClicked().
QSize KPlato::DateInternalMonthPicker::minimumSizeHint | ( | ) | const [inline] |
int KPlato::DateInternalMonthPicker::getResult | ( | ) | const |
Return the result. 0 means no selection (reject()), 1..12 are the months.
Definition at line 806 of file kptdatetable.cc.
References result.
Referenced by KPlato::CalendarPanel::selectMonthClicked().
void KPlato::DateInternalMonthPicker::setupPainter | ( | QPainter * | p | ) | [protected] |
Set up the painter.
Definition at line 812 of file kptdatetable.cc.
void KPlato::DateInternalMonthPicker::viewportResizeEvent | ( | QResizeEvent * | ) | [protected, virtual] |
The resize event.
Definition at line 818 of file kptdatetable.cc.
void KPlato::DateInternalMonthPicker::paintCell | ( | QPainter * | painter, | |
int | row, | |||
int | col | |||
) | [protected, virtual] |
Paint a cell. This simply draws the month names in it.
Definition at line 825 of file kptdatetable.cc.
void KPlato::DateInternalMonthPicker::contentsMousePressEvent | ( | QMouseEvent * | e | ) | [protected, virtual] |
Catch mouse click and move events to paint a rectangle around the item.
Definition at line 838 of file kptdatetable.cc.
void KPlato::DateInternalMonthPicker::contentsMouseMoveEvent | ( | QMouseEvent * | e | ) | [protected, virtual] |
void KPlato::DateInternalMonthPicker::contentsMouseReleaseEvent | ( | QMouseEvent * | e | ) | [protected, virtual] |
Emit monthSelected(int) when a cell has been released.
Definition at line 905 of file kptdatetable.cc.
int KPlato::DateInternalMonthPicker::result [protected] |
Store the month that has been clicked [1..12].
Definition at line 89 of file kptdatetable.h.
Referenced by contentsMouseReleaseEvent(), and getResult().
short int KPlato::DateInternalMonthPicker::activeCol [protected] |
the cell under mouse cursor when LBM is pressed
Definition at line 93 of file kptdatetable.h.
Referenced by contentsMouseMoveEvent(), contentsMousePressEvent(), and paintCell().
short int KPlato::DateInternalMonthPicker::activeRow [protected] |
Definition at line 94 of file kptdatetable.h.
Referenced by contentsMouseMoveEvent(), contentsMousePressEvent(), and paintCell().
QRect KPlato::DateInternalMonthPicker::max [protected] |
Contains the largest rectangle needed by the month names.
Definition at line 98 of file kptdatetable.h.
Referenced by sizeHint().
DateInternalMonthPrivate* KPlato::DateInternalMonthPicker::d [private] |
Definition at line 146 of file kptdatetable.h.