MCPcopy Create free account
hub / github.com/MITK/MITK / setEditorData

Method setEditorData

Modules/RTUI/src/QmitkDoseValueDelegate.cpp:73–90  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

71}
72
73void QmitkDoseValueDelegate::setEditorData(QWidget *editor, const QModelIndex &index) const
74{
75 QVariant data = index.data(Qt::EditRole);
76
77 if(data.isValid())
78 {
79
80 QDoubleSpinBox* spinBox = qobject_cast<QDoubleSpinBox *>(editor);
81 if (spinBox)
82 {
83 spinBox->setValue(data.toDouble());
84 }
85 else
86 {
87 QStyledItemDelegate::setEditorData(editor, index);
88 }
89 }
90}
91
92void QmitkDoseValueDelegate::setModelData(QWidget *editor, QAbstractItemModel* model
93 , const QModelIndex &index) const

Callers

nothing calls this directly

Calls 1

dataMethod · 0.45

Tested by

no test coverage detected