SQLite compatibility and related fixes
[kworship.git] / kworship / media / KwMediaPreferencesAudio.h
blobb5e4e909588c81b6dccd14439486e99869552786
1 /***************************************************************************
2 * This file is part of KWorship. *
3 * Copyright 2008 James Hogan <james@albanarts.com> *
4 * *
5 * KWorship is free software: you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation, either version 2 of the License, or *
8 * (at your option) any later version. *
9 * *
10 * KWorship is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
14 * *
15 * You should have received a copy of the GNU General Public License *
16 * along with KWorship. If not, write to the Free Software Foundation, *
17 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
18 ***************************************************************************/
20 #ifndef _KwMediaPreferencesAudio_h_
21 #define _KwMediaPreferencesAudio_h_
23 /**
24 * @file KwMediaPreferencesAudio.h
25 * @brief A media item's audio preferences.
26 * @author James Hogan <james@albanarts.com>
29 #include "KwAbstractMediaPreferences.h"
31 /// A media item's audio preferences.
32 /**
33 * Basically this is audio preferences such as volume, muted, fadeout time.
35 class KwMediaPreferencesAudio : public KwAbstractMediaPreferences
37 Q_OBJECT
38 public:
41 * Constructors + destructors
44 /// Default constructor.
45 KwMediaPreferencesAudio();
47 /// Destructor.
48 virtual ~KwMediaPreferencesAudio();
51 * Accessors
54 /// Get the volume level.
55 qreal getVolume() const;
57 /// Get whether the audio is muted.
58 bool getMuted() const;
60 /// Get the fadeout time in msecs.
61 qint32 getFadeoutMsec() const;
63 public slots:
66 * Slots
69 /// Set the volume level.
70 void setVolume(qreal volume);
72 /// Set whether the audio is muted.
73 void setMuted(bool muted);
75 /// Set the fadeout time in msecs.
76 void setFadeoutMsec(qint32 fadeoutMsec);
78 signals:
81 * Signals
84 /// Volume level has changed.
85 void volumeChanged(qreal newVolume);
87 /// Muted has changed.
88 void mutedChanged(bool muted);
90 private:
93 * Variables
96 /// Volume level.
97 qreal m_volume;
99 /// Whether the sound is muted.
100 bool m_muted;
102 /// Audio fadeout time in msec.
103 qint32 m_fadeoutMsec;
107 #endif // _KwMediaPreferencesAudio_h_