From: Pascale Noyret Date: Tue, 27 Nov 2012 09:40:04 +0000 (+0000) Subject: pour ajouter un parametre au debut X-Git-Tag: V6_6_0rc1~7 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=0a48abe4a3d80bc7cbe0017507a4e066e8e40350;p=tools%2Feficas.git pour ajouter un parametre au debut --- diff --git a/InterfaceQT4/compojdc.py b/InterfaceQT4/compojdc.py index 240c6457..4dda7140 100644 --- a/InterfaceQT4/compojdc.py +++ b/InterfaceQT4/compojdc.py @@ -20,15 +20,21 @@ 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): diff --git a/InterfaceQT4/typeNode.py b/InterfaceQT4/typeNode.py index b2c9dcd0..b8c65da9 100644 --- a/InterfaceQT4/typeNode.py +++ b/InterfaceQT4/typeNode.py @@ -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 : #---------------------------#