nexxT.services.gui.PropertyDelegate module
This module provides a delegate for use in the Configuration GUI service to edit properties.
- class nexxT.services.gui.PropertyDelegate.PropertyDelegate(model, role, PropertyContent, parent)[source]
Bases:
QStyledItemDelegateThis class provides a delegate for providing editor widgets for the nexxT gui service Configuration.
- __init__(model, role, PropertyContent, parent)[source]
Constructor.
- Parameters:
model – An instance of the nexxT gui service implementation of QAbstractItemModle
role – the role which can be used to query the property items
PropertyContent – the class of the property items queried with model->data(…, self.role)
parent – the parent QObject
- createEditor(parent, option, index)[source]
Create an editor for the given index (if this is not a PropertyContent, the default implementation is used)
- Parameters:
parent – the parent of the editor
option – unused
index – the model index
- Returns:
an editor widget
- setEditorData(editor, index)[source]
Populate the editor with the data from the model
- Parameters:
editor – the editor as created by createEditor
index – the index into the model
- Returns:
- setModelData(editor, model, index)[source]
Commit the data from the editor into the model
- Parameters:
editor – the editor as returned by createEditor
model – the model
index – an index to the model
- Returns:
- staticMetaObject = PySide6.QtCore.QMetaObject("PropertyDelegate" inherits "QStyledItemDelegate": )