diff options
author | pravindalve | 2021-04-12 20:41:30 +0530 |
---|---|---|
committer | pravindalve | 2021-04-12 20:41:30 +0530 |
commit | dcba7d32bb73e04a2f65e35f86d047d619d2c6ad (patch) | |
tree | 07ecd7ae92d4264d5f3340985d6ecb35447786ae | |
parent | d11902175b1bfb5c4fc854b3335fc5686a725647 (diff) | |
download | Chemical-Simulator-GUI-dcba7d32bb73e04a2f65e35f86d047d619d2c6ad.tar.gz Chemical-Simulator-GUI-dcba7d32bb73e04a2f65e35f86d047d619d2c6ad.tar.bz2 Chemical-Simulator-GUI-dcba7d32bb73e04a2f65e35f86d047d619d2c6ad.zip |
Small fixes for Distillation column and mixer
-rw-r--r-- | DockWidgets/DistillationColumnStagewiseResults.ui | 6 | ||||
-rw-r--r-- | DockWidgets/DockWidgetDistillationColumn.py | 3 | ||||
-rw-r--r-- | DockWidgets/DockWidgetDistillationColumn.ui | 2 | ||||
-rw-r--r-- | DockWidgets/__pycache__/DockWidget.cpython-37.pyc | bin | 4411 -> 4390 bytes | |||
-rw-r--r-- | DockWidgets/__pycache__/DockWidgetDistillationColumn.cpython-37.pyc | bin | 9426 -> 9430 bytes | |||
-rw-r--r-- | Graphics.py | 7 | ||||
-rw-r--r-- | Undo.dat | bin | 28916 -> 924 bytes | |||
-rw-r--r-- | UnitOperations.py | 2 |
8 files changed, 15 insertions, 5 deletions
diff --git a/DockWidgets/DistillationColumnStagewiseResults.ui b/DockWidgets/DistillationColumnStagewiseResults.ui index 9ce4060..fb0ef9c 100644 --- a/DockWidgets/DistillationColumnStagewiseResults.ui +++ b/DockWidgets/DistillationColumnStagewiseResults.ui @@ -38,6 +38,9 @@ <height>391</height> </rect> </property> + <property name="sizeAdjustPolicy"> + <enum>QAbstractScrollArea::AdjustToContents</enum> + </property> </widget> </widget> <widget class="QWidget" name="x_pc"> @@ -53,6 +56,9 @@ <height>391</height> </rect> </property> + <property name="sizeAdjustPolicy"> + <enum>QAbstractScrollArea::AdjustToContentsOnFirstShow</enum> + </property> </widget> </widget> </widget> diff --git a/DockWidgets/DockWidgetDistillationColumn.py b/DockWidgets/DockWidgetDistillationColumn.py index e98ba03..bd5a683 100644 --- a/DockWidgets/DockWidgetDistillationColumn.py +++ b/DockWidgets/DockWidgetDistillationColumn.py @@ -222,7 +222,7 @@ class DockWidgetDistillationColumn(QDockWidget, ui_dialog): Nt = self.obj.variables['Nt']['value'] Nc = len(self.obj.compounds) # initializing temporary arrays - Stages_T = [None]*Nt + Stages_T = [None for i in range(Nt)] # Can be uncommented when F_p and F_pc implemented in modelica table # Stages_F_p = [[None for i in range(3)] for j in range(Nt)] # Stages_F_pc = [[[None for i in range(3)] for j in range(Nc)] for k in range(Nt)] @@ -342,6 +342,7 @@ class DockWidgetDistillationColumn(QDockWidget, ui_dialog): for j in range(Nc): x_pc_table.setItem(i, 2*j, QTableWidgetItem(Stages_x_pc[i][j][1])) x_pc_table.setItem(i, 2 * j + 1, QTableWidgetItem(Stages_x_pc[i][j][2])) + for t in tables: t.resizeColumnsToContents() except Exception as e: diff --git a/DockWidgets/DockWidgetDistillationColumn.ui b/DockWidgets/DockWidgetDistillationColumn.ui index 932cbdd..920837b 100644 --- a/DockWidgets/DockWidgetDistillationColumn.ui +++ b/DockWidgets/DockWidgetDistillationColumn.ui @@ -41,7 +41,7 @@ <bool>true</bool> </property> <property name="currentIndex"> - <number>1</number> + <number>0</number> </property> <widget class="QWidget" name="tab"> <attribute name="title"> diff --git a/DockWidgets/__pycache__/DockWidget.cpython-37.pyc b/DockWidgets/__pycache__/DockWidget.cpython-37.pyc Binary files differindex a8934e2..0a00568 100644 --- a/DockWidgets/__pycache__/DockWidget.cpython-37.pyc +++ b/DockWidgets/__pycache__/DockWidget.cpython-37.pyc diff --git a/DockWidgets/__pycache__/DockWidgetDistillationColumn.cpython-37.pyc b/DockWidgets/__pycache__/DockWidgetDistillationColumn.cpython-37.pyc Binary files differindex ee33ca4..066bc00 100644 --- a/DockWidgets/__pycache__/DockWidgetDistillationColumn.cpython-37.pyc +++ b/DockWidgets/__pycache__/DockWidgetDistillationColumn.cpython-37.pyc diff --git a/Graphics.py b/Graphics.py index a829849..3deb9e2 100644 --- a/Graphics.py +++ b/Graphics.py @@ -4,6 +4,7 @@ from PyQt5.QtGui import * import PyQt5.QtGui as QtGui import PyQt5.QtCore as QtCore import PyQt5.QtWidgets as QtWidgets +from PyQt5.QtWidgets import QLineEdit from DockWidgets.DockWidget import * from DockWidgets.DockWidgetMaterialStream import * @@ -424,7 +425,8 @@ class NodeItem(QtWidgets.QGraphicsItem): if self.obj.type == 'Mixer' and not self.obj.saved: - text, ok = QInputDialog.getText(self.container.graphicsView, 'Mixer', 'Enter number of input:') + text, ok = QInputDialog.getText(self.container.graphicsView, 'Mixer', 'Enter number of input:', + echo=QLineEdit.Normal, text=str(self.obj.no_of_inputs)) if ok and text: self.nin = int(text) self.obj.no_of_inputs = self.nin @@ -436,7 +438,8 @@ class NodeItem(QtWidgets.QGraphicsItem): # self.obj.no_of_outputs = self.nop # self.obj.variables['No']['value'] = self.nop elif self.obj.type == 'DistillationColumn'and not self.obj.saved: - text, ok = QInputDialog.getText(self.container.graphicsView, 'DistillationColumn', 'Enter number of input:') + text, ok = QInputDialog.getText(self.container.graphicsView, 'DistillationColumn', 'Enter number of input:', + echo=QLineEdit.Normal, text=str(self.obj.no_of_inputs)) if ok and text: self.nin = int(text) self.obj.no_of_inputs = self.nin Binary files differdiff --git a/UnitOperations.py b/UnitOperations.py index 7f9ed5e..6fc2c9c 100644 --- a/UnitOperations.py +++ b/UnitOperations.py @@ -593,7 +593,7 @@ class Mixer(UnitOperation): UnitOperation.__init__(self) self.name = name + str(Mixer.counter) self.type = 'Mixer' - self.no_of_inputs = 6 + self.no_of_inputs = 2 self.Pout_modes = ['Inlet_Minimum', 'Inlet_Average', 'Inlet_Maximum'] self.parameters = ['NI', 'outPress'] |