data_interface

Contains DataInterface class.

authors:
  1. Savolainen (VTT)
date:

10.6.2019

Module Contents

class data_interface.DataInterface(toolbox, name, description, filepath, settings, x, y)[source]

Bases: project_item.ProjectItem

DataInterface class.

toolbox

QMainWindow instance

Type:ToolboxUI
name

Project item name

Type:str
description

Project item description

Type:str
filepath

Path to file

Type:str
settings

dict with mapping settings

Type:dict
x

Initial icon scene X coordinate

Type:int
y

Initial icon scene Y coordinate

Type:int
data_interface_refresh_signal[source]
_handle_file_model_item_changed(self, item)[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]

Restores selections and connects signals.

deactivate(self)[source]

Saves selections and disconnects signals.

restore_selections(self)[source]

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

save_selections(self)[source]

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

get_icon(self)[source]

Returns the graphics item representing this data interface on scene.

update_name_label(self)[source]

Update Data Interface tab name label. Used only when renaming project items.

open_directory(self, checked=False)[source]

Opens file explorer in Data Interface directory.

_handle_import_editor_clicked(self, checked=False)[source]

Opens Import editor for the file selected in list view.

_handle_files_double_clicked(self, index)[source]

Opens Import editor for the double clicked index.

open_import_editor(self, index)[source]

Opens Import editor for the given index.

get_connector(self, importee)[source]

Shows a QDialog to select a connector for the given source file. Mimics similar routine in spine_io.widgets.import_widget.ImportDialog

select_connector_type(self, index)[source]

Opens dialog to select connector type for the given index.

_connection_failed(self, msg, importee)[source]
save_settings(self, settings, importee)[source]
_preview_destroyed(self, importee)[source]
update_file_model(self, items)[source]

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

refresh(self)[source]

Update the list of files that this item is viewing.

execute(self)[source]

Executes this Data Interface.

stop_execution(self)[source]

Stops executing this Data Interface.