00001 /* This file is part of the KDE project 00002 Copyright (C) 2006 Matthias Kretz <kretz@kde.org> 00003 00004 This library is free software; you can redistribute it and/or 00005 modify it under the terms of the GNU Lesser General Public 00006 License as published by the Free Software Foundation; either 00007 version 2.1 of the License, or (at your option) version 3, or any 00008 later version accepted by the membership of KDE e.V. (or its 00009 successor approved by the membership of KDE e.V.), Nokia Corporation 00010 (or its successors, if any) and the KDE Free Qt Foundation, which shall 00011 act as a proxy defined in Section 6 of version 3 of the license. 00012 00013 This library is distributed in the hope that it will be useful, 00014 but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00016 Lesser General Public License for more details. 00017 00018 You should have received a copy of the GNU Lesser General Public 00019 License along with this library. If not, see <http://www.gnu.org/licenses/>. 00020 00021 */ 00022 00023 #ifndef PHONON_VOLUMEFADEREFFECT_H 00024 #define PHONON_VOLUMEFADEREFFECT_H 00025 00026 #include "phonon_export.h" 00027 #include "effect.h" 00028 00029 QT_BEGIN_HEADER 00030 QT_BEGIN_NAMESPACE 00031 00032 #ifndef QT_NO_PHONON_VOLUMEFADEREFFECT 00033 00034 namespace Phonon 00035 { 00036 class VolumeFaderEffectPrivate; 00037 00050 class PHONON_EXPORT VolumeFaderEffect : public Effect 00051 { 00052 Q_OBJECT 00053 K_DECLARE_PRIVATE(VolumeFaderEffect) 00054 PHONON_HEIR(VolumeFaderEffect) 00055 Q_ENUMS(FadeCurve) 00064 Q_PROPERTY(float volume READ volume WRITE setVolume) 00075 Q_PROPERTY(double volumeDecibel READ volumeDecibel WRITE setVolumeDecibel) 00084 Q_PROPERTY(FadeCurve fadeCurve READ fadeCurve WRITE setFadeCurve) 00085 public: 00089 enum FadeCurve { 00103 Fade3Decibel, 00112 Fade6Decibel, 00120 Fade9Decibel, 00124 Fade12Decibel 00125 }; 00126 00127 float volume() const; 00128 double volumeDecibel() const; 00129 00130 FadeCurve fadeCurve() const; 00131 00132 public Q_SLOTS: 00143 void fadeIn(int fadeTime); 00144 00154 void fadeOut(int fadeTime); 00155 00156 void setVolume(float volume); 00157 void setVolumeDecibel(double volumeDecibel); 00158 00159 void setFadeCurve(FadeCurve curve); 00160 00168 void fadeTo(float volume, int fadeTime); 00169 }; 00170 } //namespace Phonon 00171 00172 #endif //QT_NO_PHONON_VOLUMEFADEREFFECT 00173 00174 QT_END_NAMESPACE 00175 QT_END_HEADER 00176 00177 // vim: sw=4 ts=4 tw=80 00178 #endif // PHONON_VOLUMEFADEREFFECT_H