Medical Imaging Interaction Toolkit  2024.06.99-60d9b802
Medical Imaging Interaction Toolkit
QmitkLabelToggleItemDelegate Class Reference

An item delegate for rendering and editing properties that can be toggled (e.g. visibility). More...

#include <QmitkLabelToggleItemDelegate.h>

Inheritance diagram for QmitkLabelToggleItemDelegate:
Collaboration diagram for QmitkLabelToggleItemDelegate:

Public Member Functions

 QmitkLabelToggleItemDelegate (const QIcon &onIcon, const QIcon &offIcon, QObject *parent=nullptr)
 
bool editorEvent (QEvent *event, QAbstractItemModel *model, const QStyleOptionViewItem &option, const QModelIndex &index) override
 
void paint (QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override
 
QSize sizeHint (const QStyleOptionViewItem &option, const QModelIndex &index) const override
 

Protected Attributes

QIcon m_OnIcon
 
QIcon m_OffIcon
 

Detailed Description

An item delegate for rendering and editing properties that can be toggled (e.g. visibility).

Definition at line 25 of file QmitkLabelToggleItemDelegate.h.

Constructor & Destructor Documentation

◆ QmitkLabelToggleItemDelegate()

QmitkLabelToggleItemDelegate::QmitkLabelToggleItemDelegate ( const QIcon &  onIcon,
const QIcon &  offIcon,
QObject *  parent = nullptr 
)
explicit

Creates a new PropertyDelegate.

Member Function Documentation

◆ editorEvent()

bool QmitkLabelToggleItemDelegate::editorEvent ( QEvent *  event,
QAbstractItemModel *  model,
const QStyleOptionViewItem &  option,
const QModelIndex &  index 
)
override

◆ paint()

void QmitkLabelToggleItemDelegate::paint ( QPainter *  painter,
const QStyleOptionViewItem &  option,
const QModelIndex &  index 
) const
override

◆ sizeHint()

QSize QmitkLabelToggleItemDelegate::sizeHint ( const QStyleOptionViewItem &  option,
const QModelIndex &  index 
) const
override

Member Data Documentation

◆ m_OffIcon

QIcon QmitkLabelToggleItemDelegate::m_OffIcon
protected

Definition at line 45 of file QmitkLabelToggleItemDelegate.h.

◆ m_OnIcon

QIcon QmitkLabelToggleItemDelegate::m_OnIcon
protected

Definition at line 44 of file QmitkLabelToggleItemDelegate.h.


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