CEikTimeAndDateEditor Class Reference

#include <mw/eikmfne.h>

Link against: eikctl.lib

class CEikTimeAndDateEditor : public CEikTTimeEditor
Public Member Functions
CEikTimeAndDateEditor()
virtual ~CEikTimeAndDateEditor()
virtual IMPORT_C voidConstructFromResourceL(TResourceReader &)
IMPORT_C voidConstructL(const TTime &, const TTime &, const TTime &, TUint32, HBufC *)
virtual IMPORT_C voidGetMinimumAndMaximum(TTime &, TTime &)
virtual IMPORT_C voidHandlePointerEventL(const TPointerEvent &)
IMPORT_C TBoolIsUninitialised()
virtual IMPORT_C TKeyResponseOfferKeyEventL(const TKeyEvent &, TEventCode)
virtual IMPORT_C voidPrepareForFocusLossL()
virtual IMPORT_C voidSetMinimumAndMaximum(const TTime &, const TTime &)
IMPORT_C voidSetTimeAndDate(const TTime &)
IMPORT_C voidSetUninitialised(TBool)
IMPORT_C TTimeTimeAndDate()
Inherited Attributes
CCoeControl::iCoeEnv
CCoeControl::iContext
CCoeControl::iPosition
CCoeControl::iSize
CEikBorderedControl::iBorder
Inherited Enumerations
CCoeControl:TZoomType
CEikMfne:TFeatureId
CEikMfne:TFingerSupportParams
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::CCoeControlArray
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::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()

Detailed Description

Time and date editor.

This control allows both a time and date to be displayed and edited. It contains the following time fields: hours, minutes and seconds, two time separator characters and am/pm text, and the following date fields: year, month and day, with two date separator characters. The seconds and hours fields are optional and the order of the date fields and the separator characters are locale-dependent. The upper and lower field bounds are set, and dates and times outside these bounds are invalid.

Date field values may be edited directly or via a pop-out calendar dialog.

The editor has an associated resource struct TIME_AND_DATE_EDITOR and control factory identifier EEikCtTimeAndDateEditor.

Constructor & Destructor Documentation

CEikTimeAndDateEditor ( )

IMPORT_CCEikTimeAndDateEditor()

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).

~CEikTimeAndDateEditor ( )

IMPORT_C~CEikTimeAndDateEditor()[virtual]

Destructor.

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

Member Function Documentation

ConstructFromResourceL ( TResourceReader & )

IMPORT_C voidConstructFromResourceL(TResourceReader &aResourceReader)[virtual]

Reimplemented from CCoeControl::ConstructFromResourceL(TResourceReader &)

Second phase construction from a resource.

This function completes the construction of a newly-allocated date/time editor from a TIME_AND_DATE_EDITOR resource. The minimum and maximum date/times, the date and time flag settings, and the intervening text are read from the resource, and ConstructL() is called with these settings. The initial date/time is set to the maximum date/time value.

ParameterDescription
aResourceReaderA resource file reader.

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

IMPORT_C voidConstructL(const TTime &aMinimumTimeAndDate,
const TTime &aMaximumTimeAndDate,
const TTime &aInitialTimeAndDate,
TUint32aFlags,
HBufC *aInterveningText = NULL
)

Second phase construction.

This function completes construction of a newly-allocated date and time editor, by setting the minimum, maximum and initial date and time values. It should be called by the container only if the control is not constructed from a resource file.

The aFlags parameter is used to set whether the seconds or hours fields are not 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, and whether the editor should have a pop-out calendar dialog.

The locale-dependant date and time settings specified in class TLocale are honoured.

If the initial date/time is outside the bounds specified by the minimum and maximum, it is set to the nearest valid setting.

A panic will occur if the minimum date/time is later than the maximum date/time.

ParameterDescription
aMinimumTimeAndDateThe minimum date and time value.
aMaximumTimeAndDateThe maximum date and time value.
aInitialTimeAndDateThe initial date and time value.
aFlagsA bitmask of flags. See eikon.hrh file, EEikTime, EEikDate etc.
aInterveningTextDescriptor containing the text to use to separate the time and date portions of the editor.

GetMinimumAndMaximum ( TTime &, TTime & )

IMPORT_C voidGetMinimumAndMaximum(TTime &aMinimumTimeAndDate,
TTime &aMaximumTimeAndDate
)const [virtual]

Reimplemented from CEikTTimeEditor::GetMinimumAndMaximum(TTime &,TTime &)const

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

ParameterDescription
aMinimumTimeAndDateOn return, contains the time and date editor's minimum allowable value.
aMaximumTimeAndDateOn return, contains the time and date editor's maximum allowable value.

HandlePointerEventL ( const TPointerEvent & )

IMPORT_C voidHandlePointerEventL(const TPointerEvent &aPointerEvent)[virtual]

Reimplemented from CEikMfne::HandlePointerEventL(const TPointerEvent &)

From CCoeControl.

Handles pointer events.

ParameterDescription
aPointerEventThe pointer event.

IsUninitialised ( )

IMPORT_C TBoolIsUninitialised()const

Gets the uninitialized status of the editor.

Returns: ETrue, if the editor is set as uninitialized.

OfferKeyEventL ( const TKeyEvent &, TEventCode )

IMPORT_C TKeyResponseOfferKeyEventL(const TKeyEvent &aKeyEvent,
TEventCodeaType
)[virtual]

Reimplemented from CEikMfne::OfferKeyEventL(const TKeyEvent &,TEventCode)

Handles key events.

For example, the Tab key validates and launches a calendar popout.

Calls CEikMfne::OfferKeyEventL() if the control does not consume the key.

ParameterDescription
aKeyEventThe key event.
aTypeThe type of key event.

Returns: Returns EKeyWasConsumed if the control consumes the key.

PrepareForFocusLossL ( )

IMPORT_C voidPrepareForFocusLossL()[virtual]

Reimplemented from CEikMfne::PrepareForFocusLossL()

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 date/time values, it is reset to the nearest allowable value, the function will leave and display an appropriate message.

SetMinimumAndMaximum ( const TTime &, const TTime & )

IMPORT_C voidSetMinimumAndMaximum(const TTime &aMinimumTimeAndDate,
const TTime &aMaximumTimeAndDate
)[virtual]

Reimplemented from CEikTTimeEditor::SetMinimumAndMaximum(const TTime &,const TTime &)

Sets the range of allowable values.

These define the maximum and minimum time/date values that may be entered by the user.

If the existing date/time value is outside the new bounds, it is reset to the nearest allowable value.

ParameterDescription
aMinimumTimeAndDateThe minimum allowable value.
aMaximumTimeAndDateThe maximum allowable value.

SetTimeAndDate ( const TTime & )

IMPORT_C voidSetTimeAndDate(const TTime &aTimeAndDate)

Sets the values of the time and date editor's fields.

ParameterDescription
aTimeAndDateThe new value for the date and time editor's fields.

SetUninitialised ( TBool )

IMPORT_C voidSetUninitialised(TBoolaUninitialised)

Sets the uninitialized status of the editor.

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

TimeAndDate ( )

IMPORT_C TTimeTimeAndDate()const

Gets the time and date editor's value.

Returns: The editor's value.