From: Pascale Noyret Date: Tue, 25 Nov 2008 16:08:24 +0000 (+0000) Subject: *** empty log message *** X-Git-Tag: V0_a1_SEPQT4~64 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=59433e70ce90fd74fd8601af61b213e60665d4ce;p=tools%2Feficas.git *** empty log message *** --- diff --git a/InterfaceQT4/browser.py b/InterfaceQT4/browser.py index 8d2c165f..dc260e10 100644 --- a/InterfaceQT4/browser.py +++ b/InterfaceQT4/browser.py @@ -29,7 +29,9 @@ from PyQt4.QtCore import * class JDCTree( QTreeWidget ): def __init__( self, jdc_item, QWParent): QListView.__init__( self, QWParent ) + print QWParent.__class__ + print "je suis dans JDCTree et voilĂ  ", jdc_item self.item = jdc_item self.tree = self self.editor = QWParent diff --git a/InterfaceQT4/editor.py b/InterfaceQT4/editor.py index a313fdfb..de0c31dd 100644 --- a/InterfaceQT4/editor.py +++ b/InterfaceQT4/editor.py @@ -45,7 +45,7 @@ class JDCEditor(QSplitter): Editeur de jdc """ - def __init__ (self,fichier = None, jdc = None, QWParent=None, units = None, include=0 ,appli=None, vm=None): + def __init__ (self,appli,fichier = None, jdc = None, QWParent=None, units = None, include=0 , vm=None): #----------------------------------------------------------------------------------------------------------# #print "fichier", fichier,"jdc",jdc,"units",units,"include",include @@ -233,6 +233,7 @@ class JDCEditor(QSplitter): self.lastModified = 1 return jdc + #-----------------------# def get_source(self,file): #-----------------------# @@ -422,6 +423,20 @@ class JDCEditor(QSplitter): def getFileName(self): #---------------------# return self.fichier + + #---------------------------# + def get_file_variable(self) : + #---------------------------# + titre = "Choix d'un fichier XML" + texte = "Le fichier contient une commande INCLUDE\n" + texte = texte+'Donnez le nom du fichier XML qui contient la description des variables' + QMessageBox.information( self, titre,texte) + + fichier = QFileDialog.getOpenFileName(self.appliEficas, + self.appliEficas.trUtf8('Ouvrir Fichier'), + self.appliEficas.CONFIGURATION.savedir, + self.appliEficas.trUtf8('Wrapper Files (*.xml);;''All Files (*)')) + return fichier #----------------------------------# def writeFile(self, fn, txt = None): @@ -528,12 +543,12 @@ class JDCEditor(QSplitter): self.tree.racine.item.getObject().nom=os.path.basename(newName) self.tree.racine.update_node_label() - #try : - if 1 : + try : + #if 1 : fileXML = fn[:fn.rfind(".")] + '.xml' self.generator.writeOpenturnsXML( fileXML ) - #except : - else : + except : + #else : pass #PNPNPNPN A ecrire @@ -626,7 +641,7 @@ if __name__=='__main__': # code=options.code # app = QApplication(sys.argv) - mw = JDCEditor('azAster.comm') + mw = JDCEditor(None,'azAster.comm') app.setMainWidget(mw) app.connect(app, SIGNAL("lastWindowClosed()"), app, SLOT("quit()")) mw.show() diff --git a/InterfaceQT4/monIncludePanel.py b/InterfaceQT4/monIncludePanel.py index 921d7014..934908b2 100644 --- a/InterfaceQT4/monIncludePanel.py +++ b/InterfaceQT4/monIncludePanel.py @@ -68,14 +68,19 @@ class MonIncludePanel(DInc,QTPanelTBW1,QTPanelTBW2,QTPanelTBW3): self.node=node if not hasattr(self.node.item.object,'fichier_unite'): - self.pageBad() +#PNPN pour OT + # self.pageBad() + self.pageOk() else: self.pageOk() def pageOk(self): self.TWChoix.removeTab(3) self.TWChoix.setCurrentIndex(2) + self.node.item.object.fichier_ini="/home/noyret/Eficas_Openturns/v1.comm" self.LENomFichier.setText(self.node.item.object.fichier_ini) + print self.node.item.__class__ + print self.node.item.object.__class__ def pageBad(self) : diff --git a/InterfaceQT4/qtEficas.py b/InterfaceQT4/qtEficas.py index 4fb867e2..54921093 100644 --- a/InterfaceQT4/qtEficas.py +++ b/InterfaceQT4/qtEficas.py @@ -24,6 +24,7 @@ class Appli(Ui_Eficas,QMainWindow): self.ihm="QT" self.code=code self.salome=salome + self.format_fichier="python" #par defaut self.top = self #(pour CONFIGURATION) import prefs @@ -48,14 +49,14 @@ class Appli(Ui_Eficas,QMainWindow): #if self.salome : # from Editeur import session # self.ouvreFichiers() - self.ouvreFichiers() + self.recent = QStringList() self.ficPatrons={} self.initPatrons() - - self.recent = QStringList() self.ficRecents={} self.initRecents() + + self.ouvreFichiers() def OPENTURNS(self) : self.MenuBar.removeItem(5) diff --git a/InterfaceQT4/viewManager.py b/InterfaceQT4/viewManager.py index 54a92acb..ae835182 100644 --- a/InterfaceQT4/viewManager.py +++ b/InterfaceQT4/viewManager.py @@ -175,8 +175,8 @@ class MyTabview: double=editor else : from editor import JDCEditor - editor = JDCEditor(fichier, jdc, self.myQtab,units=units,appli=self.appliEficas,vm = self,include=include) - if double != None : + editor = JDCEditor(self.appliEficas,fichier, jdc, self.myQtab,units=units,vm = self,include=include) + if double != None : self.doubles[editor]=double if editor.jdc: # le fichier est bien un jdc self.editors.append(editor) diff --git a/Openturns_Study/OpenTURNS_Cata_Study_V1.py b/Openturns_Study/OpenTURNS_Cata_Study_V1.py index 8c80d986..c306319f 100644 --- a/Openturns_Study/OpenTURNS_Cata_Study_V1.py +++ b/Openturns_Study/OpenTURNS_Cata_Study_V1.py @@ -8,6 +8,7 @@ import Accas from Accas import * class loi ( ASSD ) : pass +class variable ( ASSD ) : pass #CONTEXT.debug = 1 @@ -25,10 +26,6 @@ JdC = JDC_CATA ( code = 'OPENTURNS_STUDY', - - - - #================================ # 1. Definition des LOIS #================================ @@ -677,9 +674,6 @@ CRITERIA = PROC ( nom = "CRITERIA", - - - MinMax = BLOC ( condition = " Type in ( 'Min/Max', ) ", Method = SIMP ( statut = "o", @@ -1410,8 +1404,34 @@ CRITERIA = PROC ( nom = "CRITERIA", ) # Fin PROC CRITERIA - - - - +#=============================== +# 5. Definition des parametres +#=============================== +VARI = OPER ( nom = "VARI", + sd_prod = variable, + op = None, + fr = "Definitions des lois marginales utilisees par les variables d'entree", + type=SIMP(statut='f',defaut="IN",into=("IN","OUT"), typ = "TXM",) + ) + +AAA=PROC(nom="AAA", + op=None, + fr="Essai", + ang = "Test", + + MALOI = SIMP(statut='o',typ=(loi,),), + MAVARIABLE = SIMP(statut='o',typ=(variable,),), +) ; + + + +import ops +FICXML=MACRO(nom="FICXML", + op=None, + UIinfo={"groupes":("Gestion du travail",)}, + fr="DĂ©branchement vers un fichier de commandes secondaires", + sd_prod=ops.INCLUDE,op_init=ops.INCLUDE_context,fichier_ini=1, + #UNITE = SIMP(statut='o',typ='I'), + FICHIER = SIMP(statut='f',typ='TXM',), +); diff --git a/Openturns_Study/configuration.py b/Openturns_Study/configuration.py index 8eed5f04..0a3673b8 100644 --- a/Openturns_Study/configuration.py +++ b/Openturns_Study/configuration.py @@ -54,7 +54,7 @@ class CONFIG: if self.appli: self.parent=appli.top - self.appli.format_fichier="openturns_wrapper" + self.appli.format_fichier="openturns_study" else: self.parent=None