Scanframe Modular Application 0.1.0
Loading...
Searching...
No Matches
sf::ScriptListModel Class Reference

Provides a model list for instructions and variables of a script. More...

#include <ScriptListModel.h>

Inheritance diagram for sf::ScriptListModel:
[legend]
Collaboration diagram for sf::ScriptListModel:
[legend]

Public Types

enum  EMode { mInstructions , mVariables }
 Modes available for this model. More...

Public Member Functions

 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.

Detailed Description

Provides a model list for instructions and variables of a script.

Member Enumeration Documentation

◆ EMode

Modes available for this model.

Enumerator
mInstructions 
mVariables 

Constructor & Destructor Documentation

◆ ScriptListModel()

sf::ScriptListModel::ScriptListModel ( QObject * parent = nullptr)
explicit

Constructor.

Member Function Documentation

◆ columnCount()

int sf::ScriptListModel::columnCount ( const QModelIndex & parent) const
nodiscardoverride

Overridden from base class to provide the amount of columns.

◆ data()

QVariant sf::ScriptListModel::data ( const QModelIndex & index,
int role ) const
nodiscardoverride

Overridden from base class to provide the data to present.

◆ flags()

Qt::ItemFlags sf::ScriptListModel::flags ( const QModelIndex & index) const
nodiscardoverride

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
nodiscardoverride

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
nodiscardoverride

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()

void sf::ScriptListModel::setInterpreter ( ScriptInterpreter * interpreter,
EMode mode )

Set the interpreter and mode for the model.


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