Medical Imaging Interaction Toolkit  2016.11.0
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=0)
 
void paint (QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const
 
QWidget * createEditor (QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const
 
void setEditorData (QWidget *editor, const QModelIndex &index) const
 
void setModelData (QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const
 

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 30 of file QmitkDoseValueDelegate.h.

Constructor & Destructor Documentation

QmitkDoseValueDelegate::QmitkDoseValueDelegate ( QObject *  parent = 0)

Creates a new PropertyDelegate.

Definition at line 24 of file QmitkDoseValueDelegate.cpp.

Member Function Documentation

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

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

Definition at line 42 of file QmitkDoseValueDelegate.cpp.

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

Renders a specific property (overwritten from QItemDelegate)

Definition at line 28 of file QmitkDoseValueDelegate.cpp.

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

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

Definition at line 77 of file QmitkDoseValueDelegate.cpp.

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

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

Definition at line 96 of file QmitkDoseValueDelegate.cpp.


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