Medical Imaging Interaction Toolkit  2024.06.00
Medical Imaging Interaction Toolkit
I/Qmitk/QmitkMapPropertyDelegate.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 QmitkMapPropertyDelegate_h
14 #define QmitkMapPropertyDelegate_h
15 
17 #include "mitkBaseProperty.h"
18 #include <QStyledItemDelegate>
19 
20 // MITK
22 
24 
30 class MITKMATCHPOINTREGISTRATIONUI_EXPORT QmitkMapPropertyDelegate : public QStyledItemDelegate
31 {
32  Q_OBJECT
33 
34 public:
38  QmitkMapPropertyDelegate(QObject *parent = nullptr);
39 
43  void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override;
44 
48  QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const override;
49 
53  void setEditorData(QWidget *editor, const QModelIndex &index) const override;
54 
58  void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const override;
59 
63  void updateEditorGeometry(QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &index) const override;
64 
65 protected:
66  bool eventFilter(QObject *o, QEvent *e) override;
67 
68 private slots:
72  void commitAndCloseEditor();
73  void showColorDialog();
74  void ComboBoxCurrentIndexChanged(int index);
75  void SpinBoxValueChanged(const QString &value);
76 };
77 
78 #endif
QmitkMapPropertyDelegate
Definition: include/QmitkMapPropertyDelegate.h:29
MITKMATCHPOINTREGISTRATIONUI_EXPORT
#define MITKMATCHPOINTREGISTRATIONUI_EXPORT
Definition: MitkMatchPointRegistrationUIExports.h:15
MitkMatchPointRegistrationUIExports.h
mitkBaseProperty.h