UIQ Technology
 Developer Library

UIQ 3 SDK

UIQ developer portal

FEEDBACK 

[Index] [Spacer] [Previous] [Next]



Location: QikDurationEditor.h
Link against: qikctl.lib

Class CQikDurationEditor

class CQikDurationEditor : public CQikTTimeEditor, public MCoeControlObserver, public MQikCommandListOwner, public MQikCommandHandler;

Description

Duration editor.

This editor displays a time duration. On a tap, a time picker control is displayed — this can be used to select a new duration. Global locale information is used to determine the time separator — see TLocale .

Members are provided for setting the maximum and minimum values that the user may enter into the editor, and for getting and setting the current editor value. Flags can be passed to either of the second phase constructors to disable the Time picker popout.

This class derives from CQikTTimeEditor and is not intended for user derivation. Associated resource is QIK_DURATION_EDITOR .

Derivation

  • MObjectProvider - An interface that allows an object to be part of a network of object providers
  • CBase - Base class for all classes to be instantiated on the heap
  • Members

    Defined in CQikDurationEditor:
    CQikDurationEditor(), ConstructFromResourceL(), ConstructL(), Duration(), GetColorUseListL(), GetMinimumAndMaximum(), HandleCommandL(), HandleControlEventL(), HandleResourceChange(), MapCommandHandler(), MinimumSize(), OfferKeyEventL(), PrepareForFocusGainL(), PrepareForFocusLossL(), SetDurationL(), SetMinimumAndMaximum(), ~CQikDurationEditor()

    Inherited from CBase:
    Delete(), Extension_(), operator new()

    Inherited from CCoeControl:
    AccumulatedZoom(), ActivateGc(), BackedUpWindow(), Background(), CapturesPointer(), ClaimPointerGrab(), CloseWindow(), Components(), ControlContext(), ControlEnv(), CopyControlContextFrom(), CreateBackedUpWindowL(), CreateWindowL(), DeactivateGc(), DrawBackground(), DrawDeferred(), DrawForeground(), DrawNow(), DrawableWindow(), EAbsoluteZoom, ERelativeZoom, EnableDragEvents(), FindBackground(), FindFontProvider(), GetColor(), GetGc(), GrabbingComponent(), HandleComponentControlsResourceChange(), HandleRedrawEvent(), HitTest(), IgnoreEventsUntilNextPointerUp(), Index(), InitComponentArrayL(), IsActivated(), IsBackedUp(), IsBeingDestroyed(), IsBlank(), IsDimmed(), IsFocused(), IsNonFocusing(), IsReadyToDraw(), IsVisible(), LayoutManager(), MaximumWidth(), Observer(), OverrideColorL(), OwnsWindow(), Parent(), Position(), PositionRelativeToScreen(), Rect(), RecursivelyMergedInputCapabilities(), ReportEventL(), Reserved_CCoeControl_10(), Reserved_CCoeControl_11(), Reserved_CCoeControl_12(), Reserved_CCoeControl_13(), ResetGc(), ScreenFont(), SetAllowStrayPointers(), SetBackground(), SetBlank(), SetCanDrawOutsideRect(), SetComponentsToInheritVisibility(), SetControlContext(), SetCornerAndSize(), SetExtent(), SetExtentToWholeScreen(), SetFocus(), SetFocusing(), SetFontProviderL(), SetGc(), SetGloballyCapturing(), SetHitTest(), SetMaximumWidth(), SetMopParent(), SetNonFocusing(), SetObserver(), SetPointerCapture(), SetPosition(), SetRect(), SetSize(), SetSizeWithoutNotification(), SetUniqueHandle(), SetZoomFactorL(), Size(), SystemGc(), TZoomType, TextDrawer(), UniqueHandle(), Window(), ZoomWithType(), iCoeEnv, iContext, iPosition, iSize

    Inherited from CEikBorderedControl:
    ActivateL(), Border(), ComponentControl(), CountComponentControls(), FocusChanged(), GetHelpContext(), HandleControlArrayEventL(), HandlePointerBufferReadyL(), HandlePointerEventL(), HasBorder(), InputCapabilities(), MakeVisible(), MopSupplyObject(), PositionChanged(), RequestRelayout(), SetAdjacent(), SetBorder(), SetContainerWindowL(), SetDimmed(), SetLayoutManagerL(), SetNeighbor(), SetParent(), SetTextBaselineSpacing(), SizeChanged(), TextBaselineOffset(), WriteInternalStateL(), iBorder

    Inherited from CQikTTimeEditor:
    Draw(), DrawContent(), EDisableWrapTime, EFiveMinuteSteps, EForce24HourFormat, EMirroredLayout, EWithoutPopoutCalendar, EWithoutPopoutPicker, Font(), SetTimeL(), SetWrapTime(), Time(), anonymous, iDateString, iTimeString

    Inherited from MCoeControlObserver:
    EEventInteractionRefused, EEventPrepareFocusTransition, EEventRequestCancel, EEventRequestExit, EEventRequestFocus, EEventStateChanged, TCoeEvent

    Inherited from MEikBorderedControl:
    ETypeId

    Inherited from MObjectProvider:
    MopGetObject(), MopGetObjectNoChaining()

    Inherited from MQikCommandHandler:
    HandleAttemptDimmedSelectionL()


    Construction and destruction


    CQikDurationEditor()

    IMPORT_C CQikDurationEditor();

    Description

    Default constructor.

    This function constructs an uninitialised CQikDurationEditor . It 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).

    See also:


    ~CQikDurationEditor()

    IMPORT_C ~CQikDurationEditor();

    Description

    Destructor. The destructor frees any resources owned by the editor, including the Time picker popout, prior to its destruction.

    See also:


    ConstructL()

    IMPORT_C void ConstructL(TTimeIntervalSeconds aMinimumDuration, TTimeIntervalSeconds aMaximumDuration, TTimeIntervalSeconds aInitialDuration, TUint32 aFlags);

    Description

    Second phase construction. This function should be called by the container, in derived classes, only if the control is not constructed from a resource file.

    The function completes the construction of a newly-allocated duration editor, by setting its minimum, maximum and initial values, and the editor flags. The time separator characters specified in class TLocale are honoured.

    The function does not check that the initial time is between the maximum and minimum values, and it does not check that the maximum duration is greater than the minimum duration.

    Parameters

    TTimeIntervalSeconds aMinimumDuration

    Minimum duration allowed for this control.

    TTimeIntervalSeconds aMaximumDuration

    Maximum duration allowed for this control.

    TTimeIntervalSeconds aInitialDuration

    The initial duration.

    TUint32 aFlags

    Flags to allow some special features.

    [Top]


    Member functions


    SetMinimumAndMaximum()

    IMPORT_C void SetMinimumAndMaximum(TTimeIntervalSeconds aMinimumDuration, TTimeIntervalSeconds aMaximumDuration);

    Description

    Sets the duration editor's maximum and minimum permissible values. The editor will not allow users to enter values outside these bounds.

    Parameters

    TTimeIntervalSeconds aMinimumDuration

    The minimum allowed editor value, in seconds.

    TTimeIntervalSeconds aMaximumDuration

    The maximum allowed editor value, in seconds.

    See also:


    GetMinimumAndMaximum()

    IMPORT_C void GetMinimumAndMaximum(TTimeIntervalSeconds &aMinimumDuration, TTimeIntervalSeconds &aMaximumDuration) const;

    Description

    Gets the duration editor's maximum and minimum permissible values. The editor will not allow users to enter values outside these bounds.

    Parameters

    TTimeIntervalSeconds &aMinimumDuration

    The minimum allowed editor value, in seconds.

    TTimeIntervalSeconds &aMaximumDuration

    The maximum allowed editor value, in seconds.

    See also:


    SetDurationL()

    IMPORT_C void SetDurationL(TTimeIntervalSeconds aDuration);

    Description

    Sets the editor's current duration value.

    Parameters

    TTimeIntervalSeconds aDuration

    The new duration value, in seconds.

    See also:


    Duration()

    IMPORT_C TTimeIntervalSeconds Duration() const;

    Description

    Gets the editor's current duration value.

    Return value

    TTimeIntervalSeconds

    The current duration, in seconds.

    See also:


    ConstructFromResourceL()

    virtual IMPORT_C void ConstructFromResourceL(TResourceReader &aResourceReader);

    Description

    Second phase construction from a resource.

    This function completes the construction of a newly-allocated duration editor from a QIK_DURATION_EDITOR resource. The minimum and maximum values and the editor flags are read from the resource, and ConstructL() is called with these settings. The initial duration is set to the maximum duration value.

    Parameters

    TResourceReader &aResourceReader

    A resource file reader.

    See also:


    MinimumSize()

    virtual IMPORT_C TSize MinimumSize();

    Description

    Gets the minimum size of the control.

    Return value

    TSize

    The minimum size of the control.

    See also:


    GetColorUseListL()

    virtual IMPORT_C void GetColorUseListL(CArrayFix< TCoeColorUse > &aColorUseList) const;

    Description

    Gets the list of logical colors used to draw the control. Pairs the colors with an explanation of how they are used and appends this information to aColorUseList .

    Parameters

    CArrayFix< TCoeColorUse > &aColorUseList

    The list of logical colors.

    See also:


    HandleResourceChange()

    virtual IMPORT_C void HandleResourceChange(TInt aType);

    Description

    Handles a change to the control's resources which are shared across the environment. Colors or fonts for example.

    Parameters

    TInt aType

    The type of resource that has changed.

    See also:


    OfferKeyEventL()

    virtual IMPORT_C TKeyResponse OfferKeyEventL(const TKeyEvent &aKeyEvent, TEventCode aType);

    Description

    Handles key events.

    Parameters

    const TKeyEvent &aKeyEvent

    The key event.

    TEventCode aType

    The type of the event: EEventKeyDown, EEventKeyUp or EEventKey.

    Return value

    TKeyResponse

    A suitable response code.


    PrepareForFocusGainL()

    virtual IMPORT_C void PrepareForFocusGainL();

    Description

    Notifier called upon before the control gains focus.

    See also:


    PrepareForFocusLossL()

    virtual IMPORT_C void PrepareForFocusLossL();

    Description

    Notifier called upon before the control loses focus.

    See also:


    MapCommandHandler()

    virtual IMPORT_C MQikCommandHandler *MapCommandHandler(CQikCommand &aCommand);

    Description

    Parameters

    CQikCommand &aCommand

    Return value

    MQikCommandHandler *

    See also:


    HandleCommandL()

    virtual IMPORT_C void HandleCommandL(CQikCommand &aCommand);

    Description

    Parameters

    CQikCommand &aCommand

    See also:


    HandleControlEventL()

    virtual IMPORT_C void HandleControlEventL(CCoeControl *aControl, TCoeEvent aEventType);

    Description

    Handles control events.

    The function gets events for the time picker popout - it may or may not retrieve the duration value (depending on whether the popout was cancelled) and then destroys popout.

    Parameters

    CCoeControl *aControl

    The control sending the event.

    TCoeEvent aEventType

    The event type. Either EEventRequestExit or EEventRequestCancel .

    See also:

    Terms and conditions of use of the material