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>
|
| | 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 |
| |
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.
◆ QmitkDoseValueDelegate()
| QmitkDoseValueDelegate::QmitkDoseValueDelegate |
( |
QObject * |
parent = nullptr | ) |
|
|
explicit |
Creates a new PropertyDelegate.
◆ 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: