Cute Chess
0.1
projects
gui
src
evalhistory.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 EVALHISTORY_H
20
#define EVALHISTORY_H
21
22
#include <QWidget>
23
#include <QPointer>
24
25
class
QCustomPlot
;
26
class
ChessGame
;
27
class
PgnGame
;
28
35
class
EvalHistory
:
public
QWidget
36
{
37
Q_OBJECT
38
39
public
:
41
explicit
EvalHistory
(
QWidget
* parent =
nullptr
);
46
void
setGame
(
ChessGame
* game);
48
void
setPgnGame
(
PgnGame
*pgn);
49
50
private
slots:
51
void
onScore(
int
ply,
int
score);
52
53
private
:
54
void
addData(
int
ply,
int
score);
55
void
replot(
int
maxPly);
56
void
setScores(
const
QMap<int, int>
&scores);
57
58
QCustomPlot
* m_plot;
59
QPointer<ChessGame> m_game;
60
};
61
62
#endif
// EVALHISTORY_H
ChessGame
Definition
chessgame.h:39
EvalHistory::setPgnGame
void setPgnGame(PgnGame *pgn)
Definition
evalhistory.cpp:80
EvalHistory::setGame
void setGame(ChessGame *game)
Definition
evalhistory.cpp:62
EvalHistory::EvalHistory
EvalHistory(QWidget *parent=nullptr)
Definition
evalhistory.cpp:26
PgnGame
A game of chess in PGN format.
Definition
pgngame.h:52
QCustomPlot
The central class of the library. This is the QWidget which displays the plot and interacts with the ...
Definition
qcustomplot.h:3591
QMap
QWidget
Generated by
1.16.1