1/***************************************************************************
2 * Copyright (C) 1999-2006 by Éric Bischoff <ebischoff@nerim.net> *
3 * Copyright (C) 2007 by Albert Astals Cid <aacid@kde.org> *
4 * *
5 * This program is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation; either version 2 of the License, or *
8 * (at your option) any later version. *
9 ***************************************************************************/
10
11/* Sound factory */
12
13#ifndef _SOUNDFACTORY_H_
14#define _SOUNDFACTORY_H_
15
16#include <QStringList>
17
18class TopLevel;
19
20namespace Phonon
21{
22 class MediaObject;
23}
24
25class SoundFactory
26{
27public:
28
29 SoundFactory(TopLevel *parent);
30 ~SoundFactory();
31
32 bool loadLanguage(const QString &selectedLanguageFile);
33 void playSound(const QString &soundRef) const;
34
35 QString currentSoundFile() const;
36
37 void registerLanguages();
38
39private:
40 QString currentSndFile; // The current language
41
42 int sounds; // Number of sounds
43 QStringList namesList, // List of sound names
44 filesList; // List of sound files associated with each sound name
45
46 TopLevel *topLevel; // Top-level window
47 Phonon::MediaObject *player; // Sound player
48};
49
50#endif
51