spinetoolbox.spine_db_editor.widgets.edit_or_remove_items_dialogs

Classes for custom QDialogs to edit items in databases.

Module Contents

Classes

EditOrRemoveItemsDialog

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

EditEntityClassesDialog

A dialog to query user's preferences for updating entity classes.

EditEntitiesDialog

A dialog to query user's preferences for updating entities.

RemoveEntitiesDialog

A dialog to query user's preferences for removing tree items.

SelectSuperclassDialog

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

class spinetoolbox.spine_db_editor.widgets.edit_or_remove_items_dialogs.EditOrRemoveItemsDialog(parent, db_mngr)[source]

Bases: spinetoolbox.spine_db_editor.widgets.manage_items_dialogs.ManageItemsDialog

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
all_databases(row)[source]

Returns a list of db names available for a given row. Used by delegates.

class spinetoolbox.spine_db_editor.widgets.edit_or_remove_items_dialogs.EditEntityClassesDialog(parent, db_mngr, selected)[source]

Bases: spinetoolbox.spine_db_editor.widgets.manage_items_dialogs.ShowIconColorEditorMixin, EditOrRemoveItemsDialog

A dialog to query user’s preferences for updating entity classes.

Parameters
  • parent (SpineDBEditor) – data store widget

  • db_mngr (SpineDBManager) – the manager to do the update

  • selected (set) – set of EntityClassItem instances to edit

connect_signals()[source]

Connect signals to slots.

accept()[source]

Collect info from dialog and try to update items.

class spinetoolbox.spine_db_editor.widgets.edit_or_remove_items_dialogs.EditEntitiesDialog(parent, db_mngr, selected, class_key)[source]

Bases: spinetoolbox.spine_db_editor.widgets.manage_items_dialogs.GetEntityClassesMixin, spinetoolbox.spine_db_editor.widgets.manage_items_dialogs.GetEntitiesMixin, EditOrRemoveItemsDialog

A dialog to query user’s preferences for updating entities.

Parameters
  • parent (SpineDBEditor) – data store widget

  • db_mngr (SpineDBManager) – the manager to do the update

  • selected (set) – set of EntityItem instances to edit

  • class_key (tuple) – for identifying the entity class

accept()[source]

Collect info from dialog and try to update items.

class spinetoolbox.spine_db_editor.widgets.edit_or_remove_items_dialogs.RemoveEntitiesDialog(parent, db_mngr, selected)[source]

Bases: EditOrRemoveItemsDialog

A dialog to query user’s preferences for removing tree items.

Parameters
  • parent (SpineDBEditor) – data store widget

  • db_mngr (SpineDBManager) – the manager to do the removal

  • selected (dict) – maps item type (class) to instances

accept()[source]

Collect info from dialog and try to remove items.

class spinetoolbox.spine_db_editor.widgets.edit_or_remove_items_dialogs.SelectSuperclassDialog(parent, entity_class_item, db_mngr, *db_maps)[source]

Bases: spinetoolbox.spine_db_editor.widgets.manage_items_dialogs.GetEntityClassesMixin, spinetoolbox.spine_db_editor.widgets.manage_items_dialogs.DialogWithButtons

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

Parameters
_populate_layout()[source]
accept()[source]