Viadeo Twitter Google Bookmarks ! Facebook Digg del.icio.us MySpace Yahoo MyWeb Blinklist Netvouz Reddit Simpy StumbleUpon Bookmarks Windows Live Favorites 
Logo Documentation Qt ·  Page d'accueil  ·  Toutes les classes  ·  Classes principales  ·  Annotées  ·  Classes groupées  ·  Modules  ·  Fonctions  · 

VolumeSlider Class

(Phonon::VolumeSlider)

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

 #include <Phonon/VolumeSlider>

Inherits: QWidget.

This class was introduced in Qt 4.4.

Public Types

enum PaintDeviceMetric { PdmWidth, PdmHeight, PdmWidthMM, PdmHeightMM, ..., PdmPhysicalDpiY }

Properties

  • 58 properties inherited from QWidget
  • 1 property inherited from QObject

Public Functions

VolumeSlider(QWidget * parent = 0)
VolumeSlider(AudioOutput * output, QWidget * parent = 0)
virtual ~QPaintDevice()
~VolumeSlider()
AudioOutput * audioOutput() const
int colorCount() const
int depth() const
bool hasTracking() const
int height() const
int heightMM() const
QSize iconSize() const
bool isMuteVisible() const
int logicalDpiX() const
int logicalDpiY() const
qreal maximumVolume() const
Qt::Orientation orientation() const
int pageStep() const
virtual QPaintEngine * paintEngine() const = 0
bool paintingActive() const
int physicalDpiX() const
int physicalDpiY() const
void setPageStep(int milliseconds)
void setSingleStep(int milliseconds)
void setTracking(bool tracking)
int singleStep() const
int width() const
int widthMM() const
  • 215 public functions inherited from QWidget
  • 31 public functions inherited from QObject

Public Slots

void setAudioOutput(Phonon::AudioOutput * output)
void setIconSize(const QSize & size)
void setMaximumVolume(qreal)
void setMuteVisible(bool)
void setOrientation(Qt::Orientation)
  • 19 public slots inherited from QWidget
  • 1 public slot inherited from QObject

Protected Functions

QPaintDevice()
virtual void init(QPainter * painter) const
virtual int metric(PaintDeviceMetric metric) const
virtual QPaintDevice * redirected(QPoint * offset) const
virtual QPainter * sharedPainter() const
  • 37 protected functions inherited from QWidget
  • 9 protected functions inherited from QObject

Additional Inherited Members

  • 1 signal inherited from QWidget
  • 2 signal inherited from QObject
  • 4 static public members inherited from QWidget
  • 11 static public members inherited from QObject
  • 1 protected slot inherited from QWidget

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

See also Phonon 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:

QSize iconSize() const
void setIconSize(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:

qreal maximumVolume() const
void setMaximumVolume(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:

bool isMuteVisible() const
void setMuteVisible(bool)

orientation : Qt::Orientation

This property holds the orientation of the slider.

The orientation must be Qt::Vertical (the default) or Qt::Horizontal.

Access functions:

Qt::Orientation orientation() const
void setOrientation(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:

int pageStep() const
void setPageStep(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:

int singleStep() const
void setSingleStep(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:

bool hasTracking() const
void setTracking(bool tracking)

Member Function Documentation

VolumeSlider::VolumeSlider(QWidget * parent = 0)

Constructs a new volume slider with the given parent.

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

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

VolumeSlider::~VolumeSlider()

AudioOutput * VolumeSlider::audioOutput() const

See also setAudioOutput().

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

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

See also audioOutput().

Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. Qt 5.0-snapshot
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD.
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP !
 
 
 
 
Partenaires

Hébergement Web