Phonon.VolumeSlider Class Reference

[ phonon module]

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

继承 QWidget .

方法


详细描述

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);
			

方法文档编制

VolumeSlider.__init__ ( self , QWidget   parent  = None)

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)

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 对象。

另请参阅 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  毫秒 )

VolumeSlider.setSingleStep ( self , int  毫秒 )

VolumeSlider.setTracking ( self , bool  tracking )

int VolumeSlider.singleStep ( self )