Slicer  5.0
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
qSlicerTerminologyItemDelegate Class Reference

#include <Modules/Loadable/Terminologies/Widgets/qSlicerTerminologyItemDelegate.h>

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

Public Types

enum  TerminologyItemDataRole {
  TerminologyRole = Qt::UserRole + 9, NameRole, NameAutoGeneratedRole, ColorAutoGeneratedRole,
  GeneratedColorRole
}
 

Public Member Functions

QWidget * createEditor (QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const override
 
 qSlicerTerminologyItemDelegate (QObject *parent=nullptr)
 
void setEditorData (QWidget *editor, const QModelIndex &index) const override
 
void setModelData (QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const override
 
void updateEditorGeometry (QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &index) const override
 

Protected Slots

void close ()
 
void commitAndClose ()
 
void commitSenderData ()
 

Detailed Description

Definition at line 33 of file qSlicerTerminologyItemDelegate.h.

Member Enumeration Documentation

◆ TerminologyItemDataRole

Enumerator
TerminologyRole 

Serialized terminology entry.

NameRole 

Name of the segment (either custom or auto-generated)

NameAutoGeneratedRole 

Flag indicating whether the selected name is auto-generated form terminology.

ColorAutoGeneratedRole 

Flag indicating whether the selected color is the recommended one from the terminology (or the auto-generated color in absence of a recommended color)

GeneratedColorRole 

Auto-generated color that is used if the selected terminology contains no recommended color.

Definition at line 40 of file qSlicerTerminologyItemDelegate.h.

Constructor & Destructor Documentation

◆ qSlicerTerminologyItemDelegate()

qSlicerTerminologyItemDelegate::qSlicerTerminologyItemDelegate ( QObject *  parent = nullptr)

Member Function Documentation

◆ close

void qSlicerTerminologyItemDelegate::close ( )
protectedslot

◆ commitAndClose

void qSlicerTerminologyItemDelegate::commitAndClose ( )
protectedslot

◆ commitSenderData

void qSlicerTerminologyItemDelegate::commitSenderData ( )
protectedslot

◆ createEditor()

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

◆ setEditorData()

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

◆ setModelData()

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

◆ updateEditorGeometry()

void qSlicerTerminologyItemDelegate::updateEditorGeometry ( QWidget *  editor,
const QStyleOptionViewItem &  option,
const QModelIndex &  index 
) const
override

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