BCESolve
BCEPriorTableModel Class Reference

Table models for BCEViewer. More...

#include <bcepriortablemodel.hpp>

Inheritance diagram for BCEPriorTableModel:
Collaboration diagram for BCEPriorTableModel:

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

BCEGamegame
 Pointer to the associated game.
 

Detailed Description

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.

Member Function Documentation

◆ data()

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.

◆ flags()

Qt::ItemFlags BCEPriorTableModel::flags ( const QModelIndex &  index) const
inline

Returns flags.

Returns flags that indicate the model is enabled, can be edited, and can be selected.

◆ headerData()

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.

◆ setData()

bool BCEPriorTableModel::setData ( const QModelIndex &  index,
const QVariant &  value,
int  role 
)

Reimplements the setData method.

Sets the prior over a state, using BCEGame::setPrior.


The documentation for this class was generated from the following files: