summaryrefslogtreecommitdiffstats
path: root/ktuberling/soundfactory.h
blob: 1eb0abd569b379873e6ab94c9a290e0130c8e78b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/* -------------------------------------------------------------
   KDE Tuberling
   Sound factory
   mailto:e.bischoff@noos.fr
 ------------------------------------------------------------- */


#ifndef _SOUNDFACTORY_H_
#define _SOUNDFACTORY_H_

#include "qobject.h"

class QDomDocument;
class TopLevel;

class SoundFactory : public QObject
{
  Q_OBJECT

public:

  SoundFactory(TopLevel *parent, const char *name, uint selectedLanguage);
  ~SoundFactory();

  void change(uint selectedLanguage);
  void playSound(const QString &soundRef) const;

protected:

  bool registerLanguages(QDomDocument &layoutDocument);
  bool loadLanguage(QDomDocument &layoutDocument, uint toLoad);

private:

  void loadFailure();

private:

  int sounds;			// Number of sounds
  QString *namesList,		// List of sound names
  	  *filesList;           // List of sound files associated with each sound name

  TopLevel *topLevel;		// Top-level window
};

#endif