Medical Imaging Interaction Toolkit  2024.06.00
Medical Imaging Interaction Toolkit
QmitkSimpleBarrierModel.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 QmitkSimpleBarrierModel_h
14 #define QmitkSimpleBarrierModel_h
15 
16 #include <QAbstractTableModel>
17 
20 
21 #include "MitkModelFitUIExports.h"
22 
23 
30 class MITKMODELFITUI_EXPORT QmitkSimpleBarrierModel : public QAbstractTableModel
31 {
32  Q_OBJECT
33 
34 public:
35  QmitkSimpleBarrierModel(QObject* parent = nullptr);
36  ~QmitkSimpleBarrierModel() override {};
37 
42  void setChecker(mitk::SimpleBarrierConstraintChecker* pChecker,
44 
45  Qt::ItemFlags flags(const QModelIndex& index) const override;
46  QVariant data(const QModelIndex& index, int role) const override;
47  QVariant headerData(int section, Qt::Orientation orientation, int role) const override;
48  int rowCount(const QModelIndex& parent = QModelIndex()) const override;
49  int columnCount(const QModelIndex& parent = QModelIndex()) const override;
50  bool setData(const QModelIndex& index, const QVariant& value, int role = Qt::EditRole) override;
51 
52  void addConstraint();
53  void deleteConstraint(const QModelIndex& index);
54 
56  bool isModified();
57 
58 private:
61 
63  bool m_modified;
64 
65 };
66 
67 #endif
mitkModelTraitsInterface.h
mitkSimpleBarrierConstraintChecker.h
QmitkSimpleBarrierModel::~QmitkSimpleBarrierModel
~QmitkSimpleBarrierModel() override
Definition: QmitkSimpleBarrierModel.h:36
mitk::SimpleBarrierConstraintChecker
This class implements constraints as simple barrier functions.
Definition: mitkSimpleBarrierConstraintChecker.h:42
MITKMODELFITUI_EXPORT
#define MITKMODELFITUI_EXPORT
Definition: MitkModelFitUIExports.h:15
itk::SmartPointer< Self >
mitk::ModelTraitsInterface::ParameterNamesType
std::vector< ParameterNameType > ParameterNamesType
Definition: mitkModelTraitsInterface.h:34
QmitkSimpleBarrierModel
Definition: QmitkSimpleBarrierModel.h:30
MitkModelFitUIExports.h