Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
QmitkDoseVisualStyleDelegate Class Reference

Toolkit includes. More...

#include <QmitkDoseVisualStyleDelegate.h>

Inheritance diagram for QmitkDoseVisualStyleDelegate:
Collaboration diagram for QmitkDoseVisualStyleDelegate:

Public Member Functions

 QmitkDoseVisualStyleDelegate (QObject *parent=nullptr)
 Constructor. More...
 
void paint (QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override
 Paints a centered checkbox representing the boolean value. More...
 
bool editorEvent (QEvent *event, QAbstractItemModel *model, const QStyleOptionViewItem &option, const QModelIndex &index) override
 Toggles the boolean value on left mouse button release. More...
 

Detailed Description

Toolkit includes.

Item delegate for rendering and toggling boolean dose visualization options.

This delegate renders a checkbox for boolean visualization properties of iso dose levels (e.g. iso line visibility, color wash visibility). A left mouse click toggles the value.

See also
QmitkIsoDoseLevelSetModel
QmitkDoseColorDelegate
QmitkDoseValueDelegate

Definition at line 34 of file QmitkDoseVisualStyleDelegate.h.

Constructor & Destructor Documentation

◆ QmitkDoseVisualStyleDelegate()

QmitkDoseVisualStyleDelegate::QmitkDoseVisualStyleDelegate ( QObject *  parent = nullptr)
explicit

Constructor.

Parameters
[in]parentOptional parent QObject.

Member Function Documentation

◆ editorEvent()

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

Toggles the boolean value on left mouse button release.

Parameters
[in]eventThe event to handle.
[in,out]modelThe model to read from and write to.
[in]optionStyle options for the item.
[in]indexThe model index of the item.
Returns
True if the value was successfully toggled.

◆ paint()

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

Paints a centered checkbox representing the boolean value.

Parameters
[in]painterThe QPainter to use for drawing.
[in]optionStyle options for the item.
[in]indexThe model index of the item to paint.

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