22 #ifndef SGTABLEMODEL_H
23 #define SGTABLEMODEL_H
26 #include <QAbstractTableModel>
52 Qt::ItemFlags
flags(
const QModelIndex & index)
const
53 {
return Qt::ItemIsEditable | Qt::ItemIsEnabled | Qt::ItemIsSelectable; }
56 int rowCount(
const QModelIndex & parent = QModelIndex()) const Q_DECL_OVERRIDE
59 int columnCount(
const QModelIndex & parent = QModelIndex()) const Q_DECL_OVERRIDE
64 { emit layoutChanged(); }
Table models for SGViewer.
Definition: sgtablemodel.hpp:39
int columnCount(const QModelIndex &parent=QModelIndex()) const Q_DECL_OVERRIDE
Returns the number of column player actions.
Definition: sgtablemodel.hpp:59
int rowCount(const QModelIndex &parent=QModelIndex()) const Q_DECL_OVERRIDE
Returns the number of row player actions.
Definition: sgtablemodel.hpp:56
Describes a stochastic game.
Definition: sggame.hpp:40
bool setState(int newState)
Sets the state to newState.
Definition: sgtablemodel.hpp:67
const vector< vector< int > > & getNumActions() const
Sets the argument _numActions equal to SGGame::numActions.
Definition: sggame.hpp:181
SGGame * game
Pointer to the associated game.
Definition: sgtablemodel.hpp:79
int state
The state that the model is associated with.
Definition: sgtablemodel.hpp:77
SGTableModel(SGGame *_game, int _state)
Constructor.
Definition: sgtablemodel.hpp:44
Qt::ItemFlags flags(const QModelIndex &index) const
Returns flags.
Definition: sgtablemodel.hpp:52
void emitLayoutChanged()
Emits layoutChanged signal.
Definition: sgtablemodel.hpp:63
int getNumStates() const
Returns the number of states.
Definition: sggame.hpp:179