Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
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 
16 #include <mitkBaseProperty.h>
17 #include <QStyledItemDelegate>
18 
19 // MITK
21 
40 {
41  Q_OBJECT
42 
43 public:
48  QmitkMapPropertyDelegate(QObject *parent = nullptr);
49 
56  void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override;
57 
70  QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const override;
71 
77  void setEditorData(QWidget *editor, const QModelIndex &index) const override;
78 
85  void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const override;
86 
93  void updateEditorGeometry(QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &index) const override;
94 
95 protected:
96  bool eventFilter(QObject *o, QEvent *e) override;
97 
98 private slots:
102  void commitAndCloseEditor();
103  void showColorDialog();
104  void ComboBoxCurrentIndexChanged(int index);
105  void SpinBoxValueChanged(const QString &value);
106 };
107 
108 #endif
#define MITKMATCHPOINTREGISTRATIONUI_EXPORT
Item delegate for rendering and editing MatchPoint algorithm meta-properties in a QTableView.
void updateEditorGeometry(QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &index) const override
Updates the editor geometry to fit the item's bounding rectangle.
QWidget * createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const override
Creates an appropriate editor widget for the property at the given index.
void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override
Paints the delegate for the given model index.
bool eventFilter(QObject *o, QEvent *e) override
void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const override
Commits data from the editor widget back to the model.
void setEditorData(QWidget *editor, const QModelIndex &index) const override
Populates the editor widget with data from the model.
QmitkMapPropertyDelegate(QObject *parent=nullptr)
Constructs the property delegate.