Cute Chess 0.1
evalwidget.h
1/*
2 This file is part of Cute Chess.
3 Copyright (C) 2008-2018 Cute Chess authors
4
5 Cute Chess is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version.
9
10 Cute Chess is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with Cute Chess. If not, see <http://www.gnu.org/licenses/>.
17*/
18
19#ifndef EVALWIDGET_H
20#define EVALWIDGET_H
21
22#include <QWidget>
23#include <QPointer>
24#include <moveevaluation.h>
25
26class QTableWidget;
27class ChessPlayer;
28
32class EvalWidget : public QWidget
33{
34 Q_OBJECT
35
36 public:
38 explicit EvalWidget(QWidget* parent = nullptr);
39
44 void setPlayer(ChessPlayer* player);
45
46 private slots:
47 void clear();
48 void onEval(const MoveEvaluation& eval);
49
50 private:
51 enum StatHeaders
52 {
53 NpsHeader,
54 HashHeader,
55 PonderMoveHeader,
56 PonderHitHeader,
57 TbHeader
58 };
59
60 QPointer<ChessPlayer> m_player;
61 QTableWidget* m_statsTable;
62 QTableWidget* m_pvTable;
63 int m_depth;
64 QString m_pv;
65};
66
67#endif // EVALWIDGET_H
A chess player, human or AI.
Definition chessplayer.h:39
EvalWidget(QWidget *parent=nullptr)
Definition evalwidget.cpp:28
void setPlayer(ChessPlayer *player)
Definition evalwidget.cpp:82
Evaluation data for a chess move.
Definition moveevaluation.h:36