CAknVolumeControl Class Reference

API published in: S60 1st Ed

Link against: avkon.lib

Capability Information

Required Capabilities

None


#include <
aknvolumecontrol.h>

Inherits CAknControl, and MAknNaviDecoratorObserver.


Detailed Description

Used for controlling the volume setting on the phone.

Public Member Functions

IMPORT_C CAknVolumeControl ()
 C++ default constructor.
IMPORT_C ~CAknVolumeControl ()
 Destructor.
IMPORT_C void SetValue (TInt aValue)
 Sets volume.
IMPORT_C TInt Value () const
 Gets volume.
IMPORT_C void SetRange (TInt aMinimumValue, TInt aMaximumValue)
 Sets the range of the volume control.
IMPORT_C void GetRange (TInt &aMinimumValue, TInt &aMaximumValue)
 Gets the range of the volume control.
TSize MinimumSize ()
 From CCoeControl.
TKeyResponse OfferKeyEventL (const TKeyEvent &aKeyEvent, TEventCode aType)
 From CCoeControl.
IMPORT_C void ConstructFromResourceL (TResourceReader &aReader)
 From CCoeControl.
IMPORT_C void HandleResourceChange (TInt aType)
 From CCoeControl.
IMPORT_C void HandlePointerEventL (const TPointerEvent &aPointerEvent)
 From CCoeControl.
IMPORT_C void HandleNaviDecoratorEventL (TInt aEventID)
 From MAknNaviDecoratorObserver.

Static Public Member Functions

static IMPORT_C CFbsBitmap * CreateBitmapL (TInt aValue)
 Creates volume bitmap to "list pane for setting item" (setting option item volume graphic).
static IMPORT_C CGulIcon * CreateSetStyleListBoxIconL (TInt aValue)
 Creates general volume icon to "list pane for setting item" (setting option item volume graphic).
static IMPORT_C CGulIcon * CreateSetDynRangeStyleListBoxIconL (TInt aValue, TInt aMinimum, TInt aMaximum)
 Creates Hi-res volume icon to "list pane for setting item" (setting option item volume graphic).

Protected Member Functions

void SizeChanged ()
 From CCoeControl.
void Draw (const TRect &aRect) const
 From CCoeControl.

Constructor & Destructor Documentation

IMPORT_C CAknVolumeControl::CAknVolumeControl  ) 
 

C++ default constructor.

IMPORT_C CAknVolumeControl::~CAknVolumeControl  ) 
 

Destructor.


Member Function Documentation

IMPORT_C void CAknVolumeControl::ConstructFromResourceL TResourceReader &  aReader  ) 
 

From CCoeControl.

Construct item from given resource.

Parameters:
aReader Resource reader reading the wanted resource set.
static IMPORT_C CFbsBitmap* CAknVolumeControl::CreateBitmapL TInt  aValue  )  [static]
 

Creates volume bitmap to "list pane for setting item" (setting option item volume graphic).

Ownership of the returned bitmap is transfered to the caller.

Parameters:
aValue Current value (1-10)
Returns:
Volume bitmap. Ownership of the bitmap is transfered to the caller.
static IMPORT_C CGulIcon* CAknVolumeControl::CreateSetDynRangeStyleListBoxIconL TInt  aValue,
TInt  aMinimum,
TInt  aMaximum
[static]
 

Creates Hi-res volume icon to "list pane for setting item" (setting option item volume graphic).

Ownership of the returned icon is transfered to the caller.

Parameters:
aValue Current value (1-10)
aMinimum Minimum for Hi-res volume control
aMaximum Maximum for Hi-res volume control
Returns:
Volume icon. Ownership of the icon is transfered to the caller.
static IMPORT_C CGulIcon* CAknVolumeControl::CreateSetStyleListBoxIconL TInt  aValue  )  [static]
 

Creates general volume icon to "list pane for setting item" (setting option item volume graphic).

Ownership of the returned icon is transfered to the caller.

Parameters:
aValue Current value (1-10)
Returns:
Volume icon. Ownership of the icon is transfered to the caller.
void CAknVolumeControl::Draw const TRect &  aRect  )  const [protected]
 

From CCoeControl.

Draws every visible item into the specified rectangle.

Parameters:
aRect the specified rectangle.
IMPORT_C void CAknVolumeControl::GetRange TInt &  aMinimumValue,
TInt &  aMaximumValue
 

Gets the range of the volume control.

Parameters:
aMinimumValue The minimum value of the volume control
aMaximumValue The maximum value of the volume control
IMPORT_C void CAknVolumeControl::HandleNaviDecoratorEventL TInt  aEventID  )  [virtual]
 

From MAknNaviDecoratorObserver.

Handles Navidecorator events (Arrow left and arrow right)

Parameters:
aEventID ID of event to be handled

Implements MAknNaviDecoratorObserver.

IMPORT_C void CAknVolumeControl::HandlePointerEventL const TPointerEvent &  aPointerEvent  ) 
 

From CCoeControl.

Handles pointer events.

Parameters:
aPointerEvent Pointer event to be handled
IMPORT_C void CAknVolumeControl::HandleResourceChange TInt  aType  ) 
 

From CCoeControl.

Handles the change of CAknVolumeControl's resources.

Parameters:
aType Type of resource to change
TSize CAknVolumeControl::MinimumSize  ) 
 

From CCoeControl.

Gets minimun size of layout rectangle.

Returns:
Minimum layout rectangle size.
TKeyResponse CAknVolumeControl::OfferKeyEventL const TKeyEvent &  aKeyEvent,
TEventCode  aType
 

From CCoeControl.

Handles key events.

Parameters:
aKeyEvent Key event to be handled.
aType Type of the event.
Returns:
Returns EKeyConsumed if key event was handled.
IMPORT_C void CAknVolumeControl::SetRange TInt  aMinimumValue,
TInt  aMaximumValue
 

Sets the range of the volume control.

Maximum value must be greater than the minimum value, or the method will Panic.

Parameters:
aMinimumValue The minimum value of the volume control
aMaximumValue The maximum value of the volume control
Exceptions:
Will panic with EAknPanicInvalidValue if the minimum value is greater or equal than maximum value.
IMPORT_C void CAknVolumeControl::SetValue TInt  aValue  ) 
 

Sets volume.

Parameters:
aValue The new volume.
void CAknVolumeControl::SizeChanged  )  [protected]
 

From CCoeControl.

Handles layout change.

IMPORT_C TInt CAknVolumeControl::Value  )  const
 

Gets volume.

Returns:
The volume setting.

The documentation for this class was generated from the following file:

Copyright © Nokia Corporation 2001-2008
Back to top