class KDatePicker

A date selection widget. More...

Definition#include <kdatepik.h>
InheritsQFrame
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods

Signals

Protected Methods

Protected Slots

Protected Members


Detailed Description

Provide a widget for calendar date input.

Different from the previous versions, it now emits two types of signals, either dateSelected() or dateEntered() (see documentation for both signals).

A line edit has been added in the newer versions to allow the user to select a date directly by entering numbers like 19990101 or 990101.

 KDatePicker (QWidget *parent=0, QDate=QDate::currentDate(), const char *name=0)

The usual constructor. The given date will be displayed initially.

KDatePicker ()

[virtual]

The destructor.

QSize  sizeHint ()

[const]

The size hint for KDatePickers. The size hint recommends the minimum size of the widget so that all elements may be placed without clipping. This sometimes looks ugly, so when using the size hint, try adding 28 to each of the reported numbers of pixels.

bool  setDate (const QDate&)

Set the date.

Returns: false and does not change anything if the date given is invalid.

const QDate&  getDate ()

Retrieve the date.

void  setEnabled (bool)

Enable or disable the widget.

void  setFontSize (int)

Set the font size of the widgets elements.

int  fontSize ()

[const]

Font size of the widget elements.

void  resizeEvent (QResizeEvent*)

[protected]

QToolButton * yearForward

[protected]

QToolButton * yearBackward

[protected]

QToolButton * monthForward

[protected]

QToolButton * monthBackward

[protected]

QToolButton * selectMonth

[protected]

QToolButton * selectYear

[protected]

QLineEdit * line

[protected]

KDateValidator * val

[protected]

KDateTable * table

[protected]

QSize maxMonthRect

[protected]

void  dateChangedSlot (QDate)

[protected slot]

void  tableClickedSlot ()

[protected slot]

void  monthForwardClicked ()

[protected slot]

void  monthBackwardClicked ()

[protected slot]

void  yearForwardClicked ()

[protected slot]

void  yearBackwardClicked ()

[protected slot]

void  selectMonthClicked ()

[protected slot]

void  selectYearClicked ()

[protected slot]

void  lineEnterPressed ()

[protected slot]

void  dateSelected (QDate)

[signal]

This signal is emitted each time the selected date is changed. Usually, this does not mean that the date has been entered, since the date also changes, for example, when another month is selected.

See also: dateSelected, */, void, dateChanged(QDate);, /**, This, signal, is, emitted, each, time, a, day, has, been, selected, by, clicking, on, the, table, (hitting, a, day, in, the, current, month)., It, has, the, same, meaning, as, dateSelected(), in, older, versions, of, KDatePicker.

void  dateEntered (QDate)

[signal]

This signal is emitted when enter is pressed and a VALID date has been entered before into the line edit. Connect to both dateEntered() and dateSelected() to receive all events where the user really enters a date.

void  tableClicked ()

[signal]

This signal is emitted when the day has been selected by clicking on it in the table.