»
UIQ 3 SDK »
UIQ Developer Library »
UIQ API Reference »
UIQ C++ Component reference »
Qikon »
CQikSoundSelector
Location:
QikSoundSelector.h
Link against: qikctl.lib
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
MObjectProvider - An interface that allows an object to be part of a network of object providersCBase - Base class for all classes to be instantiated on the heapCCoeControl - Control base class from which all other controls are derivedCQikSoundSelector - This class provides a sound selector control
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
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:
IMPORT_C ~CQikSoundSelector();
Description
Default destructor.
See also:
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:
IMPORT_C void SetSoundOptionL(TInt aFlags);
Description
Second part of the construction process. It finishes building the CQikSoundSelector .
Parameters
See also:
IMPORT_C void SetDefaultSoundL(TInt aSoundNameStrResourceId, const TBaSystemSoundType &aDefaultToneUid);
Description
Parameters
IMPORT_C TInt AddCustomSoundL(const TFileName &aSoundFile);
Description
Parameters
Return value
IMPORT_C TInt AddCustomSoundL(const TFileName &aSoundFile, const TDesC &aLabelName);
Description
Parameters
Return value
AddFixedSequenceSoundsL()
| Interface status: | deprecated | |
IMPORT_C void AddFixedSequenceSoundsL(TFixedSequenceSoundTypes aSoundType);
Description
This has been deprecated, see SetTypeL() and AddTypeL()
Parameters
See also:
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
See also:
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
IMPORT_C void SetAllowedMimeTypesL(const MDesC16Array &aMimeTypes);
Description
Parameters
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:
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. |
|
IMPORT_C TInt SetSound(const TDesC &aSound);
Description
Sets the currently selected sound.
Parameters
const TDesC &aSound |
The sound to set. |
|
Return value
IMPORT_C TInt SetSound(const TBaSystemSoundInfo &aSoundInfo);
Description
Sets the sound.
Parameters
Return value
See also:
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:
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. |
|
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. |
|
virtual IMPORT_C void ConstructFromResourceL(TResourceReader &aReader);
Description
This function completes construction of a newly-allocated sound selector, getting specification from a resource.
Parameters
See also:
virtual IMPORT_C TSize MinimumSize();
Description
Sets the controls minimum required size.
Return value
TSize
|
The minimum size required by the control. |
|
See also:
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:
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
See also:
virtual IMPORT_C void HandleResourceChange(TInt aType);
Description
Handles a change to the controls 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:
virtual IMPORT_C void PrepareForFocusGainL();
Description
Notifier called upon before the control gains focus.
virtual IMPORT_C void PrepareForFocusLossL();
Description
Notifier called upon before the control loses focus.
virtual IMPORT_C MQikCommandHandler *MapCommandHandler(CQikCommand &aCommand);
Description
From MQikCommandListOwner
Parameters
Return value
virtual IMPORT_C void HandleCommandL(CQikCommand &aCommand);
Description
From MQikCommandHandler
Parameters
virtual IMPORT_C void PlayComplete(TInt aError);
Description
Called when playing has ended of any reason
Parameters
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:
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:
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:
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:
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
See also:
protected: virtual IMPORT_C TKeyResponse OfferKeyEventL(const TKeyEvent &aKeyEvent, TEventCode aType);
Description
Handles key events.
Parameters
Return value
TKeyResponse
|
Indicates whether or not the key event was used by this control. |
|
See also:
Enum TFixedSequenceSoundTypes
| Interface status: | deprecated | |
TFixedSequenceSoundTypes
Description
This enumeration has been deprecated.
See also:
TSoundSelectorTypes
Description
New enumeration for the qiksoundselector. Replaces the old TFixedSequenceSoundTypes.
Terms and conditions of use of the material