def finCommentaireListe(self):
commentaire=""
mc = self.node.item.get_definition()
- d_aides = { 'TXM' : 'chaines de caracteres',
+ d_aides = { 'TXM' : 'chaines de caractere',
'R' : 'reels',
'I' : 'entiers',
'C' : 'complexes'}
if mc.min == mc.max:
commentaire=tr("Entrez ")+str(mc.min)+" "+tr(d_aides[type])+'\n'
elif mc.max == float('inf') :
- commentaire=tr("Entrez une liste de ") + tr(d_aides[type])+'\n'
+ commentaire=tr("Entrez une liste de ") +" "+tr(d_aides[type])+'\n'
else :
commentaire=tr("Entrez entre ")+"\n"+str(mc.min)+(" et ")+str(mc.max) +" " +tr(d_aides[type])+'\n'
aideval=self.node.item.aide()
- commentaire=commentaire + tr(aideval)
+ commentaire=commentaire + tr(aideval)
return str(commentaire)
def aideALaSaisie(self):
mc = self.node.item.get_definition()
mctype = mc.type[0]
- d_aides = { 'TXM' : tr(u"chaine de caracteres"),
+ d_aides = { 'TXM' : tr("chaine de caractere"),
'R' : tr("reel"),
'I' : tr("entier"),
'C' : tr("complexe"),
'Repertoire' : tr(u'repertoire')}
if mc.min == mc.max: commentaire=tr("Entrez ")+" "+str(mc.min)+" "
- else : commentaire=tr("Entrez entre ")+str(mc.min)+tr(" et ")+str(mc.max)
+ else : commentaire=tr("Entrez entre ")+str(mc.min)+tr(" et ")+str(mc.max) + " "
try :
if issubclass(mctype,object) : ctype = getattr(mctype, 'help_message', tr("Type de base inconnu"))
- else : ctype = d_aides.get(mctype, tr("Type de base inconnu"))
+ else : ctype = str(mcType)
except:
ctype = d_aides.get(mctype, tr("Type de base inconnu"))
if ctype == tr("Type de base inconnu") and "Tuple" in str(mctype): ctype=str(mctype)
+ if ctype == tr("Type de base inconnu") and "bool" in str(mctype): ctype='bool'
+ if mc.max!=1 :
+ if ctype == 'chaine de caractere' and mc.max>1 : ctype = 'chaines de caractere'
+ else : ctype = ctype + 's'
commentaire+=ctype
- if mc.max!=1 : commentaire+="s"
return commentaire
def setZoneInfo(self):
def traiteClicSurLabel(self,texte):
if self.editor.code != "CARMELCND" : self.afficheOptionnel()
+ try :
+ fr = self.node.item.getFr()
+ self.editor.afficheCommentaire(str(fr))
+ except :
+ pass
+
def propageChange(self,leType,donneLefocus):
"""
"""
def __init__(self,node,editor,parentQt,definition, obj, niveau,commande):
- #print "fact : ",node.item.nom
+ print ("fact : ",node.item.nom)
Groupe.__init__(self,node,editor,parentQt, definition,obj,niveau,commande)
labeltext,fonte,couleur = self.node.item.getLabelText()
self.GroupBox.setText(tr(labeltext))
- self.GroupBox.setTextInteractionFlags(Qt.TextSelectableByMouse)
+ #self.GroupBox.setTextInteractionFlags(Qt.TextSelectableByMouse)
self.parentQt.commandesLayout.insertWidget(-1,self)
self.doitAfficherOptionnel=True
min,max=obj.getMinMax()
self.AAfficher=self.lineEditVal1
self.inInit=False
# PNPN a completer __ si tuple le type des tuples sinon le tuple
- self.monCommentaireLabel.setText(self.finCommentaireListe())
+ # trop moche
+ #self.monCommentaireLabel.setText(self.finCommentaireListe())
+ self.monCommentaireLabel.setText("")
self.scrollArea.leaveEvent = self.leaveEventScrollArea
+ self.inhibeChangeValeur = False
+ self.dejaAverti = False
def setValeurs(self):
def changeValeur(self,changeDePlace=True,oblige=False):
- #print ('achangeValeur plusieursBase')
+ #print ('achangeValeur plusieursBase', self)
+ #import traceback
+ #traceback.print_stack()
+ if self.inhibeChangeValeur : return
+ self.inhibeChangeValeur = True
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 = []
+ if (not('TXM' in self.objSimp.definition.type)) and not (self.dejaAverti):
+ for i in range (1, fin):
+ nomLineEdit="lineEditVal"+str(i)
+ courant=getattr(self,nomLineEdit)
+ valeur=courant.text()
+ lval=valeur.split(',')
+ if len (lval) > 1 :
+ self.dejaAverti = True
+ QMessageBox.warning(self,tr('"," used'), 'Perhaps, character "," is used in ' +str( valeur) + 'intead of "."')
+ break
+ # msgBox = QMessageBox()
+ # msgBox.setText("separator ',' ")
+ # msgBox.setInformativeText("Do you want to enter " + str (lval) + "?")
+ # msgBox.setInformativeText (" you want to enter " + str (lval) + "?")
+ # msgBox.setStandardButtons( QMessageBox.Ok | QMessageBox.Cancel)
+ # msgBox.setDefaultButton(QMessageBox.Ok)
+ #ret = msgBox.exec()
+ # tres dicutable 20210401 j enleve la boucle
+ # if faut remtrre self.inhibeChangeValeur si on la reactive
+ # if ret == 1024:
+ # courant.setText(lval[0])
+ # self.ajoutNValeur(lval[1:])
+ # self.listeValeursCourantes = []
for i in range (1, self.indexDernierLabel+1):
self.editor.afficheInfos(tr('nb max de valeurs atteint'))
self.setValide()
self.reaffiche()
+ self.inhibeChangeValeur = False
def leaveEventScrollArea(self,event):
#print ('achangeValeur plusieursBase')
"""
Class implementing the main user interface.
"""
- def __init__(self,code=None,salome=1,parent=None, multi=False,langue='fr',ssIhm=False, labelCode=None):
+ def __init__(self,code=None,salome=1,parent=None, multi=False,langue='en',ssIhm=False, labelCode=None):
"""
Constructor
"""
+ print ('langue en')
if ssIhm == True :
print ('mauvaise utilisation de la classe Appli. Utiliser AppliSsIm SVP')
exit()
def VIMMP(self):
#print ('PN : todo connecter RechercherDsCatalogue')
- self.connectRechercherDsCatalogue()
+ pass
def ChercheGrpMesh(self):
self.actionCode = QAction(self)
self.actionCode.setText(tr("Specificites Maille"))
self.actionCode.triggered.connect(self.aideCode)
+ self.connectRechercherDsCatalogue()
def handleDeplier(self):
# -*- coding: utf-8 -*-
-# Copyright (C) 2007-2017 EDF R&D
+# Copyright (C) 2007-2021 EDF R&D
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
<number>0</number>
</property>
<property name="bottomMargin">
- <number>2</number>
+ <number>0</number>
</property>
<item>
<layout class="QVBoxLayout" name="verticalLayout">
<number>0</number>
</property>
<property name="topMargin">
- <number>2</number>
+ <number>1</number>
</property>
</layout>
</item>
<property name="minimumSize">
<size>
<width>0</width>
- <height>200</height>
+ <height>100</height>
</size>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_2">
+ <property name="leftMargin">
+ <number>0</number>
+ </property>
+ <property name="rightMargin">
+ <number>0</number>
+ </property>
<item>
<layout class="QVBoxLayout" name="verticalLayout_2">
<property name="spacing">
</property>
<property name="icon">
<iconset theme="find">
- <normaloff/>
- </iconset>
+ <normaloff>.</normaloff>.</iconset>
</property>
<property name="iconSize">
<size>
<x>0</x>
<y>0</y>
<width>300</width>
- <height>129</height>
+ <height>143</height>
</rect>
</property>
<property name="sizePolicy">
<rect>
<x>0</x>
<y>0</y>
- <width>465</width>
+ <width>474</width>
<height>308</height>
</rect>
</property>
<string>Form</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_2">
+ <property name="leftMargin">
+ <number>0</number>
+ </property>
<item>
<layout class="QVBoxLayout" name="verticalLayout_5">
+ <property name="spacing">
+ <number>0</number>
+ </property>
<item>
<layout class="QVBoxLayout" name="verticalLayout_2">
<property name="spacing">
<rect>
<x>0</x>
<y>0</y>
- <width>270</width>
+ <width>279</width>
<height>307</height>
</rect>
</property>
<string>...</string>
</property>
<property name="icon">
- <iconset theme="find"/>
+ <iconset theme="find">
+ <normaloff>.</normaloff>.</iconset>
</property>
<property name="iconSize">
<size>
</message>
<message>
<location filename="Ihm/I_MACRO_ETAPE.py" line="1195"/>
- <source>Ce fichier ne sera pas pris en compte
- %s</source>
- <translation>the file is ignored
-%s</translation>
+ <source>Ce fichier ne sera pas pris en compte</source>
+ <translation>the file is ignored</translation>
</message>
<message>
<location filename="Ihm/I_MACRO_ETAPE.py" line="735"/>
<source> et </source>
<translation> and </translation>
</message>
+ <message>
+ <location filename="InterfaceQT4/feuille.py" line="174"/>
+ <source>chaines de caractere</source>
+ <translation>strings</translation>
+ </message>
+ <message>
+ <location filename="InterfaceQT4/feuille.py" line="174"/>
+ <source>chaine de caractere</source>
+ <translation>string</translation>
+ </message>
<message>
<location filename="InterfaceQT4/gereIcones.py" line="245"/>
<source>Selection</source>
<translation>selection</translation>
</message>
+ <message>
+ <location filename="InterfaceQT4/feuille.py" line="174"/>
+ <source>reels</source>
+ <translation>reals</translation>
+ </message>
+ <message>
+ <location filename="InterfaceQT4/feuille.py" line="174"/>
+ <source>reel</source>
+ <translation>real</translation>
+ </message>
+ <message>
+ <location filename="InterfaceQT4/feuille.py" line="174"/>
+ <source>entiers</source>
+ <translation>integers</translation>
+ </message>
+ <message>
+ <location filename="InterfaceQT4/feuille.py" line="174"/>
+ <source>entiers</source>
+ <translation>integer</translation>
+ </message>
+ <message>
+ <location filename="InterfaceQT4/feuille.py" line="174"/>
+ <source>Matrice</source>
+ <translation>Matrix</translation>
+ </message>
+ <message>
+ <location filename="InterfaceQT4/feuille.py" line="174"/>
+ <source>complexes</source>
+ <translation>complex numbers</translation>
+ </message>
+ <message>
+ <location filename="InterfaceQT4/monWidgetSimpBase.py" line="86"/>
+ <source>Entrez une liste de </source>
+ <translation>Enter a list of </translation>
+ </message>
<message>
<location filename="InterfaceQT4/monWidgetSimpBase.py" line="86"/>
<source>Type de base inconnu</source>