• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdecore
 

tdecore

  • tdecore
kaudioplayer.cpp
1  /*
2 
3  Copyright (C) 2000 Stefan Westerfeld
4  stefan@space.twc.de
5 
6  This library is free software; you can redistribute it and/or
7  modify it under the terms of the GNU Library General Public
8  License as published by the Free Software Foundation; either
9  version 2 of the License, or (at your option) any later version.
10 
11  This library is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  Library General Public License for more details.
15 
16  You should have received a copy of the GNU Library General Public License
17  along with this library; see the file COPYING.LIB. If not, write to
18  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19  Boston, MA 02110-1301, USA.
20 
21  */
22 
23 #include "kaudioplayer.h"
24 #include "knotifyclient.h"
25 
26 class KAudioPlayerPrivate {
27 public:
28  TQString filename;
29 
30  KAudioPlayerPrivate(const TQString &filename) : filename(filename) { }
31 };
32 
33 KAudioPlayer::KAudioPlayer( const TQString& filename,
34  TQObject* parent, const char* name ) : TQObject(parent,name)
35 {
36  d = new KAudioPlayerPrivate(filename);
37 }
38 
39 KAudioPlayer::~KAudioPlayer()
40 {
41  delete d;
42 }
43 
44 void KAudioPlayer::play(const TQString &filename)
45 {
46  KAudioPlayer ap(filename);
47  ap.play();
48 }
49 
50 void KAudioPlayer::play()
51 {
52  KNotifyClient::userEvent("KAudioPlayer event",
53  KNotifyClient::Sound,KNotifyClient::Notification,d->filename);
54 }
55 
56 #include "kaudioplayer.moc"
KAudioPlayer::KAudioPlayer
KAudioPlayer(const TQString &filename, TQObject *parent=0, const char *name=0)
Constructor.
Definition: kaudioplayer.cpp:33
KAudioPlayer::play
void play()
Play function as slot.
Definition: kaudioplayer.cpp:50
KAudioPlayer::play
static void play(const TQString &filename)
Static play function.
Definition: kaudioplayer.cpp:44
KNotifyClient::userEvent
int userEvent(const TQString &text=TQString::null, int present=Default, int level=Default, const TQString &sound=TQString::null, const TQString &file=TQString::null) KDE_DEPRECATED
Definition: knotifyclient.cpp:130
KAudioPlayer::~KAudioPlayer
~KAudioPlayer()
Destructor.
Definition: kaudioplayer.cpp:39
KAudioPlayer
This class provides one-shot-and-forget audio playing.
Definition: kaudioplayer.h:56

tdecore

Skip menu "tdecore"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

tdecore

Skip menu "tdecore"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  •     tdecore
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  • tdeioslave
  •   http
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdecore by doxygen 1.8.8
This website is maintained by Timothy Pearson.