3 Star 2 Fork 2

oisc/Qt 2048

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
gameview.h 1.06 KB
一键复制 编辑 原始数据 按行查看 历史
oisc 提交于 2014-06-05 12:42 . Game 2048 目前没有Issue
#ifndef GAMEVIEW_H
#define GAMEVIEW_H
#include <QWidget>
#include <QLabel>
#include <QPushButton>
#include <QKeyEvent>
#include "scoreboard.h"
#include "numbergrid.h"
#include "gamedatadef.h"
#include "mask.h"
class GameView : public QWidget
{
Q_OBJECT
public:
explicit GameView(QWidget *parent = 0);
public slots:
void display(ViewData *data); //将模型发过来的数据呈现的函数
void slot_restart(); //重新开始
void win(); //展示赢得函数
void gameover(); //展示结束的函数
signals:
void restart(); //重置的信号 发给模型要求重置
void key_op(GameOP); //操作信号
private:
QLabel *title, *info; //提示文字
ScoreBoard *scoreb; //分数板
QPushButton *reset; //重新开始按钮
NumberGrid *ng; //数值格子
Mask *mask; //展示输赢的蒙版
bool isActive; //表示当前是否接受操作
void showMsg(QString); //显示蒙版
void hideMsg(); //隐藏蒙版
void setupUi();
void keyPressEvent(QKeyEvent *e);
};
#endif // GAMEVIEW_H
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/gitoisc/Qt-2048.git
git@gitee.com:gitoisc/Qt-2048.git
gitoisc
Qt-2048
Qt 2048
master

搜索帮助