#include <mw/eikmfne.h>
class CEikTimeOffsetEditor : public CEikMfne |
Public Member Functions | |
---|---|
CEikTimeOffsetEditor() | |
virtual | ~CEikTimeOffsetEditor() |
virtual IMPORT_C void | ConstructFromResourceL(TResourceReader &) |
IMPORT_C void | ConstructL(const TTimeIntervalSeconds &, const TTimeIntervalSeconds &, const TTimeIntervalSeconds &, TUint32) |
IMPORT_C void | GetMinimumAndMaximum(TTimeIntervalSeconds &, TTimeIntervalSeconds &) |
virtual IMPORT_C void | HandlePointerEventL(const TPointerEvent &) |
virtual IMPORT_C void | PrepareForFocusLossL() |
IMPORT_C void | SetMinimumAndMaximum(const TTimeIntervalSeconds &, const TTimeIntervalSeconds &) |
IMPORT_C void | SetTimeOffset(const TTimeIntervalSeconds &) |
IMPORT_C TTimeIntervalSeconds | TimeOffset() |
Inherited Attributes | |
---|---|
CCoeControl::iCoeEnv | |
CCoeControl::iContext | |
CCoeControl::iPosition | |
CCoeControl::iSize | |
CEikBorderedControl::iBorder |
Inherited Enumerations | |
---|---|
CCoeControl:TZoomType | |
CEikMfne:TFeatureId | |
CEikMfne:TFingerSupportParams |
Time offset editor.
This control allows a signed time offset to be displayed and edited. It has the same fields as the time editor control CEikTimeEditor, except there is no AM or PM text because the value is a time offset, positive or negative, from 0 to 24 hours rather than a point in time.
The editor has an associated resource struct TIME_OFFSET_EDITOR and control factory identifier EEikCtTimeOffsetEditor.
IMPORT_C | CEikTimeOffsetEditor | ( | ) |
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 | ~CEikTimeOffsetEditor | ( | ) | [virtual] |
Destructor. This frees the resources owned by the time offset 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 time offset editor from a TIME_OFFSET_EDITOR resource.
The minimum and maximum time offsets, and the flags settings are read from the resource, and ConstructL() is called with these settings. The initial time offset is set to the maximum time offset value.
Parameter | Description |
---|---|
aResourceReader | A resource file reader. |
IMPORT_C void | ConstructL | ( | const TTimeIntervalSeconds & | aMinimumTimeOffset, |
const TTimeIntervalSeconds & | aMaximumTimeOffset, | |||
const TTimeIntervalSeconds & | aInitialTimeOffset, | |||
TUint32 | aFlags | |||
) |
Second phase constructor.
This function completes the construction of a time offset editor, by setting its minimum, maximum and initial values. The time separator characters specified in the system's locale are honoured. It should be called by the container only if the control is not constructed from a resource file.
The aFlags parameter is used to determine whether the seconds or hours fields are displayed by the editor. The minutes field is always displayed. This function forces 24 hour time format for the time offset editor, overriding the locale's setting.
If the initial time offset is outside the bounds specified, it is invalid and will be reset to the upper or lower bound.
The minimum value for a time offset editor is -23:59:59, and the maximum value is 23:59:59.
Parameter | Description |
---|---|
aMinimumTimeOffset | The minimum allowable value, in seconds. |
aMaximumTimeOffset | The maximum allowable value, in seconds. |
aInitialTimeOffset | The initial value, in seconds. |
aFlags | Determines which fields are required. Specify CTimeEditor::EWithoutSecondsField for no seconds field, CTimeEditor::EWithoutHoursField for no hours field. 24 hour clock format is set, regardless of the flag setting specified in this parameter. |
IMPORT_C void | GetMinimumAndMaximum | ( | TTimeIntervalSeconds & | aMinimumTimeOffset, |
TTimeIntervalSeconds & | aMaximumTimeOffset | |||
) | const |
Gets the range of allowable values that may be entered by the user.
Parameter | Description |
---|---|
aMinimumTimeOffset | On return, contains the time offset editor s minimum allowable value. |
aMaximumTimeOffset | On return, contains the time offset 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 void | PrepareForFocusLossL | ( | ) | [virtual] |
Reimplemented from CEikMfne::PrepareForFocusLossL()
Prepares 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 offset values, it is reset to the nearest allowable value. The function then leaves.
IMPORT_C void | SetMinimumAndMaximum | ( | const TTimeIntervalSeconds & | aMinimumTimeOffset, |
const TTimeIntervalSeconds & | aMaximumTimeOffset | |||
) |
Sets the range of allowable offset values.
These define the maximum and minimum values that may be entered by the user.
If the existing offset value is outside the bounds set by this function, it is reset to the nearest boundary value.
Parameter | Description |
---|---|
aMinimumTimeOffset | The minimum allowable value. |
aMaximumTimeOffset | The maximum allowable value. |
IMPORT_C void | SetTimeOffset | ( | const TTimeIntervalSeconds & | aTimeOffset | ) |
Sets the time offset editor's value.
The sign is set according to whether the value specified is positive or negative.
Parameter | Description |
---|---|
aTimeOffset | The new offset value to which to assign to the editor. |
IMPORT_C TTimeIntervalSeconds | TimeOffset | ( | ) | const |
Gets the time offset editor's value converted into seconds.
Returns: The editor's value in seconds.