Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
QmitkSimpleBarrierParametersDelegate.h
Go to the documentation of this file.
1 /*============================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 
13 #ifndef QmitkSimpleBarrierParametersDelegate_h
14 #define QmitkSimpleBarrierParametersDelegate_h
15 
16 
18 #include <QStyledItemDelegate>
19 
20 #include <MitkModelFitUIExports.h>
21 
22 
40 {
41  Q_OBJECT
42 
43 public:
44 
49  QmitkSimpleBarrierParametersDelegate(QObject* parent = nullptr);
50 
60  void paint(QPainter* painter, const QStyleOptionViewItem& option
61  , const QModelIndex& index) const override;
62 
73  QWidget* createEditor(QWidget* parent, const QStyleOptionViewItem& option
74  , const QModelIndex& index) const override;
75 
84  void setEditorData(QWidget* editor, const QModelIndex& index) const override;
85 
92  void setModelData(QWidget* editor, QAbstractItemModel* model, const QModelIndex& index) const override;
93 
94 };
95 
96 #endif
#define MITKMODELFITUI_EXPORT
void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const override
Transfers the checked parameter names from the list widget back to the model.
void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override
Paints the selected parameter names as a comma-separated string.
QmitkSimpleBarrierParametersDelegate(QObject *parent=nullptr)
Constructs a QmitkSimpleBarrierParametersDelegate.
void setEditorData(QWidget *editor, const QModelIndex &index) const override
Populates the list widget with parameter names, checking currently selected ones.
QWidget * createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const override
Creates a QListWidget editor with checkable parameter name items.