From f8277e09eaec0165fba1632fd5d2ddfca1e773eb Mon Sep 17 00:00:00 2001 From: Pascale Noyret Date: Tue, 22 Nov 2011 12:58:24 +0000 Subject: [PATCH] *** empty log message *** --- src/EFICASGUI/EFICASGUI.py | 12 +++++++++++- src/EFICASGUI/eficasSalome.py | 8 ++++---- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/src/EFICASGUI/EFICASGUI.py b/src/EFICASGUI/EFICASGUI.py index 99e55f0a..2ac24057 100644 --- a/src/EFICASGUI/EFICASGUI.py +++ b/src/EFICASGUI/EFICASGUI.py @@ -45,6 +45,7 @@ class GUIcontext: MAP_ID = 943 OT_STUDY_ID = 944 OT_WRAPPER_ID = 945 + MULTICATALOG_ID = 946 # constructor def __init__(self): @@ -54,6 +55,10 @@ class GUIcontext: # create toolbar self.tid = sgPyQt.createTool("Eficas") + a = sgPyQt.createAction(GUIcontext.MULTICATALOG_ID, "Eficas MultiCatalogue","Lancer Eficas" , "Lancer Eficas", "eficas.png") + sgPyQt.createMenu(a, self.mid) + sgPyQt.createTool(a, self.tid) + # create actions conditionally and fill menu and toolbar with actions self.addActionConditionally("Aster/prefs.py", GUIcontext.ASTER_ID, "Eficas pour Code_Aster", @@ -179,6 +184,10 @@ def activeStudyChanged(ID): def runEficas(): print "-------------------------EFICASGUI::runEficas-------------------------" + import eficasSalome + eficasSalome.runEficas(multi=True) + +def runEficaspourAster(): import eficasSalome eficasSalome.runEficas( "ASTER" ) @@ -239,11 +248,12 @@ def runEficasFichier(version=None): # Partie applicative dict_command={ - GUIcontext.ASTER_ID : runEficas, + GUIcontext.ASTER_ID : runEficaspourAster, GUIcontext.OM_ID : runEficaspourOM, GUIcontext.MAP_ID : runEficaspourMap, GUIcontext.OT_STUDY_ID : runEficaspourOpenturnsStudy, GUIcontext.OT_WRAPPER_ID : runEficaspourOpenturnsWrapper, + GUIcontext.MULTICATALOG_ID : runEficas, 9041:runEficasFichier, } diff --git a/src/EFICASGUI/eficasSalome.py b/src/EFICASGUI/eficasSalome.py index 71952691..b7f79cb8 100644 --- a/src/EFICASGUI/eficasSalome.py +++ b/src/EFICASGUI/eficasSalome.py @@ -46,7 +46,7 @@ class MyEficas( qtEficas.Appli ): b)la visualisation d'elements geometrique dans le coposant GEOM de SALOME par selection dans EFICAS """ def __init__( self, parent, code = "ASTER", fichier = None, module = "EFICAS", - version = None, componentName = "Eficas"): + version = None, componentName = "Eficas",multi=False): """ Constructeur. @type parent: @@ -77,7 +77,7 @@ class MyEficas( qtEficas.Appli ): self.editor = getStudyEditor() # Editeur de l'arbre d'etude - qtEficas.Appli.__init__( self,code=code,salome=1,parent=parent) + qtEficas.Appli.__init__( self,code=code,salome=1,parent=parent,multi=multi) #--------------- specialisation EFICAS dans SALOME ------------------- self.parent = parent @@ -544,7 +544,7 @@ class MyEficas( qtEficas.Appli ): #------------------------------------------------------------------------------------------------------- # Point d'entree lancement EFICAS # -def runEficas( code="ASTER", fichier=None, module = "EFICAS", version=None, componentName = "Eficas"): +def runEficas( code=None, fichier=None, module = "EFICAS", version=None, componentName = "Eficas",multi=False): logger.debug(10*'#'+":runEficas: START") #global appli logger.debug(10*'#'+":runEficas: code="+str(code)) @@ -554,7 +554,7 @@ def runEficas( code="ASTER", fichier=None, module = "EFICAS", version=None, comp #if not appli: #une seul instance possible! appli = MyEficas( SalomePyQt.SalomePyQt().getDesktop(), code = code, fichier = fichier, - module = module, version = version, componentName = componentName ) + module = module, version = version, componentName = componentName,multi=multi ) #if not appli: #une seul instance possible! # appli = MyEficas( SalomePyQt.SalomePyQt().getDesktop(), code = code, fichier = fichier, # module = module, componentName = componentName, version=version ) -- 2.39.2