From 43ca18c9dc61e8f94c389b459fd5476d2857345a Mon Sep 17 00:00:00 2001 From: "pascale.noyret" Date: Wed, 31 Jan 2018 17:00:22 +0100 Subject: [PATCH] Efi2XSD --- .../Model Efficas (1.1) v6 ext.xsd | 0 .../ModeleEficas/Model Efficas (1.1) v6.xsd | 0 {EssaiInit => Efi2Xsd}/README.txt | 0 {monCode => Efi2Xsd}/XSL/Eficas2Xsd.xslt | 0 {monCode => Efi2Xsd}/XSL/MED_FAM_gen.xsd | 0 {monCode => Efi2Xsd}/XSL/MED_FAM_v2_gen.xsd | 0 .../XSL/MappingMapToXMLSchema_1_1__ef.xslt | 0 {monCode => Efi2Xsd}/XSL/Saxon.cmd | 0 {EssaiInit => Efi2Xsd}/efficas.py | 0 {EssaiInit => Efi2Xsd}/model.xsd | 267 +++++-- {EssaiInit => Efi2Xsd}/raw/__init__.py | 0 {EssaiInit => Efi2Xsd}/raw/efficas.py | 682 +++++++++--------- {EssaiInit => Efi2Xsd}/readerEfficas.py | 0 EssaiInit/Cata_MED_FAM.xml | 28 - EssaiInit/Cata_MED_FAM.xml.mini | 28 - EssaiInit/Cata_MED_FAM.xml.origin | 28 - EssaiInit/aide1 | 256 ------- InterfaceQT4/browser.py | 5 +- InterfaceQT4/compofact.py | 16 +- InterfaceQT4/compomclist.py | 2 +- InterfaceQT4/editor.pourCIST | 60 +- .../monWidgetCommandeDeplie1Niveau.py | 132 ++++ InterfaceQT4/monWidgetFact.py | 13 +- InterfaceQT4/monWidgetNiveauFact.py | 12 +- InterfaceQT4/monWidgetTableau.py | 325 +++++++++ InterfaceQT4/readercataXML.py | 6 +- Med/Cata_MED_FAM.xml | 1 + .../Catalogues/Cata_MED_FAM v2.xml | 0 {monCode => Med}/Catalogues/Cata_MED_FAM.xml | 0 {monCode => Med}/configuration_MED.py | 0 {monCode => Med}/prefs.py | 0 {monCode => Med}/prefs_MED.py | 0 {monCode => Med}/properties.py | 0 {monCode => Med}/qtEficas_Med.py | 0 UiQT5/commandeTableau.ui | 24 + UiQT5/dateEtHeure.ui | 98 +++ UiQT5/desWidgetFactTableau.ui | 428 +++++++++++ 37 files changed, 1609 insertions(+), 802 deletions(-) rename {monCode => Efi2Xsd}/ModeleEficas/Model Efficas (1.1) v6 ext.xsd (100%) rename {monCode => Efi2Xsd}/ModeleEficas/Model Efficas (1.1) v6.xsd (100%) rename {EssaiInit => Efi2Xsd}/README.txt (100%) rename {monCode => Efi2Xsd}/XSL/Eficas2Xsd.xslt (100%) rename {monCode => Efi2Xsd}/XSL/MED_FAM_gen.xsd (100%) rename {monCode => Efi2Xsd}/XSL/MED_FAM_v2_gen.xsd (100%) rename {monCode => Efi2Xsd}/XSL/MappingMapToXMLSchema_1_1__ef.xslt (100%) rename {monCode => Efi2Xsd}/XSL/Saxon.cmd (100%) rename {EssaiInit => Efi2Xsd}/efficas.py (100%) rename {EssaiInit => Efi2Xsd}/model.xsd (67%) rename {EssaiInit => Efi2Xsd}/raw/__init__.py (100%) rename {EssaiInit => Efi2Xsd}/raw/efficas.py (79%) rename {EssaiInit => Efi2Xsd}/readerEfficas.py (100%) delete mode 100755 EssaiInit/Cata_MED_FAM.xml delete mode 100755 EssaiInit/Cata_MED_FAM.xml.mini delete mode 100755 EssaiInit/Cata_MED_FAM.xml.origin delete mode 100644 EssaiInit/aide1 create mode 100644 InterfaceQT4/monWidgetCommandeDeplie1Niveau.py create mode 100644 InterfaceQT4/monWidgetTableau.py create mode 120000 Med/Cata_MED_FAM.xml rename {monCode => Med}/Catalogues/Cata_MED_FAM v2.xml (100%) rename {monCode => Med}/Catalogues/Cata_MED_FAM.xml (100%) rename {monCode => Med}/configuration_MED.py (100%) rename {monCode => Med}/prefs.py (100%) rename {monCode => Med}/prefs_MED.py (100%) rename {monCode => Med}/properties.py (100%) rename {monCode => Med}/qtEficas_Med.py (100%) create mode 100644 UiQT5/commandeTableau.ui create mode 100644 UiQT5/dateEtHeure.ui create mode 100644 UiQT5/desWidgetFactTableau.ui diff --git a/monCode/ModeleEficas/Model Efficas (1.1) v6 ext.xsd b/Efi2Xsd/ModeleEficas/Model Efficas (1.1) v6 ext.xsd similarity index 100% rename from monCode/ModeleEficas/Model Efficas (1.1) v6 ext.xsd rename to Efi2Xsd/ModeleEficas/Model Efficas (1.1) v6 ext.xsd diff --git a/monCode/ModeleEficas/Model Efficas (1.1) v6.xsd b/Efi2Xsd/ModeleEficas/Model Efficas (1.1) v6.xsd similarity index 100% rename from monCode/ModeleEficas/Model Efficas (1.1) v6.xsd rename to Efi2Xsd/ModeleEficas/Model Efficas (1.1) v6.xsd diff --git a/EssaiInit/README.txt b/Efi2Xsd/README.txt similarity index 100% rename from EssaiInit/README.txt rename to Efi2Xsd/README.txt diff --git a/monCode/XSL/Eficas2Xsd.xslt b/Efi2Xsd/XSL/Eficas2Xsd.xslt similarity index 100% rename from monCode/XSL/Eficas2Xsd.xslt rename to Efi2Xsd/XSL/Eficas2Xsd.xslt diff --git a/monCode/XSL/MED_FAM_gen.xsd b/Efi2Xsd/XSL/MED_FAM_gen.xsd similarity index 100% rename from monCode/XSL/MED_FAM_gen.xsd rename to Efi2Xsd/XSL/MED_FAM_gen.xsd diff --git a/monCode/XSL/MED_FAM_v2_gen.xsd b/Efi2Xsd/XSL/MED_FAM_v2_gen.xsd similarity index 100% rename from monCode/XSL/MED_FAM_v2_gen.xsd rename to Efi2Xsd/XSL/MED_FAM_v2_gen.xsd diff --git a/monCode/XSL/MappingMapToXMLSchema_1_1__ef.xslt b/Efi2Xsd/XSL/MappingMapToXMLSchema_1_1__ef.xslt similarity index 100% rename from monCode/XSL/MappingMapToXMLSchema_1_1__ef.xslt rename to Efi2Xsd/XSL/MappingMapToXMLSchema_1_1__ef.xslt diff --git a/monCode/XSL/Saxon.cmd b/Efi2Xsd/XSL/Saxon.cmd similarity index 100% rename from monCode/XSL/Saxon.cmd rename to Efi2Xsd/XSL/Saxon.cmd diff --git a/EssaiInit/efficas.py b/Efi2Xsd/efficas.py similarity index 100% rename from EssaiInit/efficas.py rename to Efi2Xsd/efficas.py diff --git a/EssaiInit/model.xsd b/Efi2Xsd/model.xsd similarity index 67% rename from EssaiInit/model.xsd rename to Efi2Xsd/model.xsd index 53fe25af..2492a38b 100755 --- a/EssaiInit/model.xsd +++ b/Efi2Xsd/model.xsd @@ -1,43 +1,23 @@ - + + - - + + + - - - SIMP devrait être selectionné que si .//SIMP[portee='Global'] - - - - - - - - - - - SIMP devrait être selectionné que si .//SIMP[portee='Global'] - - - - - - - - - + @@ -75,7 +55,7 @@ - + @@ -84,7 +64,7 @@ - + @@ -96,10 +76,85 @@ - + + + + + + SIMP devrait être selectionné que si .//SIMP[portee='Global'] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + @@ -108,22 +163,105 @@ - - + + + + SIMP devrait être selectionné que si .//SIMP[portee='Global'] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + + + + + + SIMP devrait être selectionné que si .//SIMP[portee='Global'] + + + + + + + + + + - + - La valuer -1 equivaut à oo + La valeur -1 equivaut à oo - - + + - + + + + SIMP devrait être selectionné que si .//SIMP[portee='Global'] + + + + + + + + + - + @@ -172,18 +323,18 @@ 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 valuer -1 equivaut à oo + La valeur -1 equivaut à oo @@ -258,14 +409,7 @@ - - - - + @@ -275,14 +419,7 @@ - - - - + @@ -365,8 +502,8 @@ @@ -445,7 +582,7 @@ - + - TXM - TXM - - I - TXM - I - I - - - I - TXM - - - - - - diff --git a/EssaiInit/Cata_MED_FAM.xml.mini b/EssaiInit/Cata_MED_FAM.xml.mini deleted file mode 100755 index 75acb49a..00000000 --- a/EssaiInit/Cata_MED_FAM.xml.mini +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - TXM - - - TXM - TXM - - I - TXM - I - I - - - I - TXM - - - - - - diff --git a/EssaiInit/Cata_MED_FAM.xml.origin b/EssaiInit/Cata_MED_FAM.xml.origin deleted file mode 100755 index 75acb49a..00000000 --- a/EssaiInit/Cata_MED_FAM.xml.origin +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - TXM - - - TXM - TXM - - I - TXM - I - I - - - I - TXM - - - - - - diff --git a/EssaiInit/aide1 b/EssaiInit/aide1 deleted file mode 100644 index 96187efc..00000000 --- a/EssaiInit/aide1 +++ /dev/null @@ -1,256 +0,0 @@ -Factory - -OPER - -PROC - -_Abstract - -_AddElement - -_AlternativeConstructor - -_AttributeMap - -_AttributeWildcard - -_Automaton - -_CT_ELEMENT_ONLY - -_CT_EMPTY - -_CT_MIXED - -_CT_SIMPLE - -_CompatibleValue - -_ContentTypeTag - -_DynamicCreate - -_DynamicCreate_mixin__AlternativeConstructorAttribute - -_DynamicCreate_mixin__SupersedingClassAttribute - -_ElementBindingDeclForName - -_ElementMap - -_ExpandedName - -_GetValidationConfig - -_HasWildcardElement - -_IsMixed - -_IsSimpleTypeContent - -_IsUrType - -_Locatable_mixin__location - -_Name - -_PerformValidation - -_PreFactory_vx - -_PyXBFactoryKeywords - -_RequireXSIType - -_ReservedSymbols - -_SetAlternativeConstructor - -_SetSupersedingClass - -_SetValidationConfig - -_SupersedingClass - -_T_commandes__OPER - -_T_commandes__PROC - -_TypeBinding_mixin__AttributesFromDOM - -_TypeBinding_mixin__WarnedUnassociatedElement - -_TypeBinding_mixin__checkNilCtor - -_TypeBinding_mixin__constructedWithValue - -_TypeBinding_mixin__element - -_TypeBinding_mixin__getValidationConfig - -_TypeBinding_mixin__namespaceContext - -_TypeBinding_mixin__xsiNil - -_TypeDefinition - -_UseForTag - -_XSDLocation - -__class__ - -__delattr__ - -__dict__ - -__doc__ - -__format__ - -__getattribute__ - -__hash__ - -__httpchercheurs_edf_comlogicielsefficas_T_commandes_httpchercheurs_edf_comlogicielsefficasOPER - -__httpchercheurs_edf_comlogicielsefficas_T_commandes_httpchercheurs_edf_comlogicielsefficasPROC - -__init__ - -__module__ - -__new__ - -__reduce__ - -__reduce_ex__ - -__repr__ - -__setattr__ - -__sizeof__ - -__str__ - -__subclasshook__ - -__weakref__ - -_addContent - -_appendWildcardElement - -_automatonConfiguration - -_complexTypeDefinition__NeedWarnOnContent - -_complexTypeDefinition__WarnOnContent - -_complexTypeDefinition__automatonConfiguration - -_complexTypeDefinition__childrenForDOM - -_complexTypeDefinition__content - -_complexTypeDefinition__setContent - -_complexTypeDefinition__wildcardAttributeMap - -_complexTypeDefinition__wildcardElements - -_constructedWithValue - -_description - -_diagnosticName - -_element - -_finalizeContentModel - -_isNil - -_location - -_namespaceContext - -_performValidation - -_postDOMValidate - -_postFactory_vx - -_resetAutomaton - -_resetContent - -_setAttribute - -_setAttributesFromKeywordsAndDOM - -_setDOMFromAttributes - -_setElement - -_setIsNil - -_setLocation - -_setNamespaceContext - -_setValidationConfig - -_substitutesFor - -_symbolSet - -_toDOM_csc - -_validateAttributes - -_validateBinding_vx - -_validatedChildren - -_validationConfig - -_validationConfig_ - -append - -content - -extend - -orderedContent - -reset - -toDOM - -toxml - -validateBinding - -value - -wildcardAttributeMap - -wildcardElements - -xsdConstraintsOK - -_______________________ -je passe ds CreerAccas -PlageValeur -ValeurDef -doc -portee -statut -o -typeAttendu -TXM -validators -_______________________ diff --git a/InterfaceQT4/browser.py b/InterfaceQT4/browser.py index 230bbffe..3ec33c24 100644 --- a/InterfaceQT4/browser.py +++ b/InterfaceQT4/browser.py @@ -348,10 +348,11 @@ class JDCNode(QTreeWidgetItem,GereRegles): self.editor.fenetreCentraleAffichee.close() self.editor.fenetreCentraleAffichee.deleteLater() - from monWidgetNiveauFact import MonWidgetNiveauFact + from monWidgetNiveauFact import MonWidgetNiveauFact, MonWidgetNiveauFactTableau maDefinition=self.item.get_definition() monObjet=self.item.object - self.maFenetreCadre=MonWidgetNiveauFact(self,self.editor,maDefinition,monObjet) + if maDefinition.fenetreIhm=='Tableau' : self.maFenetreCadre=MonWidgetNiveauFactTableau(self,self.editor,maDefinition,monObjet) + else : self.maFenetreCadre=MonWidgetNiveauFact(self,self.editor,maDefinition,monObjet) self.fenetre=self.maFenetreCadre self.editor.widgetCentraleLayout.addWidget(self.maFenetreCadre) self.editor.fenetreCentraleAffichee=self.maFenetreCadre diff --git a/InterfaceQT4/compofact.py b/InterfaceQT4/compofact.py index d8d7cd28..0f770e3e 100644 --- a/InterfaceQT4/compofact.py +++ b/InterfaceQT4/compofact.py @@ -19,19 +19,19 @@ # from __future__ import absolute_import -from . import browser -from . import typeNode +from InterfaceQT4 import browser +from InterfaceQT4 import typeNode from Extensions.i18n import tr from Editeur import Objecttreeitem import six +import traceback class Node(browser.JDCNode,typeNode.PopUpMenuNodePartiel): def getPanelGroupe(self,parentQt,commande,insertIn=-1): - import traceback maDefinition=self.item.get_definition() monObjet=self.item.object monNom=self.item.nom @@ -39,15 +39,15 @@ class Node(browser.JDCNode,typeNode.PopUpMenuNodePartiel): if hasattr(parentQt,'niveau'): self.niveau=parentQt.niveau+1 else : self.niveau=1 #if hasattr(self,'plie') :print self.item.nom, self.plie - #if maDefinition.sensLayout == 'horizontal': - # from .monWidgetFact import MonWidgetFactHorizontal - # widget=MonWidgetFactHorizontal(self,self.editor,parentQt,maDefinition,monObjet,self.niveau,maCommande) + #if maDefinition.fenetreIhm == 'Tableau': + # from InterfaceQt4.monWidgetFact import MonWidgetFactTableau + # widget=MonWidgetFactTableau(self,self.editor,parentQt,maDefinition,monObjet,self.niveau,maCommande) #elif hasattr(self,'plie') and self.plie==True : 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) return widget diff --git a/InterfaceQT4/compomclist.py b/InterfaceQT4/compomclist.py index 34f6b2f1..47f9e487 100644 --- a/InterfaceQT4/compomclist.py +++ b/InterfaceQT4/compomclist.py @@ -83,7 +83,7 @@ class MCListTreeItem(Objecttreeitem.SequenceTreeItem,compofact.FACTTreeItem): def init(self): # Si l'objet Accas (MCList) a moins d'un mot cle facteur # on utilise directement ce mot cle facteur comme delegue - #print ('he suis dans init de MCListTreeItem') + print ('je suis dans init de MCListTreeItem') #import traceback #traceback.print_stack() self.updateDelegate() diff --git a/InterfaceQT4/editor.pourCIST b/InterfaceQT4/editor.pourCIST index 7051af09..5e7bd5b8 100644 --- a/InterfaceQT4/editor.pourCIST +++ b/InterfaceQT4/editor.pourCIST @@ -339,7 +339,7 @@ class JDCEditor(Ui_baseWidget,QWidget): if generator.plugins.has_key('dicoImbrique'): self.generator=generator.plugins['dicoImbrique']() jdc_formate=self.generator.gener(self.jdc) - dico=self.get_Dico() #generator.Dico + dico=self.getDico() #generator.Dico for k in dico['CONTINGENCY_PROCESSING'].keys(): @@ -358,7 +358,7 @@ class JDCEditor(Ui_baseWidget,QWidget): ### return dico - #return self.get_Dico() + #return self.getDico() #-------------------# Pour execution avec output et error dans le bash def process_VP(self): @@ -366,7 +366,7 @@ class JDCEditor(Ui_baseWidget,QWidget): if 'dicoImbrique' in generator.plugins: self.generator=generator.plugins['dicoImbrique']() jdc_formate=self.generator.gener(self.jdc) - dico=self.get_Dico() #generator.Dico + dico=self.getDico() #generator.Dico return dico @@ -378,7 +378,7 @@ class JDCEditor(Ui_baseWidget,QWidget): return noeudAvantCommentaire=self.tree.selectedItems()[0] if noeudAvantCommentaire ==self.tree.racine : - self.tree.racine.append_child("COMMENTAIRE",pos=0) + self.tree.racine.appendChild("COMMENTAIRE",pos=0) return noeudAvantCommentaire.addComment(True) @@ -615,7 +615,7 @@ class JDCEditor(Ui_baseWidget,QWidget): #-----------------------# def viewJdcPy(self): #-----------------------# - strSource = str( self.get_text_JDC(self.format) ) + strSource = str( self.getTextJDC(self.format) ) self._viewText(strSource, "JDC_RESULTAT") #-----------------------# @@ -670,7 +670,7 @@ class JDCEditor(Ui_baseWidget,QWidget): self.labelCommentaire.setText("") #-------------------# - def init_modif(self): + def initModif(self): #-------------------# """ Met l'attribut modified a 'o' : utilise par Eficas pour savoir @@ -753,8 +753,8 @@ class JDCEditor(Ui_baseWidget,QWidget): """ self.chercheNoeudSelectionne() if len(self.node_selected) == 0 : return - if len(self.node_selected) == 1 : self.node_selected[0].update_node_label_in_blue() - else : self.node_selected[0].update_plusieurs_node_label_in_blue(self.node_selected) + if len(self.node_selected) == 1 : self.node_selected[0].updateNodeLabelInBlue() + else : self.node_selected[0].updatePlusieursNodeLabelInBlue(self.node_selected) self.QWParent.edit="copier" self.QWParent.noeud_a_editer = self.node_selected @@ -804,7 +804,7 @@ class JDCEditor(Ui_baseWidget,QWidget): except : pass return - self.init_modif() + self.initModif() child.select() except : traceback.print_exc() @@ -827,7 +827,7 @@ class JDCEditor(Ui_baseWidget,QWidget): # indexNoeudACopier=noeudACopier.treeParent.children.index(noeudACopier) indexNoeudACopier=self.getTreeIndex(noeudACopier) noeudACopier.treeParent.item.deplaceEntite(indexNoeudACopier,indexNoeudOuColler,pos) - noeudACopier.treeParent.build_children() + noeudACopier.treeParent.buildChildren() #else: except: @@ -915,7 +915,7 @@ class JDCEditor(Ui_baseWidget,QWidget): return self.fichier #---------------------------# - def get_file_variable(self) : + def getFileVariable(self) : #---------------------------# titre = tr("Choix d'un fichier XML") texte = tr("Le fichier contient une commande MODEL\n") @@ -941,7 +941,7 @@ class JDCEditor(Ui_baseWidget,QWidget): fn = six.text_type(fn) if txt == None : - txt = self.get_text_JDC(self.format,formatLigne=formatLigne) + txt = self.getTextJDC(self.format,formatLigne=formatLigne) eol = '\n' if len(txt) >= len(eol): if txt[-len(eol):] != eol: @@ -949,7 +949,7 @@ class JDCEditor(Ui_baseWidget,QWidget): else: txt += eol txt=self.ajoutVersionCataDsJDC(txt) - checksum=self.get_checksum(txt) + checksum=self.getChecksum(txt) txt=txt+checksum if self.code=="TELEMAC" : return 1 try: @@ -966,7 +966,7 @@ class JDCEditor(Ui_baseWidget,QWidget): return 0 #-----------------------------------------------------------# - def get_text_JDC(self,format,pourRun=0,formatLigne="beautifie"): + def getTextJDC(self,format,pourRun=0,formatLigne="beautifie"): #-----------------------------------------------------------# if self.code == "MAP" and not(format in generator.plugins): format = "MAP" if format in generator.plugins: @@ -994,7 +994,7 @@ class JDCEditor(Ui_baseWidget,QWidget): return "" #----------------------# - def get_Dico(self): + def getDico(self): #---------------------# if 'dicoImbrique' in generator.plugins: self.generator=generator.plugins['dicoImbrique']() @@ -1032,7 +1032,7 @@ class JDCEditor(Ui_baseWidget,QWidget): return if self.modified or self.fichier==None : self.fichierMapInput = self.__generateTempFilename(prefix = "map_run", suffix = ".map") - texte=self.get_text_JDC("MAP") + texte=self.getTextJDC("MAP") self.writeFile( self.fichierMapInput, txt = texte) else : self.fichierMapInput=self.fichier @@ -1069,7 +1069,7 @@ class JDCEditor(Ui_baseWidget,QWidget): if self.modified or self.fichier==None : #if 1: self.fichierZcracksInput = self.__generateTempFilename(prefix = "zcracks_run", suffix = ".z7p") - texte=self.get_text_JDC("ZCRACKS",pourRun=1) + texte=self.getTextJDC("ZCRACKS",pourRun=1) self.writeFile( self.fichierZcracksInput, txt = texte) else : self.fichierZcracksInput=self.fichier @@ -1090,7 +1090,7 @@ class JDCEditor(Ui_baseWidget,QWidget): if self.modified or self.fichier==None : QMessageBox.critical( self, tr( "Execution impossible "),tr("Sauvegarder SVP avant l'execution ")) return - if not hasattr(self,'generator'): texte=self.get_text_JDC(self.format) + if not hasattr(self,'generator'): texte=self.getTextJDC(self.format) from PrepareRunCarmel import prepareRunCarmel fichierGenerique=os.path.basename(self.fichier).split(".")[0] repMed=os.path.dirname(self.fichier) @@ -1196,7 +1196,7 @@ class JDCEditor(Ui_baseWidget,QWidget): if not hasattr(self, 'fichierMapInput') or not self.fichierMapInput or not os.path.exists(self.fichierMapInput): self.fichierMapInput = self.__generateTempFilename(prefix = "map_run", suffix = ".map") - texte=self.get_text_JDC("MAP") + texte=self.getTextJDC("MAP") self.writeFile( self.fichierMapInput, txt = texte) cmd = ("map gen -t dat -n " + composant + " -i " + self.fichierMapInput + " -o " + fn) @@ -1213,13 +1213,13 @@ class JDCEditor(Ui_baseWidget,QWidget): #-----------------------------------------# - def cherche_Groupes(self): + def chercheGroupes(self): #-----------------------------------------# - listeMA,listeNO=self.get_text_JDC("GroupMA") + listeMA,listeNO=self.getTextJDC("GroupMA") return listeMA,listeNO #-----------------------------------------# - def cherche_Dico(self): + def chercheDico(self): #-----------------------------------------# dicoCourant={} format = self.appliEficas.format_fichier @@ -1328,7 +1328,7 @@ class JDCEditor(Ui_baseWidget,QWidget): if newName is not None: self.appliEficas.addToRecentList(newName) self.tree.racine.item.getObject().nom=os.path.basename(newName) - self.tree.racine.update_node_label() + self.tree.racine.updateNodeLabel() if self.jdc.isvalid() != 0 and hasattr(self.generator, "writeDefault"): self.generator.writeDefault(fn) @@ -1369,7 +1369,7 @@ class JDCEditor(Ui_baseWidget,QWidget): #---------------------------------------------# - def get_file(self,unite=None,fic_origine = ''): + def getFile(self,unite=None,fic_origine = ''): #---------------------------------------------# # appele par I_JDC ulfile = None @@ -1392,7 +1392,7 @@ class JDCEditor(Ui_baseWidget,QWidget): titre, self.appliEficas.CONFIGURATION.savedir) - # ce retour est impose par le get_file d'I_JDC + # ce retour est impose par le getFile d'I_JDC if fn== '' : return None," " if not fn : return (0, " ") fn=fn[0] @@ -1418,7 +1418,7 @@ class JDCEditor(Ui_baseWidget,QWidget): etape=monItem.item.object CONTEXT.set_current_step(etape) etape.build_includeInclude(texte) - self.tree.racine.build_children() + self.tree.racine.buildChildren() #-----------------------------------# def updateJdcEtape(self, itemApres,texte): @@ -1435,7 +1435,7 @@ class JDCEditor(Ui_baseWidget,QWidget): QMessageBox.information( self, tr("Import texte"), tr("Impossible d importer le texte")) - self.tree.racine.build_children() + self.tree.racine.buildChildren() return ok @@ -1489,7 +1489,7 @@ class JDCEditor(Ui_baseWidget,QWidget): #print (mot, ouChercher) if ouChercher==None : return None monMC=ouChercher.get_child(MCFils,restreint="oui") - monMC.set_valeur(valeur) + monMC.setValeur(valeur) monMC.isvalid() @@ -1730,12 +1730,12 @@ class JDCEditor(Ui_baseWidget,QWidget): indexFin=text.find(":FIN CHECKSUM") checkAvant=text[indexDeb:indexFin+13] textJDC=text[0:indexDeb]+text[indexFin+13:-1] - checksum=self.get_checksum(textJDC) + checksum=self.getChecksum(textJDC) pareil=(checkAvant==checksum) return pareil, textJDC #---------------------------# - def get_checksum(self,texte): + def getChecksum(self,texte): #---------------------------# newtexte=texte.replace('"','\\"') commande='echo "'+newtexte+'"|md5sum' diff --git a/InterfaceQT4/monWidgetCommandeDeplie1Niveau.py b/InterfaceQT4/monWidgetCommandeDeplie1Niveau.py new file mode 100644 index 00000000..0648a944 --- /dev/null +++ b/InterfaceQT4/monWidgetCommandeDeplie1Niveau.py @@ -0,0 +1,132 @@ +# 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 +from __future__ import absolute_import +try : + from builtins import str +except : pass +import types, os +import traceback + +from PyQt5.QtGui import QIcon +from InterfaceQT4.monWidgetCommande import MonWidgetCommande + +class MonWidgetCommandeDeplie1Niveau(MonWidgetCommande): +# Attention au MCLIST qui ne sont pas des MCFACT +# il faut donc surcharger un certain nb de fonction ici pour eux + + + + + def __init__(self,node,editor,etape): + MonWidgetCommande.__init__(self,node,editor,etape) + self.node.plieToutEtReaffiche=self.plieToutEtReaffiche + + def afficheMots(self): + #print ("debut de ---------------------- ds afficheMots de MonWidgetCommandeDeplie1Niveau ",self.node.item.nom) + #traceback.print_stack() + repIcon=self.editor.appliEficas.repIcon + fichier=os.path.join(repIcon, 'deleteRondVide.png') + icon = QIcon(fichier) + for node in self.node.children: + + node.plie=True + node.setPlieChildren() + if node.appartientAUnNoeudPlie==True : continue + + node.plieToutEtReaffiche = self.plieToutEtReaffiche + node.deplieToutEtReaffiche = self.deplieToutEtReaffiche + node.affichePanneau = self.affichePanneau + node.getPanel = self.getPanel + + widget=node.getPanelGroupe(self,self.maCommande) + self.listeFocus.append(node.fenetre) + + try : + node.fenetre.RBDeplie.setCheckable(False) + node.fenetre.RBDeplie.setEnabled(False) + node.fenetre.RBDeplie.setIcon(icon) + except : pass + + if node.item.object.isMCList() : + node.setDeplie = self.setDepliePourMCList + + for c in node.children : + c.setDeplie = self.setDepliePourNode + c.plieToutEtReaffiche = self.plieToutEtReaffiche + c.deplieToutEtReaffiche = self.deplieToutEtReaffiche + c.getPanel = self.getPanel + c.affichePanneau = self.affichePanneau + try : + c.fenetre.RBDeplie.setCheckable(False) + c.fenetre.RBDeplie.setEnabled(False) + c.fenetre.RBDeplie.setIcon(icon) + except : + pass + else : + node.setDeplie=self.setDepliePourNode + + #print ("fin ------------------------ afficheMots de MonWidgetCommandeDeplie1Niveau ",self.node.item.nom) + + def setDepliePourNode(self): + noeudCourant=self.node.tree.itemCourant + noeudCourant.setDeplieChildren() + noeudCourant.afficheCeNiveau() + pass + + + def setDepliePourMCList(self): + #print ('je surcharge setDeplie pour MCList') + pass + + def setPlieChildren(self): + #print ('je surcharge setPlieChildren') + pass + + def setDeplieChildren(self): + #print ('je surcharge setDeplieChildren') + pass + + def plieToutEtReaffiche(self): + #print ('je surcharge plieToutEtReaffiche', self.node.item.nom) + pass + + def deplieToutEtReaffiche(self): + #print ('je surcharge deplieToutEtReaffiche', self.node.tree.itemCourant.item.getLabelText()) + pass + + def plieToutEtReafficheSaufItem(self): + #print ('je surcharge plieToutEtReaffiche', self.node.tree.itemCourant.item.getLabelText()) + pass + + def affichePanneau(self): + #print ('je surcharge affichePanneau', self.node.tree.itemCourant.item.getLabelText()) + item=self.node.tree.itemCourant.item + self.setDepliePourNode() + self.editor.fenetreCentraleAffichee.labelNomCommande.setText(item.getLabelText()[0]) + self.editor.fenetreCentraleAffichee.labelDoc.setText(item.getFr()) + + def afficheSuivant(self,aAfficher): + fenetre=self.node.tree.itemCourant.fenetre + fenetre.afficheSuivant(aAfficher) + + def getPanel (self): + #print ('surcharge ds getPanel') + pass diff --git a/InterfaceQT4/monWidgetFact.py b/InterfaceQT4/monWidgetFact.py index e3dd432a..5e519195 100644 --- a/InterfaceQT4/monWidgetFact.py +++ b/InterfaceQT4/monWidgetFact.py @@ -26,7 +26,7 @@ from PyQt5.QtWidgets import QWidget from .groupe import Groupe from desWidgetFact import Ui_WidgetFact -#from desWidgetFactHorizon import Ui_WidgetFactHorizon +from desWidgetFactTableau import Ui_WidgetFactTableau from Extensions.i18n import tr # Import des panels @@ -60,9 +60,12 @@ class MonWidgetFactCommun(Groupe): class MonWidgetFact(Ui_WidgetFact,MonWidgetFactCommun): - def __init__(self,node,editor,parentQt,definition, obj, niveau,commande,insertIn=True): + def __init__(self,node,editor,parentQt,definition, obj, niveau,commande,insertIn=1): MonWidgetFactCommun.__init__(self,node,editor,parentQt, definition,obj,niveau,commande,insertIn) -#class MonWidgetFactHorizontal(Ui_WidgetFactHorizon,MonWidgetFactCommun): -# def __init__(self,node,editor,parentQt,definition, obj, niveau,commande): -# MonWidgetFactCommun.__init__(self,node,editor,parentQt, definition,obj,niveau,commande) +#class MonWidgetFactTableau(Ui_WidgetFactTableau,MonWidgetFactCommun): +class MonWidgetFactTableau(Ui_WidgetFact,MonWidgetFactCommun): + def __init__(self,node,editor,parentQt,definition, obj, niveau,commande,insertIn=1): + MonWidgetFactCommun.__init__(self,node,editor,parentQt, definition,obj,niveau,commande,insertIn) + print ('je passe dans FactTableau') + MonWidgetFactTableau.__init__(self,node,editor,parentQt, definition,obj,niveau,commande) diff --git a/InterfaceQT4/monWidgetNiveauFact.py b/InterfaceQT4/monWidgetNiveauFact.py index b70a5c14..29bcd889 100644 --- a/InterfaceQT4/monWidgetNiveauFact.py +++ b/InterfaceQT4/monWidgetNiveauFact.py @@ -28,14 +28,9 @@ import types from desWidgetNiveauFact import Ui_WidgetNiveauFact from InterfaceQT4.groupe import Groupe -#from .gereIcones import FacultatifOuOptionnel +from InterfaceQT4.monWidgetTableau import MonFactTableauCommun from PyQt5.QtWidgets import QWidget -#from PyQt5.QtWidgets import QApplication, QWidget, QSpacerItem, QSizePolicy -#from PyQt5.QtGui import QFont, QIcon -#from PyQt5.QtCore import QTimer -#from PyQt5.QtCore import Qt - from Extensions.i18n import tr @@ -52,6 +47,7 @@ class MonWidgetNiveauFact(Ui_WidgetNiveauFact,Groupe): self.listeAffichageWidget=[] Groupe.__init__(self,node,editor,None,definition,obj,1,self) self.afficheOptionnel() + self.inhibe=False def reaffiche(self,nodeAVoir=None): self.node.setDeplieChildren() @@ -163,3 +159,7 @@ class MonWidgetNiveauFact(Ui_WidgetNiveauFact,Groupe): self.monGroupe=self.monOptionnel.afficheOptionnel(liste,liste_rouge,self) +class MonWidgetNiveauFactTableau(MonWidgetNiveauFact, MonFactTableauCommun): + def __init__(self,node,editor,definition,obj): + MonWidgetNiveauFact.__init__(self,node,editor,definition,obj) + MonFactTableauCommun.__init__(self) diff --git a/InterfaceQT4/monWidgetTableau.py b/InterfaceQT4/monWidgetTableau.py new file mode 100644 index 00000000..d0bafc80 --- /dev/null +++ b/InterfaceQT4/monWidgetTableau.py @@ -0,0 +1,325 @@ +# -*- 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 +from __future__ import absolute_import +try : + from builtins import str + from builtins import range + from builtins import object +except : pass + +import types,os,sys + +from six.moves import range +from PyQt5.QtGui import QIcon +from PyQt5.QtWidgets import QApplication, QMessageBox +from PyQt5.QtCore import QTimer, QSize, Qt + +# Modules Eficas +from Extensions.i18n import tr + +from .feuille import Feuille +from desWidgetPlusieursBase import Ui_WidgetPlusieursBase +from .politiquesValidation import PolitiquePlusieurs +from .qtSaisie import SaisieValeur +from .gereListe import GereListe +from .gereListe import GerePlie +from .gereListe import LECustom + + +class MonFactTableauCommun : + + def __init__(self): + print "MonFactTableauCommun" + +#,GereListe,GerePlie): +# +# def __init__(self,node,monSimpDef,nom,objSimp,parentQt,commande): +# #print "MonWidgetPlusieursBase", nom +# self.inFocusOutEvent=False +# self.nomLine="lineEditVal" +# self.inInit=True +# self.indexDernierLabel=0 +# self.NumLineEditEnCours=0 +# self.listeAffichageWidget=[] +# Feuille.__init__(self,node,monSimpDef,nom,objSimp,parentQt,commande) +# GereListe.__init__(self) +# self.gereIconePlier() +# self.BSelectFichier.clicked.connect(self.selectInFile) +# +# if sys.platform[0:5]!="linux": +# repIcon=self.node.editor.appliEficas.repIcon +# fichier=os.path.join(repIcon, 'arrow_up.png') +# icon = QIcon(fichier) +# self.RBHaut.setIcon(icon) +# self.RBHaut.setIconSize(QSize(32, 32)) +# fichier2=os.path.join(repIcon, 'arrow_down.png') +# icon2 = QIcon(fichier2) +# self.RBBas.setIcon(icon2) +# fichier3=os.path.join(repIcon, 'file-explorer.png') +# icon3 = QIcon(fichier2) +# self.BSelectFichier.setIcon(icon3) +# self.BSelectFichier.setIconSize(QSize(32, 32)) +# icon=QIcon(self.repIcon+"/MoinsBleu.png") +# self.RBMoins.setIcon(icon) +# icon=QIcon(self.repIcon+"/PlusBleu.png") +# self.RBPlus.setIcon(icon) +# icon=QIcon(self.repIcon+"/verre-loupe-icone-6087-64.png") +# self.RBVoisListe.setIcon(icon) +# +# +# self.listeValeursCourantes=self.node.item.getListeValeurs() +# if self.monSimpDef.max != "**" and self.monSimpDef.max < 7: +# hauteurMax=dicoLongueur[self.monSimpDef.max] +# else : +# hauteurMax=220 +# # if self.monSimpDef.max == self.monSimpDef.min : self.setMaximumHeight(hauteur) +# self.resize(self.width(),hauteurMax) +# self.setMinimumHeight(hauteurMax) +# self.finCommentaireListe() +# self.parentQt.commandesLayout.insertWidget(-1,self) +# self.maCommande.listeAffichageWidget.append(self.lineEditVal1) +# self.AAfficher=self.lineEditVal1 +# self.inInit=False +# # PNPN a completer __ si tuple le type des tuples sinon le tuple +# self.monCommentaireLabel.setText(self.finCommentaireListe()) +# +# +# def setValeurs(self): +# self.vScrollBar = self.scrollArea.verticalScrollBar() +# self.politique=PolitiquePlusieurs(self.node,self.editor) +# # construction du min de valeur a entrer +# if self.monSimpDef.max == "**" : aConstruire=7 +# elif self.monSimpDef.max == float('inf'): aConstruire=7 +# else : aConstruire=self.monSimpDef.max +# +# for i in range(1,aConstruire): +# self.ajoutLineEdit() +# QApplication.processEvents() +# self.scrollArea.ensureWidgetVisible(self.lineEditVal1) +# self.listeValeursCourantes=self.node.item.getListeValeurs() +# index=1 +# for valeur in self.listeValeursCourantes : +# val=self.politique.getValeurTexte(valeur) +# nomLineEdit="lineEditVal"+str(index) +# if hasattr(self,nomLineEdit) : +# courant=getattr(self,nomLineEdit) +# if 'R' in self.objSimp.definition.type and str(val) != repr(val) : courant.setText(repr(val)) +# else : courant.setText(str(val)) +# else : +# self.ajoutLineEdit(val) +# index=index+1 +# # ajout d'une ligne vide ou affichage commentaire +# if self.indexDernierLabel < self.monSimpDef.max : self.ajoutLineEdit() +# else : self.scrollArea.setToolTip('nb max de valeurs atteint') +# #self.adjustSize() +# #self.vScrollBar.triggerAction(QScrollBar.SliderToMinimum) +# +# +# def ajoutLineEdit(self,valeur=None,): +# self.indexDernierLabel=self.indexDernierLabel+1 +# nomLineEdit="lineEditVal"+str(self.indexDernierLabel) +# if hasattr(self,nomLineEdit) : +# self.indexDernierLabel=self.indexDernierLabel-1 +# return +# nouveauLE = LECustom(self.scrollArea,self,self.indexDernierLabel) +# self.verticalLayoutLE.insertWidget(self.indexDernierLabel-1,nouveauLE) +# nouveauLE.setText("") +# if self.indexDernierLabel % 2 == 1 : nouveauLE.setStyleSheet("background:rgb(210,210,210)") +# else : nouveauLE.setStyleSheet("background:rgb(235,235,235)") +# nouveauLE.setFrame(False) +# nouveauLE.returnPressed.connect(self.changeValeur) +# +# setattr(self,nomLineEdit,nouveauLE) +# self.listeAffichageWidget.append(nouveauLE) +# self.etablitOrdre() +# if valeur != None : nouveauLE.setText(str(valeur)) +# # deux lignes pour que le ensureVisible fonctionne +# self.estVisible=nouveauLE +# if self.inInit==False :QTimer.singleShot(1, self.rendVisibleLigne) +# #if donneLeFocus==True : nouveauLE.setFocus() +# +# def etablitOrdre(self): +# i=0 +# while(i +1 < len(self.listeAffichageWidget)): +# self.listeAffichageWidget[i].setFocusPolicy(Qt.StrongFocus) +# self.setTabOrder(self.listeAffichageWidget[i],self.listeAffichageWidget[i+1]) +# i=i+1 +# # si on boucle on perd l'ordre +# +# +# def rendVisibleLigne(self): +# QApplication.processEvents() +# self.estVisible.setFocus() +# self.scrollArea.ensureWidgetVisible(self.estVisible,0,0) +# +# +# def finCommentaire(self): +# return self.finCommentaireListe() +# +# def ajout1Valeur(self,valeur=None): +# if valeur == None : return +# liste,validite=SaisieValeur.TraiteLEValeur(self,str(valeur)) +# if validite == 0 : return +# if liste ==[] : return +# listeVal=[] +# for valeur in self.listeValeursCourantes : listeVal.append(valeur) +# validite,comm,comm2,listeRetour=self.politique.ajoutValeurs(liste,-1,listeVal) +# if (comm2 != "" and comm != None) : return comm2 +# if validite : +# self.listeValeursCourantes=self.listeValeursCourantes+listeRetour +# if len(self.listeValeursCourantes) > self.monSimpDef.min : +# self.node.item.setValeur(self.listeValeursCourantes) +# self.reaffiche() +# return None +# else : +# return(comm2+" "+comm) +# +# def reaffiche(self): +# # A priori, on ne fait rien +# pass +# +# #def ajoutNValeur(self,liste) : +# # for val in liste : +# # i=1 +# # ajoute=False +# # while i < self.indexDernierLabel+1: +# # nomLineEdit="lineEditVal"+str(i) +# # courant=getattr(self,nomLineEdit) +# # valeur=courant.text() +# # if valeur == None or valeur == "" : +# # ajoute=True +# # courant.setText(str(val)) +# # commentaire=self.ajout1Valeur(val) +# # if (commentaire != None ): +# # self.editor.afficheInfos(commentaire,Qt.red) +# # courant.setText("") +# # break +# # else : +# # i=i+1 +# # if ajoute : continue +# # self.ajoutLineEdit(valeur=str(val)) +# # self.changeValeur() +# +# def ajoutNValeur(self,liste): +# #---------------------------- +# # attention quand on charge par un fichier, on ne peut pas se contenter d ajouter N fois 1 valeur +# # car alors le temps de verification devient prohibitif reconstructu=ion et verification a +# # chaque valeur. d ou l ajout de ajoutNTuple a politique plusieurs +# +# +# listeFormatee=list(liste) +# +# min,max=self.node.item.getMinMax() +# if self.objSimp.valeur == None : listeComplete=listeFormatee +# else : listeComplete =self.objSimp.valeur + listeFormatee +# +# if len(listeComplete) > max : +# texte=tr("Nombre maximum de valeurs ")+str(max)+tr(" atteint") +# self.editor.afficheInfos(texte,Qt.red) +# return +# +# validite,comm,comm2,listeRetour= self.politique.ajoutNTuple(listeComplete) +# if not validite : +# self.editor.affiche_infos(texte,Qt.red) +# return +# +# # on calcule le dernier lineedit rempli avant de changer la valeur +# if self.objSimp.valeur != None : indexDernierRempli=len(self.objSimp.valeur) +# else : indexDernierRempli=0 +# +# self.politique.recordValeur(listeComplete) +# +# indexDernierRempli=0 +# while ( indexDernierRempli < len(liste) ) : +# texte=liste[indexDernierRempli] +# if indexDernierRempli < self.indexDernierLabel: +# nomLineEdit="lineEditVal"+str(indexDernierRempli+1) +# courant=getattr(self,nomLineEdit) +# courant.setText(str(texte)) +# else : +# self.ajoutLineEdit(texte) +# indexDernierRempli = indexDernierRempli + 1 +# +# +# def changeValeur(self,changeDePlace=True,oblige=False): +# donneFocus=None +# derniereValeur=None +# self.listeValeursCourantes = [] +# fin=self.indexDernierLabel +# for i in range (1, fin): +# nomLineEdit="lineEditVal"+str(i) +# courant=getattr(self,nomLineEdit) +# valeur=courant.text() +# lval=valeur.split(',') +# if len (lval) > 1 : +# msgBox=QMessageBox() +# msgBox.setText("separator ',' ") +# msgBox.setInformativeText("Do you want to enter " + str (lval) + "?") +# msgBox.setStandardButtons( QMessageBox.Ok | QMessageBox.Cancel) +# msgBox.setDefaultButton(QMessageBox.Ok) +# ret = msgBox.exec_() +# if ret != 1024 : +# courant.setText("") +# return +# courant.setText(lval[0]) +# self.ajoutNValeur(lval[1:]) +# self.listeValeursCourantes = [] +# +# for i in range (1, self.indexDernierLabel+1): +# nomLineEdit="lineEditVal"+str(i) +# courant=getattr(self,nomLineEdit) +# valeur=courant.text() +# if valeur != None and valeur != "" : +# commentaire=self.ajout1Valeur(valeur) +# if (commentaire != None ): +# self.editor.afficheInfos(commentaire,Qt.red) +# courant.setText("") +# donneFocus=courant +# self.reaffiche() +# return +# else : +# self.editor.afficheInfos("") +# elif donneFocus==None : donneFocus=courant +# +# nomDernierLineEdit="lineEditVal"+str(self.indexDernierLabel) +# dernier=getattr(self,nomDernierLineEdit) +# derniereValeur=dernier.text() +# if changeDePlace: +# if donneFocus != None : +# donneFocus.setFocus() +# self.scrollArea.ensureWidgetVisible(donneFocus) +# elif self.indexDernierLabel < self.monSimpDef.max : +# self.ajoutLineEdit() +# if self.listeValeursCourantes == [] : return +# min,max = self.node.item.getMinMax() +# if len(self.listeValeursCourantes) < self.monSimpDef.min : +# self.editor.afficheInfos(tr('nb min de valeurs : ')+str( self.monSimpDef.min)) +# if len(self.listeValeursCourantes) < min and oblige==True: return +# if len(self.listeValeursCourantes) > max : return +# self.node.item.setValeur(self.listeValeursCourantes) +# if len(self.listeValeursCourantes) == self.monSimpDef.max : +# self.editor.afficheInfos(tr('nb max de valeurs atteint')) +# self.setValide() +# self.reaffiche() +# +# +# +## Avertissement quand on quitte le widget diff --git a/InterfaceQT4/readercataXML.py b/InterfaceQT4/readercataXML.py index 2dc217f0..5a737dc6 100644 --- a/InterfaceQT4/readercataXML.py +++ b/InterfaceQT4/readercataXML.py @@ -24,7 +24,6 @@ """ # Modules Python import sys, os -sys.path.insert(0,os.path.abspath(os.path.join(os.getcwd(),'..','EssaiInit',))) import autre_analyse_cata @@ -34,7 +33,7 @@ from monChoixCata import MonChoixCata from Extensions.i18n import tr from Extensions.eficas_exception import EficasException import uiinfo - +from Efi2Xsd import readerEfficas class READERCATA: @@ -64,8 +63,7 @@ class READERCATA: self.fic_cata = 'Cata_MED_FAM.xml' - import readerEfficas - xml = open('/home/A96028/QT5GitEficasTravail/XMLEficas/EssaiInit/Cata_MED_FAM.xml').read() + xml = open('/home/A96028/QT5GitEficasTravail/Med/Cata_MED_FAM.xml').read() SchemaMed = readerEfficas.efficas.CreateFromDocument(xml) SchemaMed.exploreCata() self.cata=(SchemaMed,) diff --git a/Med/Cata_MED_FAM.xml b/Med/Cata_MED_FAM.xml new file mode 120000 index 00000000..35e1d73e --- /dev/null +++ b/Med/Cata_MED_FAM.xml @@ -0,0 +1 @@ +Catalogues/Cata_MED_FAM.xml \ No newline at end of file diff --git a/monCode/Catalogues/Cata_MED_FAM v2.xml b/Med/Catalogues/Cata_MED_FAM v2.xml similarity index 100% rename from monCode/Catalogues/Cata_MED_FAM v2.xml rename to Med/Catalogues/Cata_MED_FAM v2.xml diff --git a/monCode/Catalogues/Cata_MED_FAM.xml b/Med/Catalogues/Cata_MED_FAM.xml similarity index 100% rename from monCode/Catalogues/Cata_MED_FAM.xml rename to Med/Catalogues/Cata_MED_FAM.xml diff --git a/monCode/configuration_MED.py b/Med/configuration_MED.py similarity index 100% rename from monCode/configuration_MED.py rename to Med/configuration_MED.py diff --git a/monCode/prefs.py b/Med/prefs.py similarity index 100% rename from monCode/prefs.py rename to Med/prefs.py diff --git a/monCode/prefs_MED.py b/Med/prefs_MED.py similarity index 100% rename from monCode/prefs_MED.py rename to Med/prefs_MED.py diff --git a/monCode/properties.py b/Med/properties.py similarity index 100% rename from monCode/properties.py rename to Med/properties.py diff --git a/monCode/qtEficas_Med.py b/Med/qtEficas_Med.py similarity index 100% rename from monCode/qtEficas_Med.py rename to Med/qtEficas_Med.py diff --git a/UiQT5/commandeTableau.ui b/UiQT5/commandeTableau.ui new file mode 100644 index 00000000..90718248 --- /dev/null +++ b/UiQT5/commandeTableau.ui @@ -0,0 +1,24 @@ + + + Form + + + + 0 + 0 + 760 + 515 + + + + Form + + + + + + + + + + diff --git a/UiQT5/dateEtHeure.ui b/UiQT5/dateEtHeure.ui new file mode 100644 index 00000000..0be453c5 --- /dev/null +++ b/UiQT5/dateEtHeure.ui @@ -0,0 +1,98 @@ + + + Form + + + + 0 + 0 + 281 + 51 + + + + Saisie date et heure + + + + + + + + + 0 + 0 + + + + + 101 + 31 + + + + + 101 + 31 + + + + Entrer la date + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Latin Modern Sans'; font-size:11pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">18/12/17</p></body></html> + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 13 + 20 + + + + + + + + + 0 + 0 + + + + + 101 + 31 + + + + + 101 + 31 + + + + Entrer l'heure + + + + + + + + + + diff --git a/UiQT5/desWidgetFactTableau.ui b/UiQT5/desWidgetFactTableau.ui new file mode 100644 index 00000000..f736a471 --- /dev/null +++ b/UiQT5/desWidgetFactTableau.ui @@ -0,0 +1,428 @@ + + + WidgetFactTableau + + + + 0 + 0 + 949 + 225 + + + + Qt::StrongFocus + + + Form + + + QGroupBox { + border: 1px solid gray; + border-radius: 5px; + margin-top: 1ex; /* leave space at the top for the title */ + } + + QGroupBox::title { + padding: 0 3px; + } + + + + 0 + + + 0 + + + 2 + + + 0 + + + 0 + + + + + 0 + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 5 + + + + + + + + + 21 + 15 + + + + + 21 + 21 + + + + border : 0px + + + ... + + + + ../Editeur/icons/minusnode.png../Editeur/icons/minusnode.png + + + + 21 + 21 + + + + + + + + + + Qt::Vertical + + + + + + + + + + + 0 + + + + + + 17 + 25 + + + + + 21 + 25 + + + + border : 0px + + + ... + + + + ../Editeur/icons/ast-green-ball.png../Editeur/icons/ast-green-ball.png + + + + 21 + 25 + + + + + + + + 0 + + + + + + 0 + 0 + + + + + 0 + 25 + + + + + 12121213 + 25 + + + + <html><head/><body><p><span style=" font-style:italic;">TextLabel</span></p></body></html> + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 13 + 20 + + + + + + + + + 0 + 0 + + + + + 200 + 0 + + + + + 1500 + 16 + + + + Qt::Horizontal + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 13 + 20 + + + + + + + + 0 + + + QLayout::SetFixedSize + + + + + + 21 + 31 + + + + + 21 + 31 + + + + Qt::ClickFocus + + + Lance un script associé à la commande + + + border : 0px + + + ... + + + + ../Editeur/icons/roue.png../Editeur/icons/roue.png + + + + 21 + 31 + + + + + + + + + 21 + 25 + + + + + 21 + 25 + + + + border : 0px + + + ... + + + + ../Editeur/icons/point-interrogation30.png../Editeur/icons/point-interrogation30.png + + + + 21 + 25 + + + + + + + + + 21 + 25 + + + + + 21 + 25 + + + + border : 0px + + + ... + + + + ../Editeur/icons/lettreRblanc30.png../Editeur/icons/lettreRblanc30.png + + + + 21 + 25 + + + + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 13 + 20 + + + + + + + + + 21 + 25 + + + + + 21 + 25 + + + + border : 0px + + + ... + + + + ../Editeur/icons/deleteRond.png../Editeur/icons/deleteRond.png + + + + 21 + 25 + + + + + + + + + + 0 + + + 2 + + + + + + + + + + + + MonBoutonValide + QToolButton +
monBoutonValide.h
+
+ + MonLabelClic + QLabel +
monLabelClic.h
+
+
+ + +
-- 2.39.2