summaryrefslogtreecommitdiff
path: root/DockWidgets/DockWidgetSplitter.py
diff options
context:
space:
mode:
Diffstat (limited to 'DockWidgets/DockWidgetSplitter.py')
-rw-r--r--DockWidgets/DockWidgetSplitter.py27
1 files changed, 8 insertions, 19 deletions
diff --git a/DockWidgets/DockWidgetSplitter.py b/DockWidgets/DockWidgetSplitter.py
index 262bd45..303d166 100644
--- a/DockWidgets/DockWidgetSplitter.py
+++ b/DockWidgets/DockWidgetSplitter.py
@@ -2,10 +2,7 @@ from PyQt5.QtCore import *
from PyQt5.QtWidgets import *
from PyQt5.QtGui import *
from PyQt5.uic import loadUiType
-import pandas as pd
-from functools import partial
from ComponentSelector import *
-from collections import defaultdict
from Graphics import *
ui_dialog,_ = loadUiType('DockWidgets/DockWidgetSplitter.ui')
@@ -20,23 +17,19 @@ class DockWidgetSplitter(QDockWidget,ui_dialog):
self.obj=obj
self.type = comptype
self.input_dict = []
- print("constructor ", self.input_dict)
self.input_params_list()
self.btn.clicked.connect(self.param)
self.dict = {}
# input data tab
def input_params_list(self):
- try:
- print("input_params_list ", self.input_dict)
-
- self.l1.setText(self.obj.variables['NOO']['name']+":")
- self.le1.setText(str(self.obj.variables['NOO']['value']))
- self.u1.setText(self.obj.variables['NOO']['unit'])
+ try:
+ self.l1.setText(self.obj.variables['No']['name']+":")
+ self.le1.setText(str(self.obj.variables['No']['value']))
+ self.u1.setText(self.obj.variables['No']['unit'])
for i in self.obj.CalcType_modes:
self.cb2.addItem(str(i))
-
self.l2.setText(self.obj.variables['CalcType']['name']+":")
self.l3.setText("Stream 1 :")
@@ -45,19 +38,18 @@ class DockWidgetSplitter(QDockWidget,ui_dialog):
self.u4.setText('')
self.cb2.currentIndexChanged.connect(self.fun)
-
self.input_dict = [self.le1, self.cb2, self.le3, self.le4]
except Exception as e:
print(e)
def fun(self):
- if self.cb2.currentText() == 'Mole Flow Specs':
+ if self.cb2.currentText() == 'Molar_Flow':
self.u3.setText('mol/s')
self.u4.setText('mol/s')
- elif self.cb2.currentText() == 'Mass Flow Specs':
- self.u3.setText('kg/s')
- self.u4.setText('kg/s')
+ elif self.cb2.currentText() == 'Mass_Flow':
+ self.u3.setText('g/s')
+ self.u4.setText('g/s')
else:
self.u3.setText('')
self.u4.setText('')
@@ -68,11 +60,8 @@ class DockWidgetSplitter(QDockWidget,ui_dialog):
def param(self):
try:
self.dict={}
- print("param.input_dict ", self.input_dict)
self.dict = [int(self.input_dict[0].text()),self.input_dict[1].currentText(), float(self.input_dict[2].text()), float(self.input_dict[3].text())]
- print("param ", self.dict)
self.obj.param_setter(self.dict)
self.hide()
-
except Exception as e:
print(e)