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):
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 :
#---------------------------#