]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
First version of working dummy application
authorYoann Audouin <yoann.audouin@edf.fr>
Tue, 20 Jul 2021 06:26:31 +0000 (08:26 +0200)
committerYoann Audouin <yoann.audouin@edf.fr>
Tue, 20 Jul 2021 06:26:31 +0000 (08:26 +0200)
29 files changed:
CMakeLists.txt
src/CMakeLists.txt
src/DummyApplication/CMakeLists.txt [new file with mode: 0644]
src/DummyApplication/DummyApplication.cxx [new file with mode: 0644]
src/DummyApplication/DummyApplication.h [new file with mode: 0644]
src/DummyApplication/DummyDesktop.cxx [new file with mode: 0644]
src/DummyApplication/DummyDesktop.h [new file with mode: 0644]
src/DummyApplication/resources/DummyApplication_images.ts [new file with mode: 0644]
src/DummyApplication/resources/DummyApplication_msg_en.ts [new file with mode: 0644]
src/DummyApplication/resources/DummyApplication_msg_fr.ts [new file with mode: 0644]
src/DummyApplication/resources/DummyApplication_msg_ja.ts [new file with mode: 0644]
src/DummyApplication/resources/icon_visibility_off.png [new file with mode: 0644]
src/DummyApplication/resources/icon_visibility_on.png [new file with mode: 0644]
src/DummyApplication/resources/view_sync.png [new file with mode: 0644]
src/LightApplication/CMakeLists.txt [deleted file]
src/LightApplication/LightApplication.cxx [deleted file]
src/LightApplication/LightApplication.h [deleted file]
src/LightApplication/LightDesktop.cxx [deleted file]
src/LightApplication/LightDesktop.h [deleted file]
src/LightApplication/resources/LightApplication_images.ts [deleted file]
src/LightApplication/resources/LightApplication_msg_en.ts [deleted file]
src/LightApplication/resources/LightApplication_msg_fr.ts [deleted file]
src/LightApplication/resources/LightApplication_msg_ja.ts [deleted file]
src/LightApplication/resources/icon_visibility_off.png [deleted file]
src/LightApplication/resources/icon_visibility_on.png [deleted file]
src/LightApplication/resources/view_sync.png [deleted file]
src/Session/CMakeLists.txt
src/Session/SALOME_Session_Server.cxx
src/Session/salomeLight.cxx [new file with mode: 0644]

index f0ad22d05ece5730d709ff85ad28870553bc065a..60d3beb2ee6e318ea0f72fe7dac91a1af110a1b8 100644 (file)
@@ -318,7 +318,7 @@ INCLUDE(CMakePackageConfigHelpers)
 # They all have to be INSTALL'd with the option "EXPORT ${PROJECT_NAME}TargetGroup"
 SET(_${PROJECT_NAME}_exposed_targets
     CAM CASCatch DDS Event LightApp LogWindow ObjBrowser
-    QDS qtx SalomePrs SalomeStyle std SUITApp lightapplication suit ViewerTools ViewerData
+    QDS qtx SalomePrs SalomeStyle std SUITApp dummyapplication suit ViewerTools ViewerData
     ImageComposer
 )
 
index 443ce10f4cea47b348c1641a1368d1d5d9038658..d9ed20b5294437d27e04a5672bb605af863875f6 100644 (file)
@@ -41,7 +41,7 @@ ADD_SUBDIRECTORY(ViewerData)
 ADD_SUBDIRECTORY(ViewerTools)
 ADD_SUBDIRECTORY(ImageComposer)
 ADD_SUBDIRECTORY(GUI_PY)
-ADD_SUBDIRECTORY(LightApplication)
+ADD_SUBDIRECTORY(DummyApplication)
 
 ##
 # SALOME object
diff --git a/src/DummyApplication/CMakeLists.txt b/src/DummyApplication/CMakeLists.txt
new file mode 100644 (file)
index 0000000..7161cb6
--- /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
+  DummyApplication.h
+  DummyDesktop.h
+)
+
+# header files / no moc processing
+SET(_other_HEADERS
+)
+
+# header files / to install
+SET(dummyapplication_HEADERS ${_moc_HEADERS} ${_other_HEADERS})
+
+# --- resources ---
+
+# resource files / to be processed by lrelease
+SET(_ts_RESOURCES
+  resources/DummyApplication_msg_en.ts
+  resources/DummyApplication_msg_fr.ts
+  resources/DummyApplication_msg_ja.ts
+  resources/DummyApplication_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
+  DummyApplication.cxx
+  DummyDesktop.cxx
+)
+
+# sources / to compile
+SET(dummyapplication_SOURCES ${_other_SOURCES} ${_moc_SOURCES})
+
+# --- rules ---
+
+ADD_LIBRARY(dummyapplication ${dummyapplication_SOURCES})
+TARGET_LINK_LIBRARIES(dummyapplication ${_link_LIBRARIES})
+INSTALL(TARGETS dummyapplication EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
+
+INSTALL(FILES ${dummyapplication_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})
diff --git a/src/DummyApplication/DummyApplication.cxx b/src/DummyApplication/DummyApplication.cxx
new file mode 100644 (file)
index 0000000..86997e0
--- /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 "DummyApplication.h"
+#include "DummyDesktop.h"
+
+/*!
+  Default constructor
+*/
+DummyApplication::DummyApplication()
+: QObject( 0 )
+{
+  myDesktop = new DummyDesktop();
+}
+
+/*!
+  Destructor
+*/
+DummyApplication::~DummyApplication()
+{
+
+}
+
+/*!
+  Shows the application's main widget. For non GUI application must be redefined.
+*/
+void DummyApplication::start()
+{
+  myDesktop->show();
+}
diff --git a/src/DummyApplication/DummyApplication.h b/src/DummyApplication/DummyApplication.h
new file mode 100644 (file)
index 0000000..92a1a7b
--- /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 DUMMYAPPLICATION_H
+#define DUMMYAPPLICATION_H
+
+#include "DummyDesktop.h"
+
+#include <QObject>
+
+
+class DummyApplication : public QObject
+{
+  Q_OBJECT
+
+public:
+  DummyApplication();
+  virtual ~DummyApplication();
+
+  //! Shows the application's main widget. For non GUI application must be redefined.
+  virtual void          start();
+
+private:
+  DummyDesktop * myDesktop = 0;
+
+};
+
+#endif
diff --git a/src/DummyApplication/DummyDesktop.cxx b/src/DummyApplication/DummyDesktop.cxx
new file mode 100644 (file)
index 0000000..0b5a394
--- /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 "DummyDesktop.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.
+*/
+DummyDesktop::DummyDesktop()
+: QtxMainWindow()
+{
+  myMenuMgr = new QtxActionMenuMgr( this );
+  myToolMgr = new QtxActionToolMgr( this );
+  myLogoMgr = new QtxLogoMgr( menuBar() );
+
+  createMenus();
+}
+
+/*!
+  Destructor.
+*/
+DummyDesktop::~DummyDesktop()
+{
+
+}
+
+void DummyDesktop::createMenus()
+{
+  //QPushButton *mybutton = new QPushButton("Test", this);
+  //connect(mybutton, &QPushButton::released, this, &DummyDesktop::RunScript);
+
+  //this->setCentralWidget(mybutton);
+  QMenu *fileMenu = menuBar()->addMenu("File");
+  fileMenu->addAction("Open File", this, &DummyDesktop::RunScript, QKeySequence::Open);
+  fileMenu->addAction("Dummy", this, SLOT( Dummy()), QKeySequence::New);
+}
+
+void DummyDesktop::Dummy()
+{
+  QMessageBox msgBox;
+  msgBox.setText("Dummy text");
+  msgBox.exec();
+}
+
+void DummyDesktop::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);
+}
diff --git a/src/DummyApplication/DummyDesktop.h b/src/DummyApplication/DummyDesktop.h
new file mode 100644 (file)
index 0000000..3225b4b
--- /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 DUMMYDESKTOP_H
+#define DUMMYDESKTOP_H
+
+#include <QtxMainWindow.h>
+
+class QtxLogoMgr;
+class QtxActionMenuMgr;
+class QtxActionToolMgr;
+
+class DummyDesktop : public QtxMainWindow
+{
+  Q_OBJECT
+
+public:
+  DummyDesktop();
+  virtual ~DummyDesktop();
+
+  void RunScript();
+  void Dummy();
+  void createMenus();
+
+private:
+  QtxActionMenuMgr*        myMenuMgr;
+  QtxActionToolMgr*        myToolMgr;
+  QtxLogoMgr*              myLogoMgr;
+};
+
+#endif
diff --git a/src/DummyApplication/resources/DummyApplication_images.ts b/src/DummyApplication/resources/DummyApplication_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/DummyApplication/resources/DummyApplication_msg_en.ts b/src/DummyApplication/resources/DummyApplication_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/DummyApplication/resources/DummyApplication_msg_fr.ts b/src/DummyApplication/resources/DummyApplication_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/DummyApplication/resources/DummyApplication_msg_ja.ts b/src/DummyApplication/resources/DummyApplication_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/DummyApplication/resources/icon_visibility_off.png b/src/DummyApplication/resources/icon_visibility_off.png
new file mode 100644 (file)
index 0000000..31c505d
Binary files /dev/null and b/src/DummyApplication/resources/icon_visibility_off.png differ
diff --git a/src/DummyApplication/resources/icon_visibility_on.png b/src/DummyApplication/resources/icon_visibility_on.png
new file mode 100644 (file)
index 0000000..61ebe47
Binary files /dev/null and b/src/DummyApplication/resources/icon_visibility_on.png differ
diff --git a/src/DummyApplication/resources/view_sync.png b/src/DummyApplication/resources/view_sync.png
new file mode 100644 (file)
index 0000000..32b9522
Binary files /dev/null and b/src/DummyApplication/resources/view_sync.png differ
diff --git a/src/LightApplication/CMakeLists.txt b/src/LightApplication/CMakeLists.txt
deleted file mode 100644 (file)
index 5b69459..0000000
+++ /dev/null
@@ -1,92 +0,0 @@
-# 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
deleted file mode 100644 (file)
index 3b3fa24..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-// 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
deleted file mode 100644 (file)
index fd94125..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-// 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
deleted file mode 100644 (file)
index 847d8d4..0000000
+++ /dev/null
@@ -1,127 +0,0 @@
-// 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
deleted file mode 100644 (file)
index 394f390..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-// 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
deleted file mode 100644 (file)
index 63c6010..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-<?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
deleted file mode 100644 (file)
index 03659c6..0000000
+++ /dev/null
@@ -1,174 +0,0 @@
-<?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
deleted file mode 100644 (file)
index 97f2cf3..0000000
+++ /dev/null
@@ -1,174 +0,0 @@
-<?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
deleted file mode 100644 (file)
index 8da7266..0000000
+++ /dev/null
@@ -1,168 +0,0 @@
-<?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
deleted file mode 100644 (file)
index 31c505d..0000000
Binary files a/src/LightApplication/resources/icon_visibility_off.png and /dev/null differ
diff --git a/src/LightApplication/resources/icon_visibility_on.png b/src/LightApplication/resources/icon_visibility_on.png
deleted file mode 100644 (file)
index 61ebe47..0000000
Binary files a/src/LightApplication/resources/icon_visibility_on.png and /dev/null differ
diff --git a/src/LightApplication/resources/view_sync.png b/src/LightApplication/resources/view_sync.png
deleted file mode 100644 (file)
index 32b9522..0000000
Binary files a/src/LightApplication/resources/view_sync.png and /dev/null differ
index c394575391aaa785190b5ac43a72a0ffc506e1e6..e6e342f69a61755921adfc50102fddecd673489a 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/LightApplication
+  ${PROJECT_SOURCE_DIR}/src/DummyApplication
   ${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 lightapplication suit Event SalomeStyle SalomeApp SalomeIDLGUI
+  qtx dummyapplication suit Event SalomeStyle SalomeApp SalomeIDLGUI
 )
 
 # --- headers ---
index f7ca70ebe10e1c238c6569041e5709a1ed22fb32..34122b7471cc1cfe1a9da13cd9f9cafc55c98c68 100644 (file)
@@ -56,7 +56,7 @@
 #include "SUIT_Session.h"
 #include "SUIT_Tools.h"
 
-#include "LightApplication.h"
+#include "DummyApplication.h"
 
 #include <SALOMEconfig.h>
 #include CORBA_SERVER_HEADER(SALOME_Session)
@@ -733,7 +733,7 @@ int AbstractGUIAppMain(int argc, char **argv)
       MESSAGE("creation SUIT_Application");
       MESSAGE(NamingServiceImplementation::LibName );
       //SUIT_Application *aGUIApp = aGUISession->startApplication(NamingServiceImplementation::LibName, 0, 0);
-      LightApplication *aGUIApp = new LightApplication();
+      DummyApplication *aGUIApp = new DummyApplication();
       aGUIApp->start();
 
       if (aGUIApp)
diff --git a/src/Session/salomeLight.cxx b/src/Session/salomeLight.cxx
new file mode 100644 (file)
index 0000000..a273572
--- /dev/null
@@ -0,0 +1,110 @@
+// Copyright (C) 2021  CEA/DEN, EDF R&D
+//
+// 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 <QProcessEnvironment>
+#include <QDir>
+#include <QProcess>
+
+#include <iostream>
+#include <regex>
+
+int main(int argc, char *argv[])
+{
+  constexpr char MAIN_PROGRAM[] = "SALOME_Session_Server_No_Server";
+  constexpr char NO_SERVER_ENV_VAR[] = "SALOME_EMB_SERVANT";
+  constexpr char PYQT5_NOT_MASTER[] = "PYQT5_NOT_MASTER";
+  const char *MODULES[]={"GUI"};
+  const char *MODULES_PATH[]={"PYHELLO","GUI","SHAPER","SHAPERSTUDY","GEOM","SMESH","HYBRIDPLUGIN","BLSURFPLUGIN","GMSHPLUGIN","HEXABLOCKPLUGIN","NETGENPLUGIN"};
+// #ifndef WIN32
+//   const char *MODULES[]={"SHAPERSTUDY","GEOM","SMESH","YACS","HYBRIDPLUGIN","GHS3DPLUGIN","BLSURFPLUGIN","GMSHPLUGIN","HEXABLOCKPLUGIN","HEXOTICPLUGIN","GHS3DPRLPLUGIN","NETGENPLUGIN"};
+//   const char *MODULES_PATH[]={"GUI","SHAPER","SHAPERSTUDY","GEOM","SMESH","YACS","HYBRIDPLUGIN","GHS3DPLUGIN","BLSURFPLUGIN","GMSHPLUGIN","HEXABLOCKPLUGIN","GHS3DPRLPLUGIN","NETGENPLUGIN"};
+// #else
+//   const char *MODULES[]={"SHAPERSTUDY","GEOM","SMESH","HYBRIDPLUGIN","BLSURFPLUGIN","GMSHPLUGIN","HEXABLOCKPLUGIN","HEXOTICPLUGIN","NETGENPLUGIN"};
+//   const char *MODULES_PATH[]={"GUI","SHAPER","SHAPERSTUDY","GEOM","SMESH","HYBRIDPLUGIN","BLSURFPLUGIN","GMSHPLUGIN","HEXABLOCKPLUGIN","NETGENPLUGIN"};
+// #endif
+  constexpr char APPCONFIG[]="SalomeAppSLConfig";
+  QProcessEnvironment pe(QProcessEnvironment::systemEnvironment());
+  QStringList modulesPaths;
+  for(auto elt : MODULES_PATH)
+  {
+    QString elt_root_dir( QString("%1_ROOT_DIR").arg(elt) );
+    if( !pe.contains(elt_root_dir) || pe.value(elt_root_dir).isEmpty() )
+    {
+      std::cerr << elt_root_dir.toStdString() << " is not defined in your environment !" << std::endl;
+      return 1;
+    }
+    modulesPaths << QDir::fromNativeSeparators( QString("%1/share/salome/resources/%2").arg( pe.value(elt_root_dir) ).arg( QString(elt).toLower() ) );
+  }
+  // fill LightAppConfig env var
+  QString appconfig_val( modulesPaths.join(QDir::listSeparator()));
+  pe.insert(APPCONFIG,appconfig_val);
+  //tells shutup to salome.salome_init invoked at shaper engine ignition
+  pe.insert(NO_SERVER_ENV_VAR,"1");
+  pe.insert(PYQT5_NOT_MASTER,"1");
+  //resource file retrieve
+  QString resfile;
+  {
+    QProcess proc;
+    proc.setProcessEnvironment(pe);
+    proc.setProgram("python3");
+    proc.setArguments({"-c","from launchConfigureParser import userFile ; import sys ; sys.stdout.write(userFile(\"SalomeApp\",\"salome\"))"});
+    proc.start();
+    proc.waitForFinished(-1);
+    if(proc.exitStatus() != QProcess::NormalExit)
+    {
+      std::cerr << "Fail to retrieve resource file from launchConfigureParser python module !" << std::endl;
+      return 1;
+    }
+    QByteArray val(proc.readAllStandardOutput());
+    resfile = QString::fromUtf8(val);
+  }
+  //
+  QProcess proc;
+  proc.setProcessEnvironment(pe);
+  proc.setProgram(MAIN_PROGRAM);
+
+  QStringList args({"--with","Registry","(","--salome_session","theSession",")","--with","ModuleCatalog","(","-common"});
+  QStringList catalogs;
+  for(std::size_t im = 0 ; im < sizeof(MODULES)/sizeof(decltype(MODULES[0])) ; ++im )
+  {
+    QString root_dir = pe.value( QString("%1_ROOT_DIR").arg(MODULES[im]) );
+    catalogs << QDir::toNativeSeparators( QString("%1/share/salome/resources/%2/%3Catalog.xml").arg(root_dir).arg(QString(MODULES[im]).toLower()).arg(MODULES[im]) );
+  }
+  args << catalogs.join("::");
+  args << ")" << "--hide-splash" << "--modules" << "(GUI)";
+  args << "--with" << "SALOMEDS" <<  "(" << ")" << "--with" << "Container" << "(" << "FactoryServer" << ")";
+  if( pe.contains("VERBOSE") )
+  {
+    std::cout << "Overloaded env var :" << std::endl;
+    std::cout << " - " << NO_SERVER_ENV_VAR << std::endl;
+    std::cout << " - " << APPCONFIG << " = " << appconfig_val.toStdString() << std::endl;
+    std::cout << "Command launched :" << std::endl;
+    // Building string of command
+    std::string cmd = args.join(" ").toStdString();
+    // Adding quotes around ( and ) as they are interpreted by bash
+    cmd = std::regex_replace(cmd, std::regex("\\("), "\"(\"");
+    cmd = std::regex_replace(cmd, std::regex("\\)"), "\")\"");
+    std::cout << MAIN_PROGRAM << " " << cmd << std::endl;
+  }
+  proc.setArguments(args);
+  proc.setProcessChannelMode( QProcess::ForwardedErrorChannel );
+  proc.start();
+  proc.waitForFinished(-1);
+  return proc.exitCode();
+}