From: Paul RASCLE Date: Thu, 2 Feb 2017 09:32:04 +0000 (+0100) Subject: reactiver des imports commentés X-Git-Tag: Salome_8_3_Hydro_2_0rc1~29 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=2603526cd4c0d16037a16e6e6d4c557df698e551;p=modules%2Fhydrosolver.git reactiver des imports commentés --- diff --git a/src/HYDROGUI/HYDROSOLVERGUI.py b/src/HYDROGUI/HYDROSOLVERGUI.py index c921a47..8d59403 100755 --- a/src/HYDROGUI/HYDROSOLVERGUI.py +++ b/src/HYDROGUI/HYDROSOLVERGUI.py @@ -36,11 +36,11 @@ import HYDROSOLVER_ORB from salome.hydro.interpolz_gui import InterpolzDlg from salome.hydro.gui_utils import HSGUIException, wait_cursor, get_and_check_selected_file_path import salome.hydro.study as hydro_study -#from salome.hydro.mascaret.eficas.appli import EficasForMascaretAppli -#from salome.hydro.telemac2d.eficas.appli import EficasForTelemac2DAppli -#from salome.hydro.coupling1d2d.eficas.appli import EficasForCoupling1D2DAppli +from salome.hydro.mascaret.eficas.appli import EficasForMascaretAppli +from salome.hydro.telemac2d.eficas.appli import EficasForTelemac2DAppli +from salome.hydro.coupling1d2d.eficas.appli import EficasForCoupling1D2DAppli #import salome.hydro.pytel.gui as pytel_gui -#from salome.hydro.boundary_conditions.eficas.appli import EficasForBoundaryConditionsAppli +from salome.hydro.boundary_conditions.eficas.appli import EficasForBoundaryConditionsAppli import BndConditionsDialog @@ -119,7 +119,7 @@ class GUIcontext: #a = sgPyQt.createAction( GUIcontext.CREATE_PYTEL_CASE_ID, # "Create case for Pytel execution", "Create case for Pytel execution", # "Create a new case for Pytel execution", "create_case_pytel.png" ) - + #sgPyQt.createMenu( a, mid ) #sgPyQt.createTool( a, tid ) @@ -315,7 +315,7 @@ class MyTextDisplayDialog(Ui_TextDisplayDialog, QDialog): Ui_TextDisplayDialog.__init__(self) self.setupUi(self) (self.closeButton.clicked.connect(self.close) - + def set_log(self, log): self.contentTextEdit.setPlainText(log) self.setWindowTitle("Coupling log") diff --git a/src/salome_hydro/interpolz_gui.py b/src/salome_hydro/interpolz_gui.py index a3a5842..22510d5 100644 --- a/src/salome_hydro/interpolz_gui.py +++ b/src/salome_hydro/interpolz_gui.py @@ -1,9 +1,9 @@ import sys, os #sys.path.append(os.path.join(os.environ['MEDFILE_ROOT_DIR'], 'lib/python2.7/site-packages/med')) -sys.path.append(os.path.join(os.environ['MEDFICHIER_INSTALL_DIR'], 'lib/python2.7/site-packages/med')) +#sys.path.append(os.path.join(os.environ['MEDFICHIER_INSTALL_DIR'], 'lib/python2.7/site-packages/med')) hydro_solver_root = os.path.join(os.environ['HYDROSOLVER_ROOT_DIR'], 'lib', 'python2.7', 'site-packages', 'salome', 'salome', 'hydro') -sys.path.append(hydro_solver_root) +#sys.path.append(hydro_solver_root) import salome salome.salome_init() @@ -50,12 +50,12 @@ def get_hydro_regions( calc_case_name ): for r in regions: rname = r.GetName() regions_names.append( str(rname) ) - + shape_groups = case.GetGeometryGroups() for sg in shape_groups: sgname = sg.GetName() regions_names.append( sgname ) - + return regions_names else: return [] @@ -71,7 +71,7 @@ def get_selected_calc_case(): if isinstance(case, HYDROPy.HYDROData_CalculationCase): return name return None - + class InterpolzDlg( QDialog ): def __init__(self, parent = None): QDialog.__init__( self, parent ) @@ -90,30 +90,30 @@ class InterpolzDlg( QDialog ): self.Apply.clicked.connect(self.onApply) self.Close.clicked.connect(self.onClose) self.Help.clicked.connect(self.onHelp) - + def onSelectionChanged( self ): calc_case_name = get_selected_calc_case() if calc_case_name is not None: self.CalcCase.setText( calc_case_name ) - + def onOutputFile( self ): caption = "Python file" mask = "*.py" fname, filt = QFileDialog.getSaveFileName( self, caption, ".", mask ) if fname!=None and fname!="": self.OutputPath.setText( fname ) - + def onMEDFile( self ): caption = "MED file" mask = "*.med" fname, filt = QFileDialog.getOpenFileName( self, caption, ".", mask ) if fname!=None and fname!="": self.MEDFile.setText( fname ) - + def onCalcCaseChanged( self ): self.regions = get_hydro_regions( str(self.CalcCase.text()) ) self.onMEDChanged() - + def onMEDChanged( self ): self.med_groups = get_med_groups( str(self.MEDFile.text()) ) print self.med_groups @@ -124,7 +124,7 @@ class InterpolzDlg( QDialog ): self.Groups.setItem( i, 0, QTableWidgetItem() ) self.Groups.setItem( i, 1, QTableWidgetItem() ) self.Groups.item( i, 0 ).setText( self.med_groups[i] ) - + cb = QComboBox( self.Groups ) for r in self.regions: cb.addItem( r ) @@ -133,7 +133,7 @@ class InterpolzDlg( QDialog ): def onApplyClose( self ): if self.onApply(): self.onClose() - + def onApply( self ): path = str(self.OutputPath.text()) calc_case = str(self.CalcCase.text()) @@ -146,7 +146,7 @@ class InterpolzDlg( QDialog ): med_groups_regions[med_group] = hydro_reg z_undef = self.UndefZ.value() interp = str(self.InterpMethod.currentText()) - + msg = "" if len(path)==0: msg = "Please input the output path" @@ -158,18 +158,18 @@ class InterpolzDlg( QDialog ): msg = "Please fill groups table" elif len(interp)==0: msg = "Please choose interpolation method" - + result = False if len(msg)==0: generate( path, calc_case, med_file, med_groups_regions, z_undef, interp ) msg = "InterpolZ script is successfully generated" result = True - + QMessageBox.information( self, "", msg ) return result - + def onClose( self ): - self.close() + self.close() """Shows help page""" def onHelp( self ):