UIQ Technology
 Developer Library

UIQ 3 SDK

UIQ developer portal

FEEDBACK 

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



Location: QikVertOptionButtonList.h
Link against: qikctl.lib

Class CQikVertOptionButtonList

class CQikVertOptionButtonList : public CCoeControl, public MCoeControlObserver, public MQikCommandHandler, public MQikCommandListOwner, public MQikControlStreamInterface, public MQikTextRepresentationInterface;

Description

Vertical option button list.

This class defines a set of vertically arranged “radio” buttons — i.e. a group of option buttons which supports selection from a group of mutually exclusive options. At any time, only one option button may be set; this is known as the selected option button. The associated resource is QIK_VERTOPBUT .

This class is not intended for user derivation.

Derivation

Members

Defined in CQikVertOptionButtonList:
AddOptionButtonL(), CQikVertOptionButtonList(), CQikVertOptionButtonList(), ComponentControl(), ConstructFromResourceL(), ConstructL(), CountComponentControls(), GetColorUseListL(), HandleCommandL(), HandleControlEventL(), HandlePointerEventL(), HandleResourceChange(), InputCapabilities(), LabeledButtonId(), MapCommandHandler(), MinimumSize(), MopSupplyObject(), OfferKeyEventL(), PrepareForFocusGainL(), PrepareForFocusLossL(), RestoreUserDataL(), SetButtonById(), SetControlValueObserver(), SetDimmed(), SetTextL(), SizeChanged(), StoreUserDataL(), Text(), TextRepresentationL(), ~CQikVertOptionButtonList()

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(), FocusChanged(), 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(), PositionChanged(), 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(), WriteInternalStateL(), ZoomWithType(), iCoeEnv, iContext, iPosition, iSize

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

Inherited from MObjectProvider:
MopGetObject(), MopGetObjectNoChaining()

Inherited from MQikCommandHandler:
HandleAttemptDimmedSelectionL()


Construction and destruction


CQikVertOptionButtonList()

IMPORT_C CQikVertOptionButtonList(TInt aInterButtonSpacing, TBool aTextOnRight);

Description

overloaded constructor with inter button spacing and button text alignment.

This function partially constructs a CQikVertOptionButtonList. The newly constructed object has the specified inter-button spacing and button text alignment.

The function should be used as the first stage in two stage construction, followed by a call to either ConstructFromResourceL() (to initialise the button list from a resource file) or ConstructL() (if no resource file is used).

Parameters

TInt aInterButtonSpacing

The inter-button spacing for the list.

TBool aTextOnRight

Text on the right side. ETrue to have text to the right of the buttons, EFalse to have it on the left.

See also:


CQikVertOptionButtonList()

IMPORT_C CQikVertOptionButtonList();

Description

Default constructor.

This function partially constructs a CQikVertOptionButtonList . The newly constructed object has the default inter-button spacing, and button text to the right of each button.

The function should be used as the first stage in two stage construction, followed by a call to either ConstructFromResourceL() (to initialise the button list from a resource file) or ConstructL() (if no resource file is used).

See also:


~CQikVertOptionButtonList()

IMPORT_C ~CQikVertOptionButtonList();

Description

Destructor.

The destructor frees all memory owned by the object, prior to its destruction. This includes all the buttons and the list array which holds them.


ConstructL()

IMPORT_C void ConstructL();

Description

Second phase construction. This function completes the construction of a newly-allocated vertical options button list. This function should be used instead of ConstructFromResourceL() when not initialising from a resource file.

The function creates and allocates the button list array, however it does not populate it with option buttons. These must be added to the list using AddOptionButtonL() .

[Top]


Member functions


ConstructFromResourceL()

virtual IMPORT_C void ConstructFromResourceL(TResourceReader &aReader);

Description

Second phase construction from a resource.

This function completes the construction of a newly-allocated vertical option button list from a QIK_VERTOPBUT resource. The option button's ID and text, inter-button spacing and text alignment may all be read from the resource.

Parameters

TResourceReader &aReader

A resource file reader.

See also:


AddOptionButtonL()

IMPORT_C void AddOptionButtonL(TInt aId, const TDesC &aDes);

Description

Adds an option button. The function creates a new option button with the button text in aDes and the ID aId . The button is owned and destroyed by this object.

Parameters

TInt aId

The ID to be used to subsequently identify the new option button.

const TDesC &aDes

pointer to the text for the new button.


SetButtonById()

IMPORT_C void SetButtonById(TInt aId);

Description

sets the selected entry by its ID.

Parameters

TInt aId

The entry's ID.


LabeledButtonId()

IMPORT_C TInt LabeledButtonId();

Description

Gets the ID of the selected entry.

Return value

TInt

The ID of the selected entry.


Text()

IMPORT_C TPtrC Text(TInt aId) const;

Description

Gets the specified option button's Label text.

Parameters

TInt aId

The ID of the intended option button.

Return value

TPtrC

The label text for the specified option button.


SetTextL()

IMPORT_C void SetTextL(TInt aId, const TDesC &aText);

Description

Sets the specified option button's label text.

Parameters

TInt aId

The ID of the intended option button.

const TDesC &aText


GetColorUseListL()

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

Description

Gets the list of logical colors used to draw the control. The list includes an explanation of how each color is used, and is appended to aColorUseList .

Parameters

CArrayFix< TCoeColorUse > &aColorUseList

The color list.

See also:


HandleResourceChange()

virtual IMPORT_C void HandleResourceChange(TInt aType);

Description

Handles a change to the control's resources. The types of resources handled are those which are shared across the environment, e.g. colors or fonts.

Parameters

TInt aType

A message UID value.

See also:


SetDimmed()

virtual IMPORT_C void SetDimmed(TBool aDimmed);

Description

Sets the button list as dimmed/undimmed. This dims/undims the button list and its contained buttons.

Parameters

TBool aDimmed

ETrue to dim the button list, EFalse to un-dim the list.


CountComponentControls()

virtual IMPORT_C TInt CountComponentControls() const;

Description

Gets the number of controls contained in a compound control. This function should be implemented by all compound controls.

Return value

TInt

The number of component controls contained by this control.

See also:


ComponentControl()

virtual IMPORT_C CCoeControl *ComponentControl(TInt aIndex) const;

Description

Gets a pointer to the button at the specified index.

This might be used to get a pointer to the button to make it possible to change its text.

Parameters

TInt aIndex

The index of the control to get

Return value

CCoeControl *

The component control with an index of aIndex

See also:


MinimumSize()

virtual IMPORT_C TSize MinimumSize();

Description

Gets the minimum size of the control.

Return value

TSize

The minimum possible size of the control.

See also:


OfferKeyEventL()

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

Description

Handles key events.

The function is called by the control framework when a key event is received. It sets the appropriate button according the event received, e.g. the left and right arrow key scrolls between buttons. The function returns EKeyWasNotConsumed if it cannot handle a particular key event.

Parameters

const TKeyEvent &aKeyEvent

The occurred key event.

TEventCode aType

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

Return value

TKeyResponse

Event handling flags, indicates whether or not a key event was processed by the control.

See also:


HandlePointerEventL()

virtual IMPORT_C void HandlePointerEventL(const TPointerEvent &aPointerEvent);

Description

Handles a pointer event

Parameters

const TPointerEvent &aPointerEvent

The pointer event to handle.


SizeChanged()

virtual IMPORT_C void SizeChanged();

Description

Handles control size changes.

This function is called by the control framework to notify the button list of a size change.

See also:


InputCapabilities()

virtual IMPORT_C TCoeInputCapabilities InputCapabilities() const;

Description

Gets the input capabilities of the control and all its components.

Return value

TCoeInputCapabilities

The input capabilities of the control.

See also:


TextRepresentationL()

virtual IMPORT_C HBufC *TextRepresentationL() const;

Description

Returns the label of the selected option button to pop-out.

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


MapCommandHandler()

virtual IMPORT_C MQikCommandHandler *MapCommandHandler(CQikCommand &aCommand);

Description

Functionality for Soft key commands.

Parameters

CQikCommand &aCommand

Return value

MQikCommandHandler *


HandleCommandL()

virtual IMPORT_C void HandleCommandL(CQikCommand &aCommand);

Description

Called when a softkey or menupane item has been selected.

Parameters

CQikCommand &aCommand

Command that should be executed.


StoreUserDataL()

virtual IMPORT_C void StoreUserDataL(RWriteStream &aWriteStream) const;

Description

Method to store the current user data of the control.

Parameters

RWriteStream &aWriteStream

The RWriteStream where the user data is written.


RestoreUserDataL()

virtual IMPORT_C void RestoreUserDataL(RReadStream &aReadStream);

Description

Method to restore saved user data of the control.

Parameters

RReadStream &aReadStream

The RReadStream containing the stored user data.


HandleControlEventL()

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

Description

Handles control events.

This function is called by the framework to handle button selection. When an EEventStateChanged event is received, this function sets the button chosen by the user as the selected button. It then calls ReportEventL() to pass the event to its observer — this is the thing that's using the button list.

Parameters

CCoeControl *aControl

The control which originates the event.

TCoeEvent aEvent

The event type. In this case it is an EEventStateChanged .

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.


PrepareForFocusLossL()

virtual IMPORT_C void PrepareForFocusLossL();

Description

Functionality for Soft key commands.


PrepareForFocusGainL()

virtual IMPORT_C void PrepareForFocusGainL();

Description

Functionality for Soft key commands.

Terms and conditions of use of the material