diff options
author | brenda-br | 2023-01-28 21:48:22 +0530 |
---|---|---|
committer | brenda-br | 2023-01-28 21:48:22 +0530 |
commit | 9e587690ebf2a16f33d5a8ee4904e7a36844371d (patch) | |
tree | e098744058ecabfb281bdb7fb0d365028f445e5c | |
parent | b9df67134289c0b9d76f7f6462284d5cdf64c4d9 (diff) | |
download | Chemical-Simulator-GUI-9e587690ebf2a16f33d5a8ee4904e7a36844371d.tar.gz Chemical-Simulator-GUI-9e587690ebf2a16f33d5a8ee4904e7a36844371d.tar.bz2 Chemical-Simulator-GUI-9e587690ebf2a16f33d5a8ee4904e7a36844371d.zip |
Fix #47 Tololtip Update with important variables after simulation
-rw-r--r-- | Container.py | 6 | ||||
-rw-r--r-- | DockWidgets/__pycache__/DockWidget.cpython-37.pyc | bin | 4849 -> 4845 bytes | |||
-rw-r--r-- | DockWidgets/__pycache__/DockWidgetCompoundSeparator.cpython-37.pyc | bin | 4104 -> 4100 bytes | |||
-rw-r--r-- | DockWidgets/__pycache__/DockWidgetDistillationColumn.cpython-37.pyc | bin | 10155 -> 10151 bytes | |||
-rw-r--r-- | DockWidgets/__pycache__/DockWidgetFlash.cpython-37.pyc | bin | 3202 -> 3198 bytes | |||
-rw-r--r-- | DockWidgets/__pycache__/DockWidgetMaterialStream.cpython-37.pyc | bin | 9114 -> 9123 bytes | |||
-rw-r--r-- | DockWidgets/__pycache__/DockWidgetMixer.cpython-37.pyc | bin | 2388 -> 2384 bytes | |||
-rw-r--r-- | DockWidgets/__pycache__/DockWidgetShortcutColumn.cpython-37.pyc | bin | 5350 -> 5346 bytes | |||
-rw-r--r-- | DockWidgets/__pycache__/DockWidgetSplitter.cpython-37.pyc | bin | 3023 -> 3019 bytes | |||
-rw-r--r-- | Graphics.py | 8 | ||||
-rw-r--r-- | Streams.py | 25 | ||||
-rw-r--r-- | Undo.dat | bin | 3471 -> 25570 bytes |
12 files changed, 36 insertions, 3 deletions
diff --git a/Container.py b/Container.py index 443a8bd..a975bc9 100644 --- a/Container.py +++ b/Container.py @@ -157,9 +157,9 @@ class Container(): if(len(self.result)== 4): DockWidget.show_result(NodeItem.get_dock_widget()) - # for i in self.graphics.scene.items(): - # if (isinstance(i, NodeItem)): - # i.update_tooltip() + for i in self.graphics.scene.items(): + if (isinstance(i, NodeItem) and i.type == 'MaterialStream'): + i.update_tooltip_selectedVar() def flat_list(lst): flat_lst=[] diff --git a/DockWidgets/__pycache__/DockWidget.cpython-37.pyc b/DockWidgets/__pycache__/DockWidget.cpython-37.pyc Binary files differindex 5d0ec10..8ab3386 100644 --- a/DockWidgets/__pycache__/DockWidget.cpython-37.pyc +++ b/DockWidgets/__pycache__/DockWidget.cpython-37.pyc diff --git a/DockWidgets/__pycache__/DockWidgetCompoundSeparator.cpython-37.pyc b/DockWidgets/__pycache__/DockWidgetCompoundSeparator.cpython-37.pyc Binary files differindex f11f259..04890a9 100644 --- a/DockWidgets/__pycache__/DockWidgetCompoundSeparator.cpython-37.pyc +++ b/DockWidgets/__pycache__/DockWidgetCompoundSeparator.cpython-37.pyc diff --git a/DockWidgets/__pycache__/DockWidgetDistillationColumn.cpython-37.pyc b/DockWidgets/__pycache__/DockWidgetDistillationColumn.cpython-37.pyc Binary files differindex aa0f582..fb6c619 100644 --- a/DockWidgets/__pycache__/DockWidgetDistillationColumn.cpython-37.pyc +++ b/DockWidgets/__pycache__/DockWidgetDistillationColumn.cpython-37.pyc diff --git a/DockWidgets/__pycache__/DockWidgetFlash.cpython-37.pyc b/DockWidgets/__pycache__/DockWidgetFlash.cpython-37.pyc Binary files differindex 53d07bc..8ca0797 100644 --- a/DockWidgets/__pycache__/DockWidgetFlash.cpython-37.pyc +++ b/DockWidgets/__pycache__/DockWidgetFlash.cpython-37.pyc diff --git a/DockWidgets/__pycache__/DockWidgetMaterialStream.cpython-37.pyc b/DockWidgets/__pycache__/DockWidgetMaterialStream.cpython-37.pyc Binary files differindex 4bc5ca3..00acef9 100644 --- a/DockWidgets/__pycache__/DockWidgetMaterialStream.cpython-37.pyc +++ b/DockWidgets/__pycache__/DockWidgetMaterialStream.cpython-37.pyc diff --git a/DockWidgets/__pycache__/DockWidgetMixer.cpython-37.pyc b/DockWidgets/__pycache__/DockWidgetMixer.cpython-37.pyc Binary files differindex 58c8a9e..d5e0ab0 100644 --- a/DockWidgets/__pycache__/DockWidgetMixer.cpython-37.pyc +++ b/DockWidgets/__pycache__/DockWidgetMixer.cpython-37.pyc diff --git a/DockWidgets/__pycache__/DockWidgetShortcutColumn.cpython-37.pyc b/DockWidgets/__pycache__/DockWidgetShortcutColumn.cpython-37.pyc Binary files differindex dd67795..68769ee 100644 --- a/DockWidgets/__pycache__/DockWidgetShortcutColumn.cpython-37.pyc +++ b/DockWidgets/__pycache__/DockWidgetShortcutColumn.cpython-37.pyc diff --git a/DockWidgets/__pycache__/DockWidgetSplitter.cpython-37.pyc b/DockWidgets/__pycache__/DockWidgetSplitter.cpython-37.pyc Binary files differindex e19a9a3..88174db 100644 --- a/DockWidgets/__pycache__/DockWidgetSplitter.cpython-37.pyc +++ b/DockWidgets/__pycache__/DockWidgetSplitter.cpython-37.pyc diff --git a/Graphics.py b/Graphics.py index c527205..04bc7c8 100644 --- a/Graphics.py +++ b/Graphics.py @@ -591,6 +591,14 @@ class NodeItem(QtWidgets.QGraphicsItem): default_tooltip = default_tooltip + f" {i} : {j}\n" self.setToolTip(default_tooltip) + def update_tooltip_selectedVar(self): + default_tooltip = f"{self.name}\n\n" + default_tooltip_dict = self.obj.param_getter_tooltip_selectedVar() + for i, j in default_tooltip_dict.items(): + if j is not None: + default_tooltip = default_tooltip + f" {i} : {j}\n" + self.setToolTip(default_tooltip) + def update_compounds(self): try: self.obj.update_compounds() @@ -136,6 +136,31 @@ class MaterialStream(): dict[self.variables['x_pc']['name']] = str(self.variables['x_pc']['value'])+' '+self.variables['x_pc']['unit'] dict['Thermo Package'] = self.thermo_package return dict + + def param_getter_tooltip_selectedVar(self): + dict = {} + + var1_name = self.variables['P']['name'] + var1_val = self.variables['P']['value'] + var1_unit = self.variables['P']['unit'] + var2_name = self.variables['T']['name'] + var2_val = self.variables['T']['value'] + var2_unit = self.variables['T']['unit'] + var3_name = self.variables['H_p[1]']['name'] + var3_val = self.variables['H_p[1]']['value'] + var3_unit = self.variables['H_p[1]']['unit'] + var4_name = self.variables['S_p[1]']['name'] + var4_val = self.variables['S_p[1]']['value'] + var4_unit = self.variables['S_p[1]']['unit'] + var5_name = self.variables['xvap']['name'] + var5_val = self.variables['xvap']['value'] + var5_unit = self.variables['xvap']['unit'] + dict = {var1_name:str(var1_val)+' '+var1_unit, + var2_name:str(var2_val)+' '+var2_unit, + var3_name:str(var3_val)+' '+var3_unit, + var4_name:str(var4_val)+' '+var4_unit, + var5_name:str(var5_val)+' '+var5_unit, } + return dict def param_getter(self,mode): dict = {} Binary files differ |