#include <mw/eikmfne.h>
class CEikTimeEditor : public CEikTTimeEditor |
Public Member Functions | |
---|---|
CEikTimeEditor() | |
virtual | ~CEikTimeEditor() |
virtual IMPORT_C void | ConstructFromResourceL(TResourceReader &) |
IMPORT_C void | ConstructL(const TTime &, const TTime &, const TTime &, TUint32) |
virtual IMPORT_C void | GetMinimumAndMaximum(TTime &, TTime &) |
virtual IMPORT_C void | HandlePointerEventL(const TPointerEvent &) |
IMPORT_C TBool | IsUninitialised() |
virtual IMPORT_C void | PrepareForFocusLossL() |
virtual IMPORT_C void | SetMinimumAndMaximum(const TTime &, const TTime &) |
IMPORT_C void | SetTime(const TTime &) |
IMPORT_C void | SetUninitialised(TBool) |
IMPORT_C TTime | Time() |
Inherited Attributes | |
---|---|
CCoeControl::iCoeEnv | |
CCoeControl::iContext | |
CCoeControl::iPosition | |
CCoeControl::iSize | |
CEikBorderedControl::iBorder |
Inherited Enumerations | |
---|---|
CCoeControl:TZoomType | |
CEikMfne:TFeatureId | |
CEikMfne:TFingerSupportParams |
Time editor.
This control allows a time value to be displayed and edited. By default the editor has hours, minutes and seconds fields, although the seconds and hours fields may be omitted. 12 and 24-hour format are supported. When 12-hour format is used, am or pm text will be included as another field, either before or after the time. Locale information is used to determine the time separator characters. Locale information is set and retrieved using class TLocale.
The upper and lower field bounds are set depending on the format, and times outside these bounds are invalid.
The editor has an associated resource struct TIME_EDITOR and control factory identifier EEikCtTimeEditor.
IMPORT_C | CEikTimeEditor | ( | ) |
Default constructor.
This function should be used as the first stage in two stage construction, followed by a call to either: ConstructFromResourceL() to initialise the editor's field values from a resource file, or ConstructL() if no resource file is used.
IMPORT_C | ~CEikTimeEditor | ( | ) | [virtual] |
Destructor.
This frees the resources owned by the time editor, prior to its destruction.
IMPORT_C void | ConstructFromResourceL | ( | TResourceReader & | aResourceReader | ) | [virtual] |
Reimplemented from CCoeControl::ConstructFromResourceL(TResourceReader &)
Second phase construction from a resource.
This function completes the construction of a newly-allocated time editor from a TIME_EDITOR resource. The minimum and maximum times, and the flags settings are read from the resource, and ConstructL() is called with these settings. The initial time is set to the maximum time value. Honours the locale's AM/PM text setting and time separators.
Parameter | Description |
---|---|
aResourceReader | A resource file reader. |
IMPORT_C void | ConstructL | ( | const TTime & | aMinimumTime, |
const TTime & | aMaximumTime, | |||
const TTime & | aInitialTime, | |||
TUint32 | aFlags | |||
) |
Second phase construction.
This function completes the construction of a newly-allocated time editor, by setting its minimum, maximum and initial values, and the AM/PM text settings - the AM/PM settings and time separator characters specified in class TLocale are honoured. It should be called by the container only if the control is not constructed from a resource file.
If the initial time is outside the bounds specified, it is reset to the nearest available setting.
The aFlags parameter is used to determine whether the seconds or hours fields are required. The minutes field is always present. It may also be used to specify whether or not to force 24 hour time format, overriding the locale's setting.
A panic will occur if the minimum time is later than the maximum time.
Parameter | Description |
---|---|
aMinimumTime | The minimum allowable time. |
aMaximumTime | The maximum allowable time. |
aInitialTime | The initial time. |
aFlags | Determines which fields are required and whether or not to force 24 hour formatting. See eikon.hrh EEiktime etc. |
Reimplemented from CEikTTimeEditor::GetMinimumAndMaximum(TTime &,TTime &)const
Gets the range of allowable values that may be entered by the user.
Parameter | Description |
---|---|
aMinimumTime | On return, contains the time editor's minimum allowable value. |
aMaximumTime | On return, contains the time editor's maximum allowable value. |
IMPORT_C void | HandlePointerEventL | ( | const TPointerEvent & | aPointerEvent | ) | [virtual] |
Reimplemented from CEikMfne::HandlePointerEventL(const TPointerEvent &)
From CCoeControl.
Handles pointer events.
Parameter | Description |
---|---|
aPointerEvent | The pointer event. |
IMPORT_C TBool | IsUninitialised | ( | ) | const |
Gets the uninitialized status of the editor.
Returns: ETrue, if the editor is set as uninitialized.
IMPORT_C void | PrepareForFocusLossL | ( | ) | [virtual] |
Reimplemented from CEikMfne::PrepareForFocusLossL()
Prepares the editor for focus loss.
This function should be called to validate the editor's contents when an attempt is made to remove focus from the control. If the control value is not within the bounds specified by the minimum and maximum time values, it is reset to the nearest allowable value, the function will leave and will display an appropriate message.
Reimplemented from CEikTTimeEditor::SetMinimumAndMaximum(const TTime &,const TTime &)
Sets the range of allowable time values.
These define the maximum and minimum values that may be entered by the user.
If the existing time value is outside the bounds set by this function, it is reset to the nearest boundary value.
Parameter | Description |
---|---|
aMinimumTime | The minimum allowable value. |
aMaximumTime | The maximum allowable value. |
IMPORT_C void | SetTime | ( | const TTime & | aTime | ) |
Sets the time editor's value.
Parameter | Description |
---|---|
aTime | The new value to which to set the editor's fields. |
IMPORT_C void | SetUninitialised | ( | TBool | aUninitialised | ) |
Sets the uninitialized status of the editor.
Parameter | Description |
---|---|
aUninitialised | If ETrue, sets the editor as uninitialized, i.e. it doesn't display anything. |
IMPORT_C TTime | Time | ( | ) | const |
Gets the time editor's value.
Returns: The editor's value. (Date values are all zero.)