Salome HOME
b3783292ff7b4f001f3f17afa653e4c9bdf94aa6
[modules/hydrosolver.git] / src / salome_hydro / boundary_conditions / eficas / appli.py
1 #  Copyright (C) 2012-2013 EDF
2 #
3 #  This file is part of SALOME HYDRO module.
4 #
5 #  SALOME HYDRO module is free software: you can redistribute it and/or modify
6 #  it under the terms of the GNU General Public License as published by
7 #  the Free Software Foundation, either version 3 of the License, or
8 #  (at your option) any later version.
9 #
10 #  SALOME HYDRO module is distributed in the hope that it will be useful,
11 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
12 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 #  GNU General Public License for more details.
14 #
15 #  You should have received a copy of the GNU General Public License
16 #  along with SALOME HYDRO module.  If not, see <http://www.gnu.org/licenses/>.
17
18 import os
19 import sys
20
21 import SalomePyQt
22 sgPyQt = SalomePyQt.SalomePyQt()
23
24 import eficasSalome
25
26 class EficasForBoundaryConditionsAppli(eficasSalome.MyEficas):
27   """
28   This class launches Eficas with "boundary_conditions" catalog.
29   """
30   def __init__(self, fichier = None, version = None):
31     self.codedir = os.path.dirname(__file__)
32     sys.path[:0] = [self.codedir]
33     eficasSalome.MyEficas.__init__(self, sgPyQt.getDesktop(), "boundary_conditions",
34                                    fichier, version = version)
35
36   def addJdcInSalome(self, jdcPath):
37     """
38     Those files are not added in Salome study tree for now.
39     """
40     pass
41
42   def closeEvent(self, event):
43     while self.codedir in sys.path:
44       sys.path.remove(self.codedir)
45     eficasSalome.MyEficas.closeEvent(self, event)