# -*- coding: utf-8 -*-
-# Copyright (C) 2007-2013 EDF R&D
+# Copyright (C) 2007-2017 EDF R&D
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
#
# Modules Python
-import os,sys,string
+from __future__ import absolute_import
+import os,sys
import types
import traceback
# Modules Eficas
from Editeur import Objecttreeitem
from Extensions.i18n import tr
-import compooper
-import browser
-import typeNode
-from PyQt4.QtGui import QAction
-from PyQt4.QtCore import Qt, SIGNAL, QVariant
+from . import compooper
+from . import browser
+from . import typeNode
+from PyQt5.QtWidgets import QAction
+from PyQt5.QtCore import Qt
+
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
+ def getPanel(self):
+ from .monWidgetCommande import MonWidgetCommande
return MonWidgetCommande (self,self.editor ,self.item.object)
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("activated()"),self.view3D)
+ self.ViewElt.triggered.connect(self.view3D)
self.ViewElt.setStatusTip(tr("affiche dans Geom les elements de structure"))
self.menu.addAction(self.ViewElt)
if self.item.isvalid() :
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):
-# """ Cette classe hérite d'une grande partie des comportements
+# """ Cette classe herite d'une grande partie des comportements
# de la classe compooper.EtapeTreeItem
# """
itemNode=MACRONode
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)
# ------------------------------------
-# Classes necessaires à POURSUITE
+# Classes necessaires a POURSUITE
# ------------------------------------
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)