File indexing completed on 2024-09-08 06:28:57
0001 /* 0002 SPDX-FileCopyrightText: 2005 Albert Astals Cid <aacid@kde.org> 0003 0004 SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #ifndef SOUNDSPLAYER_H 0008 #define SOUNDSPLAYER_H 0009 0010 #include <phonon/MediaObject> 0011 #include <phonon/audiooutput.h> 0012 0013 #include <QTimer> 0014 0015 #include "blinkengame.h" 0016 0017 class soundsPlayer : public QObject 0018 { 0019 Q_OBJECT 0020 public: 0021 soundsPlayer(); 0022 ~soundsPlayer() override; 0023 0024 void play(blinkenGame::color c); 0025 0026 Q_SIGNALS: 0027 void ended(); 0028 0029 private Q_SLOTS: 0030 void playEnded(); 0031 0032 private: 0033 QString m_greenSound, m_redSound, m_blueSound, m_yellowSound, m_allSound; 0034 Phonon::MediaObject m_mediaObject; 0035 Phonon::AudioOutput m_audioOutput; 0036 0037 QTimer m_warnTimer; 0038 }; 0039 0040 #endif