diff options
author | pravindalve | 2020-08-11 19:08:57 +0530 |
---|---|---|
committer | GitHub | 2020-08-11 19:08:57 +0530 |
commit | b31cf75d9362412e755fce76f61d73eab1e7da14 (patch) | |
tree | 0ab99a88893f8b0a7c18138c0eec0c806654cf1a /DockWidgets/DockWidgetSplitter.py | |
parent | d3bed1ef7150f8e493ebaed3b841b1fe781e974d (diff) | |
parent | 4cffaf3d0d29ee1f2d31601dd1571c7de40a8c5f (diff) | |
download | Chemical-Simulator-GUI-b31cf75d9362412e755fce76f61d73eab1e7da14.tar.gz Chemical-Simulator-GUI-b31cf75d9362412e755fce76f61d73eab1e7da14.tar.bz2 Chemical-Simulator-GUI-b31cf75d9362412e755fce76f61d73eab1e7da14.zip |
Merge pull request #4 from pravindalve/master
Updates and Bug Fixes
Diffstat (limited to 'DockWidgets/DockWidgetSplitter.py')
-rw-r--r-- | DockWidgets/DockWidgetSplitter.py | 27 |
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) |