summaryrefslogtreecommitdiff
path: root/DockWidgets
diff options
context:
space:
mode:
authorPravin Dalve2021-06-22 00:33:41 +0530
committerPravin Dalve2021-06-22 00:33:41 +0530
commitce501c2d9e437e3988105595d2e9068045a98720 (patch)
tree3c09fc3bebb65db5942cd4f4a5425bde87978428 /DockWidgets
parent3f8095e27df1ea62c4356c08de09cc42ffca00ed (diff)
downloadChemical-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.py34
-rw-r--r--DockWidgets/__pycache__/DockWidget.cpython-37.pycbin4390 -> 4370 bytes
-rw-r--r--DockWidgets/__pycache__/DockWidgetCompoundSeparator.cpython-37.pycbin3257 -> 3237 bytes
-rw-r--r--DockWidgets/__pycache__/DockWidgetDistillationColumn.cpython-37.pycbin9430 -> 9410 bytes
-rw-r--r--DockWidgets/__pycache__/DockWidgetFlash.cpython-37.pycbin2857 -> 2837 bytes
-rw-r--r--DockWidgets/__pycache__/DockWidgetMaterialStream.cpython-37.pycbin8471 -> 9098 bytes
-rw-r--r--DockWidgets/__pycache__/DockWidgetMixer.cpython-37.pycbin2043 -> 2023 bytes
-rw-r--r--DockWidgets/__pycache__/DockWidgetShortcutColumn.cpython-37.pycbin4613 -> 4593 bytes
-rw-r--r--DockWidgets/__pycache__/DockWidgetSplitter.cpython-37.pycbin2675 -> 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
index 0a00568..ca3b088 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 8f43ce8..1c1f6f0 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 066bc00..fb120e4 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 c7d0661..c3d3567 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 5c052ae..b9e781b 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 9d19bbf..150b189 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 bc258f6..f1b745e 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 f90f086..d82db97 100644
--- a/DockWidgets/__pycache__/DockWidgetSplitter.cpython-37.pyc
+++ b/DockWidgets/__pycache__/DockWidgetSplitter.cpython-37.pyc
Binary files differ