Item Delegate for MRML properties Use custom widgets for properties such as colors, opacities... If an index has Qt::DecorationRole set to a QColor, its editor will then be a ctkColorPickerButton linked to a color picker dialog on click If an index has a Qt::EditRole set to a QString that exactly is on the form X.YY where X is 0 or 1 and Y is a digit (0 to 9), then the editor will be a ctkDoubleSpinBox with a slider popping up on mouse hover.
More...
#include <Libs/MRML/Widgets/qMRMLItemDelegate.h>
|
| int | colorRole (const QModelIndex &index) const |
| |
| QWidget * | createEditor (QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const override |
| |
| bool | eventFilter (QObject *object, QEvent *event) override |
| |
| bool | is0To1Value (const QModelIndex &index) const |
| |
| bool | isColor (const QModelIndex &index) const |
| |
| | qMRMLItemDelegate (QObject *parent=nullptr) |
| |
| void | setEditorData (QWidget *editor, const QModelIndex &index) const override |
| |
| void | setModelData (QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const override |
| |
| QSize | sizeHint (const QStyleOptionViewItem &option, const QModelIndex &index) const override |
| |
| void | updateEditorGeometry (QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &index) const override |
| |
| | ~qMRMLItemDelegate () override |
| |
Item Delegate for MRML properties Use custom widgets for properties such as colors, opacities... If an index has Qt::DecorationRole set to a QColor, its editor will then be a ctkColorPickerButton linked to a color picker dialog on click If an index has a Qt::EditRole set to a QString that exactly is on the form X.YY where X is 0 or 1 and Y is a digit (0 to 9), then the editor will be a ctkDoubleSpinBox with a slider popping up on mouse hover.
Definition at line 40 of file qMRMLItemDelegate.h.
◆ Superclass
◆ qMRMLItemDelegate()
| qMRMLItemDelegate::qMRMLItemDelegate |
( |
QObject * |
parent = nullptr | ) |
|
◆ ~qMRMLItemDelegate()
| qMRMLItemDelegate::~qMRMLItemDelegate |
( |
| ) |
|
|
override |
◆ colorRole()
| int qMRMLItemDelegate::colorRole |
( |
const QModelIndex & |
index | ) |
const |
◆ commitAndClose
| void qMRMLItemDelegate::commitAndClose |
( |
| ) |
|
|
protectedslot |
◆ commitSenderData
| void qMRMLItemDelegate::commitSenderData |
( |
| ) |
|
|
protectedslot |
◆ createEditor()
| QWidget* qMRMLItemDelegate::createEditor |
( |
QWidget * |
parent, |
|
|
const QStyleOptionViewItem & |
option, |
|
|
const QModelIndex & |
index |
|
) |
| const |
|
override |
◆ eventFilter()
| bool qMRMLItemDelegate::eventFilter |
( |
QObject * |
object, |
|
|
QEvent * |
event |
|
) |
| |
|
override |
◆ is0To1Value()
| bool qMRMLItemDelegate::is0To1Value |
( |
const QModelIndex & |
index | ) |
const |
◆ isColor()
| bool qMRMLItemDelegate::isColor |
( |
const QModelIndex & |
index | ) |
const |
◆ setEditorData()
| void qMRMLItemDelegate::setEditorData |
( |
QWidget * |
editor, |
|
|
const QModelIndex & |
index |
|
) |
| const |
|
override |
◆ setModelData()
| void qMRMLItemDelegate::setModelData |
( |
QWidget * |
editor, |
|
|
QAbstractItemModel * |
model, |
|
|
const QModelIndex & |
index |
|
) |
| const |
|
override |
◆ sizeHint()
| QSize qMRMLItemDelegate::sizeHint |
( |
const QStyleOptionViewItem & |
option, |
|
|
const QModelIndex & |
index |
|
) |
| const |
|
override |
◆ updateEditorGeometry()
| void qMRMLItemDelegate::updateEditorGeometry |
( |
QWidget * |
editor, |
|
|
const QStyleOptionViewItem & |
option, |
|
|
const QModelIndex & |
index |
|
) |
| const |
|
override |
◆ DummySpinBox
| ctkDoubleSpinBox* qMRMLItemDelegate::DummySpinBox |
|
protected |
The documentation for this class was generated from the following file: