| 8 | #include <mutex> |
| 9 | |
| 10 | ChessBoard::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 | |
| 35 | ChessBoard::~ChessBoard() |
| 36 | { |
nothing calls this directly
no outgoing calls
no test coverage detected