spinetoolbox.widgets.data_store_widget
¶
Contains the DataStoreForm class.
author: |
|
---|---|
date: | 26.11.2018 |
Module Contents¶
-
class
spinetoolbox.widgets.data_store_widget.
DataStoreFormBase
(db_mngr, *db_urls)[source]¶ Bases:
PySide2.QtWidgets.QMainWindow
Base class for DataStoreForm
Initializes form.
Parameters: - db_mngr (SpineDBManager) – The manager to use
- *db_urls (tuple) – Database url, codename.
Adds actions to View and Edit menu.
-
add_message
(self, msg)[source]¶ Appends regular message to status bar.
Parameters: msg (str) – String to show in QStatusBar
-
restore_dock_widgets
(self)[source]¶ Docks all floating and or hidden QDockWidgets back to the window.
Runs when the edit menu from the main menubar is about to show. Enables or disables actions according to selection status.
-
selected_entity_class_ids
(self, entity_class_type)[source]¶ Returns object class ids selected in object tree and parameter tag toolbar.
-
_accept_selection
(self, widget)[source]¶ Clears selection from all widgets except the given one, so there’s only one selection in the form at a time. In addition, registers the given widget as the official source for all operations involving selections (copy, remove, edit), but only in case it has a selection.
-
show_import_file_dialog
(self, checked=False)[source]¶ Shows dialog to allow user to select a file to import.
-
_select_database
(self)[source]¶ Lets user select a database from available databases.
Shows a dialog from which user can select a single database. If there is only a single database it is selected automatically and no dialog is shown.
Returns: the database map of the database or None if no database was selected
Updates filter according to selected tags.
-
_handle_parameter_value_list_selection_changed
(self, selected, deselected)[source]¶ Accepts selection.
Shows the context menu for parameter value list tree view.
Parameters: pos (QPoint) – Mouse position
-
notify_items_changed
(self, action, item_type, db_map_data)[source]¶ Enables or disables actions and informs the user about what just happened.
-
class
spinetoolbox.widgets.data_store_widget.
DataStoreForm
(db_mngr, *db_urls)[source]¶ Bases:
spinetoolbox.widgets.tabular_view_mixin.TabularViewMixin
,spinetoolbox.widgets.graph_view_mixin.GraphViewMixin
,spinetoolbox.widgets.parameter_view_mixin.ParameterViewMixin
,spinetoolbox.widgets.tree_view_mixin.TreeViewMixin
,spinetoolbox.widgets.data_store_widget.DataStoreFormBase
A widget to visualize Spine dbs.
Initializes everything.
Parameters: - db_mngr (SpineDBManager) – The manager to use
- *db_urls (tuple) – Database url, codename.
-
tabify_and_raise
(self, docks)[source]¶ Tabifies docks in given list, then raises the first.
Parameters: docks (list) –
-
apply_tree_style
(self, checked=False)[source]¶ Applies the tree style, inspired in the former tree view.