49 lines
1.1 KiB
C
Raw Normal View History

2024-11-25 17:15:44 +08:00
#ifndef SPASMTIPSDIALOG_H
#define SPASMTIPSDIALOG_H
#include <QDialog>
#include <QSound>
namespace Ui {
class SpasmTipsDialog;
}
class SpasmTipsDialog : public QDialog
{
Q_OBJECT
public:
explicit SpasmTipsDialog(QWidget *parent = nullptr);
~SpasmTipsDialog();
/*****痉挛弹窗以及痉挛次数显示****
* @bool isVisable是否显示该弹窗
* @int times痉挛次数
* ******/
void setSpasmDialogVisible(bool isVisable,int times);
/****设置痉挛后方向***
* @int8_t direction方向 0- 1-
* ****/
void setSpasmCompletedDirection(int8_t direction);
//痉挛报警音控制
void playBell();
//停止报警音
void stopPlayBell();
//bool returnGamePauseFlag();
protected:
void paintEvent(QPaintEvent *event);
virtual void changeEvent(QEvent* event);
private slots:
void on_confirm_Btn_clicked();
private:
Ui::SpasmTipsDialog *ui;
int8_t m_direction; //0-逆向 1-正向
QSound bells; //铃声对象
// bool gamePauseFlag;
};
#endif // SPASMTIPSDIALOG_H