]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
First version of standalone app
authorYoann Audouin <B61570@dsp0919998.atlas.edf.fr>
Thu, 1 Jul 2021 09:53:43 +0000 (11:53 +0200)
committerYoann Audouin <B61570@dsp0919998.atlas.edf.fr>
Thu, 1 Jul 2021 09:53:43 +0000 (11:53 +0200)
19 files changed:
CMakeLists.txt
src/CMakeLists.txt
src/LightApp/LightApp_Application.cxx
src/LightApp/resources/LightApp_msg_fr.ts
src/LightApplication/CMakeLists.txt [new file with mode: 0644]
src/LightApplication/LightApplication.cxx [new file with mode: 0644]
src/LightApplication/LightApplication.h [new file with mode: 0644]
src/LightApplication/LightDesktop.cxx [new file with mode: 0644]
src/LightApplication/LightDesktop.h [new file with mode: 0644]
src/LightApplication/resources/LightApplication_images.ts [new file with mode: 0644]
src/LightApplication/resources/LightApplication_msg_en.ts [new file with mode: 0644]
src/LightApplication/resources/LightApplication_msg_fr.ts [new file with mode: 0644]
src/LightApplication/resources/LightApplication_msg_ja.ts [new file with mode: 0644]
src/LightApplication/resources/icon_visibility_off.png [new file with mode: 0644]
src/LightApplication/resources/icon_visibility_on.png [new file with mode: 0644]
src/LightApplication/resources/view_sync.png [new file with mode: 0644]
src/SUIT/SUIT_Application.cxx
src/Session/CMakeLists.txt
src/Session/SALOME_Session_Server.cxx

index f2f7a3c39e18486a69d88c8b5754d5cfe1b5124a..f0ad22d05ece5730d709ff85ad28870553bc065a 100644 (file)
@@ -112,7 +112,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)
@@ -189,8 +189,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")
@@ -250,18 +250,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)")
 
@@ -269,11 +269,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)
@@ -288,9 +288,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)
@@ -316,74 +316,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
+    QDS qtx SalomePrs SalomeStyle std SUITApp lightapplication 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)
 
@@ -394,7 +394,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)
@@ -431,34 +431,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"
@@ -466,5 +466,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 f5a42a034eba91830e747682a7f3d5291f7aefed..443ce10f4cea47b348c1641a1368d1d5d9038658 100644 (file)
@@ -41,6 +41,7 @@ ADD_SUBDIRECTORY(ViewerData)
 ADD_SUBDIRECTORY(ViewerTools)
 ADD_SUBDIRECTORY(ImageComposer)
 ADD_SUBDIRECTORY(GUI_PY)
+ADD_SUBDIRECTORY(LightApplication)
 
 ##
 # SALOME object
@@ -135,7 +136,7 @@ ADD_SUBDIRECTORY(LightApp)
 ##
 # Python-based packages, part 2 (LightApp-dependent)
 ##
-IF(SALOME_USE_PYCONSOLE) 
+IF(SALOME_USE_PYCONSOLE)
   IF(SALOME_USE_VTKVIEWER)
     ADD_SUBDIRECTORY(SALOME_PY)
   ENDIF(SALOME_USE_VTKVIEWER)
index 88750b9f545df325769efd66facead085bef716f..1b43d4ec5ca38c0e0bbf863ec03d4e178930f682 100644 (file)
@@ -1030,16 +1030,16 @@ void LightApp_Application::onNewDoc()
 void LightApp_Application::onOpenDoc()
 {
   SUIT_Study* study = activeStudy();
-  
+
   if ( !checkExistingDoc( false ) )
     return;
-  
+
   QString aName = getFileName( true, QString(), getFileFilter( true ), QString(), 0 );
   if ( aName.isNull() ) //Cancel
     return;
-  
+
   onOpenDoc( aName );
-  
+
   if ( !study ) // new study will be create in THIS application
   {
     updateWindows();
@@ -1226,7 +1226,7 @@ protected:
 #else
       QString cmdLine = QString( "%1 %2 \"%3\"" ).arg( myBrowser, myParameters, myUrl );
       // remove LD_LIBRARY_PATH from the environement before starting launcher to avoid bad interactions.
-      // (especially in the case of universal binaries) 
+      // (especially in the case of universal binaries)
       env.remove("LD_LIBRARY_PATH");
 #endif
       QProcess* proc = new QProcess();
@@ -2850,7 +2850,7 @@ void LightApp_Application::createPreferences( LightApp_Preferences* pref )
   int vtkSelectionGroup = pref->addPreference( tr( "PREF_GROUP_SELECTION" ), vtkGroup );
   pref->setItemProperty( "columns", 2, vtkSelectionGroup );
   // .... -> preselection
-  int vtkPreselection = pref->addPreference( tr( "PREF_PRESELECTION" ),  vtkSelectionGroup, 
+  int vtkPreselection = pref->addPreference( tr( "PREF_PRESELECTION" ),  vtkSelectionGroup,
                                              LightApp_Preferences::Selector, "VTKViewer", "preselection" );
   aValuesList.clear();
   anIndicesList.clear();
@@ -2875,7 +2875,7 @@ void LightApp_Application::createPreferences( LightApp_Preferences* pref )
   int spacemousePref2 = pref->addPreference( tr( "PREF_SPACEMOUSE_FUNC_2" ), vtkSM,
                                              LightApp_Preferences::Selector, "VTKViewer",
                                              "spacemouse_func2_btn" );
-  // .... -> dominant / combined switch  
+  // .... -> dominant / combined switch
   int spacemousePref3 = pref->addPreference( tr( "PREF_SPACEMOUSE_FUNC_3" ), vtkSM,
                                              LightApp_Preferences::Selector, "VTKViewer",
                                              "spacemouse_func5_btn" ); //
@@ -4181,9 +4181,9 @@ void LightApp_Application::updateWindows()
     infoPanel()->addAction( action( FileOpenId ), grp );
     infoPanel()->addLabel( action( FileOpenId )->statusTip(), grp );
     infoPanel()->addAction( action( TutorialsId ), grp );
-    infoPanel()->addLabel( action( TutorialsId )->statusTip(), grp );
+    //infoPanel()->addLabel( action( TutorialsId )->statusTip(), grp );
     infoPanel()->addAction( action( VideosId ), grp );
-    infoPanel()->addLabel( action( VideosId )->statusTip(), grp );
+    //infoPanel()->addLabel( action( VideosId )->statusTip(), grp );
 
     LightApp_ModuleAction* ma = qobject_cast<LightApp_ModuleAction*>(action(ModulesListId));
     if ( ma && ma->count() > 0 )
@@ -4235,7 +4235,7 @@ void LightApp_Application::loadDockWindowsState()
   aResMgr->value( "windows_visibility", modName, aDefaultVisibility );
   bool hasDefaultVisibility = !aDefaultVisibility.isEmpty();
   aResMgr->setWorkingMode( prevMode );
-  
+
   if( !storeWin && !storeTb && aDefaultState.isEmpty() && !hasDefaultVisibility)
     return;
 
@@ -4260,13 +4260,13 @@ void LightApp_Application::loadDockWindowsState()
 
   QMap<QString, bool> *tbMap = 0;
   QMap<QString, bool> *dwMap = 0;
-  
+
   QMap<QString, bool> userTbMap, userDwMap;
   dockWindowsState( myWinVis[modName], userTbMap, userDwMap );
 
   QMap<QString, bool> defaultTbMap, defaultDwMap;
   if(hasDefaultVisibility) {
-    dockWindowsState( aDefaultVisibility, defaultTbMap, defaultDwMap);    
+    dockWindowsState( aDefaultVisibility, defaultTbMap, defaultDwMap);
   }
 
   if(storeTb) {
@@ -4288,9 +4288,9 @@ void LightApp_Application::loadDockWindowsState()
   if(tbMap) {
     QList<QToolBar*> tbList = findToolBars();
     for ( QList<QToolBar*>::iterator tit = tbList.begin(); tit != tbList.end(); ++tit )
-      { 
+      {
         QToolBar* tb = *tit;
-        if ( tbMap->contains( tb->objectName() ) ) {      
+        if ( tbMap->contains( tb->objectName() ) ) {
           tb->setVisible( (*tbMap)[tb->objectName()] );
         }
       }
@@ -4301,11 +4301,11 @@ void LightApp_Application::loadDockWindowsState()
     for ( QList<QDockWidget*>::iterator dit = dwList.begin(); dit != dwList.end(); ++dit )
       {
         QDockWidget* dw = *dit;
-        
+
         QObject* po = Qtx::findParent( dw, "QMainWindow" );
         if ( po != desktop() )
           continue;
-        
+
         if ( dwMap->contains( dw->objectName() ) )
           dw->setVisible( (*dwMap)[dw->objectName()] );
       }
@@ -5029,7 +5029,7 @@ void LightApp_Application::onDesktopMessage( const QString& message )
   }
   else if ( message.toLower().startsWith("register_module_in_study" ) ) {
     QString moduleName = message.split( sectionSeparator ).last();
-    // Check name of current activating module name in order to avoid ciclik 
+    // Check name of current activating module name in order to avoid ciclik
     // call because of messages
     if (!property("activateModule").toBool()) {
       CAM_Module* mod = module(moduleName);
@@ -5092,7 +5092,7 @@ void LightApp_Application::onInfoPanelShown()
 }
 
 /*!
-  Internal method. 
+  Internal method.
   Returns all top level toolbars.
   Note : Result list contains only main window toolbars, not including toolbars from viewers.
 */
index 96bd587f7b5d81d84a652f07c1c51273922f33f1..a2df61154db4a80080538b912930e6569f355df0 100644 (file)
@@ -64,7 +64,7 @@ CEA/DEN, CEDRAT, EDF R&amp;D, LEG, PRINCIPIA R&amp;D, BUREAU VERITAS</translatio
     </message>
     <message>
         <source>SALOME_TUTORIALS</source>
-        <translation type="unfinished">Tutorials</translation>
+        <translation>Tutorials</translation>
     </message>
     <message>
         <source>PRP_SALOME_TUTORIALS</source>
diff --git a/src/LightApplication/CMakeLists.txt b/src/LightApplication/CMakeLists.txt
new file mode 100644 (file)
index 0000000..5b69459
--- /dev/null
@@ -0,0 +1,92 @@
+# Copyright (C) 2012-2021  CEA/DEN, EDF R&D, OPEN CASCADE
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+INCLUDE(UseQtExt)
+
+# --- options ---
+
+# additional include directories
+INCLUDE_DIRECTORIES(
+  ${QT_INCLUDES}
+  ${PROJECT_SOURCE_DIR}/src/Qtx
+  ${PROJECT_SOURCE_DIR}/src/ObjBrowser
+)
+
+# additional preprocessor / compiler flags
+ADD_DEFINITIONS(${QT_DEFINITIONS})
+
+# libraries to link to
+SET(_link_LIBRARIES ${PLATFORM_LIBS} ${QT_LIBRARIES} qtx ObjBrowser)
+
+# --- headers ---
+
+# header files / to be processed by moc
+SET(_moc_HEADERS
+  LightApplication.h
+  LightDesktop.h
+)
+
+# header files / no moc processing
+SET(_other_HEADERS
+)
+
+# header files / to install
+SET(lightapplication_HEADERS ${_moc_HEADERS} ${_other_HEADERS})
+
+# --- resources ---
+
+# resource files / to be processed by lrelease
+SET(_ts_RESOURCES
+  resources/LightApplication_msg_en.ts
+  resources/LightApplication_msg_fr.ts
+  resources/LightApplication_msg_ja.ts
+  resources/LightApplication_images.ts
+)
+
+# resource files / static
+SET(_other_RESOURCES
+  resources/icon_visibility_on.png
+  resources/icon_visibility_off.png
+  resources/view_sync.png
+)
+
+# --- sources ---
+
+# sources / moc wrappings
+QT_WRAP_MOC(_moc_SOURCES ${_moc_HEADERS})
+
+# sources / static
+SET(_other_SOURCES
+  LightApplication.cxx
+  LightDesktop.cxx
+)
+
+# sources / to compile
+SET(lightapplication_SOURCES ${_other_SOURCES} ${_moc_SOURCES})
+
+# --- rules ---
+
+ADD_LIBRARY(lightapplication ${lightapplication_SOURCES})
+TARGET_LINK_LIBRARIES(lightapplication ${_link_LIBRARIES})
+INSTALL(TARGETS lightapplication EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
+
+INSTALL(FILES ${lightapplication_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})
+QT_INSTALL_TS_RESOURCES("${_ts_RESOURCES}" "${SALOME_GUI_INSTALL_RES_DATA}")
+
+INSTALL(FILES ${_other_RESOURCES} DESTINATION ${SALOME_GUI_INSTALL_RES_DATA})
\ No newline at end of file
diff --git a/src/LightApplication/LightApplication.cxx b/src/LightApplication/LightApplication.cxx
new file mode 100644 (file)
index 0000000..3b3fa24
--- /dev/null
@@ -0,0 +1,49 @@
+// Copyright (C) 2007-2021  CEA/DEN, EDF R&D, OPEN CASCADE
+//
+// Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#include "LightApplication.h"
+#include "LightDesktop.h"
+
+/*!
+  Default constructor
+*/
+LightApplication::LightApplication()
+: QObject( 0 )
+{
+  myDesktop = new LightDesktop();
+}
+
+/*!
+  Destructor
+*/
+LightApplication::~LightApplication()
+{
+
+}
+
+/*!
+  Shows the application's main widget. For non GUI application must be redefined.
+*/
+void LightApplication::start()
+{
+  myDesktop->show();
+}
\ No newline at end of file
diff --git a/src/LightApplication/LightApplication.h b/src/LightApplication/LightApplication.h
new file mode 100644 (file)
index 0000000..fd94125
--- /dev/null
@@ -0,0 +1,47 @@
+// Copyright (C) 2007-2021  CEA/DEN, EDF R&D, OPEN CASCADE
+//
+// Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#ifndef LIGHTAPPLICATION_H
+#define LIGHTAPPLICATION_H
+
+#include "LightDesktop.h"
+
+#include <QObject>
+
+
+class LightApplication : public QObject
+{
+  Q_OBJECT
+
+public:
+  LightApplication();
+  virtual ~LightApplication();
+
+  //! Shows the application's main widget. For non GUI application must be redefined.
+  virtual void          start();
+
+private:
+  LightDesktop * myDesktop = 0;
+
+};
+
+#endif
\ No newline at end of file
diff --git a/src/LightApplication/LightDesktop.cxx b/src/LightApplication/LightDesktop.cxx
new file mode 100644 (file)
index 0000000..847d8d4
--- /dev/null
@@ -0,0 +1,127 @@
+// Copyright (C) 2007-2021  CEA/DEN, EDF R&D, OPEN CASCADE
+//
+// Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#include <Container_init_python.hxx> // this include must be the first one as it includes Python.h
+#include "LightDesktop.h"
+
+#include "utilities.h"
+
+
+#include <QtxLogoMgr.h>
+#include <QtxActionMenuMgr.h>
+#include <QtxActionToolMgr.h>
+
+
+#include <QFileDialog>
+#include <QAction>
+#include <QMenu>
+#include <QMenuBar>
+#include <QString>
+#include <QKeySequence>
+#include <QMessageBox>
+#include <QPushButton>
+
+#include <stdlib.h>
+#include <iostream>
+#include <fstream>
+
+/*!\class SUIT_Desktop
+ * Provide desktop management:\n
+ * \li menu manager
+ * \li tool manager
+ * \li windows
+ */
+
+/*!
+  Constructor.
+*/
+LightDesktop::LightDesktop()
+: QtxMainWindow()
+{
+  myMenuMgr = new QtxActionMenuMgr( this );
+  myToolMgr = new QtxActionToolMgr( this );
+  myLogoMgr = new QtxLogoMgr( menuBar() );
+
+  createMenus();
+}
+
+/*!
+  Destructor.
+*/
+LightDesktop::~LightDesktop()
+{
+
+}
+
+void LightDesktop::createMenus()
+{
+  //QPushButton *mybutton = new QPushButton("Test", this);
+  //connect(mybutton, &QPushButton::released, this, &LightDesktop::RunScript);
+
+  //this->setCentralWidget(mybutton);
+  QMenu *fileMenu = menuBar()->addMenu("File");
+  fileMenu->addAction("Open File", this, &LightDesktop::RunScript, QKeySequence::Open);
+  fileMenu->addAction("Dummy", this, SLOT( Dummy()), QKeySequence::New);
+}
+
+void LightDesktop::Dummy()
+{
+  QMessageBox msgBox;
+  msgBox.setText("Dummy text");
+  msgBox.exec();
+}
+
+void LightDesktop::RunScript()
+{
+  QString fileName = QFileDialog::getOpenFileName(this,
+    tr("Open Python File"), "/home/B61570/work_in_progress/salome2810", "Python Files (*.py)");
+
+  std::ifstream ifs(fileName.toStdString());
+  std::string content( (std::istreambuf_iterator<char>(ifs) ),
+                       (std::istreambuf_iterator<char>()    ) );
+
+
+  // Lock Python Global Interperter
+  MESSAGE("Starting Python script");
+  MESSAGE("**********************");
+  PyGILState_STATE gstate = PyGILState_Ensure();
+  PyObject* myMainMod = PyImport_AddModule("__main__");
+  PyObject* myMainDict = PyModule_GetDict(myMainMod);
+
+  PyObject* obj = PyRun_String(content.c_str(), Py_file_input, myMainDict, NULL);
+
+  if(obj == NULL){
+    MESSAGE("Script crashed");
+    PyErr_Print();
+    PyGILState_Release(gstate);
+  } else{
+    MESSAGE("ALL is well");
+    Py_DECREF(obj);
+  }
+  // Get data from script
+  //PyObject* py_i = PyObject_GetAttrString(myMainMod, "i");
+  //double i = PyFloat_AsDouble(py_i);
+  //Display value of i value
+  //std::cerr << "i: " << i << std::endl;
+  // Release GIL
+  PyGILState_Release(gstate);
+}
\ No newline at end of file
diff --git a/src/LightApplication/LightDesktop.h b/src/LightApplication/LightDesktop.h
new file mode 100644 (file)
index 0000000..394f390
--- /dev/null
@@ -0,0 +1,49 @@
+// Copyright (C) 2007-2021  CEA/DEN, EDF R&D, OPEN CASCADE
+//
+// Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+#ifndef LIGHTDESKTOP_H
+#define LIGHTDESKTOP_H
+
+#include <QtxMainWindow.h>
+
+class QtxLogoMgr;
+class QtxActionMenuMgr;
+class QtxActionToolMgr;
+
+class LightDesktop : public QtxMainWindow
+{
+  Q_OBJECT
+
+public:
+  LightDesktop();
+  virtual ~LightDesktop();
+
+  void RunScript();
+  void Dummy();
+  void createMenus();
+
+private:
+  QtxActionMenuMgr*        myMenuMgr;
+  QtxActionToolMgr*        myToolMgr;
+  QtxLogoMgr*              myLogoMgr;
+};
+
+#endif
\ No newline at end of file
diff --git a/src/LightApplication/resources/LightApplication_images.ts b/src/LightApplication/resources/LightApplication_images.ts
new file mode 100644 (file)
index 0000000..63c6010
--- /dev/null
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0" language="en_US">
+<context>
+    <name>@default</name>
+    <message>
+        <source>ICON_DATAOBJ_VISIBLE</source>
+        <translation>icon_visibility_on.png</translation>
+    </message>
+    <message>
+        <source>ICON_DATAOBJ_INVISIBLE</source>
+        <translation>icon_visibility_off.png</translation>
+    </message>
+    <message>
+        <source>ICON_VIEW_SYNC</source>
+        <translation>view_sync.png</translation>
+    </message>
+</context>
+</TS>
diff --git a/src/LightApplication/resources/LightApplication_msg_en.ts b/src/LightApplication/resources/LightApplication_msg_en.ts
new file mode 100644 (file)
index 0000000..03659c6
--- /dev/null
@@ -0,0 +1,174 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0" language="en_US">
+<context>
+    <name>@default</name>
+    <message>
+        <source>MEN_DESK_WINDOW</source>
+        <translation>&amp;Window</translation>
+    </message>
+    <message>
+        <source>ERR_CANT_DUMP_VIEW</source>
+        <translation>Can&apos;t dump view contents to the file.</translation>
+    </message>
+    <message>
+        <source>TLT_IMAGE_FILES</source>
+        <translation>Images Files (*.bmp *.png *.jpg *.jpeg)</translation>
+    </message>
+    <message>
+        <source>MEN_DESK_WINDOW_CASCADE</source>
+        <translation>&amp;Cascade</translation>
+    </message>
+    <message>
+        <source>PRP_DESK_WINDOW_CASCADE</source>
+        <translation>Arranges the windows as overlapping tiles</translation>
+    </message>
+    <message>
+        <source>ERR_DIR_NOT_EXIST</source>
+        <translation>The directory &quot;%1&quot; does not exist!</translation>
+    </message>
+    <message>
+        <source>ERR_FILE_NOT_DIR</source>
+        <translation>&quot;%1&quot; is not a directory!</translation>
+    </message>
+    <message>
+        <source>CONTINUE</source>
+        <translation>Continue</translation>
+    </message>
+    <message>
+        <source>CANCEL</source>
+        <translation>Cancel</translation>
+    </message>
+    <message>
+        <source>ERR_FILE_NOT_EXIST</source>
+        <translation>The file &quot;%1&quot; does not exist!</translation>
+    </message>
+    <message>
+        <source>QUE_DOC_FILEEXISTS</source>
+        <translation>The file %1 already exists.
+Do you want to overwrite it ?</translation>
+    </message>
+    <message>
+        <source>PRP_DESK_WINDOW_ACTIVATE</source>
+        <translation>Activates this window</translation>
+    </message>
+    <message>
+        <source>ERR_PERMISSION_DENIED</source>
+        <translation>Can&apos;t save file &quot;%1&quot;.
+Permission denied.</translation>
+    </message>
+    <message>
+        <source>ERR_OPEN_PERMISSION_DENIED</source>
+        <translation>Can&apos;t open file &quot;%1&quot;.
+Permission denied.</translation>
+    </message>
+    <message>
+        <source>ERR_DIR_READ_PERMISSION_DENIED</source>
+        <translation>Can&apos;t read directory &quot;%1&quot;.
+Permission denied.</translation>
+    </message>
+    <message>
+        <source>ERR_DIR_WRITE_PERMISSION_DENIED</source>
+        <translation>Can&apos;t write directory &quot;%1&quot;.
+Permission denied.</translation>
+    </message>
+    <message>
+        <source>ERR_ERROR</source>
+        <translation>Error</translation>
+    </message>
+    <message>
+        <source>QUE_FILE_EXISTS</source>
+        <translation>The file %1 already exists.
+Do you want to overwrite it?</translation>
+    </message>
+    <message>
+        <source>WRN_WARNING</source>
+        <translation>Warning</translation>
+    </message>
+    <message>
+        <source>TLT_DUMP_VIEW</source>
+        <translation>Dump View to File</translation>
+    </message>
+    <message>
+        <source>PRP_DESK_WINDOW_TILE</source>
+        <translation>Arranges the windows as nonoverlapping tiles</translation>
+    </message>
+    <message>
+        <source>MEN_DESK_WINDOW_VTILE</source>
+        <translation>Tile &amp;Vertically</translation>
+    </message>
+    <message>
+        <source>INF_DIRECTORIES_FILTER</source>
+        <translation>Directories</translation>
+    </message>
+    <message>
+        <source>PRP_DESK_WINDOW_VTILE</source>
+        <translation>Arranges the windows as nonoverlapping vertical tiles</translation>
+    </message>
+    <message>
+        <source>MEN_DESK_WINDOW_TILE</source>
+        <translation>&amp;Tile</translation>
+    </message>
+    <message>
+        <source>NAME_COLUMN</source>
+        <translation>Name</translation>
+    </message>
+    <message>
+        <source>MNU_SYNCHRONIZE_VIEW</source>
+        <translation>Synchronize</translation>
+    </message>
+    <message>
+        <source>DSC_SYNCHRONIZE_VIEW</source>
+        <translation>Synchronize view</translation>
+    </message>
+    <message>
+        <source>MNU_SYNC_NO_VIEW</source>
+        <translation>[ No appropriate view ]</translation>
+    </message>
+</context>
+<context>
+    <name>SUIT_Study</name>
+    <message>
+        <source>OPERATION_LAUNCH</source>
+        <translation>Operation launch</translation>
+    </message>
+    <message>
+        <source>PREVIOUS_NOT_FINISHED</source>
+        <translation>Previous operation is not finished and will be aborted</translation>
+    </message>
+</context>
+<context>
+    <name>SUIT_FileDlg</name>
+    <message>
+        <source>LAB_QUICK_PATH</source>
+        <translation>Quick path:</translation>
+    </message>
+    <message>
+        <source>BUT_ADD_PATH</source>
+        <translation>Add path</translation>
+    </message>
+    <message>
+        <source>INF_DESK_DOC_OPEN</source>
+        <translation>Open File</translation>
+    </message>
+    <message>
+        <source>INF_DESK_DOC_SAVE</source>
+        <translation>Save File</translation>
+    </message>
+    <message>
+        <source>ALL_FILES_FILTER</source>
+        <translation>All files (*)</translation>
+    </message>
+</context>
+<context>
+    <name>SUIT_ViewWindow</name>
+    <message>
+        <source>TLT_DUMP_VIEW</source>
+        <translation>Dump view to file</translation>
+    </message>
+    <message>
+        <source>TLT_IMAGE_FILES</source>
+        <translation>Images Files (*.bmp *.png *.jpg *.jpeg)</translation>
+    </message>
+</context>     
+</TS>
diff --git a/src/LightApplication/resources/LightApplication_msg_fr.ts b/src/LightApplication/resources/LightApplication_msg_fr.ts
new file mode 100644 (file)
index 0000000..97f2cf3
--- /dev/null
@@ -0,0 +1,174 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0" language="fr_FR">
+<context>
+    <name>@default</name>
+    <message>
+        <source>MEN_DESK_WINDOW</source>
+        <translation>&amp;Fenêtre</translation>
+    </message>
+    <message>
+        <source>ERR_CANT_DUMP_VIEW</source>
+        <translation>Impossible de sauvegarder le contenu de la vue dans le fichier.</translation>
+    </message>
+    <message>
+        <source>TLT_IMAGE_FILES</source>
+        <translation>Fichiers images (*.bmp *.png *.jpg *.jpeg)</translation>
+    </message>
+    <message>
+        <source>MEN_DESK_WINDOW_CASCADE</source>
+        <translation>&amp;Cascade</translation>
+    </message>
+    <message>
+        <source>PRP_DESK_WINDOW_CASCADE</source>
+        <translation>Superpose les fenêtres</translation>
+    </message>
+    <message>
+        <source>ERR_DIR_NOT_EXIST</source>
+        <translation>Le répertoire &quot;%1&quot; n&apos;existe pas !</translation>
+    </message>
+    <message>
+        <source>ERR_FILE_NOT_DIR</source>
+        <translation>&quot;%1&quot; n&apos;est pas un répertoire !</translation>
+    </message>
+    <message>
+        <source>CONTINUE</source>
+        <translation>Continuer</translation>
+    </message>
+    <message>
+        <source>CANCEL</source>
+        <translation>Annuler</translation>
+    </message>
+    <message>
+        <source>ERR_FILE_NOT_EXIST</source>
+        <translation>Le fichier &quot;%1&quot; n&apos;existe pas !</translation>
+    </message>
+    <message>
+        <source>QUE_DOC_FILEEXISTS</source>
+        <translation>Le fichier %1 existe déjà.
+Voulez-vous l&apos;écraser ?</translation>
+    </message>
+    <message>
+        <source>PRP_DESK_WINDOW_ACTIVATE</source>
+        <translation>Active la fenêtre</translation>
+    </message>
+    <message>
+        <source>ERR_PERMISSION_DENIED</source>
+        <translation>Impossible de sauvegarder le fichier &quot;%1&quot;.
+Autorisation interdite.</translation>
+    </message>
+    <message>
+        <source>ERR_OPEN_PERMISSION_DENIED</source>
+        <translation>Impossible d&apos;ouvrir le fichier &quot;%1&quot;.
+Autorisation interdite.</translation>
+    </message>
+    <message>
+        <source>ERR_DIR_READ_PERMISSION_DENIED</source>
+        <translation>Impossible de lire le répertoire &quot;%1&quot;.
+Autorisation interdite.</translation>
+    </message>
+    <message>
+        <source>ERR_DIR_WRITE_PERMISSION_DENIED</source>
+        <translation>Impossible d&apos;écrire dans le répertoire &quot;%1&quot;.
+Autorisation interdite.</translation>
+    </message>
+    <message>
+        <source>ERR_ERROR</source>
+        <translation>Erreur</translation>
+    </message>
+    <message>
+        <source>QUE_FILE_EXISTS</source>
+        <translation>Le fichier %1 existe déjà.
+Voulez-vous l&apos;écraser ?</translation>
+    </message>
+    <message>
+        <source>WRN_WARNING</source>
+        <translation>Avertissement</translation>
+    </message>
+    <message>
+        <source>TLT_DUMP_VIEW</source>
+        <translation>Enregistrer la vue dans le fichier</translation>
+    </message>
+    <message>
+        <source>PRP_DESK_WINDOW_TILE</source>
+        <translation>Place les fenêtres en mosaïque</translation>
+    </message>
+    <message>
+        <source>MEN_DESK_WINDOW_VTILE</source>
+        <translation>Mosaïque &amp;verticale</translation>
+    </message>
+    <message>
+        <source>INF_DIRECTORIES_FILTER</source>
+        <translation>Répertoires</translation>
+    </message>
+    <message>
+        <source>PRP_DESK_WINDOW_VTILE</source>
+        <translation>Place les fenêtres en mosaïque verticale</translation>
+    </message>
+    <message>
+        <source>MEN_DESK_WINDOW_TILE</source>
+        <translation>&amp;Mosaïque</translation>
+    </message>
+    <message>
+        <source>NAME_COLUMN</source>
+        <translation>Nom</translation>
+    </message>
+    <message>
+        <source>MNU_SYNCHRONIZE_VIEW</source>
+        <translation>Synchroniser</translation>
+    </message>
+    <message>
+        <source>DSC_SYNCHRONIZE_VIEW</source>
+        <translation>Synchroniser la vue</translation>
+    </message>
+    <message>
+        <source>MNU_SYNC_NO_VIEW</source>
+        <translation>[ Pas de vue appropriée ]</translation>
+    </message>
+</context>
+<context>
+    <name>SUIT_Study</name>
+    <message>
+        <source>OPERATION_LAUNCH</source>
+        <translation>Lancer l&apos;opération</translation>
+    </message>
+    <message>
+        <source>PREVIOUS_NOT_FINISHED</source>
+        <translation>L&apos;opération précédente n&apos;est pas aboutie et sera interrompue</translation>
+    </message>
+</context>
+<context>
+    <name>SUIT_FileDlg</name>
+    <message>
+        <source>LAB_QUICK_PATH</source>
+        <translation>Emplacement :</translation>
+    </message>
+    <message>
+        <source>BUT_ADD_PATH</source>
+        <translation>Ajouter un chemin</translation>
+    </message>
+    <message>
+        <source>INF_DESK_DOC_OPEN</source>
+        <translation>Ouvrir un fichier</translation>
+    </message>
+    <message>
+        <source>INF_DESK_DOC_SAVE</source>
+        <translation>Sauvegarder un fichier</translation>
+    </message>
+    <message>
+        <source>ALL_FILES_FILTER</source>
+        <translation>Tous les fichiers (*)</translation>
+    </message>
+</context>
+<context>
+    <name>SUIT_ViewWindow</name>
+    <message>
+        <source>TLT_DUMP_VIEW</source>
+        <translation>Enregistrer la vue dans le fichier</translation>
+    </message>
+    <message>
+        <source>TLT_IMAGE_FILES</source>
+        <translation>Fichiers images (*.bmp *.png *.jpg *.jpeg)</translation>
+    </message>
+</context>     
+</TS>
diff --git a/src/LightApplication/resources/LightApplication_msg_ja.ts b/src/LightApplication/resources/LightApplication_msg_ja.ts
new file mode 100644 (file)
index 0000000..8da7266
--- /dev/null
@@ -0,0 +1,168 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0" language="ja" sourcelanguage="en">
+  <context>
+    <name>@default</name>
+    <message>
+      <source>MEN_DESK_WINDOW</source>
+      <translation>ウィンドウ(&amp;W)</translation>
+    </message>
+    <message>
+      <source>ERR_CANT_DUMP_VIEW</source>
+      <translation>ビューの内容をファイルに保存できませんでした。</translation>
+    </message>
+    <message>
+      <source>TLT_IMAGE_FILES</source>
+      <translation>イメージ (*.bmp *.png *.jpg *.jpeg) ファイル</translation>
+    </message>
+    <message>
+      <source>MEN_DESK_WINDOW_CASCADE</source>
+      <translation>カスケード(&amp;C)</translation>
+    </message>
+    <message>
+      <source>PRP_DESK_WINDOW_CASCADE</source>
+      <translation>Windows ではスーパーイン ポーズ</translation>
+    </message>
+    <message>
+      <source>ERR_DIR_NOT_EXIST</source>
+      <translation>ディレクトリ"%1"は存在しません!</translation>
+    </message>
+    <message>
+      <source>ERR_FILE_NOT_DIR</source>
+      <translation>"%1"はディレクトリではありません !</translation>
+    </message>
+    <message>
+      <source>CONTINUE</source>
+      <translation>続行</translation>
+    </message>
+    <message>
+      <source>CANCEL</source>
+      <translation>キャンセル</translation>
+    </message>
+    <message>
+      <source>ERR_FILE_NOT_EXIST</source>
+      <translation>ファイル"%1"は存在しません!</translation>
+    </message>
+    <message>
+      <source>QUE_DOC_FILEEXISTS</source>
+      <translation>ファイル %1 は既に存在します。それを上書きしますか。</translation>
+    </message>
+    <message>
+      <source>PRP_DESK_WINDOW_ACTIVATE</source>
+      <translation>アクティブ ウィンドウ</translation>
+    </message>
+    <message>
+      <source>ERR_PERMISSION_DENIED</source>
+      <translation>ファイル"%1"を保存できません。アクセス許可は、禁じられています。</translation>
+    </message>
+    <message>
+      <source>ERR_OPEN_PERMISSION_DENIED</source>
+      <translation>ファイル"%1"を開けません。アクセス許可は、禁じられています。</translation>
+    </message>
+    <message>
+      <source>ERR_DIR_READ_PERMISSION_DENIED</source>
+      <translation>ディレクトリ"%1"を読み取れません。アクセス許可は、禁じられています。</translation>
+    </message>
+    <message>
+      <source>ERR_DIR_WRITE_PERMISSION_DENIED</source>
+      <translation>ディレクトリ"%1"に書き込めませんでした。アクセス許可は、禁じられています。</translation>
+    </message>
+    <message>
+      <source>ERR_ERROR</source>
+      <translation>エラー</translation>
+    </message>
+    <message>
+      <source>QUE_FILE_EXISTS</source>
+      <translation>ファイル %1 は既に存在します。それを上書きしますか。</translation>
+    </message>
+    <message>
+      <source>WRN_WARNING</source>
+      <translation>注意 !</translation>
+    </message>
+    <message>
+      <source>TLT_DUMP_VIEW</source>
+      <translation>ビューでファイルを保存します。</translation>
+    </message>
+    <message>
+      <source>PRP_DESK_WINDOW_TILE</source>
+      <translation>ウィンドウの場所</translation>
+    </message>
+    <message>
+      <source>MEN_DESK_WINDOW_VTILE</source>
+      <translation>垂直方向のモザイク(&amp;V)</translation>
+    </message>
+    <message>
+      <source>INF_DIRECTORIES_FILTER</source>
+      <translation>ディレクトリ</translation>
+    </message>
+    <message>
+      <source>PRP_DESK_WINDOW_VTILE</source>
+      <translation>垂直方向のモザイクで Windows の場所</translation>
+    </message>
+    <message>
+      <source>MEN_DESK_WINDOW_TILE</source>
+      <translation>モザイク(&amp;T)</translation>
+    </message>
+    <message>
+      <source>NAME_COLUMN</source>
+      <translation>名前</translation>
+    </message>
+    <message>
+      <source>MNU_SYNCHRONIZE_VIEW</source>
+      <translation>同期</translation>
+    </message>
+    <message>
+      <source>DSC_SYNCHRONIZE_VIEW</source>
+      <translation>ビューを同期します。</translation>
+    </message>
+    <message>
+      <source>MNU_SYNC_NO_VIEW</source>
+      <translation>[適切なビューを使用しない]</translation>
+    </message>
+  </context>
+  <context>
+    <name>SUIT_Study</name>
+    <message>
+      <source>OPERATION_LAUNCH</source>
+      <translation>操作を開始します。</translation>
+    </message>
+    <message>
+      <source>PREVIOUS_NOT_FINISHED</source>
+      <translation>前の操作が開発し、中断されます。</translation>
+    </message>
+  </context>
+  <context>
+    <name>SUIT_FileDlg</name>
+    <message>
+      <source>LAB_QUICK_PATH</source>
+      <translation>場所:</translation>
+    </message>
+    <message>
+      <source>BUT_ADD_PATH</source>
+      <translation>パスの追加</translation>
+    </message>
+    <message>
+      <source>INF_DESK_DOC_OPEN</source>
+      <translation>ファイルを開く</translation>
+    </message>
+    <message>
+      <source>INF_DESK_DOC_SAVE</source>
+      <translation>ファイルを保存します。</translation>
+    </message>
+    <message>
+      <source>ALL_FILES_FILTER</source>
+      <translation>すべてのファイル (*)</translation>
+    </message>
+  </context>
+<context>
+    <name>SUIT_ViewWindow</name>
+    <message>
+      <source>TLT_DUMP_VIEW</source>
+      <translation>ビューでファイルを保存します。</translation>
+    </message>
+    <message>
+      <source>TLT_IMAGE_FILES</source>
+      <translation>イメージ (*.bmp *.png *.jpg *.jpeg) ファイル</translation>
+    </message>
+</context>     
+</TS>
diff --git a/src/LightApplication/resources/icon_visibility_off.png b/src/LightApplication/resources/icon_visibility_off.png
new file mode 100644 (file)
index 0000000..31c505d
Binary files /dev/null and b/src/LightApplication/resources/icon_visibility_off.png differ
diff --git a/src/LightApplication/resources/icon_visibility_on.png b/src/LightApplication/resources/icon_visibility_on.png
new file mode 100644 (file)
index 0000000..61ebe47
Binary files /dev/null and b/src/LightApplication/resources/icon_visibility_on.png differ
diff --git a/src/LightApplication/resources/view_sync.png b/src/LightApplication/resources/view_sync.png
new file mode 100644 (file)
index 0000000..32b9522
Binary files /dev/null and b/src/LightApplication/resources/view_sync.png differ
index e02b782c4aac6899256613e4755a61f715055781..daf8ee5b08e500c46c2fc28763b41bd7f02720d3 100644 (file)
@@ -642,7 +642,7 @@ QList<int> SUIT_Application::actionIds() const
 */
 QAction* SUIT_Application::createAction( const int id, const QString& text, const QIcon& icon,
                                          const QString& menu, const QString& tip, const int key,
-                                         QObject* parent, const bool toggle, QObject* reciever, 
+                                         QObject* parent, const bool toggle, QObject* reciever,
                                         const char* member, const QString& shortcutAction )
 {
   return createAction( id, text, icon, menu, tip, QKeySequence(key), parent, toggle, reciever, member, shortcutAction );
@@ -664,7 +664,7 @@ QAction* SUIT_Application::createAction( const int id, const QString& text, cons
 */
 QAction* SUIT_Application::createAction( const int id, const QString& text, const QIcon& icon,
                                          const QString& menu, const QString& tip, const QKeySequence& key,
-                                         QObject* parent, const bool toggle, QObject* reciever, 
+                                         QObject* parent, const bool toggle, QObject* reciever,
                                         const char* member, const QString& shortcutAction )
 {
   QtxAction* a = new QtxAction( text, icon, menu, key, parent, toggle, shortcutAction );
index 480715f57f023a9cbea4d02a1dcaa32543f34164..c394575391aaa785190b5ac43a72a0ffc506e1e6 100644 (file)
@@ -35,7 +35,7 @@ INCLUDE_DIRECTORIES(
   ${PROJECT_SOURCE_DIR}/src/SUIT
   ${PROJECT_SOURCE_DIR}/src/Event
   ${PROJECT_SOURCE_DIR}/src/Style
-  ${PROJECT_SOURCE_DIR}/src/SUIT
+  ${PROJECT_SOURCE_DIR}/src/LightApplication
   ${PROJECT_SOURCE_DIR}/src/STD
   ${PROJECT_SOURCE_DIR}/src/CAM
   ${PROJECT_SOURCE_DIR}/src/OBJECT
@@ -69,7 +69,7 @@ SET(_link_LIBRARIES
   ${KERNEL_SalomeLauncher}
   ${KERNEL_Registry}
   ${KERNEL_SALOMEBasics}
-  qtx suit Event SalomeStyle SalomeApp SalomeIDLGUI
+  qtx lightapplication suit Event SalomeStyle SalomeApp SalomeIDLGUI
 )
 
 # --- headers ---
@@ -108,7 +108,7 @@ SET(SalomeSession_SOURCES
 
 ADD_LIBRARY(SalomeSession ${SalomeSession_SOURCES})
 TARGET_LINK_LIBRARIES(SalomeSession ${_link_LIBRARIES})
-INSTALL(TARGETS SalomeSession EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS}) 
+INSTALL(TARGETS SalomeSession EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
 
 ADD_EXECUTABLE(SALOME_Session_Server SALOME_Session_Server_With_Server.cxx)
 TARGET_LINK_LIBRARIES(SALOME_Session_Server ${_link_LIBRARIES} SalomeSession)
@@ -122,5 +122,10 @@ add_executable(salome2810 salome2810.cxx)
 target_link_libraries(salome2810 ${QT_LIBRARIES})
 install(TARGETS salome2810 DESTINATION ${SALOME_INSTALL_BINS})
 
+add_executable(salomeLight salomeLight.cxx)
+target_link_libraries(salomeLight ${QT_LIBRARIES})
+install(TARGETS salomeLight DESTINATION ${SALOME_INSTALL_BINS})
+
+
 INSTALL(FILES ${SalomeSession_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})
 QT_INSTALL_TS_RESOURCES("${_ts_RESOURCES}" "${SALOME_GUI_INSTALL_RES_DATA}")
index 621fc466c4530577e30ea56b5ae1c2020d84239c..f7ca70ebe10e1c238c6569041e5709a1ed22fb32 100644 (file)
@@ -56,6 +56,8 @@
 #include "SUIT_Session.h"
 #include "SUIT_Tools.h"
 
+#include "LightApplication.h"
+
 #include <SALOMEconfig.h>
 #include CORBA_SERVER_HEADER(SALOME_Session)
 #include CORBA_SERVER_HEADER(SALOMEDS)
@@ -77,6 +79,8 @@
 #include <QTextStream>
 #include <QWaitCondition>
 
+#include <fstream>
+
 //! CORBA server for SALOME GUI session
 /*!
  * SALOME_Session_Server launches a SALOME session servant.
@@ -727,7 +731,11 @@ int AbstractGUIAppMain(int argc, char **argv)
 
       // Load SalomeApp dynamic library
       MESSAGE("creation SUIT_Application");
-      SUIT_Application *aGUIApp = aGUISession->startApplication(NamingServiceImplementation::LibName, 0, 0);
+      MESSAGE(NamingServiceImplementation::LibName );
+      //SUIT_Application *aGUIApp = aGUISession->startApplication(NamingServiceImplementation::LibName, 0, 0);
+      LightApplication *aGUIApp = new LightApplication();
+      aGUIApp->start();
+
       if (aGUIApp)
       {
 #ifdef USE_SALOME_STYLE
@@ -736,15 +744,17 @@ int AbstractGUIAppMain(int argc, char **argv)
           Style_Salome::apply();
 #endif // USE_SALOME_STYLE
 
-        if (!debugExceptions)
-          app.setHandler(aGUISession->handler()); // after loading SalomeApp application
-                                                  // aGUISession contains SalomeApp_ExceptionHandler
+        // if (!debugExceptions)
+        //  app.setHandler(aGUISession->handler()); // after loading SalomeApp application
+        //                                          // aGUISession contains SalomeApp_ExceptionHandler
 
         // Run GUI loop
         MESSAGE("run(): starting the main event loop");
 
-        if (splash)
-          splash->finish(aGUIApp->desktop());
+        // if (splash)
+        //  splash->finish(aGUIApp->desktop());
+
+        MESSAGE("run(): running app.exec()");
 
         result = app.exec();