Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
QmitkBoolPropertyWidget Class Reference

A QCheckBox that edits a mitk::BoolProperty. More...

#include <QmitkBoolPropertyWidget.h>

Inheritance diagram for QmitkBoolPropertyWidget:
Collaboration diagram for QmitkBoolPropertyWidget:

Public Member Functions

 QmitkBoolPropertyWidget (QWidget *parent=nullptr)
 Construct the widget without an associated property. More...
 
 QmitkBoolPropertyWidget (const QString &text, QWidget *parent=nullptr)
 Construct the widget with a label text. More...
 
 ~QmitkBoolPropertyWidget () override
 Destructor. More...
 
void SetProperty (mitk::BoolProperty *property)
 Bind this widget to a mitk::BoolProperty. More...
 

Protected Slots

void onToggle (bool on)
 

Protected Attributes

_BoolPropertyWidgetImpl * m_PropEditorImpl
 

Detailed Description

A QCheckBox that edits a mitk::BoolProperty.

Bidirectionally synchronizes a checkbox with a mitk::BoolProperty. When the property changes externally, the checkbox updates. When the user toggles the checkbox, the property value is updated. If no property is set or the property is removed, the checkbox enters a tristate (indeterminate) disabled state.

See also
QmitkPropertyViewFactory

Definition at line 32 of file QmitkBoolPropertyWidget.h.

Constructor & Destructor Documentation

◆ QmitkBoolPropertyWidget() [1/2]

QmitkBoolPropertyWidget::QmitkBoolPropertyWidget ( QWidget *  parent = nullptr)

Construct the widget without an associated property.

Parameters
[in]parentThe parent widget.

◆ QmitkBoolPropertyWidget() [2/2]

QmitkBoolPropertyWidget::QmitkBoolPropertyWidget ( const QString &  text,
QWidget *  parent = nullptr 
)

Construct the widget with a label text.

Parameters
[in]textThe checkbox label text.
[in]parentThe parent widget.

◆ ~QmitkBoolPropertyWidget()

QmitkBoolPropertyWidget::~QmitkBoolPropertyWidget ( )
override

Destructor.

Member Function Documentation

◆ onToggle

void QmitkBoolPropertyWidget::onToggle ( bool  on)
protectedslot

◆ SetProperty()

void QmitkBoolPropertyWidget::SetProperty ( mitk::BoolProperty *  property)

Bind this widget to a mitk::BoolProperty.

Parameters
[in]propertyThe property to edit. Pass nullptr to clear the binding.

When set to nullptr the widget enters a tristate indeterminate disabled state.

Member Data Documentation

◆ m_PropEditorImpl

_BoolPropertyWidgetImpl* QmitkBoolPropertyWidget::m_PropEditorImpl
protected

Definition at line 66 of file QmitkBoolPropertyWidget.h.


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