From cc58b73faa45c7f415972e6fe7ef9897a4683cba Mon Sep 17 00:00:00 2001 From: "pascale.noyret" Date: Wed, 31 Jan 2018 15:36:59 +0100 Subject: [PATCH] debut demandes MT et readerXML --- {MED => CataTests}/CataAZ.py | 0 .../Elementary_Lists_52996_Cata.py | 0 .../Elementary_Lists_53000_Cata.py | 0 .../Elementary_Lists_53013_Cata.py | 0 .../Elementary_Lists_53036_Cata.py | 0 {MED => CataTests}/Elementary_Lists_Cata.py | 0 {MED => CataTests}/Global_Condition_Cata.py | 0 .../Many_Concepts_52983_Cata.py | 0 .../Many_Concepts_52988_Cata.py | 0 .../Many_Concepts_52989_Cata.py | 0 .../Many_Concepts_52992_Cata.py | 0 {MED => CataTests}/Matrix_Cata.py | 0 {MED => CataTests}/Nested_Cond_52945_Cata.py | 0 {MED => CataTests}/Nested_Cond_52946_Cata.py | 0 {MED => CataTests}/Nested_Cond_52947_Cata.py | 0 {MED => CataTests}/Nested_Cond_52948_Cata.py | 0 {MED => CataTests}/Nested_Cond_52949_Cata.py | 0 {MED => CataTests}/Nested_Cond_52952_Cata.py | 0 .../Separate_Blocks_52958_Cata.py | 0 .../Separate_Blocks_52963_Cata.py | 0 .../Separate_Blocks_52966_Cata.py | 0 .../Separate_Blocks_52972_Cata.py | 0 .../Separate_Blocks_52975_Cata.py | 0 {MED => CataTests}/a | 0 {MED => CataTests}/cata_diapo.py | 0 {MED => CataTests}/cata_med.py | 0 {MED => CataTests}/configuration_MED.py | 0 {MED => CataTests}/images/essaiAster.png | Bin {MED => CataTests}/items_integer_space.txt | 0 {MED => CataTests}/monCode_qtEficas.py | 0 {MED => CataTests}/prefs.py | 0 {MED => CataTests}/prefs_MED.py | 0 {MED => CataTests}/prefs_monCode.py | 0 {MED => CataTests}/properties.py | 0 {MED => CataTests}/qtEficas_AZ.py | 0 {MED => CataTests}/qtEficas_Med.py | 0 InterfaceQT4/browser.py | 75 +- InterfaceQT4/compomacro.py | 6 +- InterfaceQT4/compomclist.py | 10 +- InterfaceQT4/compooper.py | 18 +- InterfaceQT4/configuration.py | 1 + InterfaceQT4/editor.py | 1 - InterfaceQT4/editorSsIhm.py | 9 +- InterfaceQT4/groupe.py | 26 +- InterfaceQT4/monBoutonValide.py | 2 +- InterfaceQT4/monWidgetBloc.py | 2 +- InterfaceQT4/monWidgetCommande.py | 4 - InterfaceQT4/monWidgetFact.py | 1 + InterfaceQT4/monWidgetFactPlie.py | 1 + InterfaceQT4/monWidgetNiveauFact.py | 357 +++------ InterfaceQT4/monWidgetOptionnel.py | 5 + InterfaceQT4/politiquesValidation.py | 2 +- InterfaceQT4/qtEficas.py | 6 +- InterfaceQT4/readercata.py | 5 +- InterfaceQT4/readercataXML.py | 77 ++ InterfaceQT4/typeNode.py | 14 - MED/typescript | 34 - MT/MT_Cata_V2017.py | 9 +- MT/mesScripts_MT.py | 24 + MT/prefs_MT.py | 2 +- Noyau/N_BLOC.py | 1 + Noyau/N_FACT.py | 4 +- Noyau/N_JDC_CATA.py | 1 + Noyau/N_MACRO.py | 3 +- Noyau/N_OPER.py | 3 +- Noyau/N_PROC.py | 25 +- Noyau/N_SIMP.py | 10 +- Telemac/prefs_TELEMAC.py | 1 + Traducteur/movemocle.py | 18 +- Traducteur/traduitV11V12.py | 6 +- UiQT5/CMakeLists.txt | 4 +- UiQT5/desWidgetCommande.ui | 2 +- UiQT5/desWidgetFactPlie.ui | 3 +- UiQT5/desWidgetNiveauFact.ui | 649 ++++++++++++++++ Validation/V_MCCOMPO.py | 4 +- convert/parseur_python.py | 6 +- generator/oldCodes/generator_ini.py | 8 +- monCode/Catalogues/Cata_MED_FAM v2.xml | 130 ++++ monCode/Catalogues/Cata_MED_FAM.xml | 35 + monCode/Global_Condition_Cata.py | 53 -- monCode/Many_Concepts_52992_Cata.py | 76 -- monCode/Matrix_Cata.py | 87 --- .../Model Efficas (1.1) v6 ext.xsd | 58 ++ .../ModeleEficas/Model Efficas (1.1) v6.xsd | 732 ++++++++++++++++++ monCode/configuration_MED.py | 52 ++ monCode/prefs.py | 22 + monCode/prefs_MED.py | 42 + monCode/prefs_monCode.py | 69 -- monCode/qtEficas_Med.py | 36 + 89 files changed, 2114 insertions(+), 717 deletions(-) rename {MED => CataTests}/CataAZ.py (100%) rename {MED => CataTests}/Elementary_Lists_52996_Cata.py (100%) rename {MED => CataTests}/Elementary_Lists_53000_Cata.py (100%) rename {MED => CataTests}/Elementary_Lists_53013_Cata.py (100%) rename {MED => CataTests}/Elementary_Lists_53036_Cata.py (100%) rename {MED => CataTests}/Elementary_Lists_Cata.py (100%) rename {MED => CataTests}/Global_Condition_Cata.py (100%) rename {MED => CataTests}/Many_Concepts_52983_Cata.py (100%) rename {MED => CataTests}/Many_Concepts_52988_Cata.py (100%) rename {MED => CataTests}/Many_Concepts_52989_Cata.py (100%) rename {MED => CataTests}/Many_Concepts_52992_Cata.py (100%) rename {MED => CataTests}/Matrix_Cata.py (100%) rename {MED => CataTests}/Nested_Cond_52945_Cata.py (100%) rename {MED => CataTests}/Nested_Cond_52946_Cata.py (100%) rename {MED => CataTests}/Nested_Cond_52947_Cata.py (100%) rename {MED => CataTests}/Nested_Cond_52948_Cata.py (100%) rename {MED => CataTests}/Nested_Cond_52949_Cata.py (100%) rename {MED => CataTests}/Nested_Cond_52952_Cata.py (100%) rename {MED => CataTests}/Separate_Blocks_52958_Cata.py (100%) rename {MED => CataTests}/Separate_Blocks_52963_Cata.py (100%) rename {MED => CataTests}/Separate_Blocks_52966_Cata.py (100%) rename {MED => CataTests}/Separate_Blocks_52972_Cata.py (100%) rename {MED => CataTests}/Separate_Blocks_52975_Cata.py (100%) rename {MED => CataTests}/a (100%) rename {MED => CataTests}/cata_diapo.py (100%) rename {MED => CataTests}/cata_med.py (100%) rename {MED => CataTests}/configuration_MED.py (100%) rename {MED => CataTests}/images/essaiAster.png (100%) rename {MED => CataTests}/items_integer_space.txt (100%) rename {MED => CataTests}/monCode_qtEficas.py (100%) rename {MED => CataTests}/prefs.py (100%) rename {MED => CataTests}/prefs_MED.py (100%) rename {MED => CataTests}/prefs_monCode.py (100%) rename {MED => CataTests}/properties.py (100%) rename {MED => CataTests}/qtEficas_AZ.py (100%) rename {MED => CataTests}/qtEficas_Med.py (100%) create mode 100644 InterfaceQT4/readercataXML.py delete mode 100644 MED/typescript create mode 100644 UiQT5/desWidgetNiveauFact.ui create mode 100755 monCode/Catalogues/Cata_MED_FAM v2.xml create mode 100755 monCode/Catalogues/Cata_MED_FAM.xml delete mode 100755 monCode/Global_Condition_Cata.py delete mode 100644 monCode/Many_Concepts_52992_Cata.py delete mode 100644 monCode/Matrix_Cata.py create mode 100755 monCode/ModeleEficas/Model Efficas (1.1) v6 ext.xsd create mode 100755 monCode/ModeleEficas/Model Efficas (1.1) v6.xsd create mode 100644 monCode/configuration_MED.py create mode 100644 monCode/prefs.py create mode 100644 monCode/prefs_MED.py delete mode 100644 monCode/prefs_monCode.py create mode 100755 monCode/qtEficas_Med.py diff --git a/MED/CataAZ.py b/CataTests/CataAZ.py similarity index 100% rename from MED/CataAZ.py rename to CataTests/CataAZ.py diff --git a/MED/Elementary_Lists_52996_Cata.py b/CataTests/Elementary_Lists_52996_Cata.py similarity index 100% rename from MED/Elementary_Lists_52996_Cata.py rename to CataTests/Elementary_Lists_52996_Cata.py diff --git a/MED/Elementary_Lists_53000_Cata.py b/CataTests/Elementary_Lists_53000_Cata.py similarity index 100% rename from MED/Elementary_Lists_53000_Cata.py rename to CataTests/Elementary_Lists_53000_Cata.py diff --git a/MED/Elementary_Lists_53013_Cata.py b/CataTests/Elementary_Lists_53013_Cata.py similarity index 100% rename from MED/Elementary_Lists_53013_Cata.py rename to CataTests/Elementary_Lists_53013_Cata.py diff --git a/MED/Elementary_Lists_53036_Cata.py b/CataTests/Elementary_Lists_53036_Cata.py similarity index 100% rename from MED/Elementary_Lists_53036_Cata.py rename to CataTests/Elementary_Lists_53036_Cata.py diff --git a/MED/Elementary_Lists_Cata.py b/CataTests/Elementary_Lists_Cata.py similarity index 100% rename from MED/Elementary_Lists_Cata.py rename to CataTests/Elementary_Lists_Cata.py diff --git a/MED/Global_Condition_Cata.py b/CataTests/Global_Condition_Cata.py similarity index 100% rename from MED/Global_Condition_Cata.py rename to CataTests/Global_Condition_Cata.py diff --git a/MED/Many_Concepts_52983_Cata.py b/CataTests/Many_Concepts_52983_Cata.py similarity index 100% rename from MED/Many_Concepts_52983_Cata.py rename to CataTests/Many_Concepts_52983_Cata.py diff --git a/MED/Many_Concepts_52988_Cata.py b/CataTests/Many_Concepts_52988_Cata.py similarity index 100% rename from MED/Many_Concepts_52988_Cata.py rename to CataTests/Many_Concepts_52988_Cata.py diff --git a/MED/Many_Concepts_52989_Cata.py b/CataTests/Many_Concepts_52989_Cata.py similarity index 100% rename from MED/Many_Concepts_52989_Cata.py rename to CataTests/Many_Concepts_52989_Cata.py diff --git a/MED/Many_Concepts_52992_Cata.py b/CataTests/Many_Concepts_52992_Cata.py similarity index 100% rename from MED/Many_Concepts_52992_Cata.py rename to CataTests/Many_Concepts_52992_Cata.py diff --git a/MED/Matrix_Cata.py b/CataTests/Matrix_Cata.py similarity index 100% rename from MED/Matrix_Cata.py rename to CataTests/Matrix_Cata.py diff --git a/MED/Nested_Cond_52945_Cata.py b/CataTests/Nested_Cond_52945_Cata.py similarity index 100% rename from MED/Nested_Cond_52945_Cata.py rename to CataTests/Nested_Cond_52945_Cata.py diff --git a/MED/Nested_Cond_52946_Cata.py b/CataTests/Nested_Cond_52946_Cata.py similarity index 100% rename from MED/Nested_Cond_52946_Cata.py rename to CataTests/Nested_Cond_52946_Cata.py diff --git a/MED/Nested_Cond_52947_Cata.py b/CataTests/Nested_Cond_52947_Cata.py similarity index 100% rename from MED/Nested_Cond_52947_Cata.py rename to CataTests/Nested_Cond_52947_Cata.py diff --git a/MED/Nested_Cond_52948_Cata.py b/CataTests/Nested_Cond_52948_Cata.py similarity index 100% rename from MED/Nested_Cond_52948_Cata.py rename to CataTests/Nested_Cond_52948_Cata.py diff --git a/MED/Nested_Cond_52949_Cata.py b/CataTests/Nested_Cond_52949_Cata.py similarity index 100% rename from MED/Nested_Cond_52949_Cata.py rename to CataTests/Nested_Cond_52949_Cata.py diff --git a/MED/Nested_Cond_52952_Cata.py b/CataTests/Nested_Cond_52952_Cata.py similarity index 100% rename from MED/Nested_Cond_52952_Cata.py rename to CataTests/Nested_Cond_52952_Cata.py diff --git a/MED/Separate_Blocks_52958_Cata.py b/CataTests/Separate_Blocks_52958_Cata.py similarity index 100% rename from MED/Separate_Blocks_52958_Cata.py rename to CataTests/Separate_Blocks_52958_Cata.py diff --git a/MED/Separate_Blocks_52963_Cata.py b/CataTests/Separate_Blocks_52963_Cata.py similarity index 100% rename from MED/Separate_Blocks_52963_Cata.py rename to CataTests/Separate_Blocks_52963_Cata.py diff --git a/MED/Separate_Blocks_52966_Cata.py b/CataTests/Separate_Blocks_52966_Cata.py similarity index 100% rename from MED/Separate_Blocks_52966_Cata.py rename to CataTests/Separate_Blocks_52966_Cata.py diff --git a/MED/Separate_Blocks_52972_Cata.py b/CataTests/Separate_Blocks_52972_Cata.py similarity index 100% rename from MED/Separate_Blocks_52972_Cata.py rename to CataTests/Separate_Blocks_52972_Cata.py diff --git a/MED/Separate_Blocks_52975_Cata.py b/CataTests/Separate_Blocks_52975_Cata.py similarity index 100% rename from MED/Separate_Blocks_52975_Cata.py rename to CataTests/Separate_Blocks_52975_Cata.py diff --git a/MED/a b/CataTests/a similarity index 100% rename from MED/a rename to CataTests/a diff --git a/MED/cata_diapo.py b/CataTests/cata_diapo.py similarity index 100% rename from MED/cata_diapo.py rename to CataTests/cata_diapo.py diff --git a/MED/cata_med.py b/CataTests/cata_med.py similarity index 100% rename from MED/cata_med.py rename to CataTests/cata_med.py diff --git a/MED/configuration_MED.py b/CataTests/configuration_MED.py similarity index 100% rename from MED/configuration_MED.py rename to CataTests/configuration_MED.py diff --git a/MED/images/essaiAster.png b/CataTests/images/essaiAster.png similarity index 100% rename from MED/images/essaiAster.png rename to CataTests/images/essaiAster.png diff --git a/MED/items_integer_space.txt b/CataTests/items_integer_space.txt similarity index 100% rename from MED/items_integer_space.txt rename to CataTests/items_integer_space.txt diff --git a/MED/monCode_qtEficas.py b/CataTests/monCode_qtEficas.py similarity index 100% rename from MED/monCode_qtEficas.py rename to CataTests/monCode_qtEficas.py diff --git a/MED/prefs.py b/CataTests/prefs.py similarity index 100% rename from MED/prefs.py rename to CataTests/prefs.py diff --git a/MED/prefs_MED.py b/CataTests/prefs_MED.py similarity index 100% rename from MED/prefs_MED.py rename to CataTests/prefs_MED.py diff --git a/MED/prefs_monCode.py b/CataTests/prefs_monCode.py similarity index 100% rename from MED/prefs_monCode.py rename to CataTests/prefs_monCode.py diff --git a/MED/properties.py b/CataTests/properties.py similarity index 100% rename from MED/properties.py rename to CataTests/properties.py diff --git a/MED/qtEficas_AZ.py b/CataTests/qtEficas_AZ.py similarity index 100% rename from MED/qtEficas_AZ.py rename to CataTests/qtEficas_AZ.py diff --git a/MED/qtEficas_Med.py b/CataTests/qtEficas_Med.py similarity index 100% rename from MED/qtEficas_Med.py rename to CataTests/qtEficas_Med.py diff --git a/InterfaceQT4/browser.py b/InterfaceQT4/browser.py index 82e75086..230bbffe 100644 --- a/InterfaceQT4/browser.py +++ b/InterfaceQT4/browser.py @@ -67,7 +67,7 @@ class JDCTree( QTreeWidget,GereRegles ): self.childrenComplete=[] self.racine=self.item.itemNode(self,self.item) - self.itemCourrant=None + self.itemCourant=None self.itemClicked.connect(self.handleOnItem) self.itemCollapsed.connect(self.handleCollapsedItem) @@ -107,6 +107,7 @@ class JDCTree( QTreeWidget,GereRegles ): """ #print "handleContextMenu" if item == None : return + self.itemCourant=item if item.existeMenu == 0 : return if item.menu == None: item.createPopUpMenu() @@ -119,6 +120,7 @@ class JDCTree( QTreeWidget,GereRegles ): def handleCollapsedItem(self,item): #print "dans CollapsedItem", self.inhibeExpand if self.inhibeExpand == True : return + self.itemCourant=item # On traite le cas de l item non selectionne itemParent=item while not (hasattr (itemParent,'getPanel')) : @@ -137,6 +139,7 @@ class JDCTree( QTreeWidget,GereRegles ): #import traceback #traceback.print_stack() if self.inhibeExpand == True : return + self.itemCourant=item self.inhibeExpand = True itemParent=item while not (hasattr (itemParent,'getPanel')) : @@ -151,11 +154,11 @@ class JDCTree( QTreeWidget,GereRegles ): def handleOnItem(self,item,int): - #print "je passe dans handleOnItem pour ",self, item.item.nom, item, item.item + #print ("je passe dans handleOnItem pour ",self, item.item.nom, item, item.item, item.item.getLabelText()) from InterfaceQT4 import composimp self.inhibeExpand = True - self.itemCourrant=item + self.itemCourant=item itemParent=item while not (hasattr (itemParent,'getPanel')) : @@ -163,11 +166,8 @@ class JDCTree( QTreeWidget,GereRegles ): itemParent=itemParent.treeParent if itemParent.fenetre != self.editor.fenetreCentraleAffichee : - estUneFeuille=(isinstance(item,composimp.Node)) # il faut afficher le parent - #print "estUneFeuille", estUneFeuille - #print "afficheCommandesPliees", self.editor.afficheCommandesPliees if estUneFeuille : itemParent.affichePanneau() elif self.editor.afficheCommandesPliees : itemParent.plieToutEtReafficheSaufItem(item) else : itemParent.affichePanneau() @@ -226,8 +226,12 @@ class JDCNode(QTreeWidgetItem,GereRegles): else: name = tr(item.getLabelText()[0]) if item.nom != tr(item.nom) : name = str(tr(item.nom)+" :") value = tr(str( item.getText() ) ) + + # si specialisation de la fenetre + if self.item.object.definition == None : self.fenetreIhm = None + # Cas des listes de mots_clefs + else : self.fenetreIhm = self.item.object.definition.fenetreIhm - if self.editor.enteteQTree=='complet':mesColonnes=(name,value) else : mesColonnes=(name,) @@ -333,13 +337,8 @@ class JDCNode(QTreeWidgetItem,GereRegles): return None - def deplieCeNiveau(self): - - if self.fenetre == None : - print ('PNPNPN a programmer') - #self.fenetre=self.getPanelGroupe(self.editor) - #print ((self.item.panel)) - print (self.fenetre) + def afficheCeNiveau(self): + #print ('afficheCeNiveau pour ', self.item.nom, self.item.getLabelText()) for indiceWidget in range(self.editor.widgetCentraleLayout.count()): widget=self.editor.widgetCentraleLayout.itemAt(indiceWidget) self.editor.widgetCentraleLayout.removeItem(widget) @@ -353,12 +352,20 @@ class JDCNode(QTreeWidgetItem,GereRegles): maDefinition=self.item.get_definition() monObjet=self.item.object self.maFenetreCadre=MonWidgetNiveauFact(self,self.editor,maDefinition,monObjet) - #self.maFenetreCadre.commandesLayout.insertWidget(-1,self.fenetre) + self.fenetre=self.maFenetreCadre self.editor.widgetCentraleLayout.addWidget(self.maFenetreCadre) - #print ("j ajoute ", self.fenetre, self.fenetre.node.item.nom) self.editor.fenetreCentraleAffichee=self.maFenetreCadre - self.tree.node_selected= self - + self.select() + #print ('fin afficheCeNiveau pour ', self.item.nom) + + + def getPanelModifie(self): + + if self.fenetreIhm == None : return None + if self.fenetreIhm=='deplie1Niveau': + from InterfaceQT4.monWidgetCommandeDeplie1Niveau import MonWidgetCommandeDeplie1Niveau + return MonWidgetCommandeDeplie1Niveau (self,self.editor ,self.item.object) + return None def affichePanneau(self) : @@ -366,6 +373,7 @@ class JDCNode(QTreeWidgetItem,GereRegles): # posera des pb si un code decide d appeler FIN un mot clef # on resoudera a ce moment la # pour l instant pas de poussiere sous le tapis + #print ('_________________ds affichePanneau pour', self.item.nom) if not(self.item.isActif()) : from .monWidgetInactif import MonWidgetInactif self.fenetre = MonWidgetInactif(self,self.editor) @@ -373,10 +381,13 @@ class JDCNode(QTreeWidgetItem,GereRegles): itemParent=self while not (hasattr (itemParent,'getPanel')) : itemParent=itemParent.treeParent if itemParent!=self : + #print ('j appelle affichePanneau pour ', itemParent.item.nom , 'par', self.item.nom) itemParent.affichePanneau() + #print ('fin _________________ds affichePanneau pour', self.item.nom) return - self.fenetre=self.getPanel() - #self.editor.restoreSplitterSizes() + self.fenetre=self.getPanelModifie() + if self.fenetre == None : self.fenetre=self.getPanel() + self.editor.restoreSplitterSizes() for indiceWidget in range(self.editor.widgetCentraleLayout.count()): widget=self.editor.widgetCentraleLayout.itemAt(indiceWidget) @@ -399,7 +410,7 @@ class JDCNode(QTreeWidgetItem,GereRegles): self.tree.inhibeExpand=True self.tree.expandItem(self) self.tree.inhibeExpand=False - #print( 'fin affichePanneau pour', self.item.nom) + #print( '_________________fin affichePanneau pour', self.item.nom) def createPopUpMenu(self): @@ -824,7 +835,6 @@ class JDCNode(QTreeWidgetItem,GereRegles): return child def plieToutEtReafficheSaufItem(self, itemADeplier): - #print "je suis dans plieToutEtReaffiche", self.item.getNom() self.inhibeExpand=True from InterfaceQT4 import compojdc if (isinstance(self, compojdc.Node)) : @@ -843,6 +853,10 @@ class JDCNode(QTreeWidgetItem,GereRegles): self.inhibeExpand=False def plieToutEtReaffiche(self): + if self.item.getNom() == 'RAFFINEMENT' : + import traceback + traceback.print_stack() + print (a) from InterfaceQT4 import compojdc if (isinstance(self, compojdc.Node)) : self.affichePanneau(); return self.inhibeExpand=True @@ -853,6 +867,7 @@ class JDCNode(QTreeWidgetItem,GereRegles): if (isinstance(item,compobloc.Node)) : continue item.setPlie() self.affichePanneau() + #print ("fin plieToutEtReaffiche", self.item.getNom()) def deplieToutEtReaffiche(self): self.editor.deplier = True @@ -879,15 +894,17 @@ class JDCNode(QTreeWidgetItem,GereRegles): # item.appartientAUnNoeudPlie=False def setPlieChildren(self): - #print ("dans setPlieChildren pour", self.item.nom) self.plie=True + from InterfaceQT4 import composimp + if isinstance(self,composimp.Node) : return for c in self.children : c.setPlieChildren() #print "dans setPlieChildren appartientAUnNoeudPlie=True ", c, c.item.getLabelText()[0] c.appartientAUnNoeudPlie=True c.plie=True #print "dans setPlieChildren plie", c.item.nom - c.setExpanded(False) + # 01/2018 PNPN : boucle sur MT __ La ligne suivante ne me semble pas necessaire + #if not (isinstance(c,composimp.Node)) :c.setExpanded(False) # Pour les blocs et les motcles list # on affiche un niveau de plus @@ -899,17 +916,9 @@ class JDCNode(QTreeWidgetItem,GereRegles): niveauPere=niveauPere.treeParent for c in self.children : c.appartientAUnNoeudPlie=niveauPere.appartientAUnNoeudPlie - #print "dans setPlieChildren appartientAUnNoeudPlie=True ", c, c.item.getLabelText()[0], "mis a la valeur ", niveauPere.appartientAUnNoeudPlie + #print ("dans setPlieChildren appartientAUnNoeudPlie=True ", c, c.item.getLabelText()[0], "mis a la valeur ", niveauPere.appartientAUnNoeudPlie) c.setExpanded(False) - # on affiche un niveau de plus - #if isinstance(self,compomclist.Node) : - #if isinstance(self,compobloc.Node) : - # niveauPere=self.treeParent - # while (isinstance(niveauPere,compobloc.Node)): - # niveauPere=niveauPere.treeParent - # for c in self.children : - # c.appartientAUnNoeudPlie=niveauPere.appartientAUnNoeudPlie def setDeplie(self): #print "dans setPlieChildren pour", self.item.nom diff --git a/InterfaceQT4/compomacro.py b/InterfaceQT4/compomacro.py index 5074adca..64a9d63f 100644 --- a/InterfaceQT4/compomacro.py +++ b/InterfaceQT4/compomacro.py @@ -27,9 +27,9 @@ import traceback # Modules Eficas from Editeur import Objecttreeitem from Extensions.i18n import tr -from . import compooper -from . import browser -from . import typeNode +from InterfaceQT4 import compooper +from InterfaceQT4 import browser +from InterfaceQT4 import typeNode from PyQt5.QtWidgets import QAction from PyQt5.QtCore import Qt diff --git a/InterfaceQT4/compomclist.py b/InterfaceQT4/compomclist.py index fd3b5a1b..34f6b2f1 100644 --- a/InterfaceQT4/compomclist.py +++ b/InterfaceQT4/compomclist.py @@ -41,18 +41,18 @@ class Node(browser.JDCNode,typeNode.PopUpMenuNodeMinimal): monObjet=self.item.object monNom=self.item.nom maCommande=commande - #print "ds getPanelGroupe" , self.item.nom if hasattr(parentQt,'niveau'): self.niveau=parentQt.niveau+1 else : self.niveau=1 + # attention si l objet est une mclist on utilise bloc if not (monObjet.isMCList()) : if hasattr(self,'plie') and self.plie==True : - from .monWidgetFactPlie import MonWidgetFactPlie + from InterfaceQT4.monWidgetFactPlie import MonWidgetFactPlie widget=MonWidgetFactPlie(self,self.editor,parentQt,maDefinition,monObjet,self.niveau,maCommande,insertIn) else: - from .monWidgetFact import MonWidgetFact + from InterfaceQT4.monWidgetFact import MonWidgetFact widget=MonWidgetFact(self,self.editor,parentQt,maDefinition,monObjet,self.niveau,maCommande,insertIn) else : - from .monWidgetBloc import MonWidgetBloc + from InterfaceQT4.monWidgetBloc import MonWidgetBloc widget=MonWidgetBloc(self,self.editor,parentQt,maDefinition,monObjet,self.niveau,maCommande) return widget @@ -100,7 +100,7 @@ class MCListTreeItem(Objecttreeitem.SequenceTreeItem,compofact.FACTTreeItem): FACTPanel. Si la liste est plus longue on utilise le panneau MCLISTPanel. """ - print ('he suis dans panel de MCListTreeItem') + print ('je suis dans panel de MCListTreeItem') if len(self._object) > 1: return MCLISTPanel(jdcdisplay,pane,node) elif isinstance(self._object.data[0],ErrorObj): diff --git a/InterfaceQT4/compooper.py b/InterfaceQT4/compooper.py index 060f14b3..d2f23bdf 100644 --- a/InterfaceQT4/compooper.py +++ b/InterfaceQT4/compooper.py @@ -183,15 +183,15 @@ class EtapeTreeItem(Objecttreeitem.ObjectTreeItem): # if v.nom == name : return v # return None - def getType_sd_prod(self): - """ - Retourne le nom du type du concept résultat de l'étape - """ - sd_prod=self.object.getType_produit() - if sd_prod: - return sd_prod.__name__ - else: - return "" + # def getType_sd_prod(self): + # """ + # Retourne le nom du type du concept résultat de l'étape + # """ + # sd_prod=self.object.getType_produit() + # if sd_prod: + # return sd_prod.__name__ + # else: + # return "" def addItem(self,name,pos): mcent = self._object.addEntite(name,pos) diff --git a/InterfaceQT4/configuration.py b/InterfaceQT4/configuration.py index 7e43cb90..977694e4 100644 --- a/InterfaceQT4/configuration.py +++ b/InterfaceQT4/configuration.py @@ -123,6 +123,7 @@ class configBase(object): self.ficIcones=None self.repIcones=None self.differencieSiDefaut=False + self.typeDeCata='Python' diff --git a/InterfaceQT4/editor.py b/InterfaceQT4/editor.py index be0577d9..a3a3586c 100755 --- a/InterfaceQT4/editor.py +++ b/InterfaceQT4/editor.py @@ -44,7 +44,6 @@ from Editeur import session from Editeur import comploader from Editeur import Objecttreeitem from InterfaceQT4 import browser -from InterfaceQT4 import readercata from desBaseWidget import Ui_baseWidget from InterfaceQT4.monViewTexte import ViewText diff --git a/InterfaceQT4/editorSsIhm.py b/InterfaceQT4/editorSsIhm.py index b02a36d7..88faf702 100755 --- a/InterfaceQT4/editorSsIhm.py +++ b/InterfaceQT4/editorSsIhm.py @@ -39,7 +39,6 @@ import convert, generator from Editeur import session from Editeur import comploader from Editeur import Objecttreeitem -from InterfaceQT4 import readercata DictExtensions= {"MAP" : ".map", "TELEMAC" : '.cas'} debug = False @@ -84,6 +83,12 @@ class JDCEditorSsIhm : if not hasattr ( self.appliEficas, 'readercata') or self.appliEficas.multi==True: + if self.maConfiguration.typeDeCata == 'XML' : + from InterfaceQT4 import readercataXML as readercata + else : + from InterfaceQT4 import readercata + print (self.maConfiguration.typeDeCata) + print (readercata) self.readercata = readercata.READERCATA( self, self.appliEficas ) self.appliEficas.readercata=self.readercata self.appliEficas.code=self.code @@ -197,7 +202,7 @@ class JDCEditorSsIhm : pareil,texteNew=self.verifieChecksum(p.text) if not pareil : - self.informe(tr("fichier modifie"),tr("Attention! fichier change hors EFICAS"),False) + self.informe(("fichier modifie"),("Attention! fichier change hors EFICAS"),False) p.text=texteNew memeVersion,texteNew=self.verifieVersionCataDuJDC(p.text) diff --git a/InterfaceQT4/groupe.py b/InterfaceQT4/groupe.py index de6ac3ff..7bc6245f 100644 --- a/InterfaceQT4/groupe.py +++ b/InterfaceQT4/groupe.py @@ -37,10 +37,11 @@ class Groupe(QWidget,FacultatifOuOptionnel): """ """ def __init__(self,node,editor,parentQt,definition,obj,niveau,commande=None): + #print ("groupe : ",self.node.item.nom," ",self.node.fenetre) QWidget.__init__(self,None) self.node=node self.node.fenetre=self - #print "groupe : ",self.node.item.nom," ",self.node.fenetre + if self.node.item.nom == 'MASSES' : traceback.print_stack() self.setupUi(self) self.editor=editor self.obj=obj @@ -74,10 +75,8 @@ class Groupe(QWidget,FacultatifOuOptionnel): def afficheMots(self): - #print "ds afficheMots ",self.node.item.nom + #print ("ds afficheMots ",self.node.item.nom,self.node.plie) for node in self.node.children: - #if node.item.nom == "Background" :print "afficheMots ",node," " ,node.item.nom, " ",node.plie ," ", node.appartientAUnNoeudPlie,node.getPanelGroupe - #if node.item.nom == "BackgroundError" :print "afficheMots ",node," " ,node.item.nom, " ",node.plie ," ", node.appartientAUnNoeudPlie,node.getPanelGroupe # non return mais continue car il faut tenir compte des blocs if node.appartientAUnNoeudPlie==True : continue #print "je suis apres le if pour ",node.item.nom @@ -189,28 +188,11 @@ class Groupe(QWidget,FacultatifOuOptionnel): def setPlie(self): self.node.setPlie() - if self.editor.code== 'MT' and (self.maCommande.obj.nom == "ZONE") : - #if (len(self.node.item.getGenealogie())==2): - index=self.maCommande.commandesLayout.indexOf(self) - self.maCommande.reafficheSeulement(self,index) - return - #else : - # self.reaffiche(self.node) - #return - #print ('je reaffiche dans Plie') self.reaffiche(self.node) def setDeplie(self): + #print ('je passe ds setDeplie de groupe') self.node.setDeplie() - if self.editor.code== 'MT' and (self.maCommande.obj.nom == "ZONE") : - #if (len(self.node.item.getGenealogie())==2): - index=self.parentQt.commandesLayout.indexOf(self) - self.maCommande.reafficheSeulement(self,index) - return - #else : - # self.reaffiche(self.node) - #return - #print ('je reaffiche dans Plie') self.reaffiche(self.node) diff --git a/InterfaceQT4/monBoutonValide.py b/InterfaceQT4/monBoutonValide.py index 50075e0b..0d3b9f24 100644 --- a/InterfaceQT4/monBoutonValide.py +++ b/InterfaceQT4/monBoutonValide.py @@ -46,7 +46,7 @@ class MonBoutonValide(QToolButton) : #print "dans mousePressEvent" if self.parent.node.item.object.isValid() : myToolTip=tr("objet valide") - if self.parent.editor.configuration.differencieSiDefaut : + if self.parent.editor.maConfiguration.differencieSiDefaut : if self.parent.node.item.object.valeur != self.parent.node.item.object.definition.defaut : myToolTip+='\ndefaut : \n'+str(self.parent.node.item.object.definition.defaut) diff --git a/InterfaceQT4/monWidgetBloc.py b/InterfaceQT4/monWidgetBloc.py index 7d5d8239..1dc33526 100644 --- a/InterfaceQT4/monWidgetBloc.py +++ b/InterfaceQT4/monWidgetBloc.py @@ -29,7 +29,7 @@ class MonWidgetBloc(Ui_WidgetBloc,Groupe): """ """ def __init__(self,node,editor,parentQt,definition, obj, niveau,commande): - #print "bloc : ",node.item.nom + #print ("bloc : ",node.item.nom) Groupe.__init__(self,node,editor,parentQt, definition,obj,niveau,commande) self.parentQt.commandesLayout.insertWidget(-1,self,1) diff --git a/InterfaceQT4/monWidgetCommande.py b/InterfaceQT4/monWidgetCommande.py index a06baa90..b4295874 100644 --- a/InterfaceQT4/monWidgetCommande.py +++ b/InterfaceQT4/monWidgetCommande.py @@ -214,15 +214,11 @@ class MonWidgetCommande(Ui_WidgetCommande,Groupe): pass def nomChange(self): - print (1) nom = str(self.LENom.text()) nom = nom.strip() if nom == '' : return # si pas de nom, on ressort sans rien faire - print (2) test,mess = self.node.item.nommeSd(nom) - print (test,mess) self.editor.afficheCommentaire(mess) - print (3) #Notation scientifique if test : diff --git a/InterfaceQT4/monWidgetFact.py b/InterfaceQT4/monWidgetFact.py index 80e1f112..e3dd432a 100644 --- a/InterfaceQT4/monWidgetFact.py +++ b/InterfaceQT4/monWidgetFact.py @@ -58,6 +58,7 @@ class MonWidgetFactCommun(Groupe): #print "delayAffiche, self.doitAfficherOptionnel = ", self.doitAfficherOptionnel if self.doitAfficherOptionnel and self.editor.code != "CARMELCND" :self.afficheOptionnel() + class MonWidgetFact(Ui_WidgetFact,MonWidgetFactCommun): def __init__(self,node,editor,parentQt,definition, obj, niveau,commande,insertIn=True): MonWidgetFactCommun.__init__(self,node,editor,parentQt, definition,obj,niveau,commande,insertIn) diff --git a/InterfaceQT4/monWidgetFactPlie.py b/InterfaceQT4/monWidgetFactPlie.py index 8e87786e..17d79b58 100644 --- a/InterfaceQT4/monWidgetFactPlie.py +++ b/InterfaceQT4/monWidgetFactPlie.py @@ -30,6 +30,7 @@ class MonWidgetFactPlie(Ui_WidgetFactPlie,Groupe): """ def __init__(self,node,editor,parentQt,definition, obj, niveau,commande,insertIn=-1): #print "fact plie : ",node.item.nom + node.fenetreAAfficher=self Groupe.__init__(self,node,editor,parentQt, definition,obj,niveau,commande) self.groupBox.setText(self.node.item.getLabelText()[0]) self.parentQt.commandesLayout.insertWidget(insertIn,self) diff --git a/InterfaceQT4/monWidgetNiveauFact.py b/InterfaceQT4/monWidgetNiveauFact.py index a044a96a..b70a5c14 100644 --- a/InterfaceQT4/monWidgetNiveauFact.py +++ b/InterfaceQT4/monWidgetNiveauFact.py @@ -49,254 +49,117 @@ class MonWidgetNiveauFact(Ui_WidgetNiveauFact,Groupe): """ """ def __init__(self,node,editor,definition,obj): - #QWidget.__init__(self,editor) - #self.setupUi(self) self.listeAffichageWidget=[] Groupe.__init__(self,node,editor,None,definition,obj,1,self) + self.afficheOptionnel() def reaffiche(self,nodeAVoir=None): - print ('PNPNPN a programmer') -# -# self.listeAffichageWidget=[] -# self.inhibe=0 -# self.ensure=0 -# editor.inhibeSplitter=1 -# editor.inhibeSplitter=0 -# -# self.frameAffichage.setMinimumHeight(20) -# if node.item.getFr() != "" : self.labelDoc.setText(node.item.getFr()) -# else : -# self.labelDoc.close() -# self.frameAffichage.resize(self.frameAffichage.width(),50) -# -# #if (etape.getType_produit()==None): self.LENom.close() -# #test,mess = self.node.item.nommeSd('ee') -# if not(hasattr(etape.definition,'sd_prod')) or (etape.definition.sd_prod==None): self.LENom.close() -# elif (hasattr(etape.definition,'sd_prod') and type(etape.definition.sd_prod)== types.FunctionType):self.LENom.close() -# elif (hasattr(etape, 'sdnom')) and etape.sdnom != "sansnom" and etape.sdnom != None: self.LENom.setText(etape.sdnom) -# else : self.LENom.setText("") -# -# -# maPolice= QFont("Times", 10,) -# self.setFont(maPolice) -# self.labelNomCommande.setText(tr(self.obj.nom)) -# -# -# if self.editor.maConfiguration.closeAutreCommande == True : self.closeAutreCommande() -# else : -# try : -# self.bCatalogue.clicked.connect(self.afficheCatalogue) -# self.bAvant.clicked.connect(self.afficheAvant) -# self.bApres.clicked.connect(self.afficheApres) -# except : -# pass -# self.LENom.returnPressed.connect(self.nomChange) -# -# if self.editor.code in ['Adao','ADAO'] and self.editor.closeFrameRechercheCommande==True : -# self.frameAffichage.close() -# -# if self.editor.code in ['CARMELCND',] : self.closeAutreCommande() -# self.racine=self.node.tree.racine -# if self.node.item.getIconName() == "ast-red-square" : self.LENom.setDisabled(True) -# -# self.setAcceptDrops(True) -# self.etablitOrdre() -# -# if self.editor.code == "CARMELCND" : -# self.RBPoubelle.close() # JDC Fige -# return # Pas de MC Optionnels pour Carmel -# -# from .monWidgetOptionnel import MonWidgetOptionnel -# if self.editor.widgetOptionnel!= None : -# self.monOptionnel=self.editor.widgetOptionnel -# else : -# self.editor.inhibeSplitter=1 -# self.monOptionnel=MonWidgetOptionnel(self.editor) -# self.editor.widgetOptionnel=self.monOptionnel -# self.editor.splitter.addWidget(self.monOptionnel) -# self.editor.ajoutOptionnel() -# self.editor.inhibeSplitter=0 -# self.afficheOptionnel() -# #self.editor.restoreSplitterSizes() -# -# #print "fin init de widget Commande" -# -# -# def closeAutreCommande(self): -# self.bCatalogue.close() -# self.bAvant.close() -# self.bApres.close() -# -# def donnePremier(self): -# #print "dans donnePremier" -# QApplication.processEvents() -# if self.listeAffichageWidget != [] : -# self.listeAffichageWidget[0].setFocus(7) -# QApplication.processEvents() -# #print self.focusWidget() -# -# -# def focusNextPrevChild(self, next): -# # on s assure que ce n est pas un chgt de fenetre -# #print "je passe dans focusNextPrevChild" -# if self.editor.fenetreCentraleAffichee != self : return True -# f=self.focusWidget() -# if f not in self.listeAffichageWidget : -# i=0 -# while not hasattr (f,'AAfficher') : -# if f==None :i=-1; break -# f=f.parentWidget() -# if hasattr(f,'AAfficher') : f=f.AAfficher -# if i != -1 : i=self.listeAffichageWidget.index(f) -# else :i=self.listeAffichageWidget.index(f) -# if (i==len(self.listeAffichageWidget) -1) and next and not self.inhibe: -# try : -# self.listeAffichageWidget[1].setFocus(7) -# w=self.focusWidget() -# self.inhibe=1 -# w.focusPreviousChild() -# self.inhibe=0 -# return True -# except : -# pass -# #print self.listeAffichageWidget -# #print "souci ds focusNextPrevChild" -# if i==0 and next==False and not self.inhibe: -# if hasattr(self.editor.fenetreCentraleAffichee,'scrollArea'): -# self.editor.fenetreCentraleAffichee.scrollArea.ensureWidgetVisible(self.listeAffichageWidget[-1]) -# self.listeAffichageWidget[-2].setFocus(7) -# self.inhibe=1 -# w=self.focusWidget() -# w.focusNextChild() -# self.inhibe=0 -# return True -# if i==0 and next==True and not self.inhibe: -# self.listeAffichageWidget[0].setFocus(7) -# self.inhibe=1 -# w=self.focusWidget() -# w.focusNextChild() -# self.inhibe=0 -# return True -# if i>0 and next==False and not self.inhibe: -# if isinstance(self.listeAffichageWidget[i-1],QRadioButton): -# self.listeAffichageWidget[i-1].setFocus(7) -# return True -# return QWidget.focusNextPrevChild(self, next) -# -# def etablitOrdre(self): -# i=0 -# while(i +1 < len(self.listeAffichageWidget)): -# self.setTabOrder(self.listeAffichageWidget[i],self.listeAffichageWidget[i+1]) -# i=i+1 -# # si on boucle on perd l'ordre -# -# def afficheNieme(self,n): -# #print ('ds afficheNieme') -# self.listeAffichageWidget[n].setFocus(7) -# -# def afficheSuivant(self,f): -# #print ('ds afficheSuivant') -# try : -# i=self.listeAffichageWidget.index(f) -# next=i+1 -# except : -# next=1 -# if (next==len(self.listeAffichageWidget) ): next =0 -# #self.f=next -# #QTimer.singleShot(1, self.rendVisible) -# try : -# self.listeAffichageWidget[next].setFocus(7) -# except : -# pass -# -# -# def afficheOptionnel(self): -# # N a pas de parentQt. doit donc etre redefini -# liste,liste_rouge=self.ajouteMCOptionnelDesBlocs() -# #print "dans afficheOptionnel", self.monOptionnel -# # dans le cas ou l insertion n a pas eu leiu (souci d ordre par exemple) -# #if self.monOptionnel == None : return -# self.monOptionnel.parentCommande=self -# self.monOptionnel.titre(self.obj.nom) -# self.monGroupe=self.monOptionnel.afficheOptionnel(liste,liste_rouge,self) -# -# -# def focusInEvent(self,event): -# #print "je mets a jour dans focusInEvent de monWidget Commande " -# if self.editor.code == "CARMELCND" : return #Pas de MC Optionnels pour Carmel -# self.afficheOptionnel() -# -# -# def reaffiche(self,nodeAVoir=None): -# # Attention delicat. les appels de fonctions ne semblent pas pouvoir etre supprimes! -# self.avantH=self.editor.fenetreCentraleAffichee.scrollAreaCommandes.horizontalScrollBar().sliderPosition() -# self.avantV=self.editor.fenetreCentraleAffichee.scrollAreaCommandes.verticalScrollBar().sliderPosition() -# self.inhibeExpand=True -# self.node.affichePanneau() -# #QTimer.singleShot(1, self.recentre) -# if nodeAVoir != None and nodeAVoir!=0: -# self.f=nodeAVoir.fenetre -# if self.f==None : -# newNode=nodeAVoir.treeParent.chercheNoeudCorrespondant(nodeAVoir.item.object) -# self.f = newNode.fenetre -# if self.f != None and self.f.isVisible() : self.inhibeExpand=False; return -# if self.f != None : self.rendVisible() -# else : self.recentre() -# else : self.recentre() -# self.inhibeExpand=False -# -# def reafficheSeulement(self,nodeAReafficher,index): -# #print ('ds reafficheSeulement', nodeAReafficher) -# parentNodeAReafficher=nodeAReafficher.parentQt -# index=parentNodeAReafficher.commandesLayout.indexOf(nodeAReafficher) -# oldFenetre=nodeAReafficher.node.fenetre -# newWidget=nodeAReafficher.node.getPanelGroupe(parentNodeAReafficher,self,index) -# nodeAReafficher.node.fenetre=newWidget -# oldFenetre.setParent(None) -# oldFenetre.close() -# oldFenetre.deleteLater() -# #print ("fin pour " , self.node.item.nom) -# -# -# def recentre(self): -# QApplication.processEvents() -# s=self.editor.fenetreCentraleAffichee.scrollAreaCommandes -# s.horizontalScrollBar().setSliderPosition(self.avantH) -# s.verticalScrollBar().setSliderPosition(self.avantV) -# -# def rendVisibleNoeud(self,node): -# self.f=node.fenetre -# #print "dans rendVisibleNoeud",self.f -# QTimer.singleShot(1, self.rendVisible) -# -# def rendVisible(self): -# #print "dans rendVisible",self.f -# QApplication.processEvents() -# self.f.setFocus(7) -# self.editor.fenetreCentraleAffichee.scrollAreaCommandes.ensureWidgetVisible(self.f) -# -# def afficheCatalogue(self): -# if self.editor.widgetOptionnel != None : self.monOptionnel.hide() -# self.racine.affichePanneau() -# if self.node : self.node.select() -# else : self.racine.select() -# -# def afficheApres(self): -# self.node.selectApres() -# -# def afficheAvant(self): -# self.node.selectAvant() -# -# def setValide(self): -# if not(hasattr (self,'RBValide')) : return -# icon = QIcon() -# if self.node.item.object.isValid() : -# icon=QIcon(self.repIcon+"/ast-green-ball.png") -# else : -# icon=QIcon(self.repIcon+"/ast-red-ball.png") -# if self.node.item.getIconName() == "ast-yellow-square" : -# icon=QIcon(self.repIcon+"/ast-yel-ball.png") -# self.LENom.setDisabled(False) -# if self.node.item.getIconName() == "ast-red-square" : self.LENom.setDisabled(True) -# self.RBValide.setIcon(icon) -# + self.node.setDeplieChildren() + self.node.afficheCeNiveau() + self.editor.fenetreCentraleAffichee.labelDoc.setText(self.node.item.getFr()) + self.editor.fenetreCentraleAffichee.labelNomCommande.setText(self.node.item.getLabelText()[0]) + + def getPanel(self): + # necessaire pour handleOnItem de browser.py + # non appele + pass + + def donnePremier(self): + #print "dans donnePremier" + QApplication.processEvents() + if self.listeAffichageWidget != [] : + self.listeAffichageWidget[0].setFocus(7) + QApplication.processEvents() + #print self.focusWidget() + + + def focusNextPrevChild(self, next): + # on s assure que ce n est pas un chgt de fenetre + #print "je passe dans focusNextPrevChild" + if self.editor.fenetreCentraleAffichee != self : return True + f=self.focusWidget() + + if f not in self.listeAffichageWidget : + i=0 + while not hasattr (f,'AAfficher') : + if f==None :i=-1; break + f=f.parentWidget() + if hasattr(f,'AAfficher') : f=f.AAfficher + if i != -1 : i=self.listeAffichageWidget.index(f) + else :i=self.listeAffichageWidget.index(f) + if (i==len(self.listeAffichageWidget) -1) and next and not self.inhibe: + try : + self.listeAffichageWidget[1].setFocus(7) + w=self.focusWidget() + self.inhibe=1 + w.focusPreviousChild() + self.inhibe=0 + return True + except : pass + + if i==0 and next==False and not self.inhibe: + if hasattr(self.editor.fenetreCentraleAffichee,'scrollArea'): + self.editor.fenetreCentraleAffichee.scrollArea.ensureWidgetVisible(self.listeAffichageWidget[-1]) + self.listeAffichageWidget[-2].setFocus(7) + self.inhibe=1 + w=self.focusWidget() + w.focusNextChild() + self.inhibe=0 + return True + + if i==0 and next==True and not self.inhibe: + self.listeAffichageWidget[0].setFocus(7) + self.inhibe=1 + w=self.focusWidget() + w.focusNextChild() + self.inhibe=0 + return True + + if i>0 and next==False and not self.inhibe: + if isinstance(self.listeAffichageWidget[i-1],QRadioButton): + self.listeAffichageWidget[i-1].setFocus(7) + return True + return QWidget.focusNextPrevChild(self, next) + + def etablitOrdre(self): + # si on boucle on perd l'ordre + i=0 + while(i +1 < len(self.listeAffichageWidget)): + self.setTabOrder(self.listeAffichageWidget[i],self.listeAffichageWidget[i+1]) + i=i+1 + + def afficheSuivant(self,f): + #print ('ds afficheSuivant') + try : + i=self.listeAffichageWidget.index(f) + next=i+1 + except : + next=1 + if (next==len(self.listeAffichageWidget) ): next =0 + try : + self.listeAffichageWidget[next].setFocus(7) + except : + pass + + + def afficheOptionnel(self): + # N a pas de parentQt. doit donc etre redefini + #print ('ds afficheOptionnel') + if self.editor.widgetOptionnel!= None : + self.monOptionnel=self.editor.widgetOptionnel + else : + self.editor.inhibeSplitter=1 + self.monOptionnel=MonWidgetOptionnel(self.editor) + self.editor.widgetOptionnel=self.monOptionnel + self.editor.splitter.addWidget(self.monOptionnel) + self.editor.ajoutOptionnel() + self.editor.inhibeSplitter=0 + self.monOptionnel.vireTous() + + + liste,liste_rouge=self.ajouteMCOptionnelDesBlocs() + self.monOptionnel.parentCommande=self + self.monOptionnel.titre(self.obj.nom) + self.monGroupe=self.monOptionnel.afficheOptionnel(liste,liste_rouge,self) + + diff --git a/InterfaceQT4/monWidgetOptionnel.py b/InterfaceQT4/monWidgetOptionnel.py index 1c3d91d8..f9bb4140 100644 --- a/InterfaceQT4/monWidgetOptionnel.py +++ b/InterfaceQT4/monWidgetOptionnel.py @@ -61,6 +61,11 @@ class MonWidgetOptionnel (QWidget,Ui_WidgetOptionnel): del self.dicoMCWidgetOptionnel[k] #print( "fin vireLesAutres") + def vireTous(self): + for k in list(self.dicoMCWidgetOptionnel.keys()): + self.dicoMCWidgetOptionnel[k].close() + del self.dicoMCWidgetOptionnel[k] + def afficheOptionnelVide(self): self.GeneaLabel.setText("") for k in list(self.dicoMCWidgetOptionnel.keys()): diff --git a/InterfaceQT4/politiquesValidation.py b/InterfaceQT4/politiquesValidation.py index ba882731..a93175d7 100644 --- a/InterfaceQT4/politiquesValidation.py +++ b/InterfaceQT4/politiquesValidation.py @@ -56,7 +56,7 @@ class Validation(object) : if not validite and commentaire is None: commentaire = "impossible d'evaluer : %s " %repr(valeurentree) - print ('ds testeUneValeur', valeur, validite, commentaire) + #print ('ds testeUneValeur', valeur, validite, commentaire) return valeur, validite, commentaire # ---------------------------------------------------------------------------------------- diff --git a/InterfaceQT4/qtEficas.py b/InterfaceQT4/qtEficas.py index b0966b65..7864a01b 100755 --- a/InterfaceQT4/qtEficas.py +++ b/InterfaceQT4/qtEficas.py @@ -947,12 +947,8 @@ class Appli(AppliSsIhm,Ui_Eficas,QMainWindow): if self.maConfiguration.boutonDsMenuBar == False : return if not hasattr(self, 'readercata') : return from monLayoutBouton import MonLayoutBouton - if hasattr(self,'monLayoutBoutonRempli') : - print ('double passage dans le readerCata') - self.monLayoutBoutonRempli.close() + if hasattr(self,'monLayoutBoutonRempli') : return self.monLayoutBoutonRempli=MonLayoutBouton(self) - #for - #self.toolBarCommande.close() def handleAjoutEtape(self,nomEtape): self.viewmanager.handleAjoutEtape(nomEtape) diff --git a/InterfaceQT4/readercata.py b/InterfaceQT4/readercata.py index 3924916d..f3cd73b5 100644 --- a/InterfaceQT4/readercata.py +++ b/InterfaceQT4/readercata.py @@ -181,8 +181,7 @@ class READERCATA(object): self.cata=(self.cata,) self.titre=self.VERSION_EFICAS+" "+tr( " avec le catalogue ") + os.path.basename(self.fic_cata) - if self.appliEficas.ssIhm == False : - self.appliEficas.setWindowTitle(self.titre) + if self.appliEficas.ssIhm == False : self.appliEficas.setWindowTitle(self.titre) self.appliEficas.titre=self.titre self.QWParent.titre=self.titre @@ -225,7 +224,7 @@ class READERCATA(object): Pour chaque entite du catlogue on cree une liste de nom ordre_mc qui contient le nom des mots cles dans le bon ordre """ - self.cata_ordonne_dico,self.appliEficas.liste_simp_reel=autre_analyse_cata.analyseCatalogue(self.cata) + self.cata_ordonne_dico, self.appliEficas.liste_simp_reel=autre_analyse_cata.analyseCatalogue(self.cata) def retrouveOrdreCataStandard(self): """ diff --git a/InterfaceQT4/readercataXML.py b/InterfaceQT4/readercataXML.py new file mode 100644 index 00000000..2dc217f0 --- /dev/null +++ b/InterfaceQT4/readercataXML.py @@ -0,0 +1,77 @@ +# -*- coding: utf-8 -*- +# Copyright (C) 2007-2013 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 +# +""" + Ce module sert a lire un catalogue et a construire + un objet CataItem pour Eficas. + Il s'appuie sur la classe READERCATA +""" +# Modules Python +import sys, os +sys.path.insert(0,os.path.abspath(os.path.join(os.getcwd(),'..','EssaiInit',))) +import autre_analyse_cata + + +# Modules Eficas + +from monChoixCata import MonChoixCata +from Extensions.i18n import tr +from Extensions.eficas_exception import EficasException +import uiinfo + + +class READERCATA: + + def __init__(self,QWParent, appliEficas): + self.QWParent=QWParent + self.appliEficas=appliEficas + self.VERSION_EFICAS=self.appliEficas.VERSION_EFICAS + self.code=self.appliEficas.code + self.ssCode=self.appliEficas.ssCode + self.appliEficas.format_fichier='python' + self.appliEficas.format_fichier_in ='xml' + self.modeNouvCommande=self.appliEficas.maConfiguration.modeNouvCommande + self.versionCode=self.appliEficas.versionCode + self.version_cata=None + self.fic_cata=None + self.OpenCata() + self.cataitem=None + self.titre='Eficas XML' + self.Ordre_Des_Commandes=None + self.Classement_Commandes_Ds_Arbre=() + + #self.traiteIcones() + #self.creeDicoInverse() + + + def OpenCata(self): + + self.fic_cata = 'Cata_MED_FAM.xml' + + import readerEfficas + xml = open('/home/A96028/QT5GitEficasTravail/XMLEficas/EssaiInit/Cata_MED_FAM.xml').read() + SchemaMed = readerEfficas.efficas.CreateFromDocument(xml) + SchemaMed.exploreCata() + self.cata=(SchemaMed,) + uiinfo.traite_UIinfo(self.cata[0]) + self.Commandes_Ordre_Catalogue=[] + self.cata_ordonne_dico,self.appliEficas.liste_simp_reel=autre_analyse_cata.analyseCatalogue(self.cata[0]) + self.liste_groupes=None + + diff --git a/InterfaceQT4/typeNode.py b/InterfaceQT4/typeNode.py index 920dc511..396436d2 100644 --- a/InterfaceQT4/typeNode.py +++ b/InterfaceQT4/typeNode.py @@ -64,22 +64,8 @@ class PopUpMenuNodeMinimal(object) : self.dict_commandes_mesScripts=self.appliEficas.mesScripts[self.editor.code].dict_commandes if self.tree.currentItem().item.getNom() in self.dict_commandes_mesScripts : self.ajoutScript() - if self.appliEficas.code == 'MT' : - item=self - depth=0 - while(item!=None) : - depth = depth+1 - item = item.parent() - if depth != 3 : return - from InterfaceQT4 import composimp - if (isinstance(self,composimp.Node)) : return - label=('Deplie ce niveau') - self.actionDeplie=QAction(label,self.tree) - self.actionDeplie.triggered.connect(self.deplieCeNiveau) - self.menu.addAction(self.actionDeplie) def ajoutScript(self): - # cochon mais je n arrive pas a faire mieux avec le mecanisme de plugin # a revoir avec un menu et un connect sur le triggered sur le menu ? if hasattr(self.appliEficas, 'mesScripts'): diff --git a/MED/typescript b/MED/typescript deleted file mode 100644 index f070be17..00000000 --- a/MED/typescript +++ /dev/null @@ -1,34 +0,0 @@ -Le script a débuté sur mar. 29 nov. 2016 15:37:06 CET -]0;A96028@dsp0780471: ~/QT5GitEficasTravail/eficas/monCodeA96028@dsp0780471:~/QT5GitEficasTravail/eficas/monCode$ ./qtEficas_Med.py /tmp/a.commoo.comm -eficas_en /home/A96028/QT5GitEficasTravail/eficas/monCode/../Extensions/../UiQT4 -() -{'typ': 'TXM', 'statut': 'o'} -() -{'typ': 'TXM', 'statut': 'o'} -() -{'typ': 'TXM', 'statut': 'o'} -() -{'max': 1, 'typ': 'I', 'statut': 'o'} -() -{'max': '**', 'typ': 'TXM', 'statut': 'o'} -() -{'max': '**', 'typ': 'I', 'statut': 'o'} -() -{'max': '**', 'typ': 'I', 'statut': 'o'} -() -{'NBR': , 'IDE': , 'DES': , 'VAL': , 'statut': 'f'} -() -{'max': 1, 'typ': 'I', 'statut': 'o'} -() -{'max': '**', 'typ': 'TXM', 'statut': 'o'} -() -{'NOM': , 'NBR': , 'statut': 'f'} -() -{'NAME': , 'statut': 'f', 'max': '**', 'ATT': , 'NUM': , 'GRO': } -() -{'NAME': , 'ELEM': , 'statut': 'o'} -() -{'nom': 'FAS', 'FAMILY_MESH_NAME_REF': , 'op': None} -]0;A96028@dsp0780471: ~/QT5GitEficasTravail/eficas/monCodeA96028@dsp0780471:~/QT5GitEficasTravail/eficas/monCode$ exit - -Script terminé sur mar. 29 nov. 2016 15:37:13 CET diff --git a/MT/MT_Cata_V2017.py b/MT/MT_Cata_V2017.py index f4d252b5..26d53b97 100755 --- a/MT/MT_Cata_V2017.py +++ b/MT/MT_Cata_V2017.py @@ -22,9 +22,6 @@ - - - from Accas import * # @@ -161,7 +158,11 @@ ZONE = MACRO(nom = 'ZONE', reentrant = 'n', UIinfo = {"groupes":("Machine tournante",)}, fr = "Description d'une zone (comportant noeuds et elements, et en option masses ponctuelles et fissures)", - regles = (AU_MOINS_UN("ELEMENTS")), + fenetreIhm='deplie1Niveau', + #regles = (AU_MOINS_UN("ELEMENTS")), + regles=(AU_MOINS_UN('A1','B'),), + A1=SIMP(statut='f',typ='TXM',), + B=SIMP(statut='f',typ='TXM',), MASSE = FACT(statut='f', min=0, max='**', diff --git a/MT/mesScripts_MT.py b/MT/mesScripts_MT.py index 010ea2d6..329f8f8a 100644 --- a/MT/mesScripts_MT.py +++ b/MT/mesScripts_MT.py @@ -52,6 +52,12 @@ def import_zone(listeparam): oldItem.select() oldItem.supprimeNoeud() +def import_zone_from_menu(editor,etape): + texte="ZONE(NOEUDS=(_F(NOM='N1',POSITION_AXIALE=0.0,), _F(NOM='N2',POSITION_AXIALE=0.1,), _F(NOM='N3',POSITION_AXIALE=0.2,), _F(NOM='N4',POSITION_AXIALE=0.3,),),)," + retour = editor.updateJdcAfterEtape(etape,texte) + +def import_ligne(listeparam): + print ('in import_ligne') # le dictionnaire des commandes a la structure suivante : # la clef est la commande qui va proposer l action @@ -68,3 +74,21 @@ dict_commandes={ (view_zone,"View",('item',),False,True,"affiche dans Geom la representation de la zone "), (import_zone,"import_zone",('editor','self'),False,False,"import de fichier zone"),) } + +# le dictionnaire des menus a la structure suivante +# la clef qui est le titre du menu +# (pour l instant 1 seul menu) --> devlop si besoin de plusieurs menus +# une liste de tuple +# + +# Chaque tuple contient +# - la fonction a appeler +# - le label dans le menu +# - un tuple contenant les parametres attendus par la fonction +dict_menu = { + 'Ajout Elts' : ( + #(import_zone,"import_zone",('editor','self'),False,False,"import de fichier zone"), + (import_zone_from_menu,"import_zone",('editor','etapeCourante'),), + (import_ligne,"import_ligne",('editor','etapeCourante'),), + ) + } diff --git a/MT/prefs_MT.py b/MT/prefs_MT.py index 7d55a9eb..e452cfa0 100644 --- a/MT/prefs_MT.py +++ b/MT/prefs_MT.py @@ -37,7 +37,7 @@ encoding='iso-8859-1' catalogues=( ('MT','V2017',os.path.join(repIni,'MT_Cata_V2017.py'),'python','python'), ) -#nombreDeBoutonParLigne=4 +nombreDeBoutonParLigne=4 simpleClic=True closeFrameRechercheCommande=True boutonDsMenuBar=True diff --git a/Noyau/N_BLOC.py b/Noyau/N_BLOC.py index e33b077a..e1b24e8f 100644 --- a/Noyau/N_BLOC.py +++ b/Noyau/N_BLOC.py @@ -70,6 +70,7 @@ class BLOC(N_ENTITE.ENTITE): self.fr = fr self.ang = ang self.docu = docu + self.fenetreIhm=None if type(regles) == tuple: self.regles = regles else: diff --git a/Noyau/N_FACT.py b/Noyau/N_FACT.py index 58993e13..721f76d0 100644 --- a/Noyau/N_FACT.py +++ b/Noyau/N_FACT.py @@ -54,7 +54,7 @@ class FACT(N_ENTITE.ENTITE): list_instance = N_MCLIST.MCList label = 'FACT' - def __init__(self, fr="", docu="", regles=(), statut='f', defaut=None,ang="", + def __init__(self, fr="", docu="", regles=(), statut='f', defaut=None,ang="",fenetreIhm=None, min=0, max=1, validators=None, **args): """ Un mot-clé facteur est caractérisé par les attributs suivants : @@ -67,6 +67,7 @@ class FACT(N_ENTITE.ENTITE): - max - position - docu + - fenetreIhm """ N_ENTITE.ENTITE.__init__(self, validators) # Initialisation des attributs @@ -86,6 +87,7 @@ class FACT(N_ENTITE.ENTITE): self.entites = args self.position = None self.affecter_parente() + self.fenetreIhm = fenetreIhm def __call__(self, val, nom, parent): """ diff --git a/Noyau/N_JDC_CATA.py b/Noyau/N_JDC_CATA.py index 99b335a8..6ce9f5c6 100644 --- a/Noyau/N_JDC_CATA.py +++ b/Noyau/N_JDC_CATA.py @@ -69,6 +69,7 @@ class JDC_CATA(N_ENTITE.ENTITE): # courant à None CONTEXT.unsetCurrentCata() CONTEXT.setCurrentCata(self) + self.fenetreIhm=None def __call__(self, procedure=None, cata=None, cata_ord_dico=None, nom='SansNom', parent=None, **args): diff --git a/Noyau/N_MACRO.py b/Noyau/N_MACRO.py index 0dfda4e5..a80f98e4 100644 --- a/Noyau/N_MACRO.py +++ b/Noyau/N_MACRO.py @@ -87,7 +87,7 @@ class MACRO(N_ENTITE.ENTITE): nommage = nommage def __init__( - self, nom, op, sd_prod=None, reentrant='n', repetable='o', fr="",ang="", + self, nom, op, sd_prod=None, reentrant='n', repetable='o', fr="",ang="",fenetreIhm=None, docu="", regles=(), op_init=None, niveau = None, fichier_ini=0, UIinfo=None, **args): """ Méthode d'initialisation de l'objet MACRO. Les arguments sont utilisés pour initialiser @@ -113,6 +113,7 @@ class MACRO(N_ENTITE.ENTITE): self.ang=ang self.repetable = repetable self.docu = docu + self.fenetreIhm=fenetreIhm if type(regles) == tuple: self.regles = regles else: diff --git a/Noyau/N_OPER.py b/Noyau/N_OPER.py index 988d9ffa..0ab3f555 100644 --- a/Noyau/N_OPER.py +++ b/Noyau/N_OPER.py @@ -86,7 +86,7 @@ class OPER(N_ENTITE.ENTITE): label = 'OPER' nommage = nommage - def __init__(self, nom, op, sd_prod, reentrant='n', repetable='o', fr="",ang="", + def __init__(self, nom, op, sd_prod, reentrant='n', repetable='o', fr="",ang="",fenetreIhm=None, docu="", regles=(), op_init=None, niveau = None, UIinfo=None, **args): """ Méthode d'initialisation de l'objet OPER. Les arguments sont utilisés pour initialiser @@ -100,6 +100,7 @@ class OPER(N_ENTITE.ENTITE): self.ang = ang self.repetable = repetable self.docu = docu + self.fenetreIhm= fenetreIhm if type(regles) == tuple: self.regles = regles else: diff --git a/Noyau/N_PROC.py b/Noyau/N_PROC.py index 4547dcfd..97c120df 100644 --- a/Noyau/N_PROC.py +++ b/Noyau/N_PROC.py @@ -71,6 +71,8 @@ class PROC(N_ENTITE.ENTITE): rangés par niveau. Ils apparaissent alors exclusivement dans leur niveau de rangement. Si niveau vaut None, l'opérateur est rangé au niveau global. + - fenetreIhm : specification de la fenetre + - entites : dictionnaire dans lequel sont stockés les sous entités de l'opérateur. Il s'agit des entités de définition pour les mots-clés : FACT, BLOC, SIMP. Cet attribut est initialisé avec args, c'est à dire les arguments d'appel restants. @@ -80,29 +82,30 @@ class PROC(N_ENTITE.ENTITE): class_instance = N_PROC_ETAPE.PROC_ETAPE label = 'PROC' - def __init__(self, nom, op=None, reentrant='n', repetable='o', fr="",ang="", + def __init__(self, nom, op=None, reentrant='n', repetable='o', fr="",ang="", fenetreIhm=None, docu="", regles=(), op_init=None, niveau = None, UIinfo=None, **args): """ Méthode d'initialisation de l'objet PROC. Les arguments sont utilisés pour initialiser les attributs de meme nom """ - self.nom = nom - self.op = op - self.reentrant = reentrant - self.repetable = repetable - self.fr = fr + self.nom = nom + self.op = op + self.reentrant = reentrant + self.repetable = repetable + self.fenetreIhm = fenetreIhm + self.fr = fr #self.ang="" - self.ang=ang - self.docu = docu + self.ang = ang + self.docu = docu if type(regles) == tuple: self.regles = regles else: self.regles = (regles,) # Attribut op_init : Fonction a appeler a la construction de l # operateur sauf si == None - self.op_init = op_init - self.entites = args - current_cata = CONTEXT.getCurrentCata() + self.op_init = op_init + self.entites = args + current_cata = CONTEXT.getCurrentCata() if niveau == None: self.niveau = None current_cata.enregistre(self) diff --git a/Noyau/N_SIMP.py b/Noyau/N_SIMP.py index ea63e983..e9cb4986 100644 --- a/Noyau/N_SIMP.py +++ b/Noyau/N_SIMP.py @@ -49,7 +49,7 @@ class SIMP(N_ENTITE.ENTITE): def __init__(self, typ,ang="", fr="", statut='f', into=None, intoSug = None,siValide = None, defaut=None, min=1, max=1, homo=1, position='local', val_min=float('-inf'), val_max=float('inf'), docu="", validators=None, - sug=None): + sug=None,fenetreIhm=None): """ Un mot-clé simple est caractérisé par les attributs suivants : - type : cet attribut est obligatoire et indique le type de valeur attendue @@ -60,13 +60,14 @@ class SIMP(N_ENTITE.ENTITE): - defaut : valeur par défaut - min : nombre minimal de valeurs - max : nombre maximal de valeurs - - homo : ? + - homo : un certatin nb de choses qui il faut redispacher ailleurs (information, constant) - ang : doc - position : si global, le mot-clé peut-être lu n'importe où dans la commande - val_min : valeur minimale autorisée - val_max : valeur maximale autorisée - - docu : ? - - sug : ? + - docu : clef sur de la documentation utilisateur + - sug : valeur suggere + - fenetreIhm=None """ N_ENTITE.ENTITE.__init__(self, validators) # Initialisation des attributs @@ -93,6 +94,7 @@ class SIMP(N_ENTITE.ENTITE): if self.val_max == '**' : self.val_max = float('inf') if self.min == '**' : self.min = float('-inf') if self.val_min == '**' : self.val_min = float('-inf') + self.fenetreIhm=fenetreIhm def verifCata(self): """ diff --git a/Telemac/prefs_TELEMAC.py b/Telemac/prefs_TELEMAC.py index 2994e140..e5a1a4ae 100644 --- a/Telemac/prefs_TELEMAC.py +++ b/Telemac/prefs_TELEMAC.py @@ -52,3 +52,4 @@ mode_nouv_commande="figee" affiche = "ordre" translatorFichier = os.path.join(repIni,'labelCataToIhm') closeFrameRecherche=True +differencieSiDefaut = True diff --git a/Traducteur/movemocle.py b/Traducteur/movemocle.py index 5641d36f..d75ae999 100644 --- a/Traducteur/movemocle.py +++ b/Traducteur/movemocle.py @@ -214,7 +214,7 @@ def moveMCFToCommand(jdc,command,factsource,commandcible,factcible): jdcSet.add(commandcible) #----------------------------------------------------- -def fusionMotCleToFact(jdc,command,liste_mc,factcible,defaut=0): +def fusionMotCleToFact(jdc,command,listeMc,factcible,defaut=0): #----------------------------------------------------- if command not in jdcSet : return boolChange=0 @@ -225,7 +225,7 @@ def fusionMotCleToFact(jdc,command,liste_mc,factcible,defaut=0): list_val=[] trouveUnMC=0 for mc in c.childNodes: - if mc.name not in liste_mc : continue + if mc.name not in listeMc : continue val=mc.getText(jdc).split("=")[1].split(",")[0] list_val.append(val) trouveUnMC=1 @@ -238,12 +238,12 @@ def fusionMotCleToFact(jdc,command,liste_mc,factcible,defaut=0): boolChange=1 if boolChange : jdc.reset(jdc.getSource()) - for mc in liste_mc : + for mc in listeMc : removemocle.removeMotCle(jdc,command,mc) jdc.reset(jdc.getSource()) #----------------------------------------------------- -def fusionMotCleInFact(jdc,command,fact,liste_mc,new_name,defaut=0): +def fusionMotCleInFact(jdc,command,fact,listeMc,new_name,defaut=0): #----------------------------------------------------- if command not in jdcSet : return boolChange=0 @@ -257,7 +257,7 @@ def fusionMotCleInFact(jdc,command,fact,liste_mc,new_name,defaut=0): if mcF.name != fact: continue for ll in mcF.childNodes[:]: for mc in ll.childNodes: - if mc.name not in liste_mc : continue + if mc.name not in listeMc : continue val=mc.getText(jdc).split("=")[1].split(",")[0] list_val.append(val) trouveUnMC=1 @@ -268,12 +268,12 @@ def fusionMotCleInFact(jdc,command,fact,liste_mc,new_name,defaut=0): boolChange=1 if boolChange : jdc.reset(jdc.getSource()) - for mc in liste_mc : + for mc in listeMc : removemocle.removeMotCleInFact(jdc,command,fact,mc) jdc.reset(jdc.getSource()) #----------------------------------------------------- -def fusionMCFToMCF(jdc,command,liste_mcf,factcible,defaut=0): +def fusionMCFToMCF(jdc,command,listeMcF,factcible,defaut=0): #----------------------------------------------------- if command not in jdcSet : return boolChange=0 @@ -287,7 +287,7 @@ def fusionMCFToMCF(jdc,command,liste_mcf,factcible,defaut=0): esp1=' '*len(TexteMC) pp=0 for mcF in c.childNodes: - if mcF.name not in liste_mcf : continue + if mcF.name not in listeMcF : continue trouveUnMC=1 val=mcF.getText(jdc) # esp=esp1+(inseremocle.chercheDebutFacteur(jdc,mcF)-len(mcF.name))*' ' @@ -312,7 +312,7 @@ def fusionMCFToMCF(jdc,command,liste_mcf,factcible,defaut=0): boolChange=1 if boolChange : jdc.reset(jdc.getSource()) - for mcF in liste_mcf : + for mcF in listeMcF : removemocle.removeMotCle(jdc,command,mcF) jdc.reset(jdc.getSource()) diff --git a/Traducteur/traduitV11V12.py b/Traducteur/traduitV11V12.py index 688227c9..37212deb 100755 --- a/Traducteur/traduitV11V12.py +++ b/Traducteur/traduitV11V12.py @@ -323,9 +323,9 @@ def traduc(infile,outfile,flog=None): removeMotCleInFact(jdc,"DEFI_MATERIAU","UMAT","NB_VALE",pasDeRegle(),0) removeMotCleInFact(jdc,"DEFI_MATERIAU","UMAT_FO","NB_VALE",pasDeRegle(),0) - liste_mc=["C"+str(i) for i in range(1,198)] - fusionMotCleInFact(jdc,"DEFI_MATERIAU","UMAT",liste_mc,"LISTE_COEF") - fusionMotCleInFact(jdc,"DEFI_MATERIAU","UMAT_FO",liste_mc,"LISTE_COEF") + listeMc=["C"+str(i) for i in range(1,198)] + fusionMotCleInFact(jdc,"DEFI_MATERIAU","UMAT",listeMc,"LISTE_COEF") + fusionMotCleInFact(jdc,"DEFI_MATERIAU","UMAT_FO",listeMc,"LISTE_COEF") removeMotCle(jdc,"DEFI_MATERIAU","LABORD_1D",pasDeRegle(),0) diff --git a/UiQT5/CMakeLists.txt b/UiQT5/CMakeLists.txt index 823e4db3..45e511c9 100644 --- a/UiQT5/CMakeLists.txt +++ b/UiQT5/CMakeLists.txt @@ -70,12 +70,14 @@ eficas_compile_ui ( desWidgetCBIntoSug.ui ) eficas_compile_ui ( desWidgetCommentaire.ui ) eficas_compile_ui ( desWidgetDate.ui ) eficas_compile_ui ( desWidgetFact.ui ) -eficas_compile_ui_2 ( desWidgetFactPlie.ui ) +eficas_compile_ui ( desWidgetFactPlie.ui ) +eficas_compile_ui ( desWidgetFactTableau.ui ) eficas_compile_ui ( desWidgetHeure.ui ) eficas_compile_ui ( desWidgetInactif.ui ) eficas_compile_ui ( desWidgetInformation.ui ) eficas_compile_ui ( desWidgetIntoSug.ui ) eficas_compile_ui ( desWidgetMatrice.ui ) +eficas_compile_ui ( desWidgetNiveauFact.ui ) eficas_compile_ui ( desWidgetParam.ui ) eficas_compile_ui ( desWidgetPlusieursBase.ui ) eficas_compile_ui ( desWidgetPlusieursInto.ui ) diff --git a/UiQT5/desWidgetCommande.ui b/UiQT5/desWidgetCommande.ui index ba7ff77c..2e177793 100644 --- a/UiQT5/desWidgetCommande.ui +++ b/UiQT5/desWidgetCommande.ui @@ -631,7 +631,7 @@ border-radius : 12px 669 - + 0 diff --git a/UiQT5/desWidgetFactPlie.ui b/UiQT5/desWidgetFactPlie.ui index bd9e9c30..766ca93b 100644 --- a/UiQT5/desWidgetFactPlie.ui +++ b/UiQT5/desWidgetFactPlie.ui @@ -62,7 +62,8 @@ - ../Editeur/icons/plusnode.png../Editeur/icons/plusnode.png + ../Editeur/icons/plusnode.png + ../Editeur/icons/ast-red-ball.png../Editeur/icons/plusnode.png diff --git a/UiQT5/desWidgetNiveauFact.ui b/UiQT5/desWidgetNiveauFact.ui new file mode 100644 index 00000000..7593f854 --- /dev/null +++ b/UiQT5/desWidgetNiveauFact.ui @@ -0,0 +1,649 @@ + + + WidgetNiveauFact + + + + 0 + 0 + 1353 + 596 + + + + + 0 + 0 + + + + + 0 + 0 + + + + DCommandeUnique + + + + + + background-color : rgb(224,223,222); +font : 'times' 9px + + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + 0 + 0 + + + + + 0 + 130 + + + + + 16777215 + 130 + + + + background-color:rgb(224,223,222) + + + + 2 + + + 3 + + + 2 + + + + + + 0 + 0 + + + + QFrame::Box + + + QFrame::Raised + + + + 0 + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 13 + 20 + + + + + + + + + 17 + 31 + + + + + 21 + 31 + + + + Qt::ClickFocus + + + Affiche le rapport de validité de la commande + + + border : 0px + + + ... + + + + ../../../.designer/Editeur/icons/ast-green-ball.png../../../.designer/Editeur/icons/ast-green-ball.png + + + + 21 + 31 + + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 13 + 20 + + + + + + + + + 0 + 0 + + + + + 150 + 31 + + + + QFrame::NoFrame + + + QFrame::Raised + + + <html><head/><body><p><span style=" color:#0000ff;">commande </span></p></body></html> + + + + + + + Qt::Horizontal + + + QSizePolicy::Maximum + + + + 2 + 40 + + + + + + + + Qt::Horizontal + + + + 108 + 20 + + + + + + + + Qt::Horizontal + + + QSizePolicy::Ignored + + + + 2 + 40 + + + + + + + + 4 + + + QLayout::SetFixedSize + + + + + + 21 + 31 + + + + + 21 + 31 + + + + Qt::ClickFocus + + + Lance un script associé à la commande + + + border : 0px + + + ... + + + + ../../../.designer/Editeur/icons/roue.png../../../.designer/Editeur/icons/roue.png + + + + 21 + 31 + + + + + + + + + 0 + 0 + + + + + 0 + 38 + + + + true + + + + + + + + 21 + 31 + + + + + 31 + 31 + + + + Qt::ClickFocus + + + ouvre un navigateur sur l'aide contextuelle + + + border : 0px + + + ... + + + + ../../../.designer/Editeur/icons/point-interrogation.png../../../.designer/Editeur/icons/point-interrogation.png + + + + 21 + 31 + + + + + + + + + 21 + 31 + + + + + 31 + 31 + + + + Qt::ClickFocus + + + affiche les régles de validité + + + border : 0px + + + ... + + + + ../../../.designer/Editeur/icons/lettreRblanc30.png../../../.designer/Editeur/icons/lettreRblanc30.png + + + + 21 + 31 + + + + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 13 + 20 + + + + + + + + + 21 + 31 + + + + + 21 + 31 + + + + Qt::ClickFocus + + + Détruit la commande + + + border : 0px + + + ... + + + + ../../../.designer/Editeur/icons/deleteRond.png../../../.designer/Editeur/icons/deleteRond.png + + + + 21 + 31 + + + + + + RBValide + labelNomCommande + horizontalSpacer_3 + horizontalSpacer_4 + RBPoubelle + horizontalSpacer_5 + horizontalSpacer_7 + + + + + + TextLabel + + + + + + + 0 + + + + + + 0 + 0 + + + + + 60 + 24 + + + + + 60 + 24 + + + + Qt::ClickFocus + + + Affiche le formulaire de la commande précédente + + + background-color:rgb(104,110,149); +color :white; +border-radius : 12px + + + + << + + + Shift+A, Alt+A, Alt+A, Alt+A + + + true + + + true + + + + + + + + 0 + 0 + + + + + 60 + 24 + + + + + 60 + 24 + + + + Qt::ClickFocus + + + Affiche le formulaire de la commande suivante + + + background-color:rgb(104,110,149); +color :white; +border-radius : 12px + + + + >> + + + Shift+A, Alt+A, Alt+A, Alt+A + + + true + + + true + + + + + + + Qt::Vertical + + + + 20 + 0 + + + + + + + + + + + + + + 0 + 81 + + + + background : rgb(247,247,247) + + + + + + QFrame::NoFrame + + + Qt::ScrollBarAsNeeded + + + Qt::ScrollBarAsNeeded + + + true + + + + + 0 + 0 + 1353 + 466 + + + + + + + 1 + + + + + + + Qt::Vertical + + + + 20 + 5 + + + + + + + + + + + + qPixmapFromMimeSource + + + MonBoutonValide + QToolButton +
monBoutonValide.h
+
+ + MonLabelClic + QLabel +
monLabelClic.h
+
+
+ + +
diff --git a/Validation/V_MCCOMPO.py b/Validation/V_MCCOMPO.py index f81e6ec2..e943d623 100644 --- a/Validation/V_MCCOMPO.py +++ b/Validation/V_MCCOMPO.py @@ -98,7 +98,7 @@ class MCCOMPO(object): - testglob = booleen 1 si toutes les regles OK, 0 sinon """ # On verifie les regles avec les defauts affectes - dictionnaire = self.dict_mc_presents(restreint='non') + dictionnaire = self.dictMcPresents(restreint='non') texte = [''] testglob = 1 for r in self.definition.regles: @@ -109,7 +109,7 @@ class MCCOMPO(object): texte = os.linesep.join(texte) return texte, testglob - def dict_mc_presents(self, restreint='non'): + def dictMcPresents(self, restreint='non'): """ Retourne le dictionnaire {mocle : objet} construit a partir de self.mc_liste Si restreint == 'non' : on ajoute tous les mots-cles simples du catalogue qui ont diff --git a/convert/parseur_python.py b/convert/parseur_python.py index a52542a5..e3f28ba3 100644 --- a/convert/parseur_python.py +++ b/convert/parseur_python.py @@ -119,14 +119,14 @@ number_kw_pattern=re.compile(r""" ) """,re.VERBOSE|re.MULTILINE) -def construitGenea(texte,liste_mc): +def construitGenea(texte,listeMc): """ Retourne un dictionnaire dont les cles sont des reels et les valeurs sont leurs representations textuelles. Realise un filtrage sur les reels : - Ne garde que les reels pour lesquels str ne donne pas une bonne representation. - - Ne garde que les reels derriere un argument keyword dont le nom est dans liste_mc + - Ne garde que les reels derriere un argument keyword dont le nom est dans listeMc >>> s = '''a=+21.3e-5*85,b=-.1234,c=81.6 , d= -8 , e=_F(x=342.67,y=-1), f=+1.1, g=(1.3,-5,1.54E-3), ... #POMPE_PRIMA._BOUCLE_N._2_ELEMENT_NUMERO:0239 @@ -142,7 +142,7 @@ def construitGenea(texte,liste_mc): #argument keyword mot=m[:-1] else: - if mot not in liste_mc:continue + if mot not in listeMc:continue #valeur key=eval(m) if str(key) != m: d[key]=m diff --git a/generator/oldCodes/generator_ini.py b/generator/oldCodes/generator_ini.py index 3fa2dd9b..f1a60a9d 100644 --- a/generator/oldCodes/generator_ini.py +++ b/generator/oldCodes/generator_ini.py @@ -87,7 +87,7 @@ class IniGenerator(object): Tous les mots-cles facteurs sont convertis en sections Un mot-cle facteur ne peut contenir que des mots-cles simples. Sinon => erreur """ - liste_mcfact=[] + listeMcFact=[] sect_defaut='' if isinstance(obj,MCList): if len(obj.data) > 1: @@ -100,9 +100,9 @@ class IniGenerator(object): if len(mocle.data) > 1: raise EficasException(tr("Pas supporte")) else: - liste_mcfact.append(self.generMCFACT(mocle.data[0])) + listeMcFact.append(self.generMCFACT(mocle.data[0])) elif isinstance(mocle,MCFACT): - liste_mcfact.append(self.generMCFACT(mocle)) + listeMcFact.append(self.generMCFACT(mocle)) elif isinstance(mocle,MCSIMP): sect_defaut=sect_defaut+self.generMCSIMP(mocle) else: @@ -111,7 +111,7 @@ class IniGenerator(object): self.text='' if sect_defaut != '': self.text="[DEFAULT]\n"+sect_defaut - self.text=self.text + ''.join(liste_mcfact,'\n') + self.text=self.text + ''.join(listeMcFact,'\n') return self.text def generMCFACT(self,obj): diff --git a/monCode/Catalogues/Cata_MED_FAM v2.xml b/monCode/Catalogues/Cata_MED_FAM v2.xml new file mode 100755 index 00000000..b11b6367 --- /dev/null +++ b/monCode/Catalogues/Cata_MED_FAM v2.xml @@ -0,0 +1,130 @@ + + + + + + + TXM + + + + + + + + I + + + TXM + + + + DES IDE VAL + + + I + + + TXM + + + I + + + I + + + + + I + + + TXM + + + + + + + + 0 + + + + 0 + + + I + + + + DES IDE VAL + + + I + + + TXM + + + I + + + I + + + + + + + + + + + I + + + TXM + + + + DES IDE VAL + + + I + + + TXM + + + I + + + I + + + + + I + + + TXM + + + + + + + + diff --git a/monCode/Catalogues/Cata_MED_FAM.xml b/monCode/Catalogues/Cata_MED_FAM.xml new file mode 100755 index 00000000..8cd49fb4 --- /dev/null +++ b/monCode/Catalogues/Cata_MED_FAM.xml @@ -0,0 +1,35 @@ + + + + + + TXM + + + TXM + TXM + + DES IDE VAL + I + TXM + I + I + + + I + TXM + + + TXM + + + + TXM + + + + + diff --git a/monCode/Global_Condition_Cata.py b/monCode/Global_Condition_Cata.py deleted file mode 100755 index 02396340..00000000 --- a/monCode/Global_Condition_Cata.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 -from Accas import * -#class myModel(ASSD): pass - -JdC = JDC_CATA(code='GLOB_COND', - execmodul=None, - regles=(AU_PLUS_UN('TYPES',), - AU_PLUS_UN('INITS',), - AU_PLUS_UN('DATAS',), - #A_CLASSER('TYPES','INITS','DATAS') - ) -); - -TYPES=PROC(nom='TYPES',op=None,UIinfo={"groupes":("Global_Workflow",)}, #sd_prod=myModel, - MODE=SIMP( - typ='TXM', - statut='o', - position='global_jdc', - into=("MANUAL","AUTOMATIC","MIXED"), - defaut="AUTOMATIC", - ), -); - -liste_condition=('INITS', 'DATAS') - -INITS=PROC(nom='INITS',op=None,UIinfo={"groupes":("INI_param",)}, - ini_manual=BLOC(condition="MODE == 'MANUAL'", - Informer=SIMP(statut='o',typ='TXM', defaut="INITS MANUAL"), - ), - ini_auto=BLOC(condition="MODE == 'AUTOMATIC'", - Informer=SIMP(statut='o', typ='TXM', defaut="INITS AUTOMATIC",), - ), - ini_mixed=BLOC(condition="MODE == 'MIXED'", - Informer=SIMP(statut='o',typ='TXM', defaut="INITS MIXED",), - ), -); -DATAS=PROC(nom='DATAS',op=None,UIinfo={"groupes":("DATAS",)}, - data_manual=BLOC(condition="MODE == 'MANUAL'", - Informer=SIMP(statut='o',typ='TXM', defaut="DATAS MANUAL", - ), - ), - data_auto=BLOC(condition="MODE == 'AUTOMATIC'", - Informer=SIMP(statut='o', typ='TXM', defaut="DATAS AUTOMATIC", - ), - ), - data_mixed=BLOC(condition="MODE == 'MIXED'", - Informer=SIMP(statut='o',typ='TXM', defaut="DATAS MIXED", - ), - ), -); - -Classement_Commandes_Ds_Arbre=('TYPES','INITS','DATAS') -Ordre_Des_Commandes = ('TYPES','INITS','DATAS') diff --git a/monCode/Many_Concepts_52992_Cata.py b/monCode/Many_Concepts_52992_Cata.py deleted file mode 100644 index 13145b96..00000000 --- a/monCode/Many_Concepts_52992_Cata.py +++ /dev/null @@ -1,76 +0,0 @@ -# coding: utf-8 - -from Accas import * - -#class myMesh(ASSD): pass -class myModel(ASSD): pass - -JdC = JDC_CATA(code='PATTERNS', - execmodul=None, - regles=(AU_PLUS_UN('DEBUT', 'POURSUITE'), - AU_PLUS_UN('AFFE_MODELE'), - AU_PLUS_UN('FIN'), - A_CLASSER(('DEBUT', 'POURSUITE'), 'FIN'))) - -def mySeveral(suffix,num): - out=list() - for i in range(1,num+1): - out.append(suffix+str(i).zfill(2)) - return out - -switch_facultatif=True #change 'o' to 'f' of some widgets in the loop -#empty_defauts=True - -def myBloc(num): - myNum=str(num).zfill(2) - list_item_body="Item_"+myNum+"_" - defauts0=["","",True,"'phenomena_"+myNum+"'",mySeveral(list_item_body,2)] #presence of default values - defauts_mask=[False,False,True,True,False] #switch off defaults of some types - defauts=list() - for id0 in range(len(defauts0)): - if defauts_mask[id0]: - item=", defaut="+str(defauts0[id0]) - else: - item="" - defauts.append(item) - #print defauts - - opt=['o','o','o','o','o'] #initial default obligation of items in FACT groups - #make different widgets optional, one by one: - myLen=len(opt) - if switch_facultatif: - make_f=(num)%myLen - opt[make_f]='f' - #print opt - #if empty_defauts: - # clean_defaut=num%myLen - - myString="BLOC(condition=\"MESH==\'mesh_"+myNum+"'\""+defauts[0]+", AFFE=FACT(statut='"+opt[1]+"'"+defauts[1]+", ALL=SIMP(statut='"+opt[2]+"', typ=bool,ang='ALL "+myNum+" help EN'"+defauts[2]+"),PHENOMENA=SIMP(statut='"+opt[3]+"',typ='TXM',into=mySeveral('phenomena_',"+str(num)+")"+defauts[3]+"), MODELISATION=SIMP(statut='"+opt[4]+"',typ='TXM', min=4,max='**',into=mySeveral('"+list_item_body+"',"+str(num*4)+")"+defauts[4]+", ang='Input "+myNum+" list EN', fr='Input "+myNum+" list FR'),),)" - print myString - return eval(myString) - -DEBUT=PROC(nom="DEBUT", op=10, repetable='n', UIinfo={"groupes":("Group1",)}, ang="Debut Eng help", - PAR_LOT=SIMP(ang="Debut Par Lot help En",statut='o',typ=bool, defaut=True), -); - -AFFE_MODELE=OPER(nom="AFFE_MODELE",op=18,sd_prod=myModel, - UIinfo={"groupes":("Group1",)}, - ang="Model mesh definition EN", - reentrant='n', - regles=(AU_MOINS_UN('APPROVED')), - MESH=SIMP(statut='o',typ='TXM',into=mySeveral("mesh_",4) ,defaut="mesh_01"), - APPROVED=SIMP(statut="f", typ=bool), # presence of this item will validate the whole group - block_mesh_01=myBloc(1), - block_mesh_02=myBloc(2), - block_mesh_03=myBloc(3), - block_mesh_04=myBloc(4), -) - - -FIN=PROC(nom="FIN",op=9999,repetable='n',ang="Finish help EN",UIinfo={"groupes":("Group1",)}, - FORMAT_HDF =SIMP(ang="Save HDF EN",statut='f',typ='TXM',defaut="NON",into=("OUI","NON",) ), -); - -Classement_Commandes_Ds_Arbre=('DEBUT','MESH_TYPES','AFFE_MODELE','FIN') - -Ordre_Des_Commandes = ('DEBUT','MESH_TYPES','AFFE_MODELE','FIN') diff --git a/monCode/Matrix_Cata.py b/monCode/Matrix_Cata.py deleted file mode 100644 index 268a77bf..00000000 --- a/monCode/Matrix_Cata.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding: utf-8 -from Accas import * - -class loi ( ASSD ) : pass -class variable ( ASSD ) : pass - -class Matrice: - def __init__(self,nbLigs=None,nbCols=None,methodeCalculTaille=None,formatSortie="ligne",valSup=None,valMin=None,structure=None): - self.nbLigs=nbLigs - self.nbCols=nbCols - self.methodeCalculTaille=methodeCalculTaille - self.formatSortie=formatSortie - self.valSup=valSup - self.valMin=valMin - self.structure=structure - - def __convert__(self,valeur): - # Attention ne verifie pas grand chose - if type(valeur) != types.ListType : - return None - return valeur - - def info(self): - return "Matrice %s x %s" % (self.nbLigs, self.nbCols) - - __repr__=info - __str__=info - - - -class myModel(ASSD): pass - -JdC = JDC_CATA(code='PATTERNS', - execmodul=None, - regles=(AU_MOINS_UN ( 'CORRELATION' ), - ) -) - -DETERMINISTICVARIABLE = OPER ( nom = "DETERMINISTICVARIABLE", - sd_prod = variable, - op = None, - fr = "Variable deterministe", - ang = "Deterministic variable", - - N = SIMP ( statut = 'o', typ = "TXM", fr = "Nom", ang = "Name", defaut = "Var1" ), - T = SIMP ( statut = 'o', defaut = "in", into = ( "in" , "out", ), typ = "TXM", fr = "Type", ang = "Type" ), - R = SIMP ( statut = 'o', defaut = 0, typ = "I", fr = "Rang", ang = "Rank" ), -) - -DISTRIBUTION = OPER ( nom = "DISTRIBUTION", - sd_prod = loi, - op = 68, - fr = "Definitions des lois marginales utilisees par les variables d'entree", - - R = SIMP ( statut = "o", typ = "R", max = 1, val_min = 0., fr = "Parametre R de la loi | R > 0", ang = "R parameter | R > 0", defaut = 0.5 ), - # T > R - T = SIMP ( statut = "o", typ = "R", max = 1, val_min = 0., fr = "Parametre T de la loi | T > R", ang = "T parameter | T > R", defaut = 0.7 ), - A = SIMP ( statut = "o", typ = "R", max = 1, fr = "Borne inferieure du support de la loi", ang = "Support lower bound", defaut = 0.1 ), - # B > A - B = SIMP ( statut = "o", typ = "R", max = 1, fr = "Borne superieure du support de la loi", ang = "Support upper bound", defaut = 0.3 ), -) - -VARIABLE = PROC ( nom = "VARIABLE", - op = None, - docu = "", - fr = "Variable probabiliste", - ang = "Probabilistic variable", - - ModelVariable = SIMP ( statut = "o", typ = ( variable, ), fr = "Variable d'entrée du modèle", ang = "Input variable of the model" ), - Distribution = SIMP ( statut = "o", typ = ( loi, ), fr = "Modélisation probabiliste", ang = "Probabilistic modelisation" ), -) - -CORRELATION = PROC ( nom = 'CORRELATION', - op = None, - docu = "", - fr = "Correlation entre variables", - ang = "Variable correlation", - - CorrelationMatrix = SIMP ( statut = "o", typ = Matrice(nbLigs=None, - nbCols=None, - methodeCalculTaille='NbDeVariables', - valSup=1, - valMin=-1, - structure="symetrique"), - fr = "Matrice de correlation entre les variables d'entree", - ang = "Correlation matrix for input variables" ), -) diff --git a/monCode/ModeleEficas/Model Efficas (1.1) v6 ext.xsd b/monCode/ModeleEficas/Model Efficas (1.1) v6 ext.xsd new file mode 100755 index 00000000..22e488ec --- /dev/null +++ b/monCode/ModeleEficas/Model Efficas (1.1) v6 ext.xsd @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + + + + + + La portée pouurait devenir un attribut de SIMP. Une autre solution consisterait a créer un SIMPG pour distinguer les @nom uniques des SIMP a portée globale des autres. + + + + + + + + + + + + + + La valeur -1 equivaut à oo + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/monCode/ModeleEficas/Model Efficas (1.1) v6.xsd b/monCode/ModeleEficas/Model Efficas (1.1) v6.xsd new file mode 100755 index 00000000..2492a38b --- /dev/null +++ b/monCode/ModeleEficas/Model Efficas (1.1) v6.xsd @@ -0,0 +1,732 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + SIMP devrait être selectionné que si .//SIMP[portee='Global'] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + SIMP devrait être selectionné que si .//SIMP[portee='Global'] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + SIMP devrait être selectionné que si .//SIMP[portee='Global'] + + + + + + + + + + + + + + + + + + + La valeur -1 equivaut à oo + + + + + + + + + + + + + + SIMP devrait être selectionné que si .//SIMP[portee='Global'] + + + + + + + + + + + + + + + + + + + + + + + + La portée pouurait devenir un attribut de SIMP. Une autre solution consisterait a créer un SIMPG pour distinguer les @nom uniques des SIMP a portée globale des autres. + + + + + + + + + + + + + + La valeur -1 equivaut à oo + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Référence une position dans un fichier maître contenant une liste de références à des pages de documentations + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/monCode/configuration_MED.py b/monCode/configuration_MED.py new file mode 100644 index 00000000..0ce59dad --- /dev/null +++ b/monCode/configuration_MED.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# +# Copyright (C) 2008-2016 EDF R&D +# +# This file is part of SALOME ADAO module +# +# 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 +# + +""" + Ce module sert pour charger les paramètres de configuration d'EFICAS +""" +# Modules Python +import os, sys, string, types, re + + +# Modules Eficas +from InterfaceQT4 import configuration + +# Classe de base permettant de lire, afficher +# et sauvegarder les fichiers utilisateurs + +class CONFIG(configuration.configBase): + + def __init__(self,appli,repIni): + + self.labels_eficas=['lang','rep_cata','catalogues','closeAutreCommande','closeFrameRechercheCommande','closeEntete','taille'] + configuration.configBase.__init__(self,appli,repIni) + + self.rep_user = os.environ["HOME"] + self.appli = appli + self.code = appli.code + self.rep_ini = repIni + self.savedir = self.rep_user + +def make_config(appli,rep): + return CONFIG(appli,rep) + diff --git a/monCode/prefs.py b/monCode/prefs.py new file mode 100644 index 00000000..2e9d0a2e --- /dev/null +++ b/monCode/prefs.py @@ -0,0 +1,22 @@ +# Copyright (C) 2007-2012 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 +# +code="MED" +import sys, os +if os.path.dirname(os.path.abspath(__file__)) not in sys.path : + sys.path.insert(0,os.path.dirname(os.path.abspath(__file__))) diff --git a/monCode/prefs_MED.py b/monCode/prefs_MED.py new file mode 100644 index 00000000..1fda3add --- /dev/null +++ b/monCode/prefs_MED.py @@ -0,0 +1,42 @@ +# -*- coding: utf-8 -*- +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== + +import os,sys +# repIni sert a localiser le fichier editeur.ini +# Obligatoire +repIni=os.path.dirname(os.path.abspath(__file__)) +INSTALLDIR=os.path.join(repIni,'..') +sys.path[:0]=[INSTALLDIR] + + +# lang indique la langue utilisee pour les chaines d'aide : fr ou ang +lang='en' + +# Codage des strings qui accepte les accents (en remplacement de 'ascii') +encoding='iso-8859-1' +docPath=repIni + +# +typeDeCata='XML' +catalogues=( + ('med','med',os.path.join(repIni,'cata_med.py'),'dico','xml'), +) + diff --git a/monCode/prefs_monCode.py b/monCode/prefs_monCode.py deleted file mode 100644 index 819a4085..00000000 --- a/monCode/prefs_monCode.py +++ /dev/null @@ -1,69 +0,0 @@ -# -*- coding: utf-8 -*- -# CONFIGURATION MANAGEMENT OF EDF VERSION -# ====================================================================== -# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG -# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY -# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY -# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR -# (AT YOUR OPTION) ANY LATER VERSION. -# -# THIS PROGRAM 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 -# GENERAL PUBLIC LICENSE FOR MORE DETAILS. -# -# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE -# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, -# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. -# -# -# ====================================================================== - -import os,sys -# repIni sert a localiser le fichier editeur.ini -# Obligatoire -repIni=os.path.dirname(os.path.abspath(__file__)) -INSTALLDIR=os.path.join(repIni,'..') -sys.path[:0]=[INSTALLDIR] - - -# lang indique la langue utilisee pour les chaines d'aide : fr ou ang -lang='en' - -# Codage des strings qui accepte les accents (en remplacement de 'ascii') -encoding='iso-8859-1' -docPath=repIni -fileName="docMonCode.png" -image=1 - -# -catalogues=( - ('monCode','53038',os.path.join(repIni,'Matrix_Cata.py'),'dico','python'), - ('monCode','53036',os.path.join(repIni,'Elementary_Lists_53036_Cata.py'),'dico','python'), - ('monCode','53033',os.path.join(repIni,'Tuples_Cata.py'),'dico','python'), - ('monCode','53031',os.path.join(repIni,'Tuples_Cata.py'),'dico','python'), - ('monCode','53030',os.path.join(repIni,'Tuples_Cata.py'),'dico','python'), - ('monCode','53020',os.path.join(repIni,'Nested_Cond_52945_Cata.py'),'dico','python'), - ('monCode','53013',os.path.join(repIni,'Elementary_Lists_53013_Cata.py'),'dico','python'), - ('monCode','53000',os.path.join(repIni,'Elementary_Lists_53030_Cata.py'),'dico','python'), - ('monCode','52996',os.path.join(repIni,'Elementary_Lists_52996_Cata.py'),'dico','python'), - ('monCode','52992',os.path.join(repIni,'Many_Concepts_52992_Cata.py'),'dico','python'), - ('monCode','52989',os.path.join(repIni,'Many_Concepts_52989_Cata.py'),'dico','python'), - ('monCode','52988',os.path.join(repIni,'Many_Concepts_52988_Cata.py'),'dico','python'), - ('monCode','52985',os.path.join(repIni,'fin_52985_Cata.py'),'dico','python'), - ('monCode','52983',os.path.join(repIni,'Many_Concepts_52983_Cata.py'),'dico','python'), - ('monCode','52975',os.path.join(repIni,'Separate_Blocks_52975_Cata.py'),'dico','python'), - ('monCode','52972',os.path.join(repIni,'Separate_Blocks_52972_Cata.py'),'dico','python'), - ('monCode','52958',os.path.join(repIni,'Separate_Blocks_52958_Cata.py'),'dico','python'), - ('monCode','52952',os.path.join(repIni,'Nested_Cond_52952_Cata.py'),'dico','python'), - ('monCode','52949',os.path.join(repIni,'Nested_Cond_52949_Cata.py'),'dico','python'), - ('monCode','52947',os.path.join(repIni,'Nested_Cond_52947_Cata.py'),'dico','python'), - ('monCode','52946',os.path.join(repIni,'Nested_Cond_52946_Cata.py'),'dico','python'), - ('monCode','52945',os.path.join(repIni,'Nested_Cond_52945_Cata.py'),'dico','python'), - ('monCode','Global',os.path.join(repIni,'Global_Condition_Cata.py'),'dico','python'), -# resolu ('monCode','52948',os.path.join(repIni,'Nested_Cond_52948_Cata.py'),'dico','python'), -# pb d afffichage des optionnels ('monCode','52963',os.path.join(repIni,'Separate_Blocks_52963_Cata.py'),'dico','python'), -# pb d afffichage des optionnels ('monCode','52966',os.path.join(repIni,'Separate_Blocks_52966_Cata.py'),'dico','python'), - -# ('monCode','test',os.path.join(repIni,'monCode_Cata1.py'),'dico','python'), -) diff --git a/monCode/qtEficas_Med.py b/monCode/qtEficas_Med.py new file mode 100755 index 00000000..05eaee9a --- /dev/null +++ b/monCode/qtEficas_Med.py @@ -0,0 +1,36 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +# Copyright (C) 2007-2017 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 + +# Modules Eficas +import prefs +name='prefs_'+prefs.code +__import__(name) + +#import sys +#reload(sys) +#sys.setdefaultencoding('latin1') + +from InterfaceQT4 import eficas_go +print eficas_go +eficas_go.lanceEficas(code=prefs.code) -- 2.39.2