1 /***************************************************************************
2 * Copyright (C) 2007 by Pino Toscano <pino@kde.org> *
4 * This program is free software; you can redistribute it and/or modify *
5 * it under the terms of the GNU General Public License as published by *
6 * the Free Software Foundation; either version 2 of the License, or *
7 * (at your option) any later version. *
8 ***************************************************************************/
10 #ifndef _OKULAR_AUDIOPLAYER_H_
11 #define _OKULAR_AUDIOPLAYER_H_
13 #include <okular/core/okular_export.h>
15 #include <QtCore/QObject>
19 class AudioPlayerPrivate
;
25 * @short An audio player.
27 * Singleton utility class to play sounds in documents using the KDE sound
30 class OKULAR_EXPORT AudioPlayer
: public QObject
38 * Gets the instance of the audio player.
40 static AudioPlayer
* instance();
43 * Enqueue the specified @p sound for playing, optionally taking more
44 * information about the playing from the @p soundlink .
46 void playSound( const Sound
* sound
, const SoundAction
* linksound
= 0 );
49 * Tell the AudioPlayer to stop all the playbacks.
56 friend class AudioPlayerPrivate
;
57 AudioPlayerPrivate
* const d
;
58 friend class Document
;
60 Q_DISABLE_COPY( AudioPlayer
)
61 Q_PRIVATE_SLOT( d
, void finished( int ) )