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 |
|
virtual bool | eventFilter (QObject *object, QEvent *event) |
|
bool | is0To1Value (const QModelIndex &index) const |
|
bool | isColor (const QModelIndex &index) const |
|
| qMRMLItemDelegate (QObject *parent=0) |
|
void | setEditorData (QWidget *editor, const QModelIndex &index) const |
|
void | setModelData (QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const |
|
virtual QSize | sizeHint (const QStyleOptionViewItem &option, const QModelIndex &index) const |
|
void | updateEditorGeometry (QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &index) const |
|
virtual | ~qMRMLItemDelegate () |
|
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 = 0 | ) |
|
◆ ~qMRMLItemDelegate()
virtual qMRMLItemDelegate::~qMRMLItemDelegate |
( |
| ) |
|
|
virtual |
◆ 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 |
◆ eventFilter()
virtual bool qMRMLItemDelegate::eventFilter |
( |
QObject * |
object, |
|
|
QEvent * |
event |
|
) |
| |
|
virtual |
◆ 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 |
◆ setModelData()
void qMRMLItemDelegate::setModelData |
( |
QWidget * |
editor, |
|
|
QAbstractItemModel * |
model, |
|
|
const QModelIndex & |
index |
|
) |
| const |
◆ sizeHint()
virtual QSize qMRMLItemDelegate::sizeHint |
( |
const QStyleOptionViewItem & |
option, |
|
|
const QModelIndex & |
index |
|
) |
| const |
|
virtual |
◆ updateEditorGeometry()
void qMRMLItemDelegate::updateEditorGeometry |
( |
QWidget * |
editor, |
|
|
const QStyleOptionViewItem & |
option, |
|
|
const QModelIndex & |
index |
|
) |
| const |
◆ DummySpinBox
ctkDoubleSpinBox* qMRMLItemDelegate::DummySpinBox |
|
protected |
The documentation for this class was generated from the following file: