| digiKam Developer Documentation Professional Photo Management with the Power of Open Source

Loading...
Searching...
No Matches
Public Slots | Signals | Public Member Functions | Protected Slots | Protected Member Functions | List of all members
Digikam::DDateEdit Class Reference

A date editing widget that consists of an editable combo box. More...

Inheritance diagram for Digikam::DDateEdit:

## 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.

## Detailed Description

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.

## Member Function Documentation

## ◆ assignDate()

bool Digikam::DDateEdit::assignDate | ( | const QDate & | date | ) |
| protected virtual

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.

Parameters

  date | The new date to set.

Returns
  True if the date was set, false if it was considered invalid and remains unchanged.

## ◆ date()

QDate Digikam::DDateEdit::date | ( |  | ) | const

Returns
  The date entered. This date could be invalid, you have to check validity yourself.

## ◆ dateChanged

void Digikam::DDateEdit::dateChanged | ( | const QDate & | date | ) |
| signal

The passed date can be invalid.

## ◆ isReadOnly()

bool Digikam::DDateEdit::isReadOnly | ( |  | ) | const

Returns
  True if the widget is read-only, false if read-write.

## ◆ setDate

void Digikam::DDateEdit::setDate | ( | const QDate & | date | ) |
| slot

Parameters

  date | The new date to display. This date must be valid or it will not be set

## ◆ setReadOnly()

void Digikam::DDateEdit::setReadOnly | ( | bool | readOnly | ) |

If read-only, the date picker pop-up is inactive, and the displayed date cannot be edited.

Parameters

  readOnly | True to set the widget read-only, false to set it read-write.

## ◆ setupKeywords()

void Digikam::DDateEdit::setupKeywords | ( |  | ) |
| protected

Re-implement it if you want additional keywords.