SGSolve
SGTableModel Class Reference

Table models for SGViewer. More...

#include <sgtablemodel.hpp>

Inheritance diagram for SGTableModel:
Collaboration diagram for SGTableModel:

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.
 
SGGamegame
 Pointer to the associated game.
 

Detailed Description

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.

Member Function Documentation

◆ flags()

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

Returns flags.

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


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