Slicer
5.9
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
Loading...
Searching...
No Matches
Libs
MRML
Widgets
qMRMLNodeComboBoxMenuDelegate.h
Go to the documentation of this file.
1
/*==============================================================================
2
3
Program: 3D Slicer
4
5
Copyright (c) Kitware Inc.
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 Benjamin Long, Kitware Inc.
17
and was partially funded by NIH grant 3P41RR013218-12S1
18
19
==============================================================================*/
20
21
#ifndef __qMRMLNodeComboBoxMenuDelegate_h
22
#define __qMRMLNodeComboBoxMenuDelegate_h
23
24
// Qt includes
25
#include <QAbstractItemDelegate>
26
27
// MRMLWidgets includes
28
#include "qMRMLWidgetsExport.h"
29
30
class
QComboBox;
31
42
class
QMRML_WIDGETS_EXPORT
qMRMLNodeComboBoxMenuDelegate
:
public
QAbstractItemDelegate
43
{
44
Q_OBJECT
45
public
:
46
typedef
QAbstractItemDelegate
Superclass
;
47
qMRMLNodeComboBoxMenuDelegate
(QObject* parent, QComboBox* cmb);
48
49
protected
:
50
void
paint
(QPainter* painter,
const
QStyleOptionViewItem& option,
const
QModelIndex& index)
const override
;
51
QSize
sizeHint
(
const
QStyleOptionViewItem& option,
const
QModelIndex& index)
const override
;
52
53
private
:
57
QStyleOptionMenuItem getStyleOption(
const
QStyleOptionViewItem& option,
const
QModelIndex& index)
const
;
58
QComboBox* mCombo;
59
Q_DISABLE_COPY(
qMRMLNodeComboBoxMenuDelegate
);
60
};
61
62
#endif
qMRMLNodeComboBoxMenuDelegate::Superclass
QAbstractItemDelegate Superclass
Definition
qMRMLNodeComboBoxMenuDelegate.h:46
qMRMLNodeComboBoxMenuDelegate::qMRMLNodeComboBoxMenuDelegate
qMRMLNodeComboBoxMenuDelegate(QObject *parent, QComboBox *cmb)
qMRMLNodeComboBoxMenuDelegate::sizeHint
QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const override
qMRMLNodeComboBoxMenuDelegate::paint
void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override
Generated on Fri Aug 29 2025 19:01:40 for Slicer by
1.13.0