KDatePicker Class Reference
A date selection widget. More...
#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 353316 2004-10-10 10:36:39Z bhards
- Author:
- Tim Gilman, Mirko Boehm
Definition at line 51 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.
Definition at line 96 of file kdatepicker.cpp. |
|
Standard qt widget constructor. The initial date will be the current date.
Definition at line 102 of file kdatepicker.cpp. References QDate::currentDate(). |
|
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 453 of file kdatepicker.cpp. References QWidget::sizeHint(). |
|
Sets the date.
Definition at line 277 of file kdatepicker.cpp. References endl(), QDate::isValid(), kdDebug(), KDateTable::setDate(), and table. Referenced by lineEnterPressed(), monthBackwardClicked(), monthForwardClicked(), selectMonthClicked(), selectYearClicked(), todayButtonClicked(), weekSelected(), yearBackwardClicked(), and yearForwardClicked(). |
|
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 415 of file kdatepicker.cpp. References line, monthBackward, monthForward, selectMonth, selectYear, QWidget::setEnabled(), table, yearBackward, and yearForward. |
|
Definition at line 124 of file kdatepicker.h. |
|
Sets the font size of the widgets elements.
Definition at line 459 of file kdatepicker.cpp. References QFontMetrics::boundingRect(), KLocale::calendar(), QWidget::font(), KDateTable::getDate(), QSize::height(), QRect::height(), QString::isNull(), KGlobal::locale(), maxMonthRect, KCalendarSystem::monthName(), selectMonth, selectYear, QWidget::setFont(), KDateTable::setFontSize(), QSize::setHeight(), QFont::setPointSize(), QSize::setWidth(), table, QSize::width(), and QRect::width(). |
|
Returns the font size of the widget elements.
Definition at line 133 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.
Definition at line 502 of file kdatepicker.cpp. References QToolTip::add(), and KDialog::spacingHint(). |
|
Definition at line 525 of file kdatepicker.cpp. |
|
to catch move keyEvents when QLineEdit has keyFocus
Definition at line 212 of file kdatepicker.cpp. References QKeyEvent::key(), QApplication::sendEvent(), table, and QEvent::type(). |
|
the resize event
Reimplemented from QFrame. Definition at line 231 of file kdatepicker.cpp. References QWidget::resizeEvent(). |
|
Definition at line 327 of file kdatepicker.cpp. |
|
|
|
Definition at line 431 of file kdatepicker.cpp. References KNotifyClient::beep(), KDateValidator::date(), dateEntered(), endl(), kdDebug(), line, setDate(), QLineEdit::text(), and val. |
|
Definition at line 447 of file kdatepicker.cpp. References QDate::currentDate(), and 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.
Referenced by dateChangedSlot(). |
|
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. Referenced by tableClickedSlot(). |
|
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.
Referenced by tableClickedSlot(). |
Member Data Documentation
|
the year forward button
Definition at line 160 of file kdatepicker.h. Referenced by setEnabled(). |
|
the year backward button
Definition at line 162 of file kdatepicker.h. Referenced by setEnabled(). |
|
the month forward button
Definition at line 164 of file kdatepicker.h. Referenced by setEnabled(). |
|
the month backward button
Definition at line 166 of file kdatepicker.h. Referenced by setEnabled(). |
|
the button for selecting the month directly
Definition at line 168 of file kdatepicker.h. Referenced by dateChangedSlot(), selectMonthClicked(), selectYearClicked(), setEnabled(), and setFontSize(). |
|
the button for selecting the year directly
Definition at line 170 of file kdatepicker.h. Referenced by dateChangedSlot(), selectYearClicked(), setEnabled(), and setFontSize(). |
|
the line edit to enter the date directly
Definition at line 172 of file kdatepicker.h. Referenced by dateChangedSlot(), lineEnterPressed(), and setEnabled(). |
|
the validator for the line edit:
Definition at line 174 of file kdatepicker.h. Referenced by lineEnterPressed(). |
|
the date table
Definition at line 176 of file kdatepicker.h. Referenced by eventFilter(), getDate(), monthBackwardClicked(), monthForwardClicked(), selectMonthClicked(), selectYearClicked(), setDate(), setEnabled(), setFontSize(), tableClickedSlot(), weekSelected(), yearBackwardClicked(), and yearForwardClicked(). |
|
the widest month string in pixels:
Definition at line 180 of file kdatepicker.h. Referenced by setFontSize(). |
The documentation for this class was generated from the following files: