CEikTimeEditor Class Reference

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 voidConstructFromResourceL(TResourceReader &)
IMPORT_C voidConstructL(const TTime &, const TTime &, const TTime &, TUint32)
IMPORT_C voidGetMinimumAndMaximum(TTime &, TTime &)
IMPORT_C voidHandlePointerEventL(const TPointerEvent &)
IMPORT_C TBoolIsUninitialised()
IMPORT_C voidPrepareForFocusLossL()
IMPORT_C voidSetMinimumAndMaximum(const TTime &, const TTime &)
IMPORT_C voidSetTime(const TTime &)
IMPORT_C voidSetUninitialised(TBool)
IMPORT_C TTimeTime()
Private Member Functions
IMPORT_C voidCEikMfne_Reserved()
voidDoSetMinimumAndMaximum(const TTime &, const TTime &)
IMPORT_C void *ExtensionInterface(TUid)
TTime GetTTime()
voidSetTTime(const TTime &)
Inherited Functions
CAknControl::CAknControl()
CAknControl::~CAknControl()
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()
CCoeControl::AccumulatedZoom()const
CCoeControl::ActivateGc()const
CCoeControl::ActivateL()
CCoeControl::BackedUpWindow()const
CCoeControl::Background()const
CCoeControl::CCoeControl()
CCoeControl::CCoeControl(CCoeEnv *)
CCoeControl::CCoeControl(const CCoeControl &)
CCoeControl::CapturesPointer()const
CCoeControl::ClaimPointerGrab(TBool)
CCoeControl::ClaimPointerGrab(TInt,TBool)
CCoeControl::CloseWindow()
CCoeControl::ComponentArrayExists()const
CCoeControl::ComponentControl(TInt)const
CCoeControl::Components()
CCoeControl::Components()const
CCoeControl::ControlContext()const
CCoeControl::ControlEnv()const
CCoeControl::CopyControlContextFrom(const CCoeControl *)
CCoeControl::CountComponentControls()const
CCoeControl::CreateBackedUpWindowL(RWindowTreeNode &)
CCoeControl::CreateBackedUpWindowL(RWindowTreeNode &,TDisplayMode)
CCoeControl::CreateWindowL()
CCoeControl::CreateWindowL(RWindowGroup *)
CCoeControl::CreateWindowL(RWindowTreeNode &)
CCoeControl::CreateWindowL(const CCoeControl *)
CCoeControl::CustomGc()const
CCoeControl::DeactivateGc()const
CCoeControl::DrawBackground(const TRect &)const
CCoeControl::DrawDeferred()const
CCoeControl::DrawForeground(const TRect &)const
CCoeControl::DrawNow()const
CCoeControl::DrawNow(const TRect &)const
CCoeControl::DrawableWindow()const
CCoeControl::EnableDragEvents()
CCoeControl::EnableReportControlStateChange(TBool)
CCoeControl::EnableWindowTransparency()
CCoeControl::FindBackground()const
CCoeControl::FindFontProvider()const
CCoeControl::GetColor(TInt,TRgb &)const
CCoeControl::GetGc()const
CCoeControl::GetHelpContext(TCoeHelpContext &)const
CCoeControl::GrabbingComponent()const
CCoeControl::GrabbingComponent(TInt)const
CCoeControl::HandleComponentControlsResourceChange(TInt)
CCoeControl::HandleControlArrayEventL(CCoeControlArray::TEvent,const CCoeControlArray *,CCoeControl *,TInt)
CCoeControl::HandlePointerBufferReadyL()
CCoeControl::HandleRedrawEvent(const TRect &)const
CCoeControl::HitTest()const
CCoeControl::IgnoreEventsUntilNextPointerUp()
CCoeControl::Index(const CCoeControl *)const
CCoeControl::InitComponentArrayL()
CCoeControl::IsActivated()const
CCoeControl::IsBackedUp()const
CCoeControl::IsBeingDestroyed()const
CCoeControl::IsBlank()const
CCoeControl::IsDimmed()const
CCoeControl::IsFocused()const
CCoeControl::IsNonFocusing()const
CCoeControl::IsReadyToDraw()const
CCoeControl::IsVisible()const
CCoeControl::LayoutManager()const
CCoeControl::MaximumWidth()const
CCoeControl::NotifyFontChange(const CCoeFontProvider *)
CCoeControl::Observer()const
CCoeControl::OverrideColorL(TInt,TRgb)
CCoeControl::OwnsWindow()const
CCoeControl::Parent()
CCoeControl::Parent()const
CCoeControl::Position()const
CCoeControl::PositionChanged()
CCoeControl::PositionRelativeToScreen()const
CCoeControl::PrepareForFocusGainL()
CCoeControl::ProcessPointerBufferReadyL()
CCoeControl::ProcessPointerEventL(const TPointerEvent &)
CCoeControl::Rect()const
CCoeControl::RecursivelyMergeInputCapabilities(TCoeInputCapabilities &)const
CCoeControl::RecursivelyMergedInputCapabilities()const
CCoeControl::RefetchPixelMappingL()
CCoeControl::RemoveFromParent()
CCoeControl::ReportEventL(MCoeControlObserver::TCoeEvent)
CCoeControl::RequestRelayout(const CCoeControl *)
CCoeControl::ResetGc()const
CCoeControl::ScreenFont(const TCoeFont &)const
CCoeControl::SetAllowStrayPointers()
CCoeControl::SetBackground(const MCoeControlBackground *)
CCoeControl::SetBlank()
CCoeControl::SetCanDrawOutsideRect()
CCoeControl::SetComponentsToInheritVisibility(TBool)
CCoeControl::SetContainerWindowL(RBackedUpWindow &)
CCoeControl::SetContainerWindowL(RWindow &)
CCoeControl::SetContainerWindowL(const CCoeControl &)
CCoeControl::SetControlContext(MCoeControlContext *)
CCoeControl::SetCornerAndSize(TGulAlignment,const TSize &)
CCoeControl::SetCustomGc(CWindowGc *)
CCoeControl::SetDimmed(TBool)
CCoeControl::SetExtent(const TPoint &,const TSize &)
CCoeControl::SetExtentToWholeScreen()
CCoeControl::SetFocus(TBool,TDrawNow)
CCoeControl::SetFocusing(TBool)
CCoeControl::SetFontProviderL(const CCoeFontProvider &)
CCoeControl::SetGc(CWindowGc *)const
CCoeControl::SetGloballyCapturing(TBool)
CCoeControl::SetHitTest(const MCoeControlHitTest *)
CCoeControl::SetLayoutManagerL(MCoeLayoutManager *)
CCoeControl::SetMaximumWidth(TInt)
CCoeControl::SetMopParent(MObjectProvider *)
CCoeControl::SetNeighbor(CCoeControl *)
CCoeControl::SetNonFocusing()
CCoeControl::SetObserver(MCoeControlObserver *)
CCoeControl::SetParent(CCoeControl *)
CCoeControl::SetPointerCapture(TBool)
CCoeControl::SetPosition(const TPoint &)
CCoeControl::SetRect(const TRect &)
CCoeControl::SetSize(const TSize &)
CCoeControl::SetSizeWithoutNotification(const TSize &)
CCoeControl::SetTextBaselineSpacing(TInt)
CCoeControl::SetUniqueHandle(TInt)
CCoeControl::SetZoomFactorL(TInt,TZoomType)
CCoeControl::Size()const
CCoeControl::SystemGc()const
CCoeControl::TextBaselineOffset(const TSize &)const
CCoeControl::TextDrawer(TInt)const
CCoeControl::UniqueHandle()const
CCoeControl::Window()const
CCoeControl::WriteInternalStateNowL(RWriteStream &)const
CCoeControl::ZoomWithType()const
CCoeControl::operator=(const CCoeControl &)
CCoeControl::~CCoeControl()
CEikBorderedControl::Border()const
CEikBorderedControl::CEikBorderedControl()
CEikBorderedControl::CEikBorderedControl(const TGulBorder &)
CEikBorderedControl::HasBorder()const
CEikBorderedControl::SetAdjacent(TInt)
CEikBorderedControl::SetBorder(TGulBorder::TBorderType)
CEikBorderedControl::SetBorder(TInt)
CEikMfne::AddField(CEikMfneField *)
CEikMfne::BorderMargins()const
CEikMfne::CEikMfne()
CEikMfne::Convert(const TTime &)
CEikMfne::Convert(const TTimeIntervalSeconds &)
CEikMfne::CreateFieldArrayL(TInt)
CEikMfne::CurrentField()const
CEikMfne::DrawNowAndLeaveWithTimeDateFormatInfoMsgL(TInt,const TTime &)const
CEikMfne::Field(TInt)const
CEikMfne::FieldIsAboutToBeDeHighlighted(CEikMfneField *,TBool &)
CEikMfne::FocusChanged(TDrawNow)
CEikMfne::Font()const
CEikMfne::GetColorUseListL(CArrayFix< TCoeColorUse > &)const
CEikMfne::GetCursorInfo(TPoint &,TInt &,TInt &,TInt &)
CEikMfne::GetFeature(TInt,TInt &)const
CEikMfne::HandleInteraction(TBool,TInt,TInt,CEikMfneField::THighlightType,TBool &,TBool &)
CEikMfne::HandleMfneCommandL(TInt)
CEikMfne::HandleResourceChange(TInt)
CEikMfne::HighlightField(TInt)
CEikMfne::InputCapabilities()const
CEikMfne::InvalidFieldAlert()
CEikMfne::LeaveWithAlert(TInt)
CEikMfne::MakeVisible(TBool)
CEikMfne::MfneSize()const
CEikMfne::MfneSize(TBool)
CEikMfne::MinimumSize()
CEikMfne::MopSupplyObject(TTypeUid)
CEikMfne::NumFields()const
CEikMfne::OfferKeyEventL(const TKeyEvent &,TEventCode)
CEikMfne::ReadDate(TResourceReader &)
CEikMfne::ReadDuration(TResourceReader &)
CEikMfne::ReadTime(TResourceReader &)
CEikMfne::ReadTimeAndDate(TResourceReader &)
CEikMfne::ReadTimeOffset(TResourceReader &)
CEikMfne::ReportStateChangeEventL()
CEikMfne::ReportUpdate()
CEikMfne::ResetFieldArray()
CEikMfne::SetCurrentField(TInt)
CEikMfne::SetFeature(TInt,TInt)
CEikMfne::SetFirstEditableField()
CEikMfne::SetFont(const CFont *)
CEikMfne::SetMfneAlignment(TInt)
CEikMfne::SetSkinBackgroundControlContextL(MAknsControlContext *)
CEikMfne::SetSkinTextColorL(TInt,TInt)
CEikMfne::SetSuppressBackgroundDrawing(TBool)
CEikMfne::SetUpAndDownKeysConsumed(TBool)
CEikMfne::SetUseOverrideColors(TBool)
CEikMfne::SetValidateCallBack(TCallBack)
CEikMfne::SizeChanged()
CEikMfne::SupportsFeature(TInt)const
CEikMfne::WriteInternalStateL(RWriteStream &)const
CEikMfne::~CEikMfne()
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

Constructor & Destructor Documentation

CEikTimeEditor()

IMPORT_CCEikTimeEditor()

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.

~CEikTimeEditor()

IMPORT_C~CEikTimeEditor()[virtual]

Destructor.

This frees the resources owned by the time editor, prior to its destruction.

Member Functions Documentation

CEikMfne_Reserved()

IMPORT_C voidCEikMfne_Reserved()[private, virtual]

ConstructFromResourceL(TResourceReader &)

IMPORT_C voidConstructFromResourceL(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.

Parameters

TResourceReader & aResourceReaderA resource file reader.

ConstructL(const TTime &, const TTime &, const TTime &, TUint32)

IMPORT_C voidConstructL(const TTime &aMinimumTime,
const TTime &aMaximumTime,
const TTime &aInitialTime,
TUint32aFlags
)

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.

Parameters

const TTime & aMinimumTimeThe minimum allowable time.
const TTime & aMaximumTimeThe maximum allowable time.
const TTime & aInitialTimeThe initial time.
TUint32 aFlagsDetermines which fields are required and whether or not to force 24 hour formatting. See eikon.hrh EEiktime etc.

DoSetMinimumAndMaximum(const TTime &, const TTime &)

voidDoSetMinimumAndMaximum(const TTime &aMinimumTime,
const TTime &aMaximumTime
)[private]

Parameters

const TTime & aMinimumTime
const TTime & aMaximumTime

ExtensionInterface(TUid)

IMPORT_C void *ExtensionInterface(TUidaInterface)[private, virtual]

Parameters

TUid aInterface

GetMinimumAndMaximum(TTime &, TTime &)

IMPORT_C voidGetMinimumAndMaximum(TTime &aMinimumTime,
TTime &aMaximumTime
)const [virtual]

Gets the range of allowable values that may be entered by the user.

Parameters

TTime & aMinimumTimeOn return, contains the time editor's minimum allowable value.
TTime & aMaximumTimeOn return, contains the time editor's maximum allowable value.

GetTTime()

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.

HandlePointerEventL(const TPointerEvent &)

IMPORT_C voidHandlePointerEventL(const TPointerEvent &aPointerEvent)[virtual]

From CCoeControl.

Handles pointer events.

Parameters

const TPointerEvent & aPointerEventThe pointer event.

IsUninitialised()

IMPORT_C TBoolIsUninitialised()const

Gets the uninitialized status of the editor.

PrepareForFocusLossL()

IMPORT_C voidPrepareForFocusLossL()[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.

SetMinimumAndMaximum(const TTime &, const TTime &)

IMPORT_C voidSetMinimumAndMaximum(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.

panic
38 If the minimum value exceeds the maximum.

Parameters

const TTime & aMinimumTimeThe minimum allowable value.
const TTime & aMaximumTimeThe maximum allowable value.

SetTTime(const TTime &)

voidSetTTime(const TTime &aTime)[private, virtual]

An implementation (of this pure virtual function) should set the time in the editor.

Parameters

const TTime & aTimeThe time.

SetTime(const TTime &)

IMPORT_C voidSetTime(const TTime &aTime)

Sets the time editor's value.

Parameters

const TTime & aTimeThe new value to which to set the editor's fields.

SetUninitialised(TBool)

IMPORT_C voidSetUninitialised(TBoolaUninitialised)

Sets the uninitialized status of the editor.

Parameters

TBool aUninitialisedIf ETrue, sets the editor as uninitialized, i.e. it doesn't display anything.

Time()

IMPORT_C TTimeTime()const

Gets the time editor's value.

Member Data Documentation

TTime iMaximumTime

TTime iMaximumTime[private]

TTime iMinimumTime

TTime iMinimumTime[private]

TInt iSpare

TInt iSpare[private]

CTimeEditor * iTimeEditor

CTimeEditor *iTimeEditor[private]