Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
Helper/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 
20 
22 #include <QStyledItemDelegate>
23 #include "mitkBaseProperty.h"
24 
25 //MITK
27 
28 
34 {
35  Q_OBJECT
36 
37 public:
41  QmitkMapPropertyDelegate(QObject *parent = 0);
42 
46  void paint(QPainter *painter, const QStyleOptionViewItem &option
47  , const QModelIndex &index) const;
48 
52  QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option
53  , const QModelIndex &index) const;
54 
58  void setEditorData(QWidget *editor, const QModelIndex &index) const;
59 
63  void setModelData(QWidget *editor, QAbstractItemModel* model
64  , const QModelIndex &index) const;
65 
69  void updateEditorGeometry(QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &index) const;
70 
71 protected:
72 
73  bool eventFilter(QObject *o, QEvent *e);
74 
75  private slots:
79  void commitAndCloseEditor();
80  void showColorDialog();
81  void ComboBoxCurrentIndexChanged(int index);
82  void SpinBoxValueChanged(const QString& value);
83 
84 };
85 
86 #endif /* QMITKPROPERTIESTABLEMODEL_H_ */
#define MITKMATCHPOINTREGISTRATION_EXPORT