Main Page   Compound List   File List   Compound Members   File Members  

SoundFactory Class Reference

Sounds factory class: find and play the right sound. More...

#include <soundfactory.h>

List of all members.

Public Methods

 SoundFactory (KLettres *parent, const char *name, uint selectedLanguage)
 Constructor.

 ~SoundFactory ()
 Destructor.

void change (uint selectedLanguage)
 Change the language when the user changes the language in the Languages menu.

void playSound (int)
 Play the sound associated to int soundRef.

bool loadLanguage (QDomDocument &layoutDocument, uint toLoad)
 Load the sounds of one given language.


Public Attributes

int sounds
 Number of sounds corresponding to the current langauge and level (alphabet or syllables).

QString * namesList
 List of sound names.

QString * filesList
 List of sound files associated with each sound name.


Protected Methods

bool registerLanguages (QDomDocument &layoutDocument)
 Register the various available languages.


Detailed Description

Sounds factory class: find and play the right sound.

This class manages the sounds toplay in KLettres, reading the data about the sounds in the sounds.xml file which is in /data.

Author:
Anne-Marie Mahfouf <annma@kde.org>
Version:
1.1

Definition at line 41 of file soundfactory.h.


Constructor & Destructor Documentation

SoundFactory::SoundFactory KLettres   parent,
const char *    name,
uint    selectedLanguage
 

Constructor.

Definition at line 35 of file soundfactory.cpp.

References filesList, loadLanguage(), KLettres::loadLayout(), namesList, and registerLanguages().

SoundFactory::~SoundFactory  
 

Destructor.

Definition at line 52 of file soundfactory.cpp.

References filesList, and namesList.


Member Function Documentation

void SoundFactory::change uint    selectedLanguage
 

Change the language when the user changes the language in the Languages menu.

Definition at line 59 of file soundfactory.cpp.

References loadLanguage(), and KLettres::loadLayout().

Referenced by KLettres::changeLanguage().

bool SoundFactory::loadLanguage QDomDocument &    layoutDocument,
uint    toLoad
 

Load the sounds of one given language.

Definition at line 131 of file soundfactory.cpp.

References filesList, KLettres::m_view, namesList, KLettresView::niveau, and sounds.

Referenced by change(), and SoundFactory().

void SoundFactory::playSound int   
 

Play the sound associated to int soundRef.

Definition at line 70 of file soundfactory.cpp.

References filesList, and sounds.

Referenced by KLettresView::chooseSound(), KLettresView::timer1(), and KLettresView::timerDone().

bool SoundFactory::registerLanguages QDomDocument &    layoutDocument [protected]
 

Register the various available languages.

Definition at line 91 of file soundfactory.cpp.

References KLettres::registerLanguage().

Referenced by SoundFactory().


Member Data Documentation

QString* SoundFactory::filesList
 

List of sound files associated with each sound name.

Definition at line 59 of file soundfactory.h.

Referenced by loadLanguage(), playSound(), SoundFactory(), and ~SoundFactory().

QString* SoundFactory::namesList
 

List of sound names.

Definition at line 57 of file soundfactory.h.

Referenced by KLettresView::chooseSound(), loadLanguage(), SoundFactory(), and ~SoundFactory().

int SoundFactory::sounds
 

Number of sounds corresponding to the current langauge and level (alphabet or syllables).

Definition at line 55 of file soundfactory.h.

Referenced by KLettresView::chooseSound(), loadLanguage(), and playSound().


The documentation for this class was generated from the following files:
Generated on Sat Oct 18 21:37:50 2003 by doxygen1.2.18