class CEikTimeOffsetEditor : public CEikMfne |
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.
Public Member Functions | |
---|---|
CEikTimeOffsetEditor() | |
~CEikTimeOffsetEditor() | |
IMPORT_C void | ConstructFromResourceL(TResourceReader &) |
IMPORT_C void | ConstructL(const TTimeIntervalSeconds &, const TTimeIntervalSeconds &, const TTimeIntervalSeconds &, TUint32) |
IMPORT_C void | GetMinimumAndMaximum(TTimeIntervalSeconds &, TTimeIntervalSeconds &) |
IMPORT_C void | HandlePointerEventL(const TPointerEvent &) |
IMPORT_C void | PrepareForFocusLossL() |
IMPORT_C void | SetMinimumAndMaximum(const TTimeIntervalSeconds &, const TTimeIntervalSeconds &) |
IMPORT_C void | SetTimeOffset(const TTimeIntervalSeconds &) |
IMPORT_C TTimeIntervalSeconds | TimeOffset() |
Private Member Functions | |
---|---|
IMPORT_C void | CEikMfne_Reserved() |
void | DoSetMinimumAndMaximum(const TTimeIntervalSeconds &, const TTimeIntervalSeconds &) |
IMPORT_C void * | ExtensionInterface(TUid) |
Inherited Enumerations | |
---|---|
CCoeControl:TZoomType | |
CEikMfne:TFeatureId | |
CEikMfne:TFingerSupportParams |
Private Attributes | |
---|---|
TTimeIntervalSeconds | iMaximumTimeOffset |
TTimeIntervalSeconds | iMinimumTimeOffset |
CEikMfneSymbol * | iSign |
TInt | iSpare |
CTimeEditor * | iTimeEditor |
Inherited Attributes | |
---|---|
CCoeControl::iCoeEnv | |
CCoeControl::iContext | |
CCoeControl::iPosition | |
CCoeControl::iSize | |
CEikBorderedControl::iBorder |
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] |
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.
TResourceReader & 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.
const TTimeIntervalSeconds & aMinimumTimeOffset | The minimum allowable value, in seconds. |
const TTimeIntervalSeconds & aMaximumTimeOffset | The maximum allowable value, in seconds. |
const TTimeIntervalSeconds & aInitialTimeOffset | The initial value, in seconds. |
TUint32 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. |
void | DoSetMinimumAndMaximum | ( | const TTimeIntervalSeconds & | aMinimumTimeOffset, |
const TTimeIntervalSeconds & | aMaximumTimeOffset | |||
) | [private] |
const TTimeIntervalSeconds & aMinimumTimeOffset | |
const TTimeIntervalSeconds & aMaximumTimeOffset |
IMPORT_C void * | ExtensionInterface | ( | TUid | aInterface | ) | [private, virtual] |
From CAknControl
TUid aInterface |
IMPORT_C void | GetMinimumAndMaximum | ( | TTimeIntervalSeconds & | aMinimumTimeOffset, |
TTimeIntervalSeconds & | aMaximumTimeOffset | |||
) | const |
Gets the range of allowable values that may be entered by the user.
TTimeIntervalSeconds & aMinimumTimeOffset | On return, contains the time offset editor s minimum allowable value. |
TTimeIntervalSeconds & aMaximumTimeOffset | On return, contains the time offset editor s maximum allowable value. |
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 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.
const TTimeIntervalSeconds & aMinimumTimeOffset | The minimum allowable value. |
const TTimeIntervalSeconds & 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.
const TTimeIntervalSeconds & 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.
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.