Medical Imaging Interaction Toolkit  2023.12.00
Medical Imaging Interaction Toolkit
QmitkDoseValueDelegate Class Reference

An item delegate for rendering and editing dose values. The delegate assumes that the model uses the role Qt::UserRole+1 to indicate if the returned dose value is an absolute (data(Qt::UserRole+1) == true) or an relative dose (data(Qt::UserRole+1) == false). More...

#include <QmitkDoseValueDelegate.h>

Inheritance diagram for QmitkDoseValueDelegate:
Collaboration diagram for QmitkDoseValueDelegate:

Public Member Functions

 QmitkDoseValueDelegate (QObject *parent=nullptr)
 
void paint (QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override
 
QWidget * createEditor (QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const override
 
void setEditorData (QWidget *editor, const QModelIndex &index) const override
 
void setModelData (QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const override
 

Detailed Description

An item delegate for rendering and editing dose values. The delegate assumes that the model uses the role Qt::UserRole+1 to indicate if the returned dose value is an absolute (data(Qt::UserRole+1) == true) or an relative dose (data(Qt::UserRole+1) == false).

Definition at line 26 of file QmitkDoseValueDelegate.h.

Constructor & Destructor Documentation

◆ QmitkDoseValueDelegate()

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

Creates a new PropertyDelegate.

Member Function Documentation

◆ createEditor()

QWidget* QmitkDoseValueDelegate::createEditor ( QWidget *  parent,
const QStyleOptionViewItem &  option,
const QModelIndex &  index 
) const
override

Create an editor for a specific property (overwritten from QItemDelegate)

◆ paint()

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

Renders a specific property (overwritten from QItemDelegate)

◆ setEditorData()

void QmitkDoseValueDelegate::setEditorData ( QWidget *  editor,
const QModelIndex &  index 
) const
override

Create an editor for a specific property (overwritten from QItemDelegate)

◆ setModelData()

void QmitkDoseValueDelegate::setModelData ( QWidget *  editor,
QAbstractItemModel *  model,
const QModelIndex &  index 
) const
override

When the user accepts input this func commits the data to the model (overwritten from QItemDelegate)


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