view

Module for view class.

authors:
  1. Savolainen (VTT), M. Marin (KHT), J. Olauson (KTH)
date:

14.07.2018

Module Contents

class view.View(toolbox, name, description, x, y)[source]

Bases: project_item.ProjectItem

View class.

toolbox

QMainWindow instance

Type:ToolboxUI
name

Object name

Type:str
description

Object description

Type:str
x

Initial X coordinate of item icon

Type:int
y

Initial Y coordinate of item icon

Type:int
view_refresh_signal[source]
make_signal_handler_dict(self)[source]

Returns a dictionary of all shared signals and their handlers. This is to enable simpler connecting and disconnecting.

activate(self)[source]

Restore selections and connect signals.

deactivate(self)[source]

Save selections and disconnect signals.

restore_selections(self)[source]

Restore selections into shared widgets when this project item is selected.

save_selections(self)[source]

Save selections in shared widgets for this project item into instance variables.

get_icon(self)[source]

Returns the item representing this Data Store on the scene.

references(self)[source]

Returns a list of url strings that are in this item as references.

find_input_items(self)[source]

Find input project items (only Data Stores now) that are connected to this View.

Returns:List of Data Store items.
refresh(self)[source]

Update the list of references that this item is viewing.

open_graph_view_btn_clicked(self, checked=False)[source]

Slot for handling the signal emitted by clicking on ‘Graph view’ button.

open_tabular_view_btn_clicked(self, checked=False)[source]

Slot for handling the signal emitted by clicking on ‘Tabular view’ button.

open_tree_view_btn_clicked(self, checked=False)[source]

Slot for handling the signal emitted by clicking on ‘Tree view’ button.

_open_view(self, view_store, supports_multiple_databases)[source]

Opens references in a view window.

Parameters:
  • view_store (dict) – a dictionary where to store the view window
  • supports_multiple_databases (bool) – True if the view supports more than one database
close_all_views(self)[source]

Closes all view windows.

populate_reference_list(self, items)[source]

Add given list of items to the reference model. If None or an empty list given, the model is cleared.

update_name_label(self)[source]

Update View tab name label. Used only when renaming project items.

open_directory(self, checked=False)[source]

Open file explorer in View data directory.

execute(self)[source]

Executes this View.

stop_execution(self)[source]

Stops executing this View.

_selected_indexes(self)[source]

Returns selected indexes.

_database_maps(self, indexes)[source]

Returns database maps and database paths for given indexes.

static _restore_existing_view_window(view_id, view_store)[source]

Restores an existing view window and returns True if the operation was successful.

_make_view_window(self, view_store, db_maps, databases)[source]