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