Medical Imaging Interaction Toolkit  2016.11.0
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,
6 Division of Medical and Biological Informatics.
7 All rights reserved.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without
10 even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 A PARTICULAR PURPOSE.
12 
13 See LICENSE.txt or http://www.mitk.org for details.
14 
15 ===================================================================*/
16 
17 #ifndef QmitkPropertyDelegate_h
18 #define QmitkPropertyDelegate_h
19 
21 #include "mitkBaseProperty.h"
22 #include <QStyledItemDelegate>
23 
24 // MITK
26 
28 
34 class MITKMATCHPOINTREGISTRATIONUI_EXPORT QmitkMapPropertyDelegate : public QStyledItemDelegate
35 {
36  Q_OBJECT
37 
38 public:
42  QmitkMapPropertyDelegate(QObject *parent = 0);
43 
47  void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const;
48 
52  QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const;
53 
57  void setEditorData(QWidget *editor, const QModelIndex &index) const;
58 
62  void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const;
63 
67  void updateEditorGeometry(QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &index) const;
68 
69 protected:
70  bool eventFilter(QObject *o, QEvent *e);
71 
72 private slots:
76  void commitAndCloseEditor();
77  void showColorDialog();
78  void ComboBoxCurrentIndexChanged(int index);
79  void SpinBoxValueChanged(const QString &value);
80 };
81 
82 #endif /* QMITKPROPERTIESTABLEMODEL_H_ */
#define MITKMATCHPOINTREGISTRATIONUI_EXPORT