kdeui Library API Documentation

KDateInternalMonthPicker Class Reference

A table containing month names. More...

#include <kdatetbl.h>

Inheritance diagram for KDateInternalMonthPicker:

QGridView List of all members.

Signals

void closeMe (int)

Public Member Functions

 KDateInternalMonthPicker (const QDate &date, QWidget *parent, const char *name=0)
 ~KDateInternalMonthPicker ()
QSize sizeHint () 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

Detailed Description

A table containing month names.

It is used to pick a month directly.

Definition at line 63 of file kdatetbl.h.


Constructor & Destructor Documentation

KDateInternalMonthPicker::KDateInternalMonthPicker const QDate date,
QWidget parent,
const char *  name = 0
 

The constructor.

Definition at line 618 of file kdatetbl.cpp.

References KLocale::calendar(), KGlobalSettings::generalFont(), KGlobal::locale(), and KCalendarSystem::monthName().

KDateInternalMonthPicker::~KDateInternalMonthPicker  ) 
 

The destructor.

Definition at line 613 of file kdatetbl.cpp.


Member Function Documentation

void KDateInternalMonthPicker::closeMe int   )  [signal]
 

This is send from the mouse click event handler.

Referenced by contentsMouseReleaseEvent().

QSize KDateInternalMonthPicker::sizeHint  )  const
 

The size hint.

Definition at line 654 of file kdatetbl.cpp.

References max.

int KDateInternalMonthPicker::getResult  )  const
 

Return the result.

0 means no selection (reject()), 1..12 are the months.

Definition at line 661 of file kdatetbl.cpp.

void KDateInternalMonthPicker::setupPainter QPainter p  )  [protected]
 

Set up the painter.

Definition at line 667 of file kdatetbl.cpp.

void KDateInternalMonthPicker::viewportResizeEvent QResizeEvent  )  [protected, virtual]
 

The resize event.

Definition at line 673 of file kdatetbl.cpp.

void KDateInternalMonthPicker::paintCell QPainter painter,
int  row,
int  col
[protected, virtual]
 

Paint a cell.

This simply draws the month names in it.

Definition at line 680 of file kdatetbl.cpp.

References activeCol, KLocale::calendar(), KGlobal::locale(), and KCalendarSystem::monthName().

void KDateInternalMonthPicker::contentsMousePressEvent QMouseEvent e  )  [protected, virtual]
 

Catch mouse click and move events to paint a rectangle around the item.

Definition at line 695 of file kdatetbl.cpp.

References activeCol, and KNotifyClient::beep().

void KDateInternalMonthPicker::contentsMouseReleaseEvent QMouseEvent e  )  [protected, virtual]
 

Emit monthSelected(int) when a cell has been released.

Definition at line 762 of file kdatetbl.cpp.

References closeMe().


Member Data Documentation

int KDateInternalMonthPicker::result [protected]
 

Store the month that has been clicked [1..12].

Definition at line 70 of file kdatetbl.h.

short int KDateInternalMonthPicker::activeCol [protected]
 

the cell under mouse cursor when LBM is pressed

Definition at line 74 of file kdatetbl.h.

Referenced by contentsMousePressEvent(), and paintCell().

QRect KDateInternalMonthPicker::max [protected]
 

Contains the largest rectangle needed by the month names.

Definition at line 79 of file kdatetbl.h.

Referenced by sizeHint().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for kdeui Library Version 3.3.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Fri Jul 22 10:16:50 2005 by doxygen 1.3.6 written by Dimitri van Heesch, © 1997-2003