Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
QmitkSimpleBarrierTypeDelegate.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 QmitkSimpleBarrierTypeDelegate_h
14 #define QmitkSimpleBarrierTypeDelegate_h
15 
16 
17 #include <QStyledItemDelegate>
18 
19 #include <MitkModelFitUIExports.h>
20 
21 
33 class MITKMODELFITUI_EXPORT QmitkSimpleBarrierTypeDelegate : public QStyledItemDelegate
34 {
35  Q_OBJECT
36 
37 public:
38 
43  QmitkSimpleBarrierTypeDelegate(QObject* parent = nullptr);
44 
55  QWidget* createEditor(QWidget* parent, const QStyleOptionViewItem& option
56  , const QModelIndex& index) const override;
57 
63  void setEditorData(QWidget* editor, const QModelIndex& index) const override;
64 
71  void setModelData(QWidget* editor, QAbstractItemModel* model, const QModelIndex& index) const override;
72 };
73 
74 #endif
#define MITKMODELFITUI_EXPORT
Item delegate for rendering and editing the type of a simple barrier constraint.
void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const override
Transfers the selected constraint type index from the combo box back to the model.
void setEditorData(QWidget *editor, const QModelIndex &index) const override
Sets the combo box selection to match the current model data.
QmitkSimpleBarrierTypeDelegate(QObject *parent=nullptr)
Constructs a QmitkSimpleBarrierTypeDelegate.
QWidget * createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const override
Creates a QComboBox editor with "lower" and "upper" options.