MCPcopy Create free account
hub / github.com/XMuli/ChineseChess / ChessBoard

Method ChessBoard

ChessBoard.cpp:10–33  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8#include <mutex>
9
10ChessBoard::ChessBoard(QWidget *parent) :
11 QMainWindow(parent),
12 ui(new Ui::ChessBoard)
13{
14 init();
15 m_bIsTcpServer = true;
16 m_bReverseView = false;
17
18 //计时器部分
19 m_timer = new QTimer; //初始化定时器
20 m_timeRecord = new QTime(0, 0, 0); //初始化时间
21 m_bIsStart = false; //初始为还未计时
22 connect(m_timer,SIGNAL(timeout()),this,SLOT(updateTime()));
23
24 m_pAbout = new AboutAuthor();
25
26 this->setWindowIcon(QIcon(":/images/chess.svg"));
27 ui->setupUi(this);
28
29 // 交互只依赖于 ChessBoard,自身绘制用的 QLabel 需要放行鼠标事件
30 if (ui->label) {
31 ui->label->setAttribute(Qt::WA_TransparentForMouseEvents, true);
32 }
33}
34
35ChessBoard::~ChessBoard()
36{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected