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

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

#include <ConversionListModel.h>

Inheritance diagram for sf::ConversionListModel:
Collaboration diagram for sf::ConversionListModel:

Public Member Functions

 ConversionListModel (UnitConversionServerEx *ucs, 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 edit (QModelIndex index)
 Edits a entry depending on the validity of the passed index.
 
bool add ()
 Adds a entry depending on the validity of the passed index.
 
bool remove (QModelIndex index)
 Removes entry with the passed index row.
 
bool isDirty () const
 Gets the modification flag.
 
void sync ()
 Saves changes to the unit server and resets the list's dirty flag.
 

Detailed Description

List model for manipulating the passed script manager.

Constructor & Destructor Documentation

◆ ConversionListModel()

sf::ConversionListModel::ConversionListModel ( UnitConversionServerEx ucs,
QObject *  parent = nullptr 
)
explicit

Constructor.

Member Function Documentation

◆ add()

bool sf::ConversionListModel::add ( )

Adds a entry depending on the validity of the passed index.

◆ columnCount()

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

Overridden from base class to provide the amount of columns.

◆ data()

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

Overridden from base class to provide the data to present.

◆ edit()

bool sf::ConversionListModel::edit ( QModelIndex  index)

Edits a entry depending on the validity of the passed index.

Parameters
indexInvalid when adding and Valid when editing.

◆ flags()

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

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

◆ headerData()

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

Overridden from base class to provide column display names.

◆ isDirty()

bool sf::ConversionListModel::isDirty ( ) const
inline

Gets the modification flag.

◆ refresh()

void sf::ConversionListModel::refresh ( )

Called to refresh the attached viewer.

◆ remove()

bool sf::ConversionListModel::remove ( QModelIndex  index)

Removes entry with the passed index row.

◆ rowCount()

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

Overridden from base class to provide the amount of rows.

◆ sync()

void sf::ConversionListModel::sync ( )

Saves changes to the unit server and resets the list's dirty flag.


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