spinetoolbox.widgets.edit_db_items_dialogs

Classes for custom QDialogs to edit items in databases.

author:
  1. Marin (KTH)
date:

13.5.2018

Module Contents

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

Bases: spinetoolbox.widgets.manage_db_items_dialog.ManageItemsDialog

all_databases(self, row)[source]

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

class spinetoolbox.widgets.edit_db_items_dialogs.EditObjectClassesDialog(parent, db_mngr, selected)[source]

Bases: spinetoolbox.widgets.manage_db_items_dialog.ShowIconColorEditorMixin, spinetoolbox.widgets.edit_db_items_dialogs.EditOrRemoveItemsDialog

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

Init class.

Parameters:
  • parent (DataStoreForm) – data store widget
  • db_mngr (SpineDBManager) – the manager to do the update
  • selected (set) – set of ObjectClassItem instances to edit
connect_signals(self)[source]
accept(self)[source]

Collect info from dialog and try to update items.

class spinetoolbox.widgets.edit_db_items_dialogs.EditObjectsDialog(parent, db_mngr, selected)[source]

Bases: spinetoolbox.widgets.edit_db_items_dialogs.EditOrRemoveItemsDialog

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

Init class.

Parameters:
  • parent (DataStoreForm) – data store widget
  • db_mngr (SpineDBManager) – the manager to do the update
  • selected (set) – set of ObjectItem instances to edit
accept(self)[source]

Collect info from dialog and try to update items.

class spinetoolbox.widgets.edit_db_items_dialogs.EditRelationshipClassesDialog(parent, db_mngr, selected)[source]

Bases: spinetoolbox.widgets.edit_db_items_dialogs.EditOrRemoveItemsDialog

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

Init class.

Parameters:
  • parent (DataStoreForm) – data store widget
  • db_mngr (SpineDBManager) – the manager to do the update
  • selected (set) – set of RelationshipClassItem instances to edit
accept(self)[source]

Collect info from dialog and try to update items.

class spinetoolbox.widgets.edit_db_items_dialogs.EditRelationshipsDialog(parent, db_mngr, selected, class_key)[source]

Bases: spinetoolbox.widgets.manage_db_items_dialog.GetObjectsMixin, spinetoolbox.widgets.edit_db_items_dialogs.EditOrRemoveItemsDialog

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

Init class.

Parameters:
  • parent (DataStoreForm) – data store widget
  • db_mngr (SpineDBManager) – the manager to do the update
  • selected (set) – set of RelationshipItem instances to edit
  • class_key (tuple) – (class_name, object_class_name_list) for identifying the relationship class
accept(self)[source]

Collect info from dialog and try to update items.

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

Bases: spinetoolbox.widgets.edit_db_items_dialogs.EditOrRemoveItemsDialog

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

Init class.

Parameters:
  • parent (DataStoreForm) – data store widget
  • db_mngr (SpineDBManager) – the manager to do the removal
  • selected (dict) – maps item type (class) to instances
accept(self)[source]

Collect info from dialog and try to remove items.

class spinetoolbox.widgets.edit_db_items_dialogs.ManageParameterTagsDialog(parent, db_mngr, *db_maps)[source]

Bases: spinetoolbox.widgets.manage_db_items_dialog.ManageItemsDialog

A dialog to query user’s preferences for managing parameter tags.

Init class.

Parameters:
  • parent (DataStoreForm) – data store widget
  • db_mngr (SpineDBManager) – the manager to do the removal
  • db_maps (iter) – DiffDatabaseMapping instances
all_databases(self, row)[source]

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

accept(self)[source]

Collect info from dialog and try to update, remove, add items.