Slicer
4.11
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
|
Abstract Item delegate to show unselectable items highlighed when the mouse is over them to give a feeling of selectable item. More...
#include <Libs/MRML/Widgets/qMRMLNodeComboBoxMenuDelegate.h>
Public Types | |
typedef QAbstractItemDelegate | Superclass |
Public Member Functions | |
qMRMLNodeComboBoxMenuDelegate (QObject *parent, QComboBox *cmb) | |
Protected Member Functions | |
void | paint (QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override |
QSize | sizeHint (const QStyleOptionViewItem &option, const QModelIndex &index) const override |
Abstract Item delegate to show unselectable items highlighed when the mouse is over them to give a feeling of selectable item.
This is used in qMRMLNodeComboBox for the extra items: e.g. "Add/Remove/Edit node" actions The highlight color is slightly more treansparent than the style palette highlight color to indicates that the item is not really selectable but correspond to an action.
We reimplemente the code from Qt "QComboMenuDelegate" used in the class QComboBox.
Definition at line 42 of file qMRMLNodeComboBoxMenuDelegate.h.
typedef QAbstractItemDelegate qMRMLNodeComboBoxMenuDelegate::Superclass |
Definition at line 46 of file qMRMLNodeComboBoxMenuDelegate.h.
qMRMLNodeComboBoxMenuDelegate::qMRMLNodeComboBoxMenuDelegate | ( | QObject * | parent, |
QComboBox * | cmb | ||
) |
|
overrideprotected |
|
overrideprotected |