1 # -*- coding: utf-8 -*-
3 # Copyright (C) 2008-2024 EDF R&D
5 # This file is part of SALOME ADAO module
7 # This library is free software; you can redistribute it and/or
8 # modify it under the terms of the GNU Lesser General Public
9 # License as published by the Free Software Foundation; either
10 # version 2.1 of the License.
12 # This library is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 # Lesser General Public License for more details.
17 # You should have received a copy of the GNU Lesser General Public
18 # License along with this library; if not, write to the Free Software
19 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
23 # Author: Jean-Philippe Argaud, jean-philippe.argaud@edf.fr, EDF R&D
27 # print "import des prefs de Adao"
29 # Configuration de Eficas
30 # =======================
32 # INSTALLDIR, repIni est obligatoire
33 INSTALLDIR = "@EFICAS_DIR@"
34 sys.path.insert(0,INSTALLDIR)
36 # Positionnee a repin au debut, mise a jour dans configuration
37 repIni=os.path.dirname(os.path.abspath(__file__))
39 # Sert comme directory initial des QFileDialog
40 initialdir = os.getcwd()
42 # Traductions et codages
44 # Codage des strings qui accepte les accents (en remplacement de 'ascii')
47 # ===== Specifique : pour la 8_3_0 et suivantes 8_x ! Enlever pour les 9_x ! JPA
48 if sys.version.split()[0] < '3':
49 # ===== Specifique : redefinition de l'encoding avant le Python 3 ! JPA
51 sys.setdefaultencoding('utf-8')
52 # ===== Specifique : pour les suivantes 8_x ! Enlever pour les 9_x ! JPA
53 # 19/05/2017 : Redefinition du hook de "sys" present dans <GUI/src/SUITApp/SUITApp_init_python.cxx>
54 def _custom_except_hook(exc_type, exc_value, exc_traceback):
56 sys.__excepthook__(exc_type, exc_value, exc_traceback)
58 sys.excepthook = _custom_except_hook
59 del _custom_except_hook, sys
60 # ===== Fin specifique ===================================================== JPA
62 # Indique la langue du catalogue utilisee pour les chaines d'aide : fr ou ang
64 # Traduction des labels de boutons ou autres
65 lookfor = os.path.abspath(os.path.join(os.path.dirname(__file__),"../resources"))
66 if os.path.exists(lookfor):
67 translatorFichier = os.path.join(lookfor, "adao")
69 translatorFichier = os.environ["ADAO_ENGINE_ROOT_DIR"] + "/share/resources/adao/adao" # Ce nom sera complete par EFICAS avec _<LANG>.qm
71 # Pilotage des sous-fenetres d'EFICAS
72 closeAutreCommande = True
73 closeFrameRechercheCommande = True
74 closeFrameRechercheCommandeSurPageDesCommandes = True
78 nombreDeBoutonParLigne = 2