Medical Imaging Interaction Toolkit  2024.06.00
Medical Imaging Interaction Toolkit
QmitkDoseValueDelegate.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 QmitkDoseValueDelegate_h
14 #define QmitkDoseValueDelegate_h
15 
16 
17 #include <QStyledItemDelegate>
18 
19 #include "MitkRTUIExports.h"
20 
26 class MITKRTUI_EXPORT QmitkDoseValueDelegate : public QStyledItemDelegate
27 {
28  Q_OBJECT
29 
30 public:
34  explicit QmitkDoseValueDelegate(QObject *parent = nullptr);
35 
39  void paint(QPainter *painter, const QStyleOptionViewItem &option
40  , const QModelIndex &index) const override;
41 
45  QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option
46  , const QModelIndex &index) const override;
47 
51  void setEditorData(QWidget *editor, const QModelIndex &index) const override;
52 
56  void setModelData(QWidget *editor, QAbstractItemModel* model, const QModelIndex &index) const override;
57 };
58 
59 #endif
MitkRTUIExports.h
MITKRTUI_EXPORT
#define MITKRTUI_EXPORT
Definition: MitkRTUIExports.h:15
QmitkDoseValueDelegate
An item delegate for rendering and editing dose values. The delegate assumes that the model uses the ...
Definition: QmitkDoseValueDelegate.h:26