From: pascale.noyret Date: Mon, 12 Mar 2018 13:21:30 +0000 (+0100) Subject: pour ajout isJdcValid dans le handler X-Git-Tag: V8_5_0rc2a2~22^2~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=d1d1201eb59da50b4779f330ee0f4750058cac89;p=modules%2Feficas.git pour ajout isJdcValid dans le handler --- diff --git a/InterfaceQT4/editorSsIhm.py b/InterfaceQT4/editorSsIhm.py index 264cc147..3b15c280 100755 --- a/InterfaceQT4/editorSsIhm.py +++ b/InterfaceQT4/editorSsIhm.py @@ -362,6 +362,13 @@ class JDCEditorSsIhm : strRapport = six.text_type( self.jdc.report() ) self._viewText(strRapport, "JDC_RAPPORT") + #-----------------------# + def getJdcRapport(self): + #-----------------------# + # on ajoute les regles + strRapport = six.text_type( self.jdc.report() ) + return strRapport + #---------------------# def getFileName(self): #---------------------# diff --git a/InterfaceQT4/monWidgetPlusieursPlie.py b/InterfaceQT4/monWidgetPlusieursPlie.py index 7d653299..47231a08 100644 --- a/InterfaceQT4/monWidgetPlusieursPlie.py +++ b/InterfaceQT4/monWidgetPlusieursPlie.py @@ -74,8 +74,8 @@ class MonWidgetPlusieursPlie (Ui_WidgetPlusieursPlie,Feuille): def valeurEntree(self): valeurTexte=self.lineEditVal.text() - print (valeurTexte[0]) - print (valeurTexte[-1]) + #print (valeurTexte[0]) + #print (valeurTexte[-1]) if valeurTexte[0] == '[' or valeurTexte[0] == '(' : valeurTexte = valeurTexte[1:] if valeurTexte[-1] == ']' or valeurTexte[-1] == ')' : valeurTexte = valeurTexte[:-1] print (valeurTexte) diff --git a/InterfaceQT4/readercata.py b/InterfaceQT4/readercata.py index 4984dea6..ee40b47e 100644 --- a/InterfaceQT4/readercata.py +++ b/InterfaceQT4/readercata.py @@ -209,9 +209,11 @@ class ReaderCata (ReaderCataCommun): self.Classement_Commandes_Ds_Arbre=self.cata.Classement_Commandes_Ds_Arbre else : self.Classement_Commandes_Ds_Arbre=() if hasattr(self.cata,'enum'): - _temp= __import__(self.cata.enum,globals(), locals(), ['DicoEnumCasFrToEnumCasEn', 'TelemacdicoEn'], 0) - self.DicoEnumCasFrToEnumCasEn = _temp.DicoEnumCasFrToEnumCasEn - self.TelemacdicoEn = _temp.TelemacdicoEn + try : + _temp= __import__(self.cata.enum,globals(), locals(), ['DicoEnumCasFrToEnumCasEn', 'TelemacdicoEn'], 0) + self.DicoEnumCasFrToEnumCasEn = _temp.DicoEnumCasFrToEnumCasEn + self.TelemacdicoEn = _temp.TelemacdicoEn + except : pass #print self.cata.Ordre_Des_Commandes diff --git a/InterfaceQT4/viewManagerSsIhm.py b/InterfaceQT4/viewManagerSsIhm.py index 71c8bf56..c0d856d1 100644 --- a/InterfaceQT4/viewManagerSsIhm.py +++ b/InterfaceQT4/viewManagerSsIhm.py @@ -51,14 +51,23 @@ class JdcSsIhmHandler(object): # --------------------- self.viewManagerSsIhm.getFileName(self) - def jdcRapport(self) : + def viewJdcRapport(self) : # --------------------- self.viewManagerSsIhm.handleViewJdcRapport(self) + def getJdcRapport(self) : +# --------------------- + return self.viewManagerSsIhm.handleGetJdcRapport(self) + def getDicoPython(self) : # ------------------------- return self.viewManagerSsIhm.generDico(self) + def isJdcValid(self) : +# ------------------------- + return self.viewManagerSsIhm.isJdcValid(self) + + #-------------------------------- class MyViewManagerSsIhm(object): @@ -155,6 +164,14 @@ class MyViewManagerSsIhm(object): return self.dictEditors[handler].viewJdcRapport() +# --------------------------------------------- + def handleGetJdcRapport(self,handler): +# --------------------------------------------- + if not (handler in self.dictEditors) : + print ('editor non trouve') + return + return self.dictEditors[handler].getJdcRapport() + # --------------------------------------------- def handleViewJdcRapport(self,handler): # --------------------------------------------- @@ -175,6 +192,17 @@ class MyViewManagerSsIhm(object): return self.dictEditors[handler].generDico() +# --------------------------------------------- + def isJdcValid(self,handler): +# --------------------------------------------- + print (handler) + if not (handler in self.dictEditors) : + print ('editor non trouve') + return + return self.dictEditors[handler].jdc.isValid() + + + # def handleClose(self,doitSauverRecent = 1,texte=tr('&Quitter')): # if doitSauverRecent : self.appliEficas.sauveRecents()