spinetoolbox.project_items.view¶
View plugin.
| author: |
|
|---|---|
| date: | 12.9.2019 |
Subpackages¶
Package Contents¶
-
class
spinetoolbox.project_items.view.View(name, description, x, y, toolbox, project, logger)[source]¶ Bases:
spinetoolbox.project_item.ProjectItemView class.
Parameters: - name (str) – Object name
- description (str) – Object description
- x (float) – Initial X coordinate of item icon
- y (float) – Initial Y coordinate of item icon
- toolbox (ToolboxUI) – a toolbox instance
- project (SpineToolboxProject) – the project this item belongs to
- logger (LoggerInterface) – a logger instance
-
static
item_type()¶ See base class.
-
static
category()¶ See base class.
-
make_signal_handler_dict(self)¶ Returns a dictionary of all shared signals and their handlers. This is to enable simpler connecting and disconnecting.
-
restore_selections(self)¶ Restore selections into shared widgets when this project item is selected.
-
save_selections(self)¶ Save selections in shared widgets for this project item into instance variables.
-
open_view(self, checked=False)¶ Opens references in a view window.
-
populate_reference_list(self)¶ Populates reference list.
-
update_name_label(self)¶ Update View tab name label. Used only when renaming project items.
-
execute_forward(self, resources)¶ see base class
-
_do_handle_dag_changed(self, resources)¶ Update the list of references that this item is viewing.
-
_update_references_list(self, resources_upstream)¶ Updates the references list with resources upstream.
Parameters: resources_upstream (list) – ProjectItemResource instances
-
_selected_indexes(self)¶ Returns selected indexes.
-
_database_urls(self, indexes)¶ Returns list of tuples (url, provider) for given indexes.
-
_restore_existing_view_window(self, view_id)¶ Restores an existing view window and returns True if the operation was successful.
-
_make_view_window(self, db_maps)¶
-
tear_down(self)¶ Tears down this item. Called by toolbox just before closing. Closes all view windows.
-
notify_destination(self, source_item)¶ See base class.
-
static
default_name_prefix()¶ see base class
-
class
spinetoolbox.project_items.view.ViewIcon(toolbox, x, y, w, h, name)[source]¶ Bases:
spinetoolbox.graphics_items.ProjectItemIconView icon for the Design View.
Parameters: - toolbox (ToolBoxUI) – QMainWindow instance
- x (float) – Icon x coordinate
- y (float) – Icon y coordinate
- w (float) – Width of background rectangle
- h (float) – Height of background rectangle
- name (str) – Item name
-
class
spinetoolbox.project_items.view.ViewPropertiesWidget(toolbox)[source]¶ Bases:
PySide2.QtWidgets.QWidgetWidget for the View Item Properties.
Parameters: toolbox (ToolboxUI) – The toolbox instance where this widget should be embeded Init class.
-
connect_signals(self)¶ Connect signals to slots.
Create and show a context-menu in View properties.
Parameters: pos (QPoint) – Mouse position
-
-
class
spinetoolbox.project_items.view.AddViewWidget(toolbox, x, y)[source]¶ Bases:
spinetoolbox.widgets.add_project_item_widget.AddProjectItemWidgetA widget to query user’s preferences for a new item.
-
x¶ X coordinate of new item
Type: int
-
y¶ Y coordinate of new item
Type: int
Initialize class.
-
call_add_item(self)¶ Creates new Item according to user’s selections.
-