Slicer 5.9
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
qSlicerColorTableTerminologyDelegate.h
Go to the documentation of this file.
1/*==============================================================================
2
3 Program: 3D Slicer
4
5 Copyright (c) Seattle Children's Hospital d/b/a Seattle Children's Research Institute.
6
7 See COPYRIGHT.txt
8 or http://www.slicer.org/copyright/copyright.txt for details.
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15
16 This file was originally developed by Csaba Pinter, EBATINCA, S.L.
17 and was funded by by Murat Maga (Seattle Children's Research Institute).
18
19==============================================================================*/
20
21#ifndef __qSlicerColorTableTerminologyDelegate_h
22#define __qSlicerColorTableTerminologyDelegate_h
23
24// Qt includes
25#include <QStyledItemDelegate>
26#include <QModelIndex>
27
28#include "qSlicerColorsModuleWidgetsExport.h"
29
30// \brief Delegate for displaying terminology selector
31class Q_SLICER_MODULE_COLORS_WIDGETS_EXPORT qSlicerColorTableTerminologyDelegate : public QStyledItemDelegate
32{
33 Q_OBJECT
34
35public:
36 qSlicerColorTableTerminologyDelegate(QObject *parent = nullptr);
37
38 QWidget* createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const override;
39
40 void setEditorData(QWidget *editor, const QModelIndex &index) const override;
41 void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const override;
42
43 void updateEditorGeometry(QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &index) const override;
44
45protected slots:
48 void close();
49};
50
51#endif
QWidget * createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const override
void updateEditorGeometry(QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &index) const override
void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const override
void setEditorData(QWidget *editor, const QModelIndex &index) const override
qSlicerColorTableTerminologyDelegate(QObject *parent=nullptr)