The class shows the selected date in a line edit.
If the user presses a key or selects the widget with the left mouse button a pop-up window allows to select a date.
Definition at line 70 of file dateedit.h.
OSB_GUI::DateEdit::DateEdit | ( | QWidget * | parent, | |
const char * | name = "dateEdit_" | |||
) |
Constructor with Qt arguments.
void OSB_GUI::DateEdit::clear | ( | ) |
Clear the selected date.
const OSB_LIB::Date OSB_GUI::DateEdit::date | ( | ) | const |
Get the date.
void OSB_GUI::DateEdit::focusInEvent | ( | QFocusEvent * | event | ) | [private] |
Select the whole text if the widget gets the focus.
void OSB_GUI::DateEdit::keyPressEvent | ( | QKeyEvent * | event | ) | [private] |
Handle key pressed events.
Shows the date select if the pressed key is no Esc.
void OSB_GUI::DateEdit::mousePressEvent | ( | QMouseEvent * | event | ) | [private] |
Handle mouse clicks.
Shows the date select if the left mouse button was pressed.
void OSB_GUI::DateEdit::selectDate | ( | ) | [slot] |
Pop-up the date selection.
void OSB_GUI::DateEdit::setDate | ( | const QDate & | date | ) | [slot] |
Set the date.
void OSB_GUI::DateEdit::setDate | ( | const OSB_LIB::Date & | date | ) |
Set the date.
date | Date to use. |
void OSB_GUI::DateEdit::setMandatory | ( | bool | mandat | ) |
Require the user to select a date.
void OSB_GUI::DateEdit::setText | ( | ) | [private] |
void OSB_GUI::DateEdit::setText | ( | const QString & | date | ) | [private] |
Set the date which is provided as string.
date | The date to set, it must match fmt_. |
OSB_LIB::Date OSB_GUI::DateEdit::date_ [private] |
DateSelect* OSB_GUI::DateEdit::dateSelect_ [private] |
std::string OSB_GUI::DateEdit::fmt_ [static] |
The format of the date.
This format is used to convert between strings and date_.
The default is "%d-%b-%Y" which corresponds to "DD-MMM-YYYY", see man strftime for details.
Definition at line 80 of file dateedit.h.