okular/core/audioplayer.h
Pino Toscano f5c216b19c extract the private class of AudioPlayer out of the implementation, so the Document can store the url of the current document;
disable the playing of external sounds for remote (non-local) documents;
simple compile fix in the embedded sound paying code

svn path=/trunk/KDE/kdegraphics/okular/; revision=686133
2007-07-10 18:24:18 +00:00

67 lines
1.8 KiB
C++

/***************************************************************************
* Copyright (C) 2007 by Pino Toscano <pino@kde.org> *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
***************************************************************************/
#ifndef _OKULAR_AUDIOPLAYER_H_
#define _OKULAR_AUDIOPLAYER_H_
#include <okular/core/okular_export.h>
#include <QtCore/QObject>
namespace Okular {
class AudioPlayerPrivate;
class Document;
class Sound;
class SoundAction;
/**
* @short An audio player.
*
* Singleton utility class to play sounds in documents using the KDE sound
* system.
*/
class OKULAR_EXPORT AudioPlayer : public QObject
{
Q_OBJECT
public:
~AudioPlayer();
/**
* Gets the instance of the audio player.
*/
static AudioPlayer * instance();
/**
* Enqueue the specified @p sound for playing, optionally taking more
* information about the playing from the @p soundlink .
*/
void playSound( const Sound * sound, const SoundAction * linksound = 0 );
/**
* Tell the AudioPlayer to stop all the playbacks.
*/
void stopPlaybacks();
private:
AudioPlayer();
friend class AudioPlayerPrivate;
AudioPlayerPrivate * const d;
friend class Document;
Q_DISABLE_COPY( AudioPlayer )
Q_PRIVATE_SLOT( d, void finished( int ) )
};
}
#endif