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