digiKam
Digikam::DDatePicker Class Reference
+ Inheritance diagram for Digikam::DDatePicker:

Classes

class  Private
 

Signals

void dateChanged (const QDate &date)
 
void dateEntered (const QDate &date)
 
void dateSelected (const QDate &date)
 
void tableClicked ()
 

Public Member Functions

const QDate & date () const
 
DDateTabledateTable () const
 
 DDatePicker (const QDate &dt, QWidget *const parent=nullptr)
 
 DDatePicker (QWidget *const parent=nullptr)
 
int fontSize () const
 
bool hasCloseButton () const
 
void setCloseButton (bool enable)
 
bool setDate (const QDate &date)
 
void setFontSize (int)
 
QSize sizeHint () const override
 
 ~DDatePicker () override
 

Protected Slots

void dateChangedSlot (const QDate &date)
 
void lineEnterPressed ()
 
void monthBackwardClicked ()
 
void monthForwardClicked ()
 
void selectMonthClicked ()
 
void selectYearClicked ()
 
void tableClickedSlot ()
 
void todayButtonClicked ()
 
void uncheckYearSelector ()
 
void weekSelected (int)
 
void yearBackwardClicked ()
 
void yearForwardClicked ()
 

Protected Member Functions

void changeEvent (QEvent *) override
 
bool eventFilter (QObject *, QEvent *) override
 to catch move keyEvents when QLineEdit has keyFocus More...
 
void resizeEvent (QResizeEvent *) override
 the resize event More...
 

Properties

bool closeButton
 
QDate date
 
int fontSize
 

Friends

class Private
 

Detailed Description

Provides a widget for calendar date input.

Constructor & Destructor Documentation

◆ DDatePicker() [1/2]

Digikam::DDatePicker::DDatePicker ( QWidget *const  parent = nullptr)
explicit

The constructor. The current date will be displayed initially.

◆ DDatePicker() [2/2]

Digikam::DDatePicker::DDatePicker ( const QDate &  dt,
QWidget *const  parent = nullptr 
)
explicit

The constructor. The given date will be displayed initially.

◆ ~DDatePicker()

Digikam::DDatePicker::~DDatePicker ( )
override

The destructor.

Member Function Documentation

◆ changeEvent()

void Digikam::DDatePicker::changeEvent ( QEvent *  e)
overrideprotected

◆ date()

const QDate & Digikam::DDatePicker::date ( ) const
Returns
the selected date.

References Digikam::DDateTable::date, and Digikam::DDatePicker::Private::table.

◆ dateChanged

void Digikam::DDatePicker::dateChanged ( const QDate &  date)
signal

This signal is emitted each time the selected date is changed. Usually, this does not mean that the date has been entered, since the date also changes, for example, when another month is selected.

See also
dateSelected

Referenced by dateChangedSlot().

◆ dateChangedSlot

◆ dateEntered

void Digikam::DDatePicker::dateEntered ( const QDate &  date)
signal

This signal is emitted when enter is pressed and a VALID date has been entered before into the line edit. Connect to both dateEntered() and dateSelected() to receive all events where the user really enters a date.

Referenced by Digikam::DDatePickerPopup::DDatePickerPopup(), and lineEnterPressed().

◆ dateSelected

void Digikam::DDatePicker::dateSelected ( const QDate &  date)
signal

This signal is emitted each time a day has been selected by clicking on the table (hitting a day in the current month). It has the same meaning as dateSelected() in older versions of DDatePicker.

Referenced by Digikam::DDatePickerPopup::DDatePickerPopup(), and tableClickedSlot().

◆ dateTable()

DDateTable * Digikam::DDatePicker::dateTable ( ) const
Returns
the DDateTable widget child of this DDatePicker widget.

References Digikam::DDatePicker::Private::table.

◆ eventFilter()

bool Digikam::DDatePicker::eventFilter ( QObject *  o,
QEvent *  e 
)
overrideprotected

to catch move keyEvents when QLineEdit has keyFocus

References Digikam::DDatePicker::Private::table.

◆ fontSize()

int Digikam::DDatePicker::fontSize ( ) const

Returns the font size of the widget elements.

References Digikam::DDatePicker::Private::fontsize.

◆ hasCloseButton()

bool Digikam::DDatePicker::hasCloseButton ( ) const
Returns
true if a DDatePicker shows a close-button.
See also
setCloseButton

References Digikam::DDatePicker::Private::closeButton.

◆ lineEnterPressed

void Digikam::DDatePicker::lineEnterPressed ( )
protectedslot

◆ monthBackwardClicked

void Digikam::DDatePicker::monthBackwardClicked ( )
protectedslot

◆ monthForwardClicked

void Digikam::DDatePicker::monthForwardClicked ( )
protectedslot

◆ resizeEvent()

void Digikam::DDatePicker::resizeEvent ( QResizeEvent *  e)
overrideprotected

the resize event

◆ selectMonthClicked

void Digikam::DDatePicker::selectMonthClicked ( )
protectedslot

◆ selectYearClicked

◆ setCloseButton()

void Digikam::DDatePicker::setCloseButton ( bool  enable)

By calling this method with enable = true, DDatePicker will show a little close-button in the upper button-row. Clicking the close-button will cause the DDatePicker's topLevelWidget()'s close() method being called. This is mostly useful for toplevel datepickers without a window manager decoration.

See also
hasCloseButton

References Digikam::DDatePicker::Private::closeButton, and Digikam::DDatePicker::Private::navigationLayout.

◆ setDate()

bool Digikam::DDatePicker::setDate ( const QDate &  date)

◆ setFontSize()

◆ sizeHint()

QSize Digikam::DDatePicker::sizeHint ( ) const
override

The size hint for date pickers. The size hint recommends the minimum size of the widget so that all elements may be placed without clipping. This sometimes looks ugly, so when using the size hint, try adding 28 to each of the reported numbers of pixels.

◆ tableClicked

void Digikam::DDatePicker::tableClicked ( )
signal

This signal is emitted when the day has been selected by clicking on it in the table.

Referenced by tableClickedSlot().

◆ tableClickedSlot

void Digikam::DDatePicker::tableClickedSlot ( )
protectedslot

References date, dateSelected(), and tableClicked().

◆ todayButtonClicked

void Digikam::DDatePicker::todayButtonClicked ( )
protectedslot

◆ uncheckYearSelector

void Digikam::DDatePicker::uncheckYearSelector ( )
protectedslot

◆ weekSelected

void Digikam::DDatePicker::weekSelected ( int  index)
protectedslot

◆ yearBackwardClicked

void Digikam::DDatePicker::yearBackwardClicked ( )
protectedslot

◆ yearForwardClicked

void Digikam::DDatePicker::yearForwardClicked ( )
protectedslot

Friends And Related Function Documentation

◆ Private

friend class Private
friend

Property Documentation

◆ closeButton

bool Digikam::DDatePicker::closeButton
readwrite

◆ date

QDate Digikam::DDatePicker::date
readwrite

◆ fontSize

int Digikam::DDatePicker::fontSize
readwrite

The documentation for this class was generated from the following files: