Salome HOME
taille fenetre eficas pour coupling mascaret telemac2d
[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
22 import SalomePyQt
23 sgPyQt = SalomePyQt.SalomePyQt()
24
25 import eficasSalome
26
27 class EficasForBoundaryConditionsAppli(eficasSalome.MyEficas):
28   """
29   This class launches Eficas with "boundary_conditions" catalog.
30   """
31   def __init__(self, fichier = None, version = None):
32     self.codedir = os.path.dirname(__file__)
33     sys.path[:0] = [self.codedir]
34     eficasSalome.MyEficas.__init__(self, sgPyQt.getDesktop(), "boundary_conditions",
35                                    fichier, version = version)
36
37   def addJdcInSalome(self, jdcPath):
38     """
39     Those files are not added in Salome study tree for now.
40     """
41     pass
42
43   def closeEvent(self, event):
44     while self.codedir in sys.path:
45       sys.path.remove(self.codedir)
46     eficasSalome.MyEficas.closeEvent(self, event)