22 #ifndef SGGAMEHANDLER_H
23 #define SGGAMEHANDLER_H
26 #include <QAbstractTableModel>
29 #include "sgpayofftablemodel.hpp"
30 #include "sgprobabilitytablemodel.hpp"
31 #include "sgtableview.hpp"
void actionRemoved(int player)
Removes action for the given player.
Definition: sggamehandler.cpp:506
void action1Added()
Action added for player 1. Calls actionAdded.
Definition: sggamehandler.cpp:442
void pushBackProbabilityTable(int newS)
Adds a new probability table model.
Definition: sggamehandler.cpp:348
vector< QLineEdit * > numActionsEdits
Vector of edits for players' numbers of actions.
Definition: sggamehandler.hpp:79
void setGame(const SGGame &_game)
Replaces the current game with _game.
Definition: sggamehandler.cpp:271
void errorTolChanged(const QString &text)
Changes the error tolerance.
Definition: sggamehandler.cpp:435
void actionAdded(int player)
Adds a new action for the indicated player.
Definition: sggamehandler.cpp:452
QLineEdit * errorTolEdit
Edit for controlling error tolerance.
Definition: sggamehandler.hpp:83
QPushButton * cancelButton
Button that cancels solve.
Definition: sggamehandler.hpp:73
QLineEdit * numStatesEdit
Edit for number of states.
Definition: sggamehandler.hpp:81
void nextState()
Advances currentState to the next state.
Definition: sggamehandler.cpp:412
Describes a stochastic game.
Definition: sggame.hpp:40
void changeNumberOfStates(int newS)
Adds/removes models to achieve correct number of states.
Definition: sggamehandler.cpp:291
void prevState()
Decreases currentState to the previous state.
Definition: sggamehandler.cpp:420
QVBoxLayout * layout
Layout for the game tab.
Definition: sggamehandler.hpp:66
~SGGameHandler()
Destructor.
Definition: sggamehandler.cpp:263
double errorTol
Error tolerance for measuring convergence.
Definition: sggamehandler.hpp:58
void setState(int state)
Changes the current state.
Definition: sggamehandler.cpp:378
void popBackProbabilityTable()
Removes last probability table model.
Definition: sggamehandler.cpp:368
SGGameHandler()
Constructor.
Definition: sggamehandler.cpp:25
void action2Removed()
Action removed for player 2. Calls actionRemoved.
Definition: sggamehandler.cpp:501
void action1Removed()
Action removed for player 1. Calls actionRemoved.
Definition: sggamehandler.cpp:496
void currentStateChanged(int newS)
Slot for changing the state. Calls setState.
Definition: sggamehandler.cpp:407
void action2Added()
Action added for player 2. Calls actionAdded.
Definition: sggamehandler.cpp:447
QPushButton * solveButton_V2
Button that triggers solve routine.
Definition: sggamehandler.hpp:71
QVBoxLayout * probabilityTableLayout
Layout for holding transition probability tables.
Definition: sggamehandler.hpp:95
QPushButton * getSolveButton() const
Returns the solveButton.
Definition: sggamehandler.hpp:128
Derived class for payoff table models.
Definition: sgpayofftablemodel.hpp:42
vector< SGProbabilityTableModel * > probabilityModels
Vector of models for interfacing with transition probabilities.
Definition: sggamehandler.hpp:63
const SGGame & getGame() const
Returns constant reference to the current game.
Definition: sggamehandler.hpp:116
QPushButton * getCancelButton() const
Returns the cancelButton.
Definition: sggamehandler.hpp:136
QPushButton * getSolveButton_V2() const
Returns the solveButton_V2.
Definition: sggamehandler.hpp:132
void stateRemoved()
Removes the current state.
Definition: sggamehandler.cpp:535
void setConstrained(int newState)
Changes whether or not feasible set will be calculated.
Definition: sggamehandler.cpp:565
QTableView * payoffTableView
Table for displaying stage payoffs.
Definition: sggamehandler.hpp:91
void discountFactorChanged(const QString &text)
Changes the discount factor.
Definition: sggamehandler.cpp:428
This class handles the widgets for editing/displaying the game.
Definition: sggamehandler.hpp:47
double getErrorTol() const
Returns the error tolerance.
Definition: sggamehandler.hpp:120
QComboBox * currentStateCombo
Drop down menu for selecting a state.
Definition: sggamehandler.hpp:87
QVBoxLayout * getLayout() const
Returns the layout.
Definition: sggamehandler.hpp:124
vector< SGTableView * > probabilityTableViews
Vector of tables for displaying transition probabilities.
Definition: sggamehandler.hpp:93
QLineEdit * deltaEdit
For editing the discount factor.
Definition: sggamehandler.hpp:77
QPushButton * solveButton
Button that triggers solve routine.
Definition: sggamehandler.hpp:69
void stateAdded()
Adds a new state. Calls changeNumberOfStates.
Definition: sggamehandler.cpp:485
SGGame game
The game object.
Definition: sggamehandler.hpp:48
QCheckBox * feasibleCheckBox
Check box for whether or not to calculate feasible set.
Definition: sggamehandler.hpp:99
SGPayoffTableModel * payoffModel
The model for interfacing with payoffs.
Definition: sggamehandler.hpp:61
void initializeModels()
Delete old data models and create new ones.
Definition: sggamehandler.cpp:313