Qt API | Qtopia API | Qtopia Documentation |

# QPEDateEdit Class Reference

The QPEDateEdit class provides a compact widget for selecting a date. More...

`#include <qtopia/datetimeedit.h>`

Inherits QPushButton.

List of all member functions.

## Public Members

- QPEDateEdit ( QWidget * parent, const char * name = 0, bool longDate = FALSE, bool allowNullDate = FALSE )
- QPEDateEdit ( const QDate & dt, QWidget * parent, const char * name = 0, bool longDate = FALSE, bool allowNullDate = FALSE )
- QDate date () const
- void setDateFormat ( DateFormat format )
- void setLongFormat ( bool l )
- bool longFormat () const
- bool allowNullDate () const

## Public Slots

- virtual void setDate ( const QDate & d )
- void setWeekStartsMonday ( bool startMonday )

## Signals

- void valueChanged ( const QDate & t )

## Detailed Description

The QPEDateEdit class provides a compact widget for selecting a date.

QPEDateEdit displays a QPushButton with the selected date displayed. When clicked, a QPEDatePicker is popped up and a new date can be selected.

The button can display the date in either long or short format.

It is also possible to allow no to date selected.

See also Qtopia Classes.

## Member Function Documentation

### QPEDateEdit::QPEDateEdit ( QWidget * parent, const char * name = 0, bool longDate = FALSE, bool allowNullDate = FALSE )

Constructs QPEDateEdit with the current date selected.

If longDate is TRUE the push button will show the selected date in long format.

If allowNullDate is TRUE it is possible to select no date.

### QPEDateEdit::QPEDateEdit ( const QDate & dt, QWidget * parent, const char * name = 0, bool longDate = FALSE, bool allowNullDate = FALSE )

Constructs QPEDateEdit with the date dt.

If longDate is TRUE the push button will show the selected date in long format.

If allowNullDate is TRUE it is possible to select no date.

### bool QPEDateEdit::allowNullDate () const

Returns TRUE if it is possible to select a null date.

### QDate QPEDateEdit::date () const

Return the currently selected date.

### bool QPEDateEdit::longFormat () const

Returns TRUE if dates are displayed in long format.

See also setLongFormat() and setDateFormat().

### void QPEDateEdit::setDate ( const QDate & d )`[virtual slot]`

Set the current date to d.

### void QPEDateEdit::setDateFormat ( DateFormat format )

Set the long date format to format.

See also setLongFormat().

### void QPEDateEdit::setLongFormat ( bool l )

If l is TRUE, display the date in long format.

See also longFormat() and setDateFormat().

### void QPEDateEdit::setWeekStartsMonday ( bool startMonday )`[slot]`

Display the calendar with weeks starting on Monday if startMonday is TRUE, otherwise weeks start with Sunday.

### void QPEDateEdit::valueChanged ( const QDate & t )`[signal]`

This signal is emitted when the date is changed.

This file is part of the Qtopia , copyright © 1995-2002 Trolltech, all rights reserved.