<toolbutton-item item-id="4046" label-id="Eficas pour Homard" icon-id="eficaster.png" tooltip-id="Editer un jeu de commande HOMARD avec Eficas" accel-id="" toggle-id="" execute-action=""/>
</toolbar>
+ <!-- ### POPUP MENU ### -->
+ <popupmenu label-id="" context-id="" parent-id="ObjectBrowser" object-id="73">
+ <popup-item item-id="9042" pos-id="" label-id="Eficas" icon-id="" tooltip-id="Editer avec Eficas" execute-action=""/>
+ </popupmenu>
+
</desktop>
</application>
sg=salome.SalomeGUI()
sgPyQt=SalomePyQt.SalomePyQt()
+import salomedsgui
+aGuiDS=salomedsgui.guiDS()
print "EFicasGUI :: :::::::::::::::::::::::::::::::::::::::::::::::::::::"
# -----------------------------------------------------------------------------
print "On a changé d'étude active",studyId
print sgPyQt.getStudyId()
+def definePopup(theContext, theObject, theParent):
+ print "EFICASGUI --- definePopup"
+ theContext = ""
+ theParent = "ObjectBrowser"
+ a=salome.sg.getAllSelected()
+ if len(a) >0:
+ theObject="73"
+ return (theContext, theObject, theParent)
+
+
+def customPopup(popup, theContext, theObject, theParent):
+ print "EFICASGUI --- customPopup"
+ popup.removeItem(99000)
+ popup.removeItem(99001)
+ popup.removeItem(99002)
+ popup.removeItem(99003)
+
# -----------------------------------------------------------------------------
print "runEficas"
eficasSalome.runEficas(ws,"HOMARD")
-def runEficasHomard():
+def runEficasHomard(ws):
print "runEficas"
eficasSalome.runEficas(None,"HOMARD")
+def runEficasFichier(ws):
+ print "runEficasFichier"
+ attr=None
+ code="ASTER"
+ a=salome.sg.getAllSelected()
+ if len(a) == 1:
+ boo,attr=aGuiDS.getExternalFileAttribute("FICHIER_EFICAS_ASTER",a[0])
+ if boo :
+ code = "ASTER"
+ else :
+ boo,attr=aGuiDS.getExternalFileAttribute("FICHIER_EFICAS_HOMARD",a[0])
+ code = "HOMARD"
+ eficasSalome.runEficas(ws,code,attr)
+
# Partie applicative
dict_command={
946:runEficaspourHomard,
4041:runEficas,
4046:runEficaspourHomard,
+ 9042:runEficasFichier,
}
import splash
-def init(top,code="ASTER"):
+def init(top,code="ASTER",fichier=None):
splash.init_splash(top,code=code,titre="Lancement d'EFICAS pour %s" %code)
splash._splash.configure(text="Chargement d'EFICAS en cours.\n Veuillez patienter ...")
# Enregistrement dans l étude
import eficasEtude
- MaRef=eficasEtude.Eficas_In_Study()
+ MaRef=eficasEtude.Eficas_In_Study(code)
import eficas
class MyEficas(eficas.EFICAS):
def contexte(self):
self.salome=MaRef
- moi=MyEficas(top,code=code)
+ print code
+ moi=MyEficas(top,code=code,fichier=fichier)
moi.contexte()
# Author : Pascale NOYRET, EDF
# Project : SALOME
# Copyright : EDF 2003
-# $Header: /home/salome/PlateFormePAL/Bases_CVS_EDF/Modules_EDF/ASTER_SRC/src/ASTERGUI/eficasEtude.py,v 1.1.1.1.2.1 2004/05/18 11:40:21 salome Exp $
+# $Header: /home/salome/PlateFormePAL/Bases_CVS_EDF/Modules_EDF/EFICAS_SRC/src/EFICASGUI/eficasEtude.py,v 1.1.1.1 2004/09/28 09:41:16 salome Exp $
#=============================================================================
import salome
class Eficas_In_Study:
- def __init__(self):
+ def __init__(self,code):
import SMESH_utils
self.enregistre()
+ self.code=code
self.liste_deja_la=[]
def enregistre(self):
self.fatherId=aGuiDS.enregistre("Eficas")
salome.sg.updateObjBrowser(0)
- def rangeInStudy(self,fichier):
+ def rangeInStudy(self,fichier, suf=""):
if fichier not in self.liste_deja_la :
self.liste_deja_la.append(fichier)
Nom=re.split("/",fichier)[-1]
self.commId=aGuiDS.createItemInStudy(self.fatherId,Nom)
- aGuiDS.setExternalFileAttribute(self.commId,"FICHIER_EFICAS",fichier)
+ aGuiDS.setExternalFileAttribute(self.commId,"FICHIER_EFICAS_"+self.code+suf,fichier)
salome.sg.updateObjBrowser(0)
def creeConfigTxt(self,fichier,dico):
root.withdraw()
-def runEficas(ws,code="ASTER"):
+def runEficas(ws,code="ASTER",fichier=None):
global initialised
if not initialised:
t=Tkinter.Toplevel()
t.withdraw()
print t.geometry()
print t.winfo_geometry()
- import dataEficas; dataEficas.init(t,code)
+ import dataEficas; dataEficas.init(t,code,fichier)
t.update()
print t.geometry()
print t.winfo_geometry()
FName = A1._narrow(SALOMEDS.AttributeName)
FName.SetValue(objectName)
objId = newObj.GetID()
+ else:
+ objId = listSO[0].GetID()
return objId
def getReference(self,objectId):