diff options
author | Pravin Dalve | 2021-06-22 00:33:41 +0530 |
---|---|---|
committer | Pravin Dalve | 2021-06-22 00:33:41 +0530 |
commit | ce501c2d9e437e3988105595d2e9068045a98720 (patch) | |
tree | 3c09fc3bebb65db5942cd4f4a5425bde87978428 /DockWidgets | |
parent | 3f8095e27df1ea62c4356c08de09cc42ffca00ed (diff) | |
download | Chemical-Simulator-GUI-ce501c2d9e437e3988105595d2e9068045a98720.tar.gz Chemical-Simulator-GUI-ce501c2d9e437e3988105595d2e9068045a98720.tar.bz2 Chemical-Simulator-GUI-ce501c2d9e437e3988105595d2e9068045a98720.zip |
update compounds method added in all unit operations, material stream and material stream dockwidget
Diffstat (limited to 'DockWidgets')
-rw-r--r-- | DockWidgets/DockWidgetMaterialStream.py | 34 | ||||
-rw-r--r-- | DockWidgets/__pycache__/DockWidget.cpython-37.pyc | bin | 4390 -> 4370 bytes | |||
-rw-r--r-- | DockWidgets/__pycache__/DockWidgetCompoundSeparator.cpython-37.pyc | bin | 3257 -> 3237 bytes | |||
-rw-r--r-- | DockWidgets/__pycache__/DockWidgetDistillationColumn.cpython-37.pyc | bin | 9430 -> 9410 bytes | |||
-rw-r--r-- | DockWidgets/__pycache__/DockWidgetFlash.cpython-37.pyc | bin | 2857 -> 2837 bytes | |||
-rw-r--r-- | DockWidgets/__pycache__/DockWidgetMaterialStream.cpython-37.pyc | bin | 8471 -> 9098 bytes | |||
-rw-r--r-- | DockWidgets/__pycache__/DockWidgetMixer.cpython-37.pyc | bin | 2043 -> 2023 bytes | |||
-rw-r--r-- | DockWidgets/__pycache__/DockWidgetShortcutColumn.cpython-37.pyc | bin | 4613 -> 4593 bytes | |||
-rw-r--r-- | DockWidgets/__pycache__/DockWidgetSplitter.cpython-37.pyc | bin | 2675 -> 2655 bytes |
9 files changed, 28 insertions, 6 deletions
diff --git a/DockWidgets/DockWidgetMaterialStream.py b/DockWidgets/DockWidgetMaterialStream.py index 60a4aca..2e5f303 100644 --- a/DockWidgets/DockWidgetMaterialStream.py +++ b/DockWidgets/DockWidgetMaterialStream.py @@ -35,6 +35,7 @@ class DockWidgetMaterialStream(QDockWidget,ui_dialog): for j in lines: self.cbTP.addItem(str(j)) self.modes() + # input data tab def modes(self): modes_list = self.obj.modes_list @@ -67,10 +68,13 @@ class DockWidgetMaterialStream(QDockWidget,ui_dialog): print(noc) self.x_pclist.clear() - gp = QGroupBox("Mole Fractions") + self.comp_gb = QGroupBox("Mole Fractions") lay = QGridLayout() for j in range(noc): - l = QLineEdit(str(self.obj.variables['x_pc']['value'][j])) + try: + l = QLineEdit(str(self.obj.variables['x_pc']['value'][j])) + except: + l = QLineEdit() # if self.input_dict[i] != '': # l.setText(str(self.obj.variables['x_pc']['value'][j])) # print('l = ', str(self.obj.variables['x_pc']['value'][j])) @@ -80,8 +84,8 @@ class DockWidgetMaterialStream(QDockWidget,ui_dialog): lay.addWidget(l,j,1, alignment=Qt.AlignCenter) self.x_pclist.append(l) lay.setSizeConstraint(QLayout.SetFixedSize) - gp.setLayout(lay) - self.formLayout.addRow(gp) + self.comp_gb.setLayout(lay) + self.formLayout.addRow(self.comp_gb) elif i == "Thermo Package": self.cbTP.setCurrentText(self.input_dict[i]) else: @@ -101,14 +105,32 @@ class DockWidgetMaterialStream(QDockWidget,ui_dialog): self.input_dict[i] = l - - except Exception as e: print(e) def show_error(self): QMessageBox.about(self, 'Important', "Please fill all fields with data") + def update_compounds(self): + try: + noc = len(compound_selected) + print(noc) + self.x_pclist.clear() + + lay = QGridLayout() + for j in range(noc): + l = QLineEdit() + lay.addWidget(QLabel(str(compound_selected[j]) + ":"), j, 0, alignment=Qt.AlignLeft) + lay.addWidget(l, j, 1, alignment=Qt.AlignCenter) + self.x_pclist.append(l) + lay.setSizeConstraint(QLayout.SetFixedSize) + self.comp_gb.setLayout(lay) + indexx = self.comboBox.currentIndex() + self.comboBox.setCurrentIndex(1) + self.comboBox.setCurrentIndex(indexx) + except Exception as e: + print(e) + def param(self): try: self.dict={} diff --git a/DockWidgets/__pycache__/DockWidget.cpython-37.pyc b/DockWidgets/__pycache__/DockWidget.cpython-37.pyc Binary files differindex 0a00568..ca3b088 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 8f43ce8..1c1f6f0 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 066bc00..fb120e4 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 c7d0661..c3d3567 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 5c052ae..b9e781b 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 9d19bbf..150b189 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 bc258f6..f1b745e 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 f90f086..d82db97 100644 --- a/DockWidgets/__pycache__/DockWidgetSplitter.cpython-37.pyc +++ b/DockWidgets/__pycache__/DockWidgetSplitter.cpython-37.pyc |