BCESolve
|
Table models for BCEViewer. More...
#include <bceconditionaltablemodel.hpp>
Public Member Functions | |
BCEConditionalTableModel (BCEGame *_game, int _state) | |
Constructor. | |
QVariant | data (const QModelIndex &index, int role) const Q_DECL_OVERRIDE |
Reimplements the data method. More... | |
bool | setData (const QModelIndex &index, const QVariant &value, int role) |
Reimplements the setData method. More... | |
QVariant | headerData (int section, Qt::Orientation orientation, int role) const |
Labels Rows and Columns in the Conditional Distn Table. | |
int | rowCount (const QModelIndex &parent=QModelIndex()) const Q_DECL_OVERRIDE |
Returns the number of row player types. | |
int | columnCount (const QModelIndex &parent=QModelIndex()) const Q_DECL_OVERRIDE |
Returns the number of column player types. | |
Public Member Functions inherited from BCETableModel | |
BCETableModel (BCEGame *_game, int _state) | |
Constructor. | |
Qt::ItemFlags | flags (const QModelIndex &index) const |
Returns flags. More... | |
void | emitLayoutChanged () |
Emits layoutChanged signal. | |
bool | setState (int newState) |
Sets the state to newState. | |
Additional Inherited Members | |
Protected Attributes inherited from BCETableModel | |
int | state |
The state that the model is associated with. | |
BCEGame * | game |
Pointer to the associated game. | |
Table models for BCEViewer.
Specializes QAbstractTableModel for the BCEViewer program. Sets flags, reimplements the rowCount and columnCount methods to return the numbers of actions. Also contains members to indicate which state the model is currently associated with.
QVariant BCEConditionalTableModel::data | ( | const QModelIndex & | index, |
int | role | ||
) | const |
Reimplements the data method.
Retrieves the data using BCEGame::conditional.
bool BCEConditionalTableModel::setData | ( | const QModelIndex & | index, |
const QVariant & | value, | ||
int | role | ||
) |
Reimplements the setData method.
using BCEGame::setConditional.