• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdeedu API Reference
  • KDE Home
  • Contact Us
 

klettres

  • sources
  • kde-4.14
  • kdeedu
  • klettres
  • src
soundfactory.h
Go to the documentation of this file.
1 /* -------------------------------------------------------------
2  From KDE Tuberling
3  mailto:e.bischoff@noos.fr
4  ------------------------------------------------------------- */
5  /*
6  * Copyright (C) 2001 Eric Bischoff <e.bischoff@noos.fr>
7  2004-2007 Anne-Marie Mahfouf <annma@kde.org>
8 
9  This program is free software; you can redistribute it and/or
10  modify it under the terms of the GNU General Public
11  License as published by the Free Software Foundation; either
12  version 2 of the License, or (at your option) any later version.
13 
14  This program is distributed in the hope that it will be useful,
15  but WITHOUT ANY WARRANTY; without even the implied warranty of
16  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  GNU General Public License for more details.
18 
19  You should have received a copy of the GNU General Public License
20  along with this program; if not, write to the Free Software
21  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
22  */
23 
24 
25 #ifndef _SOUNDFACTORY_H_
26 #define _SOUNDFACTORY_H_
27 
28 #include <QObject>
29 #include <QStringList>
30 #include <QDomDocument>
31 
32 class KLettres;
33 namespace Phonon
34 {
35  class MediaObject;
36 }
37 
47 class SoundFactory : public QObject
48 {
49  Q_OBJECT
50 
51 public:
52 
53  SoundFactory(KLettres *parent, const char *name);
54  ~SoundFactory();
55 
57  KLettres *klettres;
59  void change(const QString &currentLanguage);
61  void playSound(int ) ;
63  uint sounds;
65  QStringList namesList;
67  QStringList filesList;
73  bool loadLanguage(QDomDocument &layoutDocument, const QString &currentLanguage);
75  QDomDocument m_layoutsDocument;
77  QList<int> randomList;
78 
79 private:
81  void loadFailure();
83  void setSoundSequence();
84  Phonon::MediaObject *m_player;
85 };
86 
87 #endif
SoundFactory::filesList
QStringList filesList
List of sound files associated with each sound name.
Definition: soundfactory.h:67
SoundFactory::namesList
QStringList namesList
List of sound names.
Definition: soundfactory.h:65
KLettres
Application Main Window.
Definition: klettres.h:41
QObject::name
const char * name() const
SoundFactory::SoundFactory
SoundFactory(KLettres *parent, const char *name)
Definition: soundfactory.cpp:35
QObject
Phonon::MediaObject
SoundFactory::~SoundFactory
~SoundFactory()
Definition: soundfactory.cpp:55
SoundFactory::sounds
uint sounds
Number of sounds corresponding to the current language and level (alphabet or syllables) ...
Definition: soundfactory.h:63
SoundFactory
This class manages the sounds to play in KLettres, reading the data about the sounds in the sounds...
Definition: soundfactory.h:47
QString
QList< int >
SoundFactory::loadLanguage
bool loadLanguage(QDomDocument &layoutDocument, const QString &currentLanguage)
Load the sounds of one given language Call that when you read the language from Config and when the l...
Definition: soundfactory.cpp:105
QStringList
SoundFactory::randomList
QList< int > randomList
The random sequence of integers.
Definition: soundfactory.h:77
SoundFactory::change
void change(const QString &currentLanguage)
Change the language when the user changes the language in the Languages menu.
Definition: soundfactory.cpp:59
SoundFactory::klettres
KLettres * klettres
Call the main instance of the program.
Definition: soundfactory.h:57
QDomDocument
SoundFactory::playSound
void playSound(int)
Play the sound associated to int soundRef.
Definition: soundfactory.cpp:71
QObject::parent
QObject * parent() const
SoundFactory::m_layoutsDocument
QDomDocument m_layoutsDocument
The language document.
Definition: soundfactory.h:75
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:12:27 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

klettres

Skip menu "klettres"
  • Main Page
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members

kdeedu API Reference

Skip menu "kdeedu API Reference"
  • Analitza
  •     lib
  • kalgebra
  • kalzium
  •   libscience
  • kanagram
  • kig
  •   lib
  • klettres
  • marble
  • parley
  • rocs
  •   App
  •   RocsCore
  •   VisualEditor
  •   stepcore

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal