Main Page   Modules   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   Related Pages  

KDateTable Class Reference

#include <kdatetbl.h>

List of all members.

Signals

void dateChanged (QDate)
void tableClicked ()

Public Methods

 KDateTable (QWidget *parent=0, QDate date=QDate::currentDate(), const char *name=0, WFlags f=0)
virtual QSize sizeHint () const
void setFontSize (int size)
bool setDate (const QDate &)

Protected Methods

virtual void paintCell (QPainter *, int, int)
virtual void viewportResizeEvent (QResizeEvent *)
virtual void contentsMousePressEvent (QMouseEvent *)

Protected Attributes

int fontsize
QDate date
int firstday
int numdays
int numDaysPrevMonth
bool unused_hasSelection
QRect maxCell


Detailed Description

Date selection table. This is a support class for the KDatePicker class. It just draws the calender table without titles, but could theoretically be used as a standalone.

When a date is selected by the user, it emits a signal: dateSelected(QDate)

Definition at line 245 of file kdatetbl.h.


Constructor & Destructor Documentation

KDateTable::KDateTable QWidget *    parent = 0,
QDate    date = QDate::currentDate(),
const char *    name = 0,
WFlags    f = 0
 

The constructor.


Member Function Documentation

virtual void KDateTable::contentsMousePressEvent QMouseEvent *    [protected, virtual]
 

React on mouse clicks that select a date.

void KDateTable::dateChanged QDate    [signal]
 

The selected date changed.

virtual void KDateTable::paintCell QPainter *   ,
int   ,
int   
[protected, virtual]
 

Paint a cell.

bool KDateTable::setDate const QDate &   
 

Select and display this date.

void KDateTable::setFontSize int    size
 

Set the font size of the date table.

virtual QSize KDateTable::sizeHint   [virtual]
 

Returns a recommended size for the widget. To save some time, the size of the largest used cell content is calculated in each paintCell() call, since all calculations have to be done there anyway. The size is stored in maxCell. The sizeHint() simply returns a multiple of maxCell.

void KDateTable::tableClicked   [signal]
 

A date has been selected by clicking on the table.

virtual void KDateTable::viewportResizeEvent QResizeEvent *    [protected, virtual]
 

Handle the resize events.


Member Data Documentation

QDate KDateTable::date [protected]
 

The currently selected date.

Definition at line 298 of file kdatetbl.h.

int KDateTable::firstday [protected]
 

The day of the first day in the month [1..7].

Definition at line 302 of file kdatetbl.h.

int KDateTable::fontsize [protected]
 

The font size of the displayed text.

Definition at line 294 of file kdatetbl.h.

QRect KDateTable::maxCell [protected]
 

Save the size of the largest used cell content.

Definition at line 319 of file kdatetbl.h.

int KDateTable::numdays [protected]
 

The number of days in the current month.

Definition at line 306 of file kdatetbl.h.

int KDateTable::numDaysPrevMonth [protected]
 

The number of days in the previous month.

Definition at line 310 of file kdatetbl.h.

bool KDateTable::unused_hasSelection [protected]
 

unused ### remove in KDE 4.0

Definition at line 315 of file kdatetbl.h.


The documentation for this class was generated from the following file:
Generated on Wed Aug 13 23:30:08 2003 for kdelibs by doxygen1.2.18