UIQ Technology
 Developer Library

UIQ 3 SDK

UIQ developer portal

FEEDBACK 

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



Location: QikSoundSelector.h
Link against: qikctl.lib

Class CQikSoundSelector

class CQikSoundSelector : public CCoeControl, public MQikCommandListOwner, public MQikCommandHandler, public MQikSoundPlayerObserver;

Description

This class provides a sound selector control.

This allows the user to choose a sound to play.

Derivation

Members

Defined in CQikSoundSelector:
AddCustomSoundL(), AddCustomSoundL(), AddFixedSequenceSoundsL(), AddTypeL(), CQikSoundSelector(), ComponentControl(), ConstructFromResourceL(), ConstructL(), CountComponentControls(), EAutomaticConsumeOnly, EExcludeFindAudioFileHistory, EIncludeAlarmFileSounds, EIncludeAlarmSounds, EIncludeEventSounds, EIncludeFindAudioFileOption, EIncludeFixedSequenceSounds, EIncludeRingSounds, EIncludeSilentOption, EIncludeTones, ESoundSelectorAlarm, ESoundSelectorClockAlarm, ESoundSelectorError, ESoundSelectorEvent, ESoundSelectorMessage, ESoundSelectorRing, ESoundSelectorTones, FocusChanged(), GetChoiceList(), GetColorUseListL(), GetSound(), HandleCommandL(), HandlePointerEventL(), HandleResourceChange(), MapCommandHandler(), MinimumSize(), OfferKeyEventL(), PlayComplete(), PrepareForFocusGainL(), PrepareForFocusLossL(), SetAllowedMimeTypesL(), SetDefaultSoundL(), SetDimmed(), SetSound(), SetSound(), SetSoundOptionL(), SetSoundPriority(), SetSoundVolume(), SetTypeL(), SizeChanged(), StopSoundL(), TFixedSequenceSoundTypes, TFlags, TSoundSelectorTypes, ~CQikSoundSelector()

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(), InputCapabilities(), IsActivated(), IsBackedUp(), IsBeingDestroyed(), IsBlank(), IsDimmed(), IsFocused(), IsNonFocusing(), IsReadyToDraw(), IsVisible(), LayoutManager(), MakeVisible(), MaximumWidth(), MopSupplyObject(), 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 MObjectProvider:
MopGetObject(), MopGetObjectNoChaining()

Inherited from MQikCommandHandler:
HandleAttemptDimmedSelectionL()


Construction and destruction


CQikSoundSelector()

IMPORT_C CQikSoundSelector();

Description

Default constructor that partially builds a sound selector control. Complete construction with a call to either ConstructFromResourceL() to initialise the sound selector from a resource file, or a call to ConstructL() if no resource file is used.

See also:


~CQikSoundSelector()

IMPORT_C ~CQikSoundSelector();

Description

Default destructor.

See also:


ConstructL()

IMPORT_C void ConstructL();

Description

Completes construction of the CQikSoundSelector . Sets the sound selector's icon and observer and initialises the choice list.

See also:

[Top]


Member functions


SetSoundOptionL()

IMPORT_C void SetSoundOptionL(TInt aFlags);

Description

Second part of the construction process. It finishes building the CQikSoundSelector .

Parameters

TInt aFlags

See also:


SetDefaultSoundL()

IMPORT_C void SetDefaultSoundL(TInt aSoundNameStrResourceId, const TBaSystemSoundType &aDefaultToneUid);

Description

Parameters

TInt aSoundNameStrResourceId

const TBaSystemSoundType &aDefaultToneUid


AddCustomSoundL()

IMPORT_C TInt AddCustomSoundL(const TFileName &aSoundFile);

Description

Parameters

const TFileName &aSoundFile

Return value

TInt


AddCustomSoundL()

IMPORT_C TInt AddCustomSoundL(const TFileName &aSoundFile, const TDesC &aLabelName);

Description

Parameters

const TFileName &aSoundFile

const TDesC &aLabelName

Return value

TInt


AddFixedSequenceSoundsL()

Interface status: deprecated

IMPORT_C void AddFixedSequenceSoundsL(TFixedSequenceSoundTypes aSoundType);

Description

This has been deprecated, see SetTypeL() and AddTypeL()

Parameters

TFixedSequenceSoundTypes aSoundType

See also:


SetTypeL()

IMPORT_C void SetTypeL(const TSoundSelectorTypes &aType) const;

Description

Used to set the soundselector to be of a specific type (one of CQikSoundSelector::TSoundSelectorTypes). This method sets the correct volume and priority for the specific type, and adds all sounds associated with the type.

Parameters

const TSoundSelectorTypes &aType

See also:


AddTypeL()

IMPORT_C void AddTypeL(const TSoundSelectorTypes &aType) const;

Description

Used to add sounds of a specific type to the soundselector. Does not set volume or priority.

Parameters

const TSoundSelectorTypes &aType


SetAllowedMimeTypesL()

IMPORT_C void SetAllowedMimeTypesL(const MDesC16Array &aMimeTypes);

Description

Parameters

const MDesC16Array &aMimeTypes


SetSoundPriority()

IMPORT_C void SetSoundPriority(const TInt aPriority, const TMdaPriorityPreference aPriorityPreference);

Description

Allows the client to set what range of volume the media server has access to when the sample is played.

Parameters

const TInt aPriority

The priority to set. Range: -100 - +100. Higher number means higher priority.

const TMdaPriorityPreference aPriorityPreference

A value from the TMdaPriorityPreference enum.

See also:


SetSoundVolume()

IMPORT_C void SetSoundVolume(const TInt aVolume);

Description

Specifies the volume the sample is played back at.

Parameters

const TInt aVolume

The volume to set. Range: 0 - 100. Default value is 50.


SetSound()

IMPORT_C TInt SetSound(const TDesC &aSound);

Description

Sets the currently selected sound.

Parameters

const TDesC &aSound

The sound to set.

Return value

TInt


SetSound()

IMPORT_C TInt SetSound(const TBaSystemSoundInfo &aSoundInfo);

Description

Sets the sound.

Parameters

const TBaSystemSoundInfo &aSoundInfo

A pointer to sound information of the TBaSystemSoundInfo enum.

Return value

TInt

See also:


GetSound()

IMPORT_C void GetSound(TDes &aSound) const;

Description

Gets the currently selected sound from the choice list.

Parameters

TDes &aSound

Pointer to the sound to be get.

See also:


GetChoiceList()

IMPORT_C CEikChoiceList *GetChoiceList();

Description

Gets the choice list associated with the sound selector control.

Return value

CEikChoiceList *

The choice list associated with the sound selector control.


StopSoundL()

IMPORT_C void StopSoundL();

Description

Programmatically stop a sound that is currently playing. Does nothing if no sound is playing. Suitable to call from a the ViewDeactivated() function of the view hosting the soundselector.

Leave codes

if

the soundplayer was not initialized and could not be created because of no more memory available or becaue the new label 'Stop' for the command couldn't be allocated for the same reason.


ConstructFromResourceL()

virtual IMPORT_C void ConstructFromResourceL(TResourceReader &aReader);

Description

This function completes construction of a newly-allocated sound selector, getting specification from a resource.

Parameters

TResourceReader &aReader

pointer to the resource, (not used)

See also:


MinimumSize()

virtual IMPORT_C TSize MinimumSize();

Description

Sets the control’s minimum required size.

Return value

TSize

The minimum size required by the control.

See also:


SetDimmed()

virtual IMPORT_C void SetDimmed(TBool aDimmed);

Description

Sets the control's dim state. Dimming usually indicates a control cannot accept user input. This function sets a flag within the control which indicates whether or not the control is dimmed.

Parameters

TBool aDimmed

ETrue to set the control as dimmed. EFalse to set the control as not dimmed.

See also:


GetColorUseListL()

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

Description

Gets the list of logical colors used to draw the container. 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 type aType of resources handled are those which are shared across the environment; colors or fonts for example.

Parameters

TInt aType

The type of resource that has changed.

See also:


PrepareForFocusGainL()

virtual IMPORT_C void PrepareForFocusGainL();

Description

Notifier called upon before the control gains focus.


PrepareForFocusLossL()

virtual IMPORT_C void PrepareForFocusLossL();

Description

Notifier called upon before the control loses focus.


MapCommandHandler()

virtual IMPORT_C MQikCommandHandler *MapCommandHandler(CQikCommand &aCommand);

Description

From MQikCommandListOwner

Parameters

CQikCommand &aCommand

Return value

MQikCommandHandler *


HandleCommandL()

virtual IMPORT_C void HandleCommandL(CQikCommand &aCommand);

Description

From MQikCommandHandler

Parameters

CQikCommand &aCommand


PlayComplete()

virtual IMPORT_C void PlayComplete(TInt aError);

Description

Called when playing has ended of any reason

Parameters

TInt aError


CountComponentControls()

protected: virtual IMPORT_C TInt CountComponentControls() const;

Description

Gets the number of controls contained in a compound control.

Return value

TInt

The number of component controls contained by this control.

See also:


ComponentControl()

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

Description

Gets the specified component of a compound control.

Parameters

TInt aIndex

The index of the required component control.

Return value

CCoeControl *

The component control with an index of aIndex.

See also:


SizeChanged()

protected: virtual IMPORT_C void SizeChanged();

Description

Responds to size changes to sets the size and position of the contents of this control.

See also:


FocusChanged()

protected: virtual IMPORT_C void FocusChanged(TDrawNow aDrawNow);

Description

Responds to a change in focus. This function is called whenever a control gains or loses focus as a result of a call to SetFocus() . A typical use of FocusChanged() is to change the appearance of the control to indicate whether or not it has focus, for example by drawing a focus rectangle around it.

Parameters

TDrawNow aDrawNow

Contains the value that was passed to it by SetFocus() .

See also:


HandlePointerEventL()

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

Description

Handles pointer events. This function gets called whenever a pointer event occurs in the control

Parameters

const TPointerEvent &aPointerEvent

The pointer event to handle.

See also:


OfferKeyEventL()

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

Description

Handles key events.

Parameters

const TKeyEvent &aKeyEvent

The key event.

TEventCode aType

The key event type.

Return value

TKeyResponse

Indicates whether or not the key event was used by this control.

See also:

[Top]


Member enumerations


Enum TFlags

TFlags

Description

EIncludeSilentOption

EIncludeFindAudioFileOption

EExcludeFindAudioFileHistory

EAutomaticConsumeOnly


Enum TFixedSequenceSoundTypes

Interface status: deprecated

TFixedSequenceSoundTypes

Description

This enumeration has been deprecated.

See also:

EIncludeTones

EIncludeEventSounds

EIncludeAlarmSounds

EIncludeRingSounds

EIncludeFixedSequenceSounds

EIncludeAlarmFileSounds


Enum TSoundSelectorTypes

TSoundSelectorTypes

Description

New enumeration for the qiksoundselector. Replaces the old TFixedSequenceSoundTypes.

ESoundSelectorRing

ESoundSelectorAlarm

ESoundSelectorMessage

ESoundSelectorError

ESoundSelectorEvent

ESoundSelectorClockAlarm

ESoundSelectorTones

Terms and conditions of use of the material