forked from XMuli/ChineseChess
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ChessVoice.h
49 lines (43 loc) · 1.61 KB
/
ChessVoice.h
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
47
48
49
/*
* Author: kirayamato
* mail: kirawhile1@gmail.com
* github: https://github.com/kira-yamatoo
* blogs: http://www.kirayamato.fun/
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/gpl-3.0.html>.
*/
#ifndef CHESSVOICE_H
#define CHESSVOICE_H
#include <QObject>
#include <QSound>
class ChessVoice : public QObject
{
Q_OBJECT
public:
explicit ChessVoice(QObject *parent = nullptr);
~ChessVoice();
QSound *m_win =new QSound(":/sound/WinSound.wav",this);
QSound *m_select =new QSound(":/sound/selectChess.wav",this);
QSound *m_move =new QSound(":/sound/moveChess.wav",this);
QSound *m_eat =new QSound(":/sound/eatChess.wav",this);
QSound *m_back =new QSound(":/sound/backChess.wav",this);
QSound *m_general =new QSound(":/sound/generalSound.wav",this);
void voiceWin(); //胜利音效
void voiceSelect(); //选棋音效
void voiceMove(); //移动音效
void voiceEat(); //吃子音效
void voiceBack(); //悔棋音效
void voiceGeneral();//将军音效
};
#endif // CHESSVOICE_H