SGSolve
|
Table models for SGViewer. More...
#include <sgtablemodel.hpp>
Public Member Functions | |
SGTableModel (SGGame *_game, int _state) | |
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. | |
bool | setState (int newState) |
Sets the state to newState. | |
Protected Attributes | |
int | state |
The state that the model is associated with. | |
SGGame * | game |
Pointer to the associated game. | |
Table models for SGViewer.
Specializes QAbstractTableModel for the SGViewer 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.
|
inline |
Returns flags.
Returns flags that indicate the model is enabled, can be edited, and can be selected.