BCESolve
bceplottitle.hpp
1// This file is part of the BCESolve library for games of incomplete
2// information
3// Copyright (C) 2022 Benjamin A. Brooks
4//
5// BCESolve free software: you can redistribute it and/or modify it
6// 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// BCESolve is distributed in the hope that it will be useful, but
11// WITHOUT ANY WARRANTY; without even the implied warranty of
12// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13// General Public License for more details.
14//
15// You should have received a copy of the GNU General Public License
16// along with this program. If not, see
17// <http://www.gnu.org/licenses/>.
18//
19// Benjamin A. Brooks
20// ben@benjaminbrooks.net
21// Chicago, IL
22
23#ifndef BCEPLOTTITLE_HPP
24#define BCEPLOTTITLE_HPP
25
26#include <QtWidgets>
27#include <sstream>
28#include "bceenumeration.hpp"
29#include <iomanip>
30#include "qcustomplot.h"
31
33
41class BCEPlotTitle : public QCPTextElement {
42 Q_OBJECT;
43
44private:
45
47 int player;
49 LabelType labelType;
51 BCESliderType sliderType;
53 std::stringstream dynamicString;
54
55public:
56
58 BCEPlotTitle(LabelType _labelType,int _player,QCustomPlot *parentPlot);
59
61 BCEPlotTitle(LabelType _labelType,QCustomPlot *parentPlot);
62
63public slots:
64
66 void changeText(int emittedPlayer,
67 int action,
68 int type,
69 double objectiveValue);
70
72 void changeProbability(int emittedPlayer,double probability);
73
75 void changeDisplayedCoords(double x,double y);
76
78 void changeDisplayedState(int value0,
79 int value1,
80 int state,
81 bool isPrivateVals);
82
83};
84
85#endif
Class handling labeling of plots in the solution tab.
Definition: bceplottitle.hpp:41
void changeDisplayedCoords(double x, double y)
Sets current equilibrium coordinates for the current eqm index.
Definition: bceplottitle.cpp:94
LabelType labelType
Type of label (i.e. "DeviationPlot," "SliderLabel," etc.).
Definition: bceplottitle.hpp:49
int player
Player associated with the label.
Definition: bceplottitle.hpp:42
void changeProbability(int emittedPlayer, double probability)
Changes probability element of the deviation plot titles.
Definition: bceplottitle.cpp:76
BCEPlotTitle(LabelType _labelType, int _player, QCustomPlot *parentPlot)
Constructs plot titles for the deviation bar graphs.
Definition: bceplottitle.cpp:25
void changeDisplayedState(int value0, int value1, int state, bool isPrivateVals)
Sets current state displayed in the heatmap plot title.
Definition: bceplottitle.cpp:112
BCESliderType sliderType
Type of Slider associated with a slider label (i.e. "Type," "Action," "State").
Definition: bceplottitle.hpp:51
std::stringstream dynamicString
String manipulated when data is changed.
Definition: bceplottitle.hpp:53
void changeText(int emittedPlayer, int action, int type, double objectiveValue)
Changes non-probability elements of the deviation plot titles.
Definition: bceplottitle.cpp:60