BCESolve
bcelabel.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 BCELABELHANDLER_HPP
24#define BCELABELHANDLER_HPP
25
26#include <QtWidgets>
27#include <sstream>
28#include "bceenumeration.hpp"
29#include <iomanip>
30
32
40class BCELabel : public QLabel {
41 Q_OBJECT;
42
43private:
44
46 int player;
48 LabelType labelType;
50 BCESliderType sliderType;
52 std::stringstream dynamicString;
53
54public:
55
57 BCELabel(LabelType _labelType,BCESliderType _sliderType,int _player);
58
59public slots:
60
62 void displayStateOrValues(bool isPrivateVals,
63 int emittedPlayer);
64
65};
66
67#endif
Class handling labeling of controls in the solution tab.
Definition: bcelabel.hpp:40
BCELabel(LabelType _labelType, BCESliderType _sliderType, int _player)
Constructs slider labels for controls layout.
Definition: bcelabel.cpp:25
LabelType labelType
Type of label (i.e. "DeviationPlot," "SliderLabel," etc.).
Definition: bcelabel.hpp:48
BCESliderType sliderType
Type of Slider associated with a slider label (i.e. "Type," "Action," "State").
Definition: bcelabel.hpp:50
void displayStateOrValues(bool isPrivateVals, int emittedPlayer)
Sets the state slider label to reflect if game has common or private states.
Definition: bcelabel.cpp:61
std::stringstream dynamicString
String manipulated when data is changed.
Definition: bcelabel.hpp:52
int player
Player associated with the label.
Definition: bcelabel.hpp:41