.TH "KDatePicker" kde3 "11 Jun 2005" "Version Version 3.4.1" "kdeui Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
KDatePicker \- A date selection widget.  

.PP
.SH SYNOPSIS
.br
.PP
\fC#include <kdatepicker.h>\fP
.PP
Inherits \fBQFrame\fP.
.PP
.SS "Signals"

.in +1c
.ti -1c
.RI "void \fBdateChanged\fP (\fBQDate\fP)"
.br
.ti -1c
.RI "void \fBdateSelected\fP (\fBQDate\fP)"
.br
.ti -1c
.RI "void \fBdateEntered\fP (\fBQDate\fP)"
.br
.ti -1c
.RI "void \fBtableClicked\fP ()"
.br
.in -1c
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "\fBKDatePicker\fP (\fBQWidget\fP *parent=0, \fBQDate\fP=\fBQDate::currentDate\fP(), const char *name=0)"
.br
.ti -1c
.RI "\fBKDatePicker\fP (\fBQWidget\fP *parent, \fBQDate\fP, const char *name, WFlags f)"
.br
.ti -1c
.RI "\fBKDatePicker\fP (\fBQWidget\fP *parent, const char *name)"
.br
.ti -1c
.RI "virtual \fB~KDatePicker\fP ()"
.br
.ti -1c
.RI "\fBQSize\fP \fBsizeHint\fP () const "
.br
.ti -1c
.RI "bool \fBsetDate\fP (const \fBQDate\fP &)"
.br
.ti -1c
.RI "const \fBQDate\fP & \fBgetDate\fP () const KDE_DEPRECATED"
.br
.ti -1c
.RI "const \fBQDate\fP & \fBdate\fP () const "
.br
.ti -1c
.RI "void \fBsetEnabled\fP (bool)"
.br
.ti -1c
.RI "\fBKDateTable\fP * \fBdateTable\fP () const "
.br
.ti -1c
.RI "void \fBsetFontSize\fP (int)"
.br
.ti -1c
.RI "int \fBfontSize\fP () const "
.br
.ti -1c
.RI "void \fBsetCloseButton\fP (bool enable)"
.br
.ti -1c
.RI "bool \fBhasCloseButton\fP () const "
.br
.in -1c
.SS "Protected Slots"

.in +1c
.ti -1c
.RI "void \fBdateChangedSlot\fP (\fBQDate\fP)"
.br
.ti -1c
.RI "void \fBtableClickedSlot\fP ()"
.br
.ti -1c
.RI "void \fBmonthForwardClicked\fP ()"
.br
.ti -1c
.RI "void \fBmonthBackwardClicked\fP ()"
.br
.ti -1c
.RI "void \fByearForwardClicked\fP ()"
.br
.ti -1c
.RI "void \fByearBackwardClicked\fP ()"
.br
.ti -1c
.RI "void \fBselectWeekClicked\fP ()"
.br
.ti -1c
.RI "void \fBselectMonthClicked\fP ()"
.br
.ti -1c
.RI "void \fBselectYearClicked\fP ()"
.br
.ti -1c
.RI "void \fBlineEnterPressed\fP ()"
.br
.ti -1c
.RI "void \fBtodayButtonClicked\fP ()"
.br
.ti -1c
.RI "void \fBweekSelected\fP (int)"
.br
.in -1c
.SS "Protected Member Functions"

.in +1c
.ti -1c
.RI "virtual bool \fBeventFilter\fP (\fBQObject\fP *o, \fBQEvent\fP *e)"
.br
.ti -1c
.RI "virtual void \fBresizeEvent\fP (\fBQResizeEvent\fP *)"
.br
.ti -1c
.RI "virtual void \fBvirtual_hook\fP (int id, void *data)"
.br
.in -1c
.SS "Protected Attributes"

.in +1c
.ti -1c
.RI "\fBQToolButton\fP * \fByearForward\fP"
.br
.ti -1c
.RI "\fBQToolButton\fP * \fByearBackward\fP"
.br
.ti -1c
.RI "\fBQToolButton\fP * \fBmonthForward\fP"
.br
.ti -1c
.RI "\fBQToolButton\fP * \fBmonthBackward\fP"
.br
.ti -1c
.RI "\fBQToolButton\fP * \fBselectMonth\fP"
.br
.ti -1c
.RI "\fBQToolButton\fP * \fBselectYear\fP"
.br
.ti -1c
.RI "\fBQLineEdit\fP * \fBline\fP"
.br
.ti -1c
.RI "\fBKDateValidator\fP * \fBval\fP"
.br
.ti -1c
.RI "\fBKDateTable\fP * \fBtable\fP"
.br
.ti -1c
.RI "\fBQSize\fP \fBmaxMonthRect\fP"
.br
.in -1c
.SS "Properties"

.in +1c
.ti -1c
.RI "\fBQDate\fP \fBdate\fP"
.br
.ti -1c
.RI "bool \fBcloseButton\fP"
.br
.ti -1c
.RI "int \fBfontSize\fP"
.br
.in -1c
.SH "Detailed Description"
.PP 
A date selection widget. 

Provides a widget for calendar date input.
.PP
Different from the previous versions, it now emits two types of signals, either \fBdateSelected()\fP or \fBdateEntered()\fP (see documentation for both signals).
.PP
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.
.PP
KDE Date Widget 
.PP
\fBVersion:\fP
.RS 4

.PP
\fBId\fP.RS 4
\fBkdatepicker.h\fP 353316 2004-10-10 10:36:39Z bhards 
.RE
.PP
.RE
.PP
\fBAuthor:\fP
.RS 4
Tim Gilman, Mirko Boehm 
.RE
.PP

.PP
Definition at line 51 of file kdatepicker.h.
.SH "Constructor & Destructor Documentation"
.PP 
.SS "KDatePicker::KDatePicker (\fBQWidget\fP * parent = \fC0\fP, \fBQDate\fP = \fC\fBQDate::currentDate\fP()\fP, const char * name = \fC0\fP)"
.PP
The usual constructor. 
.PP
The given date will be displayed initially. 
.PP
Definition at line 90 of file kdatepicker.cpp.
.SS "KDatePicker::KDatePicker (\fBQWidget\fP * parent, \fBQDate\fP, const char * name, WFlags f)"
.PP
The usual constructor. 
.PP
The given date will be displayed initially. 
.PP
\fBSince:\fP
.RS 4
3.1 
.RE
.PP

.PP
Definition at line 96 of file kdatepicker.cpp.
.SS "KDatePicker::KDatePicker (\fBQWidget\fP * parent, const char * name)"
.PP
Standard qt widget constructor. 
.PP
The initial date will be the current date. 
.PP
\fBSince:\fP
.RS 4
3.1 
.RE
.PP

.PP
Definition at line 102 of file kdatepicker.cpp.
.SS "KDatePicker::~\fBKDatePicker\fP ()\fC [virtual]\fP"
.PP
The destructor. 
.PP
Definition at line 206 of file kdatepicker.cpp.
.SH "Member Function Documentation"
.PP 
.SS "\fBQSize\fP KDatePicker::sizeHint () const"
.PP
The size hint for date pickers. 
.PP
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. 
.PP
Definition at line 453 of file kdatepicker.cpp.
.PP
References QWidget::sizeHint().
.SS "bool KDatePicker::setDate (const \fBQDate\fP &)"
.PP
Sets the date. 
.PP
\fBReturns:\fP
.RS 4
\fCfalse\fP and does not change anything if the date given is invalid. 
.RE
.PP

.PP
Definition at line 277 of file kdatepicker.cpp.
.PP
References endl(), QDate::isValid(), kdDebug(), KDateTable::setDate(), and table.
.PP
Referenced by lineEnterPressed(), selectMonthClicked(), selectYearClicked(), todayButtonClicked(), and weekSelected().
.SS "const \fBQDate\fP & KDatePicker::getDate () const"
.PP
Returns the selected date. 
.PP
\fBDeprecated\fP
.RS 4
.RE
.PP

.PP
Definition at line 265 of file kdatepicker.cpp.
.PP
References KDateTable::getDate(), and table.
.SS "const \fBQDate\fP& KDatePicker::date () const"
.PP
\fBReturns:\fP
.RS 4
the selected date. 
.RE
.PP

.SS "void KDatePicker::setEnabled (bool)"
.PP
Enables or disables the widget. 
.PP
Definition at line 415 of file kdatepicker.cpp.
.PP
References line, QWidget::setEnabled(), and table.
.SS "\fBKDateTable\fP* KDatePicker::dateTable () const\fC [inline]\fP"
.PP
\fBReturns:\fP
.RS 4
the \fBKDateTable\fP widget child of this KDatePicker widget. 
.RE
.PP
\fBSince:\fP
.RS 4
3.2 
.RE
.PP

.PP
Definition at line 124 of file kdatepicker.h.
.SS "void KDatePicker::setFontSize (int)"
.PP
Sets the font size of the widgets elements. 
.PP
Definition at line 459 of file kdatepicker.cpp.
.PP
References KLocale::calendar(), QWidget::font(), KDateTable::getDate(), QSize::height(), QRect::height(), QString::isNull(), KGlobal::locale(), maxMonthRect, KCalendarSystem::monthName(), QWidget::setFont(), KDateTable::setFontSize(), QSize::setHeight(), QFont::setPointSize(), QSize::setWidth(), table, QSize::width(), and QRect::width().
.SS "int KDatePicker::fontSize () const\fC [inline]\fP"
.PP
Returns the font size of the widget elements. 
.PP
Definition at line 133 of file kdatepicker.h.
.SS "void KDatePicker::setCloseButton (bool enable)"
.PP
By calling this method with \fCenable\fP = true, KDatePicker will show a little close-button in the upper button-row. 
.PP
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. 
.PP
\fBSee also:\fP
.RS 4
\fBhasCloseButton\fP 
.RE
.PP
\fBSince:\fP
.RS 4
3.1 
.RE
.PP

.PP
Definition at line 502 of file kdatepicker.cpp.
.PP
References QToolTip::add().
.SS "bool KDatePicker::hasCloseButton () const"
.PP
\fBReturns:\fP
.RS 4
true if a KDatePicker shows a close-button. 
.RE
.PP
\fBSee also:\fP
.RS 4
\fBsetCloseButton\fP 
.RE
.PP
\fBSince:\fP
.RS 4
3.1 
.RE
.PP

.PP
Definition at line 525 of file kdatepicker.cpp.
.SS "bool KDatePicker::eventFilter (\fBQObject\fP * o, \fBQEvent\fP * e)\fC [protected, virtual]\fP"
.PP
to catch move keyEvents when \fBQLineEdit\fP has keyFocus 
.PP
Definition at line 212 of file kdatepicker.cpp.
.PP
References QKeyEvent::key(), QApplication::sendEvent(), and table.
.SS "void KDatePicker::resizeEvent (\fBQResizeEvent\fP *)\fC [protected, virtual]\fP"
.PP
the resize event 
.PP
Reimplemented from \fBQFrame\fP.
.PP
Definition at line 231 of file kdatepicker.cpp.
.PP
References QWidget::resizeEvent().
.SS "void KDatePicker::selectWeekClicked ()\fC [protected, slot]\fP"
.PP
\fBSince:\fP
.RS 4
3.1 
.RE
.PP

.PP
\fBDeprecated\fP
.RS 4
in 3.2 
.RE
.PP

.PP
Definition at line 327 of file kdatepicker.cpp.
.SS "void KDatePicker::selectMonthClicked ()\fC [protected, slot]\fP"
.PP
\fBSince:\fP
.RS 4
3.1 
.RE
.PP

.PP
Definition at line 346 of file kdatepicker.cpp.
.PP
References KLocale::calendar(), KCalendarSystem::day(), KCalendarSystem::daysInMonth(), QPopupMenu::exec(), KDateTable::getDate(), QPopupMenu::insertItem(), KGlobal::locale(), KCalendarSystem::month(), KCalendarSystem::monthName(), KCalendarSystem::monthsInYear(), QPopupMenu::setActiveItem(), setDate(), KCalendarSystem::setYMD(), table, and KCalendarSystem::year().
.SS "void KDatePicker::selectYearClicked ()\fC [protected, slot]\fP"
.PP
\fBSince:\fP
.RS 4
3.1 
.RE
.PP

.PP
Definition at line 373 of file kdatepicker.cpp.
.PP
References KNotifyClient::beep(), KLocale::calendar(), KCalendarSystem::day(), KCalendarSystem::daysInMonth(), KPopupFrame::exec(), KDateTable::getDate(), KDateInternalYearSelector::getYear(), KGlobal::locale(), KCalendarSystem::month(), QLineEdit::selectAll(), setDate(), KPopupFrame::setMainWidget(), KDateInternalYearSelector::setYear(), KCalendarSystem::setYMD(), QLineEdit::sizeHint(), table, and QDate::year().
.SS "void KDatePicker::lineEnterPressed ()\fC [protected, slot]\fP"
.PP
\fBSince:\fP
.RS 4
3.1 
.RE
.PP

.PP
Definition at line 431 of file kdatepicker.cpp.
.PP
References KNotifyClient::beep(), dateEntered(), endl(), kdDebug(), line, setDate(), and QLineEdit::text().
.SS "void KDatePicker::todayButtonClicked ()\fC [protected, slot]\fP"
.PP
\fBSince:\fP
.RS 4
3.2 
.RE
.PP

.PP
Definition at line 447 of file kdatepicker.cpp.
.PP
References setDate().
.SS "void KDatePicker::weekSelected (int)\fC [protected, slot]\fP"
.PP
\fBSince:\fP
.RS 4
3.2 
.RE
.PP

.PP
Definition at line 330 of file kdatepicker.cpp.
.PP
References KCalendarSystem::addDays(), KLocale::calendar(), KCalendarSystem::dayOfWeek(), KDateTable::getDate(), KGlobal::locale(), setDate(), KCalendarSystem::setYMD(), table, and KCalendarSystem::year().
.SS "void KDatePicker::dateChanged (\fBQDate\fP)\fC [signal]\fP"
.PP
This signal is emitted each time the selected date is changed. 
.PP
Usually, this does not mean that the date has been entered, since the date also changes, for example, when another month is selected. 
.PP
\fBSee also:\fP
.RS 4
\fBdateSelected\fP 
.RE
.PP

.SS "void KDatePicker::dateSelected (\fBQDate\fP)\fC [signal]\fP"
.PP
This signal is emitted each time a day has been selected by clicking on the table (hitting a day in the current month). 
.PP
It has the same meaning as \fBdateSelected()\fP in older versions of KDatePicker. 
.SS "void KDatePicker::dateEntered (\fBQDate\fP)\fC [signal]\fP"
.PP
This signal is emitted when enter is pressed and a VALID date has been entered before into the line edit. 
.PP
Connect to both \fBdateEntered()\fP and \fBdateSelected()\fP to receive all events where the user really enters a date. 
.PP
Referenced by lineEnterPressed().
.SS "void KDatePicker::tableClicked ()\fC [signal]\fP"
.PP
This signal is emitted when the day has been selected by clicking on it in the table. 
.PP
.SH "Member Data Documentation"
.PP 
.SS "\fBQToolButton\fP* \fBKDatePicker::yearForward\fP\fC [protected]\fP"
.PP
the year forward button 
.PP
Definition at line 160 of file kdatepicker.h.
.SS "\fBQToolButton\fP* \fBKDatePicker::yearBackward\fP\fC [protected]\fP"
.PP
the year backward button 
.PP
Definition at line 162 of file kdatepicker.h.
.SS "\fBQToolButton\fP* \fBKDatePicker::monthForward\fP\fC [protected]\fP"
.PP
the month forward button 
.PP
Definition at line 164 of file kdatepicker.h.
.SS "\fBQToolButton\fP* \fBKDatePicker::monthBackward\fP\fC [protected]\fP"
.PP
the month backward button 
.PP
Definition at line 166 of file kdatepicker.h.
.SS "\fBQToolButton\fP* \fBKDatePicker::selectMonth\fP\fC [protected]\fP"
.PP
the button for selecting the month directly 
.PP
Definition at line 168 of file kdatepicker.h.
.SS "\fBQToolButton\fP* \fBKDatePicker::selectYear\fP\fC [protected]\fP"
.PP
the button for selecting the year directly 
.PP
Definition at line 170 of file kdatepicker.h.
.SS "\fBQLineEdit\fP* \fBKDatePicker::line\fP\fC [protected]\fP"
.PP
the line edit to enter the date directly 
.PP
Definition at line 172 of file kdatepicker.h.
.PP
Referenced by lineEnterPressed(), and setEnabled().
.SS "\fBKDateValidator\fP* \fBKDatePicker::val\fP\fC [protected]\fP"
.PP
the validator for the line edit: 
.PP
Definition at line 174 of file kdatepicker.h.
.SS "\fBKDateTable\fP* \fBKDatePicker::table\fP\fC [protected]\fP"
.PP
the date table 
.PP
Definition at line 176 of file kdatepicker.h.
.PP
Referenced by eventFilter(), getDate(), selectMonthClicked(), selectYearClicked(), setDate(), setEnabled(), setFontSize(), and weekSelected().
.SS "\fBQSize\fP \fBKDatePicker::maxMonthRect\fP\fC [protected]\fP"
.PP
the widest month string in pixels: 
.PP
Definition at line 180 of file kdatepicker.h.
.PP
Referenced by setFontSize().

.SH "Author"
.PP 
Generated automatically by Doxygen for kdeui Library from the source code.
