data_connection¶
Module for data connection class.
| author: |
|
|---|---|
| date: | 19.12.2017 |
Module Contents¶
-
class
data_connection.DataConnection(toolbox, name, description, references, x, y)[source]¶ Bases:
project_item.ProjectItemData Connection class.
-
name¶ Object name
Type: str
-
description¶ Object description
Type: str
-
references¶ List of file references
Type: list
-
x¶ Initial X coordinate of item icon
Type: int
-
y¶ Initial Y coordinate of item icon
Type: int
-
make_signal_handler_dict(self)[source]¶ Returns a dictionary of all shared signals and their handlers. This is to enable simpler connecting and disconnecting.
-
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.
-
add_files_to_references(self, paths)[source]¶ Add multiple file paths to reference list.
Parameters: paths (list) – A list of paths to files
-
receive_files_dropped_on_dc(self, item, file_paths)[source]¶ Called when files are dropped onto a data connection graphics item. If the item is this Data Connection’s graphics item, add the files to data.
-
add_references(self, checked=False)[source]¶ Let user select references to files for this data connection.
-
remove_references(self, checked=False)[source]¶ Remove selected references from reference list. Do not remove anything if there are no references selected.
-
copy_to_project(self, checked=False)[source]¶ Copy selected file references to this Data Connection’s data directory.
-
datapackage_form_destroyed(self)[source]¶ Notify a connection that datapackage form has been destroyed.
-
file_references(self)[source]¶ Returns a list of paths to files that are in this item as references.
-
refresh(self)[source]¶ Refresh data files in Data Connection Properties. NOTE: Might lead to performance issues.
-
populate_reference_list(self, items)[source]¶ List file references in QTreeView. If items is None or empty list, model is cleared.
-
populate_data_list(self, items)[source]¶ List project internal data (files) in QTreeView. If items is None or empty list, model is cleared.
-