X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=InterfaceQT4%2Fcompocomm.py;h=118d13c664b903c86bf25ece014cc1328c4c4a04;hb=c286259382c721a299673774031ec352d873b658;hp=a0c803728f9a05947633b89087a63d08b4a36426;hpb=9e5ea0ed745d6d22d5ccd9c8dab56340c46809d9;p=tools%2Feficas.git diff --git a/InterfaceQT4/compocomm.py b/InterfaceQT4/compocomm.py index a0c80372..118d13c6 100644 --- a/InterfaceQT4/compocomm.py +++ b/InterfaceQT4/compocomm.py @@ -18,10 +18,15 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -from PyQt4.QtGui import * -from PyQt4.QtCore import * import string +from determine import monEnvQT5 +if monEnvQT5 : + from PyQt5.QtWidgets import QAction +else : + from PyQt4.QtGui import * + from PyQt4.QtCore import * + from Editeur import Objecttreeitem import browser import typeNode @@ -39,7 +44,8 @@ class Node(browser.JDCNode,typeNode.PopUpMenuNodePartiel): def createPopUpMenu(self): typeNode.PopUpMenuNodePartiel.createPopUpMenu(self) self.Decommente = QAction(tr("Decommenter"),self.tree) - self.tree.connect(self.Decommente,SIGNAL("triggered()"),self.Decommenter) + if monEnvQT5 : self.Decommente.triggered(self.Decommenter) + else : self.tree.connect(self.Decommente,SIGNAL("triggered()"),self.Decommenter) self.Decommente.setStatusTip(tr("Decommente la commande ")) if hasattr(self.item,'uncomment'): @@ -77,7 +83,7 @@ class COMMTreeItem(Objecttreeitem.ObjectTreeItem): - la fonte dans laquelle afficher ce texte - la couleur du texte """ - return 'c',None,None + return tr('Commentaire'),None,None def get_valeur(self): """