]> SALOME platform Git repositories - modules/hydrosolver.git/commitdiff
Salome HOME
Lot 4: add main menu "Edit boundary conditions file"
authormzn <mzn@opencascade.com>
Thu, 24 Nov 2016 13:01:35 +0000 (16:01 +0300)
committermzn <mzn@opencascade.com>
Thu, 24 Nov 2016 13:01:35 +0000 (16:01 +0300)
resources/CMakeLists.txt
resources/edit_boundary_conditions_file.png [new file with mode: 0644]
src/HYDROGUI/HYDROSOLVERGUI.py

index 59a9e8e5dd3e697ec4fe46f1ae4c337dc23b637f..f849c1a776539ba68b7c1195f3953ed1ebb60e0d 100644 (file)
@@ -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 (file)
index 0000000..4a75bcb
Binary files /dev/null and b/resources/edit_boundary_conditions_file.png differ
index 43b030fe641ff029c2726a0e12c81bafecd4ca19..0b4d5086220a375926e30885c70e50cbdb559d78 100644 (file)
@@ -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,
     }