import traceback
import six
-from PyQt5.QtWidgets import QMessageBox, QFileDialog , QMenu, QPushButton
+from PyQt5.QtWidgets import QMessageBox, QFileDialog , QMenu, QPushButton, QTreeView ,QListView, QAbstractItemView
from PyQt5.QtGui import QIcon
from PyQt5.QtCore import QFileInfo, Qt, QSize, QVariant
if not ( hasattr(self,"BFichier")): return
mc = self.node.item.get_definition()
mctype = mc.type[0]
- if mctype == "Repertoire":
+ if mctype == "FichierOuRepertoire":
+ self.BFichierOuRepertoire=self.BFichier
+ self.BFichierOuRepertoire.clicked.connect(self.BFichierOuRepertoirePressed)
+ self.BVisuFichier.close()
+ elif mctype == "Repertoire":
self.BRepertoire=self.BFichier
self.BRepertoire.clicked.connect(self.BRepertoirePressed)
self.BVisuFichier.close()
elif hasattr(self, "BSelectInFile"):
self.BSelectInFile.setVisible(0)
+ def BFichierOuRepertoirePressed(self):
+ self.fileName=""
+ print (0)
+ self.file_dialog=QFileDialog()
+ print (1)
+ self.file_dialog.setFileMode(QFileDialog.Directory);
+ print (2)
+ self.file_dialog.setFileMode(QFileDialog.Directory|QFileDialog.ExistingFiles)
+ print (3)
+ self.file_dialog.setOption(QFileDialog.DontUseNativeDialog,True);
+ self.file_dialog.setWindowTitle('Choose File or Directory')
+ self.explore(self.file_dialog)
+ self.file_dialog.exec_()
+ if self.fileName == "" : return
+ self.lineEditVal.setText(self.fileName)
+ self.LEValeurPressed()
+
+
+ def explore(self,widget):
+ for c in widget.children() :
+ if isinstance(c, QTreeView) :
+ c.clicked.connect (self.changeBoutonOpen)
+ self.monTreeView=c
+ try :
+ if c.text() == "&Open" : self.monBoutonOpen=c
+ except : pass
+ self.explore(c)
+
+
+ def changeBoutonOpen(self):
+ self.monBoutonOpen.setEnabled(True)
+ self.monBoutonOpen.setText("Choose")
+ self.monBoutonOpen.clicked.connect(self.monBoutonOpenClicked)
+ index = self.monTreeView.currentIndex();
+ self.fileName2 = self.monTreeView.model().data(index)
+
+ def monBoutonOpenClicked(self):
+ try :
+ self.fileName=self.file_dialog.selectedFiles()[0]
+ except :
+ self.fileName=self.file_dialog.directory().absolutePath()
+ self.file_dialog.close()
+ self.file_dialog=None
+
def BRepertoirePressed(self):
directory = QFileDialog.getExistingDirectory(self.appliEficas,
directory = self.appliEficas.CONFIGURATION.savedir,
else: raise ValError( "%s n'est pas un repertoire valide" % repr(obj))
except :
raise ValError( "%s n'est pas un repertoire valide" % repr(obj))
+ elif type_permis == 'FichierOuRepertoire':
+ import os
+ try :
+ if os.path.isdir(obj) or os.path.isfile(obj): return obj
+ else: raise ValError( "%s n'est pas un fichier ou un repertoire valide" % repr(obj))
+ except :
+ raise ValError( "%s n'est pas un fichier ou un repertoire valide" % repr(obj))
elif type(type_permis) == type or isinstance(type_permis, type):
try:
if self.is_object_from(obj, type_permis):
self.val_max = val_max
def default(self, obj, into, val_min, val_max):
+ if type(into) ==types.FunctionType :
+ maListeDeValeur=into()
+ into=maListeDeValeur
if into:
if obj not in into:
raise ValError(
str: six.text_type}
+#class FunctionValObjet(FunctionVal):
+#OOOOOOOOOOOOOOo
+
class TypeVal(ListVal):
"""
+++ /dev/null
-# coding: utf-8\r
-\r
-from Accas import *\r
-\r
-#class myMesh(ASSD): pass\r
-class myModel(ASSD): pass\r
-\r
-JdC = JDC_CATA(code='PATTERNS',\r
- execmodul=None,\r
- regles=(#AU_PLUS_UN('DEBUT', 'POURSUITE'),\r
- AU_PLUS_UN('ALL_LISTS'),\r
- #AU_PLUS_UN('FIN'),\r
- A_CLASSER(('DEBUT', 'POURSUITE'), 'FIN')\r
- )\r
-)\r
-\r
-class grma():\r
- def __convert__(cls,valeur):\r
- if isinstance(valeur, (str,unicode)) and len(valeur.strip()) <= 24 : #and ("item" in (valeur.strip()))\r
- return valeur.strip()\r
- raise ValueError("Name length does not contain \"test\" and is longer than allowed, 24")\r
- __convert__ = classmethod(__convert__)\r
-\r
-def mySeveral(suffix,num):\r
- out=list()\r
- for i in range(1,num+1):\r
- out.append(suffix+str(i).zfill(2))\r
- return out\r
-\r
-switch_facultatif=True #change 'o' to 'f' of some widgets in the loop\r
-#empty_defauts=True\r
-\r
-def myBloc(num):\r
- myNum=str(num).zfill(2)\r
- list_item_body="Item_"+myNum+"_"\r
- defauts0=["","",True,"'phenomena_"+myNum+"'",mySeveral(list_item_body,2)] #presence of default values\r
- defauts_mask=[False,False,True,True,True] #switch off defaults of some types\r
- defauts=list()\r
- for id0 in range(len(defauts0)):\r
- if defauts_mask[id0]:\r
- item=", defaut="+str(defauts0[id0])\r
- else:\r
- item=""\r
- defauts.append(item)\r
- #print defauts\r
-\r
- opt=['o','o','o','o','o'] #initial default obligation of items in FACT groups\r
- #make different widgets optional, one by one:\r
- myLen=len(opt)\r
- if switch_facultatif:\r
- make_f=(num)%myLen\r
- opt[make_f]='f'\r
- #print opt\r
- #if empty_defauts:\r
- # clean_defaut=num%myLen\r
-\r
- 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=2,max='**',into=mySeveral('"+list_item_body+"',"+str(num*4)+")"+defauts[4]+", ang='Input "+myNum+" list EN', fr='Input "+myNum+" list FR'),),)"\r
- print myString\r
- return eval(myString)\r
-\r
-ALL_LISTS=OPER(nom="ALL_LISTS",op=18,sd_prod=myModel,\r
- UIinfo={"groupes":("Group1",)},\r
- ang="Model mesh definition EN",\r
- reentrant='n',\r
- #regles=(AU_MOINS_UN('LIST_O_CHECKTEXT','LIST_F_CHECKTEXT','LIST_O_ANY','LIST_F_ANY')),\r
-\r
- #LIST_O_NOREPEAT_CHECKTEXT=SIMP(statut='o',typ=grma,validators=NoRepeat(),min=3, max='**'),\r
- #LIST_F_NOREPEAT_CHECKTEXT=SIMP(statut='f',typ=grma,validators=NoRepeat(),min=3, max='**'),\r
- #LIST_F_REPEAT_CHECKTEXT=SIMP(statut='f',typ=grma,min=3, max='**'),\r
- #LIST_O_REPEAT_CHECKTEXT=SIMP(statut='o',typ=grma,min=3, max='**'),\r
-\r
- #LIST_F_NOREPEAT_ANYTEXT=SIMP(statut='f',typ='TXM',validators=NoRepeat(),min=3, max='**'),\r
- #LIST_O_NOREPEAT_ANYTEXT=SIMP(statut='o',typ='TXM',min=3,validators=NoRepeat(), max='**'),\r
- #LIST_O_REPEAT_ANYTEXT=SIMP(statut='o',typ='TXM',min=3, max='**'),\r
- #LIST_F_REPEAT_ANYTEXT=SIMP(statut='f',typ='TXM',min=3, max='**'),\r
-\r
- #LIST_O_NOREPEAT_CHECKTEXT_ADD=SIMP(statut='o',typ=grma,validators=NoRepeat(), into=("item01","text01","item02","text02","item03","text03",), min=3, max='**'),\r
- #LIST_F_REPEAT_ANYTEXT_ADD=SIMP(statut='f',typ=grma,validators=NoRepeat(), into=("item01","text01","item02","text02","item03","text03",), min=3, max='**'),\r
-\r
- LIST_O_NOREPEAT_CHECKTEXT_ADD_NODEFAUT=SIMP(statut='o',typ=grma,validators=NoRepeat(), into=("item01","text01","item02","text02","item03","text03","item04","text04",), min=3, max='**'),\r
- #LIST_O_NOREPEAT_CHECKTEXT_ADD_DEFAUT=SIMP(statut='o',typ=grma,validators=NoRepeat(), into=("item01","text01","item02","text02","item03","text03",), defaut=('item01','item02','item03'), min=3, max='**'),\r
-)\r
-\r
-Classement_Commandes_Ds_Arbre=('DEBUT','MESH_TYPES','ALL_LISTS','FIN')\r
-\r
-Ordre_Des_Commandes = ('DEBUT','MESH_TYPES','ALL_LISTS','FIN')\r
+++ /dev/null
-# coding: utf-8\r
-from Accas import *\r
-\r
-#class myMesh(ASSD): pass\r
-class myModel(ASSD): pass\r
-\r
-JdC = JDC_CATA(code='PATTERNS',\r
- execmodul=None,\r
- regles=(#AU_PLUS_UN('DEBUT', 'POURSUITE'),\r
- AU_PLUS_UN('ALL_LISTS'),\r
- #AU_PLUS_UN('FIN'),\r
- A_CLASSER(('DEBUT', 'POURSUITE'), 'FIN')\r
- )\r
-)\r
-\r
-\r
-ALL_LISTS=OPER(nom="ALL_LISTS",op=18,sd_prod=myModel,\r
- UIinfo={"groupes":("Group1",)},\r
- ang="Model mesh definition EN",\r
- reentrant='n',\r
- LIST_O_NOREPEAT_CHECKTEXT_ADD_DEFAUT=SIMP(statut='o',typ="TXM",validators=NoRepeat(), \r
- into=("item01","text01","item02","text02","item03","text03","item04","text04","item05","text05",), \r
- defaut=('item01','item02','item03'),\r
- homo="SansOrdreNiDoublon",\r
- min=3, max='**'),\r
-\r
- #regles=(AU_MOINS_UN('LIST_O_CHECKTEXT','LIST_F_CHECKTEXT','LIST_O_ANY','LIST_F_ANY')),\r
-\r
- #LIST_O_NOREPEAT_CHECKTEXT=SIMP(statut='o',typ=grma,validators=NoRepeat(),min=3, max='**'),\r
- #LIST_F_NOREPEAT_CHECKTEXT=SIMP(statut='f',typ=grma,validators=NoRepeat(),min=3, max='**'),\r
- #LIST_F_REPEAT_CHECKTEXT=SIMP(statut='f',typ=grma,min=3, max='**'),\r
- #LIST_O_REPEAT_CHECKTEXT=SIMP(statut='o',typ=grma,min=3, max='**'),\r
-\r
- #LIST_F_NOREPEAT_ANYTEXT=SIMP(statut='f',typ='TXM',validators=NoRepeat(),min=3, max='**'),\r
- #LIST_O_NOREPEAT_ANYTEXT=SIMP(statut='o',typ='TXM',min=3,validators=NoRepeat(), max='**'),\r
- #LIST_O_REPEAT_ANYTEXT=SIMP(statut='o',typ='TXM',min=3, max='**'),\r
- #LIST_F_REPEAT_ANYTEXT=SIMP(statut='f',typ='TXM',min=3, max='**'),\r
-\r
- #LIST_O_NOREPEAT_CHECKTEXT_ADD=SIMP(statut='o',typ=grma,validators=NoRepeat(), into=("item01","text01","item02","text02","item03","text03",), min=3, max='**'),\r
- #LIST_F_REPEAT_ANYTEXT_ADD=SIMP(statut='f',typ=grma,validators=NoRepeat(), into=("item01","text01","item02","text02","item03","text03",), min=3, max='**'),\r
-\r
- #LIST_O_NOREPEAT_CHECKTEXT_ADD_NODEFAUT=SIMP(statut='o',typ=grma,validators=NoRepeat(), into=("item01","text01","item02","text02","item03","text03","item04","text04",), min=3, max='**'),\r
-\r
-\r
- #LIST_O_SANSORDRENODOUBLON_CHECKTEXT_DEFAUT=SIMP(statut='o',typ=grma,homo="SansOrdreNiDoublon", into=("item01","text01","item02","text02","item03","text03",), defaut=('item01','item02','item03'), min=3, max='**'),\r
-)\r
-\r
-\r
-\r
-Classement_Commandes_Ds_Arbre=('DEBUT','MESH_TYPES','ALL_LISTS','FIN')\r
-\r
-Ordre_Des_Commandes = ('DEBUT','MESH_TYPES','ALL_LISTS','FIN')\r
+++ /dev/null
-# coding: utf-8\r
-from Accas import *\r
-\r
-class myModel(ASSD): pass\r
-\r
-JdC = JDC_CATA(code='PATTERNS',\r
- execmodul=None,\r
- regles=(#AU_PLUS_UN('DEBUT', 'POURSUITE'),\r
- AU_PLUS_UN('ALL_LISTS'),\r
- #AU_PLUS_UN('FIN'),\r
- A_CLASSER(('DEBUT', 'POURSUITE'), 'FIN')\r
- )\r
-)\r
-\r
-class grma():\r
- def __convert__(cls,valeur):\r
- if isinstance(valeur, (str,unicode)) and len(valeur.strip()) <= 12 and ("item" in (valeur.strip()).lower()): #\r
- return valeur.strip()\r
- raise ValueError("Name length does not contain \"test\" and is longer than allowed, 12")\r
- __convert__ = classmethod(__convert__)\r
-\r
-def mySeveral(suffix,num):\r
- out=list()\r
- for i in range(1,num+1):\r
- out.append(suffix+str(i).zfill(2))\r
- return out\r
-\r
-ALL_LISTS=OPER(nom="ALL_LISTS",op=18,sd_prod=myModel,\r
- UIinfo={"groupes":("Group1",)},\r
- fr="All lists definition FR",\r
- ang="All lists definition EN",\r
- reentrant='n',\r
- #regles=(AU_MOINS_UN('LIST_O_CHECKTEXT','LIST_F_CHECKTEXT','LIST_O_ANY','LIST_F_ANY')),\r
-\r
- L1_LIST_O_NOREPEAT_CHECKTEXT=SIMP(statut='o',typ=grma,validators=NoRepeat(),min=3, max='**', ang='Obligatory, No Repetitions, checked text, EN'),\r
- L2_LIST_F_NOREPEAT_CHECKTEXT=SIMP(statut='f',typ=grma,validators=NoRepeat(),min=3, max='**', ang='Optional, No Repetitions, checked text, EN'),\r
- L3_LIST_F_REPEAT_CHECKTEXT=SIMP(statut='f',typ=grma,min=3, max='**',ang='Optional, Allowed Repetitions, checked text, EN'),\r
- L4_LIST_O_REPEAT_CHECKTEXT=SIMP(statut='o',typ=grma,min=3, max='**',ang='Obligatory, Allowed Repetitions, checked text, EN'),\r
-\r
- L5_LIST_F_NOREPEAT_ANYTEXT=SIMP(statut='f',typ='TXM',validators=NoRepeat(),min=3, max='**',ang='Optional, No Repetitions, any text, EN'),\r
- L6_LIST_O_NOREPEAT_ANYTEXT=SIMP(statut='o',typ='TXM',min=3,validators=NoRepeat(), max='**',ang='Obligatory, No Repetitions, any text, EN'),\r
- L7_LIST_O_REPEAT_ANYTEXT=SIMP(statut='o',typ='TXM',min=3, max='**',ang='Obligatory, Allowed Repetitions, any text, EN'),\r
- L8_LIST_F_REPEAT_ANYTEXT=SIMP(statut='f',typ='TXM',min=3, max='**',ang='Optional, Allowed Repetitions, any text, EN'),\r
-\r
- L9_LIST_O_NOREPEAT_CHECKTEXT_ADD=SIMP(statut='o',typ=grma,validators=NoRepeat(), into=("item01","text01","item02","text02","item03","text03",), min=3, max='**',ang='With spare list, Obligatory, No Repetitions, checked text, EN',),\r
- L10_LIST_F_REPEAT_ANYTEXT_ADD=SIMP(statut='f',typ='TXM', into=("item01","text01","item02","text02","item03","text03",), min=3, max='**',ang='With spare list, Optional, Allowed Repetitions, any text, EN'),\r
- L11_LIST_O_REPEAT_CHECKTEXT_ADD_NODEFAUT=SIMP(statut='o',typ=grma, into=("item01","text01","item02","text02","item03","text03","item04","text04"),ang='With spare list, obligatory, No Repetitions, checked text, no default values, EN', min=3, max='**'),\r
- L12_LIST_O_NOREPEAT_CHECKTEXT_ADD_DEFAUT=SIMP(statut='o',typ=grma,validators=NoRepeat(), into=("item01","text01","item02","text02","item03","text03","item04","text04","item05","text05",), defaut=('item01','item02','item03'), min=3, max='**',ang='With spare list, Obligatory, No Repetitions, checked text, with default values EN'),\r
-\r
- L13_LIST_F_SANSORDRENODOUBLON_ANYTEXT_NODEFAUT=SIMP(statut='f',typ='TXM',homo="SansOrdreNiDoublon", into=("item01","text01","item02","text02","item03","text03",), min=3, max='**',ang='With check boxes, Optional, any text, no defaults, EN'),\r
- L14_LIST_O_SANSORDRENODOUBLON_CHECKTEXT_NODEFAUT=SIMP(statut='o',typ=grma,homo="SansOrdreNiDoublon", into=("item01","text01","item02","text02","item03","text03",), min=3, max='**',ang='With check boxes, Obligatory, checked text, EN'),\r
- L15_LIST_O_SANSORDRENODOUBLON_CHECKTEXT_DEFAUT=SIMP(statut='o',typ=grma,homo="SansOrdreNiDoublon", into=("item01","text01","item02","text02","item03","text03","item02","text02","item01","text01",), defaut=('item01','item02','item03'), min=3, max='**', ang='With check boxes, Obligatory, checked text, with default values, EN'),\r
-)\r
-\r
-\r
-\r
-Classement_Commandes_Ds_Arbre=('DEBUT','MESH_TYPES','ALL_LISTS','FIN')\r
-\r
-Ordre_Des_Commandes = ('DEBUT','MESH_TYPES','ALL_LISTS','FIN')\r
+++ /dev/null
-# coding: utf-8\r
-from Accas import *\r
-\r
-class myModel(ASSD): pass\r
-\r
-JdC = JDC_CATA(code='PATTERNS',\r
- execmodul=None,\r
- regles=(#AU_PLUS_UN('DEBUT', 'POURSUITE'),\r
- AU_PLUS_UN('ALL_LISTS'),\r
- #AU_PLUS_UN('FIN'),\r
- A_CLASSER(('DEBUT', 'POURSUITE'), 'FIN')\r
- )\r
-)\r
-\r
-class grma():\r
- def __convert__(cls,valeur):\r
- if isinstance(valeur, (str,unicode)) and len(valeur.strip()) <= 12 and ("item" in (valeur.strip()).lower()): #\r
- return valeur.strip()\r
- raise ValueError("Name length does not contain \"item\" and is longer than allowed, 12")\r
- __convert__ = classmethod(__convert__)\r
-\r
-def mySeveral(suffix,num):\r
- out=list()\r
- for i in range(1,num+1):\r
- out.append(suffix+str(i).zfill(2))\r
- return out\r
-\r
-ALL_LISTS=OPER(nom="ALL_LISTS",op=18,sd_prod=myModel,\r
- UIinfo={"groupes":("Group1",)},\r
- fr="All lists definition FR",\r
- ang="All lists definition EN",\r
- reentrant='n',\r
- #regles=(AU_MOINS_UN('LIST_O_CHECKTEXT','LIST_F_CHECKTEXT','LIST_O_ANY','LIST_F_ANY')),\r
-\r
- L1_LIST_O_NOREPEAT_CHECKTEXT=SIMP(statut='o',typ=grma,validators=NoRepeat(),min=3, max='**', ang='Obligatory, No Repetitions, checked text, EN'),\r
- L2_LIST_F_NOREPEAT_CHECKTEXT=SIMP(statut='f',typ=grma,validators=NoRepeat(),min=3, max='**', ang='Optional, No Repetitions, checked text, EN'),\r
- L3_LIST_F_REPEAT_CHECKTEXT=SIMP(statut='f',typ=grma,min=3, max='**',ang='Optional, Allowed Repetitions, checked text, EN'),\r
- L4_LIST_O_REPEAT_CHECKTEXT=SIMP(statut='o',typ=grma,min=3, max='**',ang='Obligatory, Allowed Repetitions, checked text, EN'),\r
-\r
- L5_LIST_F_NOREPEAT_ANYTEXT=SIMP(statut='f',typ='TXM',validators=NoRepeat(),min=3, max='**',ang='Optional, No Repetitions, any text, EN'),\r
- L6_LIST_O_NOREPEAT_ANYTEXT=SIMP(statut='o',typ='TXM',min=3,validators=NoRepeat(), max='**',ang='Obligatory, No Repetitions, any text, EN'),\r
- L7_LIST_O_REPEAT_ANYTEXT=SIMP(statut='o',typ='TXM',min=3, max='**',ang='Obligatory, Allowed Repetitions, any text, EN'),\r
- L8_LIST_F_REPEAT_ANYTEXT=SIMP(statut='f',typ='TXM',min=3, max='**',ang='Optional, Allowed Repetitions, any text, EN'),\r
-\r
- L9_LIST_O_NOREPEAT_CHECKTEXT_ADD=SIMP(statut='o',typ=grma,validators=NoRepeat(), into=("item01","text01","item02","text02","item03","text03",), min=3, max='**',ang='With spare list, Obligatory, No Repetitions, checked text, EN',),\r
- L10_LIST_F_REPEAT_ANYTEXT_ADD=SIMP(statut='f',typ='TXM', into=("item01","text01","item02","text02","item03","text03",), min=3, max='**',ang='With spare list, Optional, Allowed Repetitions, any text, EN'),\r
- L11_LIST_O_REPEAT_CHECKTEXT_ADD_NODEFAUT=SIMP(statut='o',typ=grma, into=("item01","text01","item02","text02","item03","text03","item04","text04"),ang='With spare list, obligatory, No Repetitions, checked text, no default values, EN', min=3, max='**'),\r
- L12_LIST_O_NOREPEAT_CHECKTEXT_ADD_DEFAUT=SIMP(statut='o',typ=grma,validators=NoRepeat(), into=("item01","text01","item02","text02","item03","text03","item04","text04","item05","text05",), defaut=('item01','item02','item03'), min=3, max='**',ang='With spare list, Obligatory, No Repetitions, checked text, with default values EN'),\r
-\r
- L13_LIST_F_SANSORDRENODOUBLON_ANYTEXT_NODEFAUT=SIMP(statut='f',typ='TXM',homo="SansOrdreNiDoublon", into=("item01","text01","item02","text02","item03","text03",), min=3, max='**',ang='With check boxes, Optional, any text, no defaults, EN'),\r
- L14_LIST_O_SANSORDRENODOUBLON_CHECKTEXT_NODEFAUT=SIMP(statut='o',typ=grma,homo="SansOrdreNiDoublon", into=("item01","text01","item02","text02","item03","text03",), min=3, max='**',ang='With check boxes, Obligatory, checked text, EN'),\r
- L15_LIST_O_SANSORDRENODOUBLON_CHECKTEXT_NOREPEAT_DEFAUT=SIMP(statut='o',typ=grma,homo="SansOrdreNiDoublon", into=("item01","text01","item02","text02","item03","text03","item03","text03","item02","text02","item01","text01",), defaut=('item01','item02','item03'), min=3, max='**', ang='With check boxes, Obligatory, checked text, with default values, EN'), #validators=NoRepeat(),\r
-)\r
-\r
-\r
-\r
-Classement_Commandes_Ds_Arbre=('DEBUT','MESH_TYPES','ALL_LISTS','FIN')\r
-\r
-Ordre_Des_Commandes = ('DEBUT','MESH_TYPES','ALL_LISTS','FIN')\r
+++ /dev/null
-# coding: utf-8\r
-from Accas import *\r
-\r
-class myModel(ASSD): pass\r
-\r
-JdC = JDC_CATA(code='PATTERNS',\r
- execmodul=None,\r
- regles=(#AU_PLUS_UN('DEBUT', 'POURSUITE'),\r
- AU_PLUS_UN('ALL_LISTS'),\r
- #AU_PLUS_UN('FIN'),\r
- A_CLASSER(('DEBUT', 'POURSUITE'), 'FIN')\r
- )\r
-)\r
-\r
-class grma():\r
- def __convert__(cls,valeur):\r
- if isinstance(valeur, (str,unicode)) and len(valeur.strip()) <= 12 and ("item" in (valeur.strip()).lower()): #\r
- return valeur.strip()\r
- raise ValueError("Name length does not contain \"test\" and is longer than allowed, 12")\r
- __convert__ = classmethod(__convert__)\r
-\r
-def mySeveral(suffix,num):\r
- out=list()\r
- for i in range(1,num+1):\r
- out.append(suffix+str(i).zfill(2))\r
- return out\r
-\r
-ALL_LISTS=OPER(nom="ALL_LISTS",op=18,sd_prod=myModel,\r
- UIinfo={"groupes":("Group1",)},\r
- fr="All lists definition FR",\r
- ang="All lists definition EN",\r
- reentrant='n',\r
- #regles=(AU_MOINS_UN('LIST_O_CHECKTEXT','LIST_F_CHECKTEXT','LIST_O_ANY','LIST_F_ANY')),\r
-\r
- L1_LIST_O_NOREPEAT_CHECKTEXT=SIMP(statut='o',typ=grma,validators=NoRepeat(),min=3, max='**', ang='Obligatory, No Repetitions, checked text, EN'),\r
- L2_LIST_F_NOREPEAT_CHECKTEXT=SIMP(statut='f',typ=grma,validators=NoRepeat(),min=3, max='**', ang='Optional, No Repetitions, checked text, EN'),\r
- L3_LIST_F_REPEAT_CHECKTEXT=SIMP(statut='f',typ=grma,min=3, max='**',ang='Optional, Allowed Repetitions, checked text, EN'),\r
- L4_LIST_O_REPEAT_CHECKTEXT=SIMP(statut='o',typ=grma,min=3, max='**',ang='Obligatory, Allowed Repetitions, checked text, EN'),\r
-\r
- L5_LIST_F_NOREPEAT_ANYTEXT=SIMP(statut='f',typ='TXM',validators=NoRepeat(),min=3, max='**',ang='Optional, No Repetitions, any text, EN'),\r
- L6_LIST_O_NOREPEAT_ANYTEXT=SIMP(statut='o',typ='TXM',min=3,validators=NoRepeat(), max='**',ang='Obligatory, No Repetitions, any text, EN'),\r
- L7_LIST_O_REPEAT_ANYTEXT=SIMP(statut='o',typ='TXM',min=3, max='**',ang='Obligatory, Allowed Repetitions, any text, EN'),\r
- L8_LIST_F_REPEAT_ANYTEXT=SIMP(statut='f',typ='TXM',min=3, max='**',ang='Optional, Allowed Repetitions, any text, EN'),\r
-\r
- L9_LIST_O_NOREPEAT_CHECKTEXT_ADD=SIMP(statut='o',typ=grma,validators=NoRepeat(), into=("item01","text01","item02","text02","item03","text03",), min=3, max='**',ang='With spare list, Obligatory, No Repetitions, checked text, EN',),\r
- L10_LIST_F_REPEAT_ANYTEXT_ADD=SIMP(statut='f',typ='TXM', into=("item01","text01","item02","text02","item03","text03",), min=3, max='**',ang='With spare list, Optional, Allowed Repetitions, any text, EN'),\r
- L11_LIST_O_REPEAT_CHECKTEXT_ADD_NODEFAUT=SIMP(statut='o',typ=grma, into=("item01","text01","item02","text02","item03","text03","item04","text04"),ang='With spare list, obligatory, No Repetitions, checked text, no default values, EN', min=3, max='**'),\r
- L12_LIST_O_NOREPEAT_CHECKTEXT_ADD_DEFAUT=SIMP(statut='o',typ=grma,validators=NoRepeat(), into=("item01","text01","item02","text02","item03","text03","item04","text04","item05","text05",), defaut=('item01','item02','item03'), min=3, max='**',ang='With spare list, Obligatory, No Repetitions, checked text, with default values EN'),\r
-\r
- L13_LIST_F_SANSORDRENODOUBLON_ANYTEXT_NODEFAUT=SIMP(statut='f',typ='TXM',homo="SansOrdreNiDoublon", into=("item01","text01","item02","text02","item03","text03",), min=3, max='**',ang='With check boxes, Optional, any text, no defaults, EN'),\r
- L14_LIST_O_SANSORDRENODOUBLON_CHECKTEXT_NODEFAUT=SIMP(statut='o',typ=grma,homo="SansOrdreNiDoublon", into=("item01","text01","item02","text02","item03","text03",), min=3, max='**',ang='With check boxes, Obligatory, checked text, EN'),\r
- L15_LIST_O_SANSORDRENODOUBLON_CHECKTEXT_DEFAUT=SIMP(statut='o',typ=grma,homo="SansOrdreNiDoublon", into=("item01","text01","item02","text02","item03","text03",), defaut=('item01','item02','item03'), min=3, max='**', ang='With check boxes, Obligatory, checked text, with default values, EN'),\r
-)\r
-\r
-\r
-\r
-Classement_Commandes_Ds_Arbre=('DEBUT','MESH_TYPES','ALL_LISTS','FIN')\r
-\r
-Ordre_Des_Commandes = ('DEBUT','MESH_TYPES','ALL_LISTS','FIN')\r
+++ /dev/null
-# coding: utf-8
-
-from Accas import *
-
-#class myMesh(ASSD): pass
-class myModel(ASSD): pass
-
-JdC = JDC_CATA(code='PATTERNS',
- execmodul=None,
- regles=(UN_PARMI('DEBUT', 'POURSUITE'),
- AU_MOINS_UN('FIN'),
- A_CLASSER(('DEBUT', 'POURSUITE'), 'FIN')))
-
-DEBUT=PROC(nom="DEBUT", op=68, 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=None,sd_prod=myModel,
- UIinfo={"groupes":("Group1",)},
- ang="Model mesh definition EN",
- MESH=SIMP(statut='o',typ='TXM',into=("mesh_01","mesh_02","mesh_03","mesh_04",) , defaut="mesh_01"),
- #reentrant='n',
- #regles=(AU_MOINS_UN('AFFE','AFFE_SOUS_STRUC'),UN_PARMI('MAILLAGE','GRILLE')),
-
-
- block_mesh_01=BLOC(condition="MESH=='mesh_01'",
- AFFE=FACT(statut='o',
- ALL=SIMP(statut='o', typ=bool,ang='ALL 01 help EN', defaut=True),
- PHENOMENA=SIMP(statut='o',typ='TXM',into=('phenomena_01','phenomena_02',), defaut='phenomena_01'),
- #MODELISATION=SIMP(statut='o',typ='TXM', min=2,max='**', into=("mesh_01","mesh_02","mesh_03","mesh_04",) ,ang='Input 01 list EN', fr='Input 01 list FR'),
- MODELISATION=SIMP(statut='o',typ='TXM', min=2,max='**', into=('Item_01_01','Item_01_02',) ,ang='Input 01 list EN', fr='Input 01 list FR'),
- ),
- ),
-)
-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','AFFE_MODELE','FIN')
-Ordre_Des_Commandes = ('DEBUT','MESH','AFFE_MODELE','FIN')
+++ /dev/null
-# 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,True] #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 some widgets optional:
- 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=2,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="o", typ=bool),
- 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')
+++ /dev/null
-# 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,True] #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=2,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
- PAR_LOT=SIMP(ang="Debut Par Lot help En",statut='o',typ='I', defaut=True),
- 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')
+++ /dev/null
-# coding: utf-8
-
-from Accas import *
-
-class loi(): pass
-
-JdC = JDC_CATA (code = 'PATTERNS',
- execmodul = None,
- )
-use_and=False #switch off second condition about MAX_ROWS while it does not work for blocks greater than 2
-def cond2(myMax=False):
- if use_and:
- if myMax:
- out= " and MAX_ROWS>="+str(myMax)
- else:
- out=""
- else:
- out=""
- print out
- return out
-
-PROC_01 = PROC(nom = "PROC_01",op = None, ang="Help for PROC_01 EN",
- MAX_ROWS=SIMP(statut='o',typ='I',val_min=1,val_max=8, defaut=8),
- PROCGROUP1=SIMP(statut='o',typ='TXM',into=("1A","2A","add new row",)),
- wideblock1=BLOC(condition='PROCGROUP1=="add new row"'+cond2(1),
- PROCGROUP2=SIMP(statut='o',typ='TXM',into=("1A","add new row","3A",)),
- wideblock2=BLOC(condition='PROCGROUP2=="add new row"'+cond2(2),
- PROCGROUP3=SIMP(statut='o',typ='TXM',into=("1","2","add new row",)),
- PROCGROUP689=SIMP(statut='o',typ='TXM',),
- wideblock3=BLOC(condition='PROCGROUP3=="add new row"'+cond2(3),
- PROCGROUP4=SIMP(statut='o',typ='TXM',into=("1","add new row","3",)),
- wideblock4=BLOC(condition='PROCGROUP4=="add new row"'+cond2(4),
- PROCGROUP5=SIMP(statut='o',typ='TXM',into=("add new row","2","3",)),
- wideblock5=BLOC(condition='PROCGROUP5=="add new row"'+cond2(5),
- PROCGROUP6=SIMP(statut='o',typ='TXM',into=("1","2","add new row",)),
- wideblock6=BLOC(condition='PROCGROUP6=="add new row"'+cond2(6),
- PROCGROUP7=SIMP(statut='o',typ='TXM',into=("1","add new row","3",)),
- wideblock7=BLOC(condition='PROCGROUP7=="add new row"'+cond2(7),
- PROCGROUP8=SIMP(statut='o',typ='TXM',into=("add new row","2","3",)),
- wideblock8=BLOC(condition='PROCGROUP8=="add new row"'+cond2(8),
- )
- )
- )
- )
- )
- )
- )
- )
-)
-
-#LEV1 = OPER( nom = "LEV1",
-# sd_prod=loi,
-# op=68,
-# fr='LEV1 FR',
-# Boolean01=SIMP( statut = 'o',typ = bool, defaut=True, fr = 'Bool mandatory FR', ang = 'Bool mandatory EN'),
-# SelectedItem=SIMP(statut = 'o',typ = 'TXM', into=["01_01","01_02","01_03","01_04"], fr="FR"),
-#)
-
-Classement_Commandes_Ds_Arbre=('PROC_01',)
-
-Ordre_Des_Commandes = ('PROC_01',)
+++ /dev/null
-# coding: utf-8
-
-from Accas import *
-
-class loi(): pass
-
-JdC = JDC_CATA (code = 'PATTERNS',
- execmodul = None,
- )
-use_and=True #switch off second condition about MAX_ROWS while it does not work for blocks greater than 2
-def cond2(myMax=False):
- if use_and:
- if myMax:
- out= " and MAX_ROWS>="+str(myMax)
- else:
- out=""
- else:
- out=""
- print out
- return out
-
-PROC_01 = PROC(nom = "PROC_01",op = None, ang="Help for PROC_01 EN",
- MAX_ROWS=SIMP(statut='o',typ='I',val_min=1,val_max=8, defaut=8),
- PROCGROUP1=SIMP(statut='o',typ='TXM',into=("1","2","add new row",)),
- wideblock1=BLOC(condition='PROCGROUP1=="add new row"'+cond2(1),
- PROCGROUP2=SIMP(statut='o',typ='TXM',into=("1","add new row","3",)),
- #wideblock2=BLOC(condition='PROCGROUP2=="add new row"',
- wideblock2=BLOC(condition='MAX_ROWS == 8',
- #wideblock2=BLOC(condition='PROCGROUP2=="add new row" and (MAX_ROWS > 2)',
- PROCGROUP3=SIMP(statut='o',typ='TXM',into=("1","2","add new row",)),
- wideblock3=BLOC(condition='PROCGROUP3=="add new row"'+cond2(3),
- PROCGROUP4=SIMP(statut='o',typ='TXM',into=("1","add new row","3",)),
- wideblock4=BLOC(condition='PROCGROUP4=="add new row"'+cond2(4),
- PROCGROUP5=SIMP(statut='o',typ='TXM',into=("add new row","2","3",)),
- wideblock5=BLOC(condition='PROCGROUP5=="add new row"'+cond2(5),
- PROCGROUP6=SIMP(statut='o',typ='TXM',into=("1","2","add new row",)),
- wideblock6=BLOC(condition='PROCGROUP6=="add new row"'+cond2(6),
- PROCGROUP7=SIMP(statut='o',typ='TXM',into=("1","add new row","3",)),
- wideblock7=BLOC(condition='PROCGROUP7=="add new row"'+cond2(7),
- PROCGROUP8=SIMP(statut='o',typ='TXM',into=("add new row","2","3",)),
- wideblock8=BLOC(condition='PROCGROUP8=="add new row"'+cond2(8),
- )
- )
- )
- )
- )
- )
- )
- )
-)
-
-#LEV1 = OPER( nom = "LEV1",
-# sd_prod=loi,
-# op=68,
-# fr='LEV1 FR',
-# Boolean01=SIMP( statut = 'o',typ = bool, defaut=True, fr = 'Bool mandatory FR', ang = 'Bool mandatory EN'),
-# SelectedItem=SIMP(statut = 'o',typ = 'TXM', into=["01_01","01_02","01_03","01_04"], fr="FR"),
-#)
-
-Classement_Commandes_Ds_Arbre=('PROC_01',)
-
-Ordre_Des_Commandes = ('PROC_01',)
+++ /dev/null
-# coding: utf-8
-
-from Accas import *
-
-class loi(): pass
-
-JdC = JDC_CATA (code = 'PATTERNS',
- execmodul = None,
- )
-
-PROC_01 = PROC(nom = "PROC_01",op = None, ang="Help for PROC_01 EN",
- PROCGROUP1=SIMP(statut='o',typ='TXM',into=("a1","a2","a3",)),
-)
-
-Classement_Commandes_Ds_Arbre=('PROC_01',)
-
-Ordre_Des_Commandes = ('PROC_01',)
+++ /dev/null
-# coding: utf-8
-
-from Accas import *
-
-class loi(ASSD): pass
-
-JdC = JDC_CATA (code = 'PATTERNS',
- execmodul = None,
- )
-
-PER_01 = OPER( nom = "PER_01",
- sd_prod=loi,
- op=68,
- fr='LEV1 FR',
- Boolean01=SIMP( statut = 'o',typ = bool, defaut=True, fr = 'Bool mandatory FR', ang = 'Bool mandatory EN'),
- SelectedItem=SIMP(statut = 'o',typ = 'TXM', into=["01_01","01_02","01_03","01_04"], fr="FR"),
-)
-
-#Classement_Commandes_Ds_Arbre=('OPER_01',)
-
-#Ordre_Des_Commandes = ('OPER_01',)
+++ /dev/null
-# coding: utf-8
-
-from Accas import *
-
-JdC = JDC_CATA (code = 'PATTERNS',
- execmodul = None,
- )
-
-PROC_01 = PROC(nom = "PROC_01",op = None, ang="Help for PROC_01 EN",
- MAX_ROWS=SIMP(statut='o',typ='I',val_min=1,val_max=8, defaut=8),
- PROCGROUP1=SIMP(statut='o',typ='TXM',into=("1","2","add new row",)),
- wideblock1=BLOC(condition='PROCGROUP1 in "add new row"',
- PROCGROUP2=SIMP(statut='o',typ='TXM',into=("1","add new row","3",)),
- )
-)
-
-Classement_Commandes_Ds_Arbre=('PROC_01',)
-
-Ordre_Des_Commandes = ('PROC_01',)
+++ /dev/null
-# coding: utf-8
-
-from Accas import *
-
-class loi(): pass
-
-JdC = JDC_CATA (code = 'PATTERNS',
- execmodul = None,
- )
-use_and=False #switch off second condition about MAX_ROWS while it does not work for blocks greater than 2
-def cond2(myMax=False):
- if use_and:
- if myMax:
- out= " and MAX_ROWS>="+str(myMax)
- else:
- out=""
- else:
- out=""
- #print out
- return out
-
-PROC_01 = PROC(nom = "PROC_01",op = None, ang="Help for PROC_01 EN",
- MAX_ROWS=SIMP(statut='o',typ='I',val_min=1,val_max=8, defaut=8),
- PROCGROUP1=SIMP(statut='o',typ='TXM',into=("1","2","add new row",)),
- wideblock1=BLOC(condition='PROCGROUP1=="add new row"'+cond2(1),
- PROCGROUP2=SIMP(statut='o',typ='TXM',into=("1","add new row","3",)),
- wideblock2=BLOC(condition='PROCGROUP2=="add new row"'+cond2(2),
- PROCGROUP3=SIMP(statut='o',typ='TXM',into=("1","2","add new row",)),
- wideblock3=BLOC(condition='PROCGROUP3=="add new row"'+cond2(3),
- PROCGROUP4=SIMP(statut='o',typ='TXM',into=("1","add new row","3",)),
- wideblock4=BLOC(condition='PROCGROUP4=="add new row"'+cond2(4),
- PROCGROUP5=SIMP(statut='o',typ='TXM',into=("add new row","2","3",)),
- wideblock5=BLOC(condition='PROCGROUP5=="add new row"'+cond2(5),
- PROCGROUP6=SIMP(statut='o',typ='TXM',into=("1","2","add new row",)),
- wideblock6=BLOC(condition='PROCGROUP6=="add new row"'+cond2(6),
- PROCGROUP7=SIMP(statut='o',typ='TXM',into=("1","add new row","3",)),
- wideblock7=BLOC(condition='PROCGROUP7=="add new row"'+cond2(7),
- PROCGROUP8=SIMP(statut='o',typ='TXM',into=("add new row","2","3",)),
- wideblock8=BLOC(condition='PROCGROUP8=="add new row"'+cond2(8),
- )
- )
- )
- )
- )
- )
- )
- )
-)
-
-#LEV1 = OPER( nom = "LEV1",
-# sd_prod=loi,
-# op=68,
-# fr='LEV1 FR',
-# Boolean01=SIMP( statut = 'o',typ = bool, defaut=True, fr = 'Bool mandatory FR', ang = 'Bool mandatory EN'),
-# SelectedItem=SIMP(statut = 'o',typ = 'TXM', into=["01_01","01_02","01_03","01_04"], fr="FR"),
-#)
-
-Classement_Commandes_Ds_Arbre=('PROC_01',)
-
-Ordre_Des_Commandes = ('PROC_01',)
+++ /dev/null
-# coding: utf-8
-
-from Accas import *
-
-JdC = JDC_CATA (code = 'PATTERNS',
- execmodul = None,
- )
-def several(suffix,num):
- out=list()
- for i in range(1,num+1):
- out.append(suffix+str(i).zfill(2))
- return out
-
-NUMERICAL_PARAMETERS=PROC(nom = "NUMERICAL_PARAMETERS", op=None, ang="Help for NUMERICAL_PARAMETERS, English version",
- #Equations=SIMP(statut = 'o',typ = 'TXM',into=("EF","VF","BS"),defaut="EF"),
- Solver_definition=FACT(statut = 'o',
- Solver = SIMP(statut = 'o',typ = 'TXM', into=several("Solver_",12), defaut="Solver_06"),
- )
-)
-PASCALE=PROC(nom = "PASCALE", op=None, ang="Help for NUMERICAL_PARAMETERS, English version",
- Equations=SIMP(statut = 'o',typ = 'TXM',into=("EF","VF","BS"),defaut="EF"),
- Solver_definition=FACT(statut = 'o',
- Solver = SIMP(statut = 'o',typ = 'TXM', into=several("Solver_",12), defaut="Solver_06"),
- )
-)
-
-Classement_Commandes_Ds_Arbre=('NUMERICAL_PARAMETERS',)
-
-Ordre_Des_Commandes = ('NUMERICAL_PARAMETERS',)
+++ /dev/null
-# coding: utf-8
-
-from Accas import *
-
-JdC = JDC_CATA (code = 'PATTERNS',
- execmodul = None,
- )
-def mySeveral(suffix,num):
- out=list()
- for i in range(1,num+1):
- out.append(suffix+str(i).zfill(2))
- return out
-
-def myFact(num):
- myNum=str(num).zfill(2)
- list_item_body="Item_"+myNum+"_"
- myString="FACT(statut = 'f', List_"+myNum+" = SIMP(statut = 'o',typ = 'TXM', into=mySeveral('"+list_item_body+"',12), defaut='"+list_item_body+myNum+"'),Real_"+myNum+" = SIMP(statut = 'o',typ = 'R', defaut = "+str(num/100.)+", ang='Real "+myNum+" help EN'),Integer_"+myNum+" = SIMP(statut = 'o',typ = 'I', defaut = "+str(100+num)+",ang='Max_Iter "+myNum+" help EN'))"
- print myString
- return eval(myString)
-
-
-PROC_01=PROC(nom = "PROC_01", op=None, ang="Help for PROC_01, English version",fr="Help for PROC_01, French version", docu="",
- Radio_01=SIMP(statut = 'f',typ = 'TXM',into=("EF","VF","BS"),defaut="EF"),
- FACT_01=myFact(1),
- FACT_02=myFact(2),
- FACT_03=myFact(3),
- FACT_04=myFact(4),
- FACT_05=myFact(5),
- FACT_06=myFact(6),
- FACT_07=myFact(7),
- FACT_08=myFact(8),
- FACT_09=myFact(9),
- FACT_10=myFact(10),
- FACT_11=myFact(11),
- FACT_12=myFact(12),
-)
-
-Classement_Commandes_Ds_Arbre=('PROC_01',)
-
-Ordre_Des_Commandes = ('PROC_01',)
+++ /dev/null
-# coding: utf-8
-
-from Accas import *
-
-JdC = JDC_CATA (code = 'PATTERNS',
- execmodul = None,
- )
-def mySeveral(suffix,num):
- out=list()
- for i in range(1,num+1):
- out.append(suffix+str(i).zfill(2))
- return out
-
-switch_facultatif=False #change 'o' to 'f' of some widgets in the loop
-
-def myFact(num):
- opt=['o','f','o','o']
- if switch_facultatif:
- myLen=len(opt)
- make_f=(num-1)%myLen
- opt[make_f]='f'
- #print opt
- myNum=str(num).zfill(2)
- list_item_body="Item_"+myNum+"_"
- myString="FACT(statut = '"+opt[0]+"', List_"+myNum+" = SIMP(statut = '"+opt[1]+"',typ = 'TXM', into=mySeveral('"+list_item_body+"',12), defaut='"+list_item_body+myNum+"'),Real_"+myNum+" = SIMP(statut = '"+opt[2]+"',typ = 'R', defaut = "+str(num/100.)+", ang='Real "+myNum+" help EN'),Integer_"+myNum+" = SIMP(statut = '"+opt[3]+"',typ = 'I', defaut = "+str(100+num)+",ang='Max_Iter "+myNum+" help EN'))"
- print myString
- return eval(myString)
-
-
-PROC_01=PROC(nom = "PROC_01", op=None, ang="Help for PROC_01, English version",fr="Help for PROC_01, French version", docu="",
- Radio_01=SIMP(statut = 'o',typ = 'TXM',into=("EF","VF","BS"),defaut="EF"),
- FACT_01=myFact(1),
- FACT_02=myFact(2),
- FACT_03=myFact(3),
- FACT_04=myFact(4),
- FACT_05=myFact(5),
- FACT_06=myFact(6),
- FACT_07=myFact(7),
- FACT_08=myFact(8),
- FACT_09=myFact(9),
- FACT_10=myFact(10),
- FACT_11=myFact(11),
- FACT_12=myFact(12),
-)
-
-Classement_Commandes_Ds_Arbre=('PROC_01',)
-
-Ordre_Des_Commandes = ('PROC_01',)
+++ /dev/null
-# coding: utf-8
-
-from Accas import *
-
-JdC = JDC_CATA (code = 'PATTERNS',
- execmodul = None,
- )
-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 myFact(num):
- myNum=str(num).zfill(2)
- list_item_body="Item_"+myNum+"_"
-
- defauts0=["","'"+list_item_body+myNum+"'", str(num/100.), str(100+num), "'Text_"+myNum+"'" ] #presence of default values
- defauts_mask=[False,True,True,False,True] #switch off defaults of some types
- defauts=list()
- for id0 in range(len(defauts0)):
- if defauts_mask[id0]:
- item=", defaut="+defauts0[id0]
- else:
- item=""
- defauts.append(item)
- print defauts
-
- opt=['o','o','o','o','o'] #initial default obligation of items in FACT groups
- #make some widgets optional:
- myLen=len(opt)
- if switch_facultatif:
- make_f=(num)%myLen
- opt[make_f]='f'
- #print opt
- if empty_defauts:
- clean_defaut=num%myLen
-
-
- myString="FACT(statut = '"+opt[0]+"', List_"+myNum+" = SIMP(statut = '"+opt[1]+"',typ = 'TXM', into=mySeveral('"+list_item_body+"',12)"+defauts[1]+"),Real_"+myNum+" = SIMP(statut = '"+opt[2]+"',typ = 'R'"+defauts[2]+", ang='Real "+myNum+" help EN'),Integer_"+myNum+" = SIMP(statut = '"+opt[3]+"',typ = 'I'"+defauts[3]+",ang='Integer "+myNum+" help EN'),Text_"+myNum+" = SIMP(statut = '"+opt[4]+"',typ = 'TXM'"+defauts[4]+",ang='Text "+myNum+" help EN'))"
- print myString
- return eval(myString)
-
-
-PROC_01=PROC(nom = "PROC_01", op=None, ang="Help for PROC_01, English version",fr="Help for PROC_01, French version", docu="",
- Radio_01=SIMP(statut = 'o',typ = 'TXM',into=("EF","VF","BS"),defaut="EF"),
- FACT_01=myFact(1),
- FACT_02=myFact(2),
- FACT_03=myFact(3),
- FACT_04=myFact(4),
- FACT_05=myFact(5),
- #FACT_06=myFact(6),
- #FACT_07=myFact(7),
- #FACT_08=myFact(8),
- #FACT_09=myFact(9),
- #FACT_10=myFact(10),
- #FACT_11=myFact(11),
- #FACT_12=myFact(12),
-)
-
-Classement_Commandes_Ds_Arbre=('PROC_01',)
-
-Ordre_Des_Commandes = ('PROC_01',)
+++ /dev/null
-# coding: utf-8
-
-from Accas import *
-
-JdC = JDC_CATA (code = 'PATTERNS',
- execmodul = None,
- )
-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 myFact(num):
- myNum=str(num).zfill(2)
- list_item_body="Item_"+myNum+"_"
-
- defauts0=["","'"+list_item_body+myNum+"'", str(num/100.), str(100+num), "'Text_"+myNum+"'" ] #presence of default values
- defauts_mask=[False,True,True,False,True] #switch off defaults of some types
- defauts=list()
- for id0 in range(len(defauts0)):
- if defauts_mask[id0]:
- item=", defaut="+defauts0[id0]
- else:
- item=""
- defauts.append(item)
- print defauts
-
- opt=['o','o','o','o','o'] #initial default obligation of items in FACT groups
- #make some widgets optional:
- myLen=len(opt)
- if switch_facultatif:
- make_f=(num)%myLen
- opt[make_f]='f'
- #print opt
- if empty_defauts:
- clean_defaut=num%myLen
-
-
- myString="FACT(statut = '"+opt[0]+"', List_"+myNum+" = SIMP(statut = '"+opt[1]+"',typ = 'TXM', into=mySeveral('"+list_item_body+"',12)"+defauts[1]+"),Real_"+myNum+" = SIMP(statut = '"+opt[2]+"',typ = 'R'"+defauts[2]+", ang='Real "+myNum+" help EN'),Integer_"+myNum+" = SIMP(statut = '"+opt[3]+"',typ = 'I'"+defauts[3]+",ang='Integer "+myNum+" help EN'),Text_"+myNum+" = SIMP(statut = '"+opt[4]+"',typ = 'TXM'"+defauts[4]+",ang='Text "+myNum+" help EN'))"
- print myString
- return eval(myString)
-
-
-PROC_01=PROC(nom = "PROC_01", op=None, ang="Help for PROC_01, English version",fr="Help for PROC_01, French version", docu="",
- Radio_01=SIMP(statut = 'o',typ = 'TXM',into=("EF","VF","BS"),defaut="EF"),
- FACT_01=myFact(1),
- FACT_02=myFact(2),
- FACT_03=myFact(3),
- FACT_04=myFact(4),
- FACT_05=myFact(5),
- #FACT_06=myFact(6),
- #FACT_07=myFact(7),
- #FACT_08=myFact(8),
- #FACT_09=myFact(9),
- #FACT_10=myFact(10),
- #FACT_11=myFact(11),
- #FACT_12=myFact(12),
-)
-
-Classement_Commandes_Ds_Arbre=('PROC_01',)
-
-Ordre_Des_Commandes = ('PROC_01',)
+++ /dev/null
-"4" "3" "2" "1"
-"4" "5" "6" "7"
\ No newline at end of file
+++ /dev/null
-#!/usr/bin/env python
-# -*- coding: utf-8 -*-
-# 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
-#
-"""
- Ce module sert a lancer EFICAS configure pour Code_Aster
-"""
-# Modules Python
-# Modules Eficas
-
-import sys,os
-sys.path.append(os.path.join(os.path.abspath(os.path.dirname(__file__)),'..'))
-
-from PyQt4.QtCore import *
-import prefs
-from InterfaceQT4 import eficas_go
-eficas_go.lance_eficas(code=prefs.code)