Medical Imaging Interaction Toolkit
2023.04.00
Medical Imaging Interaction Toolkit
QmitkNDIToolDelegate.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 QmitkNDIToolDelegate_h
14
#define QmitkNDIToolDelegate_h
15
17
#include "MitkIGTUIExports.h"
18
#include "
mitkNodePredicateBase.h
"
19
#include "
mitkBaseProperty.h
"
21
#include <QStyledItemDelegate>
22
24
namespace
mitk
25
{
26
class
DataStorage;
27
class
NodePredicateBase;
28
class
BaseProperty;
29
};
30
35
class
MITKIGTUI_EXPORT
QmitkNDIToolDelegate
:
public
QStyledItemDelegate
36
{
37
Q_OBJECT
38
39
public
:
43
QmitkNDIToolDelegate
(QObject *parent =
nullptr
);
44
45
enum
ToolTableColumns
46
{
47
IndexCol = 0,
48
NameCol
,
49
SROMCol
,
50
TypeCol
,
51
StatusCol
,
52
NodeCol
,
53
RepCol
54
};
55
enum
NDIItemDataRole
56
{
57
NDIToolRole = 70,
58
ToolIndexRole
,
59
FileNameRole
,
60
OrganNodeRole
,
61
TypeRole
62
};
63
64
65
void
SetTypes(
const
QStringList& types);
66
void
SetDataStorage(
mitk::DataStorage
* ds);
67
void
SetPredicate(
mitk::NodePredicateBase::Pointer
p);
68
void
SetTagPropertyName(
const
std::string& name);
69
void
SetTagProperty(
mitk::BaseProperty::Pointer
prop);
70
74
//void paint(QPainter *painter, const QStyleOptionViewItem &option
75
// , const QModelIndex &index) const;
76
80
QWidget *createEditor(QWidget *parent,
const
QStyleOptionViewItem &option
81
,
const
QModelIndex &index)
const override
;
82
86
void
setEditorData(QWidget *editor,
const
QModelIndex &index)
const override
;
87
91
void
setModelData(QWidget *editor, QAbstractItemModel* model
92
,
const
QModelIndex &index)
const override
;
93
97
//void updateEditorGeometry(QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &index) const;
98
99
private
slots:
103
void
commitAndCloseEditor();
104
void
ComboBoxCurrentIndexChanged (
int
index ) ;
105
106
107
private
:
108
QStringList m_Types;
109
mitk::DataStorage
* m_DataStorage;
110
mitk::NodePredicateBase::Pointer
m_Predicate;
111
mitk::BaseProperty::Pointer
m_TagProperty;
112
std::string m_TagPropertyName;
113
};
114
#endif
QmitkNDIToolDelegate
An item delegate for rendering and editing mitk::Properties in a QTableView.
Definition:
QmitkNDIToolDelegate.h:35
QmitkNDIToolDelegate::TypeCol
@ TypeCol
Definition:
QmitkNDIToolDelegate.h:50
QmitkNDIToolDelegate::SROMCol
@ SROMCol
Definition:
QmitkNDIToolDelegate.h:49
QmitkNDIToolDelegate::StatusCol
@ StatusCol
Definition:
QmitkNDIToolDelegate.h:51
itk::SmartPointer< Self >
mitkNodePredicateBase.h
mitk
DataCollection - Class to facilitate loading/accessing structured data.
Definition:
RenderingTests.dox:1
QmitkNDIToolDelegate::FileNameRole
@ FileNameRole
Definition:
QmitkNDIToolDelegate.h:59
QmitkNDIToolDelegate::ToolIndexRole
@ ToolIndexRole
Definition:
QmitkNDIToolDelegate.h:58
QmitkNDIToolDelegate::ToolTableColumns
ToolTableColumns
Definition:
QmitkNDIToolDelegate.h:45
mitk::DataStorage
Data management class that handles 'was created by' relations.
Definition:
mitkDataStorage.h:43
QmitkNDIToolDelegate::OrganNodeRole
@ OrganNodeRole
Definition:
QmitkNDIToolDelegate.h:60
QmitkNDIToolDelegate::NDIItemDataRole
NDIItemDataRole
Definition:
QmitkNDIToolDelegate.h:55
QmitkNDIToolDelegate::NodeCol
@ NodeCol
Definition:
QmitkNDIToolDelegate.h:52
mitkBaseProperty.h
QmitkNDIToolDelegate::NameCol
@ NameCol
Definition:
QmitkNDIToolDelegate.h:48
src
MITK
Modules
IGTUI
Qmitk
QmitkNDIToolDelegate.h
Generated on Wed May 17 2023 16:26:14 for Medical Imaging Interaction Toolkit by
1.8.17