CEikDateEditor Class Reference

class CEikDateEditor : public CEikTTimeEditor

Date editor.

A date editor has five fields: day, month and year, and two separator characters. The order of the fields varies depending on the locale's date format setting. Locale information, which is set and retrieved using class TLocale, is used to determine field order and the characters used to separate the date components. The upper and lower field bounds are set, and dates outside these bounds are invalid.

The editor can be configured to launch a pop-out calendar dialog, CEikCalendar. This may be used to directly set the day, month and year values.

The editor has an associated resource struct DATE_EDITOR and control factory identifier EEikCtDateEditor.

Public Member Functions
CEikDateEditor()
~CEikDateEditor()
IMPORT_C voidConstructFromResourceL(TResourceReader &)
IMPORT_C voidConstructL(const TTime &, const TTime &, const TTime &, TBool)
IMPORT_C TTimeDate()
IMPORT_C voidGetMinimumAndMaximum(TTime &, TTime &)
IMPORT_C voidHandlePointerEventL(const TPointerEvent &)
IMPORT_C TBoolIsUninitialised()
IMPORT_C TKeyResponseOfferKeyEventL(const TKeyEvent &, TEventCode)
IMPORT_C voidPrepareForFocusLossL()
IMPORT_C voidSetDate(const TTime &)
IMPORT_C voidSetMinimumAndMaximum(const TTime &, const TTime &)
IMPORT_C voidSetUninitialised(TBool)
Private Member Functions
IMPORT_C voidCEikMfne_Reserved()
voidCreatePopoutIfRequiredL()
voidDoSetMinimumAndMaximum(const TTime &, const TTime &)
IMPORT_C void *ExtensionInterface(TUid)
voidGetMinimumAndMaximumAndInitialDatesForCalendarL(TTime &, TTime &, TTime &)
TTime GetTTime()
voidSetDateFromCalendarAndDrawNow(const TTime &)
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::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
CDateEditor *iDateEditor
TTime iMaximumDate
TTime iMinimumDate
TInt iSpare
Inherited Attributes
CCoeControl::iCoeEnv
CCoeControl::iContext
CCoeControl::iPosition
CCoeControl::iSize
CEikBorderedControl::iBorder

Constructor & Destructor Documentation

CEikDateEditor()

IMPORT_CCEikDateEditor()

C++ default constructor.

~CEikDateEditor()

IMPORT_C~CEikDateEditor()[virtual]

Destructor.

Member Functions Documentation

CEikMfne_Reserved()

IMPORT_C voidCEikMfne_Reserved()[private, virtual]

ConstructFromResourceL(TResourceReader &)

IMPORT_C voidConstructFromResourceL(TResourceReader &aResourceReader)[virtual]

From CCoeControl.

Second-phase construction from a resource file.

The function reads the maximum and minimum date values and whether or not the editor should support a pop-out calendar and/or date icon from a DATE_EDITOR resource. It sets the initial date to be the same as the maximum date and honours the locale's date format and separators.

Parameters

TResourceReader & aResourceReaderA resource file reader.

ConstructL(const TTime &, const TTime &, const TTime &, TBool)

IMPORT_C voidConstructL(const TTime &aMinimumDate,
const TTime &aMaximumDate,
const TTime &aInitialDate,
TBoolaWithoutPopoutCalendar
)

Handles 2nd phase construction.

This function completes the construction of a newly-allocated date editor. This function should be used instead of ConstructFromResourceL() when not initialising from a resource file. The editor's minimum, maximum and initial date values are set and the date format and date separator characters specified in class TLocale are honoured.

Parameters

const TTime & aMinimumDateThe minimum allowable date.
const TTime & aMaximumDateThe maximum allowable date.
const TTime & aInitialDateThe initial value.
TBool aWithoutPopoutCalendarIf ETrue the editor will not have a pop-out calendar dialog / icon. If EFalse the editor will have a pop-out calendar dialog / icon.

CreatePopoutIfRequiredL()

voidCreatePopoutIfRequiredL()[private, virtual]

Date()

IMPORT_C TTimeDate()const

Gets the date editor's value.

The editor's date value.

DoSetMinimumAndMaximum(const TTime &, const TTime &)

voidDoSetMinimumAndMaximum(const TTime &aMinimumDate,
const TTime &aMaximumDate
)[private]

Parameters

const TTime & aMinimumDate
const TTime & aMaximumDate

ExtensionInterface(TUid)

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

Parameters

TUid aInterface

GetMinimumAndMaximum(TTime &, TTime &)

IMPORT_C voidGetMinimumAndMaximum(TTime &aMinimumDate,
TTime &aMaximumDate
)const [virtual]

From CEikTTimeEditor.

Gets the date editor's minimum and maximum values.

Parameters

TTime & aMinimumDateOn return, the minimum allowable value.
TTime & aMaximumDateOn return, the maximum allowable value.

GetMinimumAndMaximumAndInitialDatesForCalendarL(TTime &, TTime &, TTime &)

voidGetMinimumAndMaximumAndInitialDatesForCalendarL(TTime &aMinimumDate,
TTime &aMaximumDate,
TTime &aInitialDate
)const [private, virtual]

Parameters

TTime & aMinimumDate
TTime & aMaximumDate
TTime & aInitialDate

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.

The time.

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

Tests whether the editor is uninitialised.

ETrue if uninitialised.

OfferKeyEventL(const TKeyEvent &, TEventCode)

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

From CCoeControl.

Handles key events.

EKeyConsumed if the key has beend handled.

Parameters

const TKeyEvent & aKeyEventThe key event.
TEventCode aTypeThe type of key event.

PrepareForFocusLossL()

IMPORT_C voidPrepareForFocusLossL()[virtual]

From CCoeControl.

Editor validation.

This function should be called before an attempt is made to remove focus from a date editor. If the control value is not within the bounds specified by the minimum and maximum date values, it is reset to the nearest allowable value, the function then leaves.

SetDate(const TTime &)

IMPORT_C voidSetDate(const TTime &aDate)

Sets the date editor's value.

Parameters

const TTime & aDateThe editor's value. Time components are ignored.

SetDateFromCalendarAndDrawNow(const TTime &)

voidSetDateFromCalendarAndDrawNow(const TTime &aDate)[private, virtual]

Parameters

const TTime & aDate

SetMinimumAndMaximum(const TTime &, const TTime &)

IMPORT_C voidSetMinimumAndMaximum(const TTime &aMinimumDate,
const TTime &aMaximumDate
)[virtual]

From CEikTTimeEditor.

Sets the minimum and maximum allowable dates.

If the current date is outside the new bounds it is changed to be within them.

Parameters

const TTime & aMinimumDateThe minimum allowable value.
const TTime & aMaximumDateThe 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.

SetUninitialised(TBool)

IMPORT_C voidSetUninitialised(TBoolaUninitialised)

Sets date editor to initialised or uninitialised.

Parameters

TBool aUninitialisedIf ETrue then the date editor is set to be uninitialised.

Member Data Documentation

CDateEditor * iDateEditor

CDateEditor *iDateEditor[private]

TTime iMaximumDate

TTime iMaximumDate[private]

TTime iMinimumDate

TTime iMinimumDate[private]

TInt iSpare

TInt iSpare[private]