phonon/audiooutput.h Source File

audiooutput.h
Go to the documentation of this file.
1 /* This file is part of the KDE project
2  Copyright (C) 2005-2006 Matthias Kretz <kretz@kde.org>
3 
4  This library is free software; you can redistribute it and/or
5  modify it under the terms of the GNU Lesser General Public
6  License as published by the Free Software Foundation; either
7  version 2.1 of the License, or (at your option) version 3, or any
8  later version accepted by the membership of KDE e.V. (or its
9  successor approved by the membership of KDE e.V.), Nokia Corporation
10  (or its successors, if any) and the KDE Free Qt Foundation, which shall
11  act as a proxy defined in Section 6 of version 3 of the license.
12 
13  This library is distributed in the hope that it will be useful,
14  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  Lesser General Public License for more details.
17 
18  You should have received a copy of the GNU Lesser General Public
19  License along with this library. If not, see <http://www.gnu.org/licenses/>.
20 
21 */
22 #ifndef Phonon_AUDIOOUTPUT_H
23 #define Phonon_AUDIOOUTPUT_H
24 
25 #include "phonon_export.h"
26 #include "abstractaudiooutput.h"
27 #include "phonondefs.h"
28 #include "phononnamespace.h"
29 #include "objectdescription.h"
30 
33 
34 class QString;
35 
36 class AudioOutputAdaptor;
37 namespace Phonon
38 {
39  class AudioOutputPrivate;
40 
51  {
52  friend class FactoryPrivate;
53  friend class ::AudioOutputAdaptor;
54  Q_OBJECT
62  Q_PROPERTY(QString name READ name WRITE setName)
69  Q_PROPERTY(qreal volume READ volume WRITE setVolume NOTIFY volumeChanged)
79  Q_PROPERTY(qreal volumeDecibel READ volumeDecibel WRITE setVolumeDecibel)
91  Q_PROPERTY(AudioOutputDevice outputDevice READ outputDevice WRITE setOutputDevice)
92 
98  Q_PROPERTY(bool muted READ isMuted WRITE setMuted NOTIFY mutedChanged)
99  public:
117  explicit AudioOutput(Phonon::Category category, QObject *parent = 0);
118  explicit AudioOutput(QObject *parent = 0);
119 
120  QString name() const;
121  qreal volume() const;
122  qreal volumeDecibel() const;
123 
129  Phonon::Category category() const;
130  AudioOutputDevice outputDevice() const;
131  bool isMuted() const;
132 
133  public Q_SLOTS:
134  void setName(const QString &newName);
135  void setVolume(qreal newVolume);
136  void setVolumeDecibel(qreal newVolumeDecibel);
137  bool setOutputDevice(const Phonon::AudioOutputDevice &newAudioOutputDevice);
138  void setMuted(bool mute);
139 
140  Q_SIGNALS:
147  void volumeChanged(qreal newVolume);
148 
154  void mutedChanged(bool);
155 
165  void outputDeviceChanged(const Phonon::AudioOutputDevice &newAudioOutputDevice);
166 
167  private:
168  Q_PRIVATE_SLOT(k_func(), void _k_volumeChanged(qreal))
169  Q_PRIVATE_SLOT(k_func(), void _k_revertFallback())
170  Q_PRIVATE_SLOT(k_func(), void _k_audioDeviceFailed())
171  Q_PRIVATE_SLOT(k_func(), void _k_deviceListChanged())
172  Q_PRIVATE_SLOT(k_func(), void _k_deviceChanged(QString streamUuid, int device))
173  };
174 } //namespace Phonon
175 
178 
179 // vim: sw=4 ts=4 tw=80
180 #endif // Phonon_AUDIOOUTPUT_H
#define QT_END_NAMESPACE
Definition: qglobal.h:128
#define Q_PROPERTY(text)
Definition: qobjectdefs.h:80
#define QT_BEGIN_HEADER
Definition: qglobal.h:141
#define Q_PRIVATE_SLOT(d, signature)
Definition: qobjectdefs.h:73
#define Q_SLOTS
Definition: qobjectdefs.h:71
#define Q_SIGNALS
Definition: qobjectdefs.h:72
#define QT_BEGIN_NAMESPACE
Definition: qglobal.h:127
Provides a tuple of enduser visible name and description.
Category
Set's the category your program should be listed in in the mixer.
Common base class for all audio outputs.
#define Q_OBJECT
Definition: qobjectdefs.h:157
GLuint const GLchar * name
Definition: GLee.h:1704
The KDE Multimedia classes.
Class for audio output to the soundcard.
Definition: audiooutput.h:50
#define K_DECLARE_PRIVATE(Class)
Definition: phonondefs.h:46
#define PHONON_EXPORT
Definition: phonon_export.h:38
#define QT_END_HEADER
Definition: qglobal.h:142