Provides a model list for instructions and variables of a script.
More...
#include <ScriptListModel.h>
|
| ScriptListModel (QObject *parent=nullptr) |
| Constructor.
|
|
void | setInterpreter (ScriptInterpreter *interpreter, EMode mode) |
| Set the interpreter and mode for the model.
|
|
void | refresh () |
| Called to refresh the attached viewer.
|
|
QVariant | headerData (int section, Qt::Orientation orientation, int role) const override |
| Overridden from base class to provide column display names.
|
|
int | rowCount (const QModelIndex &parent) const override |
| Overridden from base class to provide the amount of rows.
|
|
QVariant | data (const QModelIndex &index, int role) const override |
| Overridden from base class to provide the data to present.
|
|
int | columnCount (const QModelIndex &parent) const override |
| Overridden from base class to provide the amount of columns.
|
|
Qt::ItemFlags | flags (const QModelIndex &index) const override |
| Overridden from base class to provide flags on an item by index.
|
|
bool | setData (const QModelIndex &index, const QVariant &value, int role) override |
| Overridden from base class to provide assignment of an item when edited.
|
|
Provides a model list for instructions and variables of a script.
◆ EMode
Modes available for this model.
Enumerator |
---|
mInstructions | |
mVariables | |
◆ ScriptListModel()
sf::ScriptListModel::ScriptListModel |
( |
QObject * |
parent = nullptr | ) |
|
|
explicit |
◆ columnCount()
int sf::ScriptListModel::columnCount |
( |
const QModelIndex & |
parent | ) |
const |
|
override |
Overridden from base class to provide the amount of columns.
◆ data()
QVariant sf::ScriptListModel::data |
( |
const QModelIndex & |
index, |
|
|
int |
role |
|
) |
| const |
|
override |
Overridden from base class to provide the data to present.
◆ flags()
Qt::ItemFlags sf::ScriptListModel::flags |
( |
const QModelIndex & |
index | ) |
const |
|
override |
Overridden from base class to provide flags on an item by index.
◆ headerData()
QVariant sf::ScriptListModel::headerData |
( |
int |
section, |
|
|
Qt::Orientation |
orientation, |
|
|
int |
role |
|
) |
| const |
|
override |
Overridden from base class to provide column display names.
◆ refresh()
void sf::ScriptListModel::refresh |
( |
| ) |
|
Called to refresh the attached viewer.
◆ rowCount()
int sf::ScriptListModel::rowCount |
( |
const QModelIndex & |
parent | ) |
const |
|
override |
Overridden from base class to provide the amount of rows.
◆ setData()
bool sf::ScriptListModel::setData |
( |
const QModelIndex & |
index, |
|
|
const QVariant & |
value, |
|
|
int |
role |
|
) |
| |
|
override |
Overridden from base class to provide assignment of an item when edited.
◆ setInterpreter()
Set the interpreter and mode for the model.
The documentation for this class was generated from the following file: