BCESolve
|
Table models for BCEViewer. More...
#include <bcepriortablemodel.hpp>
Public Member Functions | |
BCEPriorTableModel (BCEGame *_game) | |
Constructor. | |
Qt::ItemFlags | flags (const QModelIndex &index) const |
Returns flags. More... | |
int | rowCount (const QModelIndex &parent=QModelIndex()) const Q_DECL_OVERRIDE |
Returns the number of row player actions. | |
int | columnCount (const QModelIndex &parent=QModelIndex()) const Q_DECL_OVERRIDE |
Returns the number of column player actions. | |
void | emitLayoutChanged () |
Emits layoutChanged signal. | |
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 Q_DECL_OVERRIDE |
Returns formatted header data. More... | |
Protected Attributes | |
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 BCEPriorTableModel::data | ( | const QModelIndex & | index, |
int | role | ||
) | const |
Reimplements the data method.
Retrieves the prior over a state. Retrieves the data using BCEGame::prior.
|
inline |
Returns flags.
Returns flags that indicate the model is enabled, can be edited, and can be selected.
QVariant BCEPriorTableModel::headerData | ( | int | section, |
Qt::Orientation | orientation, | ||
int | role | ||
) | const |
Returns formatted header data.
Returns header data formatted to indicate the appropriate objective labels.
bool BCEPriorTableModel::setData | ( | const QModelIndex & | index, |
const QVariant & | value, | ||
int | role | ||
) |
Reimplements the setData method.
Sets the prior over a state, using BCEGame::setPrior.