klettres
soundfactory.h
Go to the documentation of this file.00001 /* ------------------------------------------------------------- 00002 From KDE Tuberling 00003 mailto:e.bischoff@noos.fr 00004 ------------------------------------------------------------- */ 00005 /* 00006 * Copyright (C) 2001 Eric Bischoff <e.bischoff@noos.fr> 00007 2004-2007 Anne-Marie Mahfouf <annma@kde.org> 00008 00009 This program is free software; you can redistribute it and/or 00010 modify it under the terms of the GNU General Public 00011 License as published by the Free Software Foundation; either 00012 version 2 of the License, or (at your option) any later version. 00013 00014 This program is distributed in the hope that it will be useful, 00015 but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00017 GNU General Public License for more details. 00018 00019 You should have received a copy of the GNU General Public License 00020 along with this program; if not, write to the Free Software 00021 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 00022 */ 00023 00024 00025 #ifndef _SOUNDFACTORY_H_ 00026 #define _SOUNDFACTORY_H_ 00027 00028 #include <QObject> 00029 #include <QStringList> 00030 #include <QDomDocument> 00031 00032 class KLettres; 00033 namespace Phonon 00034 { 00035 class MediaObject; 00036 } 00037 00047 class SoundFactory : public QObject 00048 { 00049 Q_OBJECT 00050 00051 public: 00052 00053 SoundFactory(KLettres *parent, const char *name); 00054 ~SoundFactory(); 00055 00057 KLettres *klettres; 00059 void change(const QString ¤tLanguage); 00061 void playSound(int ) ; 00063 uint sounds; 00065 QStringList namesList; 00067 QStringList filesList; 00073 bool loadLanguage(QDomDocument &layoutDocument, const QString ¤tLanguage); 00075 QDomDocument m_layoutsDocument; 00077 QList<int> randomList; 00078 00079 private: 00081 void loadFailure(); 00083 void setSoundSequence(); 00084 Phonon::MediaObject *m_player; 00085 }; 00086 00087 #endif
KDE 4.2 API Reference