From: pascale.noyret Date: Wed, 21 Jul 2021 09:55:02 +0000 (+0200) Subject: Telemac integration 2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=b9d2a0bfcbb170cae753c34012084a3bebd54ebb;p=tools%2Feficas.git Telemac integration 2 --- diff --git a/InterfaceQT4/editorSsIhm.py b/InterfaceQT4/editorSsIhm.py index 419092b9..26433aa8 100755 --- a/InterfaceQT4/editorSsIhm.py +++ b/InterfaceQT4/editorSsIhm.py @@ -601,7 +601,9 @@ class JDCEditorSsIhm : self.fichierOut = fichier - if self.appliEficas.maConfiguration.fichierXML !=None : self.jdc.analyseXML() + #if hasattr(self.appliEficas.maConfiguration, "fichierXML") and \ + # self.appliEficas.maConfiguration.fichierXML !=None : + # self.jdc.analyseXML() if not (self.writeFile(fichier,formatLigne=formatLigne)): return (0, None) if self.jdc.cata.modeleMetier and self.jdc.isValid(): if self.generator != self.XMLgenerator : diff --git a/InterfaceQT4/eficas_go.py b/InterfaceQT4/eficas_go.py index f233f328..5d777f16 100755 --- a/InterfaceQT4/eficas_go.py +++ b/InterfaceQT4/eficas_go.py @@ -65,7 +65,7 @@ def lanceEficas(code=None, multi=False, langue='en', labelCode=None): res=app.exec_() sys.exit(res) -def getEficasSsIhm(code=None, multi=False, langue='en', labelCode=None,forceXML=False, genereXSD=False, fichierCata=None): +def getEficasSsIhm(code=None, multi=False, langue='en', ssCode=None, labelCode=None,forceXML=False, genereXSD=False, fichierCata=None): #------------------------------------------------------------------------------------------------------------------------- """ Lance l'appli EFICAS sans Ihm @@ -76,7 +76,7 @@ def getEficasSsIhm(code=None, multi=False, langue='en', labelCode=None,forceXML= if forceXML : options.withXSD=True from InterfaceQT4.qtEficasSsIhm import AppliSsIhm - Eficas=AppliSsIhm(code=code, salome=0, multi=multi, langue=langue, labelCode=labelCode, genereXSD=genereXSD, fichierCata=fichierCata) + Eficas=AppliSsIhm(code=code, salome=0, multi=multi, langue=langue, ssCode=ssCode, labelCode=labelCode, genereXSD=genereXSD, fichierCata=fichierCata) return Eficas @@ -117,6 +117,7 @@ def genereXML(code=None): print ('comm file is needed') return + print (options.fichierCata) monEficasSsIhm = getEficasSsIhm(code=options.code, forceXML=True) from .editorSsIhm import JDCEditorSsIhm diff --git a/InterfaceQT4/monWidgetSimpTuple3.py b/InterfaceQT4/monWidgetSimpTuple3.py deleted file mode 100644 index 23d4640e..00000000 --- a/InterfaceQT4/monWidgetSimpTuple3.py +++ /dev/null @@ -1,52 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright (C) 2007-2021 EDF R&D -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -# -# Modules Python -from __future__ import absolute_import -import types,os - -# Modules Eficas -#from PyQt4.QtGui import * -#from PyQt4.QtCore import * -from Extensions.i18n import tr - -from .feuille import Feuille -from .monWidgetSimpTuple import MonWidgetSimpTuple -from desWidgetTuple3 import Ui_WidgetTuple3 - - -class MonWidgetSimpTuple3 (Ui_WidgetTuple3,MonWidgetSimpTuple): - - def __init__(self,node,monSimpDef,nom,objSimp,parentQt,commande): - self.nbValeurs=3 - MonWidgetSimpTuple.__init__(self,node,monSimpDef,nom,objSimp,parentQt,commande) - if self.objSimp.isImmuable() : - self.lineEditVal1.setDisabled(True) - self.lineEditVal2.setDisabled(True) - self.lineEditVal3.setDisabled(True) - self.lineEditVal1.setStyleSheet("background:rgb(244,244,244);\n" "border:0px;\n") - self.lineEditVal2.setStyleSheet("background:rgb(244,244,244);\n" "border:0px;\n") - self.lineEditVal3.setStyleSheet("background:rgb(244,244,244);\n" "border:0px;\n") - self.lineEditVal1.setToolTip(tr("Valeur non modifiable")) - self.lineEditVal2.setToolTip(tr("Valeur non modifiable")) - self.lineEditVal3.setToolTip(tr("Valeur non modifiable")) - else : - self.maCommande.listeAffichageWidget.append(self.lineEditVal1) - #self.maCommande.listeAffichageWidget.append(self.lineEditVal2) - #self.maCommande.listeAffichageWidget.append(self.lineEditVal3) diff --git a/InterfaceQT4/qtEficasSsIhm.py b/InterfaceQT4/qtEficasSsIhm.py index 16ef61c5..7f78ca41 100755 --- a/InterfaceQT4/qtEficasSsIhm.py +++ b/InterfaceQT4/qtEficasSsIhm.py @@ -89,7 +89,7 @@ class AppliSsIhm: else : self.langue="ang" if self.multi == False : - self.definitCode(code,None) + self.definitCode(code,ssCode) if code==None: return self.suiteTelemac=False diff --git a/InterfaceQT4/readercata.py b/InterfaceQT4/readercata.py index fad67e8b..37ff95fd 100644 --- a/InterfaceQT4/readercata.py +++ b/InterfaceQT4/readercata.py @@ -101,13 +101,13 @@ class ReaderCataCommun(object): if isinstance(catalogue, CatalogDescription): listeTousLesCatas.append(catalogue) elif isinstance(catalogue, tuple) : listeTousLesCatas.append(CatalogDescription.createFromTuple(catalogue)) else: print(("Catalog description cannot be interpreted: ", catalogue)) - + if self.labelCode is None: listeCataPossibles = listeTousLesCatas else : for catalogue in listeTousLesCatas: if catalogue.code == self.code and catalogue.ssCode == self.ssCode: listeCataPossibles.append(catalogue) - + if len(listeCataPossibles)==0: try : QMessageBox.critical(self.QWParent, tr("Import du catalogue"), @@ -121,7 +121,7 @@ class ReaderCataCommun(object): if self.labelCode is not None: # La version a ete fixee for cata in listeCataPossibles: - if self.labelCode == cata.identifier: + if self.labelCode == cata.labelCode: self.fichierCata = cata.fichierCata self.labelCode = cata.labelCode self.appliEficas.formatFichierOut = cata.formatFichierOut @@ -238,7 +238,13 @@ class ReaderCata (ReaderCataCommun): dans le repertoire Cata """ # import du catalogue - self.choisitCata() + print ('jjjjjjjjjjjjjjjjjjj', self.fichierCata) + if self.fichierCata == None : self.choisitCata() + else : + print ('uuuuuuuuu') + print ( self.fichierCata ) + print ( self.appliEficas.formatFichierIn ) + print ( self.appliEficas.formatFichierOut ) self.cata = self.importCata(self.fichierCata) if self.code == 'NonConnu' : self.code = self.cata.JdC.code