spinetoolbox.widgets.manage_db_items_dialog

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

author:
  1. Marin (KTH)
date:

13.5.2018

Module Contents

class spinetoolbox.widgets.manage_db_items_dialog.ManageItemsDialog(parent, db_mngr)[source]

Bases: PySide2.QtWidgets.QDialog

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

parent

data store widget

Type:DataStoreForm
db_mngr
Type:SpineDBManager
connect_signals(self)[source]

Connect signals to slots.

resize_window_to_columns(self, height=None)[source]
_handle_model_data_changed(self, top_left, bottom_right, roles)[source]

Reimplement in subclasses to handle changes in model data.

set_model_data(self, index, data)[source]

Update model data.

_handle_model_reset(self)[source]

Resize columns and form.

class spinetoolbox.widgets.manage_db_items_dialog.GetObjectClassesMixin[source]

Provides a method to retrieve object classes for AddObjectsDialog and AddRelationshipClassesDialog.

make_db_map_obj_cls_lookup(self)[source]
object_class_name_list(self, row)[source]

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

class spinetoolbox.widgets.manage_db_items_dialog.GetObjectsMixin[source]

Provides a method to retrieve objects for AddRelationshipsDialog and EditRelationshipsDialog.

make_db_map_obj_lookup(self)[source]
make_db_map_rel_cls_lookup(self)[source]
object_name_list(self, row, column)[source]

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

class spinetoolbox.widgets.manage_db_items_dialog.ShowIconColorEditorMixin[source]

Provides methods to show an IconColorEditor upon request.

show_icon_color_editor(self, index)[source]
create_object_pixmap(self, object_class_name)[source]
class spinetoolbox.widgets.manage_db_items_dialog.CommitDialog(parent, *db_names)[source]

Bases: PySide2.QtWidgets.QDialog

A dialog to query user’s preferences for new commit.

db_names

database names

Type:Iterable

Initialize class

receive_text_changed(self)[source]

Called when text changes in the commit msg text edit. Enable/disable commit button accordingly.