]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
[bos #32523][EDF] SALOME on Demand GUI. Added INFO button.
authorKonstantin Leontev <konstantin.leontev@opencascade.com>
Thu, 15 Dec 2022 16:08:36 +0000 (19:08 +0300)
committerKonstantin LEONTEV <konstantin.leontev@opencascade.com>
Wed, 8 Mar 2023 13:06:12 +0000 (14:06 +0100)
CMakeLists.txt
src/LightApp/CMakeLists.txt
src/LightApp/LightApp_ModuleAction.cxx
src/LightApp/LightApp_ModuleAction.h
src/LightApp/resources/LightApp_images.ts
src/LightApp/resources/LightApp_msg_en.ts
src/LightApp/resources/LightApp_msg_fr.ts
src/LightApp/resources/icon_info_module.png [new file with mode: 0644]

index 113cc34e2c6b964e5914d6d42a39f45d110b011e..b9b4a03f1aff153360372f267e635a16d40ecebe 100644 (file)
@@ -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 Salome<MODULE>Config.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)
index 993298328cd53b335fefdde0fa44364ee3bda945..e42e7d7e4973636f0b76f9cce008882e4b4f74fa 100644 (file)
@@ -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
 )
 
index f7a8f27af24f90aae581693599df408fbde66e56..8e941b80e825d3c22aac0fcc8821d4f485814b40 100644 (file)
@@ -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 );
index acc92746eb9e36ad9ef8c0321e14d79c1138f65a..2bf77f5896a4d4c81b6b1c03602b1fe9e9a97698 100644 (file)
@@ -104,6 +104,7 @@ private:
   ComboAction*     myCombo;
   QtxAction*       myAdd;
   QtxAction*       myRemove;
+  QtxAction*       myInfo;
   ActionSet*       mySet;
   QAction*         mySeparator;
   int              myMode;
index 29f083f39d47302d943687176a282b300376073c..904c079a2fdf2653af2376ceed6a8552ad54eefb 100644 (file)
@@ -43,5 +43,9 @@
         <source>ICON_REMOVE_MODULE</source>
         <translation>icon_remove_module.png</translation>
     </message>
+    <message>
+        <source>ICON_INFO_MODULE</source>
+        <translation>icon_info_module.png</translation>
+    </message>
 </context>
 </TS>
index 15d27efdf5e0cc57484e6d2a31000bd1350c6af2..7efdd23bc1543e469a3c49eb67cc025aecafbd54 100644 (file)
@@ -1367,6 +1367,10 @@ Continue?</translation>
         <source>REMOVE_MODULE</source>
         <translation>Remove modules</translation>
     </message>
+    <message>
+        <source>INFO_MODULE</source>
+        <translation>Module information</translation>
+    </message>
 </context>
 <context>
     <name>LightApp_PyEditor</name>
index 29e2505d8ce9bbcbaf067ef98347e94b21811a96..2653b56612c52ae52146f1fdaed7c7b521f99ceb 100644 (file)
@@ -1333,6 +1333,10 @@ Continue?</translation>
         <source>REMOVE_MODULE</source>
         <translation>Supprimer les modules</translation>
     </message>
+    <message>
+        <source>INFO_MODULE</source>
+        <translation>Information sur le module</translation>
+    </message>
 </context>
 <context>
     <name>LightApp_PyEditor</name>
diff --git a/src/LightApp/resources/icon_info_module.png b/src/LightApp/resources/icon_info_module.png
new file mode 100644 (file)
index 0000000..7b70fb3
Binary files /dev/null and b/src/LightApp/resources/icon_info_module.png differ