Slicer  5.0
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
List of all members | Public Types | Public Member Functions | Protected Member Functions
qMRMLNodeComboBoxMenuDelegate Class Reference

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>

Inheritance diagram for qMRMLNodeComboBoxMenuDelegate:
Inheritance graph
[legend]
Collaboration diagram for qMRMLNodeComboBoxMenuDelegate:
Collaboration graph
[legend]

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
 

Detailed Description

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.

Member Typedef Documentation

◆ Superclass

typedef QAbstractItemDelegate qMRMLNodeComboBoxMenuDelegate::Superclass

Definition at line 46 of file qMRMLNodeComboBoxMenuDelegate.h.

Constructor & Destructor Documentation

◆ qMRMLNodeComboBoxMenuDelegate()

qMRMLNodeComboBoxMenuDelegate::qMRMLNodeComboBoxMenuDelegate ( QObject *  parent,
QComboBox *  cmb 
)

Member Function Documentation

◆ paint()

void qMRMLNodeComboBoxMenuDelegate::paint ( QPainter *  painter,
const QStyleOptionViewItem &  option,
const QModelIndex &  index 
) const
overrideprotected

◆ sizeHint()

QSize qMRMLNodeComboBoxMenuDelegate::sizeHint ( const QStyleOptionViewItem &  option,
const QModelIndex &  index 
) const
overrideprotected

The documentation for this class was generated from the following file: