Medical Imaging Interaction Toolkit  2025.12.02
Medical Imaging Interaction Toolkit
QmitkInitialValuesDelegate.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 QmitkInitialValuesDelegate_h
14 #define QmitkInitialValuesDelegate_h
15 
16 
18 #include <mitkDataStorage.h>
19 #include <mitkNodePredicateBase.h>
20 
21 #include <QStyledItemDelegate>
22 
23 #include "MitkModelFitUIExports.h"
24 
25 
32 class MITKMODELFITUI_EXPORT QmitkInitialValuesDelegate : public QStyledItemDelegate
33 {
34  Q_OBJECT
35 
36 public:
37 
38  QmitkInitialValuesDelegate(QObject* parent = nullptr);
39 
40  QWidget* createEditor(QWidget* parent, const QStyleOptionViewItem& option
41  , const QModelIndex& index) const override;
42 
43  void setEditorData(QWidget* editor, const QModelIndex& index) const override;
44 
45  void setModelData(QWidget* editor, QAbstractItemModel* model, const QModelIndex& index) const override;
46 
49 
50 protected:
51  int valueType(const QModelIndex& index) const;
52 
54  mitk::DataStorage::Pointer m_Storage;
56  mitk::NodePredicateBase::Pointer m_Predicate;
57 
58 };
59 
60 #endif
#define MITKMODELFITUI_EXPORT
void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const override
mitk::DataStorage::Pointer m_Storage
void setEditorData(QWidget *editor, const QModelIndex &index) const override
void setDataStorage(mitk::DataStorage *storage)
void setNodePredicate(mitk::NodePredicateBase *predicate)
QWidget * createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const override
mitk::NodePredicateBase::Pointer m_Predicate
QmitkInitialValuesDelegate(QObject *parent=nullptr)
int valueType(const QModelIndex &index) const
Data management class that handles 'was created by' relations.
Interface for evaluation conditions used in the DataStorage class GetSubset() method.