VolumeSlider Class Reference

#include <Phonon/VolumeSlider>

Class Description

Widget providing a slider to control the volume of an AudioOutput.

Author
Matthias Kretz kretz.nosp@m.@kde.nosp@m..org

Definition at line 46 of file volumeslider.h.

+ Inheritance diagram for VolumeSlider:

Public Slots

void setMaximumVolume (qreal)
 
void setOrientation (Qt::Orientation)
 
void setMuteVisible (bool)
 
void setIconSize (const QSize &size)
 
void setAudioOutput (Phonon::AudioOutput *)
 Sets the audio output object to be controlled by this slider. More...
 
- Public Slots inherited from QWidget
void setEnabled (bool)
 
void setDisabled (bool)
 
void setWindowModified (bool)
 
void setWindowTitle (const QString &)
 
void setStyleSheet (const QString &styleSheet)
 
void setFocus ()
 
void update ()
 
void repaint ()
 
virtual void setVisible (bool visible)
 
void setHidden (bool hidden)
 
void show ()
 
void hide ()
 
QT_MOC_COMPAT void setShown (bool shown)
 
void showMinimized ()
 
void showMaximized ()
 
void showFullScreen ()
 
void showNormal ()
 
bool close ()
 
void raise ()
 
void lower ()
 
- Public Slots inherited from QObject
void deleteLater ()
 

Public Member Functions

 VolumeSlider (QWidget *parent=0)
 Constructs a new volume slider with a parent. More...
 
 VolumeSlider (AudioOutput *, QWidget *parent=0)
 
 ~VolumeSlider ()
 
bool hasTracking () const
 
void setTracking (bool tracking)
 
int pageStep () const
 
void setPageStep (int milliseconds)
 
int singleStep () const
 
void setSingleStep (int milliseconds)
 
bool isMuteVisible () const
 
QSize iconSize () const
 
qreal maximumVolume () const
 
Qt::Orientation orientation () const
 
AudioOutputaudioOutput () const
 
- Public Member Functions inherited from QWidget
 QWidget (QWidget *parent=0, Qt::WindowFlags f=0)
 
 ~QWidget ()
 
int devType () const
 
WId winId () const
 
void createWinId ()
 
WId internalWinId () const
 
WId effectiveWinId () const
 
QStylestyle () const
 
void setStyle (QStyle *)
 
bool isTopLevel () const
 
bool isWindow () const
 
bool isModal () const
 
Qt::WindowModality windowModality () const
 
void setWindowModality (Qt::WindowModality windowModality)
 
bool isEnabled () const
 
bool isEnabledTo (QWidget *) const
 
bool isEnabledToTLW () const
 
QRect frameGeometry () const
 
const QRectgeometry () const
 
QRect normalGeometry () const
 
int x () const
 
int y () const
 
QPoint pos () const
 
QSize frameSize () const
 
QSize size () const
 
int width () const
 
int height () const
 
QRect rect () const
 
QRect childrenRect () const
 
QRegion childrenRegion () const
 
QSize minimumSize () const
 
QSize maximumSize () const
 
int minimumWidth () const
 
int minimumHeight () const
 
int maximumWidth () const
 
int maximumHeight () const
 
void setMinimumSize (const QSize &)
 
void setMinimumSize (int minw, int minh)
 
void setMaximumSize (const QSize &)
 
void setMaximumSize (int maxw, int maxh)
 
void setMinimumWidth (int minw)
 
void setMinimumHeight (int minh)
 
void setMaximumWidth (int maxw)
 
void setMaximumHeight (int maxh)
 
QSize sizeIncrement () const
 
void setSizeIncrement (const QSize &)
 
void setSizeIncrement (int w, int h)
 
QSize baseSize () const
 
void setBaseSize (const QSize &)
 
void setBaseSize (int basew, int baseh)
 
void setFixedSize (const QSize &)
 
void setFixedSize (int w, int h)
 
void setFixedWidth (int w)
 
void setFixedHeight (int h)
 
QPoint mapToGlobal (const QPoint &) const
 
QPoint mapFromGlobal (const QPoint &) const
 
QPoint mapToParent (const QPoint &) const
 
QPoint mapFromParent (const QPoint &) const
 
QPoint mapTo (QWidget *, const QPoint &) const
 
QPoint mapFrom (QWidget *, const QPoint &) const
 
QWidgetwindow () const
 
QWidgetnativeParentWidget () const
 
QWidgettopLevelWidget () const
 
const QPalettepalette () const
 
void setPalette (const QPalette &)
 
void setBackgroundRole (QPalette::ColorRole)
 
QPalette::ColorRole backgroundRole () const
 
void setForegroundRole (QPalette::ColorRole)
 
QPalette::ColorRole foregroundRole () const
 
const QFontfont () const
 
void setFont (const QFont &)
 
QFontMetrics fontMetrics () const
 
QFontInfo fontInfo () const
 
QCursor cursor () const
 
void setCursor (const QCursor &)
 
void unsetCursor ()
 
void setMouseTracking (bool enable)
 
bool hasMouseTracking () const
 
bool underMouse () const
 
void setMask (const QBitmap &)
 
void setMask (const QRegion &)
 
QRegion mask () const
 
void clearMask ()
 
void render (QPaintDevice *target, const QPoint &targetOffset=QPoint(), const QRegion &sourceRegion=QRegion(), RenderFlags renderFlags=RenderFlags(DrawWindowBackground|DrawChildren))
 
void render (QPainter *painter, const QPoint &targetOffset=QPoint(), const QRegion &sourceRegion=QRegion(), RenderFlags renderFlags=RenderFlags(DrawWindowBackground|DrawChildren))
 
QGraphicsEffectgraphicsEffect () const
 
void setGraphicsEffect (QGraphicsEffect *effect)
 
void grabGesture (Qt::GestureType type, Qt::GestureFlags flags=Qt::GestureFlags())
 
void ungrabGesture (Qt::GestureType type)
 
QString styleSheet () const
 
QString windowTitle () const
 
void setWindowIcon (const QIcon &icon)
 
QIcon windowIcon () const
 
void setWindowIconText (const QString &)
 
QString windowIconText () const
 
void setWindowRole (const QString &)
 
QString windowRole () const
 
void setWindowFilePath (const QString &filePath)
 
QString windowFilePath () const
 
void setWindowOpacity (qreal level)
 
qreal windowOpacity () const
 
bool isWindowModified () const
 
void setToolTip (const QString &)
 
QString toolTip () const
 
void setStatusTip (const QString &)
 
QString statusTip () const
 
void setWhatsThis (const QString &)
 
QString whatsThis () const
 
QString accessibleName () const
 
void setAccessibleName (const QString &name)
 
QString accessibleDescription () const
 
void setAccessibleDescription (const QString &description)
 
void setLayoutDirection (Qt::LayoutDirection direction)
 
Qt::LayoutDirection layoutDirection () const
 
void unsetLayoutDirection ()
 
void setLocale (const QLocale &locale)
 
QLocale locale () const
 
void unsetLocale ()
 
bool isRightToLeft () const
 
bool isLeftToRight () const
 
bool isActiveWindow () const
 
void activateWindow ()
 
void clearFocus ()
 
void setFocus (Qt::FocusReason reason)
 
Qt::FocusPolicy focusPolicy () const
 
void setFocusPolicy (Qt::FocusPolicy policy)
 
bool hasFocus () const
 
void setFocusProxy (QWidget *)
 
QWidgetfocusProxy () const
 
Qt::ContextMenuPolicy contextMenuPolicy () const
 
void setContextMenuPolicy (Qt::ContextMenuPolicy policy)
 
void grabMouse ()
 
void grabMouse (const QCursor &)
 
void releaseMouse ()
 
void grabKeyboard ()
 
void releaseKeyboard ()
 
int grabShortcut (const QKeySequence &key, Qt::ShortcutContext context=Qt::WindowShortcut)
 
void releaseShortcut (int id)
 
void setShortcutEnabled (int id, bool enable=true)
 
void setShortcutAutoRepeat (int id, bool enable=true)
 
bool updatesEnabled () const
 
void setUpdatesEnabled (bool enable)
 
QGraphicsProxyWidgetgraphicsProxyWidget () const
 
void update (int x, int y, int w, int h)
 
void update (const QRect &)
 
void update (const QRegion &)
 
void repaint (int x, int y, int w, int h)
 
void repaint (const QRect &)
 
void repaint (const QRegion &)
 
void stackUnder (QWidget *)
 
void move (int x, int y)
 
void move (const QPoint &)
 
void resize (int w, int h)
 
void resize (const QSize &)
 
void setGeometry (int x, int y, int w, int h)
 
void setGeometry (const QRect &)
 
QByteArray saveGeometry () const
 
bool restoreGeometry (const QByteArray &geometry)
 
void adjustSize ()
 
bool isVisible () const
 
bool isVisibleTo (QWidget *) const
 
bool isHidden () const
 
bool isMinimized () const
 
bool isMaximized () const
 
bool isFullScreen () const
 
Qt::WindowStates windowState () const
 
void setWindowState (Qt::WindowStates state)
 
void overrideWindowState (Qt::WindowStates state)
 
virtual QSize sizeHint () const
 
virtual QSize minimumSizeHint () const
 
QSizePolicy sizePolicy () const
 
void setSizePolicy (QSizePolicy)
 
void setSizePolicy (QSizePolicy::Policy horizontal, QSizePolicy::Policy vertical)
 
virtual int heightForWidth (int) const
 
QRegion visibleRegion () const
 
void setContentsMargins (int left, int top, int right, int bottom)
 
void setContentsMargins (const QMargins &margins)
 
void getContentsMargins (int *left, int *top, int *right, int *bottom) const
 
QMargins contentsMargins () const
 
QRect contentsRect () const
 
QLayoutlayout () const
 
void setLayout (QLayout *)
 
void updateGeometry ()
 
void setParent (QWidget *parent)
 
void setParent (QWidget *parent, Qt::WindowFlags f)
 
void scroll (int dx, int dy)
 
void scroll (int dx, int dy, const QRect &)
 
QWidgetfocusWidget () const
 
QWidgetnextInFocusChain () const
 
QWidgetpreviousInFocusChain () const
 
bool acceptDrops () const
 
void setAcceptDrops (bool on)
 
void addAction (QAction *action)
 
void addActions (QList< QAction * > actions)
 
void insertAction (QAction *before, QAction *action)
 
void insertActions (QAction *before, QList< QAction * > actions)
 
void removeAction (QAction *action)
 
QList< QAction * > actions () const
 
QWidgetparentWidget () const
 
void setWindowFlags (Qt::WindowFlags type)
 
Qt::WindowFlags windowFlags () const
 
void overrideWindowFlags (Qt::WindowFlags type)
 
Qt::WindowType windowType () const
 
QWidgetchildAt (int x, int y) const
 
QWidgetchildAt (const QPoint &p) const
 
const QX11Infox11Info () const
 
Qt::HANDLE x11PictureHandle () const
 
Qt::HANDLE handle () const
 
void setAttribute (Qt::WidgetAttribute, bool on=true)
 
bool testAttribute (Qt::WidgetAttribute) const
 
QPaintEnginepaintEngine () const
 
void ensurePolished () const
 
QInputContextinputContext ()
 
void setInputContext (QInputContext *)
 
bool isAncestorOf (const QWidget *child) const
 
bool autoFillBackground () const
 
void setAutoFillBackground (bool enabled)
 
void setWindowSurface (QWindowSurface *surface)
 
QWindowSurfacewindowSurface () const
 
virtual QVariant inputMethodQuery (Qt::InputMethodQuery) const
 
Qt::InputMethodHints inputMethodHints () const
 
void setInputMethodHints (Qt::InputMethodHints hints)
 
- Public Member Functions inherited from QObject
Q_INVOKABLE QObject (QObject *parent=0)
 
virtual ~QObject ()
 
virtual bool eventFilter (QObject *, QEvent *)
 
QString objectName () const
 
void setObjectName (const QString &name)
 
bool isWidgetType () const
 
bool signalsBlocked () const
 
bool blockSignals (bool b)
 
QThreadthread () const
 
void moveToThread (QThread *thread)
 
int startTimer (int interval)
 
void killTimer (int id)
 
template<typename T >
findChild (const QString &aName=QString()) const
 
template<typename T >
QList< T > findChildren (const QString &aName=QString()) const
 
template<typename T >
QList< T > findChildren (const QRegExp &re) const
 
const QObjectListchildren () const
 
void setParent (QObject *)
 
void installEventFilter (QObject *)
 
void removeEventFilter (QObject *)
 
bool connect (const QObject *sender, const char *signal, const char *member, Qt::ConnectionType type=Qt::AutoConnection) const
 
bool disconnect (const char *signal=0, const QObject *receiver=0, const char *member=0)
 
bool disconnect (const QObject *receiver, const char *member=0)
 
void dumpObjectTree ()
 
void dumpObjectInfo ()
 
bool setProperty (const char *name, const QVariant &value)
 
QVariant property (const char *name) const
 
QList< QByteArraydynamicPropertyNames () const
 
void setUserData (uint id, QObjectUserData *data)
 
QObjectUserDatauserData (uint id) const
 
QObjectparent () const
 
bool inherits (const char *classname) const
 
- Public Member Functions inherited from QPaintDevice
virtual ~QPaintDevice ()
 
bool paintingActive () const
 
int width () const
 
int height () const
 
int widthMM () const
 
int heightMM () const
 
int logicalDpiX () const
 
int logicalDpiY () const
 
int physicalDpiX () const
 
int physicalDpiY () const
 
int colorCount () const
 
int depth () const
 

Protected Attributes

VolumeSliderPrivate *const k_ptr
 
- Protected Attributes inherited from QObject
QScopedPointer< QObjectDatad_ptr
 
- Protected Attributes inherited from QPaintDevice
ushort painters
 

Properties

qreal maximumVolume
 This property holds the maximum volume that can be set with this slider. More...
 
Qt::Orientation orientation
 This property holds the orientation of the slider. More...
 
bool tracking
 This property holds whether slider tracking is enabled. More...
 
int pageStep
 This property holds the page step. More...
 
int singleStep
 This property holds the single step. More...
 
bool muteVisible
 This property holds whether the mute button/icon next to the slider is visible. More...
 
QSize iconSize
 the icon size used for the mute button/icon. More...
 
- Properties inherited from QWidget
bool modal
 
Qt::WindowModality windowModality
 
bool enabled
 
QRect geometry
 
QRect frameGeometry
 
QRect normalGeometry
 
int x
 
int y
 
QPoint pos
 
QSize frameSize
 
QSize size
 
int width
 
int height
 
QRect rect
 
QRect childrenRect
 
QRegion childrenRegion
 
QSizePolicy sizePolicy
 
QSize minimumSize
 
QSize maximumSize
 
int minimumWidth
 
int minimumHeight
 
int maximumWidth
 
int maximumHeight
 
QSize sizeIncrement
 
QSize baseSize
 
QPalette palette
 
QFont font
 
QCursor cursor
 
bool mouseTracking
 
bool isActiveWindow
 
Qt::FocusPolicy focusPolicy
 
bool focus
 
Qt::ContextMenuPolicy contextMenuPolicy
 
bool updatesEnabled
 
bool visible
 
bool minimized
 
bool maximized
 
bool fullScreen
 
QSize sizeHint
 
QSize minimumSizeHint
 
bool acceptDrops
 
QString windowTitle
 
QIcon windowIcon
 
QString windowIconText
 
double windowOpacity
 
bool windowModified
 
QString toolTip
 
QString statusTip
 
QString whatsThis
 
QString accessibleName
 
QString accessibleDescription
 
Qt::LayoutDirection layoutDirection
 
bool autoFillBackground
 
QString styleSheet
 
QLocale locale
 
QString windowFilePath
 
Qt::InputMethodHints inputMethodHints
 
- Properties inherited from QObject
QString objectName
 

Additional Inherited Members

- Public Types inherited from QWidget
enum  RenderFlag { DrawWindowBackground = 0x1, DrawChildren = 0x2, IgnoreMask = 0x4 }
 
- Public Types inherited from QPaintDevice
enum  PaintDeviceMetric {
  PdmWidth = 1, PdmHeight, PdmWidthMM, PdmHeightMM,
  PdmNumColors, PdmDepth, PdmDpiX, PdmDpiY,
  PdmPhysicalDpiX, PdmPhysicalDpiY
}
 
- Signals inherited from QWidget
void customContextMenuRequested (const QPoint &pos)
 
- Signals inherited from QObject
void destroyed (QObject *=0)
 
- Static Public Member Functions inherited from QWidget
static void setTabOrder (QWidget *, QWidget *)
 
static QWidgetmouseGrabber ()
 
static QWidgetkeyboardGrabber ()
 
static QWidgetfind (WId)
 
- Static Public Member Functions inherited from QObject
static bool connect (const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
 
static bool connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type=Qt::AutoConnection)
 
static bool disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *member)
 
static bool disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &member)
 
static uint registerUserData ()
 
- Protected Slots inherited from QWidget
void updateMicroFocus ()
 
- Protected Member Functions inherited from QWidget
bool event (QEvent *)
 
virtual void mousePressEvent (QMouseEvent *)
 
virtual void mouseReleaseEvent (QMouseEvent *)
 
virtual void mouseDoubleClickEvent (QMouseEvent *)
 
virtual void mouseMoveEvent (QMouseEvent *)
 
virtual void wheelEvent (QWheelEvent *)
 
virtual void keyPressEvent (QKeyEvent *)
 
virtual void keyReleaseEvent (QKeyEvent *)
 
virtual void focusInEvent (QFocusEvent *)
 
virtual void focusOutEvent (QFocusEvent *)
 
virtual void enterEvent (QEvent *)
 
virtual void leaveEvent (QEvent *)
 
virtual void paintEvent (QPaintEvent *)
 
virtual void moveEvent (QMoveEvent *)
 
virtual void resizeEvent (QResizeEvent *)
 
virtual void closeEvent (QCloseEvent *)
 
virtual void contextMenuEvent (QContextMenuEvent *)
 
virtual void tabletEvent (QTabletEvent *)
 
virtual void actionEvent (QActionEvent *)
 
virtual void dragEnterEvent (QDragEnterEvent *)
 
virtual void dragMoveEvent (QDragMoveEvent *)
 
virtual void dragLeaveEvent (QDragLeaveEvent *)
 
virtual void dropEvent (QDropEvent *)
 
virtual void showEvent (QShowEvent *)
 
virtual void hideEvent (QHideEvent *)
 
virtual bool x11Event (XEvent *)
 
virtual void changeEvent (QEvent *)
 
int metric (PaintDeviceMetric) const
 
virtual void inputMethodEvent (QInputMethodEvent *)
 
void resetInputContext ()
 
void create (WId=0, bool initializeWindow=true, bool destroyOldWindow=true)
 
void destroy (bool destroyWindow=true, bool destroySubWindows=true)
 
virtual bool focusNextPrevChild (bool next)
 
bool focusNextChild ()
 
bool focusPreviousChild ()
 
 QWidget (QWidgetPrivate &d, QWidget *parent, Qt::WindowFlags f)
 
virtual void styleChange (QStyle &)
 
virtual void enabledChange (bool)
 
virtual void paletteChange (const QPalette &)
 
virtual void fontChange (const QFont &)
 
virtual void windowActivationChange (bool)
 
virtual void languageChange ()
 
- Protected Member Functions inherited from QObject
QObjectsender () const
 
int senderSignalIndex () const
 
int receivers (const char *signal) const
 
virtual void timerEvent (QTimerEvent *)
 
virtual void childEvent (QChildEvent *)
 
virtual void customEvent (QEvent *)
 
virtual void connectNotify (const char *signal)
 
virtual void disconnectNotify (const char *signal)
 
 QObject (QObjectPrivate &dd, QObject *parent=0)
 
- Protected Member Functions inherited from QPaintDevice
 QPaintDevice ()
 
- Static Protected Attributes inherited from QObject
static const QMetaObject staticQtMetaObject
 

Constructor & Destructor Documentation

VolumeSlider ( QWidget parent = 0)
explicit

Constructs a new volume slider with a parent.

VolumeSlider ( AudioOutput ,
QWidget parent = 0 
)
explicit

Member Function Documentation

bool hasTracking ( ) const
void setTracking ( bool  tracking)
int pageStep ( ) const
void setPageStep ( int  milliseconds)
int singleStep ( ) const
void setSingleStep ( int  milliseconds)
bool isMuteVisible ( ) const
QSize iconSize ( ) const
qreal maximumVolume ( ) const
Qt::Orientation orientation ( ) const
AudioOutput* audioOutput ( ) const
void setMaximumVolume ( qreal  )
slot
void setOrientation ( Qt::Orientation  )
slot
void setMuteVisible ( bool  )
slot
void setIconSize ( const QSize size)
slot
void setAudioOutput ( Phonon::AudioOutput )
slot

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

Member Data Documentation

VolumeSliderPrivate* const k_ptr
protected

Definition at line 138 of file volumeslider.h.

Property Documentation

qreal maximumVolume
readwrite

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

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

Definition at line 55 of file volumeslider.h.

Qt::Orientation orientation
readwrite

This property holds the orientation of the slider.

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

Definition at line 61 of file volumeslider.h.

bool tracking
readwrite

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.

Definition at line 71 of file volumeslider.h.

int pageStep
readwrite

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

Definition at line 81 of file volumeslider.h.

int singleStep
readwrite

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

Definition at line 91 of file volumeslider.h.

bool muteVisible
readwrite

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

By default the mute button/icon is visible.

Definition at line 98 of file volumeslider.h.

QSize iconSize
readwrite

the icon size used for the mute button/icon.

The default size is defined by the GUI style.

Definition at line 105 of file volumeslider.h.


The documentation for this class was generated from the following file: