#include <kdatecombobox.h>

Public Types | |
| enum | Option { EditDate = 0x0001, SelectDate = 0x0002, DatePicker = 0x0004, DateKeywords = 0x0008, WarnOnInvalid = 0x0010 } |
Public Slots | |
| void | resetDateRange () |
| void | resetMaximumDate () |
| void | resetMinimumDate () |
| void | setCalendar (KCalendarSystem *calendar=0) |
| void | setCalendarSystem (KLocale::CalendarSystem calendarSystem) |
| void | setDate (const QDate &date) |
| void | setDateMap (QMap< QDate, QString > dateMap) |
| void | setDateRange (const QDate &minDate, const QDate &maxDate, const QString &minWarnMsg=QString(), const QString &maxWarnMsg=QString()) |
| void | setDisplayFormat (KLocale::DateFormat format) |
| void | setMaximumDate (const QDate &maxDate, const QString &maxWarnMsg=QString()) |
| void | setMinimumDate (const QDate &minTime, const QString &minWarnMsg=QString()) |
| void | setOptions (Options options) |
Signals | |
| void | dateChanged (const QDate &date) |
| void | dateEdited (const QDate &date) |
| void | dateEntered (const QDate &date) |
Public Member Functions | |
| KDateComboBox (QWidget *parent=0) | |
| virtual | ~KDateComboBox () |
| const KCalendarSystem * | calendar () const |
| KLocale::CalendarSystem | calendarSystem () const |
| QDate | date () const |
| QMap< QDate, QString > | dateMap () const |
| KLocale::DateFormat | displayFormat () const |
| bool | isNull () const |
| bool | isValid () const |
| QDate | maximumDate () const |
| QDate | minimumDate () const |
| Options | options () const |
Protected Member Functions | |
| virtual void | assignCalendarSystem (KLocale::CalendarSystem calendarSystem) |
| virtual void | assignDate (const QDate &date) |
| virtual bool | eventFilter (QObject *object, QEvent *event) |
| virtual void | focusInEvent (QFocusEvent *event) |
| virtual void | focusOutEvent (QFocusEvent *event) |
| virtual void | hidePopup () |
| virtual void | keyPressEvent (QKeyEvent *event) |
| virtual void | mousePressEvent (QMouseEvent *event) |
| virtual void | resizeEvent (QResizeEvent *event) |
| virtual void | showPopup () |
| virtual void | wheelEvent (QWheelEvent *event) |
Properties | |
| QDate | date |
| QDate | maximumDate |
| QDate | minimumDate |
| Options | options |
Member Enumeration Documentation
Options provided by the widget.
- See also:
- options()
- setOptions()
- Enumerator:
Definition at line 51 of file kdatecombobox.h.
Constructor & Destructor Documentation
| KDateComboBox::KDateComboBox | ( | QWidget * | parent = 0 | ) | [explicit] |
Create a new KDateComboBox widget.
By default the EditDate, SelectDate, DatePicker and DateKeywords options are enabled, the ShortDate format is used and the date is set to the current date.
Definition at line 252 of file kdatecombobox.cpp.
| KDateComboBox::~KDateComboBox | ( | ) | [virtual] |
Destroy the widget.
Definition at line 274 of file kdatecombobox.cpp.
Member Function Documentation
| void KDateComboBox::assignCalendarSystem | ( | KLocale::CalendarSystem | calendarSystem | ) | [protected, virtual] |
Assign the calendar system for the widget.
Virtual to allow sub-classes to apply extra validation rules.
- Parameters:
-
time the new time
Definition at line 313 of file kdatecombobox.cpp.
| void KDateComboBox::assignDate | ( | const QDate & | date | ) | [protected, virtual] |
Assign the date for the widget.
Virtual to allow sub-classes to apply extra validation rules.
- Parameters:
-
date the new date
Definition at line 296 of file kdatecombobox.cpp.
| const KCalendarSystem * KDateComboBox::calendar | ( | ) | const |
Returns a pointer to the Calendar System object used by this widget.
Usually this will be the Global Calendar System using the Global Locale, but this may have been changed to a custom Calendar System possibly using a custom Locale.
Normally you will not need to access this object.
- See also:
- KCalendarSystem
- setCalendar
- Returns:
- the current calendar system instance
Definition at line 318 of file kdatecombobox.cpp.
| KLocale::CalendarSystem KDateComboBox::calendarSystem | ( | ) | const |
Returns the Calendar System type used by the widget.
- Returns:
- the Calendar System currently used
Definition at line 301 of file kdatecombobox.cpp.
| QDate KDateComboBox::date | ( | ) | const |
Return the currently selected date.
- Returns:
- the currently selected date
| void KDateComboBox::dateChanged | ( | const QDate & | date | ) | [signal] |
Signal if the date has been changed either manually by the user or programatically.
The returned date may be invalid.
- Parameters:
-
date the new date
| void KDateComboBox::dateEdited | ( | const QDate & | date | ) | [signal] |
Signal if the date is being manually edited by the user.
The returned date may be invalid.
- Parameters:
-
date the new date
| void KDateComboBox::dateEntered | ( | const QDate & | date | ) | [signal] |
Signal if the date has been manually entered or selected by the user.
The returned date may be invalid.
- Parameters:
-
date the new date
| QMap< QDate, QString > KDateComboBox::dateMap | ( | ) | const |
Return the map of dates listed in the drop-down and their displayed string forms.
- See also:
- setDateMap()
- Returns:
- the select date map
Definition at line 422 of file kdatecombobox.cpp.
| KLocale::DateFormat KDateComboBox::displayFormat | ( | ) | const |
Return the currently set date display format.
By default this is the Short Date
- Returns:
- the currently set date format
Definition at line 408 of file kdatecombobox.cpp.
| bool KDateComboBox::eventFilter | ( | QObject * | o, |
| QEvent * | ev | ||
| ) | [protected, virtual] |
Re-implemented for internal reasons.
API not affected.
Reimplemented from KComboBox.
Definition at line 436 of file kdatecombobox.cpp.
| void KDateComboBox::focusInEvent | ( | QFocusEvent * | event | ) | [protected, virtual] |
Definition at line 526 of file kdatecombobox.cpp.
| void KDateComboBox::focusOutEvent | ( | QFocusEvent * | event | ) | [protected, virtual] |
Definition at line 465 of file kdatecombobox.cpp.
| void KDateComboBox::hidePopup | ( | ) | [protected, virtual] |
Definition at line 511 of file kdatecombobox.cpp.
| bool KDateComboBox::isNull | ( | ) | const |
Return if the current user input is null.
- See also:
- isValid()
- Returns:
- if the current user input is null
Definition at line 336 of file kdatecombobox.cpp.
| bool KDateComboBox::isValid | ( | ) | const |
Return if the current user input is valid.
If the user input is null then it is not valid
- See also:
- isNull()
- Returns:
- if the current user input is valid
Definition at line 328 of file kdatecombobox.cpp.
| void KDateComboBox::keyPressEvent | ( | QKeyEvent * | event | ) | [protected, virtual] |
Definition at line 441 of file kdatecombobox.cpp.
| QDate KDateComboBox::maximumDate | ( | ) | const |
Return the current maximum date.
- Returns:
- the current maximum date
| QDate KDateComboBox::minimumDate | ( | ) | const |
Return the current minimum date.
- Returns:
- the current minimum date
| void KDateComboBox::mousePressEvent | ( | QMouseEvent * | event | ) | [protected, virtual] |
Definition at line 516 of file kdatecombobox.cpp.
| Options KDateComboBox::options | ( | ) | const |
Return the currently set widget options.
- Returns:
- the currently set widget options
| void KDateComboBox::resetDateRange | ( | ) | [slot] |
Reset the minimum and maximum date to the default values.
- See also:
- setDateRange()
Definition at line 403 of file kdatecombobox.cpp.
| void KDateComboBox::resetMaximumDate | ( | ) | [slot] |
Reset the maximum date to the default.
Definition at line 380 of file kdatecombobox.cpp.
| void KDateComboBox::resetMinimumDate | ( | ) | [slot] |
Reset the minimum date to the default.
Definition at line 365 of file kdatecombobox.cpp.
| void KDateComboBox::resizeEvent | ( | QResizeEvent * | event | ) | [protected, virtual] |
Definition at line 531 of file kdatecombobox.cpp.
| void KDateComboBox::setCalendar | ( | KCalendarSystem * | calendar = 0 | ) | [slot] |
Changes the calendar system to use.
Can use its own local locale if set.
You retain ownership of the calendar object, it will not be destroyed with the widget.
- Parameters:
-
calendar the calendar system object to use, defaults to global
Definition at line 323 of file kdatecombobox.cpp.
| void KDateComboBox::setCalendarSystem | ( | KLocale::CalendarSystem | calendarSystem | ) | [slot] |
Set the Calendar System used for this widget.
Uses the global locale.
- See also:
- KLocale::CalendarSystem
- calendarSystem()
- Parameters:
-
calendarSystem the Calendar System to use
Definition at line 306 of file kdatecombobox.cpp.
| void KDateComboBox::setDate | ( | const QDate & | date | ) | [slot] |
Set the currently selected date.
You can set an invalid date or a date outside the valid range, validity checking is only done via isValid().
- Parameters:
-
date the new date
Definition at line 285 of file kdatecombobox.cpp.
| void KDateComboBox::setDateMap | ( | QMap< QDate, QString > | dateMap | ) | [slot] |
Set the list of dates able to be selected from the drop-down and the string form to display for those dates, e.g.
"2010-01-01" and "Yesterday".
Any invalid or duplicate dates will be used, the list will NOT be sorted, and the minimum and maximum date will not be affected.
The dateMap is keyed by the date to be listed and the value is the string to be displayed. If you want the date to be displayed in the default date format then the string should be null. If you want a separator to be displayed then set the string to "seperator".
- See also:
- dateMap()
- Parameters:
-
dateMap the map of dates able to be selected
Definition at line 427 of file kdatecombobox.cpp.
| void KDateComboBox::setDateRange | ( | const QDate & | minDate, |
| const QDate & | maxDate, | ||
| const QString & | minWarnMsg = QString(), |
||
| const QString & | maxWarnMsg = QString() |
||
| ) | [slot] |
Set the valid date range to be applied by isValid().
Both dates must be valid and the minimum date must be less than or equal to the maximum date, otherwise the date range will not be set.
- Parameters:
-
minDate the minimum date maxDate the maximum date minWarnMsg the minimum warning message maxWarnMsg the maximum warning message
Definition at line 385 of file kdatecombobox.cpp.
| void KDateComboBox::setDisplayFormat | ( | KLocale::DateFormat | format | ) | [slot] |
Sets the date format to display.
By default is the Short Date format.
- Parameters:
-
format the date format to use
Definition at line 413 of file kdatecombobox.cpp.
| void KDateComboBox::setMaximumDate | ( | const QDate & | maxDate, |
| const QString & | maxWarnMsg = QString() |
||
| ) | [slot] |
Set the maximum allowed date.
If the date is invalid, or less than current minimum, then the maximum will not be set.
- Parameters:
-
maxDate the maximum date maxWarnMsg the maximum warning message
Definition at line 375 of file kdatecombobox.cpp.
| void KDateComboBox::setMinimumDate | ( | const QDate & | minTime, |
| const QString & | minWarnMsg = QString() |
||
| ) | [slot] |
Set the minimum allowed date.
If the date is invalid, or greater than current maximum, then the minimum will not be set.
- Parameters:
-
minDate the minimum date minWarnMsg the minimum warning message
Definition at line 360 of file kdatecombobox.cpp.
| void KDateComboBox::setOptions | ( | Options | options | ) | [slot] |
Set the new widget options.
- Parameters:
-
options the new widget options
Definition at line 346 of file kdatecombobox.cpp.
| void KDateComboBox::showPopup | ( | ) | [protected, virtual] |
Definition at line 472 of file kdatecombobox.cpp.
| void KDateComboBox::wheelEvent | ( | QWheelEvent * | event | ) | [protected, virtual] |
Reimplemented from KComboBox.
Definition at line 521 of file kdatecombobox.cpp.
Property Documentation
QDate KDateComboBox::date [read, write] |
Definition at line 38 of file kdatecombobox.h.
QDate KDateComboBox::maximumDate [read, write] |
Definition at line 40 of file kdatecombobox.h.
QDate KDateComboBox::minimumDate [read, write] |
Definition at line 39 of file kdatecombobox.h.
KDateComboBox::Options KDateComboBox::options [read, write] |
Definition at line 41 of file kdatecombobox.h.
The documentation for this class was generated from the following files:
KDE 4.7 API Reference