Movatterモバイル変換


[0]ホーム

URL:


We bake cookies in your browser for a better experience. Using this site means that you consent.Read More

Menu

Qt Documentation

VolumeSlider Class

(Phonon::VolumeSlider)

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

Header:#include <Phonon/VolumeSlider>
Since: Qt 4.4
Inherits:QWidget

Properties

Public Functions

VolumeSlider(QWidget * parent = 0)
VolumeSlider(AudioOutput * output, QWidget * parent = 0)
~VolumeSlider()
AudioOutput *audioOutput() const
boolhasTracking() const
QSizeiconSize() const
boolisMuteVisible() const
qrealmaximumVolume() const
Qt::Orientationorientation() const
intpageStep() const
voidsetPageStep(int milliseconds)
voidsetSingleStep(int milliseconds)
voidsetTracking(bool tracking)
intsingleStep() const

Public Slots

voidsetAudioOutput(Phonon::AudioOutput * output)
voidsetIconSize(const QSize & size)
voidsetMaximumVolume(qreal)
voidsetMuteVisible(bool)
voidsetOrientation(Qt::Orientation)
  • 19 public slots inherited fromQWidget
  • 1 public slot inherited fromQObject

Additional Inherited Members

  • 1 signal inherited fromQWidget
  • 1 signal inherited fromQObject
  • 4 static public members inherited fromQWidget
  • 7 static public members inherited fromQObject
  • 37 protected functions inherited fromQWidget
  • 8 protected functions inherited fromQObject
  • 1 protected function inherited fromQPaintDevice
  • 1 protected slot inherited fromQWidget

Detailed Description

TheVolumeSlider 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 theAudioOutput it is connected to is muted. The icon can be removed withsetMuteVisible().

It is possible to set themaximum 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);

See alsoPhonon Module.

Property Documentation

iconSize :QSize

This property holds the icon size used for the mute button/icon.

The default size is defined by the GUI style.

Access functions:

QSizeiconSize() const
voidsetIconSize(const QSize & size)

maximumVolume :qreal

This property holds the maximum volume that can be set with this slider.

By default the maximum value is 1.0 (100%).

Access functions:

qrealmaximumVolume() const
voidsetMaximumVolume(qreal)

muteVisible :bool

This property holds whether the mute button/icon next to the slider is visible.

By default the mute button/icon is visible.

Access functions:

boolisMuteVisible() const
voidsetMuteVisible(bool)

orientation :Qt::Orientation

This property holds the orientation of the slider.

The orientation must beQt::Vertical (the default) orQt::Horizontal.

Access functions:

Qt::Orientationorientation() const
voidsetOrientation(Qt::Orientation)

pageStep :int

This property holds the page step.

The larger of two natural steps that a slider provides and typically corresponds to the user pressing PageUp or PageDown.

Defaults to 5 (5% of the voltage).

Access functions:

intpageStep() const
voidsetPageStep(int milliseconds)

singleStep :int

This property holds the single step.

The smaller of two natural steps that a slider provides and typically corresponds to the user pressing an arrow key.

Defaults to 1 (1% of the voltage).

Access functions:

intsingleStep() const
voidsetSingleStep(int milliseconds)

tracking :bool

This property holds whether slider tracking is enabled.

If tracking is enabled (the default), the volume changes while the slider is being dragged. If tracking is disabled, the volume changes only when the user releases the slider.

Access functions:

boolhasTracking() const
voidsetTracking(bool tracking)

Member Function Documentation

VolumeSlider::VolumeSlider(QWidget * parent = 0)

Constructs a new volume slider with the givenparent.

VolumeSlider::VolumeSlider(AudioOutput * output,QWidget * parent = 0)

Constructs a new volume slider with the givenoutput object andparent.

VolumeSlider::~VolumeSlider()

AudioOutput * VolumeSlider::audioOutput() const

See alsosetAudioOutput().

[slot]void VolumeSlider::setAudioOutput(Phonon::AudioOutput * output)

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

See alsoaudioOutput().

© 2016 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of theGNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.


[8]ページ先頭

©2009-2025 Movatter.jp