From ada4231393617b603d35c939db18409e0f26e98b Mon Sep 17 00:00:00 2001 From: mzn Date: Thu, 24 Nov 2016 16:01:35 +0300 Subject: [PATCH] Lot 4: add main menu "Edit boundary conditions file" --- resources/CMakeLists.txt | 1 + resources/edit_boundary_conditions_file.png | Bin 0 -> 571 bytes src/HYDROGUI/HYDROSOLVERGUI.py | 18 ++++++++++++++++++ 3 files changed, 19 insertions(+) create mode 100644 resources/edit_boundary_conditions_file.png 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 0000000000000000000000000000000000000000..4a75bcb266c76168b582cee21043112e67f41c40 GIT binary patch literal 571 zcmV-B0>u4^P)Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2jB}B z4FC)|gCIKq000?uMObu0Z*6U5Zgc=ca%Ew3Wn>_CX>@2HM@dakSAh-}0004&Nkl6o$V$t0V!f1PNnov=K$YPVo))9r6MzKEPNlg2lpiau<8wVXDA(Ya_@u z+5}Q0*=$g55eS2l%x{t0*-3~qclW?y{yB5`=09`p9m6`3B$0Ct=NwsBLZHFGMx()aJg$XC09lp=0h`SxgTbH@dJ7=W z^IBl5)!Hs;*Px=Xu?>q%(-dnhl@5zns#9oVMmuZ!`_DN&ZG{21L01@m@uqbnr)hu+b*RjwW1Xo9l*lDd+P|4Qi}DV20AsarrRf0`eUJ{d!FTgo53 zzx(bd2QhrTfbYOTyjpZ}0WX2q@k(FQ;nF*iy=t|rZyf)F`~#zz72{vqm-PSu002ov JPDHLkV1i5+@Cg6_ literal 0 HcmV?d00001 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, } -- 2.39.2