]> SALOME platform Git repositories - tools/eficas.git/commitdiff
Salome HOME
pour ajouter un parametre au debut
authorPascale Noyret <pascale.noyret@edf.fr>
Tue, 27 Nov 2012 09:40:04 +0000 (09:40 +0000)
committerPascale Noyret <pascale.noyret@edf.fr>
Tue, 27 Nov 2012 09:40:04 +0000 (09:40 +0000)
InterfaceQT4/compojdc.py
InterfaceQT4/typeNode.py

index 240c6457a22a68491f94830a14d689300ff0abfc..4dda714059ca3793f8d2eb44e8af53141e6e8f7a 100644 (file)
 
 from Editeur import Objecttreeitem
 import browser
+import typeNode
 
 
-class Node(browser.JDCNode):
+class Node(browser.JDCNode,typeNode.PopUpMenuRacine):
     def getPanel(self):
         """
         """
         from monRacinePanel import MonRacinePanel
         return MonRacinePanel(self,parent=self.editor)
 
+    def createPopUpMenu(self):
+        typeNode.PopUpMenuRacine.createPopUpMenu(self)
+
+    def addParameters(self,apres):
+        self.append_child("PARAMETRE",pos=0)
 
 
 class JDCTreeItem(Objecttreeitem.ObjectTreeItem):
index b2c9dcd052e319652087f7264a153a0f316c4531..b8c65da9792db302ac988494bcf935d1411adca4 100644 (file)
@@ -21,6 +21,23 @@ from PyQt4 import *
 from PyQt4.QtGui import *
 from PyQt4.QtCore import *
 
+#---------------------------#
+class PopUpMenuRacine :
+#---------------------------#
+
+
+    def createPopUpMenu(self):
+        self.ParamApres = QAction('Parametre',self.tree)
+        self.tree.connect(self.ParamApres,SIGNAL("activated()"),self.addParametersApres)
+        self.ParamApres.setStatusTip("Insere un parametre")
+        self.menu = QMenu(self.tree)
+        self.menu.addAction(self.ParamApres)
+
+
+    def addParametersApres(self):
+        item= self.tree.currentItem()
+        item.addParameters(True)
+
 #---------------------------#
 class PopUpMenuNodeMinimal :
 #---------------------------#