diff options
-rw-r--r-- | Container.py | 17 | ||||
-rw-r--r-- | DockWidgets/DockWidget.py | 4 | ||||
-rw-r--r-- | DockWidgets/__pycache__/DockWidget.cpython-37.pyc | bin | 6155 -> 6155 bytes | |||
-rw-r--r-- | Graphics.py | 13 | ||||
-rw-r--r-- | Undo.dat | bin | 70485 -> 31950 bytes | |||
-rw-r--r-- | mainApp.py | 2 |
6 files changed, 28 insertions, 8 deletions
diff --git a/Container.py b/Container.py index ec46706..e2b1f29 100644 --- a/Container.py +++ b/Container.py @@ -171,25 +171,32 @@ class Container(): self.flowsheet.add_compound_list(self.compounds) print("######## connection master#########\n",self.conn) for i in self.unit_operations : - print("here",i) - self.flowsheet.add_unit_operations(i) + print("here",i) + self.flowsheet.add_unit_operations(i) if mode=='SM': self.msg.append("<span>["+str(self.current_time())+"] Simulating in <b>Sequential</b> mode ... </span>") self.flowsheet.simulate_SM(self.ip,self.op) self.msg_browser() self.result=self.flowsheet.result_data - print("under SEQ mode simulation") + elif mode=='EQN': self.msg.append("<span>["+str(self.current_time())+"] Simulating in <b>equation</b> mode ... </span>") self.flowsheet.simulate_EQN() self.msg_browser() self.result=self.flowsheet.result_data print("under Eqn mode simulation") - print("710 ", self.result) - + print("710 ") + print("under SEQ mode simulation") + DockWidget.show_result(NodeItem.get_dock_widget()) + for i in self.graphics.scene.items(): + if (isinstance(i, NodeItem)): + i.update_tooltip() + + + def flat_list(lst): flat_lst=[] for sublist in lst: diff --git a/DockWidgets/DockWidget.py b/DockWidgets/DockWidget.py index 2b1cdb9..a32d125 100644 --- a/DockWidgets/DockWidget.py +++ b/DockWidgets/DockWidget.py @@ -218,4 +218,6 @@ class DockWidget(QDockWidget,ui_dialog): self.tableWidget.resizeColumnsToContents() except Exception as e: - print(e)
\ No newline at end of file + print(e) + +
\ No newline at end of file diff --git a/DockWidgets/__pycache__/DockWidget.cpython-37.pyc b/DockWidgets/__pycache__/DockWidget.cpython-37.pyc Binary files differindex fec7953..81a4e00 100644 --- a/DockWidgets/__pycache__/DockWidget.cpython-37.pyc +++ b/DockWidgets/__pycache__/DockWidget.cpython-37.pyc diff --git a/Graphics.py b/Graphics.py index 47aa4ea..f013691 100644 --- a/Graphics.py +++ b/Graphics.py @@ -41,6 +41,7 @@ class Graphics(QDialog, QtWidgets.QGraphicsItem): self.graphicsView = graphicsView self.pos = None self.unit_operations = unit_operations + # self.node_item_list = [] def get_scene(self): return self.scene @@ -50,6 +51,9 @@ class Graphics(QDialog, QtWidgets.QGraphicsItem): def create_node_item(self,unit_operation, container): print("in create node item function") + # node_item = NodeItem(unit_operation, container, self.graphicsView) + # self.node_item_list.append(node_item) + # return node_item return NodeItem(unit_operation, container, self.graphicsView) # def boundingRect(self): @@ -604,6 +608,15 @@ class NodeItem(QtWidgets.QGraphicsItem): stack.append(self.dock_widget) self.graphicsView.setInteractive(True) + def update_tooltip(self): + default_tooltip = f"{self.name}\n\n" + default_tooltip_dict = self.obj.param_getter(self.obj.modes_list[0]) + for i, j in default_tooltip_dict.items(): + if j is not None: + default_tooltip = default_tooltip + f" {i} : {j}\n" + print("default tooltip ", default_tooltip_dict) + self.setToolTip(default_tooltip) + def findMainWindow(self): ''' Binary files differ@@ -262,8 +262,6 @@ class MainApp(QMainWindow,ui): self.graphicsView.setMouseTracking(True) self.graphicsView.keyPressEvent=self.delete_call - - ''' Function for undo ''' |