# 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
)
ADD_SUBDIRECTORY(ViewerTools)
ADD_SUBDIRECTORY(ImageComposer)
ADD_SUBDIRECTORY(GUI_PY)
-ADD_SUBDIRECTORY(LightApplication)
+ADD_SUBDIRECTORY(DummyApplication)
##
# SALOME object
--- /dev/null
+# 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})
--- /dev/null
+// 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();
+}
--- /dev/null
+// 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
--- /dev/null
+// 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);
+}
--- /dev/null
+// 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
--- /dev/null
+<?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>
--- /dev/null
+<?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>&Window</translation>
+ </message>
+ <message>
+ <source>ERR_CANT_DUMP_VIEW</source>
+ <translation>Can'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>&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 "%1" does not exist!</translation>
+ </message>
+ <message>
+ <source>ERR_FILE_NOT_DIR</source>
+ <translation>"%1" 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 "%1" 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't save file "%1".
+Permission denied.</translation>
+ </message>
+ <message>
+ <source>ERR_OPEN_PERMISSION_DENIED</source>
+ <translation>Can't open file "%1".
+Permission denied.</translation>
+ </message>
+ <message>
+ <source>ERR_DIR_READ_PERMISSION_DENIED</source>
+ <translation>Can't read directory "%1".
+Permission denied.</translation>
+ </message>
+ <message>
+ <source>ERR_DIR_WRITE_PERMISSION_DENIED</source>
+ <translation>Can't write directory "%1".
+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 &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>&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>
--- /dev/null
+<?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>&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>&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 "%1" n'existe pas !</translation>
+ </message>
+ <message>
+ <source>ERR_FILE_NOT_DIR</source>
+ <translation>"%1" n'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 "%1" n'existe pas !</translation>
+ </message>
+ <message>
+ <source>QUE_DOC_FILEEXISTS</source>
+ <translation>Le fichier %1 existe déjà.
+Voulez-vous l'é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 "%1".
+Autorisation interdite.</translation>
+ </message>
+ <message>
+ <source>ERR_OPEN_PERMISSION_DENIED</source>
+ <translation>Impossible d'ouvrir le fichier "%1".
+Autorisation interdite.</translation>
+ </message>
+ <message>
+ <source>ERR_DIR_READ_PERMISSION_DENIED</source>
+ <translation>Impossible de lire le répertoire "%1".
+Autorisation interdite.</translation>
+ </message>
+ <message>
+ <source>ERR_DIR_WRITE_PERMISSION_DENIED</source>
+ <translation>Impossible d'écrire dans le répertoire "%1".
+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'é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 &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>&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'opération</translation>
+ </message>
+ <message>
+ <source>PREVIOUS_NOT_FINISHED</source>
+ <translation>L'opération précédente n'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>
--- /dev/null
+<?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>ウィンドウ(&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>カスケード(&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>垂直方向のモザイク(&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>モザイク(&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>
+++ /dev/null
-# 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
+++ /dev/null
-// 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
+++ /dev/null
-// 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
+++ /dev/null
-// 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
+++ /dev/null
-// 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
+++ /dev/null
-<?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>
+++ /dev/null
-<?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>&Window</translation>
- </message>
- <message>
- <source>ERR_CANT_DUMP_VIEW</source>
- <translation>Can'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>&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 "%1" does not exist!</translation>
- </message>
- <message>
- <source>ERR_FILE_NOT_DIR</source>
- <translation>"%1" 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 "%1" 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't save file "%1".
-Permission denied.</translation>
- </message>
- <message>
- <source>ERR_OPEN_PERMISSION_DENIED</source>
- <translation>Can't open file "%1".
-Permission denied.</translation>
- </message>
- <message>
- <source>ERR_DIR_READ_PERMISSION_DENIED</source>
- <translation>Can't read directory "%1".
-Permission denied.</translation>
- </message>
- <message>
- <source>ERR_DIR_WRITE_PERMISSION_DENIED</source>
- <translation>Can't write directory "%1".
-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 &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>&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>
+++ /dev/null
-<?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>&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>&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 "%1" n'existe pas !</translation>
- </message>
- <message>
- <source>ERR_FILE_NOT_DIR</source>
- <translation>"%1" n'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 "%1" n'existe pas !</translation>
- </message>
- <message>
- <source>QUE_DOC_FILEEXISTS</source>
- <translation>Le fichier %1 existe déjà.
-Voulez-vous l'é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 "%1".
-Autorisation interdite.</translation>
- </message>
- <message>
- <source>ERR_OPEN_PERMISSION_DENIED</source>
- <translation>Impossible d'ouvrir le fichier "%1".
-Autorisation interdite.</translation>
- </message>
- <message>
- <source>ERR_DIR_READ_PERMISSION_DENIED</source>
- <translation>Impossible de lire le répertoire "%1".
-Autorisation interdite.</translation>
- </message>
- <message>
- <source>ERR_DIR_WRITE_PERMISSION_DENIED</source>
- <translation>Impossible d'écrire dans le répertoire "%1".
-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'é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 &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>&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'opération</translation>
- </message>
- <message>
- <source>PREVIOUS_NOT_FINISHED</source>
- <translation>L'opération précédente n'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>
+++ /dev/null
-<?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>ウィンドウ(&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>カスケード(&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>垂直方向のモザイク(&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>モザイク(&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>
${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
${KERNEL_SalomeLauncher}
${KERNEL_Registry}
${KERNEL_SALOMEBasics}
- qtx lightapplication suit Event SalomeStyle SalomeApp SalomeIDLGUI
+ qtx dummyapplication suit Event SalomeStyle SalomeApp SalomeIDLGUI
)
# --- headers ---
#include "SUIT_Session.h"
#include "SUIT_Tools.h"
-#include "LightApplication.h"
+#include "DummyApplication.h"
#include <SALOMEconfig.h>
#include CORBA_SERVER_HEADER(SALOME_Session)
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)
--- /dev/null
+// 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();
+}