MITK-IGT
IGT Extension of MITK
Loading...
Searching...
No Matches
QmitkNDIToolDelegate Class Reference

An item delegate for rendering and editing mitk::Properties in a QTableView. More...

#include <QmitkNDIToolDelegate.h>

Inheritance diagram for QmitkNDIToolDelegate:

Public Types

enum  ToolTableColumns {
  IndexCol = 0 , NameCol , SROMCol , TypeCol ,
  StatusCol , NodeCol , RepCol
}
 
enum  NDIItemDataRole {
  NDIToolRole = 70 , ToolIndexRole , FileNameRole , OrganNodeRole ,
  TypeRole
}
 

Public Member Functions

 QmitkNDIToolDelegate (QObject *parent=nullptr)
 
void SetTypes (const QStringList &types)
 set types list for type editor combobox
 
void SetDataStorage (mitk::DataStorage *ds)
 set datastorage for organ node editor
 
void SetPredicate (mitk::NodePredicateBase::Pointer p)
 set predicate for organ node editor
 
void SetTagPropertyName (const std::string &name)
 set name of the property that is used to tag selected nodes
 
void SetTagProperty (mitk::BaseProperty::Pointer prop)
 set the property that is used to tag selected nodes
 
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
 

Detailed Description

An item delegate for rendering and editing mitk::Properties in a QTableView.

Definition at line 35 of file QmitkNDIToolDelegate.h.

Member Enumeration Documentation

◆ NDIItemDataRole

Enumerator
NDIToolRole 
ToolIndexRole 
FileNameRole 
OrganNodeRole 
TypeRole 

Definition at line 55 of file QmitkNDIToolDelegate.h.

◆ ToolTableColumns

Enumerator
IndexCol 
NameCol 
SROMCol 
TypeCol 
StatusCol 
NodeCol 
RepCol 

Definition at line 45 of file QmitkNDIToolDelegate.h.

Constructor & Destructor Documentation

◆ QmitkNDIToolDelegate()

QmitkNDIToolDelegate::QmitkNDIToolDelegate ( QObject * parent = nullptr)

Creates a new PropertyDelegate.

Definition at line 31 of file QmitkNDIToolDelegate.cpp.

Member Function Documentation

◆ createEditor()

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

Renders a specific property (overwritten from QItemDelegate) Create an editor for a specific property (overwritten from QItemDelegate)

Definition at line 37 of file QmitkNDIToolDelegate.cpp.

◆ SetDataStorage()

void QmitkNDIToolDelegate::SetDataStorage ( mitk::DataStorage * ds)

set datastorage for organ node editor

Definition at line 190 of file QmitkNDIToolDelegate.cpp.

◆ setEditorData()

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

Create an editor for a specific property (overwritten from QItemDelegate)

Definition at line 67 of file QmitkNDIToolDelegate.cpp.

◆ setModelData()

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

When the user accepts input this func commits the data to the model (overwritten from QItemDelegate)

Definition at line 114 of file QmitkNDIToolDelegate.cpp.

◆ SetPredicate()

void QmitkNDIToolDelegate::SetPredicate ( mitk::NodePredicateBase::Pointer p)

set predicate for organ node editor

Definition at line 196 of file QmitkNDIToolDelegate.cpp.

◆ SetTagProperty()

void QmitkNDIToolDelegate::SetTagProperty ( mitk::BaseProperty::Pointer prop)

set the property that is used to tag selected nodes

Definition at line 202 of file QmitkNDIToolDelegate.cpp.

◆ SetTagPropertyName()

void QmitkNDIToolDelegate::SetTagPropertyName ( const std::string & name)

set name of the property that is used to tag selected nodes

Definition at line 207 of file QmitkNDIToolDelegate.cpp.

◆ SetTypes()

void QmitkNDIToolDelegate::SetTypes ( const QStringList & types)

set types list for type editor combobox

Definition at line 184 of file QmitkNDIToolDelegate.cpp.


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