class CEikTimeEditor : public CEikTTimeEditor |
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.
Public Member Functions | |
---|---|
CEikTimeEditor() | |
~CEikTimeEditor() | |
IMPORT_C void | ConstructFromResourceL(TResourceReader &) |
IMPORT_C void | ConstructL(const TTime &, const TTime &, const TTime &, TUint32) |
IMPORT_C void | GetMinimumAndMaximum(TTime &, TTime &) |
IMPORT_C void | HandlePointerEventL(const TPointerEvent &) |
IMPORT_C TBool | IsUninitialised() |
IMPORT_C void | PrepareForFocusLossL() |
IMPORT_C void | SetMinimumAndMaximum(const TTime &, const TTime &) |
IMPORT_C void | SetTime(const TTime &) |
IMPORT_C void | SetUninitialised(TBool) |
IMPORT_C TTime | Time() |
Private Member Functions | |
---|---|
IMPORT_C void | CEikMfne_Reserved() |
void | DoSetMinimumAndMaximum(const TTime &, const TTime &) |
IMPORT_C void * | ExtensionInterface(TUid) |
TTime | GetTTime() |
void | SetTTime(const TTime &) |
Inherited Enumerations | |
---|---|
CCoeControl:TZoomType | |
CEikMfne:TFeatureId | |
CEikMfne:TFingerSupportParams |
Private Attributes | |
---|---|
TTime | iMaximumTime |
TTime | iMinimumTime |
TInt | iSpare |
CTimeEditor * | iTimeEditor |
Inherited Attributes | |
---|---|
CCoeControl::iCoeEnv | |
CCoeControl::iContext | |
CCoeControl::iPosition | |
CCoeControl::iSize | |
CEikBorderedControl::iBorder |
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] |
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.
TResourceReader & 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.
void | DoSetMinimumAndMaximum | ( | const TTime & | aMinimumTime, |
const TTime & | aMaximumTime | |||
) | [private] |
IMPORT_C void * | ExtensionInterface | ( | TUid | aInterface | ) | [private, virtual] |
From CAknControl
TUid aInterface |
IMPORT_C void | GetMinimumAndMaximum | ( | TTime & | aMinimumTime, |
TTime & | aMaximumTime | |||
) | const [virtual] |
Gets the range of allowable values that may be entered by the user.
TTime | GetTTime | ( | ) | const [private, virtual] |
An implementation (of this pure virtual function) should get the time from the editor.
Can only be called if CEikMfne::PrepareForFocusLossL() succeeded.
IMPORT_C void | HandlePointerEventL | ( | const TPointerEvent & | aPointerEvent | ) | [virtual] |
From CCoeControl.
Handles pointer events.
const TPointerEvent & aPointerEvent | The pointer event. |
IMPORT_C void | PrepareForFocusLossL | ( | ) | [virtual] |
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.
IMPORT_C void | SetMinimumAndMaximum | ( | const TTime & | aMinimumTime, |
const TTime & | aMaximumTime | |||
) | [virtual] |
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.
void | SetTTime | ( | const TTime & | aTime | ) | [private, virtual] |
An implementation (of this pure virtual function) should set the time in the editor.
const TTime & aTime | The time. |
IMPORT_C void | SetTime | ( | const TTime & | aTime | ) |
Sets the time editor's value.
const TTime & 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.
TBool aUninitialised | If ETrue, sets the editor as uninitialized, i.e. it doesn't display anything. |
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.