summaryrefslogtreecommitdiff
path: root/Graphics.py
diff options
context:
space:
mode:
authorlucaszhao192020-01-08 17:06:38 +0530
committerlucaszhao192020-01-08 17:06:38 +0530
commit7ecaa6f103b2755dc3bb3fae10a0d7ab28162596 (patch)
tree844d1842312c70ec0cdb1c40df79d4437dddf8ad /Graphics.py
parentdb1e22fcf2aa9fd38a10867cc24813f8c4c9f079 (diff)
parent262be53fad86b22c8cd2f9c343990afdb6645b0e (diff)
downloadChemical-Simulator-GUI-7ecaa6f103b2755dc3bb3fae10a0d7ab28162596.tar.gz
Chemical-Simulator-GUI-7ecaa6f103b2755dc3bb3fae10a0d7ab28162596.tar.bz2
Chemical-Simulator-GUI-7ecaa6f103b2755dc3bb3fae10a0d7ab28162596.zip
Merge branch 'master' of https://github.com/pravindalve/Chemical-Simulator-GUI
Diffstat (limited to 'Graphics.py')
-rw-r--r--Graphics.py17
1 files changed, 12 insertions, 5 deletions
diff --git a/Graphics.py b/Graphics.py
index d2a56d2..f5129d4 100644
--- a/Graphics.py
+++ b/Graphics.py
@@ -365,7 +365,7 @@ class NodeSocket(QtWidgets.QGraphicsItem):
lst = []
class NodeItem(QtWidgets.QGraphicsItem):
-
+
@staticmethod
def getInstances(namee):
for i in lst:
@@ -380,19 +380,26 @@ class NodeItem(QtWidgets.QGraphicsItem):
self.name = self.obj.name
self.type = self.obj.type
- self.setToolTip(self.name)
+
+ default_tooltip = f"{self.name}\n\n"
+ default_tooltip_dict = self.obj.paramgetter(self.obj.modesList[0])
+ for i, j in default_tooltip_dict.items():
+ if j is not None:
+ default_tooltip = default_tooltip + f" {i} : {j}\n"
+ self.setToolTip(default_tooltip)
+
self.nin = self.obj.no_of_inputs
self.nop = self.obj.no_of_outputs
-
+
self.dockWidget = None
lst.append(self)
-
+
if(self.obj.type not in l):
self.dockWidget = dockWidget(self.obj.name,self.obj.type,self.obj)
self.mainwindow= findMainWindow(self)
self.mainwindow.addDockWidget(Qt.LeftDockWidgetArea, self.dockWidget)
self.dockWidget.hide()
-
+
self.pic=QtGui.QPixmap("icons/"+self.type+".png")
self.rect = QtCore.QRect(0,0,self.pic.width(),self.pic.height())
self.text = QGraphicsTextItem(self)