CEikTimeOffsetEditor Class Reference

class CEikTimeOffsetEditor : public CEikMfne

Time offset editor.

This control allows a signed time offset to be displayed and edited. It has the same fields as the time editor control CEikTimeEditor , except there is no AM or PM text because the value is a time offset, positive or negative, from 0 to 24 hours rather than a point in time.

The editor has an associated resource struct TIME_OFFSET_EDITOR and control factory identifier EEikCtTimeOffsetEditor.

Public Member Functions
CEikTimeOffsetEditor ()
~CEikTimeOffsetEditor ()
IMPORT_C void ConstructFromResourceL ( TResourceReader &)
IMPORT_C void ConstructL (const TTimeIntervalSeconds &, const TTimeIntervalSeconds &, const TTimeIntervalSeconds &, TUint32 )
IMPORT_C void GetMinimumAndMaximum ( TTimeIntervalSeconds &, TTimeIntervalSeconds &)
IMPORT_C void HandlePointerEventL (const TPointerEvent &)
IMPORT_C void PrepareForFocusLossL ()
IMPORT_C void SetMinimumAndMaximum (const TTimeIntervalSeconds &, const TTimeIntervalSeconds &)
IMPORT_C void SetTimeOffset (const TTimeIntervalSeconds &)
IMPORT_C TTimeIntervalSeconds TimeOffset ()
Private Member Functions
IMPORT_C void CEikMfne_Reserved ()
void DoSetMinimumAndMaximum (const TTimeIntervalSeconds &, const TTimeIntervalSeconds &)
IMPORT_C void * ExtensionInterface ( TUid )
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
TTimeIntervalSeconds iMaximumTimeOffset
TTimeIntervalSeconds iMinimumTimeOffset
CEikMfneSymbol * iSign
TInt iSpare
CTimeEditor * iTimeEditor
Inherited Attributes
CCoeControl::iCoeEnv
CCoeControl::iContext
CCoeControl::iPosition
CCoeControl::iSize
CEikBorderedControl::iBorder

Constructor & Destructor Documentation

CEikTimeOffsetEditor()

IMPORT_C CEikTimeOffsetEditor ( )

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.

~CEikTimeOffsetEditor()

IMPORT_C ~CEikTimeOffsetEditor ( ) [virtual]

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

Member Functions Documentation

CEikMfne_Reserved()

IMPORT_C void CEikMfne_Reserved ( ) [private, virtual]

ConstructFromResourceL(TResourceReader &)

IMPORT_C void ConstructFromResourceL ( TResourceReader & aResourceReader ) [virtual]

Second phase construction from a resource.

This function completes the construction of a time offset editor from a TIME_OFFSET_EDITOR resource.

The minimum and maximum time offsets, and the flags settings are read from the resource, and ConstructL() is called with these settings. The initial time offset is set to the maximum time offset value.

Parameters

TResourceReader & aResourceReader A resource file reader.

ConstructL(const TTimeIntervalSeconds &, const TTimeIntervalSeconds &, const TTimeIntervalSeconds &, TUint32)

IMPORT_C void ConstructL ( const TTimeIntervalSeconds & aMinimumTimeOffset,
const TTimeIntervalSeconds & aMaximumTimeOffset,
const TTimeIntervalSeconds & aInitialTimeOffset,
TUint32 aFlags
)

Second phase constructor.

This function completes the construction of a time offset editor, by setting its minimum, maximum and initial values. The time separator characters specified in the system's locale are honoured. It should be called by the container only if the control is not constructed from a resource file.

The aFlags parameter is used to determine whether the seconds or hours fields are displayed by the editor. The minutes field is always displayed. This function forces 24 hour time format for the time offset editor, overriding the locale's setting.

If the initial time offset is outside the bounds specified, it is invalid and will be reset to the upper or lower bound.

The minimum value for a time offset editor is -23:59:59, and the maximum value is 23:59:59.

Parameters

const TTimeIntervalSeconds & aMinimumTimeOffset The minimum allowable value, in seconds.
const TTimeIntervalSeconds & aMaximumTimeOffset The maximum allowable value, in seconds.
const TTimeIntervalSeconds & aInitialTimeOffset The initial value, in seconds.
TUint32 aFlags Determines which fields are required. Specify CTimeEditor::EWithoutSecondsField for no seconds field, CTimeEditor::EWithoutHoursField for no hours field. 24 hour clock format is set, regardless of the flag setting specified in this parameter.

DoSetMinimumAndMaximum(const TTimeIntervalSeconds &, const TTimeIntervalSeconds &)

void DoSetMinimumAndMaximum ( const TTimeIntervalSeconds & aMinimumTimeOffset,
const TTimeIntervalSeconds & aMaximumTimeOffset
) [private]

Parameters

const TTimeIntervalSeconds & aMinimumTimeOffset
const TTimeIntervalSeconds & aMaximumTimeOffset

ExtensionInterface(TUid)

IMPORT_C void * ExtensionInterface ( TUid aInterface ) [private, virtual]

Parameters

TUid aInterface

GetMinimumAndMaximum(TTimeIntervalSeconds &, TTimeIntervalSeconds &)

IMPORT_C void GetMinimumAndMaximum ( TTimeIntervalSeconds & aMinimumTimeOffset,
TTimeIntervalSeconds & aMaximumTimeOffset
) const

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

Parameters

TTimeIntervalSeconds & aMinimumTimeOffset On return, contains the time offset editor s minimum allowable value.
TTimeIntervalSeconds & aMaximumTimeOffset On return, contains the time offset editor s maximum allowable value.

HandlePointerEventL(const TPointerEvent &)

IMPORT_C void HandlePointerEventL ( const TPointerEvent & aPointerEvent ) [virtual]

From CCoeControl .

Handles pointer events.

Parameters

const TPointerEvent & aPointerEvent The pointer event.

PrepareForFocusLossL()

IMPORT_C void PrepareForFocusLossL ( ) [virtual]

Prepares 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 offset values, it is reset to the nearest allowable value. The function then leaves.

SetMinimumAndMaximum(const TTimeIntervalSeconds &, const TTimeIntervalSeconds &)

IMPORT_C void SetMinimumAndMaximum ( const TTimeIntervalSeconds & aMinimumTimeOffset,
const TTimeIntervalSeconds & aMaximumTimeOffset
)

Sets the range of allowable offset values.

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

If the existing offset value is outside the bounds set by this function, it is reset to the nearest boundary value.

panic
49 If the minimum exceeds the maximum.

Parameters

const TTimeIntervalSeconds & aMinimumTimeOffset The minimum allowable value.
const TTimeIntervalSeconds & aMaximumTimeOffset The maximum allowable value.

SetTimeOffset(const TTimeIntervalSeconds &)

IMPORT_C void SetTimeOffset ( const TTimeIntervalSeconds & aTimeOffset )

Sets the time offset editor's value.

The sign is set according to whether the value specified is positive or negative.

Parameters

const TTimeIntervalSeconds & aTimeOffset The new offset value to which to assign to the editor.

TimeOffset()

IMPORT_C TTimeIntervalSeconds TimeOffset ( ) const

Gets the time offset editor's value converted into seconds.

Member Data Documentation

TTimeIntervalSeconds iMaximumTimeOffset

TTimeIntervalSeconds iMaximumTimeOffset [private]

TTimeIntervalSeconds iMinimumTimeOffset

TTimeIntervalSeconds iMinimumTimeOffset [private]

CEikMfneSymbol * iSign

CEikMfneSymbol * iSign [private]

TInt iSpare

TInt iSpare [private]

CTimeEditor * iTimeEditor

CTimeEditor * iTimeEditor [private]