Medical Imaging Interaction Toolkit  2024.12.99-0da743f6
Medical Imaging Interaction Toolkit
QmitkSimpleBarrierModel Class Reference

#include <QmitkSimpleBarrierModel.h>

Inheritance diagram for QmitkSimpleBarrierModel:
Collaboration diagram for QmitkSimpleBarrierModel:

Public Member Functions

 QmitkSimpleBarrierModel (QObject *parent=nullptr)
 
 ~QmitkSimpleBarrierModel () override
 
void setChecker (mitk::SimpleBarrierConstraintChecker *pChecker, const mitk::ModelTraitsInterface::ParameterNamesType &names, const mitk::ModelTraitsInterface::ParamterUnitMapType units)
 
Qt::ItemFlags flags (const QModelIndex &index) const override
 
QVariant data (const QModelIndex &index, int role) const override
 
QVariant headerData (int section, Qt::Orientation orientation, int role) const override
 
int rowCount (const QModelIndex &parent=QModelIndex()) const override
 
int columnCount (const QModelIndex &parent=QModelIndex()) const override
 
bool setData (const QModelIndex &index, const QVariant &value, int role=Qt::EditRole) override
 
void addConstraint ()
 
void deleteConstraint (const QModelIndex &index)
 
bool isModified ()
 

Detailed Description

Model that handles a SimpleBarrierConstraintChecker and his defined constraints. It allows to couple a SimpleBarrierConstraintChecker with a Qt table view in Order to view and edit its contents. E.g. used in the QmitkSimpleBarrierManagerWidget.

Definition at line 30 of file QmitkSimpleBarrierModel.h.

Constructor & Destructor Documentation

◆ QmitkSimpleBarrierModel()

QmitkSimpleBarrierModel::QmitkSimpleBarrierModel ( QObject *  parent = nullptr)

◆ ~QmitkSimpleBarrierModel()

QmitkSimpleBarrierModel::~QmitkSimpleBarrierModel ( )
inlineoverride

Definition at line 36 of file QmitkSimpleBarrierModel.h.

Member Function Documentation

◆ addConstraint()

void QmitkSimpleBarrierModel::addConstraint ( )

◆ columnCount()

int QmitkSimpleBarrierModel::columnCount ( const QModelIndex &  parent = QModelIndex()) const
override

◆ data()

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

◆ deleteConstraint()

void QmitkSimpleBarrierModel::deleteConstraint ( const QModelIndex &  index)

◆ flags()

Qt::ItemFlags QmitkSimpleBarrierModel::flags ( const QModelIndex &  index) const
override

◆ headerData()

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

◆ isModified()

bool QmitkSimpleBarrierModel::isModified ( )

Indicates if the content of the model was modified since the data was set via setChecker()

◆ rowCount()

int QmitkSimpleBarrierModel::rowCount ( const QModelIndex &  parent = QModelIndex()) const
override

◆ setChecker()

void QmitkSimpleBarrierModel::setChecker ( mitk::SimpleBarrierConstraintChecker pChecker,
const mitk::ModelTraitsInterface::ParameterNamesType names,
const mitk::ModelTraitsInterface::ParamterUnitMapType  units 
)

Sets the data handled by the model and resets the modified flag

Parameters
pCheckerPointer to the checker instance that should be managed.
namesList of all possible parameter names. It is assumed that the index of the list equals the parameter index in the respective fitting model.
units

◆ setData()

bool QmitkSimpleBarrierModel::setData ( const QModelIndex &  index,
const QVariant &  value,
int  role = Qt::EditRole 
)
override

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