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 :
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
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
print ('comm file is needed')
return
+ print (options.fichierCata)
monEficasSsIhm = getEficasSsIhm(code=options.code, forceXML=True)
from .editorSsIhm import JDCEditorSsIhm
+++ /dev/null
-# -*- 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)
else : self.langue="ang"
if self.multi == False :
- self.definitCode(code,None)
+ self.definitCode(code,ssCode)
if code==None: return
self.suiteTelemac=False
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"),
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
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