spinetoolbox.widgets.custom_editors¶
Custom editors for model/view programming.
| author: |
|
|---|---|
| date: | 2.9.2018 |
Module Contents¶
Classes¶
CustomLineEditor |
A custom QLineEdit to handle data from models. |
ParameterValueLineEditor |
A custom QLineEdit to handle data from models. |
CustomComboEditor |
A custom QComboBox to handle data from models. |
_CustomLineEditDelegate |
A delegate for placing a CustomLineEditor on the first row of SearchBarEditor. |
SearchBarEditor |
A Google-like search bar, implemented as a QTableView with a _CustomLineEditDelegate in the first row. |
CheckListEditor |
A check list editor. |
_IconPainterDelegate |
A delegate to highlight decorations in a QListWidget. |
IconColorEditor |
An editor to let the user select an icon and a color for an object_class. |
-
class
spinetoolbox.widgets.custom_editors.CustomLineEditor[source]¶ Bases:
PySide2.QtWidgets.QLineEditA custom QLineEdit to handle data from models.
-
class
spinetoolbox.widgets.custom_editors.ParameterValueLineEditor[source]¶ Bases:
spinetoolbox.widgets.custom_editors.CustomLineEditorA custom QLineEdit to handle data from models.
-
class
spinetoolbox.widgets.custom_editors.CustomComboEditor[source]¶ Bases:
PySide2.QtWidgets.QComboBoxA custom QComboBox to handle data from models.
-
class
spinetoolbox.widgets.custom_editors._CustomLineEditDelegate[source]¶ Bases:
PySide2.QtWidgets.QItemDelegateA delegate for placing a CustomLineEditor on the first row of SearchBarEditor.
-
class
spinetoolbox.widgets.custom_editors.SearchBarEditor(parent, tutor=None)[source]¶ Bases:
PySide2.QtWidgets.QTableViewA 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, ranked=False)[source]¶ Bases:
PySide2.QtWidgets.QTableViewA check list editor.
Initialize class.
-
toggle_selected(self, index)[source]¶ Adds or removes given index from selected items.
Parameters: index (QModelIndex) –
-
-
class
spinetoolbox.widgets.custom_editors._IconPainterDelegate[source]¶ Bases:
PySide2.QtWidgets.QItemDelegateA delegate to highlight decorations in a QListWidget.
-
class
spinetoolbox.widgets.custom_editors.IconColorEditor(parent)[source]¶ Bases:
PySide2.QtWidgets.QDialogAn editor to let the user select an icon and a color for an object_class.
Init class.