spinetoolbox.widgets.custom_editors
¶
Custom editors for model/view programming.
author: |
|
---|---|
date: | 2.9.2018 |
Module Contents¶
-
class
spinetoolbox.widgets.custom_editors.
CustomLineEditor
[source]¶ Bases:
PySide2.QtWidgets.QLineEdit
A custom QLineEdit to handle data from models.
-
class
spinetoolbox.widgets.custom_editors.
CustomComboEditor
[source]¶ Bases:
PySide2.QtWidgets.QComboBox
A custom QComboBox to handle data from models.
-
class
spinetoolbox.widgets.custom_editors.
CustomLineEditDelegate
[source]¶ Bases:
PySide2.QtWidgets.QItemDelegate
A delegate for placing a CustomLineEditor on the first row of SearchBarEditor.
-
class
spinetoolbox.widgets.custom_editors.
SearchBarEditor
(parent, tutor=None)[source]¶ Bases:
PySide2.QtWidgets.QTableView
A Google-like search bar, implemented as a QTableView with a CustomLineEditDelegate in the first row.
Initializes instance.
Parameters: - parent (QWidget) – parent widget
- tutor (QWidget, NoneType) – another widget used for positioning.
-
set_data
(self, current, items)[source]¶ Populates model.
Parameters: - current (str) –
- items (Sequence(str)) –
-
class
spinetoolbox.widgets.custom_editors.
CheckListEditor
(parent, tutor=None)[source]¶ Bases:
PySide2.QtWidgets.QTableView
A check list editor.
Initialize class.
-
toggle_checked_state
(self, index)[source]¶ Toggles checked state of given index.
Parameters: index (QModelIndex) –
-
-
class
spinetoolbox.widgets.custom_editors.
IconPainterDelegate
[source]¶ Bases:
PySide2.QtWidgets.QItemDelegate
A delegate to highlight decorations in a QListWidget.
-
class
spinetoolbox.widgets.custom_editors.
IconColorEditor
(parent)[source]¶ Bases:
PySide2.QtWidgets.QDialog
An editor to let the user select an icon and a color for an object class.
Init class.