KDatePicker Class Reference
#include <kdatepicker.h>
Inheritance diagram for KDatePicker:

Detailed Description
A date selection widget.Provides 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.

KDE Date Widget
- Version:
- Id
- kdatepicker.h 465272 2005-09-29 09:47:40Z mueller
Definition at line 51 of file kdatepicker.h.
Constructor & Destructor Documentation
KDatePicker::KDatePicker | ( | QWidget * | parent = 0 , |
|
QDate | = QDate::currentDate() , |
|||
const char * | name = 0 | |||
) |
The usual constructor.
The given date will be displayed initially.
Definition at line 99 of file kdatepicker.cpp.
The usual constructor.
The given date will be displayed initially.
- Since:
- 3.1
Definition at line 105 of file kdatepicker.cpp.
KDatePicker::KDatePicker | ( | QWidget * | parent, | |
const char * | name | |||
) |
Standard qt widget constructor.
The initial date will be the current date.
- Since:
- 3.1
Definition at line 111 of file kdatepicker.cpp.
KDatePicker::~KDatePicker | ( | ) | [virtual] |
Member Function Documentation
QSize KDatePicker::sizeHint | ( | ) | const |
The size hint for date pickers.
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.
Definition at line 470 of file kdatepicker.cpp.
bool KDatePicker::setDate | ( | const QDate & | ) |
Sets the date.
- Returns:
false
and does not change anything if the date given is invalid.
Definition at line 286 of file kdatepicker.cpp.
const QDate & KDatePicker::getDate | ( | ) | const |
const QDate& KDatePicker::date | ( | ) | const |
- Returns:
- the selected date.
void KDatePicker::setEnabled | ( | bool | ) |
KDateTable* KDatePicker::dateTable | ( | ) | const [inline] |
- Returns:
- the KDateTable widget child of this KDatePicker widget.
- Since:
- 3.2
Definition at line 124 of file kdatepicker.h.
void KDatePicker::setFontSize | ( | int | ) |
int KDatePicker::fontSize | ( | ) | const [inline] |
void KDatePicker::setCloseButton | ( | bool | enable | ) |
By calling this method with enable
= true, KDatePicker will show a little close-button in the upper button-row.
Clicking the close-button will cause the KDatePicker's topLevelWidget()'s close() method being called. This is mostly useful for toplevel datepickers without a window manager decoration.
- See also:
- hasCloseButton
- Since:
- 3.1
Definition at line 519 of file kdatepicker.cpp.
bool KDatePicker::hasCloseButton | ( | ) | const |
- Returns:
- true if a KDatePicker shows a close-button.
- See also:
- setCloseButton
- Since:
- 3.1
Definition at line 542 of file kdatepicker.cpp.
void KDatePicker::resizeEvent | ( | QResizeEvent * | ) | [protected, virtual] |
void KDatePicker::selectWeekClicked | ( | ) | [protected, slot] |
void KDatePicker::selectMonthClicked | ( | ) | [protected, slot] |
void KDatePicker::selectYearClicked | ( | ) | [protected, slot] |
void KDatePicker::lineEnterPressed | ( | ) | [protected, slot] |
void KDatePicker::todayButtonClicked | ( | ) | [protected, slot] |
void KDatePicker::weekSelected | ( | int | ) | [protected, slot] |
void KDatePicker::dateChanged | ( | 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 KDatePicker::dateSelected | ( | QDate | ) | [signal] |
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 KDatePicker::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 KDatePicker::tableClicked | ( | ) | [signal] |
This signal is emitted when the day has been selected by clicking on it in the table.
Member Data Documentation
QToolButton* KDatePicker::yearForward [protected] |
QToolButton* KDatePicker::yearBackward [protected] |
QToolButton* KDatePicker::monthForward [protected] |
QToolButton* KDatePicker::monthBackward [protected] |
QToolButton* KDatePicker::selectMonth [protected] |
QToolButton* KDatePicker::selectYear [protected] |
QLineEdit* KDatePicker::line [protected] |
KDateValidator* KDatePicker::val [protected] |
KDateTable* KDatePicker::table [protected] |
QSize KDatePicker::maxMonthRect [protected] |
The documentation for this class was generated from the following files: