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 void | ConstructFromResourceL(TResourceReader &) |
IMPORT_C void | ConstructL(const TTime &, const TTime &, const TTime &, TBool) |
IMPORT_C TTime | Date() |
IMPORT_C void | GetMinimumAndMaximum(TTime &, TTime &) |
IMPORT_C void | HandlePointerEventL(const TPointerEvent &) |
IMPORT_C TBool | IsUninitialised() |
IMPORT_C TKeyResponse | OfferKeyEventL(const TKeyEvent &, TEventCode) |
IMPORT_C void | PrepareForFocusLossL() |
IMPORT_C void | SetDate(const TTime &) |
IMPORT_C void | SetMinimumAndMaximum(const TTime &, const TTime &) |
IMPORT_C void | SetUninitialised(TBool) |
Private Member Functions | |
---|---|
IMPORT_C void | CEikMfne_Reserved() |
void | CreatePopoutIfRequiredL() |
void | DoSetMinimumAndMaximum(const TTime &, const TTime &) |
IMPORT_C void * | ExtensionInterface(TUid) |
void | GetMinimumAndMaximumAndInitialDatesForCalendarL(TTime &, TTime &, TTime &) |
TTime | GetTTime() |
void | SetDateFromCalendarAndDrawNow(const TTime &) |
void | SetTTime(const TTime &) |
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 |
IMPORT_C void | ConstructFromResourceL | ( | 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.
TResourceReader & aResourceReader | A resource file reader. |
IMPORT_C void | ConstructL | ( | const TTime & | aMinimumDate, |
const TTime & | aMaximumDate, | |||
const TTime & | aInitialDate, | |||
TBool | aWithoutPopoutCalendar | |||
) |
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.
const TTime & aMinimumDate | The minimum allowable date. |
const TTime & aMaximumDate | The maximum allowable date. |
const TTime & aInitialDate | The initial value. |
TBool aWithoutPopoutCalendar | If ETrue the editor will not have a pop-out calendar dialog / icon. If EFalse the editor will have a pop-out calendar dialog / icon. |
void | DoSetMinimumAndMaximum | ( | const TTime & | aMinimumDate, |
const TTime & | aMaximumDate | |||
) | [private] |
IMPORT_C void * | ExtensionInterface | ( | TUid | aInterface | ) | [private, virtual] |
From CAknControl
TUid aInterface |
IMPORT_C void | GetMinimumAndMaximum | ( | TTime & | aMinimumDate, |
TTime & | aMaximumDate | |||
) | const [virtual] |
From CEikTTimeEditor.
Gets the date editor's minimum and maximum values.
void | GetMinimumAndMaximumAndInitialDatesForCalendarL | ( | TTime & | aMinimumDate, |
TTime & | aMaximumDate, | |||
TTime & | aInitialDate | |||
) | const [private, virtual] |
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.
IMPORT_C void | HandlePointerEventL | ( | const TPointerEvent & | aPointerEvent | ) | [virtual] |
From CCoeControl.
Handles pointer events.
const TPointerEvent & aPointerEvent | The pointer event. |
IMPORT_C TKeyResponse | OfferKeyEventL | ( | const TKeyEvent & | aKeyEvent, |
TEventCode | aType | |||
) | [virtual] |
From CCoeControl.
Handles key events.
const TKeyEvent & aKeyEvent | The key event. |
TEventCode aType | The type of key event. |
IMPORT_C void | PrepareForFocusLossL | ( | ) | [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.
IMPORT_C void | SetDate | ( | const TTime & | aDate | ) |
Sets the date editor's value.
const TTime & aDate | The editor's value. Time components are ignored. |
void | SetDateFromCalendarAndDrawNow | ( | const TTime & | aDate | ) | [private, virtual] |
const TTime & aDate |
IMPORT_C void | SetMinimumAndMaximum | ( | 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.
void | SetTTime | ( | const TTime & | aTime | ) | [private, virtual] |
An implementation (of this pure virtual function) should set the time in the editor.
const TTime & aTime | The time. |
IMPORT_C void | SetUninitialised | ( | TBool | aUninitialised | ) |
Sets date editor to initialised or uninitialised.
TBool aUninitialised | If ETrue then the date editor is set to be uninitialised. |
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.