digiKam Developer Documentation
Professional Photo Management with the Power of Open Source
Loading...
Searching...
No Matches
Digikam::DDatePickerPopup Class Reference

This menu helps the user to select a date quickly. More...

+ Inheritance diagram for Digikam::DDatePickerPopup:

Public Types

enum  ItemFlag { NoDate = 1 , DatePicker = 2 , Words = 4 }
 
typedef QFlags< ItemFlag > Items
 

Signals

void dateChanged (const QDate &)
 This signal emits the new date (selected with datepicker or other menu-items).
 

Public Member Functions

 DDatePickerPopup (Items items, const QDate &date=QDate::currentDate(), QWidget *const parent=nullptr)
 A constructor for the DDatePickerPopup.
 
DDatePickerdatePicker () const
 
int items () const
 
void setDate (const QDate &date)
 

Protected Slots

void slotDateChanged (const QDate &)
 
void slotNextMonth ()
 
void slotNextWeek ()
 
void slotNoDate ()
 
void slotPrevFriday ()
 
void slotPrevMonday ()
 
void slotPrevMonth ()
 
void slotPrevWeek ()
 
void slotToday ()
 
void slotTomorrow ()
 
void slotYesterday ()
 

Detailed Description

This menu helps the user to select a date quickly. It offers various ways of selecting, e.g. with a DDatePicker or with words like "Tomorrow".

The available items are:

  • NoDate: A menu-item with "No Date". If chosen, the datepicker will emit a null QDate.
  • DatePicker: Show a DDatePicker-widget.
  • Words: Show items like "Today", "Tomorrow" or "Next Week".

When supplying multiple items, separate each item with a bitwise OR.

Constructor & Destructor Documentation

◆ DDatePickerPopup()

Digikam::DDatePickerPopup::DDatePickerPopup ( Items  items,
const QDate &  date = QDate::currentDate(),
QWidget *const  parent = nullptr 
)
explicit
Parameters
itemsList of all desirable items, separated with a bitwise OR.
dateInitial date of datepicker-widget.
parentThe object's parent.

Member Function Documentation

◆ datePicker()

DDatePicker * Digikam::DDatePickerPopup::datePicker ( ) const
Returns
A pointer to the private variable mDatePicker, an instance of DDatePicker.

◆ items()

int Digikam::DDatePickerPopup::items ( ) const
Returns
The bitwise result of the active items in the popup.