![]() |
digiKam Developer Documentation
Professional Photo Management with the Power of Open Source
|
A date editing widget that consists of an editable combo box. More...
Public Slots | |
void | setDate (const QDate &date) |
Sets the date. | |
Signals | |
void | dateChanged (const QDate &date) |
This signal is emitted whenever the user modifies the date. | |
Public Member Functions | |
DDateEdit (QWidget *const parent=nullptr, const QString &name=QString()) | |
QDate | date () const |
bool | isReadOnly () const |
void | setReadOnly (bool readOnly) |
Sets whether the widget is read-only for the user. | |
void | showPopup () 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) |
Sets the date, without altering the display. | |
bool | eventFilter (QObject *, QEvent *) override |
void | mousePressEvent (QMouseEvent *) override |
void | setupKeywords () |
Fills the keyword map. | |
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.
|
protectedvirtual |
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. |
QDate Digikam::DDateEdit::date | ( | ) | const |
|
signal |
The passed date can be invalid.
bool Digikam::DDateEdit::isReadOnly | ( | ) | const |
|
slot |
date | The new date to display. This date must be valid or it will not be set |
void Digikam::DDateEdit::setReadOnly | ( | bool | readOnly | ) |
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 |
Re-implement it if you want additional keywords.