gui_data_storage.py
data storage class script
- class ScenarioGUI.gui_classes.gui_data_storage.DataStorage(gui_structure: GuiStructure)
Bases:
objectAn instance of this class contains all the information available in the GuiStructure. It also contains some extra information that is based on the direct inputs of the GuiStructure, given in the attributes below.
This creates an instance of the DataStorage Class
- Parameters
- gui_structureGuiStructure or JSON dict
GUI structure for which a data storage object should be created
- Returns
- DataStorage
- close_figures() None
This function closes the figures and sets them to None.
- Returns
- None
- from_dict(data: dict)
Set values from input dictionary to class
- Parameters
- datadict
Dictionary with main class values created by to_dict function
- Returns
- None
- set_values(gui_structure: GuiStructure) None
This function sets the values in the gui_structure according to the one stored in this class.
- Parameters
- gui_structureGuiStructure
Gui structure for which the values in this DataStorage class should be set
- Returns
- None
- to_dict() dict
Creates a dictionary from the class to be again imported later.
- Returns
- dict
Dictionary with the values of the class
- ScenarioGUI.gui_classes.gui_data_storage.is_equal(var_1: Any, var_2: Any) bool
check if the two variables are equal
- Parameters
- var_1: any
variable 1
- var_2: any
variable 2
- Returns
- ——-
bool