UIQ Technology
 Developer Library

UIQ 3 SDK

UIQ developer portal

FEEDBACK 

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



Location: QikNumericEditor.h
Link against: qikctl.lib

Class CQikNumericEditor

class CQikNumericEditor : public CCoeControl, public MCoeControlObserver, public MQikTextRepresentationInterface;

Description

Numeric editor base class.

This base class provides a number of methods which are inherited by the concrete number editor classes CQikFloatingPointEditor and CQikNumberEditor .

Derivation

Members

Defined in CQikNumericEditor:
BaseConstructL(), CQikNumericEditor(), CommandDeleteL(), ComponentControl(), CountComponentControls(), DecreaseValueL(), Draw(), Edwin(), FocusChanged(), GetColorUseListL(), GetTextL(), HandleControlEventL(), HandlePointerEventL(), HandleResourceChange(), IncreaseValueL(), InputCapabilities(), MinimumSize(), MopSupplyObject(), OfferKeyEventL(), PositionChanged(), SetControlValueObserver(), SetDimmed(), SetSpinnerArrows(), SetTextL(), SizeChanged(), TextRepresentationL(), ValidateKeyEvent(), ValidateTextL(), iControlValueObserver, ~CQikNumericEditor()

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

Inherited from CCoeControl:
AccumulatedZoom(), ActivateGc(), ActivateL(), BackedUpWindow(), Background(), CapturesPointer(), ClaimPointerGrab(), CloseWindow(), Components(), ConstructFromResourceL(), 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(), PrepareForFocusGainL(), PrepareForFocusLossL(), 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(), WriteInternalStateL(), ZoomWithType(), iCoeEnv, iContext, iPosition, iSize

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

Inherited from MObjectProvider:
MopGetObject(), MopGetObjectNoChaining()


Construction and destruction


~CQikNumericEditor()

IMPORT_C ~CQikNumericEditor();

Description

Destructor. The destructor frees all resources owned by the object, prior to its destruction.


CQikNumericEditor()

protected: IMPORT_C CQikNumericEditor();

Description

Protected default constructor.

This protected constructor is empty, and exists to prevent objects of this class from being constructed. This class is intended only as an abstract base for other classes.

Constructs an incomplete CQikNumericEditor. Construction of the CQikNumericEditor is not complete until BaseConstructL(TInt aTextLimit, TBool aSpinnerArrows) has been called.

See also:

[Top]


Member functions


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:


SetDimmed()

virtual IMPORT_C void SetDimmed(TBool aDimmed);

Description

Sets the control to be dimmed.

Parameters

TBool aDimmed

ETrue to dim the control, otherwise EFalse .

See also:


OfferKeyEventL()

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

Description

Handles key events if the numeric editor has focus.

Parameters

const TKeyEvent &aKeyEvent

The key event.

TEventCode aType

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

Return value

TKeyResponse

Indicates whether or not the key event was used by this 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 colours.

See also:


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. colors or fonts.

Parameters

TInt aType

The type of resource that has changed.

See also:


Edwin()

IMPORT_C const CEikEdwin &Edwin() const;

Description

Returns the CEikEdwin control of the internal CQikNumericEditorEdwin component.

Return value

const CEikEdwin &

The CEikEdwin control of the class.


TextRepresentationL()

virtual IMPORT_C HBufC *TextRepresentationL() const;

Description

This method shall return a textual representation of the controls current value

Return value

HBufC *


SetControlValueObserver()

virtual IMPORT_C void SetControlValueObserver(MQikControlValueObserver *aObserver);

Description

This method is used to set the control value observer that shall later be notified of control value changes.

Parameters

MQikControlValueObserver *aObserver


BaseConstructL()

protected: IMPORT_C void BaseConstructL(TInt aTextLimit, TBool aSpinnerArrows=ETrue);

Description

Base constructor.

This is called in the ConstructL() of derived classes to create and set up the control's editor window.

It is the second part of the construction process and it Completes the construction of the CQikNumericEditor object.

Parameters

TInt aTextLimit

The maximum number of characters allowed in the editor.

TBool aSpinnerArrows

ETrue for spinner arrows.

See also:


SetTextL()

protected: IMPORT_C void SetTextL(const TDesC &aText);

Description

Sets the control's Edwin's text to be displayed.

Parameters

const TDesC &aText

The control's Edwin's text.

See also:


GetTextL()

protected: IMPORT_C void GetTextL(TDes &aText) const;

Description

Gets the control's Edwin's text to be displayed.

Parameters

TDes &aText

The control's Edwin's text.

See also:


IncreaseValueL()

protected: virtual IMPORT_C void IncreaseValueL();

Description

Increase the editor control's value.

This function has an empty implementation, but may be over-ridden in derived classes.

See also:


DecreaseValueL()

protected: virtual IMPORT_C void DecreaseValueL();

Description

Decrease the editor control's value.

This function has an empty implementation, but may be over-ridden in derived classes

See also:


ValidateKeyEvent()

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

Description

Validates key events (key pressed by the user).

This function is called by OfferKeyEventL() to validate that events to be handled are appropriate to the control. The implementation provided by this function always returns ETrue , however it may be overloaded in derived classes to provide more complex error checking. Then the programmer must remember to return true for EKeyDownArrow and EKeyUpArrow events to let the controls be scrolled with arrow keys.

Parameters

const TKeyEvent &aKeyEvent

The key event.

TEventCode aType

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

Return value

TBool

ETrue to validate the key event, EFalse to refuse it.


ValidateTextL()

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

Description

Validate a complete text.

Parameters

const TDes &aText

The text to validate.

Return value

TBool

True if the text only contains allowed characters.


SetSpinnerArrows()

protected: IMPORT_C void SetSpinnerArrows(TBool aSpinnerArrows);

Description

Parameters

TBool aSpinnerArrows


CommandDeleteL()

protected: IMPORT_C void CommandDeleteL(CQikCommand &aCommand);

Description

Called when a softkey or menupane item has been selected.

Parameters

CQikCommand &aCommand

Command that should be executed.


SizeChanged()

protected: virtual IMPORT_C void SizeChanged();

Description

Notifies that the control's size has changed and updates it.

See also:


PositionChanged()

protected: virtual IMPORT_C void PositionChanged();

Description

Notifies that the control's position has changed and updates it.

See also:


Draw()

protected: virtual IMPORT_C void Draw(const TRect &aRect) const;

Description

Draws the control.

Parameters

const TRect &aRect

The rectangle occupied by the control.

See also:


FocusChanged()

protected: virtual IMPORT_C void FocusChanged(TDrawNow aDrawNow);

Description

Notifies that the focus has changed and orders a redraw.

Parameters

TDrawNow aDrawNow

Set if to redraw immediately or not.

See also:


HandlePointerEventL()

protected: virtual IMPORT_C void HandlePointerEventL(const TPointerEvent &aPointerEvent);

Description

Handles pointer events:

Parameters

const TPointerEvent &aPointerEvent

The pointer events that occurred.

See also:


CountComponentControls()

protected: virtual IMPORT_C TInt CountComponentControls() const;

Description

Gets the number of controls within this editor control.

Return value

TInt

The number of controls contained (always 2 since the editor only contains an Edwin and a highlightcontrol).

See also:


ComponentControl()

protected: virtual IMPORT_C CCoeControl *ComponentControl(TInt aIndex) const;

Description

Gets a pointer to the Edwin and the highlightcontrol owned by this control.

As there is only one component inside here, aIndex does not matter.

Parameters

TInt aIndex

The index of the control to get (not used).

Return value

CCoeControl *

The component control with an index of aIndex

See also:


InputCapabilities()

protected: virtual IMPORT_C TCoeInputCapabilities InputCapabilities() const;

Description

Gets the control's supported input capabilities.

Return value

TCoeInputCapabilities

The types of input which can be consumed by the control.

See also:


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.


HandleControlEventL()

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

Description

Handles control events. The implementation simply passes an event up to this control's observer.

Parameters

CCoeControl *aControl

The control passing the event. Not used.

TCoeEvent aEventType

See also:

[Top]


Member data


iControlValueObserver

protected: MQikControlValueObserver * iControlValueObserver;

Description

Terms and conditions of use of the material