summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrenda-br2023-01-19 13:21:11 +0530
committerbrenda-br2023-01-19 13:21:11 +0530
commitf5857f755b7d7f099c20c1dc29a010b6ff954e05 (patch)
treed54dc139700d9b4156b3f61d006205b113c8945c
parent22e16e822e952664b55a39bbc69dd15e2e55fe74 (diff)
downloadChemical-Simulator-GUI-f5857f755b7d7f099c20c1dc29a010b6ff954e05.tar.gz
Chemical-Simulator-GUI-f5857f755b7d7f099c20c1dc29a010b6ff954e05.tar.bz2
Chemical-Simulator-GUI-f5857f755b7d7f099c20c1dc29a010b6ff954e05.zip
Fix #35 Variable Description and Units displayed in tooltip
-rw-r--r--DockWidgets/__pycache__/DockWidget.cpython-37.pycbin4730 -> 4730 bytes
-rw-r--r--DockWidgets/__pycache__/DockWidgetCompoundSeparator.cpython-37.pycbin3614 -> 3614 bytes
-rw-r--r--DockWidgets/__pycache__/DockWidgetDistillationColumn.cpython-37.pycbin10155 -> 10155 bytes
-rw-r--r--DockWidgets/__pycache__/DockWidgetFlash.cpython-37.pycbin3202 -> 3202 bytes
-rw-r--r--DockWidgets/__pycache__/DockWidgetMaterialStream.cpython-37.pycbin8986 -> 8986 bytes
-rw-r--r--DockWidgets/__pycache__/DockWidgetMixer.cpython-37.pycbin2388 -> 2388 bytes
-rw-r--r--DockWidgets/__pycache__/DockWidgetShortcutColumn.cpython-37.pycbin5350 -> 5350 bytes
-rw-r--r--DockWidgets/__pycache__/DockWidgetSplitter.cpython-37.pycbin3023 -> 3023 bytes
-rw-r--r--Graphics.py4
-rw-r--r--Streams.py46
-rw-r--r--Undo.datbin42133 -> 3471 bytes
11 files changed, 48 insertions, 2 deletions
diff --git a/DockWidgets/__pycache__/DockWidget.cpython-37.pyc b/DockWidgets/__pycache__/DockWidget.cpython-37.pyc
index cca7be4..b0cf5d3 100644
--- a/DockWidgets/__pycache__/DockWidget.cpython-37.pyc
+++ b/DockWidgets/__pycache__/DockWidget.cpython-37.pyc
Binary files differ
diff --git a/DockWidgets/__pycache__/DockWidgetCompoundSeparator.cpython-37.pyc b/DockWidgets/__pycache__/DockWidgetCompoundSeparator.cpython-37.pyc
index 7bf913d..db18769 100644
--- a/DockWidgets/__pycache__/DockWidgetCompoundSeparator.cpython-37.pyc
+++ b/DockWidgets/__pycache__/DockWidgetCompoundSeparator.cpython-37.pyc
Binary files differ
diff --git a/DockWidgets/__pycache__/DockWidgetDistillationColumn.cpython-37.pyc b/DockWidgets/__pycache__/DockWidgetDistillationColumn.cpython-37.pyc
index 34174b8..aa0f582 100644
--- a/DockWidgets/__pycache__/DockWidgetDistillationColumn.cpython-37.pyc
+++ b/DockWidgets/__pycache__/DockWidgetDistillationColumn.cpython-37.pyc
Binary files differ
diff --git a/DockWidgets/__pycache__/DockWidgetFlash.cpython-37.pyc b/DockWidgets/__pycache__/DockWidgetFlash.cpython-37.pyc
index 9dfa718..53d07bc 100644
--- a/DockWidgets/__pycache__/DockWidgetFlash.cpython-37.pyc
+++ b/DockWidgets/__pycache__/DockWidgetFlash.cpython-37.pyc
Binary files differ
diff --git a/DockWidgets/__pycache__/DockWidgetMaterialStream.cpython-37.pyc b/DockWidgets/__pycache__/DockWidgetMaterialStream.cpython-37.pyc
index d693fd0..29c3683 100644
--- a/DockWidgets/__pycache__/DockWidgetMaterialStream.cpython-37.pyc
+++ b/DockWidgets/__pycache__/DockWidgetMaterialStream.cpython-37.pyc
Binary files differ
diff --git a/DockWidgets/__pycache__/DockWidgetMixer.cpython-37.pyc b/DockWidgets/__pycache__/DockWidgetMixer.cpython-37.pyc
index 454fa28..58c8a9e 100644
--- a/DockWidgets/__pycache__/DockWidgetMixer.cpython-37.pyc
+++ b/DockWidgets/__pycache__/DockWidgetMixer.cpython-37.pyc
Binary files differ
diff --git a/DockWidgets/__pycache__/DockWidgetShortcutColumn.cpython-37.pyc b/DockWidgets/__pycache__/DockWidgetShortcutColumn.cpython-37.pyc
index ec04e53..dd67795 100644
--- a/DockWidgets/__pycache__/DockWidgetShortcutColumn.cpython-37.pyc
+++ b/DockWidgets/__pycache__/DockWidgetShortcutColumn.cpython-37.pyc
Binary files differ
diff --git a/DockWidgets/__pycache__/DockWidgetSplitter.cpython-37.pyc b/DockWidgets/__pycache__/DockWidgetSplitter.cpython-37.pyc
index c888614..e19a9a3 100644
--- a/DockWidgets/__pycache__/DockWidgetSplitter.cpython-37.pyc
+++ b/DockWidgets/__pycache__/DockWidgetSplitter.cpython-37.pyc
Binary files differ
diff --git a/Graphics.py b/Graphics.py
index 7d456fe..1472516 100644
--- a/Graphics.py
+++ b/Graphics.py
@@ -424,7 +424,7 @@ class NodeItem(QtWidgets.QGraphicsItem):
if (self.obj.modes_list):
default_tooltip = f"{self.name}\n\n"
- default_tooltip_dict = self.obj.param_getter(self.obj.mode)
+ default_tooltip_dict = self.obj.param_getter_tooltip(self.obj.mode)
for i, j in default_tooltip_dict.items():
if j is not None:
default_tooltip = default_tooltip + f" {i} : {j}\n"
@@ -585,7 +585,7 @@ class NodeItem(QtWidgets.QGraphicsItem):
def update_tooltip(self):
default_tooltip = f"{self.name}\n\n"
- default_tooltip_dict = self.obj.param_getter(self.obj.modes_list[0])
+ default_tooltip_dict = self.obj.param_getter_tooltip(self.obj.mode)
for i, j in default_tooltip_dict.items():
if j is not None:
default_tooltip = default_tooltip + f" {i} : {j}\n"
diff --git a/Streams.py b/Streams.py
index 5f1b840..a4cdeaf 100644
--- a/Streams.py
+++ b/Streams.py
@@ -81,6 +81,52 @@ class MaterialStream():
for i in self.compound_names:
self.variables[i] = {'value':''}
+ def param_getter_tooltip(self,mode):
+ dict = {}
+
+ temp = []
+ for i, val in enumerate(self.compound_names):
+ try:
+ temp.append(self.variables['x_pc[1,' + str(i+1) + ']']['value'])
+ except:
+ pass
+ self.variables['x_pc']['value'] = temp
+
+ if(mode=="PT"):
+ self.mode1 = self.variables['P']['name']
+ self.mode2 = self.variables['T']['name']
+ dict = {self.mode1:str(self.variables['P']['value'])+' '+self.variables['P']['unit'],
+ self.mode2:str(self.variables['T']['value'])+' '+self.variables['T']['unit']}
+ elif(mode=="PH"):
+ self.mode1 = self.variables['P']['name']
+ self.mode2 = self.variables['H_p[1]']['name']
+
+ dict = {self.mode1:str(self.variables['P']['value'])+' '+self.variables['P']['unit'],
+ self.mode2:str(self.variables['H_p[1]']['value'])+' '+self.variables['H_p[1]']['unit']}
+ elif(mode=="PVF"):
+ self.mode1 = self.variables['P']['name']
+ self.mode2 = self.variables['xvap']['name']
+
+ dict = {self.mode1:str(self.variables['P']['value'])+' '+self.variables['P']['unit'],
+ self.mode2:str(self.variables['xvap']['value'])+' '+self.variables['xvap']['unit']}
+ elif(mode=="TVF"):
+ self.mode1 = self.variables['T']['name']
+ self.mode2 = self.variables['xvap']['name']
+ dict = {self.mode1:str(self.variables['T']['value'])+' '+self.variables['T']['unit'],
+ self.mode2:str(self.variables['xvap']['value'])+' '+self.variables['xvap']['unit']}
+
+ elif(mode=="PS"):
+ self.mode1 = self.variables['P']['name']
+ self.mode2 = self.variables['S_p[1]']['name']
+
+ dict = {self.mode1:str(self.variables['P']['value'])+' '+self.variables['P']['unit'],
+ self.mode2:str(self.variables['S_p[1]']['value'])+' '+self.variables['S_p[1]']['unit']}
+
+ dict['Mole Flow'] = str(self.variables['F_p[1]']['value'])+' '+self.variables['F_p[1]']['unit']
+ 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(self,mode):
dict = {}
diff --git a/Undo.dat b/Undo.dat
index b5ad0a9..435cb62 100644
--- a/Undo.dat
+++ b/Undo.dat
Binary files differ