spinetoolbox.spine_db_editor.widgets.manage_items_dialogs

Classes for custom QDialogs to add, edit and remove database items.

Module Contents

Classes

DialogWithButtons

param parent

data store widget

DialogWithTableAndButtons

param parent

data store widget

ManageItemsDialog

A dialog with a CopyPasteTableView and a QDialogButtonBox. Base class for all

GetEntityClassesMixin

Provides a method to retrieve entity classes for AddEntitiesDialog and AddEntityClassesDialog.

GetEntitiesMixin

Provides a method to retrieve entities for AddEntitiesDialog and EditEntitiesDialog.

ShowIconColorEditorMixin

Provides methods to show an IconColorEditor upon request.

class spinetoolbox.spine_db_editor.widgets.manage_items_dialogs.DialogWithButtons(parent, db_mngr)[source]

Bases: PySide6.QtWidgets.QDialog

Parameters
showEvent(ev)[source]
_populate_layout()[source]
connect_signals()[source]

Connect signals to slots.

class spinetoolbox.spine_db_editor.widgets.manage_items_dialogs.DialogWithTableAndButtons(parent, db_mngr)[source]

Bases: DialogWithButtons

Parameters
_populate_layout()[source]
showEvent(ev)[source]
abstract make_table_view()[source]
resize_window_to_columns(height=None)[source]
class spinetoolbox.spine_db_editor.widgets.manage_items_dialogs.ManageItemsDialog(parent, db_mngr)[source]

Bases: DialogWithTableAndButtons

A dialog with a CopyPasteTableView and a QDialogButtonBox. Base class for all dialogs to query user’s preferences for adding/editing/managing data items.

Parameters
make_table_view()[source]
connect_signals()[source]

Connect signals to slots.

_handle_model_data_changed(top_left, bottom_right, roles)[source]

Reimplement in subclasses to handle changes in model data.

set_model_data(index, data)[source]

Update model data.

_handle_model_reset()[source]

Resize columns and form.

class spinetoolbox.spine_db_editor.widgets.manage_items_dialogs.GetEntityClassesMixin[source]

Provides a method to retrieve entity classes for AddEntitiesDialog and AddEntityClassesDialog.

db_map_ent_cls_lookup()[source]
db_map_ent_cls_lookup_by_name()[source]
entity_class_name_list(row)[source]

Return a list of entity class names present in all databases selected for given row. Used by ManageEntityClassesDelegate.

_entity_class_name_list_from_db_maps(*db_maps)[source]
class spinetoolbox.spine_db_editor.widgets.manage_items_dialogs.GetEntitiesMixin(*args, **kwargs)[source]

Provides a method to retrieve entities for AddEntitiesDialog and EditEntitiesDialog.

property class_key[source]
property dimension_name_list[source]
property class_name[source]
db_map_ent_lookup()[source]
db_map_alt_id_lookup()[source]
alternative_name_list(row)[source]

Return a list of alternative names present in all databases selected for given row. Used by ManageEntitiesDelegate.

entity_name_list(row, column)[source]

Return a list of entity names present in all databases selected for given row. Used by ManageEntitiesDelegate.

class spinetoolbox.spine_db_editor.widgets.manage_items_dialogs.ShowIconColorEditorMixin[source]

Provides methods to show an IconColorEditor upon request.

reset_data(editor)[source]

Resets the editors selections to the default state and closes the editor

show_icon_color_editor(index)[source]