Slicer  4.10
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
List of all members | Public Types | Public Member Functions | Protected Slots | Protected Attributes
qMRMLItemDelegate Class Reference

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>

Inheritance diagram for qMRMLItemDelegate:
Inheritance graph
[legend]
Collaboration diagram for qMRMLItemDelegate:
Collaboration graph
[legend]

Public Types

typedef QStyledItemDelegate Superclass
 

Public Member Functions

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 ()
 

Protected Slots

void commitAndClose ()
 
void commitSenderData ()
 

Protected Attributes

ctkDoubleSpinBox * DummySpinBox
 

Detailed Description

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.

Member Typedef Documentation

◆ Superclass

typedef QStyledItemDelegate qMRMLItemDelegate::Superclass

Definition at line 46 of file qMRMLItemDelegate.h.

Constructor & Destructor Documentation

◆ qMRMLItemDelegate()

qMRMLItemDelegate::qMRMLItemDelegate ( QObject *  parent = 0)

◆ ~qMRMLItemDelegate()

virtual qMRMLItemDelegate::~qMRMLItemDelegate ( )
virtual

Member Function Documentation

◆ 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

Member Data Documentation

◆ DummySpinBox

ctkDoubleSpinBox* qMRMLItemDelegate::DummySpinBox
protected

Definition at line 75 of file qMRMLItemDelegate.h.


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