UIQ Technology
 Developer Library

UIQ 3 SDK

UIQ developer portal

FEEDBACK 

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



Location: QikSlider.h
Link against: qikctl.lib

Class CQikSlider

class CQikSlider : public CCoeControl, public MQikControlStreamInterface, public MQikTextRepresentationInterface;

Description

This class provides a slider control that can be used to set the value of a parameter such as contrast, brightness, volume, etc. Associated resource is QIK_SLIDER.

Derivation

Members

Defined in CQikSlider:
CQikSlider(), ConstructFromResourceL(), ConstructL(), CurrentValue(), Draw(), EMirroredLayout, ESliderTextPercentage, ESnapToMarkers, EVerticalLayout, GetColorUseListL(), HandlePointerEventL(), HandleResourceChange(), MinimumSize(), MopSupplyObject(), OfferKeyEventL(), PositionChanged(), RestoreUserDataL(), SetControlValueObserver(), SetMaxValueL(), SetMinValueL(), SetNumberOfMarkersL(), SetValue(), SizeChanged(), StoreUserDataL(), TFlags, TextRepresentationL(), ~CQikSlider()

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

Inherited from CCoeControl:
AccumulatedZoom(), ActivateGc(), ActivateL(), BackedUpWindow(), Background(), CapturesPointer(), ClaimPointerGrab(), CloseWindow(), ComponentControl(), Components(), ControlContext(), ControlEnv(), CopyControlContextFrom(), CountComponentControls(), 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(), InputCapabilities(), 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(), SetDimmed(), 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 MObjectProvider:
MopGetObject(), MopGetObjectNoChaining()


Construction and destruction


CQikSlider()

IMPORT_C CQikSlider();

Description

Default constructor.

This function constructs an uninitialised CQikSlider . The function should be used as the first stage in two stage construction, followed by a call to either ConstructFromResourceL() (to initialise the slider's values from a resource file) or ConstructL() (if no resource file is used).

See also:


~CQikSlider()

IMPORT_C ~CQikSlider();

Description

Destructor. The destructor frees all memory owned by this object, prior to its destruction.


ConstructL()

IMPORT_C void ConstructL(TInt aMinValue, TInt aMaxValue, TInt aFlags=0);

Description

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

The function creates the slider, and sets its maximum and minimum values. A flag may be set to force the slider to snap to the markers.

Parameters

TInt aMinValue

The minimum value of the slider. This could be changed after construction by using the method SetMinValueL(TInt aMinValue) .

TInt aMaxValue

The maximum value of the slider. This could be changed after construction by using the method SetMaxValueL(TInt aMaxValue) .

TInt aFlags

Flag should be set if the slider should snap to marker. Permitted flags are defined in the TFlags enum. Possible flag: ESnapToMarkers .

[Top]


Member functions


CurrentValue()

IMPORT_C TInt CurrentValue() const;

Description

Gets the current value of the slider.

Return value

TInt

The current value of the slider.


SetNumberOfMarkersL()

IMPORT_C void SetNumberOfMarkersL(TInt aNumberOfMarkers);

Description

Method for setting number of visible markers in the slider. The slider could take a minimum of two markers and there has to be at least 5 pixels between the markers. The total number of markers can not exceed the difference between the maximum and minimum values of the slider. It is built into the control to adjust for out of range number of markers. Could be called again anytime at runtime. Default number of markers is set to two, one in the beginning and one in the end of the slider.

Parameters

TInt aNumberOfMarkers

Number of visible markers in the slider.


SetValue()

IMPORT_C void SetValue(TInt aValue);

Description

Sets the value of the slider.

Parameters

TInt aValue

The value that the slider should be set to.


SetMinValueL()

IMPORT_C void SetMinValueL(TInt aMinValue);

Description

Sets the slider's minimum value.

Leaves if aMinValue is outside the minimum marker position.

Parameters

TInt aMinValue

The new minimum value of the slider.

See also:


SetMaxValueL()

IMPORT_C void SetMaxValueL(TInt aMaxValue);

Description

Sets the slider's maximum value.

Parameters

TInt aMaxValue

The new maximum value of the slider.

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 slider from a QIK_SLIDER resource. The maximum and minimum slider values, and slider flags are read from the resource.

Parameters

TResourceReader &aReader

A resource file reader.

See also:


MinimumSize()

virtual IMPORT_C TSize MinimumSize();

Description

Return value

TSize


HandleResourceChange()

virtual IMPORT_C void HandleResourceChange(TInt aType);

Description

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

Parameters

TInt aType

The type of control.


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:


OfferKeyEventL()

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

Description

Handles key events offered to the control by the control environment.

This function provides an appropriate implementation of CCoeControl::OfferKeyEventL() .

Parameters

const TKeyEvent &aKeyEvent

The key event to respond to.

TEventCode aType

The event code.

Return value

TKeyResponse

Whether or not the key event was consumed.

See also:


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


StoreUserDataL()

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

Description

Write the current value of the control to aWriteStream

Parameters

RWriteStream &aWriteStream

The stream that the current control value should be written to


RestoreUserDataL()

protected: virtual IMPORT_C void RestoreUserDataL(RReadStream &aReadStream);

Description

Read the previously written value of the control from aReadStream

Parameters

RReadStream &aReadStream

The stream that holds the previously stored control value


SizeChanged()

protected: virtual IMPORT_C void SizeChanged();

Description

Handles a change in the size of this control. This function is called by the control framework.

See also:


Draw()

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

Description

Draws the slider to the screen. This function is called by the control framework.

Parameters

const TRect &aRect

The rectangle within which the control is to be drawn.

See also:


HandlePointerEventL()

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

Description

Handles pointer events. This function is called by the control framework to handle when the pointer is used to move the slider. Note that this control can handle drag events.

Parameters

const TPointerEvent &aPointerEvent

The type of event that occurred.

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.


PositionChanged()

protected: virtual IMPORT_C void PositionChanged();

Description

See also:

[Top]


Member enumerations


Enum TFlags

TFlags

Description

Slider flags.

ESnapToMarkers

Snap the slider to the markers.

EVerticalLayout

ESliderTextPercentage

EMirroredLayout

Terms and conditions of use of the material