#include <soundfactory.h>
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. | |
This class manages the sounds toplay in KLettres, reading the data about the sounds in the sounds.xml file which is in /data.
Definition at line 41 of file soundfactory.h.
|
||||||||||||||||
|
Constructor.
Definition at line 35 of file soundfactory.cpp. References filesList, loadLanguage(), KLettres::loadLayout(), namesList, and registerLanguages(). |
|
|
Destructor.
Definition at line 52 of file soundfactory.cpp. |
|
|
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(). |
|
||||||||||||
|
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(). |
|
|
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(). |
|
|
Register the various available languages.
Definition at line 91 of file soundfactory.cpp. References KLettres::registerLanguage(). Referenced by SoundFactory(). |
|
|
List of sound files associated with each sound name.
Definition at line 59 of file soundfactory.h. Referenced by loadLanguage(), playSound(), SoundFactory(), and ~SoundFactory(). |
|
|
List of sound names.
Definition at line 57 of file soundfactory.h. Referenced by KLettresView::chooseSound(), loadLanguage(), SoundFactory(), and ~SoundFactory(). |
|
|
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(). |
1.2.18