OSB_GUI::DateEdit Class Reference

Inheritance diagram for OSB_GUI::DateEdit:

Inheritance graph
[legend]
Collaboration diagram for OSB_GUI::DateEdit:

Collaboration graph
[legend]
List of all members.

Detailed Description

Widget to edit a date.

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.

Public Slots

Public Member Functions

Static Public Attributes

Private Member Functions

Private Attributes


Constructor & Destructor Documentation

OSB_GUI::DateEdit::DateEdit ( QWidget parent,
const char *  name = "dateEdit_" 
)

Constructor with Qt arguments.


Member Function Documentation

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.

Parameters:
date Date to use.

void OSB_GUI::DateEdit::setMandatory ( bool  mandat  ) 

Require the user to select a date.

void OSB_GUI::DateEdit::setText (  )  [private]

Set the widget text for the selected date.

Formats the date according to fmt_ or sets the text to ... if date_ is not set.

void OSB_GUI::DateEdit::setText ( const QString &  date  )  [private]

Set the date which is provided as string.

Parameters:
date The date to set, it must match fmt_.
Note:
This function is hidden as much as possible, however it might be called through the base class.


Member Data Documentation

OSB_LIB::Date OSB_GUI::DateEdit::date_ [private]

The selected date.

Definition at line 146 of file dateedit.h.

DateSelect* OSB_GUI::DateEdit::dateSelect_ [private]

Date selection widget: popped up in selectDate().

Definition at line 148 of file dateedit.h.

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.


The documentation for this class was generated from the following file:
Generated on Sat Sep 2 14:18:37 2006 for OSB Library by  doxygen 1.4.7