Phonon  4.7.0
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Pages
volumefadereffect.h
1 /* This file is part of the KDE project
2  Copyright (C) 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 
23 #ifndef PHONON_VOLUMEFADEREFFECT_H
24 #define PHONON_VOLUMEFADEREFFECT_H
25 
26 #include "phonon_export.h"
27 #include "effect.h"
28 
29 
30 #ifndef QT_NO_PHONON_VOLUMEFADEREFFECT
31 
32 namespace Phonon
33 {
34  class VolumeFaderEffectPrivate;
35 
48  class PHONON_EXPORT VolumeFaderEffect : public Effect
49  {
50  Q_OBJECT
51  P_DECLARE_PRIVATE(VolumeFaderEffect)
52  PHONON_HEIR(VolumeFaderEffect)
53  Q_ENUMS(FadeCurve)
62  Q_PROPERTY(float volume READ volume WRITE setVolume)
73  Q_PROPERTY(double volumeDecibel READ volumeDecibel WRITE setVolumeDecibel)
82  Q_PROPERTY(FadeCurve fadeCurve READ fadeCurve WRITE setFadeCurve)
83  public:
87  enum FadeCurve {
122  Fade12Decibel
123  };
124 
125  float volume() const;
126  double volumeDecibel() const;
127 
128  FadeCurve fadeCurve() const;
129 
130  public Q_SLOTS:
141  void fadeIn(int fadeTime);
142 
152  void fadeOut(int fadeTime);
153 
154  void setVolume(float volume);
155  void setVolumeDecibel(double volumeDecibel);
156 
157  void setFadeCurve(FadeCurve curve);
158 
166  void fadeTo(float volume, int fadeTime);
167  };
168 } //namespace Phonon
169 
170 #endif //QT_NO_PHONON_VOLUMEFADEREFFECT
171 
172 
173 // vim: sw=4 ts=4 tw=80
174 #endif // PHONON_VOLUMEFADEREFFECT_H