|
Medical Imaging Interaction Toolkit
2026.06.00
Medical Imaging Interaction Toolkit
|
Toolkit includes. More...
#include <QmitkSimpleBarrierParametersDelegate.h>


Public Member Functions | |
| QmitkSimpleBarrierParametersDelegate (QObject *parent=nullptr) | |
| Constructs a QmitkSimpleBarrierParametersDelegate. More... | |
| void | paint (QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override |
| Paints the selected parameter names as a comma-separated string. More... | |
| QWidget * | createEditor (QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const override |
| Creates a QListWidget editor with checkable parameter name items. More... | |
| void | setEditorData (QWidget *editor, const QModelIndex &index) const override |
| Populates the list widget with parameter names, checking currently selected ones. More... | |
| void | setModelData (QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const override |
| Transfers the checked parameter names from the list widget back to the model. More... | |
Toolkit includes.
Item delegate for rendering and editing the parameters of a barrier constraint.
This delegate handles the display and selection of parameters relevant to a barrier constraint. It assumes the following data conventions:
The editor is a QListWidget with checkboxes, allowing multi-selection of parameters. When data is transferred back to the model, a QStringList of all checked parameter names is written.
Definition at line 39 of file QmitkSimpleBarrierParametersDelegate.h.
| QmitkSimpleBarrierParametersDelegate::QmitkSimpleBarrierParametersDelegate | ( | QObject * | parent = nullptr | ) |
Constructs a QmitkSimpleBarrierParametersDelegate.
| [in] | parent | Optional parent QObject. |
|
override |
Creates a QListWidget editor with checkable parameter name items.
If the edit role data is invalid, returns a read-only QLabel instead.
| [in] | parent | The parent widget for the editor. |
| [in] | option | Style options for the item. |
| [in] | index | The model index of the item being edited. |
|
override |
Paints the selected parameter names as a comma-separated string.
If the display data is invalid, renders "Invalid data".
| [in] | painter | The QPainter to use for rendering. |
| [in] | option | Style options for the item. |
| [in] | index | The model index to paint. |
|
override |
Populates the list widget with parameter names, checking currently selected ones.
Uses the edit role data for the full list and the display role data for checked items.
| [in] | editor | The editor widget (expected to be a QListWidget). |
| [in] | index | The model index of the item. |
|
override |
Transfers the checked parameter names from the list widget back to the model.
| [in] | editor | The editor widget containing the selections. |
| [in,out] | model | The abstract item model to update. |
| [in] | index | The model index of the item. |