KDEUI
#include <kdatecombobox.h>
Public Types | |
enum | Option { EditDate = 0x0001, SelectDate = 0x0002, DatePicker = 0x0004, DateKeywords = 0x0008, WarnOnInvalid = 0x0010 } |
Public Types inherited from KCompletionBase | |
typedef QMap< KeyBindingType, KShortcut > | KeyBindingMap |
enum | KeyBindingType { TextCompletion, PrevCompletionMatch, NextCompletionMatch, SubstringCompletion } |
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) |
Public Slots inherited from KComboBox | |
void | rotateText (KCompletionBase::KeyBindingType type) |
void | setCompletedItems (const QStringList &items, bool autosubject=true) |
virtual void | setCompletedText (const QString &) |
void | setCurrentItem (const QString &item, bool insert=false, int index=-1) |
Signals | |
void | dateChanged (const QDate &date) |
void | dateEdited (const QDate &date) |
void | dateEntered (const QDate &date) |
Signals inherited from KComboBox | |
void | aboutToShowContextMenu (QMenu *p) |
void | completion (const QString &) |
void | completionModeChanged (KGlobalSettings::Completion) |
void | returnPressed () |
void | returnPressed (const QString &) |
void | substringCompletion (const QString &) |
void | textRotation (KCompletionBase::KeyBindingType) |
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 |
Public Member Functions inherited from KComboBox | |
KComboBox (QWidget *parent=0) | |
KComboBox (bool rw, QWidget *parent=0) | |
virtual | ~KComboBox () |
void | addUrl (const KUrl &url) |
void | addUrl (const QIcon &icon, const KUrl &url) |
bool | autoCompletion () const |
void | changeURL (const KUrl &url, int index) |
void | changeURL (const QPixmap &pixmap, const KUrl &url, int index) |
void | changeUrl (int index, const KUrl &url) |
void | changeUrl (int index, const QIcon &icon, const KUrl &url) |
KCompletionBox * | completionBox (bool create=true) |
bool | contains (const QString &text) const |
int | cursorPosition () const |
void | insertURL (const KUrl &url, int index=-1) |
void | insertURL (const QPixmap &pixmap, const KUrl &url, int index=-1) |
void | insertUrl (int index, const KUrl &url) |
void | insertUrl (int index, const QIcon &icon, const KUrl &url) |
virtual void | setAutoCompletion (bool autocomplete) |
virtual void | setContextMenuEnabled (bool showMenu) |
void | setEditable (bool editable) |
void | setEditUrl (const KUrl &url) |
virtual void | setLineEdit (QLineEdit *) |
void | setTrapReturnKey (bool trap) |
void | setUrlDropsEnabled (bool enable) |
bool | trapReturnKey () const |
bool | urlDropsEnabled () const |
Public Member Functions inherited from KCompletionBase | |
KCompletionBase () | |
virtual | ~KCompletionBase () |
KGlobalSettings::Completion | completionMode () const |
KCompletion * | completionObject (bool hsig=true) |
KCompletion * | compObj () const |
bool | emitSignals () const |
KShortcut | getKeyBinding (KeyBindingType item) const |
bool | handleSignals () const |
bool | isCompletionObjectAutoDeleted () const |
void | setAutoDeleteCompletionObject (bool autoDelete) |
virtual void | setCompletedItems (const QStringList &items, bool autoSuggest=true)=0 |
virtual void | setCompletedText (const QString &text)=0 |
virtual void | setCompletionMode (KGlobalSettings::Completion mode) |
virtual void | setCompletionObject (KCompletion *compObj, bool hsig=true) |
void | setEnableSignals (bool enable) |
virtual void | setHandleSignals (bool handle) |
bool | setKeyBinding (KeyBindingType item, const KShortcut &key) |
void | useGlobalKeyBindings () |
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) |
Protected Member Functions inherited from KComboBox | |
virtual void | create (WId=0, bool initializeWindow=true, bool destroyOldWindow=true) |
virtual QSize | minimumSizeHint () const |
virtual void | setCompletedText (const QString &, bool) |
Protected Member Functions inherited from KCompletionBase | |
KCompletionBase * | delegate () const |
KeyBindingMap | getKeyBindings () const |
void | setDelegate (KCompletionBase *delegate) |
virtual void | virtual_hook (int id, void *data) |
Properties | |
QDate | date |
QDate | maximumDate |
QDate | minimumDate |
Options | options |
Properties inherited from KComboBox | |
bool | autoCompletion |
bool | trapReturnKey |
bool | urlDropsEnabled |
Additional Inherited Members | |
Protected Slots inherited from KComboBox | |
virtual void | makeCompletion (const QString &) |
Detailed Description
Definition at line 34 of file kdatecombobox.h.
Member Enumeration Documentation
Options provided by the widget.
- See also
- options()
- setOptions()
Definition at line 51 of file kdatecombobox.h.
Constructor & Destructor Documentation
|
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 278 of file kdatecombobox.cpp.
|
virtual |
Destroy the widget.
Definition at line 299 of file kdatecombobox.cpp.
Member Function Documentation
|
protectedvirtual |
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 338 of file kdatecombobox.cpp.
|
protectedvirtual |
Assign the date for the widget.
Virtual to allow sub-classes to apply extra validation rules.
- Parameters
-
date the new date
Definition at line 321 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 343 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 326 of file kdatecombobox.cpp.
QDate KDateComboBox::date | ( | ) | const |
Return the currently selected date.
- Returns
- the currently selected 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
|
signal |
Signal if the date is being manually edited by the user.
The returned date may be invalid.
- Parameters
-
date the new 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
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 448 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 434 of file kdatecombobox.cpp.
Re-implemented for internal reasons.
API not affected.
Reimplemented from KComboBox.
Definition at line 462 of file kdatecombobox.cpp.
|
protectedvirtual |
Definition at line 553 of file kdatecombobox.cpp.
|
protectedvirtual |
Definition at line 492 of file kdatecombobox.cpp.
|
protectedvirtual |
Definition at line 538 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 361 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 353 of file kdatecombobox.cpp.
|
protectedvirtual |
Definition at line 467 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
|
protectedvirtual |
Definition at line 543 of file kdatecombobox.cpp.
Options KDateComboBox::options | ( | ) | const |
Return the currently set widget options.
- Returns
- the currently set widget options
|
slot |
Reset the minimum and maximum date to the default values.
- See also
- setDateRange()
Definition at line 429 of file kdatecombobox.cpp.
|
slot |
Reset the maximum date to the default.
Definition at line 405 of file kdatecombobox.cpp.
|
slot |
Reset the minimum date to the default.
Definition at line 390 of file kdatecombobox.cpp.
|
protectedvirtual |
Definition at line 558 of file kdatecombobox.cpp.
|
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 348 of file kdatecombobox.cpp.
|
slot |
Set the Calendar System used for this widget.
Uses the global locale.
- Parameters
-
calendarSystem the Calendar System to use
Definition at line 331 of file kdatecombobox.cpp.
|
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 310 of file kdatecombobox.cpp.
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 453 of file kdatecombobox.cpp.
|
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 410 of file kdatecombobox.cpp.
|
slot |
Sets the date format to display.
By default is the Short Date format.
- Parameters
-
format the date format to use
Definition at line 439 of file kdatecombobox.cpp.
|
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 400 of file kdatecombobox.cpp.
|
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 385 of file kdatecombobox.cpp.
|
slot |
Set the new widget options.
- Parameters
-
options the new widget options
Definition at line 371 of file kdatecombobox.cpp.
|
protectedvirtual |
Definition at line 499 of file kdatecombobox.cpp.
|
protectedvirtual |
Reimplemented from KComboBox.
Definition at line 548 of file kdatecombobox.cpp.
Property Documentation
|
readwrite |
Definition at line 38 of file kdatecombobox.h.
|
readwrite |
Definition at line 40 of file kdatecombobox.h.
|
readwrite |
Definition at line 39 of file kdatecombobox.h.
|
readwrite |
Definition at line 41 of file kdatecombobox.h.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:49:17 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.