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

List model for manipulating the passed script manager. More...

#include <ScriptManagerListModel.h>

Inheritance diagram for sf::ScriptManagerListModel:
Collaboration diagram for sf::ScriptManagerListModel:

Public Member Functions

 ScriptManagerListModel (ScriptManager *manager, QObject *parent=nullptr)
 Constructor.
 
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.
 
void add (const QModelIndex &index)
 Adds a new entry to the end or after specified index of the list.
 
void remove (QModelIndex index)
 Removes an entry at specified index.
 
void startAll () const
 Compiles and initializes all scripts.
 
void start (const QModelIndex &index) const
 Compiles and initializes the script at the passed index row.
 
void stop (const QModelIndex &index) const
 Stops the script from running in the background at the passed index row.
 

Static Public Member Functions

static void setDelegates (QAbstractItemView *view)
 Sets the item delegate on a new CommonItemDelegate instance.
 

Detailed Description

List model for manipulating the passed script manager.

Constructor & Destructor Documentation

◆ ScriptManagerListModel()

sf::ScriptManagerListModel::ScriptManagerListModel ( ScriptManager manager,
QObject *  parent = nullptr 
)
explicit

Constructor.

Member Function Documentation

◆ add()

void sf::ScriptManagerListModel::add ( const QModelIndex &  index)

Adds a new entry to the end or after specified index of the list.

◆ columnCount()

int sf::ScriptManagerListModel::columnCount ( const QModelIndex &  parent) const
override

Overridden from base class to provide the amount of columns.

◆ data()

QVariant sf::ScriptManagerListModel::data ( const QModelIndex &  index,
int  role 
) const
override

Overridden from base class to provide the data to present.

◆ flags()

Qt::ItemFlags sf::ScriptManagerListModel::flags ( const QModelIndex &  index) const
override

Overridden from base class to provide flags on an item by index.

◆ headerData()

QVariant sf::ScriptManagerListModel::headerData ( int  section,
Qt::Orientation  orientation,
int  role 
) const
override

Overridden from base class to provide column display names.

◆ refresh()

void sf::ScriptManagerListModel::refresh ( )

Called to refresh the attached viewer.

◆ remove()

void sf::ScriptManagerListModel::remove ( QModelIndex  index)

Removes an entry at specified index.

Parameters
indexPosition in the list.

◆ rowCount()

int sf::ScriptManagerListModel::rowCount ( const QModelIndex &  parent) const
override

Overridden from base class to provide the amount of rows.

◆ setData()

bool sf::ScriptManagerListModel::setData ( const QModelIndex &  index,
const QVariant &  value,
int  role 
)
override

Overridden from base class to provide assignment of an item when edited.

◆ setDelegates()

static void sf::ScriptManagerListModel::setDelegates ( QAbstractItemView *  view)
static

Sets the item delegate on a new CommonItemDelegate instance.

◆ start()

void sf::ScriptManagerListModel::start ( const QModelIndex &  index) const

Compiles and initializes the script at the passed index row.

◆ startAll()

void sf::ScriptManagerListModel::startAll ( ) const

Compiles and initializes all scripts.

◆ stop()

void sf::ScriptManagerListModel::stop ( const QModelIndex &  index) const

Stops the script from running in the background at the passed index row.


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