Medical Imaging Interaction Toolkit  2023.12.99-b826bd4b
Medical Imaging Interaction Toolkit
QmitkDoseColorDelegate.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 QmitkDoseColorDelegate_h
14 #define QmitkDoseColorDelegate_h
15 
16 
17 #include <QStyledItemDelegate>
18 
19 #include "MitkRTUIExports.h"
20 
23 class MITKRTUI_EXPORT QmitkDoseColorDelegate : public QStyledItemDelegate
24 {
25  Q_OBJECT
26 
27 public:
31  explicit QmitkDoseColorDelegate(QObject *parent = nullptr);
32 
33  bool editorEvent(QEvent *event, QAbstractItemModel *model, const QStyleOptionViewItem &option,
34  const QModelIndex &index) override;
35 
36  void paint(QPainter *painter, const QStyleOptionViewItem &option,
37  const QModelIndex &index) const override;
38 };
39 
40 #endif
MitkRTUIExports.h
MITKRTUI_EXPORT
#define MITKRTUI_EXPORT
Definition: MitkRTUIExports.h:15
QmitkDoseColorDelegate
An item delegate for rendering and editing dose color in a QTableView.
Definition: QmitkDoseColorDelegate.h:23