FIND_PACKAGE(SalomeOmniORBPy REQUIRED)
ELSE()
ADD_DEFINITIONS("-DGUI_DISABLE_CORBA")
-ENDIF()
+ENDIF()
IF(SALOME_BUILD_TESTS)
ENABLE_TESTING()
FIND_PACKAGE(SalomeCppUnit)
# - VTK viewer: VTK
IF(SALOME_USE_VTKVIEWER)
- # Required components are listed in the FindSalomeVTK.cmake file:
- FIND_PACKAGE(SalomeVTK)
+ # Required components are listed in the FindSalomeVTK.cmake file:
+ FIND_PACKAGE(SalomeVTK)
SALOME_LOG_OPTIONAL_PACKAGE(VTK SALOME_USE_VTKVIEWER)
# VSR: TODO: since ParaView 5.8 the following is not needed, as OPENGL2 is hardcoded: to be removed (everywhere)
ADD_DEFINITIONS("-DVTK_OPENGL2")
SET(SALOME_INSTALL_LIBS "${SALOME_INSTALL_LIBS}" CACHE PATH "Install path: SALOME libs")
SET(SALOME_INSTALL_IDLS "${SALOME_INSTALL_IDLS}" CACHE PATH "Install path: SALOME IDL files")
SET(SALOME_INSTALL_HEADERS "${SALOME_INSTALL_HEADERS}" CACHE PATH "Install path: SALOME headers")
-SET(SALOME_INSTALL_SCRIPT_SCRIPTS "${SALOME_INSTALL_SCRIPT_SCRIPTS}" CACHE PATH
+SET(SALOME_INSTALL_SCRIPT_SCRIPTS "${SALOME_INSTALL_SCRIPT_SCRIPTS}" CACHE PATH
"Install path: SALOME scripts")
-SET(SALOME_INSTALL_SCRIPT_DATA "${SALOME_INSTALL_SCRIPT_DATA}" CACHE PATH
+SET(SALOME_INSTALL_SCRIPT_DATA "${SALOME_INSTALL_SCRIPT_DATA}" CACHE PATH
"Install path: SALOME script data")
-SET(SALOME_INSTALL_SCRIPT_PYTHON "${SALOME_INSTALL_SCRIPT_PYTHON}" CACHE PATH
+SET(SALOME_INSTALL_SCRIPT_PYTHON "${SALOME_INSTALL_SCRIPT_PYTHON}" CACHE PATH
"Install path: SALOME Python scripts")
SET(SALOME_INSTALL_PYTHON "${SALOME_INSTALL_PYTHON}" CACHE PATH "Install path: SALOME Python stuff")
-SET(SALOME_INSTALL_PYTHON_SHARED "${SALOME_INSTALL_PYTHON_SHARED}" CACHE PATH
+SET(SALOME_INSTALL_PYTHON_SHARED "${SALOME_INSTALL_PYTHON_SHARED}" CACHE PATH
"Install path: SALOME Python shared modules")
SET(SALOME_INSTALL_CMAKE "${SALOME_INSTALL_CMAKE}" CACHE PATH "Install path: SALOME CMake files")
-SET(SALOME_INSTALL_CMAKE_LOCAL "${SALOME_INSTALL_CMAKE_LOCAL}" CACHE PATH
- "Install path: local SALOME CMake files")
+SET(SALOME_INSTALL_CMAKE_LOCAL "${SALOME_INSTALL_CMAKE_LOCAL}" CACHE PATH
+ "Install path: local SALOME CMake files")
SET(SALOME_INSTALL_AMCONFIG_LOCAL "${SALOME_INSTALL_AMCONFIG_LOCAL}" CACHE PATH
"Install path: local SALOME config files (obsolete, to be removed)")
SET(SALOME_INSTALL_DOC "${SALOME_INSTALL_DOC}" CACHE PATH "Install path: SALOME documentation")
# Specific to GUI:
-SET(SALOME_GUI_INSTALL_RES_DATA "${SALOME_INSTALL_RES}/gui" CACHE PATH
+SET(SALOME_GUI_INSTALL_RES_DATA "${SALOME_INSTALL_RES}/gui" CACHE PATH
"Install path: SALOME GUI specific data")
-SET(SALOME_GUI_INSTALL_RES_SCRIPTS "${SALOME_INSTALL_RES}/gui" CACHE PATH
+SET(SALOME_GUI_INSTALL_RES_SCRIPTS "${SALOME_INSTALL_RES}/gui" CACHE PATH
"Install path: SALOME GUI scripts")
-SET(SALOME_GUI_INSTALL_PLUGINS share/salome/plugins/gui CACHE PATH
+SET(SALOME_GUI_INSTALL_PLUGINS share/salome/plugins/gui CACHE PATH
"Install path: SALOME GUI plugins")
MARK_AS_ADVANCED(SALOME_INSTALL_BINS SALOME_INSTALL_LIBS SALOME_INSTALL_IDLS SALOME_INSTALL_HEADERS)
${CMAKE_INSTALL_PREFIX}/${SALOME_INSTALL_PYTHON}
${CMAKE_INSTALL_PREFIX}/${SALOME_INSTALL_LIBS}
${CMAKE_INSTALL_PREFIX}/${SALOME_INSTALL_PYTHON_SHARED})
-SALOME_ACCUMULATE_ENVIRONMENT(LD_LIBRARY_PATH NOCHECK ${CMAKE_INSTALL_PREFIX}/${SALOME_INSTALL_LIBS})
-
-# Sources
+SALOME_ACCUMULATE_ENVIRONMENT(LD_LIBRARY_PATH NOCHECK ${CMAKE_INSTALL_PREFIX}/${SALOME_INSTALL_LIBS})
+
+# Sources
# ========
IF(NOT SALOME_LIGHT_ONLY)
ADD_SUBDIRECTORY(idl)
# List of targets in this project we want to make visible to the rest of the world.
# They all have to be INSTALL'd with the option "EXPORT ${PROJECT_NAME}TargetGroup"
-SET(_${PROJECT_NAME}_exposed_targets
+SET(_${PROJECT_NAME}_exposed_targets
CAM CASCatch DDS Event LightApp LogWindow ObjBrowser
- QDS qtx SalomePrs SalomeStyle std SUITApp suit ViewerTools ViewerData
+ QDS qtx SalomePrs SalomeStyle std SUITApp lightapplication suit ViewerTools ViewerData
ImageComposer
)
IF(SALOME_USE_OCCVIEWER OR SALOME_USE_VTKVIEWER OR SALOME_USE_GLVIEWER)
- LIST(APPEND _${PROJECT_NAME}_exposed_targets
+ LIST(APPEND _${PROJECT_NAME}_exposed_targets
OpenGLUtils)
ENDIF(SALOME_USE_OCCVIEWER OR SALOME_USE_VTKVIEWER OR SALOME_USE_GLVIEWER)
# SALOME object specific targets:
IF(SALOME_USE_SALOMEOBJECT)
- LIST(APPEND _${PROJECT_NAME}_exposed_targets
+ LIST(APPEND _${PROJECT_NAME}_exposed_targets
SalomeObject)
ENDIF(SALOME_USE_SALOMEOBJECT)
# GL specific targets:
IF(SALOME_USE_GLVIEWER)
- LIST(APPEND _${PROJECT_NAME}_exposed_targets
+ LIST(APPEND _${PROJECT_NAME}_exposed_targets
GLViewer)
ENDIF(SALOME_USE_GLVIEWER)
# VTK specific targets:
IF(SALOME_USE_VTKVIEWER)
- LIST(APPEND _${PROJECT_NAME}_exposed_targets
+ LIST(APPEND _${PROJECT_NAME}_exposed_targets
VTKViewer )
IF(SALOME_USE_SALOMEOBJECT)
- LIST(APPEND _${PROJECT_NAME}_exposed_targets
+ LIST(APPEND _${PROJECT_NAME}_exposed_targets
SVTK)
ENDIF(SALOME_USE_SALOMEOBJECT)
ENDIF(SALOME_USE_VTKVIEWER)
# OCC specific targets:
IF(SALOME_USE_OCCVIEWER)
- LIST(APPEND _${PROJECT_NAME}_exposed_targets
+ LIST(APPEND _${PROJECT_NAME}_exposed_targets
OCCViewer)
IF(SALOME_USE_SALOMEOBJECT)
- LIST(APPEND _${PROJECT_NAME}_exposed_targets
+ LIST(APPEND _${PROJECT_NAME}_exposed_targets
SOCC)
ENDIF(SALOME_USE_SALOMEOBJECT)
ENDIF(SALOME_USE_OCCVIEWER)
# Plot2d specific targets:
IF(SALOME_USE_PLOT2DVIEWER)
- LIST(APPEND _${PROJECT_NAME}_exposed_targets
+ LIST(APPEND _${PROJECT_NAME}_exposed_targets
Plot2d)
IF(SALOME_USE_SALOMEOBJECT)
- LIST(APPEND _${PROJECT_NAME}_exposed_targets
+ LIST(APPEND _${PROJECT_NAME}_exposed_targets
SPlot2d)
ENDIF(SALOME_USE_SALOMEOBJECT)
ENDIF(SALOME_USE_PLOT2DVIEWER)
# Qx specific targets:
IF(SALOME_USE_QXGRAPHVIEWER)
- LIST(APPEND _${PROJECT_NAME}_exposed_targets
+ LIST(APPEND _${PROJECT_NAME}_exposed_targets
QxScene)
ENDIF(SALOME_USE_QXGRAPHVIEWER)
# GraphicsView specific targets:
IF(SALOME_USE_GRAPHICSVIEW)
- LIST(APPEND _${PROJECT_NAME}_exposed_targets
+ LIST(APPEND _${PROJECT_NAME}_exposed_targets
GraphicsView)
ENDIF(SALOME_USE_GRAPHICSVIEW)
# PyEditor/Viewer specific targets:
IF(SALOME_USE_PYVIEWER)
- LIST(APPEND _${PROJECT_NAME}_exposed_targets
+ LIST(APPEND _${PROJECT_NAME}_exposed_targets
PyEditor PyViewer)
ENDIF(SALOME_USE_PYVIEWER)
# Python-based packages specific targets:
IF(SALOME_USE_PYCONSOLE)
- LIST(APPEND _${PROJECT_NAME}_exposed_targets
+ LIST(APPEND _${PROJECT_NAME}_exposed_targets
PyInterp PyConsole SalomePyQtGUILight)
IF(SALOME_USE_PLOT2DVIEWER)
LIST(APPEND _${PROJECT_NAME}_exposed_targets SalomePyQt)
SET(PARAVIEW_ROOT_DIR "${PARAVIEW_ROOT_DIR}")
SET(VTK_ROOT_DIR "${VTK_ROOT_DIR}")
SET(QWT_ROOT_DIR "${QWT_ROOT_DIR}")
-
+
SET(CONF_INCLUDE_DIRS "${PROJECT_SOURCE_DIR}/include" "${PROJECT_BINARY_DIR}/include")
# Build variables that will be expanded when configuring Salome<MODULE>Config.cmake:
SALOME_CONFIGURE_PREPARE(OpenCASCADE OpenGL Qt5 PyQt5 Qwt SIP ParaView VTK)
-CONFIGURE_PACKAGE_CONFIG_FILE(${PROJECT_NAME}Config.cmake.in
+CONFIGURE_PACKAGE_CONFIG_FILE(${PROJECT_NAME}Config.cmake.in
${PROJECT_BINARY_DIR}/${PROJECT_NAME}Config.cmake
INSTALL_DESTINATION "${SALOME_INSTALL_CMAKE_LOCAL}"
PATH_VARS CONF_INCLUDE_DIRS SALOME_INSTALL_CMAKE_LOCAL CMAKE_INSTALL_PREFIX
- KERNEL_ROOT_DIR SIP_ROOT_DIR QT_ROOT_DIR PYQT_ROOT_DIR OPENCASCADE_ROOT_DIR
+ KERNEL_ROOT_DIR SIP_ROOT_DIR QT_ROOT_DIR PYQT_ROOT_DIR OPENCASCADE_ROOT_DIR
OPENGL_ROOT_DIR PARAVIEW_ROOT_DIR VTK_ROOT_DIR QWT_ROOT_DIR)
# - in the install tree (VSR 16/08/2013: TEMPORARILY COMMENT THIS - TO REMOVE?):
-# Get the relative path of the include directory so
+# Get the relative path of the include directory so
# we can register it in the generated configuration files:
#SET(CONF_INCLUDE_DIRS "${CMAKE_INSTALL_PREFIX}/${INSTALL_INCLUDE_DIR}")
-#CONFIGURE_PACKAGE_CONFIG_FILE(adm_local/cmake_files/${PROJECT_NAME}Config.cmake.in
+#CONFIGURE_PACKAGE_CONFIG_FILE(adm_local/cmake_files/${PROJECT_NAME}Config.cmake.in
# ${PROJECT_BINARY_DIR}/to_install/${PROJECT_NAME}Config.cmake
# INSTALL_DESTINATION "${SALOME_INSTALL_CMAKE_LOCAL}"
-# PATH_VARS CONF_INCLUDE_DIRS SALOME_INSTALL_CMAKE_LOCAL CMAKE_INSTALL_PREFIX
-# KERNEL_ROOT_DIR SIP_ROOT_DIR QT_ROOT_DIR PYQT_ROOT_DIR OPENCASCADE_ROOT_DIR
+# PATH_VARS CONF_INCLUDE_DIRS SALOME_INSTALL_CMAKE_LOCAL CMAKE_INSTALL_PREFIX
+# KERNEL_ROOT_DIR SIP_ROOT_DIR QT_ROOT_DIR PYQT_ROOT_DIR OPENCASCADE_ROOT_DIR
# OPENGL_ROOT_DIR PARAVIEW_ROOT_DIR VTK_ROOT_DIR QWT_ROOT_DIR)
WRITE_BASIC_PACKAGE_VERSION_FILE(${PROJECT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake
VERSION ${${PROJECT_NAME_UC}_VERSION}
COMPATIBILITY AnyNewerVersion)
-
+
# Install the CMake configuration files:
INSTALL(FILES
"${PROJECT_BINARY_DIR}/${PROJECT_NAME}Config.cmake"
DESTINATION "${SALOME_INSTALL_CMAKE_LOCAL}")
# Install the export set for use with the install-tree
-INSTALL(EXPORT ${PROJECT_NAME}TargetGroup DESTINATION "${SALOME_INSTALL_CMAKE_LOCAL}"
+INSTALL(EXPORT ${PROJECT_NAME}TargetGroup DESTINATION "${SALOME_INSTALL_CMAKE_LOCAL}"
FILE ${PROJECT_NAME}Targets.cmake)
ADD_SUBDIRECTORY(ViewerTools)
ADD_SUBDIRECTORY(ImageComposer)
ADD_SUBDIRECTORY(GUI_PY)
+ADD_SUBDIRECTORY(LightApplication)
##
# SALOME object
##
# Python-based packages, part 2 (LightApp-dependent)
##
-IF(SALOME_USE_PYCONSOLE)
+IF(SALOME_USE_PYCONSOLE)
IF(SALOME_USE_VTKVIEWER)
ADD_SUBDIRECTORY(SALOME_PY)
ENDIF(SALOME_USE_VTKVIEWER)
void LightApp_Application::onOpenDoc()
{
SUIT_Study* study = activeStudy();
-
+
if ( !checkExistingDoc( false ) )
return;
-
+
QString aName = getFileName( true, QString(), getFileFilter( true ), QString(), 0 );
if ( aName.isNull() ) //Cancel
return;
-
+
onOpenDoc( aName );
-
+
if ( !study ) // new study will be create in THIS application
{
updateWindows();
#else
QString cmdLine = QString( "%1 %2 \"%3\"" ).arg( myBrowser, myParameters, myUrl );
// remove LD_LIBRARY_PATH from the environement before starting launcher to avoid bad interactions.
- // (especially in the case of universal binaries)
+ // (especially in the case of universal binaries)
env.remove("LD_LIBRARY_PATH");
#endif
QProcess* proc = new QProcess();
int vtkSelectionGroup = pref->addPreference( tr( "PREF_GROUP_SELECTION" ), vtkGroup );
pref->setItemProperty( "columns", 2, vtkSelectionGroup );
// .... -> preselection
- int vtkPreselection = pref->addPreference( tr( "PREF_PRESELECTION" ), vtkSelectionGroup,
+ int vtkPreselection = pref->addPreference( tr( "PREF_PRESELECTION" ), vtkSelectionGroup,
LightApp_Preferences::Selector, "VTKViewer", "preselection" );
aValuesList.clear();
anIndicesList.clear();
int spacemousePref2 = pref->addPreference( tr( "PREF_SPACEMOUSE_FUNC_2" ), vtkSM,
LightApp_Preferences::Selector, "VTKViewer",
"spacemouse_func2_btn" );
- // .... -> dominant / combined switch
+ // .... -> dominant / combined switch
int spacemousePref3 = pref->addPreference( tr( "PREF_SPACEMOUSE_FUNC_3" ), vtkSM,
LightApp_Preferences::Selector, "VTKViewer",
"spacemouse_func5_btn" ); //
infoPanel()->addAction( action( FileOpenId ), grp );
infoPanel()->addLabel( action( FileOpenId )->statusTip(), grp );
infoPanel()->addAction( action( TutorialsId ), grp );
- infoPanel()->addLabel( action( TutorialsId )->statusTip(), grp );
+ //infoPanel()->addLabel( action( TutorialsId )->statusTip(), grp );
infoPanel()->addAction( action( VideosId ), grp );
- infoPanel()->addLabel( action( VideosId )->statusTip(), grp );
+ //infoPanel()->addLabel( action( VideosId )->statusTip(), grp );
LightApp_ModuleAction* ma = qobject_cast<LightApp_ModuleAction*>(action(ModulesListId));
if ( ma && ma->count() > 0 )
aResMgr->value( "windows_visibility", modName, aDefaultVisibility );
bool hasDefaultVisibility = !aDefaultVisibility.isEmpty();
aResMgr->setWorkingMode( prevMode );
-
+
if( !storeWin && !storeTb && aDefaultState.isEmpty() && !hasDefaultVisibility)
return;
QMap<QString, bool> *tbMap = 0;
QMap<QString, bool> *dwMap = 0;
-
+
QMap<QString, bool> userTbMap, userDwMap;
dockWindowsState( myWinVis[modName], userTbMap, userDwMap );
QMap<QString, bool> defaultTbMap, defaultDwMap;
if(hasDefaultVisibility) {
- dockWindowsState( aDefaultVisibility, defaultTbMap, defaultDwMap);
+ dockWindowsState( aDefaultVisibility, defaultTbMap, defaultDwMap);
}
if(storeTb) {
if(tbMap) {
QList<QToolBar*> tbList = findToolBars();
for ( QList<QToolBar*>::iterator tit = tbList.begin(); tit != tbList.end(); ++tit )
- {
+ {
QToolBar* tb = *tit;
- if ( tbMap->contains( tb->objectName() ) ) {
+ if ( tbMap->contains( tb->objectName() ) ) {
tb->setVisible( (*tbMap)[tb->objectName()] );
}
}
for ( QList<QDockWidget*>::iterator dit = dwList.begin(); dit != dwList.end(); ++dit )
{
QDockWidget* dw = *dit;
-
+
QObject* po = Qtx::findParent( dw, "QMainWindow" );
if ( po != desktop() )
continue;
-
+
if ( dwMap->contains( dw->objectName() ) )
dw->setVisible( (*dwMap)[dw->objectName()] );
}
}
else if ( message.toLower().startsWith("register_module_in_study" ) ) {
QString moduleName = message.split( sectionSeparator ).last();
- // Check name of current activating module name in order to avoid ciclik
+ // Check name of current activating module name in order to avoid ciclik
// call because of messages
if (!property("activateModule").toBool()) {
CAM_Module* mod = module(moduleName);
}
/*!
- Internal method.
+ Internal method.
Returns all top level toolbars.
Note : Result list contains only main window toolbars, not including toolbars from viewers.
*/
</message>
<message>
<source>SALOME_TUTORIALS</source>
- <translation type="unfinished">Tutorials</translation>
+ <translation>Tutorials</translation>
</message>
<message>
<source>PRP_SALOME_TUTORIALS</source>
--- /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>
*/
QAction* SUIT_Application::createAction( const int id, const QString& text, const QIcon& icon,
const QString& menu, const QString& tip, const int key,
- QObject* parent, const bool toggle, QObject* reciever,
+ QObject* parent, const bool toggle, QObject* reciever,
const char* member, const QString& shortcutAction )
{
return createAction( id, text, icon, menu, tip, QKeySequence(key), parent, toggle, reciever, member, shortcutAction );
*/
QAction* SUIT_Application::createAction( const int id, const QString& text, const QIcon& icon,
const QString& menu, const QString& tip, const QKeySequence& key,
- QObject* parent, const bool toggle, QObject* reciever,
+ QObject* parent, const bool toggle, QObject* reciever,
const char* member, const QString& shortcutAction )
{
QtxAction* a = new QtxAction( text, icon, menu, key, parent, toggle, shortcutAction );
${PROJECT_SOURCE_DIR}/src/SUIT
${PROJECT_SOURCE_DIR}/src/Event
${PROJECT_SOURCE_DIR}/src/Style
- ${PROJECT_SOURCE_DIR}/src/SUIT
+ ${PROJECT_SOURCE_DIR}/src/LightApplication
${PROJECT_SOURCE_DIR}/src/STD
${PROJECT_SOURCE_DIR}/src/CAM
${PROJECT_SOURCE_DIR}/src/OBJECT
${KERNEL_SalomeLauncher}
${KERNEL_Registry}
${KERNEL_SALOMEBasics}
- qtx suit Event SalomeStyle SalomeApp SalomeIDLGUI
+ qtx lightapplication suit Event SalomeStyle SalomeApp SalomeIDLGUI
)
# --- headers ---
ADD_LIBRARY(SalomeSession ${SalomeSession_SOURCES})
TARGET_LINK_LIBRARIES(SalomeSession ${_link_LIBRARIES})
-INSTALL(TARGETS SalomeSession EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
+INSTALL(TARGETS SalomeSession EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
ADD_EXECUTABLE(SALOME_Session_Server SALOME_Session_Server_With_Server.cxx)
TARGET_LINK_LIBRARIES(SALOME_Session_Server ${_link_LIBRARIES} SalomeSession)
target_link_libraries(salome2810 ${QT_LIBRARIES})
install(TARGETS salome2810 DESTINATION ${SALOME_INSTALL_BINS})
+add_executable(salomeLight salomeLight.cxx)
+target_link_libraries(salomeLight ${QT_LIBRARIES})
+install(TARGETS salomeLight DESTINATION ${SALOME_INSTALL_BINS})
+
+
INSTALL(FILES ${SalomeSession_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})
QT_INSTALL_TS_RESOURCES("${_ts_RESOURCES}" "${SALOME_GUI_INSTALL_RES_DATA}")
#include "SUIT_Session.h"
#include "SUIT_Tools.h"
+#include "LightApplication.h"
+
#include <SALOMEconfig.h>
#include CORBA_SERVER_HEADER(SALOME_Session)
#include CORBA_SERVER_HEADER(SALOMEDS)
#include <QTextStream>
#include <QWaitCondition>
+#include <fstream>
+
//! CORBA server for SALOME GUI session
/*!
* SALOME_Session_Server launches a SALOME session servant.
// Load SalomeApp dynamic library
MESSAGE("creation SUIT_Application");
- SUIT_Application *aGUIApp = aGUISession->startApplication(NamingServiceImplementation::LibName, 0, 0);
+ MESSAGE(NamingServiceImplementation::LibName );
+ //SUIT_Application *aGUIApp = aGUISession->startApplication(NamingServiceImplementation::LibName, 0, 0);
+ LightApplication *aGUIApp = new LightApplication();
+ aGUIApp->start();
+
if (aGUIApp)
{
#ifdef USE_SALOME_STYLE
Style_Salome::apply();
#endif // USE_SALOME_STYLE
- if (!debugExceptions)
- app.setHandler(aGUISession->handler()); // after loading SalomeApp application
- // aGUISession contains SalomeApp_ExceptionHandler
+ // if (!debugExceptions)
+ // app.setHandler(aGUISession->handler()); // after loading SalomeApp application
+ // // aGUISession contains SalomeApp_ExceptionHandler
// Run GUI loop
MESSAGE("run(): starting the main event loop");
- if (splash)
- splash->finish(aGUIApp->desktop());
+ // if (splash)
+ // splash->finish(aGUIApp->desktop());
+
+ MESSAGE("run(): running app.exec()");
result = app.exec();