Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
QmitkDoseVisualStyleDelegate.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 QmitkDoseVisualStyleDelegate_h
14 #define QmitkDoseVisualStyleDelegate_h
15 
16 
18 #include <QStyledItemDelegate>
19 
20 #include <MitkRTUIExports.h>
21 
22 
34 class MITKRTUI_EXPORT QmitkDoseVisualStyleDelegate : public QStyledItemDelegate
35 {
36  Q_OBJECT
37 
38 public:
43  explicit QmitkDoseVisualStyleDelegate(QObject *parent = nullptr);
44 
51  void paint(QPainter *painter, const QStyleOptionViewItem &option
52  , const QModelIndex &index) const override;
53 
62  bool editorEvent(QEvent *event, QAbstractItemModel *model, const QStyleOptionViewItem &option,
63  const QModelIndex &index) override;
64 
65 };
66 
67 #endif
#define MITKRTUI_EXPORT
void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override
Paints a centered checkbox representing the boolean value.
bool editorEvent(QEvent *event, QAbstractItemModel *model, const QStyleOptionViewItem &option, const QModelIndex &index) override
Toggles the boolean value on left mouse button release.
QmitkDoseVisualStyleDelegate(QObject *parent=nullptr)
Constructor.