Qt API | Qtopia API | Qtopia Documentation |

# QPETimeEdit Class Reference

The QPETimeEdit class provides a compact widget for selecting a time. More...

`#include <qtopia/datetimeedit.h>`

Inherits QSpinBox.

List of all member functions.

## Public Members

- QPETimeEdit ( QWidget * parent = 0, const char * name = 0 )
- QPETimeEdit ( const QTime & dt, QWidget * parent = 0, const char * name = 0 )
- ~QPETimeEdit ()
- QTime time () const

## Public Slots

- virtual void setTime ( const QTime & tm )
- virtual void stepDown ()
- virtual void stepUp ()

## Signals

- void valueChanged ( const QTime & t )

## Protected Members

- virtual QString mapValueToText ( int v )
- virtual int mapTextToValue ( bool * ok )

## Detailed Description

The QPETimeEdit class provides a compact widget for selecting a time.

QPETimeEdit extends QSpinBox to validate times as they are entered. It handles 12 hour and 24 hour time formats.

See also Qtopia Classes.

## Member Function Documentation

### QPETimeEdit::QPETimeEdit ( QWidget * parent = 0, const char * name = 0 )

Constructs a QPETimeEdit with the time set to 00:00.

### QPETimeEdit::QPETimeEdit ( const QTime & dt, QWidget * parent = 0, const char * name = 0 )

Constructs a QPETimeEdit with the time set to dt.

### QPETimeEdit::~QPETimeEdit ()

Destructs QPETimeEdit.

### int QPETimeEdit::mapTextToValue ( bool * ok )`[virtual protected]`

Reimplemented to validate the time entered.

Reimplemented from QSpinBox.

### QString QPETimeEdit::mapValueToText ( int v )`[virtual protected]`

Reimplemented to validate the time entered.

Reimplemented from QSpinBox.

### void QPETimeEdit::setTime ( const QTime & tm )`[virtual slot]`

Sets displayed time to tm.

See also time().

### void QPETimeEdit::stepDown ()`[virtual slot]`

Decreases the time by 15 minutes.

Reimplemented from QSpinBox.

### void QPETimeEdit::stepUp ()`[virtual slot]`

Increases the time by 15 minutes.

Reimplemented from QSpinBox.

### QTime QPETimeEdit::time () const

Returns the time selected.

See also setTime().

### void QPETimeEdit::valueChanged ( const QTime & t )`[signal]`

This signal is emitted when the time is changed.

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