#include <Modules/Loadable/Terminologies/Widgets/qSlicerTerminologyItemDelegate.h>
◆ TerminologyItemDataRole
Enumerator |
---|
TerminologyRole | Serialized terminology entry.
|
DefaultTerminologyRole | Serialized default terminology entry, which is used to initialize the terminology selector if the segment has no terminology yet.
|
NameRole | Name of the segment (either custom or auto-generated)
|
NameAutoGeneratedRole | Flag indicating whether the selected name is auto-generated form terminology.
|
ColorRole | Color of the segment. We do not want to show color in the name cell so we need a custom role.
|
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 42 of file qSlicerTerminologyItemDelegate.h.
◆ useDecorationRole
bool qSlicerTerminologyItemDelegate::useDecorationRole |
|
readwrite |
◆ qSlicerTerminologyItemDelegate()
qSlicerTerminologyItemDelegate::qSlicerTerminologyItemDelegate |
( |
QObject * | parent = nullptr | ) |
|
◆ 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 |
◆ setUseDecorationRole
void qSlicerTerminologyItemDelegate::setUseDecorationRole |
( |
bool | useDecorationRole | ) |
|
|
slot |
◆ setUserSetCustomNameOrColorCallback()
void qSlicerTerminologyItemDelegate::setUserSetCustomNameOrColorCallback |
( |
std::function< bool()> | callback | ) |
|
This can be used for asking the user if he wants to switch to using simple name&color selector.
◆ setUseTerminologySelectorCallback()
void qSlicerTerminologyItemDelegate::setUseTerminologySelectorCallback |
( |
std::function< bool()> | callback | ) |
|
This method allow setting a callback function that takes a void* argument and returns bool.
◆ updateEditorGeometry()
void qSlicerTerminologyItemDelegate::updateEditorGeometry |
( |
QWidget * | editor, |
|
|
const QStyleOptionViewItem & | option, |
|
|
const QModelIndex & | index ) const |
|
override |
◆ useDecorationRole()
bool qSlicerTerminologyItemDelegate::useDecorationRole |
( |
| ) |
|
◆ userSetCustomNameOrColor
void qSlicerTerminologyItemDelegate::userSetCustomNameOrColor |
( |
| ) |
|
|
protectedslot |
◆ UseDecorationRole
bool qSlicerTerminologyItemDelegate::UseDecorationRole { true } |
|
protected |
Flag indicating whether the delegate is set on a column that shows the color as decoration role. E.g. the name column in Segment Editor does not show decoration, but the color column in Subject Hierarchy does.
Definition at line 92 of file qSlicerTerminologyItemDelegate.h.
◆ UserSetCustomNameOrColorCallback
std::function<bool()> qSlicerTerminologyItemDelegate::UserSetCustomNameOrColorCallback |
|
protected |
◆ UseTerminologySelectorCallback
std::function<bool()> qSlicerTerminologyItemDelegate::UseTerminologySelectorCallback |
|
protected |
The documentation for this class was generated from the following file: