Source Code (Use browser search to find items of interest.)
Class Index
kdelibs'KAudioPlayer (./kdelibs/kdecore/kaudioplayer.h:49)
class KAudioPlayer : public QObject {
Q_OBJECT
private:
class KAudioPlayerPrivate *d;
public:
/**
* Constructor.
*
* @param filename Absolute path to the filename of the sound file to play
* @param parent A parent QObject for this KAudioPlayer
* @param name An internal name for this KAudioPlayer
*/
KAudioPlayer( const QString& filename,
QObject* parent = 0, const char* name = 0 );
/**
* Destructor.
*/
~KAudioPlayer();
/**
* Static play function.
*
* @param filename Absolute path to the filename of the sound file to play.
* if not absolute, goes off KDEDIR/share/sounds/ (preferred)
*/
static void play(QString filename);
public slots:
/**
* Play function as slot.
*
* Plays the soundfile given to the constructor.
*/
void play();
};
kdelibs'KAudioPlayer::KAudioPlayer() (./kdelibs/kdecore/kaudioplayer.cpp:33)
KAudioPlayer::KAudioPlayer( const QString& filename,
QObject* parent, const char* name ) : QObject(parent,name)
{
d = new KAudioPlayerPrivate(filename);
}
kdelibs'KAudioPlayer::~KAudioPlayer() (./kdelibs/kdecore/kaudioplayer.cpp:39)
KAudioPlayer::~KAudioPlayer()
{
delete d;
}
kdelibs'KAudioPlayer::play() (./kdelibs/kdecore/kaudioplayer.cpp:44)
void KAudioPlayer::play(QString filename)
{
KAudioPlayer ap(filename);
ap.play();
}
kdelibs'KAudioPlayer::play() (./kdelibs/kdecore/kaudioplayer.cpp:50)
void KAudioPlayer::play()
{
KNotifyClient::userEvent("KAudioPlayer event",
KNotifyClient::Sound,d->filename);
}