# -*- 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 determine import monEnvQT5
-if monEnvQT5:
- from PyQt5.QtWidgets import QAction
- from PyQt5.QtCore import Qt
-else :
- from PyQt4.QtGui import *
- from PyQt4.QtCore import *
+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 monWidgetCommande import MonWidgetCommande
+ 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)
- if monEnvQT5:
- self.ViewElt.triggered.connect(self.View3D)
- else :
- self.tree.connect(self.ViewElt,SIGNAL("triggered()"),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() :
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 monWidgetCommande import MonWidgetCommande
+ from .monWidgetCommande import MonWidgetCommande
return MonWidgetCommande (self,self.editor ,self.item.object)
def createPopUpMenu(self):
# ------------------------------------
-# Classes necessaires à POURSUITE
+# Classes necessaires a POURSUITE
# ------------------------------------
class POURSUITENode(browser.JDCNode, typeNode.PopUpMenuNode):
def getPanel(self):
- from monWidgetCommande import MonWidgetCommande
+ from .monWidgetCommande import MonWidgetCommande
return MonWidgetCommande (self,self.editor ,self.item.object)
def createPopUpMenu(self):
class MATERIAUNode(MACRONode):
def getPanel(self):
- from monWidgetCommande import MonWidgetCommande
+ from .monWidgetCommande import MonWidgetCommande
return MonWidgetCommande (self,self.editor ,self.item.object)
def createPopUpMenu(self):