UIQ Technology
 Developer Library

UIQ 3 SDK

UIQ developer portal

FEEDBACK 

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



Location: QikFloatingPointEditor.h
Link against: qikctl.lib

Class CQikFloatingPointEditor

class CQikFloatingPointEditor : public CQikNumericEditor, public MQikControlStreamInterface, public MQikCommandHandler, public MQikCommandListOwner;

Description

Floating point editor.

This control supports editing a single floating point value. The maximum and minimum numbers which can be entered into the editor may be set. Values outside these bounds are invalid, and a warning is given when an attempt is made to remove focus. The class also specifies the maximum length of the editor, in characters. The associated resource is QIK_FLOATING_POINT_EDITOR

This class is not intended for user derivation.

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 CQikFloatingPointEditor:
    CQikFloatingPointEditor(), ConstructFromResourceL(), ConstructL(), GetColorUseListL(), GetMinimumAndMaximum(), HandleCommandL(), HandleResourceChange(), InputCapabilities(), MapCommandHandler(), MopSupplyObject(), OfferKeyEventL(), PrepareForFocusGainL(), PrepareForFocusLossL(), RestoreUserDataL(), SetMinimumAndMaximum(), SetValueL(), StoreUserDataL(), ValidateKeyEvent(), ValidateTextL(), Value(), WriteInternalStateL(), ~CQikFloatingPointEditor()

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

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

    Inherited from CQikNumericEditor:
    BaseConstructL(), CommandDeleteL(), ComponentControl(), CountComponentControls(), DecreaseValueL(), Draw(), Edwin(), FocusChanged(), GetTextL(), HandleControlEventL(), HandlePointerEventL(), IncreaseValueL(), MinimumSize(), PositionChanged(), SetControlValueObserver(), SetDimmed(), SetSpinnerArrows(), SetTextL(), SizeChanged(), TextRepresentationL(), iControlValueObserver

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

    Inherited from MObjectProvider:
    MopGetObject(), MopGetObjectNoChaining()

    Inherited from MQikCommandHandler:
    HandleAttemptDimmedSelectionL()


    Construction and destruction


    CQikFloatingPointEditor()

    IMPORT_C CQikFloatingPointEditor();

    Description

    Default constructor.

    This function constructs an uninitialised CQikFloatingPointEditor . 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:


    ~CQikFloatingPointEditor()

    IMPORT_C ~CQikFloatingPointEditor();

    Description

    Default destructor.


    ConstructL()

    IMPORT_C void ConstructL(TReal aMinimumValue, TReal aMaximumValue, TInt aTextLimit);

    Description

    Second phase construction. This function completes the construction of a newly-allocated floating point editor. This function should be used instead of ConstructFromResourceL() when not initialising from a resource file.

    This function sets the minimum and maximum values that the user is able to enter into the editor, and the maximum length of the editor in characters. If the aMinimumValue is greater than aMaximumValue the values are swapped.

    Parameters

    TReal aMinimumValue

    The minimum value editable by this control.

    TReal aMaximumValue

    The maximum value editable by this control.

    TInt aTextLimit

    Maximum length of displayed number.

    See also:

    [Top]


    Member functions


    Value()

    IMPORT_C TReal Value() const;

    Description

    Gets the editor's current value.

    Return value

    TReal

    The editor's current value, which will be between iMinimumValue and iMaximumValue .

    See also:


    SetValueL()

    IMPORT_C void SetValueL(TReal aValue);

    Description

    sets the control's actual value in a cyclic way between iMinimumValue and iMinimumValue . If aValue exceed than the control's maximum value the actual value will be set to the minimum value. If aValue will result smaller than the control's minimum value the actual value will be set to the maximum value. CoeControl will be informed of the change for a redraw of the displayed value.

    Parameters

    TReal aValue

    The new value for this control.

    See also:


    GetMinimumAndMaximum()

    IMPORT_C void GetMinimumAndMaximum(TReal &aMinimum, TReal &aMaximum) const;

    Description

    public gives the control's minimum and maximum values

    Parameters

    TReal &aMinimum

    in this variable it will be stored the control's minimum value

    TReal &aMaximum

    in this variable it will be stored the control's maximum value

    See also:


    SetMinimumAndMaximum()

    IMPORT_C void SetMinimumAndMaximum(TReal aMinimum, TReal aMaximum);

    Description

    public sets the Minimum and Maximum values possible for this control

    Parameters

    TReal aMinimum

    the new value for the control's minimum

    TReal aMaximum

    the new value for the control's maximum

    See also:


    ConstructFromResourceL()

    virtual IMPORT_C void ConstructFromResourceL(TResourceReader &aReader);

    Description

    Second phase construction from a resource.

    This function completes the construction of a newly-allocated floating point editor from a QIK_FLOATING_POINT_EDITOR resource file (.rss). The minimum and maximum values and the maximum number of characters that can be displayed in the editor are read from the resource, and ConstructL() is called with these settings.

    The initial value must be set using SetValueL().

    Parameters

    TResourceReader &aReader

    A resource file reader.

    See also:


    GetColorUseListL()

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

    Description

    Gets the list of logical colours employed in the drawing of the control, paired with an explanation of how they are used. Appends the list to aColorUseList.

    Parameters

    CArrayFix< TCoeColorUse > &aColorUseList


    HandleResourceChange()

    virtual IMPORT_C void HandleResourceChange(TInt aType);

    Description

    Handles a change to the control's resources of type aType which are shared across the environment, e.g. colours or fonts.

    Parameters

    TInt aType


    StoreUserDataL()

    virtual IMPORT_C void StoreUserDataL(RWriteStream &aWriteStream) const;

    Description

    Stores the value of the editor when the pop-out is launched.

    Parameters

    RWriteStream &aWriteStream

    Stream to write to.


    RestoreUserDataL()

    virtual IMPORT_C void RestoreUserDataL(RReadStream &aReadStream);

    Description

    Restores the value of the editor when the cancel soft key is pressed.

    Parameters

    RReadStream &aReadStream

    Stream to read from.


    OfferKeyEventL()

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

    Description

    Public Handles key events.

    Parameters

    const TKeyEvent &aKeyEvent

    The key event occurred.

    TEventCode aType

    The type of event that occurred.

    Return value

    TKeyResponse

    a TKeyResponse indicates whether or not the key event was used by this control.


    ValidateKeyEvent()

    protected: virtual IMPORT_C TBool ValidateKeyEvent(const TKeyEvent &aKeyEvent, TEventCode aType) const;

    Description

    protected validate a key pressed by the user

    Parameters

    const TKeyEvent &aKeyEvent

    the key event

    TEventCode aType

    Return value

    TBool

    true if the key is acceptable by this control (any digit, right arrow, e, E, and - ) false in any other case


    ValidateTextL()

    protected: virtual IMPORT_C TBool ValidateTextL(const TDes &aText) const;

    Description

    protected Validates a text to see if it contains any illigal characters

    Parameters

    const TDes &aText

    The text to display

    Return value

    TBool


    HandleCommandL()

    protected: virtual IMPORT_C void HandleCommandL(CQikCommand &aCommand);

    Description

    HandleCommandL is called when the command has been activated by the user.

    Parameters

    CQikCommand &aCommand


    MapCommandHandler()

    protected: virtual IMPORT_C MQikCommandHandler *MapCommandHandler(CQikCommand &aCommand);

    Description

    Called from the CQikCommandManager for each command being added which do not already has its handler set.

    Parameters

    CQikCommand &aCommand

    Return value

    MQikCommandHandler *


    PrepareForFocusLossL()

    protected: virtual IMPORT_C void PrepareForFocusLossL();

    Description

    protected prepare the control to lose the focus


    PrepareForFocusGainL()

    protected: virtual IMPORT_C void PrepareForFocusGainL();

    Description

    protected prepare the control to gain the focus


    InputCapabilities()

    protected: virtual IMPORT_C TCoeInputCapabilities InputCapabilities() const;

    Description

    protected returns the input capabilities of this control

    Return value

    TCoeInputCapabilities


    MopSupplyObject()

    protected: virtual IMPORT_C TTypeUid::Ptr MopSupplyObject(TTypeUid aId);

    Description

    Gets an object whose type is encapsulated by the specified TTypeUid object.

    Parameters

    TTypeUid aId

    Encapsulates the Uid that identifies the type of object required.

    Return value

    TTypeUid::Ptr

    Encapsulates the pointer to the object provided. Note that the encapsulated pointer may be NULL.


    WriteInternalStateL()

    protected: virtual IMPORT_C void WriteInternalStateL(RWriteStream &aWriteStream) const;

    Description

    Writes the internal state of the control and its components to aStream. Does nothing in release mode. Designed to be overridden and base called by subclasses.

    Parameters

    RWriteStream &aWriteStream

    Terms and conditions of use of the material