Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
QmitkSimpleBarrierManagerWidget Class Reference

Widget for viewing and editing the barrier constraints of a SimpleBarrierConstraintChecker. More...

#include <QmitkSimpleBarrierManagerWidget.h>

Inheritance diagram for QmitkSimpleBarrierManagerWidget:
Collaboration diagram for QmitkSimpleBarrierManagerWidget:

Public Slots

void setChecker (mitk::SimpleBarrierConstraintChecker *pChecker, const mitk::ModelTraitsInterface::ParameterNamesType &names, const mitk::ModelTraitsInterface::ParamterUnitMapType &units)
 Sets the constraint checker and parameter metadata to manage. More...
 

Signals

void ConstraintChanged (mitk::SimpleBarrierConstraintChecker::Constraint constraint)
 Emitted when a constraint is changed. More...
 

Public Member Functions

 QmitkSimpleBarrierManagerWidget (QWidget *parent=nullptr)
 Constructs a QmitkSimpleBarrierManagerWidget. More...
 
 ~QmitkSimpleBarrierManagerWidget () override
 Destructor. Deletes the internal model and delegates. More...
 

Protected Slots

void OnShowContextMenuIsoSet (const QPoint &pos)
 Shows a context menu with options to add or delete constraints. More...
 
void OnAddConstraint (bool checked)
 Adds a new default constraint to the checker. More...
 
void OnDelConstraint (bool checked)
 Deletes the currently selected constraint from the checker. More...
 

Protected Member Functions

void update ()
 Updates the widget according to its current settings. More...
 

Protected Attributes

mitk::SimpleBarrierConstraintChecker::Pointer m_Checker
 
mitk::ModelTraitsInterface::ParameterNamesType m_ParameterNames
 
mitk::ModelTraitsInterface::ParamterUnitMapType m_ParameterUnits
 
QmitkSimpleBarrierModel * m_InternalModel
 
QmitkSimpleBarrierTypeDelegate * m_TypeDelegate
 
QmitkSimpleBarrierParametersDelegate * m_ParametersDelegate
 
bool m_InternalUpdate
 
std::unique_ptr< Ui::QmitkSimpleBarrierManagerWidget > m_Controls
 

Detailed Description

Widget for viewing and editing the barrier constraints of a SimpleBarrierConstraintChecker.

This widget presents the constraints of a mitk::SimpleBarrierConstraintChecker in a table view. Users can add and remove constraints via buttons or a context menu. Each constraint row shows the affected parameters, constraint type (upper/lower), barrier value, and penalty zone width. Editing is handled through dedicated delegates for parameter selection and type selection.

See also
QmitkSimpleBarrierModel
QmitkSimpleBarrierTypeDelegate
QmitkSimpleBarrierParametersDelegate
mitk::SimpleBarrierConstraintChecker

Definition at line 48 of file QmitkSimpleBarrierManagerWidget.h.

Constructor & Destructor Documentation

◆ QmitkSimpleBarrierManagerWidget()

QmitkSimpleBarrierManagerWidget::QmitkSimpleBarrierManagerWidget ( QWidget *  parent = nullptr)

Constructs a QmitkSimpleBarrierManagerWidget.

Parameters
[in]parentOptional parent widget.

◆ ~QmitkSimpleBarrierManagerWidget()

QmitkSimpleBarrierManagerWidget::~QmitkSimpleBarrierManagerWidget ( )
override

Destructor. Deletes the internal model and delegates.

Member Function Documentation

◆ ConstraintChanged

void QmitkSimpleBarrierManagerWidget::ConstraintChanged ( mitk::SimpleBarrierConstraintChecker::Constraint  constraint)
signal

Emitted when a constraint is changed.

Parameters
[in]constraintThe modified constraint.

◆ OnAddConstraint

void QmitkSimpleBarrierManagerWidget::OnAddConstraint ( bool  checked)
protectedslot

Adds a new default constraint to the checker.

Parameters
[in]checkedThe checked state of the triggering action (unused).

◆ OnDelConstraint

void QmitkSimpleBarrierManagerWidget::OnDelConstraint ( bool  checked)
protectedslot

Deletes the currently selected constraint from the checker.

If no index is selected, attempts to delete the constraint at position (1,1).

Parameters
[in]checkedThe checked state of the triggering action (unused).

◆ OnShowContextMenuIsoSet

void QmitkSimpleBarrierManagerWidget::OnShowContextMenuIsoSet ( const QPoint &  pos)
protectedslot

Shows a context menu with options to add or delete constraints.

Parameters
[in]posThe position in widget coordinates where the menu was requested.

◆ setChecker

void QmitkSimpleBarrierManagerWidget::setChecker ( mitk::SimpleBarrierConstraintChecker *  pChecker,
const mitk::ModelTraitsInterface::ParameterNamesType &  names,
const mitk::ModelTraitsInterface::ParamterUnitMapType &  units 
)
slot

Sets the constraint checker and parameter metadata to manage.

Configures the internal model with the provided checker, parameter names, and units. The modified flag is reset.

Parameters
[in]pCheckerPointer to the SimpleBarrierConstraintChecker to manage. If nullptr, a new empty checker is created internally.
[in]namesList of all parameter names. The index corresponds to the parameter index in the fitting model.
[in]unitsMap of parameter names to their unit strings.

◆ update()

void QmitkSimpleBarrierManagerWidget::update ( )
protected

Updates the widget according to its current settings.

Member Data Documentation

◆ m_Checker

mitk::SimpleBarrierConstraintChecker::Pointer QmitkSimpleBarrierManagerWidget::m_Checker
protected

Definition at line 115 of file QmitkSimpleBarrierManagerWidget.h.

◆ m_Controls

std::unique_ptr<Ui::QmitkSimpleBarrierManagerWidget> QmitkSimpleBarrierManagerWidget::m_Controls
protected

Definition at line 126 of file QmitkSimpleBarrierManagerWidget.h.

◆ m_InternalModel

QmitkSimpleBarrierModel* QmitkSimpleBarrierManagerWidget::m_InternalModel
protected

Definition at line 120 of file QmitkSimpleBarrierManagerWidget.h.

◆ m_InternalUpdate

bool QmitkSimpleBarrierManagerWidget::m_InternalUpdate
protected

Definition at line 124 of file QmitkSimpleBarrierManagerWidget.h.

◆ m_ParameterNames

mitk::ModelTraitsInterface::ParameterNamesType QmitkSimpleBarrierManagerWidget::m_ParameterNames
protected

Definition at line 116 of file QmitkSimpleBarrierManagerWidget.h.

◆ m_ParametersDelegate

QmitkSimpleBarrierParametersDelegate* QmitkSimpleBarrierManagerWidget::m_ParametersDelegate
protected

Definition at line 122 of file QmitkSimpleBarrierManagerWidget.h.

◆ m_ParameterUnits

mitk::ModelTraitsInterface::ParamterUnitMapType QmitkSimpleBarrierManagerWidget::m_ParameterUnits
protected

Definition at line 117 of file QmitkSimpleBarrierManagerWidget.h.

◆ m_TypeDelegate

QmitkSimpleBarrierTypeDelegate* QmitkSimpleBarrierManagerWidget::m_TypeDelegate
protected

Definition at line 121 of file QmitkSimpleBarrierManagerWidget.h.


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