From d8386568a9055128a84c2a06bb4cfb978b626618 Mon Sep 17 00:00:00 2001 From: YOANN AUDOUIN Date: Mon, 26 Oct 2020 10:20:04 +0100 Subject: [PATCH] Cleanup of unused buttons/actions --- src/HYDROGUI/BreachesDialog.py | 32 ----------- src/HYDROGUI/CMakeLists.txt | 2 - src/HYDROGUI/HYDROSOLVERGUI.py | 74 +++----------------------- src/HYDROGUI/LiquidBoundariesDialog.py | 32 ----------- 4 files changed, 7 insertions(+), 133 deletions(-) delete mode 100644 src/HYDROGUI/BreachesDialog.py delete mode 100644 src/HYDROGUI/LiquidBoundariesDialog.py diff --git a/src/HYDROGUI/BreachesDialog.py b/src/HYDROGUI/BreachesDialog.py deleted file mode 100644 index bedc6e1..0000000 --- a/src/HYDROGUI/BreachesDialog.py +++ /dev/null @@ -1,32 +0,0 @@ -# -*- coding: utf-8 -*- - -import sys, os -import string - -#import sysconfig -#pythonVersion = 'python' + sysconfig.get_python_version() -#hydro_solver_root = os.path.join(os.environ['HYDROSOLVER_ROOT_DIR'], 'lib', pythonVersion, 'site-packages', 'salome') - -#import salome -#salome.salome_init() - -#import HYDROPy - -from PyQt5.QtWidgets import QDialog, QFileDialog, QTableWidgetItem, QComboBox, QMessageBox -from PyQt5 import uic - -#import SalomePyQt -#import libSALOME_Swig -#salome_gui = libSALOME_Swig.SALOMEGUI_Swig() - -class BreachesDialog(): - - def __init__(self, parent = None): - pass - - def exec_(self): - msgBox = QMessageBox() - msgBox.setText( "The Breaches dialog is not yet implemented!" ) - msgBox.exec_() - - diff --git a/src/HYDROGUI/CMakeLists.txt b/src/HYDROGUI/CMakeLists.txt index 6850242..af6eb29 100644 --- a/src/HYDROGUI/CMakeLists.txt +++ b/src/HYDROGUI/CMakeLists.txt @@ -20,8 +20,6 @@ SET(PYFILES HYDROSOLVERGUI.py BndConditionsDialog.py - BreachesDialog.py - LiquidBoundariesDialog.py ) SET(UIFILES diff --git a/src/HYDROGUI/HYDROSOLVERGUI.py b/src/HYDROGUI/HYDROSOLVERGUI.py index 74d60dc..0122d9d 100755 --- a/src/HYDROGUI/HYDROSOLVERGUI.py +++ b/src/HYDROGUI/HYDROSOLVERGUI.py @@ -36,7 +36,7 @@ import HYDROSOLVER_ORB 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 @@ -50,8 +50,6 @@ from salome.hydro.run_study.gui import create_case_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 @@ -62,9 +60,9 @@ from salome.hydro.checkBoundariesDialog import checkBoundariesDialog ################################################ class GUIcontext: - + # --- menus/toolbars/actions IDss - + HYDRO_MENU_ID = 90 CREATE_STUDY_ID = 951 EDIT_STUDY_ID = 952 @@ -79,15 +77,13 @@ class GUIcontext: # 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 @@ -124,7 +120,7 @@ class GUIcontext: "assign_Strickler_py.png" ) sgPyQt.createMenu( act, mid ) sgPyQt.createTool( act, tid ) - + act = sgPyQt.createSeparator() act = sgPyQt.createAction(\ @@ -145,24 +141,6 @@ class GUIcontext: 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", @@ -447,22 +425,6 @@ def edit_boundary_conditions_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 ### @@ -479,26 +441,6 @@ def check_boundaries(): 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 ### @@ -519,7 +461,7 @@ def changeCoords_py(): desktop = sgPyQt.getDesktop() dlg = changeCoordsDialog(desktop) dlg.show() - + ### # Open dialog for boundary conditions edition ### @@ -555,11 +497,9 @@ dict_command = { 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, diff --git a/src/HYDROGUI/LiquidBoundariesDialog.py b/src/HYDROGUI/LiquidBoundariesDialog.py deleted file mode 100644 index b10938e..0000000 --- a/src/HYDROGUI/LiquidBoundariesDialog.py +++ /dev/null @@ -1,32 +0,0 @@ -# -*- coding: utf-8 -*- - -import sys, os -import string - -#import sysconfig -#pythonVersion = 'python' + sysconfig.get_python_version() -#hydro_solver_root = os.path.join(os.environ['HYDROSOLVER_ROOT_DIR'], 'lib', pythonVersion, 'site-packages', 'salome') - -#import salome -#salome.salome_init() - -#import HYDROPy - -from PyQt5.QtWidgets import QDialog, QFileDialog, QTableWidgetItem, QComboBox, QMessageBox -from PyQt5 import uic - -#import SalomePyQt -#import libSALOME_Swig -#salome_gui = libSALOME_Swig.SALOMEGUI_Swig() - -class LiquidBoundariesDialog(): - - def __init__(self, parent = None): - pass - - def exec_(self): - msgBox = QMessageBox() - msgBox.setText( "The Liquid boundaries dialog is not yet implemented!" ) - msgBox.exec_() - - \ No newline at end of file -- 2.39.2