CEikDateEditor Class Reference

API published in: S60 1st Ed

Link against: avkon.lib eikctl.lib eikcoctl.lib uiklaf.lib form.lib

Capability Information

Required Capabilities

None


#include <eikmfne.h>

Inherits CEikTTimeEditor, and MEikCalendarObserver.


Detailed Description

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

IMPORT_C  CEikDateEditor ()
  C++ default constructor.
virtual IMPORT_C  ~CEikDateEditor ()
  Destructor.
IMPORT_C void  ConstructL (const TTime &aMinimumDate, const TTime &aMaximumDate, const TTime &aInitialDate, TBool aWithoutPopoutCalendar)
  Handles 2nd phase construction.
IMPORT_C void  SetDate (const TTime &aDate)
  Sets the date editor's value.
IMPORT_C TTime  Date () const
  Gets the date editor's value.
IMPORT_C void  SetUninitialised (TBool aUninitialised)
  Sets date editor to initialised or uninitialised.
IMPORT_C TBool  IsUninitialised () const
  Tests whether the editor is uninitialised.
virtual IMPORT_C void  SetMinimumAndMaximum (const TTime &aMinimumDate, const TTime &aMaximumDate)
  From CEikTTimeEditor.
virtual IMPORT_C void  GetMinimumAndMaximum (TTime &aMinimumDate, TTime &aMaximumDate) const
  From CEikTTimeEditor.
virtual IMPORT_C TKeyResponse  OfferKeyEventL (const TKeyEvent &aKeyEvent, TEventCode aType)
  From CCoeControl.
virtual IMPORT_C void  ConstructFromResourceL (TResourceReader &aResourceReader)
  From CCoeControl.
virtual IMPORT_C void  PrepareForFocusLossL ()
  From CCoeControl.
IMPORT_C void  HandlePointerEventL (const TPointerEvent &aPointerEvent)
  From CCoeControl.

Constructor & Destructor Documentation

IMPORT_C CEikDateEditor::CEikDateEditor  ) 
 

C++ default constructor.

virtual IMPORT_C CEikDateEditor::~CEikDateEditor  )  [virtual]
 

Destructor.


Member Function Documentation

virtual IMPORT_C void CEikDateEditor::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.

Parameters:
aResourceReader  A resource file reader.
IMPORT_C void CEikDateEditor::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.

Parameters:
aMinimumDate  The minimum allowable date.
aMaximumDate  The maximum allowable date.
aInitialDate  The initial value.
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.
IMPORT_C TTime CEikDateEditor::Date  )  const
 

Gets the date editor's value.

Returns:
The editor's date value.
virtual IMPORT_C void CEikDateEditor::GetMinimumAndMaximum TTime &  aMinimumDate,
TTime &  aMaximumDate
const [virtual]
 

From CEikTTimeEditor.

Gets the date editor's minimum and maximum values.

Parameters:
aMinimumDate  On return, the minimum allowable value.
aMaximumDate  On return, the maximum allowable value.

Implements CEikTTimeEditor.

IMPORT_C void CEikDateEditor::HandlePointerEventL const TPointerEvent &  aPointerEvent  )  [virtual]
 

From CCoeControl.

Handles pointer events.

Parameters:
aPointerEvent  The pointer event.

Reimplemented from CEikMfne.

IMPORT_C TBool CEikDateEditor::IsUninitialised  )  const
 

Tests whether the editor is uninitialised.

Returns:
ETrue if uninitialised.
virtual IMPORT_C TKeyResponse CEikDateEditor::OfferKeyEventL const TKeyEvent &  aKeyEvent,
TEventCode  aType
[virtual]
 

From CCoeControl.

Handles key events.

Parameters:
aKeyEvent  The key event.
aType  The type of key event.
Returns:
EKeyConsumed if the key has beend handled.

Reimplemented from CEikMfne.

virtual IMPORT_C void CEikDateEditor::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.

Reimplemented from CEikMfne.

IMPORT_C void CEikDateEditor::SetDate const TTime &  aDate  ) 
 

Sets the date editor's value.

Parameters:
aDate  The editor's value. Time components are ignored.
virtual IMPORT_C void CEikDateEditor::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.

Parameters:
aMinimumDate  The minimum allowable value.
aMaximumDate  The maximum allowable value.

Implements CEikTTimeEditor.

IMPORT_C void CEikDateEditor::SetUninitialised TBool  aUninitialised  ) 
 

Sets date editor to initialised or uninitialised.

Parameters:
aUninitialised  If ETrue then the date editor is set to be uninitialised.

The documentation for this class was generated from the following file:

Copyright © Nokia Corporation 2001-2008
Back to top