arts Library API Documentation

KArtsDispatcher Class Reference

KArtsDispatcher ensures that an instance of Arts::Dispatcher using an Arts::QIOManager exists. More...

#include <kartsdispatcher.h>

Inheritance diagram for KArtsDispatcher:

QObject List of all members.

Public Member Functions

 KArtsDispatcher (QObject *parent=0, const char *name=0)
 ~KArtsDispatcher ()

Detailed Description

KArtsDispatcher ensures that an instance of Arts::Dispatcher using an Arts::QIOManager exists.

When the last KArtsDispatcher is deleted, the Arts::Dispatcher is released as well.

Using KArtsDispatcher is especially useful in setups where another plugin might also already use an Arts::Dispatcher, for instance in konqueror.

 {
   // old code
   Arts::QIOManager qiomanager;
   Arts::Dispatcher dispatcher(&qiomanager);

   Arts::SoundServer server = Arts::Reference("global:Arts_SoundServer");
   server.play("/usr/share/sounds/pop.wav");
 }

 {
   // new code
   KArtsDispatcher dispatcher;

   Arts::SoundServer server = Arts::Reference("global:Arts_SoundServer");
   server.play("/usr/share/sounds/pop.wav");
 }

Definition at line 64 of file kartsdispatcher.h.


Constructor & Destructor Documentation

KArtsDispatcher::KArtsDispatcher QObject parent = 0,
const char *  name = 0
 

Constructor.

Parameters:
parent the parent Qt object
name the Qt object name of this object

Definition at line 33 of file kartsdispatcher.cc.

References endl(), and kdWarning().

KArtsDispatcher::~KArtsDispatcher  ) 
 

Destructor.

Definition at line 49 of file kartsdispatcher.cc.


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for arts Library Version 3.4.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Mon Jun 12 11:37:09 2006 by doxygen 1.4.4 written by Dimitri van Heesch, © 1997-2003