From: PASCALE NOYRET Date: Tue, 1 Mar 2022 16:21:11 +0000 (+0100) Subject: et la plomberie autour du generator dico X-Git-Tag: merge_uncertainty_odysee_1210~118 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=e451a3eb0de7af3a31d1146a38c2b74960c52570;p=tools%2Feficas.git et la plomberie autour du generator dico --- diff --git a/InterfaceQT4/editorSsIhm.py b/InterfaceQT4/editorSsIhm.py index db3f87e3..55530f30 100755 --- a/InterfaceQT4/editorSsIhm.py +++ b/InterfaceQT4/editorSsIhm.py @@ -338,11 +338,15 @@ class JDCEditorSsIhm : #-----------------------# if 'dico' in generator.plugins: self.generator=generator.plugins['dico']() - #print (self.generator) - jdc_formate=self.generator.gener(self.jdc) - #print (jdc_formate) - dico=self.generator.Dico - #print (dico) + texte_jdc=self.generator.gener(self.jdc) + return texte_jdc + + #-----------------------# + def generDicoPython(self): + #-----------------------# + if 'dico' in generator.plugins: + self.generator=generator.plugins['dico']() + dico=self.generator.generDico(self.jdc) return dico #-----------------------# diff --git a/InterfaceQT4/eficas_go.py b/InterfaceQT4/eficas_go.py index 62402fdd..bd70372e 100755 --- a/InterfaceQT4/eficas_go.py +++ b/InterfaceQT4/eficas_go.py @@ -151,6 +151,7 @@ def genereStructure(code=None): f.close() def validateFile(code,fichierCata,fichier): +#------------------------------ from Editeur import session options=session.parse(['',]) from .qtEficasSsIhm import AppliSsIhm @@ -159,6 +160,28 @@ def validateFile(code,fichierCata,fichier): monEditeur=JDCEditorSsIhm(monEficasSsIhm,fichier) return monEditeur.jdc.isValid() +def getObjectPython(code,fichierCata,fichier): +#------------------------------ + from Editeur import session + options=session.parse(['',]) + from Noyau.N_OBJECT import activeSurcharge + activeSurcharge() + from .qtEficasSsIhm import AppliSsIhm + from .editorSsIhm import JDCEditorSsIhm + monEficasSsIhm=AppliSsIhm(code=code, salome=0, fichierCata=fichierCata) + monEditeur=JDCEditorSsIhm(monEficasSsIhm,fichier) + return monEditeur.jdc + +def getDicoPython(code,fichierCata,fichier): +#------------------------------ + from Editeur import session + options=session.parse(['',]) + from .qtEficasSsIhm import AppliSsIhm + from .editorSsIhm import JDCEditorSsIhm + monEficasSsIhm=AppliSsIhm(code=code, salome=0, fichierCata=fichierCata) + monEditeur=JDCEditorSsIhm(monEficasSsIhm,fichier) + return monEditeur.generDicoPython() + def validateDataSet(code=None): #------------------------------ from Editeur import session