KDatePicker Class Reference
Provides a widget for calendar date input. A date selection widget. More...
#include <kdatepicker.h>
Inheritance diagram for KDatePicker:


Signals | |
void | dateChanged (QDate) |
void | dateSelected (QDate) |
void | dateEntered (QDate) |
void | tableClicked () |
Public Member Functions | |
KDatePicker (QWidget *parent=0, QDate=QDate::currentDate(), const char *name=0) | |
KDatePicker (QWidget *parent, QDate, const char *name, WFlags f) | |
KDatePicker (QWidget *parent, const char *name) | |
virtual | ~KDatePicker () |
QSize | sizeHint () const |
bool | setDate (const QDate &) |
const QDate & | getDate () const KDE_DEPRECATED |
const QDate & | date () const |
void | setEnabled (bool) |
KDateTable * | dateTable () const |
void | setFontSize (int) |
int | fontSize () const |
void | setCloseButton (bool enable) |
bool | hasCloseButton () const |
Protected Slots | |
void | dateChangedSlot (QDate) |
void | tableClickedSlot () |
void | monthForwardClicked () |
void | monthBackwardClicked () |
void | yearForwardClicked () |
void | yearBackwardClicked () |
void | selectWeekClicked () |
void | selectMonthClicked () |
void | selectYearClicked () |
void | lineEnterPressed () |
void | todayButtonClicked () |
void | weekSelected (int) |
Protected Member Functions | |
virtual bool | eventFilter (QObject *o, QEvent *e) |
virtual void | resizeEvent (QResizeEvent *) |
virtual void | virtual_hook (int id, void *data) |
Protected Attributes | |
QToolButton * | yearForward |
QToolButton * | yearBackward |
QToolButton * | monthForward |
QToolButton * | monthBackward |
QToolButton * | selectMonth |
QToolButton * | selectYear |
QLineEdit * | line |
KDateValidator * | val |
KDateTable * | table |
QSize | maxMonthRect |
Properties | |
QDate | date |
bool | closeButton |
int | fontSize |
Detailed Description
Provides a widget for calendar date input. A date selection widget.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,v 1.40 2004/01/21 16:16:10 raabe Exp
- Author:
- Tim Gilman, Mirko Boehm
Definition at line 50 of file kdatepicker.h.
Constructor & Destructor Documentation
|
The usual constructor. The given date will be displayed initially. Definition at line 90 of file kdatepicker.cpp. |
|
The usual constructor. The given date will be displayed initially.
|
|
Standard qt widget constructor. The initial date will be the current date.
|
|
The destructor. Definition at line 206 of file kdatepicker.cpp. |
Member Function Documentation
|
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 450 of file kdatepicker.cpp. |
|
Sets the date.
References endl(), kdDebug(), KDateTable::setDate(), and table. Referenced by lineEnterPressed(), selectMonthClicked(), selectYearClicked(), todayButtonClicked(), and weekSelected(). |
|
Returns the selected date. Definition at line 265 of file kdatepicker.cpp. References KDateTable::getDate(), and table. |
|
|
|
Enables or disables the widget. Definition at line 412 of file kdatepicker.cpp. References line, monthBackward, monthForward, selectMonth, selectYear, table, yearBackward, and yearForward. |
|
References table. |
|
Sets the font size of the widgets elements. Definition at line 456 of file kdatepicker.cpp. References KLocale::calendar(), KDateTable::getDate(), KGlobal::locale(), maxMonthRect, KCalendarSystem::monthName(), selectMonth, selectYear, KDateTable::setFontSize(), and table. |
|
Returns the font size of the widget elements. Definition at line 132 of file kdatepicker.h. |
|
By calling this method with 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.
|
|
|
|
to catch move keyEvents when QLineEdit has keyFocus Definition at line 212 of file kdatepicker.cpp. References table. |
|
the resize event Definition at line 231 of file kdatepicker.cpp. |
|
|
|
Definition at line 346 of file kdatepicker.cpp. References KLocale::calendar(), KCalendarSystem::day(), KCalendarSystem::daysInMonth(), KDateTable::getDate(), KGlobal::locale(), KCalendarSystem::month(), KCalendarSystem::monthName(), KCalendarSystem::monthsInYear(), selectMonth, setDate(), KCalendarSystem::setYMD(), table, and KCalendarSystem::year(). |
|
Definition at line 373 of file kdatepicker.cpp. References KNotifyClient::beep(), KLocale::calendar(), KCalendarSystem::day(), KCalendarSystem::daysInMonth(), KPopupFrame::exec(), KDateTable::getDate(), KDateInternalYearSelector::getYear(), KGlobal::locale(), KCalendarSystem::month(), selectMonth, selectYear, setDate(), KPopupFrame::setMainWidget(), KCalendarSystem::setYMD(), and table. |
|
Definition at line 428 of file kdatepicker.cpp. References KNotifyClient::beep(), KDateValidator::date(), dateEntered(), endl(), kdDebug(), line, setDate(), and val. |
|
Definition at line 444 of file kdatepicker.cpp. References setDate(). |
|
Definition at line 330 of file kdatepicker.cpp. References KCalendarSystem::addDays(), KLocale::calendar(), KCalendarSystem::dayOfWeek(), KDateTable::getDate(), KGlobal::locale(), setDate(), KCalendarSystem::setYMD(), table, and KCalendarSystem::year(). |
|
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.
|
|
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. |
|
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. Referenced by lineEnterPressed(). |
|
This signal is emitted when the day has been selected by clicking on it in the table.
|
Member Data Documentation
|
the year forward button Definition at line 159 of file kdatepicker.h. Referenced by setEnabled(). |
|
the year backward button Definition at line 161 of file kdatepicker.h. Referenced by setEnabled(). |
|
the month forward button Definition at line 163 of file kdatepicker.h. Referenced by setEnabled(). |
|
the month backward button Definition at line 165 of file kdatepicker.h. Referenced by setEnabled(). |
|
the button for selecting the month directly Definition at line 167 of file kdatepicker.h. Referenced by selectMonthClicked(), selectYearClicked(), setEnabled(), and setFontSize(). |
|
the button for selecting the year directly Definition at line 169 of file kdatepicker.h. Referenced by selectYearClicked(), setEnabled(), and setFontSize(). |
|
the line edit to enter the date directly Definition at line 171 of file kdatepicker.h. Referenced by lineEnterPressed(), and setEnabled(). |
|
the validator for the line edit: Definition at line 173 of file kdatepicker.h. Referenced by lineEnterPressed(). |
|
the date table Definition at line 175 of file kdatepicker.h. Referenced by dateTable(), eventFilter(), getDate(), selectMonthClicked(), selectYearClicked(), setDate(), setEnabled(), setFontSize(), and weekSelected(). |
|
the widest month string in pixels: Definition at line 179 of file kdatepicker.h. Referenced by setFontSize(). |
The documentation for this class was generated from the following files: