Link against: avkon.lib eikcoctl.lib eikctl.lib form.lib uiklaf.lib
None
#include <EIKMFNE.H>
Inherits CEikMfne.
The duration editor allows a time duration to be displayed and edited. The editor has a clock icon and an edit field with separators for hours, minutes, and seconds. These fields can all be suppressed using the appropriate flags in the resource declaration.
Unlike the time editor control, the duration editor has no am or pm text. This is because the duration is a length of time (from 0 to 24 hours), rather than a point in time.
The minimum and maximum values are set, and values outside these limits are invalid.
The editor has an associated resource struct DURATION_EDITOR and control factory identifier EEikCtDurationEditor.
Public Member Functions | |
IMPORT_C | CEikDurationEditor () |
Default constructor. | |
virtual IMPORT_C | ~CEikDurationEditor () |
Destructor. | |
IMPORT_C void | ConstructL (const TTimeIntervalSeconds &aMinimumDuration, const TTimeIntervalSeconds &aMaximumDuration, const TTimeIntervalSeconds &aInitialDuration, TUint32 aFlags) |
Second phase construction. | |
IMPORT_C void | SetMinimumAndMaximum (const TTimeIntervalSeconds &aMinimumDuration, const TTimeIntervalSeconds &aMaximumDuration) |
Sets the minimum and maximum duration values. | |
IMPORT_C void | GetMinimumAndMaximum (TTimeIntervalSeconds &aMinimumDuration, TTimeIntervalSeconds &aMaximumDuration) const |
Gets the duration editor's minimum and maximum values. | |
IMPORT_C void | SetDuration (const TTimeIntervalSeconds &aDuration) |
Sets the duration editor's value. | |
IMPORT_C TTimeIntervalSeconds | Duration () const |
Gets the duration editor's value and returns it as a period of seconds. | |
IMPORT_C void | ConstructFromResourceL (TResourceReader &aResourceReader) |
Second-phase construction from a resource. | |
IMPORT_C void | PrepareForFocusLossL () |
Editor validation. | |
IMPORT_C void | HandlePointerEventL (const TPointerEvent &aPointerEvent) |
From CCoeControl . |
|
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. |
|
Destructor. The destructor frees the resources owned by the duration editor, prior to its destruction. |
|
Second-phase construction from a resource. The function reads the maximum and minimum duration values, and the flags settings, from a DURATION_EDITOR resource. It sets the initial duration to be the same as the maximum value and honours the locale's time separators.
|
|
Second phase construction. This function completes the construction of a newly-allocated duration editor. This function should be used instead of ConstructFromResourceL() when not initialising from a resource file. The function sets the editor's minimum, maximum and initial values. The time separator characters specified in class TLocale are honoured. If the initial duration is less than the minimum value the minimum value is used as the initial setting. If the initial duration is greater than the maximum value the maximum value is used as the initial setting. The aFlags parameter is used to determine whether the seconds or hours fields are not required. The minutes field is always present. Regardless of the value specified in aFlags, 24 hour time format is set, overriding the locale's setting.
|
|
Gets the duration editor's value and returns it as a period of seconds.
|
|
Gets the duration editor's minimum and maximum values.
|
|
From Handles pointer events.
Reimplemented from CEikMfne. |
|
Editor validation. This function should be called when an attempt is made to remove focus from a duration editor. If the editor value is not within the bounds specified by the minimum and maximum duration values, it is reset to the nearest allowable value - the function will leave. Reimplemented from CEikMfne. |
|
Sets the duration editor's value.
|
|
Sets the minimum and maximum duration values. The user can only enter values between these bounds.
|