|  | Home · All Classes · Modules

# Phonon.VolumeSlider Class Reference
[phonon module]

The VolumeSlider widget provides a slider that is used to control the volume of an audio output device. More...

Inherits QWidget.

### Methods

- __init__ (self, QWidget parent = None)
- __init__ (self, AudioOutput, QWidget parent = None)
- AudioOutput audioOutput (self)
- bool hasTracking (self)
- QSize iconSize (self)
- bool isMuteVisible (self)
- float maximumVolume (self)
- Qt.Orientation orientation (self)
- int pageStep (self)
- setAudioOutput (self, AudioOutput)
- setIconSize (self, QSize size)
- setMaximumVolume (self, float)
- setMuteVisible (self, bool)
- setOrientation (self, Qt.Orientation)
- setPageStep (self, int milliseconds)
- setSingleStep (self, int milliseconds)
- setTracking (self, bool tracking)
- int singleStep (self)

## Detailed Description

The VolumeSlider widget provides a slider that is used to control the volume of an audio output device.

The slider also displays an icon indicating if the volume of the AudioOutput it is connected to is muted. The icon can be removed with setMuteVisible().

It is possible to set the maximum value of the slider. By default, the minimum and maximum values of the slider are 0.0 (no sound) to 1.0 (the maximum volume the audio output can produce).

Here follows a code example:

         Phonon.AudioOutput *audioOutput = new Phonon.AudioOutput(Phonon.MusicCategory);
         Phonon.createPath(mediaObject, audioOutput);

         Phonon.VolumeSlider *volumeSlider = new Phonon.VolumeSlider;
         volumeSlider->setAudioOutput(audioOutput);

## Method Documentation

### VolumeSlider.__init__ (self, QWidget parent = None)

The parent argument, if not None, causes self to be owned by Qt instead of PyQt.

Constructs a new volume slider with the given parent.

### VolumeSlider.__init__ (self, AudioOutput, QWidget parent = None)

The parent argument, if not None, causes self to be owned by Qt instead of PyQt.

Constructs a new volume slider with the given output object and parent.

### AudioOutput VolumeSlider.audioOutput (self)

### bool VolumeSlider.hasTracking (self)

### QSize VolumeSlider.iconSize (self)

### bool VolumeSlider.isMuteVisible (self)

### float VolumeSlider.maximumVolume (self)

### Qt.Orientation VolumeSlider.orientation (self)

### int VolumeSlider.pageStep (self)

### VolumeSlider.setAudioOutput (self, AudioOutput)

This method is also a Qt slot with the C++ signature `void setAudioOutput(Phonon::AudioOutput *)`.

Sets the audio output object to be controlled by this slider to the specified output object.

See also audioOutput().

### VolumeSlider.setIconSize (self, QSize size)

This method is also a Qt slot with the C++ signature `void setIconSize(const QSize&)`.

### VolumeSlider.setMaximumVolume (self, float)

This method is also a Qt slot with the C++ signature `void setMaximumVolume(qreal)`.

### VolumeSlider.setMuteVisible (self, bool)

This method is also a Qt slot with the C++ signature `void setMuteVisible(bool)`.

### VolumeSlider.setOrientation (self, Qt.Orientation)

This method is also a Qt slot with the C++ signature `void setOrientation(Qt::Orientation)`.

### VolumeSlider.setPageStep (self, int milliseconds)

### VolumeSlider.setSingleStep (self, int milliseconds)

### VolumeSlider.setTracking (self, bool tracking)

### int VolumeSlider.singleStep (self)