Salome HOME
projects
/
tools
/
eficas.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
:: dans le label
[tools/eficas.git]
/
InterfaceQT4
/
compofact.py
diff --git
a/InterfaceQT4/compofact.py
b/InterfaceQT4/compofact.py
index c34e700b21563f152317381a9bb037f24b09cc2a..6dfe35844516a31fb987e32350473784c104e8ff 100644
(file)
--- a/
InterfaceQT4/compofact.py
+++ b/
InterfaceQT4/compofact.py
@@
-18,23
+18,17
@@
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-from PyQt4 import *
-from PyQt4.QtGui import *
-from PyQt4.QtCore import *
-import browser
-import typeNode
+from __future__ import absolute_import
+from . import browser
+from . import typeNode
from Extensions.i18n import tr
from Editeur import Objecttreeitem
from Extensions.i18n import tr
from Editeur import Objecttreeitem
+import six
class Node(browser.JDCNode,typeNode.PopUpMenuNodePartiel):
class Node(browser.JDCNode,typeNode.PopUpMenuNodePartiel):
- def getPanel(self):
- """
- """
- from monMCFactPanel import MonMCFactPanel
- return MonMCFactPanel(self,parent=self.editor)
def getPanelGroupe(self,parentQt,commande):
maDefinition=self.item.get_definition()
def getPanelGroupe(self,parentQt,commande):
maDefinition=self.item.get_definition()
@@
-43,11
+37,12
@@
class Node(browser.JDCNode,typeNode.PopUpMenuNodePartiel):
maCommande=commande
if hasattr(parentQt,'niveau'): self.niveau=parentQt.niveau+1
else : self.niveau=1
maCommande=commande
if hasattr(parentQt,'niveau'): self.niveau=parentQt.niveau+1
else : self.niveau=1
+ #if hasattr(self,'plie') :print self.item.nom, self.plie
if hasattr(self,'plie') and self.plie==True :
if hasattr(self,'plie') and self.plie==True :
- from monWidgetFactPlie import MonWidgetFactPlie
+ from
.
monWidgetFactPlie import MonWidgetFactPlie
widget=MonWidgetFactPlie(self,self.editor,parentQt,maDefinition,monObjet,self.niveau,maCommande)
else:
widget=MonWidgetFactPlie(self,self.editor,parentQt,maDefinition,monObjet,self.niveau,maCommande)
else:
- from monWidgetFact import MonWidgetFact
+ from
.
monWidgetFact import MonWidgetFact
widget=MonWidgetFact(self,self.editor,parentQt,maDefinition,monObjet,self.niveau,maCommande)
return widget
widget=MonWidgetFact(self,self.editor,parentQt,maDefinition,monObjet,self.niveau,maCommande)
return widget
@@
-72,6
+67,7
@@
class FACTTreeItem(Objecttreeitem.ObjectTreeItem):
- la couleur du texte
"""
# None --> fonte et couleur par defaut
- la couleur du texte
"""
# None --> fonte et couleur par defaut
+ if not(hasattr(self.object,'getlabeltext')): return self.object.nom,None,None
return self.object.getlabeltext(),None,None
def isvalid(self):
return self.object.getlabeltext(),None,None
def isvalid(self):
@@
-88,9
+84,10
@@
class FACTTreeItem(Objecttreeitem.ObjectTreeItem):
else:
return "ast-yel-los"
else:
return "ast-yel-los"
- def keys(self):
- keys=self.object.mc_dict.keys()
- return keys
+ #PNPN ????
+ #def keys(self):
+ # keys=self.object.mc_dict
+ # return keys
def GetSubList(self):
"""
def GetSubList(self):
"""
@@
-133,16
+130,16
@@
class FACTTreeItem(Objecttreeitem.ObjectTreeItem):
"""
itemobject=item.getObject()
if itemobject.isoblig() :
"""
itemobject=item.getObject()
if itemobject.isoblig() :
- self.editor.affiche_infos(tr('Impossible de supprimer un mot-cle obligatoire '),Qt.red)
- return
0
+
#
self.editor.affiche_infos(tr('Impossible de supprimer un mot-cle obligatoire '),Qt.red)
+ return
(0, tr('Impossible de supprimer un mot-cle obligatoire '))
if self.object.suppentite(itemobject):
if self.object.suppentite(itemobject):
- message = tr("Mot-cle %s supprime")+
unicod
e(itemobject.nom)
- self.editor.affiche_commentaire(message)
- return
1
+ message = tr("Mot-cle %s supprime")+
six.text_typ
e(itemobject.nom)
+
#
self.editor.affiche_commentaire(message)
+ return
(1, message)
else:
else:
- self.editor.affiche_infos(tr('Pb interne : impossible de supprimer ce mot-cle'),Qt.red)
- return
0
+
#
self.editor.affiche_infos(tr('Pb interne : impossible de supprimer ce mot-cle'),Qt.red)
+ return
(0,tr('Pb interne : impossible de supprimer ce mot-cle'))
import Accas
objet = Accas.MCFACT
import Accas
objet = Accas.MCFACT