digiKam
|
Public Slots | |
void | setDate (const QDate &date) |
Signals | |
void | dateChanged (const QDate &date) |
Public Member Functions | |
QDate | date () const |
DDateEdit (QWidget *const parent=nullptr, const QString &name=QString()) | |
bool | isReadOnly () const |
void | setReadOnly (bool readOnly) |
void | showPopup () override |
~DDateEdit () override | |
Protected Slots | |
void | dateEntered (const QDate &) |
void | dateSelected (const QDate &) |
void | lineEnterPressed () |
void | slotTextChanged (const QString &) |
Protected Member Functions | |
virtual bool | assignDate (const QDate &date) |
bool | eventFilter (QObject *, QEvent *) override |
void | mousePressEvent (QMouseEvent *) override |
void | setupKeywords () |
A date editing widget that consists of an editable combo box. The combo box contains the date in text form, and clicking the combo box arrow will display a 'popup' style date picker.
This widget also supports advanced features like allowing the user to type in the day name to get the date. The following keywords are supported (in the native language): tomorrow, yesterday, today, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday.
|
explicit |
|
override |
|
protectedvirtual |
Sets the date, without altering the display. This method is used internally to set the widget's date value. As a virtual method, it allows derived classes to perform additional validation on the date value before it is set. Derived classes should return true if QDate::isValid(date
) returns false.
date | The new date to set. |
References date().
Referenced by dateEntered(), dateSelected(), eventFilter(), lineEnterPressed(), setDate(), showPopup(), and slotTextChanged().
QDate Digikam::DDateEdit::date | ( | ) | const |
Referenced by assignDate(), dateEntered(), dateSelected(), eventFilter(), lineEnterPressed(), setDate(), showPopup(), slotTextChanged(), Digikam::SearchFieldRangeDate::valueChanged(), and Digikam::SearchFieldRangeDate::write().
|
signal |
This signal is emitted whenever the user modifies the date. The passed date can be invalid.
Referenced by dateEntered(), dateSelected(), DDateEdit(), Digikam::DDateTimeEdit::DDateTimeEdit(), eventFilter(), lineEnterPressed(), and slotTextChanged().
|
protectedslot |
References assignDate(), date(), and dateChanged().
|
protectedslot |
References assignDate(), date(), and dateChanged().
Referenced by DDateEdit().
|
overrideprotected |
References assignDate(), date(), dateChanged(), and lineEnterPressed().
bool Digikam::DDateEdit::isReadOnly | ( | ) | const |
|
protectedslot |
References assignDate(), date(), and dateChanged().
Referenced by DDateEdit(), and eventFilter().
|
overrideprotected |
|
slot |
Sets the date.
date | The new date to display. This date must be valid or it will not be set |
References assignDate(), and date().
Referenced by Digikam::SearchFieldRangeDate::read(), and Digikam::SearchFieldRangeDate::reset().
void Digikam::DDateEdit::setReadOnly | ( | bool | readOnly | ) |
Sets whether the widget is read-only for the user. If read-only, the date picker pop-up is inactive, and the displayed date cannot be edited.
readOnly | True to set the widget read-only, false to set it read-write. |
|
protected |
Fills the keyword map. Re-implement it if you want additional keywords.
Referenced by DDateEdit().
|
override |
References assignDate(), and date().
|
protectedslot |
References assignDate(), date(), and dateChanged().
Referenced by DDateEdit().