from salome.hydro.interpolz_gui import InterpolzDlg
from salome.hydro.assignStrickler_gui import assignStricklerDlg
-from salome.hydro.changeCoordsDialog import changeCoordsDialog
+from salome.hydro.changeCoordsDialog import changeCoordsDialog
from salome.hydro.gui_utils import HSGUIException, wait_cursor, \
get_and_check_selected_file_path
import salome.hydro.study as hydro_study
from eficasSalome import runEficas
from BndConditionsDialog import BoundaryConditionsDialog
-from LiquidBoundariesDialog import LiquidBoundariesDialog
-from BreachesDialog import BreachesDialog
from salome.hydro.initialFieldDialog import initialFieldDialog
from salome.hydro.checkBoundariesDialog import checkBoundariesDialog
################################################
class GUIcontext:
-
+
# --- menus/toolbars/actions IDss
-
+
HYDRO_MENU_ID = 90
CREATE_STUDY_ID = 951
EDIT_STUDY_ID = 952
# TODO Add create and edit ?
EDIT_BOUNDARY_CONDITIONS_FILE_ID = 959
- EDIT_LIQUID_BOUNDARY_FILE_ID = 960
- EDIT_BREACHES_FILE_ID = 961
EDIT_INITIAL_FIELD_FILE_ID = 962
CREATE_PARAM_STUDY_ID = 963
EDIT_PARAM_STUDY_ID = 964
GEN_PARAM_STUDY_PYTHON_ID = 965
GEN_PARAM_STUDY_YACS_ID = 966
-
+
CHANGECOORDS_PY_ID = 967
CHECK_BOUNDARY_CONDITIONS_ID = 968
"assign_Strickler_py.png" )
sgPyQt.createMenu( act, mid )
sgPyQt.createTool( act, tid )
-
+
act = sgPyQt.createSeparator()
act = sgPyQt.createAction(\
sgPyQt.createMenu(act, mid)
sgPyQt.createTool(act, tid)
- act = sgPyQt.createAction(\
- GUIcontext.EDIT_LIQUID_BOUNDARY_FILE_ID,
- "Edit evolution of liquid boundary conditions file",
- "Edit evolution of liquid boundary conditions file",
- "Create/edit the evolution in time of the liquid boundary conditions file for Telemac",
- "edit_liquid_boundary_conditions_file.png")
- sgPyQt.createMenu(act, mid)
- sgPyQt.createTool(act, tid)
-
- act = sgPyQt.createAction(\
- GUIcontext.EDIT_BREACHES_FILE_ID,
- "Edit breaches file",
- "Edit breaches file",
- "Create/edit the breaches file for Telemac",
- "edit_breaches_file.png")
- sgPyQt.createMenu(act, mid)
- sgPyQt.createTool(act, tid)
-
act = sgPyQt.createAction(\
GUIcontext.EDIT_INITIAL_FIELD_FILE_ID,
"Edit initial field file",
dlg = BoundaryConditionsDialog(desktop)
dlg.exec_()
-###
-# Open dialog for liquid boundaries edition
-###
-def edit_liquid_boundaries_file():
- desktop = sgPyQt.getDesktop()
- dlg = LiquidBoundariesDialog(desktop)
- dlg.exec_()
-
-###
-# Open dialog for breaches edition
-###
-def edit_breaches_file():
- desktop = sgPyQt.getDesktop()
- dlg = BreachesDialog(desktop)
- dlg.exec_()
-
###
# Open dialog for initial conditions edition
###
dlg = checkBoundariesDialog(desktop)
dlg.exec_()
-###
-# Open dialog for liquid boundary conditions edition
-###
-def edit_liquid_boundary_file():
- # TODO: Implement gui
- QMessageBox.warning(sgPyQt.getDesktop(),
- "",
- "Liquid boundary file handling not implemented yet")
- return
-
-###
-# Open dialog for breaches file edition
-###
-def edit_breaches_file():
- # TODO: Implement gui
- QMessageBox.warning(sgPyQt.getDesktop(),
- "",
- "Breaches file handling not implemented yet")
- return
-
###
# Open dialog for interpolz.py script generation
###
desktop = sgPyQt.getDesktop()
dlg = changeCoordsDialog(desktop)
dlg.show()
-
+
###
# Open dialog for boundary conditions edition
###
GUIcontext.EDIT_TELMA_CAS_ID: edit_telma_cas,
GUIcontext.GENERATE_INTERPOLZ_PY_ID: generate_interpolz_py,
GUIcontext.GENERATE_ASSIGNSTRICKLER_PY_ID: generate_assignStrickler_py,
- GUIcontext.CHANGECOORDS_PY_ID: changeCoords_py,
- GUIcontext.EDIT_LIQUID_BOUNDARY_FILE_ID: edit_liquid_boundary_file,
+ GUIcontext.CHANGECOORDS_PY_ID: changeCoords_py,
GUIcontext.EDIT_BOUNDARY_CONDITIONS_FILE_ID: edit_boundary_conditions_file,
GUIcontext.CHECK_BOUNDARY_CONDITIONS_ID: check_boundaries,
- GUIcontext.EDIT_BREACHES_FILE_ID: edit_breaches_file,
GUIcontext.EDIT_INITIAL_FIELD_FILE_ID: edit_initial_field_file,
GUIcontext.CREATE_PARAM_STUDY_ID: create_param_study,
GUIcontext.EDIT_PARAM_STUDY_ID: edit_param_study,