Medical Imaging Interaction Toolkit  2018.4.99-389bf124
Medical Imaging Interaction Toolkit
QmitkInitialValuesDelegate Class Reference

Toolkit includes. More...

#include <QmitkInitialValuesDelegate.h>

Inheritance diagram for QmitkInitialValuesDelegate:
Collaboration diagram for QmitkInitialValuesDelegate:

Public Member Functions

 QmitkInitialValuesDelegate (QObject *parent=nullptr)
 
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
 
void setDataStorage (mitk::DataStorage *storage)
 
void setNodePredicate (mitk::NodePredicateBase *predicate)
 

Protected Member Functions

int valueType (const QModelIndex &index) const
 

Protected Attributes

mitk::DataStorage::Pointer m_Storage
 
mitk::NodePredicateBase::Pointer m_Predicate
 

Detailed Description

Toolkit includes.

An item delegate for rendering and editing the initial value (source) for a parameter. The delegate assumes the following: 1) the data requested with the edit role, will be an double if it is an simple scalar type. If the type is image, it will be a pointer to the currently selected data node. If nothing is selected now it will be a nullptr.

Definition at line 32 of file QmitkInitialValuesDelegate.h.

Constructor & Destructor Documentation

◆ QmitkInitialValuesDelegate()

QmitkInitialValuesDelegate::QmitkInitialValuesDelegate ( QObject *  parent = nullptr)

Definition at line 24 of file QmitkInitialValuesDelegate.cpp.

Member Function Documentation

◆ createEditor()

QWidget * QmitkInitialValuesDelegate::createEditor ( QWidget *  parent,
const QStyleOptionViewItem &  option,
const QModelIndex &  index 
) const
override

Definition at line 28 of file QmitkInitialValuesDelegate.cpp.

References m_Predicate, m_Storage, and valueType().

◆ setDataStorage()

void QmitkInitialValuesDelegate::setDataStorage ( mitk::DataStorage storage)

◆ setEditorData()

void QmitkInitialValuesDelegate::setEditorData ( QWidget *  editor,
const QModelIndex &  index 
) const
override

Definition at line 63 of file QmitkInitialValuesDelegate.cpp.

References QmitkDataStorageComboBox::Find(), and valueType().

◆ setModelData()

void QmitkInitialValuesDelegate::setModelData ( QWidget *  editor,
QAbstractItemModel *  model,
const QModelIndex &  index 
) const
override

◆ setNodePredicate()

void QmitkInitialValuesDelegate::setNodePredicate ( mitk::NodePredicateBase predicate)

◆ valueType()

int QmitkInitialValuesDelegate::valueType ( const QModelIndex &  index) const
protected

Definition at line 56 of file QmitkInitialValuesDelegate.cpp.

Referenced by createEditor(), setEditorData(), and setModelData().

Member Data Documentation

◆ m_Predicate

mitk::NodePredicateBase::Pointer QmitkInitialValuesDelegate::m_Predicate
protected

Predicates that is used to filter for potential/allowed images in the data storage

Definition at line 56 of file QmitkInitialValuesDelegate.h.

Referenced by createEditor(), and setNodePredicate().

◆ m_Storage

mitk::DataStorage::Pointer QmitkInitialValuesDelegate::m_Storage
protected

Storage is used as source for potantial initial value images.

Definition at line 54 of file QmitkInitialValuesDelegate.h.

Referenced by createEditor(), and setDataStorage().


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