From: mzn Date: Thu, 24 Nov 2016 13:01:35 +0000 (+0300) Subject: Lot 4: add main menu "Edit boundary conditions file" X-Git-Tag: v1.6~3 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=ada4231393617b603d35c939db18409e0f26e98b;p=modules%2Fhydrosolver.git Lot 4: add main menu "Edit boundary conditions file" --- diff --git a/resources/CMakeLists.txt b/resources/CMakeLists.txt index 59a9e8e..f849c1a 100644 --- a/resources/CMakeLists.txt +++ b/resources/CMakeLists.txt @@ -30,6 +30,7 @@ SET(HYDROSOLVER_RESOURCES_FILES create_case_pytel.png case_pytel.png define_boundary_conditions.png + edit_boundary_conditions_file.png ) INSTALL(FILES ${HYDROSOLVER_RESOURCES_FILES} DESTINATION ${SALOME_HYDROSOLVER_INSTALL_RES_DATA}) diff --git a/resources/edit_boundary_conditions_file.png b/resources/edit_boundary_conditions_file.png new file mode 100644 index 0000000..4a75bcb Binary files /dev/null and b/resources/edit_boundary_conditions_file.png differ diff --git a/src/HYDROGUI/HYDROSOLVERGUI.py b/src/HYDROGUI/HYDROSOLVERGUI.py index 43b030f..0b4d508 100644 --- a/src/HYDROGUI/HYDROSOLVERGUI.py +++ b/src/HYDROGUI/HYDROSOLVERGUI.py @@ -41,6 +41,8 @@ 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 +import BndConditionsDialog + ################################################ # GUI context class # Used to store actions, menus, toolbars, etc... @@ -64,6 +66,7 @@ class GUIcontext: EDIT_PYTEL_CASE_ID = 953 GENERATE_JOB = 954 DEFINE_BOUNDARY_CONDITIONS_ID = 955 + EDIT_BOUNDARY_CONDITIONS_FILE_ID = 956 def __init__( self ): # create top-level menu @@ -78,6 +81,13 @@ class GUIcontext: sgPyQt.createMenu( a, mid ) sgPyQt.createTool( a, tid ) + a = sgPyQt.createAction( GUIcontext.EDIT_BOUNDARY_CONDITIONS_FILE_ID, + "Edit boundary conditions file", "Edit boundary conditions file", + "Create/edit the boundary conditions file for Telemac", + "edit_boundary_conditions_file.png" ) + sgPyQt.createMenu( a, mid ) + sgPyQt.createTool( a, tid ) + a = sgPyQt.createSeparator() sgPyQt.createMenu( a, mid ) sgPyQt.createTool( a, tid ) @@ -415,6 +425,13 @@ def open_schema_in_yacs(): def define_boundary_conditions(): EficasForBoundaryConditionsAppli() +### +# Open dialog for boundary conditions edition +### +def edit_boundary_conditions_file(): + dlg = BndConditionsDialog.BoundaryConditionsDialog() + dlg.exec_() + ### # Commands dictionary ### @@ -434,4 +451,5 @@ dict_command = { GUIcontext.EDIT_PYTEL_CASE_ID: pytel_gui.edit_selected_case, GUIcontext.GENERATE_JOB: pytel_gui.generate_job_for_selected_case, GUIcontext.DEFINE_BOUNDARY_CONDITIONS_ID: define_boundary_conditions, + GUIcontext.EDIT_BOUNDARY_CONDITIONS_FILE_ID: edit_boundary_conditions_file, }