import compooper
import browser
import typeNode
+from PyQt4.QtGui import QAction
+from PyQt4.QtCore import Qt, SIGNAL, QVariant
class MACRONode(browser.JDCNode,typeNode.PopUpMenuNode):
- def getPanel(self):
- from monMacroPanel import MonMacroPanel
- return MonMacroPanel (self,parent=self.editor )
- def getPanel2(self):
- from monWidgetCommande import MonWidgetCommande
- return MonWidgetCommande(self,self.editor,self.item.object)
+ def getPanel(self):
+ from monWidgetCommande import MonWidgetCommande
+ return MonWidgetCommande (self,self.editor ,self.item.object)
+
def createPopUpMenu(self):
typeNode.PopUpMenuNode.createPopUpMenu(self)
+ if ("AFFE_CARA_ELEM" in self.item.get_genealogie()) and self.editor.salome:
+ self.ViewElt = QAction(tr('View3D'),self.tree)
+ self.tree.connect(self.ViewElt,SIGNAL("triggered()"),self.view3D)
+ self.ViewElt.setStatusTip(tr("affiche dans Geom les elements de structure"))
+ self.menu.addAction(self.ViewElt)
+ if self.item.isvalid() :
+ self.ViewElt.setEnabled(1)
+ else:
+ self.ViewElt.setEnabled(0)
+
+ def view3D(self) :
+ from Editeur import TroisDPal
+ troisD=TroisDPal.TroisDPilote(self.item,self.editor.appliEficas)
+ troisD.envoievisu()
+
- #def doPaste(self,node_selected):
- # print 'je suis la'
- # objetACopier = self.item.get_copie_objet()
- # child=self.append_brother(objetACopier)
- # return child
class MACROTreeItem(compooper.EtapeTreeItem):
class INCLUDENode(browser.JDCNode,typeNode.PopUpMenuNode):
+
def getPanel(self):
- from monIncludePanel import MonIncludePanel
- return MonIncludePanel (self,parent=self.editor )
+ from monWidgetCommande import MonWidgetCommande
+ return MonWidgetCommande (self,self.editor ,self.item.object)
def createPopUpMenu(self):
typeNode.PopUpMenuNode.createPopUpMenu(self)
# ------------------------------------
class POURSUITENode(browser.JDCNode, typeNode.PopUpMenuNode):
+
def getPanel(self):
- from monPoursuitePanel import MonPoursuitePanel
- return MonPoursuitePanel (self,parent=self.editor )
+ from monWidgetCommande import MonWidgetCommande
+ return MonWidgetCommande (self,self.editor ,self.item.object)
def createPopUpMenu(self):
typeNode.PopUpMenuNode.createPopUpMenu(self)
class MATERIAUNode(MACRONode):
def getPanel(self):
- from monMacroPanel import MonMacroPanel
- return MonMacroPanel (self,parent=self.editor )
+ from monWidgetCommande import MonWidgetCommande
+ return MonWidgetCommande (self,self.editor ,self.item.object)
def createPopUpMenu(self):
typeNode.PopUpMenuNode.createPopUpMenu(self)