spinetoolbox.widgets.custom_delegates¶
Custom item delegates.
| author: |
|
|---|---|
| date: | 1.9.2018 |
Module Contents¶
Classes¶
ComboBoxDelegate |
|
LineEditDelegate |
A delegate that places a fully functioning QLineEdit. |
CheckBoxDelegate |
A delegate that places a fully functioning QCheckBox. |
ForeignKeysDelegate |
A QComboBox delegate with checkboxes. |
-
class
spinetoolbox.widgets.custom_delegates.ComboBoxDelegate(items)[source]¶ Bases:
PySide2.QtWidgets.QStyledItemDelegate
-
class
spinetoolbox.widgets.custom_delegates.LineEditDelegate[source]¶ Bases:
PySide2.QtWidgets.QStyledItemDelegateA delegate that places a fully functioning QLineEdit.
-
parent¶ either data store or spine datapackage widget
Type: QMainWindow
-
-
class
spinetoolbox.widgets.custom_delegates.CheckBoxDelegate(parent, centered=True)[source]¶ Bases:
PySide2.QtWidgets.QStyledItemDelegateA delegate that places a fully functioning QCheckBox.
-
parent¶ either toolbox or spine datapackage widget
Type: QMainWindow
-
centered¶ whether or not the checkbox should be center-aligned in the widget
Type: bool
-
createEditor(self, parent, option, index)[source]¶ Important, otherwise an editor is created if the user clicks in this cell. ** Need to hook up a signal to the model.
-
editorEvent(self, event, model, option, index)[source]¶ Change the data in the model and the state of the checkbox when user presses left mouse button and this cell is editable. Otherwise do nothing.
-
-
class
spinetoolbox.widgets.custom_delegates.ForeignKeysDelegate[source]¶ Bases:
PySide2.QtWidgets.QStyledItemDelegateA QComboBox delegate with checkboxes.
-
parent¶ spine datapackage widget
Type: SpineDatapackageWidget
-