From 074705656261ad6f5c52d586df70aea242f050c5 Mon Sep 17 00:00:00 2001 From: Konstantin Leontev Date: Thu, 15 Dec 2022 19:08:36 +0300 Subject: [PATCH] [bos #32523][EDF] SALOME on Demand GUI. Added INFO button. --- CMakeLists.txt | 78 ++++++++++---------- src/LightApp/CMakeLists.txt | 1 + src/LightApp/LightApp_ModuleAction.cxx | 4 + src/LightApp/LightApp_ModuleAction.h | 1 + src/LightApp/resources/LightApp_images.ts | 4 + src/LightApp/resources/LightApp_msg_en.ts | 4 + src/LightApp/resources/LightApp_msg_fr.ts | 4 + src/LightApp/resources/icon_info_module.png | Bin 0 -> 266 bytes 8 files changed, 57 insertions(+), 39 deletions(-) create mode 100644 src/LightApp/resources/icon_info_module.png diff --git a/CMakeLists.txt b/CMakeLists.txt index 113cc34e2..b9b4a03f1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -63,7 +63,7 @@ SET(BUILD_SHARED_LIBS TRUE) OPTION(SALOME_BUILD_DOC "Generate SALOME GUI documentation" ON) OPTION(SALOME_BUILD_TESTS "Build SALOME tests" ON) OPTION(SALOME_GUI_USE_OBSERVERS "Use study observers in GUI (advanced)" ON) -OPTION(SALOME_ON_DEMAND "Activate SALOME on demand feature" OFF) +OPTION(SALOME_ON_DEMAND "Activate SALOME on demand feature" ON) CMAKE_DEPENDENT_OPTION(SALOME_GUI_BUILD_FRENCH_DOC "Generate SALOME GUI French documentation" OFF "SALOME_BUILD_DOC" OFF) @@ -111,7 +111,7 @@ IF(NOT SALOME_LIGHT_ONLY) FIND_PACKAGE(SalomeOmniORBPy REQUIRED) ELSE() ADD_DEFINITIONS("-DGUI_DISABLE_CORBA") -ENDIF() +ENDIF() IF(SALOME_BUILD_TESTS) ENABLE_TESTING() FIND_PACKAGE(SalomeCppUnit) @@ -193,8 +193,8 @@ ENDIF() # - VTK viewer: VTK IF(SALOME_USE_VTKVIEWER) - # Required components are listed in the FindSalomeVTK.cmake file: - FIND_PACKAGE(SalomeVTK) + # Required components are listed in the FindSalomeVTK.cmake file: + FIND_PACKAGE(SalomeVTK) SALOME_LOG_OPTIONAL_PACKAGE(VTK SALOME_USE_VTKVIEWER) # VSR: TODO: since ParaView 5.8 the following is not needed, as OPENGL2 is hardcoded: to be removed (everywhere) ADD_DEFINITIONS("-DVTK_OPENGL2") @@ -254,18 +254,18 @@ SET(SALOME_INSTALL_BINS "${SALOME_INSTALL_BINS}" CACHE PATH "Install path: SALOM SET(SALOME_INSTALL_LIBS "${SALOME_INSTALL_LIBS}" CACHE PATH "Install path: SALOME libs") SET(SALOME_INSTALL_IDLS "${SALOME_INSTALL_IDLS}" CACHE PATH "Install path: SALOME IDL files") SET(SALOME_INSTALL_HEADERS "${SALOME_INSTALL_HEADERS}" CACHE PATH "Install path: SALOME headers") -SET(SALOME_INSTALL_SCRIPT_SCRIPTS "${SALOME_INSTALL_SCRIPT_SCRIPTS}" CACHE PATH +SET(SALOME_INSTALL_SCRIPT_SCRIPTS "${SALOME_INSTALL_SCRIPT_SCRIPTS}" CACHE PATH "Install path: SALOME scripts") -SET(SALOME_INSTALL_SCRIPT_DATA "${SALOME_INSTALL_SCRIPT_DATA}" CACHE PATH +SET(SALOME_INSTALL_SCRIPT_DATA "${SALOME_INSTALL_SCRIPT_DATA}" CACHE PATH "Install path: SALOME script data") -SET(SALOME_INSTALL_SCRIPT_PYTHON "${SALOME_INSTALL_SCRIPT_PYTHON}" CACHE PATH +SET(SALOME_INSTALL_SCRIPT_PYTHON "${SALOME_INSTALL_SCRIPT_PYTHON}" CACHE PATH "Install path: SALOME Python scripts") SET(SALOME_INSTALL_PYTHON "${SALOME_INSTALL_PYTHON}" CACHE PATH "Install path: SALOME Python stuff") -SET(SALOME_INSTALL_PYTHON_SHARED "${SALOME_INSTALL_PYTHON_SHARED}" CACHE PATH +SET(SALOME_INSTALL_PYTHON_SHARED "${SALOME_INSTALL_PYTHON_SHARED}" CACHE PATH "Install path: SALOME Python shared modules") SET(SALOME_INSTALL_CMAKE "${SALOME_INSTALL_CMAKE}" CACHE PATH "Install path: SALOME CMake files") -SET(SALOME_INSTALL_CMAKE_LOCAL "${SALOME_INSTALL_CMAKE_LOCAL}" CACHE PATH - "Install path: local SALOME CMake files") +SET(SALOME_INSTALL_CMAKE_LOCAL "${SALOME_INSTALL_CMAKE_LOCAL}" CACHE PATH + "Install path: local SALOME CMake files") SET(SALOME_INSTALL_AMCONFIG_LOCAL "${SALOME_INSTALL_AMCONFIG_LOCAL}" CACHE PATH "Install path: local SALOME config files (obsolete, to be removed)") @@ -273,11 +273,11 @@ SET(SALOME_INSTALL_RES "${SALOME_INSTALL_RES}" CACHE PATH "Install path: SALOME SET(SALOME_INSTALL_DOC "${SALOME_INSTALL_DOC}" CACHE PATH "Install path: SALOME documentation") # Specific to GUI: -SET(SALOME_GUI_INSTALL_RES_DATA "${SALOME_INSTALL_RES}/gui" CACHE PATH +SET(SALOME_GUI_INSTALL_RES_DATA "${SALOME_INSTALL_RES}/gui" CACHE PATH "Install path: SALOME GUI specific data") -SET(SALOME_GUI_INSTALL_RES_SCRIPTS "${SALOME_INSTALL_RES}/gui" CACHE PATH +SET(SALOME_GUI_INSTALL_RES_SCRIPTS "${SALOME_INSTALL_RES}/gui" CACHE PATH "Install path: SALOME GUI scripts") -SET(SALOME_GUI_INSTALL_PLUGINS share/salome/plugins/gui CACHE PATH +SET(SALOME_GUI_INSTALL_PLUGINS share/salome/plugins/gui CACHE PATH "Install path: SALOME GUI plugins") MARK_AS_ADVANCED(SALOME_INSTALL_BINS SALOME_INSTALL_LIBS SALOME_INSTALL_IDLS SALOME_INSTALL_HEADERS) @@ -292,9 +292,9 @@ SALOME_ACCUMULATE_ENVIRONMENT(PYTHONPATH NOCHECK ${CMAKE_INSTALL_PREFIX}/${SALOM ${CMAKE_INSTALL_PREFIX}/${SALOME_INSTALL_PYTHON} ${CMAKE_INSTALL_PREFIX}/${SALOME_INSTALL_LIBS} ${CMAKE_INSTALL_PREFIX}/${SALOME_INSTALL_PYTHON_SHARED}) -SALOME_ACCUMULATE_ENVIRONMENT(LD_LIBRARY_PATH NOCHECK ${CMAKE_INSTALL_PREFIX}/${SALOME_INSTALL_LIBS}) - -# Sources +SALOME_ACCUMULATE_ENVIRONMENT(LD_LIBRARY_PATH NOCHECK ${CMAKE_INSTALL_PREFIX}/${SALOME_INSTALL_LIBS}) + +# Sources # ======== IF(NOT SALOME_LIGHT_ONLY) ADD_SUBDIRECTORY(idl) @@ -319,74 +319,74 @@ INCLUDE(CMakePackageConfigHelpers) # List of targets in this project we want to make visible to the rest of the world. # They all have to be INSTALL'd with the option "EXPORT ${PROJECT_NAME}TargetGroup" -SET(_${PROJECT_NAME}_exposed_targets +SET(_${PROJECT_NAME}_exposed_targets CAM CASCatch DDS Event LightApp LogWindow ObjBrowser QDS qtx SalomePrs SalomeStyle std SUITApp suit ViewerTools ViewerData ImageComposer ) IF(SALOME_USE_OCCVIEWER OR SALOME_USE_VTKVIEWER OR SALOME_USE_GLVIEWER) - LIST(APPEND _${PROJECT_NAME}_exposed_targets + LIST(APPEND _${PROJECT_NAME}_exposed_targets OpenGLUtils) ENDIF(SALOME_USE_OCCVIEWER OR SALOME_USE_VTKVIEWER OR SALOME_USE_GLVIEWER) # SALOME object specific targets: IF(SALOME_USE_SALOMEOBJECT) - LIST(APPEND _${PROJECT_NAME}_exposed_targets + LIST(APPEND _${PROJECT_NAME}_exposed_targets SalomeObject) ENDIF(SALOME_USE_SALOMEOBJECT) # GL specific targets: IF(SALOME_USE_GLVIEWER) - LIST(APPEND _${PROJECT_NAME}_exposed_targets + LIST(APPEND _${PROJECT_NAME}_exposed_targets GLViewer) ENDIF(SALOME_USE_GLVIEWER) # VTK specific targets: IF(SALOME_USE_VTKVIEWER) - LIST(APPEND _${PROJECT_NAME}_exposed_targets + LIST(APPEND _${PROJECT_NAME}_exposed_targets VTKViewer ) IF(SALOME_USE_SALOMEOBJECT) - LIST(APPEND _${PROJECT_NAME}_exposed_targets + LIST(APPEND _${PROJECT_NAME}_exposed_targets SVTK) ENDIF(SALOME_USE_SALOMEOBJECT) ENDIF(SALOME_USE_VTKVIEWER) # OCC specific targets: IF(SALOME_USE_OCCVIEWER) - LIST(APPEND _${PROJECT_NAME}_exposed_targets + LIST(APPEND _${PROJECT_NAME}_exposed_targets OCCViewer) IF(SALOME_USE_SALOMEOBJECT) - LIST(APPEND _${PROJECT_NAME}_exposed_targets + LIST(APPEND _${PROJECT_NAME}_exposed_targets SOCC) ENDIF(SALOME_USE_SALOMEOBJECT) ENDIF(SALOME_USE_OCCVIEWER) # Plot2d specific targets: IF(SALOME_USE_PLOT2DVIEWER) - LIST(APPEND _${PROJECT_NAME}_exposed_targets + LIST(APPEND _${PROJECT_NAME}_exposed_targets Plot2d) IF(SALOME_USE_SALOMEOBJECT) - LIST(APPEND _${PROJECT_NAME}_exposed_targets + LIST(APPEND _${PROJECT_NAME}_exposed_targets SPlot2d) ENDIF(SALOME_USE_SALOMEOBJECT) ENDIF(SALOME_USE_PLOT2DVIEWER) # Qx specific targets: IF(SALOME_USE_QXGRAPHVIEWER) - LIST(APPEND _${PROJECT_NAME}_exposed_targets + LIST(APPEND _${PROJECT_NAME}_exposed_targets QxScene) ENDIF(SALOME_USE_QXGRAPHVIEWER) # GraphicsView specific targets: IF(SALOME_USE_GRAPHICSVIEW) - LIST(APPEND _${PROJECT_NAME}_exposed_targets + LIST(APPEND _${PROJECT_NAME}_exposed_targets GraphicsView) ENDIF(SALOME_USE_GRAPHICSVIEW) # PyEditor/Viewer specific targets: IF(SALOME_USE_PYVIEWER) - LIST(APPEND _${PROJECT_NAME}_exposed_targets + LIST(APPEND _${PROJECT_NAME}_exposed_targets PyEditor PyViewer) ENDIF(SALOME_USE_PYVIEWER) @@ -397,7 +397,7 @@ ENDIF() # Python-based packages specific targets: IF(SALOME_USE_PYCONSOLE) - LIST(APPEND _${PROJECT_NAME}_exposed_targets + LIST(APPEND _${PROJECT_NAME}_exposed_targets PyInterp PyConsole SalomePyQtGUILight) IF(SALOME_USE_PLOT2DVIEWER) LIST(APPEND _${PROJECT_NAME}_exposed_targets SalomePyQt) @@ -434,34 +434,34 @@ SET(OPENGL_ROOT_DIR "${OPENGL_ROOT_DIR}") SET(PARAVIEW_ROOT_DIR "${PARAVIEW_ROOT_DIR}") SET(VTK_ROOT_DIR "${VTK_ROOT_DIR}") SET(QWT_ROOT_DIR "${QWT_ROOT_DIR}") - + SET(CONF_INCLUDE_DIRS "${PROJECT_SOURCE_DIR}/include" "${PROJECT_BINARY_DIR}/include") # Build variables that will be expanded when configuring SalomeConfig.cmake: SALOME_CONFIGURE_PREPARE(OpenCASCADE OpenGL Qt5 PyQt5 Qwt SIP ParaView VTK) -CONFIGURE_PACKAGE_CONFIG_FILE(${PROJECT_NAME}Config.cmake.in +CONFIGURE_PACKAGE_CONFIG_FILE(${PROJECT_NAME}Config.cmake.in ${PROJECT_BINARY_DIR}/${PROJECT_NAME}Config.cmake INSTALL_DESTINATION "${SALOME_INSTALL_CMAKE_LOCAL}" PATH_VARS CONF_INCLUDE_DIRS SALOME_INSTALL_CMAKE_LOCAL CMAKE_INSTALL_PREFIX - KERNEL_ROOT_DIR SIP_ROOT_DIR QT_ROOT_DIR PYQT_ROOT_DIR OPENCASCADE_ROOT_DIR + KERNEL_ROOT_DIR SIP_ROOT_DIR QT_ROOT_DIR PYQT_ROOT_DIR OPENCASCADE_ROOT_DIR OPENGL_ROOT_DIR PARAVIEW_ROOT_DIR VTK_ROOT_DIR QWT_ROOT_DIR) # - in the install tree (VSR 16/08/2013: TEMPORARILY COMMENT THIS - TO REMOVE?): -# Get the relative path of the include directory so +# Get the relative path of the include directory so # we can register it in the generated configuration files: #SET(CONF_INCLUDE_DIRS "${CMAKE_INSTALL_PREFIX}/${INSTALL_INCLUDE_DIR}") -#CONFIGURE_PACKAGE_CONFIG_FILE(adm_local/cmake_files/${PROJECT_NAME}Config.cmake.in +#CONFIGURE_PACKAGE_CONFIG_FILE(adm_local/cmake_files/${PROJECT_NAME}Config.cmake.in # ${PROJECT_BINARY_DIR}/to_install/${PROJECT_NAME}Config.cmake # INSTALL_DESTINATION "${SALOME_INSTALL_CMAKE_LOCAL}" -# PATH_VARS CONF_INCLUDE_DIRS SALOME_INSTALL_CMAKE_LOCAL CMAKE_INSTALL_PREFIX -# KERNEL_ROOT_DIR SIP_ROOT_DIR QT_ROOT_DIR PYQT_ROOT_DIR OPENCASCADE_ROOT_DIR +# PATH_VARS CONF_INCLUDE_DIRS SALOME_INSTALL_CMAKE_LOCAL CMAKE_INSTALL_PREFIX +# KERNEL_ROOT_DIR SIP_ROOT_DIR QT_ROOT_DIR PYQT_ROOT_DIR OPENCASCADE_ROOT_DIR # OPENGL_ROOT_DIR PARAVIEW_ROOT_DIR VTK_ROOT_DIR QWT_ROOT_DIR) WRITE_BASIC_PACKAGE_VERSION_FILE(${PROJECT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake VERSION ${${PROJECT_NAME_UC}_VERSION} COMPATIBILITY AnyNewerVersion) - + # Install the CMake configuration files: INSTALL(FILES "${PROJECT_BINARY_DIR}/${PROJECT_NAME}Config.cmake" @@ -469,5 +469,5 @@ INSTALL(FILES DESTINATION "${SALOME_INSTALL_CMAKE_LOCAL}") # Install the export set for use with the install-tree -INSTALL(EXPORT ${PROJECT_NAME}TargetGroup DESTINATION "${SALOME_INSTALL_CMAKE_LOCAL}" +INSTALL(EXPORT ${PROJECT_NAME}TargetGroup DESTINATION "${SALOME_INSTALL_CMAKE_LOCAL}" FILE ${PROJECT_NAME}Targets.cmake) diff --git a/src/LightApp/CMakeLists.txt b/src/LightApp/CMakeLists.txt index 993298328..e42e7d7e4 100644 --- a/src/LightApp/CMakeLists.txt +++ b/src/LightApp/CMakeLists.txt @@ -229,6 +229,7 @@ SET(_other_RESOURCES resources/icon_life_ring.png resources/icon_add_module.png resources/icon_remove_module.png + resources/icon_info_module.png resources/LightApp.xml ) diff --git a/src/LightApp/LightApp_ModuleAction.cxx b/src/LightApp/LightApp_ModuleAction.cxx index f7a8f27af..8e941b80e 100644 --- a/src/LightApp/LightApp_ModuleAction.cxx +++ b/src/LightApp/LightApp_ModuleAction.cxx @@ -255,6 +255,10 @@ LightApp_ModuleAction::LightApp_ModuleAction( QtxResourceMgr* resMgr, QObject* p 0, this ); myRemove->setEnabled( false ); myRemove->setMenu( new QMenu() ); + myInfo = new QtxAction( tr( "INFO_MODULE"), + resMgr->loadPixmap( "LightApp", tr( "ICON_INFO_MODULE" ), false ), + tr( "INFO_MODULE"), + 0, this ); mySeparator = new QAction( this ); mySeparator->setSeparator( true ); mySet = new ActionSet( this ); diff --git a/src/LightApp/LightApp_ModuleAction.h b/src/LightApp/LightApp_ModuleAction.h index acc92746e..2bf77f589 100644 --- a/src/LightApp/LightApp_ModuleAction.h +++ b/src/LightApp/LightApp_ModuleAction.h @@ -104,6 +104,7 @@ private: ComboAction* myCombo; QtxAction* myAdd; QtxAction* myRemove; + QtxAction* myInfo; ActionSet* mySet; QAction* mySeparator; int myMode; diff --git a/src/LightApp/resources/LightApp_images.ts b/src/LightApp/resources/LightApp_images.ts index 29f083f39..904c079a2 100644 --- a/src/LightApp/resources/LightApp_images.ts +++ b/src/LightApp/resources/LightApp_images.ts @@ -43,5 +43,9 @@ ICON_REMOVE_MODULE icon_remove_module.png + + ICON_INFO_MODULE + icon_info_module.png + diff --git a/src/LightApp/resources/LightApp_msg_en.ts b/src/LightApp/resources/LightApp_msg_en.ts index 15d27efdf..7efdd23bc 100644 --- a/src/LightApp/resources/LightApp_msg_en.ts +++ b/src/LightApp/resources/LightApp_msg_en.ts @@ -1367,6 +1367,10 @@ Continue? REMOVE_MODULE Remove modules + + INFO_MODULE + Module information + LightApp_PyEditor diff --git a/src/LightApp/resources/LightApp_msg_fr.ts b/src/LightApp/resources/LightApp_msg_fr.ts index 29e2505d8..2653b5661 100644 --- a/src/LightApp/resources/LightApp_msg_fr.ts +++ b/src/LightApp/resources/LightApp_msg_fr.ts @@ -1333,6 +1333,10 @@ Continue? REMOVE_MODULE Supprimer les modules + + INFO_MODULE + Information sur le module + LightApp_PyEditor diff --git a/src/LightApp/resources/icon_info_module.png b/src/LightApp/resources/icon_info_module.png new file mode 100644 index 0000000000000000000000000000000000000000..7b70fb395ddc3e33b0841f3262e6be5ac48af1d4 GIT binary patch literal 266 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdz#^NA%Cx&(BWL^R}Ea{HEjtmSN z`?>!lvI6;>1s;*b3=BdgAk26#O}+vsC|TkfQ4*Y=R#Ki=l*-_klAn~S;F+74o*I;z zm{M7IGSvpCsLIpDF(kr0`42w}4>QM%1z#E(1KD|E+0X3yI;*kpqqhOu#*?fm&zUA1 zJ@KG^jl~pKDT!Ty2A5?Piq7=alF;oq!NvH6g@gHtipwS^hS{#l`r-lHJyr=<7#H(N zlpeTH!m#ZWM>wl1$AmWwHDVJVcU)vUxq{hk7qf%}!@ee+eW}UY_5fYM;OXk;vd$@? F2>|7ERCWLW literal 0 HcmV?d00001 -- 2.39.2