|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.trolltech.qt.internal.QSignalEmitterInternal
com.trolltech.qt.QSignalEmitter
com.trolltech.qt.QtJambiObject
com.trolltech.qt.core.QObject
com.trolltech.qt.gui.QWidget
com.trolltech.qt.phonon.VolumeSlider
public class VolumeSlider
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:
The following code example is written in c++.
Phonon::AudioOutput *audioOutput = new Phonon::AudioOutput(Phonon::MusicCategory); Phonon::createPath(mediaObject, audioOutput); Phonon::VolumeSlider *volumeSlider = new Phonon::VolumeSlider; volumeSlider->setAudioOutput(audioOutput);Author: Matthias Kretz <kretz@kde.org>
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.trolltech.qt.gui.QWidget |
---|
QWidget.RenderFlag, QWidget.RenderFlags |
Nested classes/interfaces inherited from class com.trolltech.qt.QSignalEmitter |
---|
QSignalEmitter.AbstractSignal, QSignalEmitter.Signal0, QSignalEmitter.Signal1, QSignalEmitter.Signal2, QSignalEmitter.Signal3, QSignalEmitter.Signal4, QSignalEmitter.Signal5, QSignalEmitter.Signal6, QSignalEmitter.Signal7, QSignalEmitter.Signal8, QSignalEmitter.Signal9 |
Nested classes/interfaces inherited from class com.trolltech.qt.internal.QSignalEmitterInternal |
---|
com.trolltech.qt.internal.QSignalEmitterInternal.AbstractSignalInternal |
Field Summary |
---|
Fields inherited from class com.trolltech.qt.gui.QWidget |
---|
customContextMenuRequested |
Fields inherited from class com.trolltech.qt.internal.QSignalEmitterInternal |
---|
currentSender |
Constructor Summary | |
---|---|
VolumeSlider()
Constructs a new volume slider with the given parent. |
|
VolumeSlider(AudioOutput arg__1)
Constructs a new volume slider with the given output object and parent. |
|
VolumeSlider(AudioOutput arg__1,
QWidget parent)
Constructs a new volume slider with the given output object and parent. |
|
VolumeSlider(QWidget parent)
Constructs a new volume slider with the given parent. |
Method Summary | |
---|---|
AudioOutput |
audioOutput()
See also. setAudioOutput() . |
boolean |
hasTracking()
This property holds whether slider tracking is enabled. |
QSize |
iconSize()
This property holds the icon size used for the mute button/icon. |
boolean |
isMuteVisible()
This property holds whether the mute button/icon next to the slider is visible. |
double |
maximumVolume()
This property holds the maximum volume that can be set with this slider. |
Qt.Orientation |
orientation()
This property holds the orientation of the slider. |
int |
pageStep()
This property holds the page step. |
void |
setAudioOutput(AudioOutput arg__1)
Sets the audio output object to be controlled by this slider to the specified output object. |
void |
setIconSize(QSize size)
This property holds the icon size used for the mute button/icon. |
void |
setMaximumVolume(double arg__1)
This property holds the maximum volume that can be set with this slider. |
void |
setMuteVisible(boolean arg__1)
This property holds whether the mute button/icon next to the slider is visible. |
void |
setOrientation(Qt.Orientation arg__1)
This property holds the orientation of the slider. |
void |
setPageStep(int milliseconds)
This property holds the page step. |
void |
setSingleStep(int milliseconds)
This property holds the single step. |
void |
setTracking(boolean tracking)
This property holds whether slider tracking is enabled. |
int |
singleStep()
This property holds the single step. |
Methods inherited from class com.trolltech.qt.core.QObject |
---|
childEvent, children, connectSlotsByName, customEvent, disposeLater, dumpObjectInfo, dumpObjectTree, dynamicPropertyNames, event, eventFilter, findChild, findChild, findChild, findChildren, findChildren, findChildren, findChildren, indexOfProperty, installEventFilter, isWidgetType, killTimer, moveToThread, objectName, parent, properties, property, removeEventFilter, setObjectName, setParent, setProperty, startTimer, timerEvent, toString, userProperty |
Methods inherited from class com.trolltech.qt.QtJambiObject |
---|
dispose, disposed, equals, finalize, reassignNativeResources, tr, tr, tr |
Methods inherited from class com.trolltech.qt.QSignalEmitter |
---|
blockSignals, disconnect, disconnect, signalsBlocked, signalSender, thread |
Methods inherited from class com.trolltech.qt.internal.QSignalEmitterInternal |
---|
__qt_signalInitialization |
Methods inherited from class java.lang.Object |
---|
clone, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.trolltech.qt.QtJambiInterface |
---|
disableGarbageCollection, nativeId, nativePointer, reenableGarbageCollection, setJavaOwnership |
Constructor Detail |
---|
public VolumeSlider(AudioOutput arg__1)
public VolumeSlider(AudioOutput arg__1, QWidget parent)
public VolumeSlider()
public VolumeSlider(QWidget parent)
Method Detail |
---|
public final AudioOutput audioOutput()
setAudioOutput()
.
public final boolean hasTracking()
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.
public final QSize iconSize()
public final boolean isMuteVisible()
By default the mute button/icon is visible.
public final double maximumVolume()
By default the maximum value is 1.0 (100%).
public final Qt.Orientation orientation()
The orientation must be Qt::Vertical
(the default) or Qt::Horizontal
.
public final int pageStep()
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).
public final void setAudioOutput(AudioOutput arg__1)
audioOutput()
.
public final void setIconSize(QSize size)
public final void setMaximumVolume(double arg__1)
By default the maximum value is 1.0 (100%).
public final void setMuteVisible(boolean arg__1)
By default the mute button/icon is visible.
public final void setOrientation(Qt.Orientation arg__1)
The orientation must be Qt::Vertical
(the default) or Qt::Horizontal
.
public final void setPageStep(int milliseconds)
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).
public final void setSingleStep(int milliseconds)
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).
public final void setTracking(boolean tracking)
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.
public final int singleStep()
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).
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |