From e451a3eb0de7af3a31d1146a38c2b74960c52570 Mon Sep 17 00:00:00 2001 From: PASCALE NOYRET Date: Tue, 1 Mar 2022 17:21:11 +0100 Subject: [PATCH] et la plomberie autour du generator dico --- InterfaceQT4/editorSsIhm.py | 14 +++++++++----- InterfaceQT4/eficas_go.py | 23 +++++++++++++++++++++++ 2 files changed, 32 insertions(+), 5 deletions(-) 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 -- 2.39.2