From 8c5294030a4c11ca0a18be48fc0165466861adad Mon Sep 17 00:00:00 2001 From: vsr Date: Mon, 8 Oct 2012 10:44:28 +0000 Subject: [PATCH] Merge from V6_main (04/10/2012) --- CMakeLists.txt | 128 ++++++ adm_local/CMakeLists.txt | 24 ++ adm_local/cmake_files/CMakeLists.txt | 35 ++ adm_local/cmake_files/FindGUI.cmake | 2 + adm_local/cmake_files/FindQT4.cmake | 7 +- adm_local/cmake_files/FindQWT.cmake | 10 +- adm_local/cmake_files/FindSIPPYQT.cmake | 6 +- adm_local/cmake_files/UseQT4EXT.cmake | 3 +- adm_local/unix/CMakeLists.txt | 20 + adm_local/unix/config_files/CMakeLists.txt | 45 ++ bin/CMakeLists.txt | 31 ++ doc/CMakeLists.txt | 23 + doc/salome/CMakeLists.txt | 28 ++ doc/salome/gui/CMakeLists.txt | 57 +++ doc/salome/gui/images/view2.png | Bin 20542 -> 19234 bytes doc/salome/gui/input/index.doc | 5 +- doc/salome/gui/input/running_salome.doc | 110 ----- doc/salome/gui/input/salome_architecture.doc | 5 - doc/salome/gui/input/text_user_interface.doc | 298 +------------ doc/salome/tui/CMakeLists.txt | 57 +++ idl/CMakeLists.txt | 46 ++ resources/CMakeLists.txt | 24 ++ src/CAF/CMakeLists.txt | 62 +++ src/CAM/CMakeLists.txt | 62 +++ src/CASCatch/CMakeLists.txt | 38 ++ src/CMakeLists.txt | 165 ++++++++ src/DDS/CMakeLists.txt | 43 ++ src/Event/CMakeLists.txt | 32 ++ src/GLViewer/CMakeLists.txt | 83 ++++ src/GUI_PY/CMakeLists.txt | 56 +++ src/GuiHelpers/CMakeLists.txt | 50 +++ src/GuiHelpers/Makefile.am | 3 +- src/GuiHelpers/QtHelper.hxx | 2 +- src/GuiHelpers/SALOME_AppStudyEditor.hxx | 9 +- src/GuiHelpers/SALOME_GuiServices.hxx | 16 +- src/GuiHelpers/SalomeGuiHelpers.hxx | 41 ++ src/GuiHelpers/StandardApp_Module.hxx | 4 +- src/LightApp/CMakeLists.txt | 260 ++++++++++++ src/LightApp/LightApp_Application.cxx | 71 ++-- src/LightApp/LightApp_DataObject.cxx | 2 +- src/LightApp/LightApp_PreferencesDlg.cxx | 2 + src/LightApp/resources/LightApp.xml | 2 +- src/LightApp/resources/LightApp_msg_en.ts | 4 + src/LightApp/resources/LightApp_msg_fr.ts | 4 + src/LogWindow/CMakeLists.txt | 43 ++ src/OBJECT/CMakeLists.txt | 53 +++ src/OCCViewer/CMakeLists.txt | 122 ++++++ src/OCCViewer/OCCViewer_ViewModel.cxx | 16 + src/OCCViewer/OCCViewer_ViewModel.h | 1 + src/OCCViewer/OCCViewer_ViewPort3d.cxx | 1 + src/OCCViewer/OCCViewer_ViewPort3d.h | 1 + src/ObjBrowser/CMakeLists.txt | 48 +++ src/OpenGLUtils/CMakeLists.txt | 38 ++ src/Plot2d/CMakeLists.txt | 126 ++++++ src/Plot2d/Plot2d_ViewFrame.cxx | 377 ++++++++--------- src/Plot2d/Plot2d_ViewFrame.h | 31 +- src/Prs/CMakeLists.txt | 25 ++ src/PyConsole/CMakeLists.txt | 65 +++ src/PyInterp/CMakeLists.txt | 50 +++ src/QDS/CMakeLists.txt | 84 ++++ src/Qtx/CMakeLists.txt | 184 ++++++++ src/Qtx/Qtx.cxx | 2 +- src/Qtx/QtxBiColorTool.cxx | 62 ++- src/Qtx/QtxBiColorTool.h | 2 + src/Qtx/QtxPagePrefMgr.cxx | 13 +- src/Qtx/QtxPagePrefMgr.h | 2 +- src/Qtx/QtxResourceMgr.cxx | 6 +- src/Qtx/QtxTreeView.cxx | 1 + src/Qtx/QtxWebBrowser.cxx | 6 + src/QxGraph/CMakeLists.txt | 80 ++++ src/QxScene/CMakeLists.txt | 71 ++++ src/ResExporter/CMakeLists.txt | 36 ++ src/SALOME_PY/CMakeLists.txt | 65 +++ src/SALOME_PYQT/CMakeLists.txt | 25 ++ .../SALOME_PYQT_GUI/CMakeLists.txt | 72 ++++ .../SALOME_PYQT_GUILight/CMakeLists.txt | 101 +++++ src/SALOME_PYQT/SalomePyQt/CMakeLists.txt | 114 +++++ src/SALOME_SWIG/CMakeLists.txt | 101 +++++ src/SOCC/CMakeLists.txt | 60 +++ src/SPlot2d/CMakeLists.txt | 65 +++ src/STD/CMakeLists.txt | 71 ++++ src/SUIT/CMakeLists.txt | 114 +++++ src/SUIT/SUIT_PreferenceMgr.cxx | 2 +- src/SUIT/SUIT_ResourceMgr.cxx | 45 +- src/SUIT/SUIT_TreeModel.cxx | 14 +- src/SUITApp/CMakeLists.txt | 95 +++++ src/SUPERVGraph/CMakeLists.txt | 71 ++++ src/SVTK/CMakeLists.txt | 154 +++++++ src/SVTK/Makefile.am | 4 +- src/SVTK/SALOME_Actor.cxx | 26 +- src/SVTK/SVTK_Actor.cxx | 35 +- src/SVTK/SVTK_Actor.h | 15 +- src/SVTK/SVTK_DeviceActor.cxx | 7 + src/SVTK/SVTK_DeviceActor.h | 4 + src/SVTK/SVTK_Selection.h | 2 + src/SVTK/SVTK_Utils.cxx | 43 ++ src/SVTK/SVTK_Utils.h | 41 ++ src/SalomeApp/CMakeLists.txt | 174 ++++++++ src/SalomeApp/Makefile.am | 2 +- src/SalomeApp/Test/CMakeLists.txt | 39 ++ src/SalomeApp/Test/SalomeAppTest.hxx | 12 +- src/SalomeApp/pluginsdemo/CMakeLists.txt | 42 ++ src/Session/CMakeLists.txt | 111 +++++ src/Session/SALOME_Session_Server.cxx | 66 ++- src/Style/CMakeLists.txt | 72 ++++ src/TOOLSGUI/CMakeLists.txt | 65 +++ src/TreeData/CMakeLists.txt | 77 ++++ src/TreeData/Test/CMakeLists.txt | 67 +++ src/TreeData/Test/data.txt | 30 +- src/VTKViewer/CMakeLists.txt | 135 ++++++ src/VTKViewer/VTKViewer_MarkerDlg.cxx | 151 ++++--- src/VTKViewer/VTKViewer_MarkerDlg.h | 26 +- src/VTKViewer/VTKViewer_MarkerUtils.cxx | 13 +- src/VTKViewer/VTKViewer_MarkerWidget.cxx | 398 ++++++++++-------- src/VTKViewer/VTKViewer_MarkerWidget.h | 48 ++- src/VTKViewer/VTKViewer_Utilities.cxx | 20 +- src/ViewerTools/CMakeLists.txt | 46 ++ tools/CMakeLists.txt | 27 ++ tools/vtkEDFOverloads/CMakeLists.txt | 35 ++ 119 files changed, 5469 insertions(+), 1054 deletions(-) create mode 100755 CMakeLists.txt create mode 100755 adm_local/CMakeLists.txt create mode 100755 adm_local/cmake_files/CMakeLists.txt create mode 100755 adm_local/unix/CMakeLists.txt create mode 100755 adm_local/unix/config_files/CMakeLists.txt create mode 100755 bin/CMakeLists.txt create mode 100755 doc/CMakeLists.txt create mode 100755 doc/salome/CMakeLists.txt create mode 100755 doc/salome/gui/CMakeLists.txt delete mode 100644 doc/salome/gui/input/running_salome.doc create mode 100755 doc/salome/tui/CMakeLists.txt create mode 100755 idl/CMakeLists.txt create mode 100755 resources/CMakeLists.txt create mode 100755 src/CAF/CMakeLists.txt create mode 100755 src/CAM/CMakeLists.txt create mode 100755 src/CASCatch/CMakeLists.txt create mode 100755 src/CMakeLists.txt create mode 100755 src/DDS/CMakeLists.txt create mode 100755 src/Event/CMakeLists.txt create mode 100755 src/GLViewer/CMakeLists.txt create mode 100755 src/GUI_PY/CMakeLists.txt create mode 100755 src/GuiHelpers/CMakeLists.txt create mode 100755 src/GuiHelpers/SalomeGuiHelpers.hxx create mode 100755 src/LightApp/CMakeLists.txt create mode 100755 src/LogWindow/CMakeLists.txt create mode 100755 src/OBJECT/CMakeLists.txt create mode 100755 src/OCCViewer/CMakeLists.txt create mode 100644 src/ObjBrowser/CMakeLists.txt create mode 100755 src/OpenGLUtils/CMakeLists.txt create mode 100755 src/Plot2d/CMakeLists.txt create mode 100755 src/Prs/CMakeLists.txt create mode 100755 src/PyConsole/CMakeLists.txt create mode 100755 src/PyInterp/CMakeLists.txt create mode 100755 src/QDS/CMakeLists.txt create mode 100755 src/Qtx/CMakeLists.txt create mode 100755 src/QxGraph/CMakeLists.txt create mode 100755 src/QxScene/CMakeLists.txt create mode 100755 src/ResExporter/CMakeLists.txt create mode 100755 src/SALOME_PY/CMakeLists.txt create mode 100755 src/SALOME_PYQT/CMakeLists.txt create mode 100755 src/SALOME_PYQT/SALOME_PYQT_GUI/CMakeLists.txt create mode 100755 src/SALOME_PYQT/SALOME_PYQT_GUILight/CMakeLists.txt create mode 100755 src/SALOME_PYQT/SalomePyQt/CMakeLists.txt create mode 100755 src/SALOME_SWIG/CMakeLists.txt create mode 100755 src/SOCC/CMakeLists.txt create mode 100755 src/SPlot2d/CMakeLists.txt create mode 100755 src/STD/CMakeLists.txt create mode 100644 src/SUIT/CMakeLists.txt create mode 100755 src/SUITApp/CMakeLists.txt create mode 100755 src/SUPERVGraph/CMakeLists.txt create mode 100755 src/SVTK/CMakeLists.txt create mode 100644 src/SVTK/SVTK_Utils.cxx create mode 100644 src/SVTK/SVTK_Utils.h create mode 100755 src/SalomeApp/CMakeLists.txt create mode 100755 src/SalomeApp/Test/CMakeLists.txt create mode 100755 src/SalomeApp/pluginsdemo/CMakeLists.txt create mode 100755 src/Session/CMakeLists.txt create mode 100755 src/Style/CMakeLists.txt create mode 100755 src/TOOLSGUI/CMakeLists.txt create mode 100755 src/TreeData/CMakeLists.txt create mode 100755 src/TreeData/Test/CMakeLists.txt create mode 100755 src/VTKViewer/CMakeLists.txt create mode 100755 src/ViewerTools/CMakeLists.txt create mode 100755 tools/CMakeLists.txt create mode 100755 tools/vtkEDFOverloads/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100755 index 000000000..3284c0519 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,128 @@ +# Copyright (C) 2012 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. +# +# 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 +# + +CMAKE_MINIMUM_REQUIRED(VERSION 2.4.7 FATAL_ERROR) + +IF(COMMAND cmake_policy) + cmake_policy(SET CMP0003 NEW) +ENDIF(COMMAND cmake_policy) + +# Temporary definitions +SET(DOXYGEN_IS_OK 0) +IF(WINDOWS) + SET(CPPUNIT_IS_OK 0) +ENDIF(WINDOWS) +SET(GUI_ENABLE_CORBA ON) +SET(ENABLE_VTKVIEWER ON) +SET(ENABLE_SALOMEOBJECT ON) +SET(ENABLE_OCCVIEWER ON) +SET(ENABLE_GLVIEWER ON) +SET(ENABLE_PLOT2DVIEWER ON) +SET(ENABLE_PYCONSOLE ON) +SET(ENABLE_SUPERVGRAPHVIEWER ON) +SET(ENABLE_QXGRAPHVIEWER ON) + +ENABLE_TESTING() +SET(VERSION "6.5.0") +SET(VERSION_DEV "1") + +SET(KERNEL_ROOT_DIR $ENV{KERNEL_ROOT_DIR}) +IF(KERNEL_ROOT_DIR) + STRING(REPLACE "\\" "/" KERNEL_ROOT_DIR ${KERNEL_ROOT_DIR}) + INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindPLATFORM.cmake) + INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindPYTHON.cmake) + INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindOMNIORB.cmake) + INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindPTHREADS.cmake) + INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindMPI.cmake) + INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindHDF5.cmake) + INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindBOOST.cmake) + INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindLIBXML2.cmake) + INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindSWIG.cmake) + INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindCPPUNIT.cmake) + INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindDOXYGEN.cmake) + INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindLIBBATCH.cmake) + INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindKERNEL.cmake) +ENDIF(KERNEL_ROOT_DIR) + +INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/FindCAS.cmake) +INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/FindQT4.cmake) +INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/FindOPENGL.cmake) +INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/FindVTK.cmake) +INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/FindQWT.cmake) +INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/FindSIPPYQT.cmake) + +EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "import sys; t=sys.argv[-1].split(\".\") ; t[:]=(int(elt) for elt in t) ; sys.stdout.write(\"0x%02x%02x%02x\"%tuple(t))" ${VERSION} + OUTPUT_VARIABLE XVERSION) + +SET(GUI_salomebin_BINS bin/salome) + +SET(GUI_salomelib_LIBS lib/salome) +SET(GUI_paraviewlib_LIBS lib/paraview) + +SET(GUI_salomeinclude_HEADERS include/salome) + +SET(GUI_salomeres_DATA share/salome/resources/gui) + +SET(GUI_salomeres_SCRIPTS share/salome/resources/gui) + +SET(GUI_salomepluginsdir share/salome/plugins/gui) + +SET(GUI_salomescript_SCRIPTS bin/salome) + +SET(GUI_salomescript_DATA bin/salome) + +SET(GUI_salomescript_PYTHON bin/salome) +SET(KERNEL_salomescript_PYTHON ${GUI_salomescript_PYTHON}) + +SET(GUI_appliskel_SCRIPTS bin/salome/appliskel) + +SET(GUI_appliskel_PYTHON bin/salome/appliskel) + +SET(GUI_pythondir lib/python${PYTHON_VERSION}/site-packages) + +SET(GUI_salomepythondir ${GUI_pythondir}/salome) +SET(KERNEL_salomepythondir ${GUI_salomepythondir}) + +SET(GUI_sharedpkgpython_PYTHON ${GUI_salomepythondir}/shared_modules) + +SET(GUI_admlocalcmake adm_local/cmake_files) + +SET(IDLDIR) +IF(GUI_ENABLE_CORBA) + SET(IDLDIR idl) +ENDIF(GUI_ENABLE_CORBA) + +SET(SUBDIRS + ${IDLDIR} + adm_local + resources + src + doc + bin + tools +) +FOREACH(dir ${SUBDIRS}) + ADD_SUBDIRECTORY(${dir}) +ENDFOREACH(dir ${SUBDIRS}) + +SET(input ${CMAKE_CURRENT_SOURCE_DIR}/GUI_version.h.in) +SET(output ${CMAKE_CURRENT_BINARY_DIR}/GUI_version.h) +MESSAGE(STATUS "Creation of ${output}") +CONFIGURE_FILE(${input} ${output} @ONLY) +INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/GUI_version.h DESTINATION ${GUI_salomeinclude_HEADERS}) diff --git a/adm_local/CMakeLists.txt b/adm_local/CMakeLists.txt new file mode 100755 index 000000000..846d58409 --- /dev/null +++ b/adm_local/CMakeLists.txt @@ -0,0 +1,24 @@ +# Copyright (C) 2007-2012 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. +# +# 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 +# + +ADD_SUBDIRECTORY(unix) +ADD_SUBDIRECTORY(cmake_files) diff --git a/adm_local/cmake_files/CMakeLists.txt b/adm_local/cmake_files/CMakeLists.txt new file mode 100755 index 000000000..e3f73dcfc --- /dev/null +++ b/adm_local/cmake_files/CMakeLists.txt @@ -0,0 +1,35 @@ +# Copyright (C) 2012 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. +# +# 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 +# + +# =============================================================== +# Files to be installed +# =============================================================== + +# These files are data, module or lib files +SET(DATA + FindCAS.cmake + FindOPENGL.cmake + FindQT4.cmake + UseQT4EXT.cmake + FindQWT.cmake + FindSIPPYQT.cmake + FindVTK.cmake + FindGUI.cmake +) +INSTALL(FILES ${DATA} DESTINATION ${GUI_admlocalcmake}) \ No newline at end of file diff --git a/adm_local/cmake_files/FindGUI.cmake b/adm_local/cmake_files/FindGUI.cmake index fa255f786..eb3b436c6 100644 --- a/adm_local/cmake_files/FindGUI.cmake +++ b/adm_local/cmake_files/FindGUI.cmake @@ -59,3 +59,5 @@ FIND_LIBRARY(ViewerTools ViewerTools ${GUI_ROOT_DIR}/lib/salome) FIND_LIBRARY(VTKViewer VTKViewer ${GUI_ROOT_DIR}/lib/salome) FIND_LIBRARY(vtkEDFOverloads vtkEDFOverloads ${GUI_ROOT_DIR}/lib/paraview) FIND_LIBRARY(vtkTools vtkTools ${GUI_ROOT_DIR}/lib/salome) +FIND_LIBRARY(SalomeGuiHelpers SalomeGuiHelpers ${GUI_ROOT_DIR}/lib/salome) +FIND_LIBRARY(SalomeTreeData SalomeTreeData ${GUI_ROOT_DIR}/lib/salome) diff --git a/adm_local/cmake_files/FindQT4.cmake b/adm_local/cmake_files/FindQT4.cmake index bf713c01f..10419225b 100644 --- a/adm_local/cmake_files/FindQT4.cmake +++ b/adm_local/cmake_files/FindQT4.cmake @@ -19,14 +19,17 @@ INCLUDE(FindQt4) INCLUDE(UseQt4) +SET(QT_INCLUDE_DIRS ${QT_INCLUDES}) SET(DIRS) FOREACH(D ${QT_INCLUDES}) SET(DIRS ${DIRS} -I${D}) ENDFOREACH(D ${QT_INCLUDES}) -SET(QT_INCLUDES ${DIRS}) -SET(QT_INCLUDES ${QT_INCLUDES} -DQT_THREAD_SUPPORT) +SET(QT_INCLUDES ${DIRS}) # to be removed +SET(QT_INCLUDES ${QT_INCLUDES} -DQT_THREAD_SUPPORT) # to be removed +SET(QT_DEFINITIONS -DQT_THREAD_SUPPORT) SET(QT_MT_LIBS ${QT_LIBRARIES} ${QT_QTXML_LIBRARY} ${QT_QTOPENGL_LIBRARY} ${QT_QTWEBKIT_LIBRARY}) SET(QT_LIBS ${QT_MT_LIBS}) SET(qt4_ldflags ${QT_MT_LIBS}) +SET(QT_LIBS ${QT_MT_LIBS}) FIND_PROGRAM(QT_LRELEASE_EXECUTABLE lrelease) diff --git a/adm_local/cmake_files/FindQWT.cmake b/adm_local/cmake_files/FindQWT.cmake index 186341267..ba089e828 100644 --- a/adm_local/cmake_files/FindQWT.cmake +++ b/adm_local/cmake_files/FindQWT.cmake @@ -17,15 +17,17 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -SET(QWTHOME $ENV{QWTHOME}) +FILE(TO_CMAKE_PATH $ENV{QWTHOME} QWTHOME) IF(NOT QWTHOME) SET(QWTHOME /usr) ENDIF(NOT QWTHOME) FIND_PATH(QWT_INCLUDE_DIR qwt_plot.h PATHS ${QWTHOME}/include ${QWTHOME}/include/qwt) -SET(QWT_INCLUDES -I${QWT_INCLUDE_DIR}) +SET(QWT_INCLUDES -I${QWT_INCLUDE_DIR}) # to remove +SET(QWT_INCLUDE_DIRS ${QWT_INCLUDE_DIR}) IF(WINDOWS) -SET(QWT_INCLUDES ${QWT_INCLUDES} -DQWT_DLL) +SET(QWT_INCLUDES ${QWT_INCLUDES} -DQWT_DLL) # to remove +SET(QWT_DEFINITIONS "-DQWT_DLL") ENDIF(WINDOWS) IF(WINDOWS) @@ -35,5 +37,5 @@ ELSE(CMAKE_BUILD_TYPE STREQUAL Debug) FIND_LIBRARY(QWT_LIBS qwt5 ${QWTHOME}/lib) ENDIF(CMAKE_BUILD_TYPE STREQUAL Debug) ELSE(WINDOWS) -FIND_LIBRARY(QWT_LIBS qwt PATHS ${QWTHOME}/lib ${QWTHOME}/lib64) +FIND_LIBRARY(QWT_LIBS qwt HINTS ${QWTHOME} PATH_SUFFIXES lib lib64) ENDIF(WINDOWS) diff --git a/adm_local/cmake_files/FindSIPPYQT.cmake b/adm_local/cmake_files/FindSIPPYQT.cmake index 6a76d6a7e..e9f5e55d8 100644 --- a/adm_local/cmake_files/FindSIPPYQT.cmake +++ b/adm_local/cmake_files/FindSIPPYQT.cmake @@ -25,9 +25,11 @@ GET_FILENAME_COMPONENT(SIP_ROOT ${SIP_ROOT} PATH) GET_FILENAME_COMPONENT(SIP_ROOT ${SIP_ROOT} PATH) ENDIF(SIP_ROOT) -SET(SIP_INCLUDES -I${SIP_ROOT}/include/python${PYTHON_VERSION}) +SET(SIP_INCLUDES -I${SIP_ROOT}/include/python${PYTHON_VERSION}) # to be removed +SET(SIP_INCLUDE_DIRS ${SIP_ROOT}/include/python${PYTHON_VERSION}) IF(WINDOWS) - SET(SIP_INCLUDES ${SIP_INCLUDES} -I${SIP_ROOT}/include) + SET(SIP_INCLUDES ${SIP_INCLUDES} -I${SIP_ROOT}/include) # to be removed + SET(SIP_INCLUDE_DIRS ${SIP_INCLUDE_DIRS} ${SIP_ROOT}/include) ENDIF(WINDOWS) IF(WINDOWS) diff --git a/adm_local/cmake_files/UseQT4EXT.cmake b/adm_local/cmake_files/UseQT4EXT.cmake index e3a8605c4..0a0949ce2 100644 --- a/adm_local/cmake_files/UseQT4EXT.cmake +++ b/adm_local/cmake_files/UseQT4EXT.cmake @@ -32,7 +32,8 @@ MACRO(QT4_INSTALL_TS_RESOURCES MYTSFILES WHERETOINSTALL) INSTALL(CODE "SET(INSTALL_TS_DIR ${WHERETOINSTALL})") SET(MYSOURCES) FOREACH(input ${MYTSFILES}) - STRING(REGEX REPLACE ".ts" "" base ${input}) + GET_FILENAME_COMPONENT(input2 ${input} NAME) + STRING(REGEX REPLACE ".ts" "" base ${input2}) SET(output "${base}.qm") INSTALL(CODE "QT4_COMPILE_TS_ON_INSTALL( \"${QT_LRELEASE_EXECUTABLE}\" \"${CMAKE_CURRENT_SOURCE_DIR}/${input}\" \"${CMAKE_INSTALL_PREFIX}/\${INSTALL_TS_DIR}\" ${output})") ENDFOREACH(input ${MYIDLFILES}) diff --git a/adm_local/unix/CMakeLists.txt b/adm_local/unix/CMakeLists.txt new file mode 100755 index 000000000..b793cd81c --- /dev/null +++ b/adm_local/unix/CMakeLists.txt @@ -0,0 +1,20 @@ +# Copyright (C) 2012 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. +# +# 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 +# + +ADD_SUBDIRECTORY(config_files) diff --git a/adm_local/unix/config_files/CMakeLists.txt b/adm_local/unix/config_files/CMakeLists.txt new file mode 100755 index 000000000..49680d874 --- /dev/null +++ b/adm_local/unix/config_files/CMakeLists.txt @@ -0,0 +1,45 @@ +# Copyright (C) 2007-2012 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. +# +# 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 +# + +SET(dist_admlocalm4_DATA + check_disable_Corba.m4 + check_GLViewer.m4 + check_GUI.m4 + check_msg2qm.m4 + check_OCCViewer.m4 + check_opengl.m4 + check_Plot2dViewer.m4 + check_PyConsole.m4 + check_pyqt.m4 + check_qt.m4 + check_qwt.m4 + check_SalomeObject.m4 + check_sip.m4 + check_SupervGraphViewer.m4 + check_VTKViewer.m4 + check_QxGraphViewer.m4 + check_TestRecorder.m4 + check_salome_version.m4 +) + +FOREACH(f ${dist_admlocalm4_DATA}) + SET(DEST adm_local/unix/config_files) + INSTALL(FILES ${f} DESTINATION ${DEST}) +ENDFOREACH(f ${dist_admlocalm4_DATA}) diff --git a/bin/CMakeLists.txt b/bin/CMakeLists.txt new file mode 100755 index 000000000..b31d05bf1 --- /dev/null +++ b/bin/CMakeLists.txt @@ -0,0 +1,31 @@ +# Copyright (C) 2012 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. +# +# 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(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/SalomeMacros.cmake) + +CONFIGURE_FILE(VERSION.in VERSION @ONLY) + +INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/VERSION DESTINATION ${GUI_salomebin_BINS}) + +# =============================================================== +# Files to be installed +# =============================================================== + +SET(SCRIPTS runLightSalome.csh runLightSalome.sh gui_setenv.py) +SALOME_INSTALL_SCRIPTS("${SCRIPTS}" ${GUI_salomescript_SCRIPTS}) diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt new file mode 100755 index 000000000..49f4248e5 --- /dev/null +++ b/doc/CMakeLists.txt @@ -0,0 +1,23 @@ +# Copyright (C) 2007-2012 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. +# +# 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 +# + +ADD_SUBDIRECTORY(salome) diff --git a/doc/salome/CMakeLists.txt b/doc/salome/CMakeLists.txt new file mode 100755 index 000000000..4f305c803 --- /dev/null +++ b/doc/salome/CMakeLists.txt @@ -0,0 +1,28 @@ +# Copyright (C) 2007-2012 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. +# +# 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 +# + +SET(SUBDIRS + tui + gui +) +FOREACH(dir ${SUBDIRS}) + ADD_SUBDIRECTORY(${dir}) +ENDFOREACH(dir ${SUBDIRS}) + diff --git a/doc/salome/gui/CMakeLists.txt b/doc/salome/gui/CMakeLists.txt new file mode 100755 index 000000000..2ea1bad1e --- /dev/null +++ b/doc/salome/gui/CMakeLists.txt @@ -0,0 +1,57 @@ +# Copyright (C) 2007-2012 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. +# +# 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 +# + +SET(top_builddir + ${CMAKE_BINARY_DIR} +) +SET(top_srcdir + ${CMAKE_SOURCE_DIR} +) +SET(srcdir + ${CMAKE_CURRENT_SOURCE_DIR} +) +SET(builddir + ${CMAKE_CURRENT_BINARY_DIR} +) +SET(datadir + ${CMAKE_INSTALL_PREFIX}/share +) +SET(docdir + ${datadir}/doc/salome +) + + +SET(input ${CMAKE_CURRENT_SOURCE_DIR}/doxyfile.in) +SET(output ${CMAKE_CURRENT_BINARY_DIR}/doxyfile) +MESSAGE(STATUS "Creation of ${output}") +CONFIGURE_FILE(${input} ${output}) + +SET(input ${CMAKE_CURRENT_SOURCE_DIR}/static/header.html.in) +SET(output ${CMAKE_CURRENT_BINARY_DIR}/static/header.html) +MESSAGE(STATUS "Creation of ${output}") +CONFIGURE_FILE(${input} ${output}) + +ADD_CUSTOM_TARGET(usr_docs ${DOXYGEN_EXECUTABLE} + COMMAND ${PYTHON_EXECUTABLE} -c "import shutil, sys; shutil.rmtree(r'''${CMAKE_INSTALL_PREFIX}/share/doc/salome/gui/GUI''', True); shutil.copytree(r'''${CMAKE_CURRENT_BINARY_DIR}/GUI''', r'''${CMAKE_INSTALL_PREFIX}/share/doc/salome/gui/GUI'''); shutil.copy(r'''${CMAKE_CURRENT_SOURCE_DIR}/images/head.png''', r'''${CMAKE_INSTALL_PREFIX}/share/doc/salome/gui/GUI''')" + VERBATIM + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} +) diff --git a/doc/salome/gui/images/view2.png b/doc/salome/gui/images/view2.png index 82641a91c8fa8638f10e3a57faaf804ccbab5348..2d92abe650156facf5ee17a2bc002a4cd79ebd55 100755 GIT binary patch literal 19234 zcmeGEbypkT`vnZsPg|gPaV>=c#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3U$l_hBHQs1WOq%`h&d|K%pLmU~adBPG{bk&J3U?N$m{W9e+6K?vI zD+4?WArX78O_a3s9_g_?Q2Xk4cVAhJ`(ix)-*P`I`bkHhsw+#Pw2`{#svzJNJk5gb zw(Ru?`V*7OZr+skC{d^D%>Y3lHas0Oj#;X{JkN~nQVVKrU(8A8b1|vekE`DfwMG}S zDi#VE@PJus?B6%4o(&XT2>d7eO7{N7CJduv@bn(eLYGrm`U}JcVFSGA1RG@=BB>3M zz6i$e@^AT@+TY!+)?A#Oi+->_`DeweXF3I^F)~W6Ht`gZdjA+McO%a%3qx>e+9 zrP7UOGy%KGA7{{oljW02fyB$i<~JMk6(K$;?z1w+&D9w#EW4hv26YVNuhi0Q1KF!b z?(e?Un3Y-pMqk*4DZzQUHV6XT2Zt;TM`NJjsKcxGNnS~n&(oR_SLb8&^Rrhx?>1RN z?HF+_lVLc{vBJV13m5`L!B>#XVtw)lagpvwj^tUf#1NB?!|6jU$=hK==!uav^rM;8 z*I$G$i|_>rU##H&V+A`MbQ24czXi{K1qm{Mw|aBp&S%*simd3T{lA`;FnXVEhCp*Y-n zi43B6jPk)|;P+Yztbg#PKv44NNBve3ya#wW0SfI$L0LoXr|Xa3Ftq_ME}p;ni~hPM zqT1)P#v;C2ALaWE)M7LIy;V0D&J_Au|6omTRA+#5K~d(Zzd+g@!GSjf9=`9hHWz!i zlF-8@kP<;)8|~S@$E>ifFR2W#?7@l7VV2up3-R&LL|Nj0Lq!!CdzMrTK>~-&pz5to p8Zj?uB?p35@6pmfTN9q>7Vt@A!}{XemhmGl4r diff --git a/doc/salome/gui/input/index.doc b/doc/salome/gui/input/index.doc index f86d4028b..c306e7609 100644 --- a/doc/salome/gui/input/index.doc +++ b/doc/salome/gui/input/index.doc @@ -69,15 +69,14 @@ integrated Python console From the point of view of the \subpage salome_architecture_page "Architecture", Salome is composed of several modules. -To run salome (with different options) refer to \subpage running_salome_page page. This part of documentation on Salome also covers \subpage introduction_to_gui_page "general Salome functionalities", common for all modules, such as study management, Salome viewers, preferences, etc. + And finally, there is an additional chapter, which provides a short -guide about the \subpage tui_page "usage of Python module salome.py" to access main SALOME +guide about the \subpage tui_page "usage of SALOME GUI Python interface" to access SALOME GUI functionalities from the Python code. - */ diff --git a/doc/salome/gui/input/running_salome.doc b/doc/salome/gui/input/running_salome.doc deleted file mode 100644 index 630c5d254..000000000 --- a/doc/salome/gui/input/running_salome.doc +++ /dev/null @@ -1,110 +0,0 @@ -/*! - -\page running_salome_page Running SALOME - -To launch SALOME: -
    -
  1. Install the SALOME package into a definite directory (ex. \b SALOME) -on your hard disk. It is preferable if you use the special -installation procedure allowing to install the SALOME platform and -all corresponding applications.
  2. -
  3. The installation shell script will create a special file: -salome.csh (CShell file) in your SALOME/KERNEL directory. This file -contains all environment variables necessary for launching SALOME -platform with other application products provided with SALOME -installation package. You have a possibility to add one of them into -your profile if you enter in the command console the following:

    -source salome.csh - -Tip: During the installation procedure you have a possibility to set your profile automatically.
  4. - -
  5. Launch SALOME platform, using the following Python script located -in the SALOME/KERNEL/bin/salome directory:

    -
      -
    • \b runSalome.py [command line options] -
    -
  6. -
- -\anchor batch_mode_run - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Options

Description

--\b help or -\b hprint this help
--\b gui or -\b glaunch with GUI
--\b terminal or -\b tlaunch without GUI in batch mode
--\b logger or -\b lredirects log messages in the file logger.log
--\b file=\ or -\b f=\redirects log messages in a custom file
--\b xterm or -\b xthe servers open an xterm window and log messages are displayed in this window
--\b modules=\b module1,\b module2,... or -\b m=\b module1,\b module2,...list of SALOME modules which will be loaded into the module catalogue
--\b embedded=registry,study,moduleCatalog,cppContainer, -or -\b e=registry,study,moduleCatalog,cppContainerembedded CORBA servers (default: registry,study,moduleCatalog,cppContainer) -note that logger,pyContainer,supervContainer can't be embedded
--\b standalone=registry,study,moduleCatalog,cppContainer,pyContainer,supervContainer, or --\b s=registry,study,moduleCatalog,cppContainer,pyContainer,supervContainerstandalone CORBA servers (default: pyContainer,supervContainer)
--\b containers=cpp,python,superv -or -\b c=cpp,python,supervlaunch of cpp, python and supervision containers
--\b portkill or -\b pkill SALOME launched with the current port
--\b killall or -\b kkill SALOME
--interp=n or -i=nnumber of additional xterm to open, with session environment
-\b zdisplay splash screen
-\b rdisable centralized exception handling mechanism
- -Tip: If the \b runSalome.py script is launched without prompting -any options, they will be taken by default from the file SalomeApp.xml -(SALOME/GUI/share/salome/resources/SalomeApp.xml). If you are -constantly launching SALOME with some specific options which are -different from the defaults, you can edit this file according to your -requirements. So the next time you run SALOME, you won't have to enter -these numerous command console options. - -*/ \ No newline at end of file diff --git a/doc/salome/gui/input/salome_architecture.doc b/doc/salome/gui/input/salome_architecture.doc index f12d0e580..387c201a1 100644 --- a/doc/salome/gui/input/salome_architecture.doc +++ b/doc/salome/gui/input/salome_architecture.doc @@ -80,11 +80,6 @@ them. Additional information about CORBA technology is available at http://www.omg.org -\note In \b SALOME there is a possibility to run -definite components in the so-called \ref batch_mode_run "batch mode" without GUI provided -by GUI component. In this case you can work with these components with -the help of Python commands and scripts. -          The architecture of this all-inclusive platform for numerical components responds to the following diff --git a/doc/salome/gui/input/text_user_interface.doc b/doc/salome/gui/input/text_user_interface.doc index 0e3f61709..79bfe8000 100644 --- a/doc/salome/gui/input/text_user_interface.doc +++ b/doc/salome/gui/input/text_user_interface.doc @@ -1,303 +1,9 @@ /*! -\page tui_page Using salome.py module +\page tui_page Using SALOME GUI python interface -The Python module salome.py provides a functionality to access main -SALOME features from the Python console (either embedded in GUI -desktop or external one). -To use salome.py module, import it into the Python interpreter and -initialize it by calling \c salome_init() function: - -\code -import salome -salome.salome_init() -\endcode - -The salome.py Python module provides a set of variables and functions -allowing access to different elements of the current SALOME -session (this Python interpreter is connected to). -This page gives a short description of most useful variables and -functions. - -\li \b orb Reference to the CORBA::ORB instance - -This variable can be used to initialize different CORBA-related -elements of the SALOME session (for example, naming service, etc). -For example, to get an access to the SALOME naming service, you can -use the following commands: -\code -import SALOME_NamingServicePy -NS = SALOME_NamingServicePy.SALOME_NamingServicePy_i(salome.orb) -\endcode - -The \b orb variable is also useful when it is necessary to convert -CORBA reference object to its string representation (IOR) and vice -versa: -\code -studyIOR = salome.orb.object_to_string(salome.myStudy) -study = salome.orb.string_to_object(studyIOR) -is_same = salome.myStudy._is_equivalent(study) # is_same = True -\endcode - -\li \b naming_service SALOME naming service instance - -This variable can be used to register/find objects created in a -distributed environment. For example, to get access to the SALOME -Module Catalog server, use \c Resolve() method: -\code -import SALOME_ModuleCatalog -mc = salome.naming_service.Resolve('/Kernel/ModulCatalog') -\endcode - -Similarly, method \c Register() can be used to register objects -in the naming service: -\code -salome.naming_service.Register(myObject,'/My/Object/Path') -o = salome.naming_service.Resolve('/My/Object/Path') -is_same = myObject._is_equivalent(o) # is_same = True -\endcode - -\li \b lcc Life Cycle CORBA class instance - -This object can be used to get access to CORBA engine part of some -SALOME module, available in the current SALOME session. The following -code returns a reference to the Geometry module engine, loading it if -necessary: -\code -import GEOM -geom = salome.lcc.FindOrLoadComponent('FactoryServer', 'GEOM') -\endcode -\b Note, that in the above example, \e "FactoryServer" is a name of the -SALOME container, where Geometry module engine should be loaded. - -\li \b myStudyManager Reference to the study manager - -SALOMEDS Study manager is used to manipulate with the studies: create, -open, save, close. It also can be used to find the study by its -numerical ID or name. The code below demonstrates main -functionalities of a study manager: -\code -# create new study with the name "MyStudy" -new_study = salome.myStudyManager.NewStudy("MyStudy") - -# open study from file /home/user/MyStudy.hdf -study = salome.myStudyManager.OpenStudy("/home/user/MyStudy.hdf") - -# save study -salome.myStudyManager.Save(study, False) # not using multifile save mode - -# save study in ASCII format -salome.myStudyManager.SaveASCII(study, True) # using multifile save mode - -# save study with the new file path -salome.myStudyManager.SaveAs("/home/user/MyStudy.hdf", study, False) - -# save study with the new file path in ASCII format -salome.myStudyManager.SaveAsASCII("/home/user/MyStudy.hdf", study, False) - -# close study -salome.myStudyManager.Close(study) - -# get list of all opened studies -studies = salome.myStudyManager.GetOpenStudies() - -# find study by its numerical ID (integer value starting from 1) -study = salome.myStudyManager.GetStudyByID(studyID) - -# find study by its name -study = salome.myStudyManager.GetStudyByName("/home/user/MyStudy.hdf") - -# ... -\endcode - -\li \b myStudy Reference to the current (active) study - -This variable can be used to manipulate with the date of the study: -create data tree, assign attributes of different types to the objects -in a data tree, create references between objects, etc. - -\b Note, that the term "active" or "current" study does not make much -sense outise the GUI Python console. When working in GUI, user always -deals with one only top-level study, which desktop is currently on the -top if the windows stack. This is what is called \e "active study". -In TUI mode (without GUI or outside GUI), user has to manipulate with -studies manually; no any special control for the life cycle of the -study is done. In TUI mode, \c salome.muStudy variable is an instance -of the first study created when you call salome_init() function. - -The following code demonstrates some examples of \c salome.myStudy -variable usage. For more details please refer to the SALOMEDS.idl file -documentation. - -\code -# get study name -studyName = salome.myStudy._get_Name() - -# get study numerical ID -studyID = salome.myStudy._get_StudyId() - -# find SALOMEDS component by its type -scomponent = FindComponent("MyComponent") - -# find SALOMEDS component by its entry ID -scomponent = FindComponentID("0:1:1") # "0:1:1" is a component ID - -# find SALOMEDS object by its name (first found object is returned) -sobject = salome.myStudy.FindObject("MyObject") - -# find SALOMEDS object by its entry ID -sobject = salome.myStudy.FindObjectID() # "0:1:1:1" is an object ID - -# find SALOMEDS object by its IOR attribute -sobject = salome.myStudy.FindObjectIOR(IOR) - -# find SALOMEDS object by its path in the data tree -sobject = salome.myStudy.FindObjectByPath("/MyComponent/MyObject/MySubObject") - -# get SALOMEDS object's path in a study data tree -sobject_path = salome.myStudy.GetObjectPath(sobject) - -# get study properties -prop = salome.myStudy.GetProperties() -prop.GetCreationDate() # get creation date -prop.IsModified() # check if study has been modified (and not yet saved) -prop.SetLocked(True) # lock the study (prohibit modifications) -prop.IsLocked() # check if study is locked - -# create objects with study builder -builder = salome.myStudy.NewBuilder() # create builder -comp = builder.NewComponent("MyComponent") # create a component of the "MyComponent" type -attrName = builder.FindOrCreateAttribute(comp, "AttributeName") -attrName.SetValue("MyComponent") # set name to the component -object = builder.NewObject(comp) # create new object, a child of the component -attrName = builder.FindOrCreateAttribute(object, "AttributeName") -attrName.SetValue("MyObject") # set name to the object -attrInt = builder.FindOrCreateAttribute(object, "AttributeInteger") -attrInt.SetValue(123) # assign integer attribute to the object -attrIOR = builder.FindOrCreateAttribute(object, "AttributeIOR") -attrIOR.SetValue(IOR) # assign IOR attribute to the object (to point to some CORBA object) - -# iterate through objects of the data tree with child iterator -iter = salome.myStudy.NewChildIterator(comp) # initialize from the component -iter.InitEx(True) # init recursive mode -while iter.More(): - c = iter.Value() - print c.GetID() - iter.Next() - pass - -# ... -\endcode - -\li \b myStudyId Identifier of the current (active) study - -This variable contains the numerical identifier of the current -(active) study. It is an equivalent of \c -salome.myStudy._get_StudyId() code. - -\li \b myStudyName Name of the current (active) study - -This variable contains the name of the current (active) study. It is -an equivalent of \c salome.myStudy._get_Name() code. - -\li \b DumpStudy() Print study contents - -This function prints the study data object tree to the terminal -window. The output for each object includes its entry ID, name, IOR -(if there is one) and referenced object ID (for references). I.e. -this is the same data the user can see in the Object Browser columns. -\code -salome.DumpStudy(salome.myStudy) -\endcode - -\li \b IDToSObject() Get SALOMEDS object by its entry ID. - -This function checks if the SObject with the specified entry ID exists -in the current study and returns it. Otherwise \c None is returned. -\code -sobject = salome.IDToSObject("0:1:1:1") # "0:1:1:1" is an object ID -\endcode -Actually this function is just a shortcut to the following code: -\code -sobject = salome.myStudy.FindObjectID("0:1:1:1") -\endcode - -\li \b IDToObject() Get CORBA object by its entry ID. - -This function checks if the SObject with the specified entry ID exists -in the current study, then retrieves IOR attribute from it and, -finally, if IOR is not empty, returns CORBA object corresponding to -the found SObject: -\code -object = salome.IDToObject("0:1:1:1") # "0:1:1:1" is an object ID -\endcode -Actually this function is just a shortcut to the following code: -\code -sobject = salome.myStudy.FindObjectID("0:1:1:1") -if sobject: - object = sobject.GetObject() -else: - object = None -\endcode - -\li \b ObjectToSObject() Get SALOMEDS object corresponding to the -CORBA object. - -This function finds an object in the current study which corresponds -to the specified CORBA object (i.e. it has IOR attribute, pointing to -the CORBA object). If there is no corresponding SALOMEDS object in the -study, \c None is returned: -\code -sobject = salome.ObjectToSObject(object) -\endcode -Actually this function is just a shortcut to the following code: -\code -ior = salome.orb.object_to_string(object) -sobject = salome.myStudy.FindObjectIOR(ior) -\endcode - -\li \b ObjectToID() Get SALOMEDS object entry ID corresponding to the -CORBA object. - -This function finds an object in the current study which corresponds -to the specified CORBA object (i.e. it has IOR attribute, pointing to -the CORBA object). If the object is found, its entry ID is returned, -otherwise empty string is returned: -\code -entry = salome.ObjectToID(object) -\endcode -Actually this function is just a shortcut to the following code: -\code -ior = salome.orb.object_to_string(object) -sobject = salome.myStudy.FindObjectIOR(ior) -if sobject: - entry = sobject.GetID() -else: - entry = "" -\endcode - -\li \b createNewStudy() Create new study - -This function can be used to create new SALOME study. Returns an ID of -the created study. -\code -studyId = salome.createNewStudy() -study = salome.myStudyManager.GetStudyByID(s) -\endcode - -\li \b generateName() Generate unique name - -This function adds random numerical suffix to the passed string -parameter ("Study" by default) and returns the resulting string: -\code -name_1 = salome.generateName() # name_1 is something like "Study682" -name_1 = salome.generateName("Obj") # name_1 is something like "Obj32" -\endcode - -\li \b sg SWIG interface to the SALOME GUI - -This variable provides an access to some GUI functions. +The extended salome.py Python module provides a \b sg variable, this variable provides an access to some GUI functions. \b Note, that this variable is not available if you use salome.py Python module outside the GUI desktop, i.e. not in the embedded Python diff --git a/doc/salome/tui/CMakeLists.txt b/doc/salome/tui/CMakeLists.txt new file mode 100755 index 000000000..0674e5363 --- /dev/null +++ b/doc/salome/tui/CMakeLists.txt @@ -0,0 +1,57 @@ +# Copyright (C) 2007-2012 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. +# +# 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 +# + +SET(top_builddir + ${CMAKE_BINARY_DIR} +) +SET(top_srcdir + ${CMAKE_SOURCE_DIR} +) +SET(srcdir + ${CMAKE_CURRENT_SOURCE_DIR} +) +SET(builddir + ${CMAKE_CURRENT_BINARY_DIR} +) +SET(datadir + ${CMAKE_INSTALL_PREFIX}/share +) +SET(docdir +${datadir}/doc/salome +) + +SET(input ${CMAKE_CURRENT_SOURCE_DIR}/doxyfile.in) +SET(output ${CMAKE_CURRENT_BINARY_DIR}/doxyfile) +MESSAGE(STATUS "Creation of ${output}") +CONFIGURE_FILE(${input} ${output}) + +SET(input ${CMAKE_CURRENT_SOURCE_DIR}/static/header.html.in) +SET(output ${CMAKE_CURRENT_BINARY_DIR}/static/header.html) +MESSAGE(STATUS "Creation of ${output}") +CONFIGURE_FILE(${input} ${output}) + +ADD_CUSTOM_TARGET(dev_docs ${DOXYGEN_EXECUTABLE} + COMMAND ${PYTHON_EXECUTABLE} -c "import shutil, sys; shutil.rmtree(r'''${CMAKE_INSTALL_PREFIX}/share/doc/salome/tui/GUI''', True); shutil.copytree(r'''${CMAKE_CURRENT_BINARY_DIR}/GUI''', r'''${CMAKE_INSTALL_PREFIX}/share/doc/salome/tui/GUI'''); shutil.copy(r'''${CMAKE_CURRENT_SOURCE_DIR}/images/head.png''', r'''${CMAKE_INSTALL_PREFIX}/share/doc/salome/tui/GUI''')" + VERBATIM + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} +) + diff --git a/idl/CMakeLists.txt b/idl/CMakeLists.txt new file mode 100755 index 000000000..82e0c8fe9 --- /dev/null +++ b/idl/CMakeLists.txt @@ -0,0 +1,46 @@ +# Copyright (C) 2012 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. +# +# 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(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/UseOMNIORB.cmake) + +INCLUDE_DIRECTORIES( + ${OMNIORB_INCLUDE_DIRS} + ${KERNEL_ROOT_DIR}/include/salome + ${CMAKE_CURRENT_BINARY_DIR} +) + +SET(SalomeIDLGUI_IDLSOURCES + SalomeApp_Engine.idl +) + +SET(IDL_INCLUDE_DIRS + ${CMAKE_CURRENT_SOURCE_DIR} + ${KERNEL_ROOT_DIR}/idl/salome +) + +SET(TYPE SHARED) +IF(WINDOWS) + SET(TYPE STATIC) +ENDIF(WINDOWS) + +OMNIORB_ADD_MODULE(SalomeIDLGUI "${SalomeIDLGUI_IDLSOURCES}" "${IDL_INCLUDE_DIRS}" ${TYPE}) +TARGET_LINK_LIBRARIES(SalomeIDLGUI ${CORBA_LIBS}) +SET_TARGET_PROPERTIES(SalomeIDLGUI PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS}") + +INSTALL(TARGETS SalomeIDLGUI DESTINATION ${GUI_salomelib_LIBS}) diff --git a/resources/CMakeLists.txt b/resources/CMakeLists.txt new file mode 100755 index 000000000..7760cce18 --- /dev/null +++ b/resources/CMakeLists.txt @@ -0,0 +1,24 @@ +# Copyright (C) 2007-2012 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. +# +# 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 +# + +# add resource files here ... +# diff --git a/src/CAF/CMakeLists.txt b/src/CAF/CMakeLists.txt new file mode 100755 index 000000000..56f7db31b --- /dev/null +++ b/src/CAF/CMakeLists.txt @@ -0,0 +1,62 @@ +# Copyright (C) 2012 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. +# +# 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(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/UseQT4EXT.cmake) + +INCLUDE_DIRECTORIES( + ${PTHREAD_INCLUDE_DIRS} + ${CAS_INCLUDE_DIRS} + ${KERNEL_ROOT_DIR}/include/salome + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/../Qtx + ${CMAKE_CURRENT_SOURCE_DIR}/../SUIT + ${CMAKE_CURRENT_SOURCE_DIR}/../STD +) + +SET(COMMON_LIBS + qtx + suit + std + ${QT_MT_LIBS} + ${CAS_OCAF} + ${CAS_OCAFVIS} +) + +SET(GUI_HEADERS CAF_Application.h CAF_Operation.h CAF_Study.h) +QT4_WRAP_CPP(GUI_HEADERS ${GUI_HEADERS}) +SET(caf_SOURCES + CAF_Application.cxx + CAF_Operation.cxx + CAF_Study.cxx + CAF_Tools.cxx +) + +SET(GUITS_SOURCES + resources/CAF_msg_en.ts + resources/CAF_msg_fr.ts +) + +ADD_LIBRARY(caf SHARED ${caf_SOURCES} ${GUI_HEADERS}) +SET_TARGET_PROPERTIES(caf PROPERTIES COMPILE_FLAGS "${CAS_DEFINITIONS} ${QT_DEFINITIONS} ${PLATFORM_DEFINITIONS}") +TARGET_LINK_LIBRARIES(caf ${COMMON_LIBS}) +INSTALL(TARGETS caf DESTINATION ${GUI_salomelib_LIBS}) + +FILE(GLOB COMMON_HEADERS_H "${CMAKE_CURRENT_SOURCE_DIR}/*.h") +INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${GUI_salomeinclude_HEADERS}) +QT4_INSTALL_TS_RESOURCES("${GUITS_SOURCES}" "${GUI_salomeres_DATA}") diff --git a/src/CAM/CMakeLists.txt b/src/CAM/CMakeLists.txt new file mode 100755 index 000000000..b79fea069 --- /dev/null +++ b/src/CAM/CMakeLists.txt @@ -0,0 +1,62 @@ +# Copyright (C) 2012 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. +# +# 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(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/UseQT4EXT.cmake) + +INCLUDE_DIRECTORIES( + ${QT_INCLUDE_DIRS} + ${KERNEL_ROOT_DIR}/include/salome + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_BINARY_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/../Qtx + ${CMAKE_CURRENT_SOURCE_DIR}/../SUIT + ${CMAKE_CURRENT_SOURCE_DIR}/../STD +) + +SET(COMMON_LIBS + qtx + suit + std + ${QT_MT_LIBS} +) + +SET(CAM_HEADERS CAM_Application.h CAM_Module.h CAM_Study.h CAM_DataModel.h) +QT4_WRAP_CPP(CAM_HEADERS_MOC ${CAM_HEADERS}) + +SET(CAM_SOURCES + CAM_Application.cxx + CAM_DataModel.cxx + CAM_DataObject.cxx + CAM_Module.cxx + CAM_Study.cxx +) + +SET(CAMTS_SOURCES + resources/CAM_msg_en.ts + resources/CAM_msg_fr.ts +) + +ADD_LIBRARY(CAM SHARED ${CAM_SOURCES} ${CAM_HEADERS_MOC}) +SET_TARGET_PROPERTIES(CAM PROPERTIES COMPILE_FLAGS "${QT_DEFINITIONS} ${PLATFORM_DEFINITIONS}") +TARGET_LINK_LIBRARIES(CAM ${COMMON_LIBS}) +INSTALL(TARGETS CAM DESTINATION ${GUI_salomelib_LIBS}) + +FILE(GLOB COMMON_HEADERS_H "${CMAKE_CURRENT_SOURCE_DIR}/*.h") +INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${GUI_salomeinclude_HEADERS}) +QT4_INSTALL_TS_RESOURCES("${CAMTS_SOURCES}" "${GUI_salomeres_DATA}") diff --git a/src/CASCatch/CMakeLists.txt b/src/CASCatch/CMakeLists.txt new file mode 100755 index 000000000..969295192 --- /dev/null +++ b/src/CASCatch/CMakeLists.txt @@ -0,0 +1,38 @@ +# Copyright (C) 2012 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. +# +# 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_DIRECTORIES( + ${PTHREAD_INCLUDE_DIRS} + ${CAS_INCLUDE_DIRS} +) + +SET(CASCatch_SOURCES + CASCatch_CatchSignals.cxx + CASCatch_ErrorHandler.cxx + CASCatch_Failure.cxx +) + +ADD_LIBRARY(CASCatch SHARED ${CASCatch_SOURCES}) +SET_TARGET_PROPERTIES(CASCatch PROPERTIES COMPILE_FLAGS "${CAS_DEFINITIONS} ${PLATFORM_DEFINITIONS}") +TARGET_LINK_LIBRARIES(CASCatch ${CAS_KERNEL}) +INSTALL(TARGETS CASCatch DESTINATION ${GUI_salomelib_LIBS}) + +FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx") +INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${GUI_salomeinclude_HEADERS}) + diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt new file mode 100755 index 000000000..fe69daed1 --- /dev/null +++ b/src/CMakeLists.txt @@ -0,0 +1,165 @@ +# Copyright (C) 2012 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. +# +# 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 +# + +## +# Common packages +## +SET(SUBDIRS_COMMON + CASCatch + Qtx + Style + DDS + QDS + ObjBrowser + SUIT + SUITApp + STD + CAF + CAM + LogWindow + Prs + Event + OpenGLUtils + GUI_PY +) + +## +# SALOME object +## +IF(ENABLE_SALOMEOBJECT) + SET(SUBDIRS_OBJECT OBJECT) +ENDIF(ENABLE_SALOMEOBJECT) + +## +# GL viewer +## +IF(ENABLE_GLVIEWER) + SET(SUBDIRS_GLVIEWER GLViewer) +ENDIF(ENABLE_GLVIEWER) + +## +# VTK viewer +## +IF(ENABLE_VTKVIEWER) + SET(SUBDIRS_VTKVIEWER VTKViewer) + + IF(ENABLE_SALOMEOBJECT) + SET(SUBDIRS_VTKVIEWER ${SUBDIRS_VTKVIEWER} SVTK) + SET(SUBDIRS_VIEWERTOOLSViewerTools) + ENDIF(ENABLE_SALOMEOBJECT) +ENDIF(ENABLE_VTKVIEWER) + +## +# OCC viewer +## +IF(ENABLE_OCCVIEWER) + SET(SUBDIRS_OCCVIEWER OCCViewer) + SET(SUBDIRS_VIEWERTOOLS ViewerTools) + + IF(ENABLE_SALOMEOBJECT) + SET(SUBDIRS_OCCVIEWER ${SUBDIRS_OCCVIEWER} SOCC) + ENDIF(ENABLE_SALOMEOBJECT) +ENDIF(ENABLE_OCCVIEWER) + +## +# Plot2d viewer +## +IF(ENABLE_PLOT2DVIEWER) + SET(SUBDIRS_PLOT2DVIEWER Plot2d) + + IF(ENABLE_SALOMEOBJECT) + SET(SUBDIRS_PLOT2DVIEWER ${SUBDIRS_PLOT2DVIEWER} SPlot2d) + ENDIF(ENABLE_SALOMEOBJECT) +ENDIF(ENABLE_PLOT2DVIEWER) + +## +# SUPERV graph viewer +## +IF(ENABLE_SUPERVGRAPHVIEWER) + SET(SUBDIRS_SUPERVGRAPHVIEWER SUPERVGraph) +ENDIF(ENABLE_SUPERVGRAPHVIEWER) + +## +# Qx scene viewer +## +###VSR: QxGraph has been replaced by QxScene +###SUBDIRS_QXGRAPHVIEWER = QxGraph +IF(ENABLE_QXGRAPHVIEWER) + SET(SUBDIRS_QXGRAPHVIEWER QxScene) +ENDIF(ENABLE_QXGRAPHVIEWER) + +## +# Python console (base) +## +IF(ENABLE_PYCONSOLE) + SET(SUBDIRS_PYCONSOLE PyInterp PyConsole) +ENDIF(ENABLE_PYCONSOLE) + +## +# Light SALOME packages +## +SET(SUBDIRS_LIGHT + LightApp + ResExporter +) + +## +# Full (CORBA) SALOME packages +## +IF(GUI_ENABLE_CORBA) + SET(SUBDIRS_CORBA + TOOLSGUI + Session + SalomeApp + GuiHelpers + TreeData + ) +ENDIF(GUI_ENABLE_CORBA) + +## +# Extra Python packages +## +IF(ENABLE_PYCONSOLE) + SET(SUBDIRS_PY_LIGHT + SALOME_SWIG + SALOME_PY + SALOME_PYQT + ) +ENDIF(ENABLE_PYCONSOLE) + +SET(SUBDIRS + ${SUBDIRS_COMMON} + ${SUBDIRS_OBJECT} + ${SUBDIRS_VIEWERTOOLS} + ${SUBDIRS_GLVIEWER} + ${SUBDIRS_VTKVIEWER} + ${SUBDIRS_OCCVIEWER} + ${SUBDIRS_PLOT2DVIEWER} + ${SUBDIRS_SUPERVGRAPHVIEWER} + ${SUBDIRS_QXGRAPHVIEWER} + ${SUBDIRS_PYCONSOLE} + ${SUBDIRS_LIGHT} + ${SUBDIRS_CORBA} + ${SUBDIRS_PY_LIGHT} +) + +FOREACH(dir ${SUBDIRS}) + ADD_SUBDIRECTORY(${dir}) +ENDFOREACH(dir ${SUBDIRS}) + diff --git a/src/DDS/CMakeLists.txt b/src/DDS/CMakeLists.txt new file mode 100755 index 000000000..79fe985f8 --- /dev/null +++ b/src/DDS/CMakeLists.txt @@ -0,0 +1,43 @@ +# Copyright (C) 2007-2012 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. +# +# 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_DIRECTORIES( + ${PTHREAD_INCLUDE_DIRS} + ${CAS_INCLUDE_DIRS} + ${KERNEL_ROOT_DIR}/include/salome +) + +SET(DDS_SOURCES + DDS_DicGroup.cxx + DDS_DicItem.cxx + DDS_Dictionary.cxx + DDS_KeyWords.cxx +) + +ADD_LIBRARY(DDS SHARED ${DDS_SOURCES}) +SET_TARGET_PROPERTIES(DDS PROPERTIES COMPILE_FLAGS "${CAS_DEFINITIONS} ${PLATFORM_DEFINITIONS}") +TARGET_LINK_LIBRARIES(DDS ${CAS_KERNEL} ${CAS_OCAF}) +INSTALL(TARGETS DDS DESTINATION ${GUI_salomelib_LIBS}) + +FILE(GLOB COMMON_HEADERS_H "${CMAKE_CURRENT_SOURCE_DIR}/*.h") +INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${GUI_salomeinclude_HEADERS}) + diff --git a/src/Event/CMakeLists.txt b/src/Event/CMakeLists.txt new file mode 100755 index 000000000..0e2110fa4 --- /dev/null +++ b/src/Event/CMakeLists.txt @@ -0,0 +1,32 @@ +# Copyright (C) 2012 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. +# +# 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 +# + +SET(Event_SOURCES + ${QT_INCLUDE_DIRS} + SALOME_Event.cxx + SALOME_EventFilter.cxx +) + +ADD_LIBRARY(Event SHARED ${Event_SOURCES}) +SET_TARGET_PROPERTIES(Event PROPERTIES COMPILE_FLAGS "${QT_DEFINITIONS} ${PLATFORM_DEFINITIONS}") +TARGET_LINK_LIBRARIES(Event ${QT_MT_LIBS}) +INSTALL(TARGETS Event DESTINATION ${GUI_salomelib_LIBS}) + +FILE(GLOB COMMON_HEADERS_H "${CMAKE_CURRENT_SOURCE_DIR}/*.h") +INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${GUI_salomeinclude_HEADERS}) diff --git a/src/GLViewer/CMakeLists.txt b/src/GLViewer/CMakeLists.txt new file mode 100755 index 000000000..9a455f44a --- /dev/null +++ b/src/GLViewer/CMakeLists.txt @@ -0,0 +1,83 @@ +# Copyright (C) 2012 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. +# +# 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(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/UseQT4EXT.cmake) + +INCLUDE_DIRECTORIES( + ${CAS_INCLUDE_DIRS} + ${PTHREAD_INCLUDE_DIRS} + ${QT_INCLUDE_DIRS} + ${CMAKE_CURRENT_SOURCE_DIR}/../Qtx + ${CMAKE_CURRENT_SOURCE_DIR}/../SUIT +) + +SET(COMMON_LIBS + suit + ${QT_MT_LIBS} + ${CAS_KERNEL} + ${OGL_LIBS} +) + +SET(GUI_HEADERS GLViewer_Selector.h GLViewer_Selector2d.h GLViewer_ToolTip.h GLViewer_ViewFrame.h GLViewer_ViewManager.h GLViewer_ViewPort.h GLViewer_ViewPort2d.h GLViewer_Viewer.h GLViewer_Viewer2d.h GLViewer_Widget.h) +QT4_WRAP_CPP(GUI_HEADERS_MOC ${GUI_HEADERS}) + +SET(GLViewer_SOURCES + GLViewer_AspectLine.cxx + GLViewer_BaseDrawers.cxx + GLViewer_BaseObjects.cxx + GLViewer_Compass.cxx + GLViewer_Context.cxx + GLViewer_CoordSystem.cxx + GLViewer_Drawer.cxx + GLViewer_Geom.cxx + GLViewer_Grid.cxx + GLViewer_Group.cxx + GLViewer_MimeData.cxx + GLViewer_Object.cxx + GLViewer_Selector.cxx + GLViewer_Selector2d.cxx + GLViewer_Text.cxx + GLViewer_Tools.cxx + GLViewer_ToolTip.cxx + GLViewer_ViewFrame.cxx + GLViewer_ViewManager.cxx + GLViewer_ViewPort.cxx + GLViewer_ViewPort2d.cxx + GLViewer_Viewer.cxx + GLViewer_Viewer2d.cxx + GLViewer_Widget.cxx +) + +SET(GUITS_SOURCES + resources/GLViewer_images.ts + resources/GLViewer_msg_en.ts + resources/GLViewer_msg_fr.ts +) + +ADD_LIBRARY(GLViewer SHARED ${GLViewer_SOURCES} ${GUI_HEADERS_MOC}) +SET_TARGET_PROPERTIES(GLViewer PROPERTIES COMPILE_FLAGS "${CAS_DEFINITIONS} ${QT_DEFINITIONS} ${PLATFORM_DEFINITIONS}") +TARGET_LINK_LIBRARIES(GLViewer ${COMMON_LIBS}) +INSTALL(TARGETS GLViewer DESTINATION ${GUI_salomelib_LIBS}) + +FILE(GLOB COMMON_HEADERS_H "${CMAKE_CURRENT_SOURCE_DIR}/*.h") +INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${GUI_salomeinclude_HEADERS}) +QT4_INSTALL_TS_RESOURCES("${GUITS_SOURCES}" "${GUI_salomeres_DATA}") + +FILE(GLOB GUIPNG_DATA "${CMAKE_CURRENT_SOURCE_DIR}/resources/*.png") +INSTALL(FILES ${GUIPNG_DATA} DESTINATION ${GUI_salomeres_DATA}) diff --git a/src/GUI_PY/CMakeLists.txt b/src/GUI_PY/CMakeLists.txt new file mode 100755 index 000000000..7eb45ea43 --- /dev/null +++ b/src/GUI_PY/CMakeLists.txt @@ -0,0 +1,56 @@ +# Copyright (C) 2012 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. +# +# 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(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/SalomeMacros.cmake) + +INCLUDE_DIRECTORIES( + ${CMAKE_CURRENT_BINARY_DIR} +) +# Python modules to be installed +SET(mypkgpython_PYTHON + __init__.py + selectvars.py + genericdialog.py + mytestdialog.py + helper.py +) +SALOME_INSTALL_SCRIPTS("${mypkgpython_PYTHON}" ${GUI_salomepythondir}/salome/gui) + +SET(PYUIC_FILES + SelectVarsDialog_ui.py + genericdialog_ui.py + mytestdialog_ui.py +) + +FOREACH(output ${PYUIC_FILES}) + STRING(REPLACE "_ui.py" ".ui" input ${output}) + SET(input ${CMAKE_CURRENT_SOURCE_DIR}/${input}) + SET(output ${CMAKE_CURRENT_BINARY_DIR}/${output}) + ADD_CUSTOM_COMMAND( + OUTPUT ${output} + COMMAND ${PYUIC_EXECUTABLE} -o ${output} ${input} + MAIN_DEPENDENCY ${input} + ) +ENDFOREACH(output ${PYUIC_FILES}) + +ADD_CUSTOM_TARGET(BUILD_PY_UI_FILES ALL DEPENDS ${PYUIC_FILES}) + +FOREACH(output ${PYUIC_FILES}) + INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${output} DESTINATION ${GUI_salomepythondir}/salome/gui) +ENDFOREACH(output ${PYUIC_FILES}) \ No newline at end of file diff --git a/src/GuiHelpers/CMakeLists.txt b/src/GuiHelpers/CMakeLists.txt new file mode 100755 index 000000000..1a1cacdf3 --- /dev/null +++ b/src/GuiHelpers/CMakeLists.txt @@ -0,0 +1,50 @@ +# Copyright (C) 2012 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. +# +# 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_DIRECTORIES( + ${CAS_INCLUDE_DIRS} + ${QT_INCLUDE_DIRS} + ${BOOST_INCLUDE_DIRS} + ${OMNIORB_INCLUDE_DIRS} + ${PTHREAD_INCLUDE_DIRS} + ${KERNEL_ROOT_DIR}/include/salome + ${CMAKE_CURRENT_SOURCE_DIR}/../SalomeApp + ${CMAKE_CURRENT_SOURCE_DIR}/../LightApp + ${CMAKE_CURRENT_SOURCE_DIR}/../SUIT + ${CMAKE_CURRENT_SOURCE_DIR}/../Qtx + ${CMAKE_CURRENT_SOURCE_DIR}/../CAM + ${CMAKE_CURRENT_SOURCE_DIR}/../STD + ${CMAKE_CURRENT_SOURCE_DIR}/../OBJECT +) + +SET(GUI_HEADERS StandardApp_Module.hxx) +QT4_WRAP_CPP(GUI_HEADERS_MOC ${GUI_HEADERS}) +SET(SalomeGuiHelpers_SOURCES + SALOME_GuiServices.cxx + SALOME_AppStudyEditor.cxx + StandardApp_Module.cxx +) + +ADD_LIBRARY(SalomeGuiHelpers SHARED ${SalomeGuiHelpers_SOURCES} ${GUI_HEADERS_MOC}) +SET_TARGET_PROPERTIES(SalomeGuiHelpers PROPERTIES COMPILE_FLAGS "${CAS_DEFINITIONS} ${QT_DEFINITIONS} ${BOOST_DEFINITIONS} ${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}") +TARGET_LINK_LIBRARIES(SalomeGuiHelpers SalomeApp ${SalomeKernelHelpers} ${CORBA_LIBS}) +INSTALL(TARGETS SalomeGuiHelpers DESTINATION ${GUI_salomelib_LIBS}) + +FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx") +INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${GUI_salomeinclude_HEADERS}) diff --git a/src/GuiHelpers/Makefile.am b/src/GuiHelpers/Makefile.am index dc45c3c80..3ee114677 100644 --- a/src/GuiHelpers/Makefile.am +++ b/src/GuiHelpers/Makefile.am @@ -26,7 +26,8 @@ salomeinclude_HEADERS = \ QtHelper.hxx \ SALOME_GuiServices.hxx \ SALOME_AppStudyEditor.hxx \ - StandardApp_Module.hxx + StandardApp_Module.hxx \ + SalomeGuiHelpers.hxx # Libraries targets lib_LTLIBRARIES = libSalomeGuiHelpers.la diff --git a/src/GuiHelpers/QtHelper.hxx b/src/GuiHelpers/QtHelper.hxx index de40c7a10..59e2bf32a 100644 --- a/src/GuiHelpers/QtHelper.hxx +++ b/src/GuiHelpers/QtHelper.hxx @@ -56,7 +56,7 @@ #include #define QDEBUG qWarning() //#define QDEBUG qDebug() -#define QLOG(data) QDEBUG << "[XSALOME] " << data +#define QLOG(data) QDEBUG << __FILE__<<" ["<<__LINE__<<"] : " << data #ifdef LOG #undef LOG #endif diff --git a/src/GuiHelpers/SALOME_AppStudyEditor.hxx b/src/GuiHelpers/SALOME_AppStudyEditor.hxx index 5eb0c0eee..2dd1a3457 100644 --- a/src/GuiHelpers/SALOME_AppStudyEditor.hxx +++ b/src/GuiHelpers/SALOME_AppStudyEditor.hxx @@ -28,8 +28,13 @@ #include #include "SALOME_StudyEditor.hxx" - -class SALOME_AppStudyEditor: public SALOME_StudyEditor { +#include "SalomeGuiHelpers.hxx" +/*! + * This class is a specialization of the KERNEL StudyEditor for + * the GUI context. The concept of active study is introduced here + * while it does not exist in the pure KERNEL context. + */ +class SALOMEGUIHELPERS_EXPORT SALOME_AppStudyEditor: public SALOME_StudyEditor { public: SALOME_AppStudyEditor(SalomeApp_Application * salomeApp); int updateActiveStudy(); diff --git a/src/GuiHelpers/SALOME_GuiServices.hxx b/src/GuiHelpers/SALOME_GuiServices.hxx index 990596c8e..dbbab8dfa 100644 --- a/src/GuiHelpers/SALOME_GuiServices.hxx +++ b/src/GuiHelpers/SALOME_GuiServices.hxx @@ -31,13 +31,13 @@ #include CORBA_SERVER_HEADER(SALOMEDS) #include #include - +#include "SalomeGuiHelpers.hxx" namespace GUI { // SALOME GUI main services - SalomeApp_Application * getSalomeApplication(); - LightApp_SelectionMgr * getSelectionManager(); - SUIT_ResourceMgr * getResourcesManager(); + SALOMEGUIHELPERS_EXPORT SalomeApp_Application * getSalomeApplication(); + SALOMEGUIHELPERS_EXPORT LightApp_SelectionMgr * getSelectionManager(); + SALOMEGUIHELPERS_EXPORT SUIT_ResourceMgr * getResourcesManager(); // Helper functions to deal with the study in a GUI context. // @@ -58,14 +58,14 @@ namespace GUI { // depends of the SALOME module technical choices). In general, on // of the attribute of a SObject is a CORBA servant that handles the // data to work with - SALOMEDS::Study_ptr getActiveStudy(); - int getActiveStudyId(); + SALOMEGUIHELPERS_EXPORT SALOMEDS::Study_ptr getActiveStudy(); + SALOMEGUIHELPERS_EXPORT int getActiveStudyId(); // Another way to get the active study (to be converted in // SALOMEDS::Study): - SalomeApp_Study * getSalomeAppActiveStudy(); + SALOMEGUIHELPERS_EXPORT SalomeApp_Study * getSalomeAppActiveStudy(); - SALOMEDS::SObject_ptr IObjectToSObject(const Handle(SALOME_InteractiveObject)& iobject); + SALOMEGUIHELPERS_EXPORT SALOMEDS::SObject_ptr IObjectToSObject(const Handle(SALOME_InteractiveObject)& iobject); template typename TInterface::_var_type IObjectToInterface(const Handle(SALOME_InteractiveObject)& iobject) { diff --git a/src/GuiHelpers/SalomeGuiHelpers.hxx b/src/GuiHelpers/SalomeGuiHelpers.hxx new file mode 100755 index 000000000..0d53b8bac --- /dev/null +++ b/src/GuiHelpers/SalomeGuiHelpers.hxx @@ -0,0 +1,41 @@ +// Copyright (C) 2007-2012 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. +// +// 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 SALOMEGUIHELPERS_HXX +#define SALOMEGUIHELPERS_HXX + +#ifdef WIN32 +# if defined SalomeGuiHelpers_EXPORTS || defined SALOMEGUIHELPERS_EXPORTS +# define SALOMEGUIHELPERS_EXPORT __declspec(dllexport) +# else +# define SALOMEGUIHELPERS_EXPORT __declspec(dllimport) +# endif +#else +# define SALOMEGUIHELPERS_EXPORT +#endif + +#if defined WIN32 +#pragma warning ( disable: 4251 ) +#pragma warning ( disable: 4786 ) +#endif + +#endif // SALOMEGUIHELPERS_HXX diff --git a/src/GuiHelpers/StandardApp_Module.hxx b/src/GuiHelpers/StandardApp_Module.hxx index 109446321..9909840cc 100644 --- a/src/GuiHelpers/StandardApp_Module.hxx +++ b/src/GuiHelpers/StandardApp_Module.hxx @@ -29,6 +29,8 @@ #include +#include "SalomeGuiHelpers.hxx" + /*! * This class is provided as the base class for the standard gui part * of a SALOME module. To define a gui part, you just have to @@ -56,7 +58,7 @@ * test package (tst/module/gui/Xsalome.hxx and * tst/module/gui/factory.cxx in the XSALOME library). */ -class StandardApp_Module: public SalomeApp_Module +class SALOMEGUIHELPERS_EXPORT StandardApp_Module: public SalomeApp_Module { Q_OBJECT diff --git a/src/LightApp/CMakeLists.txt b/src/LightApp/CMakeLists.txt new file mode 100755 index 000000000..737c58f6e --- /dev/null +++ b/src/LightApp/CMakeLists.txt @@ -0,0 +1,260 @@ +# Copyright (C) 2012 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. +# +# 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(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/UseQT4EXT.cmake) + +INCLUDE_DIRECTORIES( + ${CAS_INCLUDE_DIRS} + ${QT_INCLUDE_DIRS} + ${HDF5_INCLUDE_DIRS} + ${PYTHON_INCLUDE_DIRS} + ${PTHREAD_INCLUDE_DIRS} + ${QWT_INCLUDE_DIRS} + ${KERNEL_ROOT_DIR}/include/salome + ${CMAKE_BINARY_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/../SUIT + ${CMAKE_CURRENT_SOURCE_DIR}/../STD + ${CMAKE_CURRENT_SOURCE_DIR}/../CAM + ${CMAKE_CURRENT_SOURCE_DIR}/../ObjBrowser + ${CMAKE_CURRENT_SOURCE_DIR}/../LogWindow + ${CMAKE_CURRENT_SOURCE_DIR}/../Prs + ${CMAKE_CURRENT_SOURCE_DIR}/../Qtx + ${CMAKE_CURRENT_SOURCE_DIR}/../Event + ${CMAKE_CURRENT_SOURCE_DIR}/../Style + ${CMAKE_CURRENT_SOURCE_DIR}/../CASCatch +) + +SET(COMMON_FLAGS "${PYTHON_DEFINITIONS} ${HDF5_DEFINITIONS} ${CAS_DEFINITIONS} ${QT_DEFINITIONS} ${PLATFORM_DEFINITIONS}") +IF(NOT WINDOWS) + SET(COMMON_FLAGS "${COMMON_FLAGS} -Wno-deprecated") +ENDIF(NOT WINDOWS) + +SET(COMMON_LIBS + ${QT_LIBS} + suit + std + CAM + LogWindow + ${CAS_KERNEL} + SalomePrs + ObjBrowser + SalomeStyle + Event + ${HDF5_LIBS} + ${KERNEL_LDFLAGS} + ${SalomeHDFPersist} + ${SALOMELocalTrace} +) + +SET(GUI_HEADERS + LightApp_AboutDlg.h + LightApp_Application.h + LightApp_DataModel.h + LightApp_Dialog.h + LightApp_OBSelector.h + LightApp_Operation.h + LightApp_Module.h + LightApp_ModuleAction.h + LightApp_ModuleDlg.h + LightApp_NameDlg.h + LightApp_SelectionMgr.h + LightApp_ShowHideOp.h + LightApp_Study.h + LightApp_SwitchOp.h + LightApp_Preferences.h + LightApp_PreferencesDlg.h + LightApp_WgViewModel.h +) + +SET(RCCS LightApp.qrc) + +SET(LightApp_SOURCES + LightApp_AboutDlg.cxx + LightApp_Application.cxx + LightApp_DataModel.cxx + LightApp_DataObject.cxx + LightApp_DataOwner.cxx + LightApp_DataSubOwner.cxx + LightApp_Dialog.cxx + LightApp_Displayer.cxx + LightApp_Driver.cxx + LightApp_EventFilter.cxx + LightApp_HDFDriver.cxx + LightApp_Module.cxx + LightApp_ModuleAction.cxx + LightApp_ModuleDlg.cxx + LightApp_NameDlg.cxx + LightApp_OBSelector.cxx + LightApp_Operation.cxx + LightApp_Selection.cxx + LightApp_SelectionMgr.cxx + LightApp_ShowHideOp.cxx + LightApp_Study.cxx + LightApp_SwitchOp.cxx + LightApp_Preferences.cxx + LightApp_PreferencesDlg.cxx + LightApp_WgViewModel.cxx + LightApp_FullScreenHelper.cxx +) + +SET(GUITS_SOURCES + resources/LightApp_images.ts + resources/LightApp_msg_en.ts + resources/LightApp_msg_fr.ts +) + +SET(COMMON_HEADERS_H + LightApp.h + LightApp_AboutDlg.h + LightApp_Application.h + LightApp_DataModel.h + LightApp_DataObject.h + LightApp_DataOwner.h + LightApp_DataSubOwner.h + LightApp_Dialog.h + LightApp_Displayer.h + LightApp_Driver.h + LightApp_EventFilter.h + LightApp_HDFDriver.h + LightApp_Module.h + LightApp_ModuleAction.h + LightApp_ModuleDlg.h + LightApp_NameDlg.h + LightApp_OBSelector.h + LightApp_Operation.h + LightApp_Selection.h + LightApp_SelectionMgr.h + LightApp_ShowHideOp.h + LightApp_Study.h + LightApp_SwitchOp.h + LightApp_Preferences.h + LightApp_PreferencesDlg.h + LightApp_UpdateFlags.h + LightApp_WgViewModel.h + LightApp_FullScreenHelper.h +) + +IF(ENABLE_PYCONSOLE) + INCLUDE_DIRECTORIES( + ${PYTHON_INCLUDE_DIRS} + ${CMAKE_CURRENT_SOURCE_DIR}/../PyConsole + ${CMAKE_CURRENT_SOURCE_DIR}/../PyInterp + ${CMAKE_CURRENT_SOURCE_DIR}/../SUITApp + ) + SET(COMMON_FLAGS "${COMMON_FLAGS} ${PYTHON_DEFINITIONS}") + SET(COMMON_HEADERS_H ${COMMON_HEADERS_H} LightApp_PyInterp.h) + SET(LightApp_SOURCES ${LightApp_SOURCES} LightApp_PyInterp.cxx) + SET(COMMON_LIBS ${COMMON_LIBS} PyInterp PyConsole SUITApp) +ELSE(ENABLE_PYCONSOLE) + SET(COMMON_FLAGS "${COMMON_FLAGS} -DDISABLE_PYCONSOLE") +ENDIF(ENABLE_PYCONSOLE) + +IF(ENABLE_VTKVIEWER) + INCLUDE_DIRECTORIES( + ${VTK_INCLUDE_DIRS} + ${CMAKE_CURRENT_SOURCE_DIR}/../VTKViewer + ) + SET(COMMON_LIBS ${COMMON_LIBS} ${VTK_LIBS} VTKViewer) + IF(ENABLE_SALOMEOBJECT) + SET(COMMON_HEADERS_H ${COMMON_HEADERS_H} LightApp_VTKSelector.h) + SET(LightApp_SOURCES ${LightApp_SOURCES} LightApp_VTKSelector.cxx) + SET(GUI_HEADERS ${GUI_HEADERS} LightApp_VTKSelector.h) + SET(COMMON_LIBS ${COMMON_LIBS} SVTK) + ENDIF(ENABLE_SALOMEOBJECT) +ELSE(ENABLE_VTKVIEWER) + SET(COMMON_FLAGS "${COMMON_FLAGS} -DDISABLE_VTKVIEWER") +ENDIF(ENABLE_VTKVIEWER) + +IF(ENABLE_OCCVIEWER) + INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../OCCViewer) + SET(COMMON_HEADERS_H ${COMMON_HEADERS_H} LightApp_OCCSelector.h) + SET(LightApp_SOURCES ${LightApp_SOURCES} LightApp_OCCSelector.cxx) + SET(COMMON_LIBS ${COMMON_LIBS} OCCViewer) + SET(GUI_HEADERS ${GUI_HEADERS} LightApp_OCCSelector.h) +ELSE(ENABLE_OCCVIEWER) + SET(COMMON_FLAGS "${COMMON_FLAGS} -DDISABLE_OCCVIEWER") +ENDIF(ENABLE_OCCVIEWER) + +IF(ENABLE_GLVIEWER) + INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../GLViewer) + SET(COMMON_HEADERS_H ${COMMON_HEADERS_H} LightApp_GLSelector.h) + SET(LightApp_SOURCES ${LightApp_SOURCES} LightApp_GLSelector.cxx) + SET(GUI_HEADERS ${GUI_HEADERS} LightApp_GLSelector.h) + SET(COMMON_LIBS ${COMMON_LIBS} GLViewer) +ELSE(ENABLE_GLVIEWER) + SET(COMMON_FLAGS "${COMMON_FLAGS} -DDISABLE_GLVIEWER") +ENDIF(ENABLE_GLVIEWER) + +IF(ENABLE_PLOT2DVIEWER) + INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../Plot2d) + SET(COMMON_FLAGS "${COMMON_FLAGS} ${QWT_DEFINITIONS}") + SET(COMMON_HEADERS_H ${COMMON_HEADERS_H} LightApp_Plot2dSelector.h) + SET(LightApp_SOURCES ${LightApp_SOURCES} LightApp_Plot2dSelector.cxx) + SET(GUI_HEADERS ${GUI_HEADERS} LightApp_Plot2dSelector.h) + SET(COMMON_LIBS ${COMMON_LIBS} Plot2d) +ELSE(ENABLE_PLOT2DVIEWER) + SET(COMMON_FLAGS "${COMMON_FLAGS} -DDISABLE_PLOT2DVIEWER") +ENDIF(ENABLE_PLOT2DVIEWER) + +IF(ENABLE_SUPERVGRAPHVIEWER) + INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../SUPERVGraph) + SET(COMMON_LIBS ${COMMON_LIBS} SUPERVGraph) +ELSE(ENABLE_SUPERVGRAPHVIEWER) + SET(COMMON_FLAGS "${COMMON_FLAGS} -DDISABLE_SUPERVGRAPHVIEWER") +ENDIF(ENABLE_SUPERVGRAPHVIEWER) + +IF(ENABLE_QXGRAPHVIEWER) + INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../QxScene) + SET(COMMON_LIBS ${COMMON_LIBS} QxScene) +ELSE(ENABLE_QXGRAPHVIEWER) + SET(COMMON_FLAGS "${COMMON_FLAGS} -DDISABLE_QXGRAPHVIEWER") +ENDIF(ENABLE_QXGRAPHVIEWER) + +IF(ENABLE_SALOMEOBJECT) + INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../OBJECT) + SET(COMMON_LIBS ${COMMON_LIBS} SalomeObject) + IF(ENABLE_PLOT2DVIEWER) + INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../SPlot2d) + SET(COMMON_LIBS ${COMMON_LIBS} SPlot2d) + ENDIF(ENABLE_PLOT2DVIEWER) + + IF(ENABLE_OCCVIEWER) + INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../SOCC) + SET(COMMON_LIBS ${COMMON_LIBS} SOCC) + ENDIF(ENABLE_OCCVIEWER) + + IF(ENABLE_VTKVIEWER) + INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../SVTK) + ENDIF(ENABLE_VTKVIEWER) +ELSE(ENABLE_SALOMEOBJECT) + SET(COMMON_FLAGS "${COMMON_FLAGS} -DDISABLE_SALOMEOBJECT") +ENDIF(ENABLE_SALOMEOBJECT) + +QT4_WRAP_CPP(GUI_HEADERS_MOC ${GUI_HEADERS}) +QT4_ADD_RESOURCES(RCC_SRCS ${RCCS}) +ADD_LIBRARY(LightApp SHARED ${LightApp_SOURCES} ${GUI_HEADERS_MOC} ${RCC_SRCS}) +SET_TARGET_PROPERTIES(LightApp PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}") +TARGET_LINK_LIBRARIES(LightApp ${COMMON_LIBS}) +INSTALL(TARGETS LightApp DESTINATION ${GUI_salomelib_LIBS}) + +INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${GUI_salomeinclude_HEADERS}) +QT4_INSTALL_TS_RESOURCES("${GUITS_SOURCES}" "${GUI_salomeres_DATA}") + +FILE(GLOB GUIPNG_DATA "${CMAKE_CURRENT_SOURCE_DIR}/resources/*.png") +SET(GUI_DATA ${GUIPNG_DATA} ${CMAKE_CURRENT_SOURCE_DIR}/resources/LightApp.ini ${CMAKE_CURRENT_SOURCE_DIR}/resources/LightApp.xml) +INSTALL(FILES ${GUI_DATA} DESTINATION ${GUI_salomeres_DATA}) diff --git a/src/LightApp/LightApp_Application.cxx b/src/LightApp/LightApp_Application.cxx index 8880510ce..7b2bd00de 100644 --- a/src/LightApp/LightApp_Application.cxx +++ b/src/LightApp/LightApp_Application.cxx @@ -469,14 +469,14 @@ void LightApp_Application::createActionForViewer( const int id, QString vtlt = tr( QString( "NEW_WINDOW_%1" ).arg( suffix ).toLatin1().constData() ); QString tip = tr( "CREATING_NEW_WINDOW" ).arg( vtlt.remove( "&" ) ); QAction* a = createAction( id, // menu action id - tip, // status tip - QIcon(), // icon - vtlt, // menu text + tip, // status tip + QIcon(), // icon + vtlt, // menu text tip, // tooltip accel, // shortcut - desktop(), // parent + desktop(), // parent false, // toggle flag - this, // receiver + this, // receiver SLOT( onNewWindow() ) ); // slot createMenu( a, parentId, -1 ); } @@ -549,7 +549,7 @@ void LightApp_Application::createActions() QString helpFileName = fileIt.key(); // remove all '//' occurances while ( helpFileName.contains( "//" ) ) - helpFileName.replace( "//", "" ); + helpFileName.replace( "//", "" ); // obtain submenus hierarchy if given QStringList smenus = helpFileName.split( "/" ); helpFileName = smenus.last(); @@ -560,7 +560,7 @@ void LightApp_Application::createActions() 0, desk, false, this, SLOT( onHelpContentsModule() ) ); a->setData( fileIt.value() ); if ( !helpSubMenu.isEmpty() ) { - smenus.prepend( helpSubMenu ); + smenus.prepend( helpSubMenu ); } // create sub-menus hierarchy int menuId = helpMenu; @@ -1006,7 +1006,7 @@ void LightApp_Application::onHelpContentsModule() // is defined. On Linux platform QWebKit doesn't work correctly without 'file://' protocol. QtxWebBrowser::loadUrl(helpFile); #else - QtxWebBrowser::loadUrl(QString("file://%1").arg(helpFile)); + QtxWebBrowser::loadUrl(QString("file://%1").arg(helpFile)); #endif } } @@ -1077,9 +1077,9 @@ void LightApp_Application::onHelpContextModule( const QString& theComponentName, #ifdef WIN32 // On Win32 platform QWebKit of the Qt 4.6.3 hang up in case 'file://' protocol // is defined. On Linux platform QWebKit doesn't work correctly without 'file://' protocol. - QtxWebBrowser::loadUrl(helpFile, context); + QtxWebBrowser::loadUrl(helpFile, context); #else - QtxWebBrowser::loadUrl(QString("file://%1").arg(helpFile),context); + QtxWebBrowser::loadUrl(QString("file://%1").arg(helpFile),context); #endif } @@ -1424,13 +1424,13 @@ SUIT_ViewManager* LightApp_Application::createViewManager( const QString& vmType vm = new OCCViewer_Viewer( true ); #endif vm->setBackground( OCCViewer_ViewFrame::TOP_LEFT, - resMgr->backgroundValue( "OCCViewer", "xz_background", vm->background(OCCViewer_ViewFrame::TOP_LEFT) ) ); + resMgr->backgroundValue( "OCCViewer", "xz_background", vm->background(OCCViewer_ViewFrame::TOP_LEFT) ) ); vm->setBackground( OCCViewer_ViewFrame::TOP_RIGHT, - resMgr->backgroundValue( "OCCViewer", "yz_background", vm->background(OCCViewer_ViewFrame::TOP_RIGHT) ) ); + resMgr->backgroundValue( "OCCViewer", "yz_background", vm->background(OCCViewer_ViewFrame::TOP_RIGHT) ) ); vm->setBackground( OCCViewer_ViewFrame::BOTTOM_LEFT, - resMgr->backgroundValue( "OCCViewer", "xy_background", vm->background(OCCViewer_ViewFrame::BOTTOM_LEFT) ) ); + resMgr->backgroundValue( "OCCViewer", "xy_background", vm->background(OCCViewer_ViewFrame::BOTTOM_LEFT) ) ); vm->setBackground( OCCViewer_ViewFrame::BOTTOM_RIGHT, - resMgr->backgroundValue( "OCCViewer", "background", vm->background(OCCViewer_ViewFrame::MAIN_VIEW) ) ); + resMgr->backgroundValue( "OCCViewer", "background", vm->background(OCCViewer_ViewFrame::MAIN_VIEW) ) ); vm->setTrihedronSize( resMgr->doubleValue( "OCCViewer", "trihedron_size", vm->trihedronSize() ), resMgr->booleanValue( "OCCViewer", "relative_size", vm->trihedronRelative() )); @@ -1808,7 +1808,7 @@ QWidget* LightApp_Application::createWindow( const int flag ) SUIT_ProxyModel* proxyModel = dynamic_cast(treeModel); if ( proxyModel ) { connect( proxyModel, SIGNAL( dropped( const QList&, SUIT_DataObject*, int, Qt::DropAction ) ), - this, SLOT( onDropped( const QList&, SUIT_DataObject*, int, Qt::DropAction ) ) ); + this, SLOT( onDropped( const QList&, SUIT_DataObject*, int, Qt::DropAction ) ) ); } // temporary commented @@ -2020,6 +2020,9 @@ void LightApp_Application::createPreferences( LightApp_Preferences* pref ) // ... "Look and feel" group <> int lookGroup = pref->addPreference( tr( "PREF_GROUP_LOOK_AND_FEEL" ), genTab ); + pref->setItemProperty( "columns", 2, lookGroup ); + // .... -> show splash-screen + pref->addPreference( tr( "PREF_SHOW_SPLASH" ), lookGroup, LightApp_Preferences::Bool, "launch", "splash" ); // .... -> opaque resize pref->addPreference( tr( "PREF_OPAQUE_RESIZE" ), lookGroup, LightApp_Preferences::Bool, "desktop", "opaque_resize" ); // .... -> drop-down buttons @@ -2127,7 +2130,7 @@ void LightApp_Application::createPreferences( LightApp_Preferences* pref ) foreach( int gid, idList ) anIndicesList << gid; // .... -> 3D viewer background int bgId = pref->addPreference( tr( "PREF_3DVIEWER_BACKGROUND" ), bgGroup, - LightApp_Preferences::Background, "OCCViewer", "background" ); + LightApp_Preferences::Background, "OCCViewer", "background" ); pref->setItemProperty( "gradient_names", aValuesList, bgId ); pref->setItemProperty( "gradient_ids", anIndicesList, bgId ); pref->setItemProperty( "texture_enabled", !txtList.isEmpty(), bgId ); @@ -2138,7 +2141,7 @@ void LightApp_Application::createPreferences( LightApp_Preferences* pref ) pref->setItemProperty( "image_formats", formats, bgId ); // .... -> XZ viewer background bgId = pref->addPreference( tr( "PREF_XZVIEWER_BACKGROUND" ), bgGroup, - LightApp_Preferences::Background, "OCCViewer", "xz_background" ); + LightApp_Preferences::Background, "OCCViewer", "xz_background" ); pref->setItemProperty( "gradient_names", aValuesList, bgId ); pref->setItemProperty( "gradient_ids", anIndicesList, bgId ); pref->setItemProperty( "texture_enabled", !txtList.isEmpty(), bgId ); @@ -2149,7 +2152,7 @@ void LightApp_Application::createPreferences( LightApp_Preferences* pref ) pref->setItemProperty( "image_formats", formats, bgId ); // .... -> YZ viewer background bgId = pref->addPreference( tr( "PREF_YZVIEWER_BACKGROUND" ), bgGroup, - LightApp_Preferences::Background, "OCCViewer", "yz_background" ); + LightApp_Preferences::Background, "OCCViewer", "yz_background" ); pref->setItemProperty( "gradient_names", aValuesList, bgId ); pref->setItemProperty( "gradient_ids", anIndicesList, bgId ); pref->setItemProperty( "texture_enabled", !txtList.isEmpty(), bgId ); @@ -2160,7 +2163,7 @@ void LightApp_Application::createPreferences( LightApp_Preferences* pref ) pref->setItemProperty( "image_formats", formats, bgId ); // .... -> XY viewer background bgId = pref->addPreference( tr( "PREF_XYVIEWER_BACKGROUND" ), bgGroup, - LightApp_Preferences::Background, "OCCViewer", "xy_background" ); + LightApp_Preferences::Background, "OCCViewer", "xy_background" ); pref->setItemProperty( "gradient_names", aValuesList, bgId ); pref->setItemProperty( "gradient_ids", anIndicesList, bgId ); pref->setItemProperty( "texture_enabled", !txtList.isEmpty(), bgId ); @@ -2220,7 +2223,7 @@ void LightApp_Application::createPreferences( LightApp_Preferences* pref ) formats = SVTK_Viewer::backgroundData( aValuesList, idList, txtList ); foreach( int gid, idList ) anIndicesList << gid; bgId = pref->addPreference( tr( "PREF_VIEWER_BACKGROUND" ), vtkGen, - LightApp_Preferences::Background, "VTKViewer", "background" ); + LightApp_Preferences::Background, "VTKViewer", "background" ); pref->setItemProperty( "gradient_names", aValuesList, bgId ); pref->setItemProperty( "gradient_ids", anIndicesList, bgId ); pref->setItemProperty( "texture_enabled", !txtList.isEmpty(), bgId ); @@ -3876,7 +3879,7 @@ QString LightApp_Application::browseObjects( const QStringList& theEntryList, // scroll to each entry in the list // (in optimized mode - to the last entry only) QString anEntry; - LightApp_DataObject* anObject; + LightApp_DataObject* anObject = 0; while( anIter.hasNext() ) { anEntry = anIter.next(); @@ -3971,24 +3974,24 @@ void LightApp_Application::onDesktopMessage( const QString& message ) LightApp_Module* sMod = 0; CAM_Module* mod = module( msgType ); if ( !mod ) - mod = module( moduleTitle( msgType ) ); + mod = module( moduleTitle( msgType ) ); if ( mod && mod->inherits( "LightApp_Module" ) ) - sMod = (LightApp_Module*)mod; + sMod = (LightApp_Module*)mod; if ( msgType.toLower() == "preferences" ) { - // requested preferences change: should be given as "preferences/
//" - // for example "preferences/Study/multi_file_dump/true" - if ( data.count() > 3 ) { - QString section = data[1].trimmed(); - QString param = data[2].trimmed(); - QString value = QStringList( data.mid(3) ).join( sectionSeparator ); - resourceMgr()->setValue( section, param, value ); - } + // requested preferences change: should be given as "preferences/
//" + // for example "preferences/Study/multi_file_dump/true" + if ( data.count() > 3 ) { + QString section = data[1].trimmed(); + QString param = data[2].trimmed(); + QString value = QStringList( data.mid(3) ).join( sectionSeparator ); + resourceMgr()->setValue( section, param, value ); + } } else if ( sMod ) { - // received message for the module - QString msg = QStringList( data.mid(1) ).join( sectionSeparator ); - sMod->message( msg ); + // received message for the module + QString msg = QStringList( data.mid(1) ).join( sectionSeparator ); + sMod->message( msg ); } } } diff --git a/src/LightApp/LightApp_DataObject.cxx b/src/LightApp/LightApp_DataObject.cxx index b840feae1..0f14722e4 100644 --- a/src/LightApp/LightApp_DataObject.cxx +++ b/src/LightApp/LightApp_DataObject.cxx @@ -450,7 +450,7 @@ bool LightApp_DataObject::compare( const QVariant& left, const QVariant& right, rid = idsRight[i].toInt( &okRight ); if ( okLeft && okRight ) { // both seem to be correct integer ID - return lid < rid; + if ( lid < rid ) return true; } else if ( okLeft || okRight ) { // objects with correct (int) ID have higher priority diff --git a/src/LightApp/LightApp_PreferencesDlg.cxx b/src/LightApp/LightApp_PreferencesDlg.cxx index f49b36d41..b627e9a5c 100644 --- a/src/LightApp/LightApp_PreferencesDlg.cxx +++ b/src/LightApp/LightApp_PreferencesDlg.cxx @@ -65,6 +65,8 @@ myPrefs( prefs ), mySaved ( false ) QAbstractButton* impBtn = userButton( insertButton( tr( "IMPORT_BTN_TEXT" ) ) ); if( impBtn ) connect( impBtn, SIGNAL( clicked() ), this, SLOT( onImportPref() ) ); + + setMinimumSize( 800, 600 ); } /*! diff --git a/src/LightApp/resources/LightApp.xml b/src/LightApp/resources/LightApp.xml index 9761976c0..104d123d6 100644 --- a/src/LightApp/resources/LightApp.xml +++ b/src/LightApp/resources/LightApp.xml @@ -42,7 +42,7 @@ - + diff --git a/src/LightApp/resources/LightApp_msg_en.ts b/src/LightApp/resources/LightApp_msg_en.ts index d68711fdc..7d6b70a84 100644 --- a/src/LightApp/resources/LightApp_msg_en.ts +++ b/src/LightApp/resources/LightApp_msg_en.ts @@ -606,6 +606,10 @@ The changes will be applied on the next application session. PREF_GROUP_LOOK_AND_FEEL Look and feel + + PREF_SHOW_SPLASH + Show splash screen at start-up + PREF_OPAQUE_RESIZE Opaque resize diff --git a/src/LightApp/resources/LightApp_msg_fr.ts b/src/LightApp/resources/LightApp_msg_fr.ts index 3506f41ca..5fb47c07f 100755 --- a/src/LightApp/resources/LightApp_msg_fr.ts +++ b/src/LightApp/resources/LightApp_msg_fr.ts @@ -606,6 +606,10 @@ Les modifications seront appliquées à la prochaine session. PREF_GROUP_LOOK_AND_FEEL Aspect + + PREF_SHOW_SPLASH + Afficher l'écran de démarrage + PREF_OPAQUE_RESIZE Redimensionnement opaque diff --git a/src/LogWindow/CMakeLists.txt b/src/LogWindow/CMakeLists.txt new file mode 100755 index 000000000..4d0df7240 --- /dev/null +++ b/src/LogWindow/CMakeLists.txt @@ -0,0 +1,43 @@ +# Copyright (C) 2012 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. +# +# 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(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/UseQT4EXT.cmake) + +INCLUDE_DIRECTORIES( + ${QT_INCLUDE_DIRS} + ${CMAKE_CURRENT_SOURCE_DIR}/../Qtx + ${CMAKE_CURRENT_SOURCE_DIR}/../SUIT +) + +SET(GUI_HEADERS LogWindow.h) +QT4_WRAP_CPP(GUI_HEADERS_MOC ${GUI_HEADERS}) + +SET(GUITS_SOURCES + resources/LogWindow_msg_en.ts + resources/LogWindow_msg_fr.ts +) + +ADD_LIBRARY(LogWindow SHARED LogWindow.cxx ${GUI_HEADERS_MOC}) +SET_TARGET_PROPERTIES(LogWindow PROPERTIES COMPILE_FLAGS "${QT_DEFINITIONS} ${PLATFORM_DEFINITIONS}") +TARGET_LINK_LIBRARIES(LogWindow qtx suit ${QT_MT_LIBS}) +INSTALL(TARGETS LogWindow DESTINATION ${GUI_salomelib_LIBS}) + +FILE(GLOB COMMON_HEADERS_H "${CMAKE_CURRENT_SOURCE_DIR}/*.h") +INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${GUI_salomeinclude_HEADERS}) +QT4_INSTALL_TS_RESOURCES("${GUITS_SOURCES}" "${GUI_salomeres_DATA}") diff --git a/src/OBJECT/CMakeLists.txt b/src/OBJECT/CMakeLists.txt new file mode 100755 index 000000000..96764f5b2 --- /dev/null +++ b/src/OBJECT/CMakeLists.txt @@ -0,0 +1,53 @@ +# Copyright (C) 2012 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. +# +# 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_DIRECTORIES( + ${PTHREAD_INCLUDE_DIRS} + ${CAS_INCLUDE_DIRS} + ${QT_INCLUDE_DIRS} + ${KERNEL_ROOT_DIR}/include/salome +) + +SET(COMMON_LIBS + ${QT_LIBS} + ${CAS_LDPATH} + ${TKV3d} +) + +SET(SalomeObject_SOURCES + SALOME_InteractiveObject.cxx + SALOME_AISShape.cxx + SALOME_AISObject.cxx + SALOME_ListIO_0.cxx + SALOME_ListIteratorOfListIO_0.cxx + SALOME_ListNodeOfListIO_0.cxx + SALOME_Filter.cxx + SALOME_TypeFilter.cxx + SALOME_DataMapOfIOMapOfInteger_0.cxx + SALOME_DataMapNodeOfDataMapOfIOMapOfInteger_0.cxx + SALOME_DataMapIteratorOfDataMapOfIOMapOfInteger_0.cxx +) + +ADD_LIBRARY(SalomeObject SHARED ${SalomeObject_SOURCES}) +SET_TARGET_PROPERTIES(SalomeObject PROPERTIES COMPILE_FLAGS "${QT_DEFINITIONS} ${CAS_DEFINITIONS} ${PLATFORM_DEFINITIONS}") +TARGET_LINK_LIBRARIES(SalomeObject ${COMMON_LIBS}) +INSTALL(TARGETS SalomeObject DESTINATION ${GUI_salomelib_LIBS}) + +FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx") +INSTALL(FILES ${COMMON_HEADERS_HXX} SALOME_Selection.h DESTINATION ${GUI_salomeinclude_HEADERS}) diff --git a/src/OCCViewer/CMakeLists.txt b/src/OCCViewer/CMakeLists.txt new file mode 100755 index 000000000..04f406477 --- /dev/null +++ b/src/OCCViewer/CMakeLists.txt @@ -0,0 +1,122 @@ +# Copyright (C) 2007-2012 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. +# +# 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(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/UseQT4EXT.cmake) + +INCLUDE_DIRECTORIES( + ${CAS_INCLUDE_DIRS} + ${OGL_INCLUDE_DIRS} + ${QT_INCLUDE_DIRS} + ${PTHREAD_INCLUDE_DIRS} + ${KERNEL_ROOT_DIR}/include/salome + ${CMAKE_CURRENT_SOURCE_DIR}/../SUIT + ${CMAKE_CURRENT_SOURCE_DIR}/../ViewerTools + ${CMAKE_CURRENT_SOURCE_DIR}/../Qtx + ${CMAKE_CURRENT_SOURCE_DIR}/../OpenGLUtils + ${CMAKE_CURRENT_SOURCE_DIR}/../CASCatch +) +SET(COMMON_FLAGS "${QT_DEFINITIONS} ${CAS_DEFINITIONS} ${OGL_DEFINITIONS} ${PLATFORM_DEFINITIONS}") +SET(COMMON_LIBS + qtx + suit + ViewerTools + OpenGLUtils + ${OGL_LIBS} + ${QT_MT_LIBS} + ${CAS_KERNEL} + ${CAS_VIEWER} +) + +SET(GUI_HEADERS + OCCViewer_AISSelector.h + OCCViewer_ViewModel.h + OCCViewer_ViewPort3d.h + OCCViewer_ViewPort.h + OCCViewer_ViewSketcher.h + OCCViewer_ViewWindow.h + OCCViewer_ViewManager.h + OCCViewer_CreateRestoreViewDlg.h + OCCViewer_SetRotationPointDlg.h + OCCViewer_ClippingDlg.h + OCCViewer_AxialScaleDlg.h + OCCViewer_FontWidget.h + OCCViewer_CubeAxesDlg.h + OCCViewer_ToolTip.h + OCCViewer_ViewFrame.h +) +QT4_WRAP_CPP(GUI_HEADERS ${GUI_HEADERS}) + +SET(OCCViewer_SOURCES + OCCViewer_AISSelector.cxx + OCCViewer_ViewManager.cxx + OCCViewer_ViewModel.cxx + OCCViewer_ViewPort3d.cxx + OCCViewer_ViewPort.cxx + OCCViewer_ViewSketcher.cxx + OCCViewer_ViewWindow.cxx + OCCViewer_VService.cxx + OCCViewer_CreateRestoreViewDlg.cxx + OCCViewer_SetRotationPointDlg.cxx + OCCViewer_ClippingDlg.cxx + OCCViewer_AxialScaleDlg.cxx + OCCViewer_Trihedron.cxx + OCCViewer_FontWidget.cxx + OCCViewer_CubeAxesDlg.cxx + OCCViewer_ToolTip.cxx + OCCViewer_ViewFrame.cxx +) + +SET(GUITS_SOURCES + resources/OCCViewer_images.ts + resources/OCCViewer_msg_en.ts + resources/OCCViewer_msg_fr.ts +) + +ADD_LIBRARY(OCCViewer SHARED ${OCCViewer_SOURCES} ${GUI_HEADERS}) +SET_TARGET_PROPERTIES(OCCViewer PROPERTIES COMPILE_FLAGS ${COMMON_FLAGS}) +TARGET_LINK_LIBRARIES(OCCViewer ${COMMON_LIBS}) +INSTALL(TARGETS OCCViewer DESTINATION ${GUI_salomelib_LIBS}) +SET(COMMON_HEADERS_H + OCCViewer_AISSelector.h + OCCViewer_ViewManager.h + OCCViewer_ViewModel.h + OCCViewer_ViewPort3d.h + OCCViewer_ViewPort.h + OCCViewer_ViewSketcher.h + OCCViewer_ViewWindow.h + OCCViewer_VService.h + OCCViewer_CreateRestoreViewDlg.h + OCCViewer.h + OCCViewer_ClippingDlg.h + OCCViewer_AxialScaleDlg.h + OCCViewer_SetRotationPointDlg.h + OCCViewer_Trihedron.h + OCCViewer_FontWidget.h + OCCViewer_CubeAxesDlg.h + OCCViewer_ToolTip.h + OCCViewer_ViewFrame.h +) +INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${GUI_salomeinclude_HEADERS}) +QT4_INSTALL_TS_RESOURCES("${GUITS_SOURCES}" "${GUI_salomeres_DATA}") + +FILE(GLOB GUIPNG_DATA "${CMAKE_CURRENT_SOURCE_DIR}/resources/*.png") +INSTALL(FILES ${GUIPNG_DATA} DESTINATION ${GUI_salomeres_DATA}) diff --git a/src/OCCViewer/OCCViewer_ViewModel.cxx b/src/OCCViewer/OCCViewer_ViewModel.cxx index a4f2bb86d..170b843e6 100755 --- a/src/OCCViewer/OCCViewer_ViewModel.cxx +++ b/src/OCCViewer/OCCViewer_ViewModel.cxx @@ -169,6 +169,9 @@ OCCViewer_Viewer::OCCViewer_Viewer( bool DisplayTrihedron) */ OCCViewer_Viewer::~OCCViewer_Viewer() { + myAISContext.Nullify(); + myV3dViewer.Nullify(); + myV3dCollector.Nullify(); } /*! @@ -240,6 +243,8 @@ SUIT_ViewWindow* OCCViewer_Viewer::createView( SUIT_Desktop* theDesktop ) initView( vw ); // set default background for view window vw->setBackground( background(0) ); // 0 means MAIN_VIEW (other views are not yet created here) + // connect signal from viewport + connect(view->getViewPort(), SIGNAL(vpClosed()), this, SLOT(onViewClosed())); return view; } @@ -370,6 +375,17 @@ void OCCViewer_Viewer::onKeyPress(SUIT_ViewWindow* theWindow, QKeyEvent* theEven emit selectionChanged(); } +void OCCViewer_Viewer::onViewClosed() +{ + Standard_Integer aViewsNb = 0; + for ( myV3dViewer->InitActiveViews(); myV3dViewer->MoreActiveViews(); myV3dViewer->NextActiveViews()) + ++aViewsNb; + if ( aViewsNb < 2 ) { + //clean up presentations before last view is closed + myAISContext->RemoveAll(Standard_False); + } +} + int OCCViewer_Viewer::getTopLayerId() { #if OCC_VERSION_LARGE > 0x06050200 diff --git a/src/OCCViewer/OCCViewer_ViewModel.h b/src/OCCViewer/OCCViewer_ViewModel.h index 90f128c23..46c1e4786 100755 --- a/src/OCCViewer/OCCViewer_ViewModel.h +++ b/src/OCCViewer/OCCViewer_ViewModel.h @@ -163,6 +163,7 @@ protected slots: virtual void onMouseMove(SUIT_ViewWindow*, QMouseEvent*); virtual void onMouseRelease(SUIT_ViewWindow*, QMouseEvent*); virtual void onKeyPress(SUIT_ViewWindow*, QKeyEvent*); + virtual void onViewClosed(); void onDumpView(); void onChangeBackground(); diff --git a/src/OCCViewer/OCCViewer_ViewPort3d.cxx b/src/OCCViewer/OCCViewer_ViewPort3d.cxx index 26b0736b2..3dd08a812 100755 --- a/src/OCCViewer/OCCViewer_ViewPort3d.cxx +++ b/src/OCCViewer/OCCViewer_ViewPort3d.cxx @@ -92,6 +92,7 @@ OCCViewer_ViewPort3d::OCCViewer_ViewPort3d( QWidget* parent, const Handle( V3d_V */ OCCViewer_ViewPort3d::~OCCViewer_ViewPort3d() { + emit vpClosed(); Handle(V3d_View) aView = activeView(); if (!aView.IsNull()) aView->Remove(); diff --git a/src/OCCViewer/OCCViewer_ViewPort3d.h b/src/OCCViewer/OCCViewer_ViewPort3d.h index 17847bc3d..d82872979 100755 --- a/src/OCCViewer/OCCViewer_ViewPort3d.h +++ b/src/OCCViewer/OCCViewer_ViewPort3d.h @@ -96,6 +96,7 @@ public: signals: void vpChangeBackground( const Qtx::BackgroundData& ); + void vpClosed(); public slots: virtual bool synchronize( OCCViewer_ViewPort* ); diff --git a/src/ObjBrowser/CMakeLists.txt b/src/ObjBrowser/CMakeLists.txt new file mode 100644 index 000000000..eb3b7d5f2 --- /dev/null +++ b/src/ObjBrowser/CMakeLists.txt @@ -0,0 +1,48 @@ +# Copyright (C) 2012 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. +# +# 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(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/UseQT4EXT.cmake) + +INCLUDE_DIRECTORIES( + ${QT_INCLUDE_DIRS} + ${CMAKE_CURRENT_SOURCE_DIR}/../Qtx +) + +SET(GUI_HEADERS OB_Browser.h) +QT4_WRAP_CPP(GUI_HEADERS ${GUI_HEADERS}) +SET(ObjBrowser_SOURCES + OB_Browser.cxx +) + +SET(GUITS_SOURCES + resources/OB_msg_en.ts + resources/OB_msg_fr.ts +) + +ADD_LIBRARY(ObjBrowser SHARED ${ObjBrowser_SOURCES} ${GUI_HEADERS}) +SET_TARGET_PROPERTIES(ObjBrowser PROPERTIES COMPILE_FLAGS "${QT_DEFINITIONS} ${PLATFORM_DEFINITIONS}") +TARGET_LINK_LIBRARIES(ObjBrowser qtx ${QT_MT_LIBS}) +INSTALL(TARGETS ObjBrowser DESTINATION ${GUI_salomelib_LIBS}) + +SET(COMMON_HEADERS_H + OB.h + OB_Browser.h +) +INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${GUI_salomeinclude_HEADERS}) +QT4_INSTALL_TS_RESOURCES("${GUITS_SOURCES}" "${GUI_salomeres_DATA}") diff --git a/src/OpenGLUtils/CMakeLists.txt b/src/OpenGLUtils/CMakeLists.txt new file mode 100755 index 000000000..4a0c2eee9 --- /dev/null +++ b/src/OpenGLUtils/CMakeLists.txt @@ -0,0 +1,38 @@ +# Copyright (C) 2012 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. +# +# 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_DIRECTORIES( + ${PTHREAD_INCLUDE_DIRS} + ${KERNEL_ROOT_DIR}/include/salome +) + +SET(COMMON_FLAGS "${PLATFORM_DEFINITIONS}") +SET(COMMON_LIBS ${OGL_LIBS} ${SALOMELocalTrace}) + +ADD_LIBRARY(OpenGLUtils SHARED OpenGLUtils_FrameBuffer.cxx) +SET_TARGET_PROPERTIES(OpenGLUtils PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}") +TARGET_LINK_LIBRARIES(OpenGLUtils ${COMMON_LIBS}) +INSTALL(TARGETS OpenGLUtils DESTINATION ${GUI_salomelib_LIBS}) + +SET(COMMON_HEADERS_H + OpenGLUtils.h + OpenGLUtils_FrameBuffer.h +) + +INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${GUI_salomeinclude_HEADERS}) diff --git a/src/Plot2d/CMakeLists.txt b/src/Plot2d/CMakeLists.txt new file mode 100755 index 000000000..669455b41 --- /dev/null +++ b/src/Plot2d/CMakeLists.txt @@ -0,0 +1,126 @@ +# Copyright (C) 2012 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. +# +# 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(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/UseQT4EXT.cmake) + +INCLUDE_DIRECTORIES( + ${QWT_INCLUDE_DIRS} + ${QT_INCLUDE_DIRS} + ${BOOST_INCLUDE_DIRS} + ${PYTHON_INCLUDE_DIRS} + ${KERNEL_ROOT_DIR}/include/salome + ${CMAKE_CURRENT_SOURCE_DIR}/../Qtx + ${CMAKE_CURRENT_SOURCE_DIR}/../SUIT +) + +SET(COMMON_FLAGS "${QT_DEFINITIONS} ${QWT_DEFINITIONS} ${PYTHON_DEFINITIONS} ${PLATFORM_DEFINITIONS}") +SET(COMMON_LIBS ${QWT_LIBS} ${QT_MT_LIBS} ${PYTHON_LIBS} suit) + +SET(GUI_HEADERS + Plot2d_FitDataDlg.h + Plot2d_SetupViewDlg.h + Plot2d_ViewFrame.h + Plot2d_ViewManager.h + Plot2d_ViewModel.h + Plot2d_ViewWindow.h + Plot2d_SetupCurveDlg.h + Plot2d_Algorithm.h + Plot2d_NormalizeAlgorithm.h + Plot2d_SetupCurveScaleDlg.h + Plot2d_ToolTip.h +) + +SET(Plot2d_SOURCES + Plot2d.cxx + Plot2d_PlotItems.cxx + Plot2d_Object.cxx + Plot2d_Curve.cxx + Plot2d_Histogram.cxx + Plot2d_FitDataDlg.cxx + Plot2d_Prs.cxx + Plot2d_SetupViewDlg.cxx + Plot2d_ViewFrame.cxx + Plot2d_ViewManager.cxx + Plot2d_ViewModel.cxx + Plot2d_ViewWindow.cxx + Plot2d_Algorithm.cxx + Plot2d_NormalizeAlgorithm.cxx + Plot2d_SetupCurveDlg.cxx + Plot2d_SetupCurveScaleDlg.cxx + Plot2d_ToolTip.cxx +) + +SET(GUITS_SOURCES + resources/Plot2d_images.ts + resources/Plot2d_msg_en.ts + resources/Plot2d_msg_fr.ts +) + +# header files +SET(COMMON_HEADERS_H + Plot2d.h + Plot2d_PlotItems.h + Plot2d_Object.h + Plot2d_Curve.h + Plot2d_Histogram.h + Plot2d_FitDataDlg.h + Plot2d_Prs.h + Plot2d_SetupViewDlg.h + Plot2d_ViewFrame.h + Plot2d_ViewManager.h + Plot2d_ViewModel.h + Plot2d_ViewWindow.h + Plot2d_Algorithm.h + Plot2d_NormalizeAlgorithm.h + Plot2d_SetupCurveDlg.h + Plot2d_ToolTip.h + Plot2d_SetupCurveScaleDlg.h +) + +IF(ENABLE_PYCONSOLE) + SET(COMMON_HEADERS_H + ${COMMON_HEADERS_H} + Plot2d_AnalyticalCurve.h + Plot2d_AnalyticalCurveDlg.h + Plot2d_AnalyticalParser.h + ) + SET(Plot2d_SOURCES + ${Plot2d_SOURCES} + Plot2d_AnalyticalCurve.cxx + Plot2d_AnalyticalCurveDlg.cxx + Plot2d_AnalyticalParser.cxx + ) + SET(GUI_HEADERS + ${GUI_HEADERS} + Plot2d_AnalyticalCurveDlg.h + ) +ENDIF(ENABLE_PYCONSOLE) + +QT4_WRAP_CPP(GUI_HEADERS_MOC ${GUI_HEADERS}) + +ADD_LIBRARY(Plot2d SHARED ${Plot2d_SOURCES} ${GUI_HEADERS_MOC}) +SET_TARGET_PROPERTIES(Plot2d PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}") +TARGET_LINK_LIBRARIES(Plot2d ${COMMON_LIBS}) +INSTALL(TARGETS Plot2d DESTINATION ${GUI_salomelib_LIBS}) + +INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${GUI_salomeinclude_HEADERS}) +QT4_INSTALL_TS_RESOURCES("${GUITS_SOURCES}" "${GUI_salomeres_DATA}") + +FILE(GLOB GUIPNG_DATA "${CMAKE_CURRENT_SOURCE_DIR}/resources/*.png") +INSTALL(FILES ${GUIPNG_DATA} DESTINATION ${GUI_salomeres_DATA}) diff --git a/src/Plot2d/Plot2d_ViewFrame.cxx b/src/Plot2d/Plot2d_ViewFrame.cxx index 341ed59ff..3e65e51fe 100755 --- a/src/Plot2d/Plot2d_ViewFrame.cxx +++ b/src/Plot2d/Plot2d_ViewFrame.cxx @@ -57,6 +57,7 @@ #include #include +#include #include #include #include @@ -67,6 +68,7 @@ #include #include +#include #include #include @@ -153,6 +155,16 @@ const char* imageCrossCursor[] = { "................................", "................................", "................................"}; + +#ifdef WIN32 + #ifdef max + #undef max + #endif + + #ifdef min + #undef min + #endif +#endif /*! Constructor @@ -180,6 +192,7 @@ Plot2d_ViewFrame::Plot2d_ViewFrame( QWidget* parent, const QString& title ) myLNormAlgo = new Plot2d_NormalizeAlgorithm(this); /* Plot 2d View */ QVBoxLayout* aLayout = new QVBoxLayout( this ); + aLayout->setMargin(0); myPlot = new Plot2d_Plot2d( this ); new Plot2d_ToolTip( this ); @@ -305,8 +318,10 @@ void Plot2d_ViewFrame::EraseAll() Plot2d_QwtPlotPicker *picker = myPlot->getPicker(); // Clear points markers list and associations (marker,tooltip) - picker->pMarkers.clear(); // QList - picker->pMarkersToolTip.clear(); // QMap + if ( picker ) { + picker->pMarkers.clear(); // QList + picker->pMarkersToolTip.clear(); // QMap + } // 3)- Erase all QwtPlotCurve associated with the Plot2d_Curve @@ -650,43 +665,6 @@ QString Plot2d_ViewFrame::getInfo( const QPoint& pnt ) return info; } -/*! - * Create markers and tooltips associated with curve points - */ -void Plot2d_ViewFrame::createCurveTooltips( Plot2d_Curve *curve, - Plot2d_QwtPlotPicker *picker) -{ - // Dans Plot2d.h : pointList == QList - double x, y; - QString tooltip; - - pointList points = curve->getPointList(); - QColor color = curve->getColor(); - - // Point marker - QwtSymbol symbol; - symbol.setStyle(QwtSymbol::Ellipse); - symbol.setSize(1,1); - symbol.setPen( QPen(color)); - symbol.setBrush( QBrush(color)); - - for (int ip=0; ip < points.count(); ip++) - { - x = points[ip].x; - y = points[ip].y; - tooltip = points[ip].text; - - QwtPlotMarker *marker = myPlot->createMarkerAndTooltip( symbol, - x, - y, - tooltip, - picker); - // To deallocate in EraseAll() - myMarkerList.append( marker); - } -} - - /*! * Display curves of the list of lists by systems and components * - the first level list contains NbSytems lists of second level @@ -696,10 +674,11 @@ void Plot2d_ViewFrame::createCurveTooltips( Plot2d_Curve *curve, * * Draw points markers and create associated tooltips. * Draw connection segments (intermittent line) between all the curves of a component. + * \return the list of underlying plot curve that defines the complex cuve at once. In case of success the vector is at least of size 1. The first one is the curve used by the legend. */ -void Plot2d_ViewFrame::displayPlot2dCurveList( QList< QList > sysCoCurveList, - Plot2d_QwtPlotPicker* picker, - bool displayLegend) +QVector< QVector > Plot2d_ViewFrame::displayPlot2dCurveList( const QList< QList >& sysCoCurveList, + bool displayLegend, + const QList< QList >& sides) { //std::cout << "Plot2d_ViewFrame::displayPlot2dCurveList() 1" << std::endl; @@ -710,11 +689,6 @@ void Plot2d_ViewFrame::displayPlot2dCurveList( QList< QList > sys int nbComponent = (sysCoCurveList.at(0)).size(); // Total number of curves - //int nbAllCurve = nbSystem*nbComponent; - - //std::cout << " Number of systems = " << nbSystem << std::endl; - //std::cout << " Number of components = " << nbComponent << std::endl; - //std::cout << " Number total of courbes = " << nbAllCurve << std::endl; // 1)- Construction of a list by component and by system @@ -722,40 +696,29 @@ void Plot2d_ViewFrame::displayPlot2dCurveList( QList< QList > sys // | syst1 syst2 ... systN | syst1 syst2 ... systN | ..... | syst1 syst2 ... systN | QList plot2dCurveCoSysList; - - //std::cout << " Liste par composant et par systeme :" << std::endl; - + QList sidesList; for (int icom = 0; icom < nbComponent; icom++) { for (int isys = 0; isys < nbSystem; isys++) { - //std::cout << " icom= " << icom << " idev= " << isys << std::endl; - // The system curves list - QList sysCurveList = sysCoCurveList.at(isys); - - Plot2d_Curve *curve = sysCurveList.at(icom); - - plot2dCurveCoSysList.append( curve); + const QList& sysCurveList=sysCoCurveList.at(isys); + plot2dCurveCoSysList.append(sysCurveList.at(icom)); + // + const QList& sysSideList=sides.at(isys); + sidesList.append(sysSideList.at(icom)); } } - // 2)- Display list curves by a component's curves group // Draw connection segments (intermittent line) between the curves - - displayPlot2dCurveList( plot2dCurveCoSysList, nbSystem, picker, displayLegend); - + QVector< QVector > ret=displayPlot2dCurveList( plot2dCurveCoSysList, nbSystem, displayLegend, sidesList); // 3)- Size of graduations labels and texts under X axis - QwtScaleWidget *wid = myPlot->axisWidget( QwtPlot::xBottom); - wid->setTitle( " "); // indispensable pour que les noms des systemes apparaissent - // sous l'axe des X !! - + wid->setTitle(" "); // to make the names readable under X axis. QFont xFont = myPlot->axisFont(QwtPlot::xBottom); xFont.setPointSize(8); - myPlot->setAxisFont( QwtPlot::xBottom, xFont); - - //std::cout << "Ok for Plot2d_ViewFrame::displayPlot2dCurveList() 1" << std::endl; + myPlot->setAxisFont(QwtPlot::xBottom, xFont); + return ret; } @@ -764,32 +727,30 @@ void Plot2d_ViewFrame::displayPlot2dCurveList( QList< QList > sys * * Draw points markers and create associated tooltips * Draw connection segments (intermittent line) between the curves + * \param [in] sides sorted as in \b curveList. If true->right if false->left + * \return the list of underlying plot curve that defines the complex cuve at once. In case of success the vector is at least of size 1. The first one is the curve used by the legend. */ -void Plot2d_ViewFrame::displayPlot2dCurveList( QList curveList, - int groupSize, - Plot2d_QwtPlotPicker* picker, - bool displayLegend) +QVector< QVector > Plot2d_ViewFrame::displayPlot2dCurveList( const QList& curveList, + int groupSize, + bool displayLegend, const QList< bool >& sides) { - //std::cout << "Plot2d_ViewFrame::displayPlot2dCurveList() 2" << std::endl; - // Consider the new legend's entries // (PB: to update the legend we must remove it and put a new QwtLegend in the QwtPlot) myPlot->insertLegend( (QwtLegend*)NULL); // we remove here, we shall put at the end int nbAllCurves = curveList.size(); int nbGroups = nbAllCurves / groupSize; + QVector< QVector > vectCurve(nbGroups); int ig, icur; int icur1, icur2; // curves indices in a group - //std::cout << " " << nbGroups << " groupes a " << groupSize << " courbes" << std::endl; // I)- Compute X range and Y range for all the curves' points of all groups // In the graphic view, set the Y range 's bounds for all groups of curves // For all groups of curves - double XallGroupMin, XallGroupMax; - double YallGroupMin, YallGroupMax; - bool isFirstGroup = true; - + double XallGroupMin=std::numeric_limits::max(), XallGroupMax=-std::numeric_limits::max(); + double YRightallGroupMin=std::numeric_limits::max(), YRightallGroupMax=-std::numeric_limits::max(); + double YLeftallGroupMin=std::numeric_limits::max(), YLeftallGroupMax=-std::numeric_limits::max(); icur1 = 0; for (ig=0; ig < nbGroups; ig++) //*1* { @@ -807,11 +768,11 @@ void Plot2d_ViewFrame::displayPlot2dCurveList( QList curveList, int nbPoints; // Compute X range and Y range for all the curves' points in the group - + bool side=false; for (icur=icur1; icur <= icur2; icur++) //*2* { Plot2d_Curve *plot2dCurve = curveList.at(icur); - + side=sides.at(icur); // Curve points nbPoints = plot2dCurve->getData( &Xval, &Yval); // dynamic allocation @@ -833,10 +794,6 @@ void Plot2d_ViewFrame::displayPlot2dCurveList( QList curveList, delete [] Xval; delete [] Yval; - //std::cout << " Pour la courbe d'indice " << icur << " :" << std::endl; - //std::cout << " Xmin= " << XcurveMin << " Xmax= " << XcurveMax << std::endl; - //std::cout << " Ymin= " << YcurveMin << " Ymax= " << YcurveMax << std::endl; - if (icur == icur1) // first curve { XgroupMin = XcurveMin; XgroupMax = XcurveMax; @@ -851,50 +808,39 @@ void Plot2d_ViewFrame::displayPlot2dCurveList( QList curveList, } } //*2* - //std::cout << " Pour les courbes du groupe d'indice " << ig << " :" << std::endl; - //std::cout << " Xmin= " << XgroupMin << " Xmax= " << XgroupMax << std::endl; - //std::cout << " Ymin= " << YgroupMin << " Ymax= " << YgroupMax << std::endl; - - if (isFirstGroup) - { - XallGroupMin = XgroupMin; XallGroupMax = XgroupMax; - YallGroupMin = YgroupMin; YallGroupMax = YgroupMax; - isFirstGroup = false; - } + if (XgroupMin < XallGroupMin) XallGroupMin = XgroupMin; + if (XgroupMax > XallGroupMax) XallGroupMax = XgroupMax; + if(side) + { + if (YgroupMin < YRightallGroupMin) YRightallGroupMin = YgroupMin; + if (YgroupMax > YRightallGroupMax) YRightallGroupMax = YgroupMax; + } else - { - if (XgroupMin < XallGroupMin) XallGroupMin = XgroupMin; - if (XgroupMax > XallGroupMax) XallGroupMax = XgroupMax; - if (YgroupMin < YallGroupMin) YallGroupMin = YgroupMin; - if (YgroupMax > YallGroupMax) YallGroupMax = YgroupMax; - } - + { + if (YgroupMin < YLeftallGroupMin) YLeftallGroupMin = YgroupMin; + if (YgroupMax > YLeftallGroupMax) YLeftallGroupMax = YgroupMax; + } // First curve of the following group icur1 = icur2 + 1; } //*1* - - //std::cout << " Pour tous les groupes de courbes :" << std::endl; - //std::cout << " Xmin= " << XallGroupMin << " Xmax= " << XallGroupMax << std::endl; - //std::cout << " Ymin= " << YallGroupMin << " Ymax= " << YallGroupMax << std::endl; - - double deltaY = YallGroupMax - YallGroupMin; - // Set the XY range 's bounds for all groups of curves -//myPlot->setAxisScale( QwtPlot::xBottom, XallGroupMin, XallGroupMax); - myPlot->setAxisScale( QwtPlot::yLeft, YallGroupMin - 0.05*deltaY, YallGroupMax + 0.05*deltaY); - + if(YRightallGroupMin!=std::numeric_limits::max()) + { + double deltaY = YRightallGroupMax - YRightallGroupMin; + YRightallGroupMin-=0.05*deltaY; YRightallGroupMax+= 0.05*deltaY; + myPlot->setAxisScale( QwtPlot::yRight, YRightallGroupMin,YRightallGroupMax); + } + if(YLeftallGroupMin!=std::numeric_limits::max()) + { + double deltaY = YLeftallGroupMax - YLeftallGroupMin; + YLeftallGroupMin-=0.05*deltaY; YLeftallGroupMax+= 0.05*deltaY; + myPlot->setAxisScale( QwtPlot::yLeft, YLeftallGroupMin, YLeftallGroupMax); + } // II)- Drawing curves, points markers and connection segments icur1 = 0; for (ig=0; ig < nbGroups; ig++) { - icur2 = icur1 + groupSize -1; - - //std::cout << " Indices des courbes du groupe " << ig << " : " << icur1 - // << " a " << icur2 << std::endl; - int nbCurves = icur2 - icur1 + 1; - //std::cout << " groupe a " << nbCurves << " courbes" << std::endl; - // 1)- Graphical attributs of group's curves // Graphical attributes of the first group's curve @@ -905,53 +851,43 @@ void Plot2d_ViewFrame::displayPlot2dCurveList( QList curveList, Plot2d::LineType linetype1 = plot2dCurve1->getLine(); int lineWidth1 = plot2dCurve1->getLineWidth(); QwtSymbol::Style symbolStyle1 = plot2dCurve1->getMarkerStyle(); - - if (nbCurves > 1) - { - // We attribute to the current group's curve, the color, the line's kind - // and the marker's kind of the first group's curve - - for (icur=icur1 +1; icur <= icur2; icur++) - { - Plot2d_Curve *plot2dCurve = curveList.at(icur); - // - plot2dCurve->setColor( color1); - plot2dCurve->setLine( linetype1, lineWidth1); - plot2dCurve->setMarkerStyle( symbolStyle1); - } - } + // We attribute to the current group's curve, the color, the line's kind + // and the marker's kind of the first group's curve + + for (icur=icur1+1; icursetColor(color1); + plot2dCurve->setLine(linetype1,lineWidth1); + plot2dCurve->setMarkerStyle(symbolStyle1); + } // 2)- Display the group's curves - for (icur=icur1; icur <= icur2; icur++) + for (icur=icur1; icurgetVerTitle(); std::string std_title = title.toStdString(); - //const char *c_title = std_title.c_str(); - //std::cout << " courbe d'indice " << icur << " : |" << c_title << "|" << std::endl; - // Create the graphic curve (QwtPlotCurve) et display it in the drawing zone // (Qwtplot) - displayCurve( plot2dCurve); - - // Draw the points' markers and create the associated tooltips - createCurveTooltips( plot2dCurve, picker); + displayCurve(plot2dCurve); // Get the graphic curve - QwtPlotCurve* plotCurve = dynamic_cast( getPlotObject( plot2dCurve)); - + QwtPlotCurve* plotCurve = dynamic_cast(getPlotObject(plot2dCurve)); + vectCurve[ig].push_back(plotCurve); // Modify the points' markers - QwtSymbol symbol (plotCurve->symbol()) ; - symbol.setStyle( symbolStyle1); - symbol.setPen( QPen( color1, lineWidth1)); - symbol.setBrush( QBrush( color1)); - QSize size = 0.5*(symbol.size()); - symbol.setSize(size); + QwtSymbol symbol(plotCurve->symbol()) ; + symbol.setStyle(symbolStyle1); + symbol.setPen(QPen(color1,lineWidth1)); + //symbol.setBrush( QBrush( color1)); + //QSize size = 0.5*(symbol.size()); + //symbol.setSize(size); // - plotCurve->setPen( QPen( color1, lineWidth1)); - plotCurve->setSymbol( symbol); + plotCurve->setPen(QPen(color1,lineWidth1)); + plotCurve->setSymbol(symbol); if (icur > icur1) { @@ -968,14 +904,14 @@ void Plot2d_ViewFrame::displayPlot2dCurveList( QList curveList, // 3)- Intermittent segments to connect all the group's curves - if (nbCurves > 1) + if (groupSize > 1) { double *Xval; double *Yval; int nbPoints; double Xseg[2], Yseg[2]; Plot2d_Curve *plot2dCurve1 = curveList.at(icur1); - + bool side = sides.at(icur1); // Last point of the first curve nbPoints = plot2dCurve1->getData( &Xval, &Yval); // dynamic allocation Xseg[0] = Xval[ nbPoints -1]; @@ -983,7 +919,7 @@ void Plot2d_ViewFrame::displayPlot2dCurveList( QList curveList, delete [] Xval; delete [] Yval; - for (icur=icur1 +1; icur <= icur2; icur++) + for (icur=icur1+1; icur curveList, Xseg[1] = Xval[0]; Yseg[1] = Yval[0]; - createSegment( Xseg, Yseg, 2, - Qt::DotLine, - lineWidth1, - color1, - QwtSymbol::NoSymbol); + vectCurve[ig].push_back(createSegment(Xseg,Yseg,2,Qt::DotLine,lineWidth1,color1,QwtSymbol::NoSymbol,side)); // Last curve's point Xseg[0] = Xval[ nbPoints -1]; @@ -1006,16 +938,16 @@ void Plot2d_ViewFrame::displayPlot2dCurveList( QList curveList, } } // First curve of the following group - icur1 = icur2 + 1; + icur1 += groupSize; } if (displayLegend) { // Consider the new legend's entries - showLegend( true, true); // show, update + if(!curveList.empty()) + showLegend( true, true); // show, update } - - //std::cout << "Ok for Plot2d_ViewFrame::displayPlot2dCurveList() 2" << std::endl; + return vectCurve; } @@ -1078,9 +1010,6 @@ Plot2d_Curve* Plot2d_ViewFrame::createPlot2dCurve( QString & title, } displayCurve( plot2dCurve); - // plot points marker create associated tooltips - createCurveTooltips( plot2dCurve, picker); - // Get the graphical curve QwtPlotCurve* plotCurve = dynamic_cast( getPlotObject( plot2dCurve)); @@ -1140,11 +1069,11 @@ QColor Plot2d_ViewFrame::getPlot2dCurveColor( Plot2d_Curve* plot2dCurve) /*! * Create and display a segment with nbPoint=2 points */ -void Plot2d_ViewFrame::createSegment( double *X, double *Y, int nbPoint, - Qt::PenStyle lineKind, - int lineWidth, - QColor & lineColor, - QwtSymbol::Style markerKind) +QwtPlotCurve *Plot2d_ViewFrame::createSegment( double *X, double *Y, int nbPoint, + Qt::PenStyle lineKind, + int lineWidth, + QColor & lineColor, + QwtSymbol::Style markerKind, bool side) { QwtPlotCurve* aPCurve = new QwtPlotCurve(); @@ -1158,9 +1087,11 @@ void Plot2d_ViewFrame::createSegment( double *X, double *Y, int nbPoint, // The segment must not have legend's entry aPCurve->setItemAttribute( QwtPlotItem::Legend, false); - aPCurve->attach( myPlot); + aPCurve->attach(myPlot); + aPCurve->setYAxis(side ? QwtPlot::yRight : QwtPlot::yLeft); // To deallocate in EraseAll() - myIntermittentSegmentList.append( aPCurve); + myIntermittentSegmentList.append(aPCurve); + return aPCurve; } /*! @@ -1374,17 +1305,24 @@ void Plot2d_ViewFrame::eraseObject( Plot2d_Object* object, bool update ) if ( hasPlotObject( object ) ) { QwtPlotItem* anObject = getPlotObject( object ); - anObject->hide(); - anObject->detach(); - myObjects.remove( anObject ); - updateTitles(); - myPlot->updateYAxisIdentifiers(); - if ( update ) - myPlot->replot(); + eraseBasicObject(anObject,update); } if ( myPlot->zoomer() ) myPlot->zoomer()->setZoomBase(); } +void Plot2d_ViewFrame::eraseBasicObject( QwtPlotItem *object, bool update ) +{ + if(!object) + return; + object->hide(); + object->detach(); + myObjects.remove(object); + updateTitles(); + myPlot->updateYAxisIdentifiers(); + if ( update ) + myPlot->replot(); +} + /*! Erases objects */ @@ -1399,6 +1337,16 @@ void Plot2d_ViewFrame::eraseObjects( const objectList& objects, bool update ) if ( myPlot->zoomer() ) myPlot->zoomer()->setZoomBase(); } +void Plot2d_ViewFrame::eraseBasicObjects( const QList &objects, bool update) +{ + foreach ( QwtPlotItem* object, objects ) + eraseBasicObject( object, false ); + // fitAll(); + if ( update ) + myPlot->replot(); + if ( myPlot->zoomer() ) myPlot->zoomer()->setZoomBase(); +} + /*! Updates objects attributes */ @@ -2643,25 +2591,47 @@ void Plot2d_ViewFrame::plotMouseReleased( const QMouseEvent& me ) */ void Plot2d_ViewFrame::wheelEvent(QWheelEvent* event) { + QwtPlotLayout* pl = myPlot->plotLayout(); + + // compute zooming factor double aDelta = event->delta(); double aScale = (aDelta < 0) ? 100./(-aDelta) : aDelta/100.; - QwtScaleMap xMap = myPlot->canvasMap( QwtPlot::xBottom ); - QwtScaleMap yMap = myPlot->canvasMap( QwtPlot::yLeft ); - - if ( ((yMap.s2() - yMap.s1()) < 10e-13 || (xMap.s2() - xMap.s1()) < 10e-13 ) && aScale < 1 ) - return; + bool scaleXBottom = pl->scaleRect(QwtPlot::xBottom).contains( event->pos() ) || + pl->canvasRect().contains( event->pos() ); + bool scaleYLeft = pl->scaleRect(QwtPlot::yLeft).contains( event->pos() ) || + pl->canvasRect().contains( event->pos() ); + bool scaleYRight = mySecondY && ( pl->scaleRect(QwtPlot::yRight).contains( event->pos() ) || + pl->canvasRect().contains( event->pos() ) ); + + // scale x bottom axis + if ( scaleXBottom ) { + QwtScaleMap xMap = myPlot->canvasMap( QwtPlot::xBottom ); + if ( xMap.s2() - xMap.s1() > 1.0e-12 || aScale > 1 ) + myPlot->setAxisScale( QwtPlot::xBottom, xMap.s1(), xMap.s1() + aScale*(xMap.s2() - xMap.s1()) ); + } + + // scale y left axis + if ( scaleYLeft ) { + QwtScaleMap yMap = myPlot->canvasMap( QwtPlot::yLeft ); + if ( yMap.s2() - yMap.s1() > 1.0e-12 || aScale > 1 ) + myPlot->setAxisScale( QwtPlot::yLeft, yMap.s1(), yMap.s1() + aScale*(yMap.s2() - yMap.s1()) ); + } - myPlot->setAxisScale( QwtPlot::yLeft, yMap.s1(), yMap.s1() + aScale*(yMap.s2() - yMap.s1()) ); - myPlot->setAxisScale( QwtPlot::xBottom, xMap.s1(), xMap.s1() + aScale*(xMap.s2() - xMap.s1()) ); - if (mySecondY) { - QwtScaleMap y2Map = myPlot->canvasMap( QwtPlot::yRight ); - if ( ((y2Map.s2() - y2Map.s1()) < 10e-13 ) && aScale < 1 ) return; - myPlot->setAxisScale( QwtPlot::yRight, y2Map.s1(), y2Map.s1() + aScale*(y2Map.s2() - y2Map.s1()) ); + // scale y right axis (note: mySecondY value is checked above) + if ( scaleYRight ) { + QwtScaleMap yMap = myPlot->canvasMap( QwtPlot::yRight ); + if ( yMap.s2() - yMap.s1() > 10e-12 || aScale > 1 ) + myPlot->setAxisScale( QwtPlot::yRight, yMap.s1(), yMap.s1() + aScale*(yMap.s2() - yMap.s1()) ); } + + // redraw myPlot->replot(); + // update zoomer if ( myPlot->zoomer() ) myPlot->zoomer()->setZoomBase(); + // store current mouse position myPnt = event->pos(); + // update analytical curves updateAnalyticalCurves(); } @@ -3008,8 +2978,10 @@ QwtPlotMarker* Plot2d_Plot2d::createMarkerAndTooltip( QwtSymbol symbol, QColor tooltipColor( 253, 245, 230); // OldLace text.setBackgroundBrush( QBrush(tooltipColor)); //, Qt::SolidPattern)); // - picker->pMarkers.append( aPlotMarker); - picker->pMarkersToolTip[ aPlotMarker] = text; + if ( picker ) { + picker->pMarkers.append( aPlotMarker); + picker->pMarkersToolTip[ aPlotMarker] = text; + } return aPlotMarker; } @@ -3913,16 +3885,21 @@ Plot2d_Curve* Plot2d_ViewFrame::getClosestCurve( QPoint p, double& distance, int { CurveDict aCurves = getCurves(); CurveDict::iterator it = aCurves.begin(); - QwtPlotCurve* aCurve; + Plot2d_Curve* pCurve = 0; + distance = -1.; for ( ; it != aCurves.end(); it++ ) { - aCurve = it.key(); + QwtPlotCurve* aCurve = it.key(); if ( !aCurve ) continue; - index = aCurve->closestPoint( p, &distance ); - if ( index > -1 ) - return it.value(); + double d; + int i = aCurve->closestPoint( p, &d ); + if ( index > -1 && ( distance < 0 || d < distance ) ) { + pCurve = it.value(); + distance = d; + index = i; + } } - return 0; + return pCurve; } /*! diff --git a/src/Plot2d/Plot2d_ViewFrame.h b/src/Plot2d/Plot2d_ViewFrame.h index a085e887b..a517e96a2 100755 --- a/src/Plot2d/Plot2d_ViewFrame.h +++ b/src/Plot2d/Plot2d_ViewFrame.h @@ -88,18 +88,14 @@ public: void setTitle( const QString& ); QString getTitle() const; - /* addition MultiX */ - void createCurveTooltips( Plot2d_Curve *curve, - Plot2d_QwtPlotPicker *picker); - - void displayPlot2dCurveList( QList< QList > sysCoCurveList, - Plot2d_QwtPlotPicker* picker, - bool displayLegend); + QVector< QVector > displayPlot2dCurveList( const QList< QList >& sysCoCurveList, + bool displayLegend, + const QList< QList >& sides); - void displayPlot2dCurveList( QList curveList, - int groupsize, - Plot2d_QwtPlotPicker* picker, - bool displayLegend); + QVector< QVector > displayPlot2dCurveList( const QList& curveList, + int groupsize, + bool displayLegend, + const QList< bool >& sides); Plot2d_Curve* createPlot2dCurve( QString & title, QString & unit, @@ -116,11 +112,12 @@ public: QColor getPlot2dCurveColor( Plot2d_Curve* plot2dCurve); - void createSegment( double *X, double *Y, int nbPoint, - Qt::PenStyle lineKind, - int lineWidth, - QColor & lineColor, - QwtSymbol::Style markerKind); + QwtPlotCurve *createSegment( double *X, double *Y, int nbPoint, + Qt::PenStyle lineKind, + int lineWidth, + QColor & lineColor, + QwtSymbol::Style markerKind, + bool side=false); /* curves operations [ obsolete ] */ void displayCurve( Plot2d_Curve*, bool = false ); @@ -137,6 +134,8 @@ public: void displayObjects( const objectList&, bool = false ); void eraseObject( Plot2d_Object*, bool = false ); void eraseObjects( const objectList&, bool = false ); + void eraseBasicObject( QwtPlotItem*, bool = false ); + void eraseBasicObjects( const QList &, bool = false ); int getObjects( objectList& ) const; bool isVisible( Plot2d_Object* ) const; void updateObject( Plot2d_Object*, bool = false ); diff --git a/src/Prs/CMakeLists.txt b/src/Prs/CMakeLists.txt new file mode 100755 index 000000000..cd501fbd2 --- /dev/null +++ b/src/Prs/CMakeLists.txt @@ -0,0 +1,25 @@ +# Copyright (C) 2012 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. +# +# 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 +# + +ADD_LIBRARY(SalomePrs SHARED SALOME_Prs.cxx) +SET_TARGET_PROPERTIES(SalomePrs PROPERTIES COMPILE_FLAGS "${PLATFORM_DEFINITIONS}") +INSTALL(TARGETS SalomePrs DESTINATION ${GUI_salomelib_LIBS}) + +INSTALL(FILES SALOME_Prs.h DESTINATION ${GUI_salomeinclude_HEADERS}) + diff --git a/src/PyConsole/CMakeLists.txt b/src/PyConsole/CMakeLists.txt new file mode 100755 index 000000000..cb2316456 --- /dev/null +++ b/src/PyConsole/CMakeLists.txt @@ -0,0 +1,65 @@ +# Copyright (C) 2012 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. +# +# 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(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/UseQT4EXT.cmake) + +INCLUDE_DIRECTORIES( + ${QT_INCLUDE_DIRS} + ${PTHREAD_INCLUDE_DIRS} + ${PYTHON_INCLUDE_DIRS} + ${KERNEL_ROOT_DIR}/include/salome + ${CMAKE_CURRENT_SOURCE_DIR}/../Qtx + ${CMAKE_CURRENT_SOURCE_DIR}/../SUIT + ${CMAKE_CURRENT_SOURCE_DIR}/../PyInterp +) + +SET(COMMON_FLAGS "${QT_DEFINITIONS} ${PYTHON_DEFINITIONS} ${PLATFORM_DEFINITIONS}") +SET(COMMON_LIBS ${PYTHON_LIBS} ${QT_LIBS} ${SALOMELocalTrace} qtx suit PyInterp) + +SET(GUI_HEADERS + PyConsole_Editor.h + PyConsole_Console.h +) +QT4_WRAP_CPP(GUI_HEADERS_MOC ${GUI_HEADERS}) + +SET(PyConsole_SOURCES + PyConsole_Console.cxx + PyConsole_Editor.cxx + PyConsole_Interp.cxx +) + +SET(GUITS_SOURCES + resources/PyConsole_msg_en.ts + resources/PyConsole_msg_fr.ts +) + +ADD_LIBRARY(PyConsole SHARED ${PyConsole_SOURCES} ${GUI_HEADERS_MOC}) +SET_TARGET_PROPERTIES(PyConsole PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}") +TARGET_LINK_LIBRARIES(PyConsole ${COMMON_LIBS}) +INSTALL(TARGETS PyConsole DESTINATION ${GUI_salomelib_LIBS}) + +SET(COMMON_HEADERS_H + PyConsole.h + PyConsole_Console.h + PyConsole_Editor.h + PyConsole_Interp.h +) +INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${GUI_salomeinclude_HEADERS}) +QT4_INSTALL_TS_RESOURCES("${GUITS_SOURCES}" "${GUI_salomeres_DATA}") + diff --git a/src/PyInterp/CMakeLists.txt b/src/PyInterp/CMakeLists.txt new file mode 100755 index 000000000..d53efed70 --- /dev/null +++ b/src/PyInterp/CMakeLists.txt @@ -0,0 +1,50 @@ +# Copyright (C) 2012 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. +# +# 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(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/UseQT4EXT.cmake) + +INCLUDE_DIRECTORIES( + ${QT_INCLUDE_DIRS} + ${PYTHON_INCLUDE_DIRS} + ${KERNEL_ROOT_DIR}/include/salome + ${CMAKE_CURRENT_SOURCE_DIR}/../Event +) + +SET(COMMON_FLAGS "${QT_DEFINITIONS} ${PYTHON_DEFINITIONS} ${PLATFORM_DEFINITIONS}") +SET(COMMON_LIBS ${PYTHON_LIBS} ${QT_LIBS} Event) + +SET(GUI_HEADERS PyInterp_Watcher.h) +QT4_WRAP_CPP(GUI_HEADERS_MOC ${GUI_HEADERS}) + +SET(PyInterp_SOURCES + PyInterp_Interp.cxx + PyInterp_Dispatcher.cxx +) + +ADD_LIBRARY(PyInterp SHARED ${PyInterp_SOURCES} ${GUI_HEADERS_MOC}) +SET_TARGET_PROPERTIES(PyInterp PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}") +TARGET_LINK_LIBRARIES(PyInterp ${COMMON_LIBS}) +INSTALL(TARGETS PyInterp DESTINATION ${GUI_salomelib_LIBS}) + +SET(COMMON_HEADERS_H + PyInterp.h + PyInterp_Interp.h + PyInterp_Dispatcher.h +) +INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${GUI_salomeinclude_HEADERS}) diff --git a/src/QDS/CMakeLists.txt b/src/QDS/CMakeLists.txt new file mode 100755 index 000000000..599c3b33f --- /dev/null +++ b/src/QDS/CMakeLists.txt @@ -0,0 +1,84 @@ +# Copyright (C) 2012 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. +# +# 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(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/UseQT4EXT.cmake) + +INCLUDE_DIRECTORIES( + ${CAS_INCLUDE_DIRS} + ${PTHREAD_INCLUDE_DIRS} + ${QT_INCLUDE_DIRS} + ${KERNEL_ROOT_DIR}/include/salome + ${CMAKE_CURRENT_SOURCE_DIR}/../Qtx + ${CMAKE_CURRENT_SOURCE_DIR}/../DDS +) + +SET(COMMON_FLAGS "${QT_DEFINITIONS} ${CAS_DEFINITIONS} ${PLATFORM_DEFINITIONS}") +SET(COMMON_LIBS ${QT_MT_LIBS} ${CAS_KERNEL} DDS qtx) + +SET(GUI_HEADERS + QDS_CheckBox.h + QDS_ComboBox.h + QDS_Datum.h + QDS_LineEdit.h + QDS_SpinBox.h + QDS_SpinBoxDbl.h + QDS_TextEdit.h + QDS_RadioBox.h +) +QT4_WRAP_CPP(GUI_HEADERS_MOC ${GUI_HEADERS}) + +SET(QDS_SOURCES + QDS.cxx + QDS_CheckBox.cxx + QDS_ComboBox.cxx + QDS_Datum.cxx + QDS_LineEdit.cxx + QDS_SpinBox.cxx + QDS_SpinBoxDbl.cxx + QDS_TextEdit.cxx + QDS_Validator.cxx + QDS_RadioBox.cxx +) + +SET(GUITS_SOURCES + resources/QDS_msg_en.ts + resources/QDS_msg_fr.ts +) + +ADD_LIBRARY(QDS SHARED ${QDS_SOURCES} ${GUI_HEADERS_MOC}) +SET_TARGET_PROPERTIES(QDS PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}") +TARGET_LINK_LIBRARIES(QDS ${COMMON_LIBS}) +INSTALL(TARGETS QDS DESTINATION ${GUI_salomelib_LIBS}) + +SET(COMMON_HEADERS_H + QDS.h + QDS_CheckBox.h + QDS_ComboBox.h + QDS_Datum.h + QDS_LineEdit.h + QDS_SpinBox.h + QDS_SpinBoxDbl.h + QDS_TextEdit.h + QDS_Validator.h + QDS_RadioBox.h +) + +INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${GUI_salomeinclude_HEADERS}) +QT4_INSTALL_TS_RESOURCES("${GUITS_SOURCES}" "${GUI_salomeres_DATA}") + diff --git a/src/Qtx/CMakeLists.txt b/src/Qtx/CMakeLists.txt new file mode 100755 index 000000000..6a3cba8de --- /dev/null +++ b/src/Qtx/CMakeLists.txt @@ -0,0 +1,184 @@ +# Copyright (C) 2012 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. +# +# 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(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/UseQT4EXT.cmake) + +INCLUDE_DIRECTORIES( + ${QT_INCLUDE_DIRS} +) + +SET(GUI_HEADERS + QtxAction.h + QtxActionGroup.h + QtxActionMenuMgr.h + QtxActionMgr.h + QtxActionSet.h + QtxActionToolMgr.h + QtxBackgroundTool.h + QtxBiColorTool.h + QtxColorButton.h + QtxColorScale.h + QtxComboBox.h + QtxDialog.h + QtxDockAction.h + QtxDockWidget.h + QtxDoubleSpinBox.h + QtxFontEdit.h + QtxGridBox.h + QtxGroupBox.h + QtxIntSpinBox.h + QtxListAction.h + QtxTreeView.h + QtxLogoMgr.h + QtxMainWindow.h + QtxMenu.h + QtxMultiAction.h + QtxMRUAction.h + QtxPagePrefMgr.h + QtxPathDialog.h + QtxPathEdit.h + QtxPathListEdit.h + QtxPopupMgr.h + QtxRubberBand.h + QtxSearchTool.h + QtxShortcutEdit.h + QtxSplash.h + QtxToolBar.h + QtxToolTip.h + QtxValidator.h + QtxWorkspace.h + QtxWorkspaceAction.h + QtxWorkstack.h + QtxWorkstackAction.h + QtxWebBrowser.h +) +QT4_WRAP_CPP(GUI_HEADERS_MOC ${GUI_HEADERS}) + +SET(qtx_SOURCES + Qtx.cxx + QtxAction.cxx + QtxActionGroup.cxx + QtxActionMenuMgr.cxx + QtxActionMgr.cxx + QtxActionSet.cxx + QtxActionToolMgr.cxx + QtxBackgroundTool.cxx + QtxBiColorTool.cxx + QtxColorButton.cxx + QtxColorScale.cxx + QtxComboBox.cxx + QtxDialog.cxx + QtxDockAction.cxx + QtxDockWidget.cxx + QtxDoubleSpinBox.cxx + QtxEvalExpr.cxx + QtxFontEdit.cxx + QtxGridBox.cxx + QtxGroupBox.cxx + QtxIntSpinBox.cxx + QtxListAction.cxx + QtxTreeView.cxx + QtxLogoMgr.cxx + QtxMainWindow.cxx + QtxMenu.cxx + QtxMultiAction.cxx + QtxMRUAction.cxx + QtxPagePrefMgr.cxx + QtxPathDialog.cxx + QtxPathEdit.cxx + QtxPathListEdit.cxx + QtxPopupMgr.cxx + QtxPreferenceMgr.cxx + QtxResourceMgr.cxx + QtxRubberBand.cxx + QtxSearchTool.cxx + QtxShortcutEdit.cxx + QtxSplash.cxx + QtxToolBar.cxx + QtxToolTip.cxx + QtxTranslator.cxx + QtxValidator.cxx + QtxWorkspace.cxx + QtxWorkspaceAction.cxx + QtxWorkstack.cxx + QtxWorkstackAction.cxx + QtxWebBrowser.cxx +) +SET(GUITS_SOURCES + resources/Qtx_msg_fr.ts +) + +ADD_LIBRARY(qtx SHARED ${qtx_SOURCES} ${GUI_HEADERS_MOC}) +SET_TARGET_PROPERTIES(qtx PROPERTIES COMPILE_FLAGS "${QT_DEFINITIONS} ${PLATFORM_DEFINITIONS}") +TARGET_LINK_LIBRARIES(qtx ${QT_MT_LIBS} ${OGL_LIBS}) +INSTALL(TARGETS qtx DESTINATION ${GUI_salomelib_LIBS}) + +SET(COMMON_HEADERS_H + Qtx.h + QtxAction.h + QtxActionGroup.h + QtxActionMenuMgr.h + QtxActionMgr.h + QtxActionSet.h + QtxActionToolMgr.h + QtxBackgroundTool.h + QtxBiColorTool.h + QtxColorButton.h + QtxColorScale.h + QtxComboBox.h + QtxDialog.h + QtxDockAction.h + QtxDockWidget.h + QtxDoubleSpinBox.h + QtxEvalExpr.h + QtxFontEdit.h + QtxGridBox.h + QtxGroupBox.h + QtxIntSpinBox.h + QtxListAction.h + QtxTreeView.h + QtxLogoMgr.h + QtxMainWindow.h + QtxMap.h + QtxMenu.h + QtxMultiAction.h + QtxMRUAction.h + QtxPagePrefMgr.h + QtxPathDialog.h + QtxPathEdit.h + QtxPathListEdit.h + QtxPopupMgr.h + QtxPreferenceMgr.h + QtxResourceMgr.h + QtxRubberBand.h + QtxSearchTool.h + QtxShortcutEdit.h + QtxSplash.h + QtxToolBar.h + QtxToolTip.h + QtxTranslator.h + QtxValidator.h + QtxWorkspace.h + QtxWorkspaceAction.h + QtxWorkstack.h + QtxWorkstackAction.h + QtxWebBrowser.h +) +INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${GUI_salomeinclude_HEADERS}) +QT4_INSTALL_TS_RESOURCES("${GUITS_SOURCES}" "${GUI_salomeres_DATA}") diff --git a/src/Qtx/Qtx.cxx b/src/Qtx/Qtx.cxx index 90dfb5620..5eb043cc3 100755 --- a/src/Qtx/Qtx.cxx +++ b/src/Qtx/Qtx.cxx @@ -391,7 +391,7 @@ QString Qtx::file( const QString& path, bool withExt ) if ( withExt ) return QFileInfo( fPath ).fileName(); else - return QFileInfo( fPath ).baseName(); + return QFileInfo( fPath ).completeBaseName(); } /*! diff --git a/src/Qtx/QtxBiColorTool.cxx b/src/Qtx/QtxBiColorTool.cxx index 8eae5a038..df1456a2c 100644 --- a/src/Qtx/QtxBiColorTool.cxx +++ b/src/Qtx/QtxBiColorTool.cxx @@ -28,6 +28,8 @@ #include #include #include +#include +#include const int BICOLOR_MAX_DELTA = 100; @@ -41,8 +43,8 @@ class QtxBiColorTool::ColorLabel: public QFrame public: ColorLabel( QWidget* parent) : QFrame( parent ) { - setFrameStyle( QFrame::Box | QFrame::Plain ); - setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ); + setFrameStyle( QFrame::Panel | QFrame::Raised ); + //setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ); } ~ColorLabel() {} QSize sizeHint() const @@ -51,21 +53,48 @@ public: } QSize minimumSizeHint() const { - int pm = style()->pixelMetric(QStyle::PM_ButtonMargin); - QFontMetrics fm ( font() ); - return QSize( fm.height() + pm, fm.height() + pm ); + if ( !mySizeHint.isValid() ) { + int is = style()->pixelMetric( QStyle::PM_ButtonIconSize, 0, this ); + int pm = style()->pixelMetric( QStyle::PM_ButtonMargin ); + ColorLabel* that = const_cast( this ); + that->mySizeHint = QSize( is + pm, is + pm ); + } + return mySizeHint; } void paintEvent( QPaintEvent* e ) { - QPainter p( this ); - drawFrame( &p ); - QRect r = contentsRect(); + QStylePainter sp(this); + QStyleOptionButton option; + option.initFrom(this); + option.features = QStyleOptionButton::None; + option.state |= QStyle::State_Raised; + sp.drawControl( QStyle::CE_PushButton, option ); + + QRect r = rect(); + r.setTopLeft( r.topLeft() + QPoint( 2, 2 ) ); + r.setBottomRight( r.bottomRight() - QPoint( 2, 2 ) ); + + QPixmap pix( r.size() ); + pix.fill( palette().color( backgroundRole() ) ); + if ( myColor.isValid() ) { - p.fillRect( r, QBrush( myColor ) ); + QPainter pixp( &pix ); + pixp.setPen( isEnabled() ? Qt::black : palette().mid().color() ); + pixp.fillRect( 1, 1, pix.width()-3, pix.height()- 3, QBrush( isEnabled() ? myColor : palette().mid().color() ) ); + pixp.drawRect( 1, 1, pix.width()-3, pix.height()- 3 ); + pixp.end(); } else { - p.fillRect( r, QBrush( palette().color( foregroundRole() ), Qt::BDiagPattern ) ); + QPainter pixp( &pix ); + pixp.setPen( palette().color( isEnabled() ? QPalette::WindowText : QPalette::Mid ) ); + pixp.drawRect( 2, 2, pix.width() - 4, pix.height() - 4 ); + pixp.fillRect( 3, 3, pix.width() - 6, pix.height() - 6, + QBrush( palette().color( isEnabled() ? QPalette::WindowText : QPalette::Mid ), Qt::BDiagPattern ) ); + pixp.end(); } + + QPainter p( this ); + p.drawPixmap( r, pix ); p.end(); } void setColor( const QColor& c ) @@ -75,6 +104,7 @@ public: } private: + QSize mySizeHint; QColor myColor; }; @@ -98,7 +128,7 @@ QtxBiColorTool::QtxBiColorTool( QWidget* parent ) l->setSpacing( 5 ); myMainColor = new QtxColorButton( this ); - myMainColor->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ); + //myMainColor->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ); myExtraText = new QLabel( this ); myRuler = new QSlider( Qt::Horizontal, this ); myRuler->setMinimum( -BICOLOR_MAX_DELTA ); @@ -113,6 +143,7 @@ QtxBiColorTool::QtxBiColorTool( QWidget* parent ) l->addWidget( myExtraText ); l->addWidget( myRuler ); l->addWidget( myDelta ); + myRuler->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ); connect( myMainColor, SIGNAL( changed( QColor ) ), this, SLOT( updateState() ) ); connect( myRuler, SIGNAL( valueChanged( int ) ), this, SLOT( updateState() ) ); @@ -207,6 +238,15 @@ void QtxBiColorTool::setText( const QString& txt ) myExtraText->setText( txt ); } +/*! + \brief Get access to the internal label use for drawing + auxiliary test assigned to the widget +*/ +QLabel* QtxBiColorTool::label() +{ + return myExtraText; +} + /*! \brief Update widget state */ diff --git a/src/Qtx/QtxBiColorTool.h b/src/Qtx/QtxBiColorTool.h index 40eca44ab..39692b7ba 100644 --- a/src/Qtx/QtxBiColorTool.h +++ b/src/Qtx/QtxBiColorTool.h @@ -53,6 +53,8 @@ public: QString text() const; void setText( const QString& ); + QLabel* label(); + private slots: void updateState(); diff --git a/src/Qtx/QtxPagePrefMgr.cxx b/src/Qtx/QtxPagePrefMgr.cxx index 8ce69e23d..5db47925c 100644 --- a/src/Qtx/QtxPagePrefMgr.cxx +++ b/src/Qtx/QtxPagePrefMgr.cxx @@ -47,6 +47,7 @@ #include #include #include +#include #include @@ -1198,7 +1199,7 @@ void QtxPagePrefTabsItem::updateTabs() \param param resource file parameter associated with the preference item */ QtxPagePrefFrameItem::QtxPagePrefFrameItem( const QString& title, QtxPreferenceItem* parent, - const QString& sect, const QString& param ) + const QString& sect, const QString& param, const bool scrollable ) : QtxPagePrefItem( title, parent, sect, param ) { QWidget* main = new QWidget(); @@ -1207,7 +1208,15 @@ QtxPagePrefFrameItem::QtxPagePrefFrameItem( const QString& title, QtxPreferenceI base->setSpacing( 0 ); base->addWidget( myBox = new QtxGridBox( 1, Qt::Horizontal, main, 5, 5 ) ); - base->addItem( new QSpacerItem( 0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding ) ); + base->addStretch(); + + if ( scrollable ) { + QScrollArea* scroll = new QScrollArea(); + scroll->setWidget( main ); + scroll->setWidgetResizable( true ); + base->layout()->setSizeConstraint(QLayout::SetMinAndMaxSize); + main = scroll; + } setWidget( main ); } diff --git a/src/Qtx/QtxPagePrefMgr.h b/src/Qtx/QtxPagePrefMgr.h index 74cca6d31..65549b42a 100644 --- a/src/Qtx/QtxPagePrefMgr.h +++ b/src/Qtx/QtxPagePrefMgr.h @@ -253,7 +253,7 @@ class QTX_EXPORT QtxPagePrefFrameItem : public QtxPagePrefItem { public: QtxPagePrefFrameItem( const QString&, QtxPreferenceItem* = 0, - const QString& = QString(), const QString& = QString() ); + const QString& = QString(), const QString& = QString(), const bool = false ); virtual ~QtxPagePrefFrameItem(); virtual void updateContents(); diff --git a/src/Qtx/QtxResourceMgr.cxx b/src/Qtx/QtxResourceMgr.cxx index 946374411..51a9630df 100644 --- a/src/Qtx/QtxResourceMgr.cxx +++ b/src/Qtx/QtxResourceMgr.cxx @@ -2860,7 +2860,11 @@ QString QtxResourceMgr::userFileName( const QString& appName, const bool /*for_l #ifdef WIN32 fileName = QString( "%1.%2" ).arg( appName ).arg( currentFormat() ); #else - fileName = QString( ".%1rc" ).arg( appName ); + fileName = QString( "%1rc" ).arg( appName ); + // VSR 24/09/2012: issue 0021781: do not prepend filename with "." + // when user file is stored in ~/.config/ directory + if ( cfgAppName.isEmpty() ) + fileName.prepend( "." ); #endif if ( !fileName.isEmpty() ) diff --git a/src/Qtx/QtxTreeView.cxx b/src/Qtx/QtxTreeView.cxx index b12d039e9..5c4f3c665 100644 --- a/src/Qtx/QtxTreeView.cxx +++ b/src/Qtx/QtxTreeView.cxx @@ -142,6 +142,7 @@ void QtxTreeView::Header::contextMenuEvent( QContextMenuEvent* e ) view->emitSortingEnabled( a->isChecked() ); if ( a->isChecked() ) { connect( this, SIGNAL( sectionClicked( int ) ), view, SLOT( onHeaderClicked( int ) ) ); + setSortIndicator( 0, Qt::AscendingOrder ); view->sortByColumn( sortIndicatorSection(), sortIndicatorOrder() ); } else { diff --git a/src/Qtx/QtxWebBrowser.cxx b/src/Qtx/QtxWebBrowser.cxx index 79e34bc8c..abd715030 100644 --- a/src/Qtx/QtxWebBrowser.cxx +++ b/src/Qtx/QtxWebBrowser.cxx @@ -154,6 +154,12 @@ QtxWebBrowser::QtxWebBrowser() : QMainWindow( 0 ) QWidget* frame = new QWidget( this ); myWebView = new QWebView( frame ); + + QAction *copyAction = myWebView->pageAction(QWebPage::Copy); + copyAction->setShortcut(QKeySequence::Copy); + myWebView->addAction(copyAction); + + myWebView->page()->setLinkDelegationPolicy( QWebPage::DelegateAllLinks ); myFindPanel = new QtxSearchTool( frame, myWebView, QtxSearchTool::Basic | QtxSearchTool::Case | QtxSearchTool::Wrap, diff --git a/src/QxGraph/CMakeLists.txt b/src/QxGraph/CMakeLists.txt new file mode 100755 index 000000000..2d3dba532 --- /dev/null +++ b/src/QxGraph/CMakeLists.txt @@ -0,0 +1,80 @@ +# Copyright (C) 2012 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. +# +# 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(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/UseQT4EXT.cmake) + +INCLUDE_DIRECTORIES( + ${CAS_INCLUDE_DIRS} + ${QT_INCLUDE_DIRS} + ${BOOST_INCLUDE_DIRS} + ${PYTHON_INCLUDE_DIRS} + ${KERNEL_ROOT_DIR}/include/salome + ${CMAKE_CURRENT_SOURCE_DIR}/../Qtx + ${CMAKE_CURRENT_SOURCE_DIR}/../SUIT +) + +SET(COMMON_FLAGS "${QT_DEFINITIONS} ${CAS_DEFINITIONS} ${BOOST_DEFINITIONS} ${PYTHON_DEFINITIONS} ${PLATFORM_DEFINITIONS}") +SET(COMMON_LIBS ${QT_MT_LIBS} suit) + +SET(GUI_HEADERS + QxGraph_Canvas.h + QxGraph_CanvasView.h + QxGraph_ViewWindow.h + QxGraph_ViewManager.h + QxGraph_ViewModel.h +) +QT4_WRAP_CPP(GUI_HEADERS_MOC ${GUI_HEADERS}) + +SET(QxGraph_SOURCES + QxGraph_Prs.cxx + QxGraph_Canvas.cxx + QxGraph_CanvasView.cxx + QxGraph_ViewWindow.cxx + QxGraph_ViewManager.cxx + QxGraph_ViewModel.cxx +) + +SET(GUITS_SOURCES + resources/QxGraph_images.ts + resources/QxGraph_msg_en.ts + resources/QxGraph_msg_fr.ts +) + +ADD_LIBRARY(QxGraph SHARED ${QxGraph_SOURCES} ${GUI_HEADERS_MOC}) +SET_TARGET_PROPERTIES(QxGraph PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}") +TARGET_LINK_LIBRARIES(QxGraph ${COMMON_LIBS}) +INSTALL(TARGETS QxGraph DESTINATION ${GUI_salomelib_LIBS}) + +SET(COMMON_HEADERS_H + QxGraph_ActiveItem.h + QxGraph_Prs.h + QxGraph_Canvas.h + QxGraph_CanvasView.h + QxGraph_ViewWindow.h + QxGraph_ViewManager.h + QxGraph_ViewModel.h + QxGraph_Def.h + QxGraph.h +) + +INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${GUI_salomeinclude_HEADERS}) +QT4_INSTALL_TS_RESOURCES("${GUITS_SOURCES}" "${GUI_salomeres_DATA}") + +FILE(GLOB GUIPNG_DATA "${CMAKE_CURRENT_SOURCE_DIR}/resources/*.png") +INSTALL(FILES ${GUIPNG_DATA} DESTINATION ${GUI_salomeres_DATA}) diff --git a/src/QxScene/CMakeLists.txt b/src/QxScene/CMakeLists.txt new file mode 100755 index 000000000..28defd202 --- /dev/null +++ b/src/QxScene/CMakeLists.txt @@ -0,0 +1,71 @@ +# Copyright (C) 2012 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. +# +# 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(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/UseQT4EXT.cmake) + +INCLUDE_DIRECTORIES( + ${CAS_INCLUDE_DIRS} + ${QT_INCLUDE_DIRS} + ${BOOST_INCLUDE_DIRS} + ${PYTHON_INCLUDE_DIRS} + ${KERNEL_ROOT_DIR}/include/salome + ${CMAKE_CURRENT_SOURCE_DIR}/../Qtx + ${CMAKE_CURRENT_SOURCE_DIR}/../SUIT +) + +SET(COMMON_FLAGS "${QT_DEFINITIONS} ${CAS_DEFINITIONS} ${BOOST_DEFINITIONS} ${PYTHON_DEFINITIONS} ${PLATFORM_DEFINITIONS}") +SET(COMMON_LIBS ${QT_MT_LIBS} suit) + +SET(GUI_HEADERS + QxScene_ViewWindow.h + QxScene_ViewManager.h + QxScene_ViewModel.h +) +QT4_WRAP_CPP(GUI_HEADERS_MOC ${GUI_HEADERS}) + +SET(QxScene_SOURCES + QxScene_ViewWindow.cxx + QxScene_ViewManager.cxx + QxScene_ViewModel.cxx +) + +SET(GUITS_SOURCES + resources/QxSceneViewer_images.ts + resources/QxSceneViewer_msg_en.ts + resources/QxSceneViewer_msg_fr.ts +) + +ADD_LIBRARY(QxScene SHARED ${QxScene_SOURCES} ${GUI_HEADERS_MOC}) +SET_TARGET_PROPERTIES(QxScene PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}") +TARGET_LINK_LIBRARIES(QxScene ${COMMON_LIBS}) +INSTALL(TARGETS QxScene DESTINATION ${GUI_salomelib_LIBS}) + +SET(COMMON_HEADERS_H + QxScene_ViewWindow.h + QxScene_ViewManager.h + QxScene_ViewModel.h + QxScene_Def.h + QxScene.h +) + +INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${GUI_salomeinclude_HEADERS}) +QT4_INSTALL_TS_RESOURCES("${GUITS_SOURCES}" "${GUI_salomeres_DATA}") + +FILE(GLOB GUIPNG_DATA "${CMAKE_CURRENT_SOURCE_DIR}/resources/*.png") +INSTALL(FILES ${GUIPNG_DATA} DESTINATION ${GUI_salomeres_DATA}) diff --git a/src/ResExporter/CMakeLists.txt b/src/ResExporter/CMakeLists.txt new file mode 100755 index 000000000..169503b37 --- /dev/null +++ b/src/ResExporter/CMakeLists.txt @@ -0,0 +1,36 @@ +# Copyright (C) 2012 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. +# +# 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_DIRECTORIES( + ${QT_INCLUDE_DIRS} + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_BINARY_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/../Qtx + ${CMAKE_CURRENT_SOURCE_DIR}/../SUIT +) + +SET(COMMON_FLAGS "${QT_DEFINITIONS} ${PLATFORM_DEFINITIONS}") + +SET(COMMON_LIBS qtx suit ${QT_LIBS}) + +ADD_EXECUTABLE(ResourceExporter ResourceExporter.cxx) +SET_TARGET_PROPERTIES(ResourceExporter PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}") +TARGET_LINK_LIBRARIES(ResourceExporter SUITApp ${COMMON_LIBS}) +INSTALL(TARGETS ResourceExporter DESTINATION ${GUI_salomebin_BINS}) + diff --git a/src/SALOME_PY/CMakeLists.txt b/src/SALOME_PY/CMakeLists.txt new file mode 100755 index 000000000..8322d0186 --- /dev/null +++ b/src/SALOME_PY/CMakeLists.txt @@ -0,0 +1,65 @@ +# Copyright (C) 2012 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. +# +# 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_DIRECTORIES( + ${CAS_INCLUDE_DIRS} + ${QT_INCLUDE_DIRS} + ${PYTHON_INCLUDE_DIRS} + ${BOOST_INCLUDE_DIRS} + ${VTK_INCLUDE_DIRS} + ${PTHREAD_INCLUDE_DIRS} + ${KERNEL_ROOT_DIR}/include/salome + ${CMAKE_CURRENT_SOURCE_DIR}/../LightApp + ${CMAKE_CURRENT_SOURCE_DIR}/../Event + ${CMAKE_CURRENT_SOURCE_DIR}/../Session + ${CMAKE_CURRENT_SOURCE_DIR}/../SVTK + ${CMAKE_CURRENT_SOURCE_DIR}/../Qtx + ${CMAKE_CURRENT_SOURCE_DIR}/../SUIT + ${CMAKE_CURRENT_SOURCE_DIR}/../CAM + ${CMAKE_CURRENT_SOURCE_DIR}/../STD + ${CMAKE_CURRENT_SOURCE_DIR}/../VTKViewer + ${CMAKE_CURRENT_SOURCE_DIR}/../OBJECT +) + +SET(COMMON_FLAGS "-DHAVE_CONFIG_H ${CAS_DEFINITIONS} ${QT_DEFINITIONS} ${BOOST_DEFINITIONS} ${VTK_DEFINITIONS} ${PYTHON_DEFINITIONS} ${PLATFORM_DEFINITIONS}") + +SET(COMMON_LIBS + ${PYTHON_LIBS} + ${QT_MT_LIBS} + ${VTK_LIBS} + ${OGL_LIBS} + LightApp + ${vtkCommonPythonD} + ${vtkGraphicsPythonD} + ${vtkImagingPythonD} + ${vtkPythonCore} +) + +ADD_LIBRARY(SalomePy SHARED SalomePy.cxx) +SET_TARGET_PROPERTIES(SalomePy PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}") +TARGET_LINK_LIBRARIES(SalomePy ${COMMON_LIBS}) +INSTALL(TARGETS SalomePy DESTINATION ${GUI_salomelib_LIBS}) + +IF(WINDOWS) + IF(CMAKE_BUILD_TYPE STREQUAL Release) + INSTALL(FILES ${CMAKE_INSTALL_PREFIX}/${GUI_salomelib_LIBS}/SalomePy.dll DESTINATION ${GUI_salomelib_LIBS} RENAME libSalomePy.pyd) + ELSE(CMAKE_BUILD_TYPE STREQUAL Release) + INSTALL(FILES ${CMAKE_INSTALL_PREFIX}/${GUI_salomelib_LIBS}/SalomePy.dll DESTINATION ${GUI_salomelib_LIBS} RENAME libSalomePy_d.pyd) + ENDIF(CMAKE_BUILD_TYPE STREQUAL Release) +ENDIF(WINDOWS) diff --git a/src/SALOME_PYQT/CMakeLists.txt b/src/SALOME_PYQT/CMakeLists.txt new file mode 100755 index 000000000..e9134d20f --- /dev/null +++ b/src/SALOME_PYQT/CMakeLists.txt @@ -0,0 +1,25 @@ +# Copyright (C) 2012 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. +# +# 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 +# + +ADD_SUBDIRECTORY(SALOME_PYQT_GUILight) +ADD_SUBDIRECTORY(SalomePyQt) + +IF(GUI_ENABLE_CORBA) + ADD_SUBDIRECTORY(SALOME_PYQT_GUI) +ENDIF(GUI_ENABLE_CORBA) diff --git a/src/SALOME_PYQT/SALOME_PYQT_GUI/CMakeLists.txt b/src/SALOME_PYQT/SALOME_PYQT_GUI/CMakeLists.txt new file mode 100755 index 000000000..28ca986be --- /dev/null +++ b/src/SALOME_PYQT/SALOME_PYQT_GUI/CMakeLists.txt @@ -0,0 +1,72 @@ +# Copyright (C) 2012 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. +# +# 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_DIRECTORIES( + ${CAS_INCLUDE_DIRS} + ${QT_INCLUDE_DIRS} + ${PTHREAD_INCLUDE_DIRS} + ${PYTHON_INCLUDE_DIRS} + ${SIP_INCLUDE_DIRS} + ${BOOST_INCLUDE_DIRS} + ${PYTHON_INCLUDE_DIRS} + ${VTK_INCLUDE_DIRS} + ${OMNIORB_INCLUDE_DIRS} + ${KERNEL_ROOT_DIR}/include/salome + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/../../PyInterp + ${CMAKE_CURRENT_SOURCE_DIR}/../../SalomeApp + ${CMAKE_CURRENT_SOURCE_DIR}/../../SUIT + ${CMAKE_CURRENT_SOURCE_DIR}/../../Qtx + ${CMAKE_CURRENT_SOURCE_DIR}/../../LightApp + ${CMAKE_CURRENT_SOURCE_DIR}/../SALOME_PYQT_GUILight + ${CMAKE_CURRENT_SOURCE_DIR}/../../Plot2d + ${CMAKE_CURRENT_SOURCE_DIR}/../../OCCViewer + ${CMAKE_CURRENT_SOURCE_DIR}/../../SalomeApp + ${CMAKE_CURRENT_SOURCE_DIR}/../../CAM + ${CMAKE_CURRENT_SOURCE_DIR}/../../STD +) + +SET(COMMON_FLAGS "-DCALL_OLD_METHODS -DHAVE_CONFIG_H ${QT_DEFINITIONS} ${PYTHON_DEFINITIONS} ${CAS_DEFINITIONS} ${BOOST_DEFINITIONS} ${VTK_DEFINITIONS} ${CORBA_DEFINITIONS} ${PLATFORM_DEFINITIONS}") +SET(COMMON_LIBS + ${PYTHON_LIBS} + ${PYQT_LIBS} + ${VTK_LIBS} + ${OGL_LIBS} + ${PLATFORM_LIBS} + PyInterp + SalomeApp + OCCViewer + Plot2d + SalomePyQtGUILight +) + +SET(GUI_HEADERS SALOME_PYQT_Module.h) +QT4_WRAP_CPP(GUI_HEADERS_MOC ${GUI_HEADERS}) + +ADD_LIBRARY(SalomePyQtGUI SHARED SALOME_PYQT_Module.cxx ${GUI_HEADERS_MOC}) +SET_TARGET_PROPERTIES(SalomePyQtGUI PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}") +TARGET_LINK_LIBRARIES(SalomePyQtGUI ${COMMON_LIBS}) +INSTALL(TARGETS SalomePyQtGUI DESTINATION ${GUI_salomelib_LIBS}) + +SET(COMMON_HEADERS_H + SALOME_PYQT_GUI.h + SALOME_PYQT_Module.h +) + +INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${GUI_salomeinclude_HEADERS}) diff --git a/src/SALOME_PYQT/SALOME_PYQT_GUILight/CMakeLists.txt b/src/SALOME_PYQT/SALOME_PYQT_GUILight/CMakeLists.txt new file mode 100755 index 000000000..b8e534ac4 --- /dev/null +++ b/src/SALOME_PYQT/SALOME_PYQT_GUILight/CMakeLists.txt @@ -0,0 +1,101 @@ +# Copyright (C) 2012 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. +# +# 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_DIRECTORIES( + ${CAS_INCLUDE_DIRS} + ${QT_INCLUDE_DIRS} + ${SIP_INCLUDE_DIRS} + ${BOOST_INCLUDE_DIRS} + ${PYTHON_INCLUDE_DIRS} + ${VTK_INCLUDE_DIRS} + ${PTHREAD_INCLUDE_DIRS} + ${KERNEL_ROOT_DIR}/include/salome + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/../../PyInterp + ${CMAKE_CURRENT_SOURCE_DIR}/../../PyConsole + ${CMAKE_CURRENT_SOURCE_DIR}/../../SUIT + ${CMAKE_CURRENT_SOURCE_DIR}/../../Qtx + ${CMAKE_CURRENT_SOURCE_DIR}/../../LightApp + ${CMAKE_CURRENT_SOURCE_DIR}/../../Plot2d + ${CMAKE_CURRENT_SOURCE_DIR}/../../OCCViewer + ${CMAKE_CURRENT_SOURCE_DIR}/../../CAM + ${CMAKE_CURRENT_SOURCE_DIR}/../../STD + ${CMAKE_CURRENT_SOURCE_DIR}/../../SUITApp + ${CMAKE_CURRENT_SOURCE_DIR}/../../CAM + ${CMAKE_CURRENT_SOURCE_DIR}/../../STD +) + +SET(COMMON_FLAGS "-DHAVE_CONFIG_H -DCALL_OLD_METHODS ${QT_DEFINITIONS} ${CAS_DEFINITIONS} ${BOOST_DEFINITIONS} ${VTK_DEFINITIONS} ${PYTHON_DEFINITIONS} ${PLATFORM_DEFINITIONS}") +SET(COMMON_LIBS ${PYTHON_LIBS} ${PYQT_LIBS} ${VTK_LIBS} ${OGL_LIBS} PyInterp LightApp) + +IF(GUI_ENABLE_CORBA) + INCLUDE_DIRECTORIES( + ${CMAKE_CURRENT_SOURCE_DIR}/../../SalomeApp + ${OMNIORB_INCLUDE_DIRS} + ) + SET(COMMON_LIBS ${COMMON_LIBS} SalomeApp ${SalomeContainer}) +ELSE(GUI_ENABLE_CORBA) + SET(COMMON_FLAGS "${COMMON_FLAGS} -DGUI_DISABLE_CORBA") +ENDIF(GUI_ENABLE_CORBA) + +SET(GUI_HEADERS SALOME_PYQT_ModuleLight.h SALOME_PYQT_DataModelLight.h) +QT4_WRAP_CPP(GUI_HEADERS_MOC ${GUI_HEADERS}) + +# extra source files (generated by sip) +SET(SIP_SRC + sipAPISalomePyQtGUILight.h + sipSalomePyQtGUILightcmodule.cc +) +# Sip definition file +SET(SIP_FILES + SALOME_PYQT_GUILight.sip +) +FOREACH(input ${SIP_FILES}) + SET(input ${CMAKE_CURRENT_SOURCE_DIR}/${input}) + SET(output) + FOREACH(out ${SIP_SRC}) + SET(output ${output} ${CMAKE_CURRENT_BINARY_DIR}/${out}) + ENDFOREACH(out ${SIP_SRC}) + ADD_CUSTOM_COMMAND( + OUTPUT ${output} + COMMAND ${SIP_EXECUTABLE} ${PYQT_SIPFLAGS} ${input} + MAIN_DEPENDENCY ${input} + ) +ENDFOREACH(input ${SIP_FILES}) + + +SET(SalomePyQtGUI_SOURCES + SALOME_PYQT_ModuleLight.cxx + SALOME_PYQT_DataObjectLight.cxx + SALOME_PYQT_DataModelLight.cxx + SALOME_PYQT_PyInterp.cxx +) +ADD_LIBRARY(SalomePyQtGUILight SHARED ${SalomePyQtGUI_SOURCES} ${GUI_HEADERS_MOC} ${SIP_SRC}) +SET_TARGET_PROPERTIES(SalomePyQtGUILight PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}") +TARGET_LINK_LIBRARIES(SalomePyQtGUILight ${COMMON_LIBS}) +INSTALL(TARGETS SalomePyQtGUILight DESTINATION ${GUI_salomelib_LIBS}) + +SET(COMMON_HEADERS_H + SALOME_PYQT_GUILight.h + SALOME_PYQT_ModuleLight.h + SALOME_PYQT_DataObjectLight.h + SALOME_PYQT_DataModelLight.h + SALOME_PYQT_PyInterp.h +) +INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${GUI_salomeinclude_HEADERS}) diff --git a/src/SALOME_PYQT/SalomePyQt/CMakeLists.txt b/src/SALOME_PYQT/SalomePyQt/CMakeLists.txt new file mode 100755 index 000000000..5d5ab7292 --- /dev/null +++ b/src/SALOME_PYQT/SalomePyQt/CMakeLists.txt @@ -0,0 +1,114 @@ +# Copyright (C) 2012 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. +# +# 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_DIRECTORIES( + ${CAS_INCLUDE_DIRS} + ${QT_INCLUDE_DIRS} + ${QWT_INCLUDE_DIRS} + ${SIP_INCLUDE_DIRS} + ${BOOST_INCLUDE_DIRS} + ${PYTHON_INCLUDE_DIRS} + ${PTHREAD_INCLUDE_DIRS} + ${VTK_INCLUDE_DIRS} + ${KERNEL_ROOT_DIR}/include/salome + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_BINARY_DIR}/idl + ${CMAKE_CURRENT_SOURCE_DIR}/../../SUIT + ${CMAKE_CURRENT_SOURCE_DIR}/../../CAM + ${CMAKE_CURRENT_SOURCE_DIR}/../../STD + ${CMAKE_CURRENT_SOURCE_DIR}/../../Qtx + ${CMAKE_CURRENT_SOURCE_DIR}/../../Event + ${CMAKE_CURRENT_SOURCE_DIR}/../../LogWindow + ${CMAKE_CURRENT_SOURCE_DIR}/../../VTKViewer + ${CMAKE_CURRENT_SOURCE_DIR}/../../OCCViewer + ${CMAKE_CURRENT_SOURCE_DIR}/../../Plot2d + ${CMAKE_CURRENT_SOURCE_DIR}/../SALOME_PYQT_GUILight + ${CMAKE_CURRENT_SOURCE_DIR}/../../PyInterp + ${CMAKE_CURRENT_SOURCE_DIR}/../../LightApp + ${CMAKE_CURRENT_SOURCE_DIR}/../../ObjBrowser + ${CMAKE_CURRENT_SOURCE_DIR}/../../OBJECT +) +# -DHAVE_CONFIG_H +SET(COMMON_FLAGS "${QWT_DEFINITIONS} ${QT_DEFINITIONS} ${CAS_DEFINITIONS} ${BOOST_DEFINITIONS} ${VTK_DEFINITIONS} ${PYTHON_DEFINITIONS} ${PLATFORM_DEFINITIONS}") +SET(COMMON_LIBS + ${PYTHON_LIBS} + ${SIP_LIBS} + ${PYQT_LIBS} + ${VTK_LIBS} + ${QWT_LIBS} + ${OGL_LIBS} + suit + CAM + std + qtx + Event + LogWindow + VTKViewer + SalomePyQtGUILight + OCCViewer + Plot2d +) + +SET(GUI_HEADERS SalomePyQt.h) +QT4_WRAP_CPP(GUI_HEADERS_MOC ${GUI_HEADERS}) + +# extra source files (generated by sip) +SET(SIP_SRC + sipAPISalomePyQt.h + sipSalomePyQtSalomePyQt.cc + sipSalomePyQtSALOME_Selection.cc + sipSalomePyQtQtxAction.cc + sipSalomePyQtQtxActionGroup.cc + sipSalomePyQtQtxActionSet.cc + sipSalomePyQtcmodule.cc +) +# Sip definition file +SET(SIP_FILES + SalomePyQt.sip +) +FOREACH(input ${SIP_FILES}) + SET(input ${CMAKE_CURRENT_SOURCE_DIR}/${input}) + SET(output) + FOREACH(out ${SIP_SRC}) + SET(output ${output} ${CMAKE_CURRENT_BINARY_DIR}/${out}) + ENDFOREACH(out ${SIP_SRC}) + ADD_CUSTOM_COMMAND( + OUTPUT ${output} + COMMAND ${SIP_EXECUTABLE} ${PYQT_SIPFLAGS} ${input} + MAIN_DEPENDENCY ${input} + ) +ENDFOREACH(input ${SIP_FILES}) + +SET(SalomePyQt_SOURCES SalomePyQt.cxx) + +ADD_LIBRARY(SalomePyQt SHARED ${SalomePyQt_SOURCES} ${GUI_HEADERS_MOC} ${SIP_SRC}) +SET_TARGET_PROPERTIES(SalomePyQt PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}") +TARGET_LINK_LIBRARIES(SalomePyQt ${COMMON_LIBS}) +INSTALL(TARGETS SalomePyQt DESTINATION ${GUI_salomelib_LIBS}) + +IF(WINDOWS) + IF(CMAKE_BUILD_TYPE STREQUAL Release) + INSTALL(FILES ${CMAKE_INSTALL_PREFIX}/${GUI_salomelib_LIBS}/SalomePyQt.dll DESTINATION ${GUI_salomelib_LIBS} RENAME SalomePyQt.pyd) + ELSE(CMAKE_BUILD_TYPE STREQUAL Release) + INSTALL(FILES ${CMAKE_INSTALL_PREFIX}/${GUI_salomelib_LIBS}/SalomePyQt.dll DESTINATION ${GUI_salomelib_LIBS} RENAME SalomePyQt_d.pyd) + ENDIF(CMAKE_BUILD_TYPE STREQUAL Release) +ELSE(WINDOWS) + INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/libSalomePyQt.so DESTINATION ${GUI_salomelib_LIBS} RENAME SalomePyQt.so) +ENDIF(WINDOWS) diff --git a/src/SALOME_SWIG/CMakeLists.txt b/src/SALOME_SWIG/CMakeLists.txt new file mode 100755 index 000000000..08943c209 --- /dev/null +++ b/src/SALOME_SWIG/CMakeLists.txt @@ -0,0 +1,101 @@ +# Copyright (C) 2012 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. +# +# 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 +# + +FIND_PACKAGE(SWIG REQUIRED) +INCLUDE(${SWIG_USE_FILE}) +INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/SalomeMacros.cmake) + +SET_SOURCE_FILES_PROPERTIES(libSALOME_Swig.i PROPERTIES CPLUSPLUS ON) +SET_SOURCE_FILES_PROPERTIES(libSALOME_Swig.i PROPERTIES SWIG_DEFINITIONS "-shadow") +SET_SOURCE_FILES_PROPERTIES(libSALOME_SwigPYTHON_wrap.cxx PROPERTIES COMPILE_FLAGS "-DHAVE_CONFIG_H") + +INCLUDE_DIRECTORIES( + ${PYTHON_INCLUDE_DIRS} + ${CAS_INCLUDE_DIRS} + ${QT_INCLUDE_DIRS} + ${QWT_INCLUDE_DIRS} + ${VTK_INCLUDE_DIRS} + ${BOOST_INCLUDE_DIRS} + ${PTHREAD_INCLUDE_DIRS} + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_BINARY_DIR}/salome_adm + ${CMAKE_BINARY_DIR}/idl + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/../LightApp + ${CMAKE_CURRENT_SOURCE_DIR}/../Qtx + ${CMAKE_CURRENT_SOURCE_DIR}/../SUIT + ${CMAKE_CURRENT_SOURCE_DIR}/../ObjBrowser + ${CMAKE_CURRENT_SOURCE_DIR}/../LightApp + ${CMAKE_CURRENT_SOURCE_DIR}/../SOCC + ${CMAKE_CURRENT_SOURCE_DIR}/../SVTK + ${CMAKE_CURRENT_SOURCE_DIR}/../Event + ${CMAKE_CURRENT_SOURCE_DIR}/../OBJECT + ${CMAKE_CURRENT_SOURCE_DIR}/../CAM + ${CMAKE_CURRENT_SOURCE_DIR}/../STD + ${CMAKE_CURRENT_SOURCE_DIR}/../OCCViewer + ${CMAKE_CURRENT_SOURCE_DIR}/../Prs + ${CMAKE_CURRENT_SOURCE_DIR}/../VTKViewer + ${CMAKE_CURRENT_SOURCE_DIR}/../SPlot2d + ${CMAKE_CURRENT_SOURCE_DIR}/../Plot2d +) + +SET(COMMON_FLAGS "${PYTHON_DEFINITIONS} ${CAS_DEFINITIONS} ${QT_DEFINITIONS} ${QWT_DEFINITIONS} ${VTK_DEFINITIONS} ${BOOST_DEFINITIONS} ${PLATFORM_DEFINITIONS}") + +SWIG_ADD_MODULE(libSALOME_Swig python libSALOME_Swig.i SALOMEGUI_Swig.cxx) +SWIG_LINK_LIBRARIES(libSALOME_Swig LightApp ${PYTHON_LIBS}) +SET_TARGET_PROPERTIES(_libSALOME_Swig PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}") + +IF(WINDOWS) + SET_TARGET_PROPERTIES(_libSALOME_Swig PROPERTIES DEBUG_OUTPUT_NAME _libSALOME_Swig_d) +ENDIF(WINDOWS) + +INSTALL(TARGETS _libSALOME_Swig DESTINATION ${GUI_salomepythondir}) + +SET(COMMON_HEADERS + libSALOME_Swig.i + SALOMEGUI_Swig.hxx + SALOMEGUI_Swig.i +) +INSTALL(FILES ${COMMON_HEADERS} DESTINATION ${GUI_salomeinclude_HEADERS}) +INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/libSALOME_Swig.py DESTINATION ${GUI_salomepythondir}) + +# +# =============================================================== +# Files to be installed +# =============================================================== +# +SET(PYTHON_FILES + examplevtk1.py + test_table.py + test_big_table.py + test_many_objects.py + test_remove_ref.py +) +SALOME_INSTALL_SCRIPTS("${PYTHON_FILES}" ${GUI_salomescript_DATA}) +SALOME_INSTALL_SCRIPTS("SALOMEGUI_shared_modules.py" ${GUI_sharedpkgpython_PYTHON}) + +CONFIGURE_FILE(supervisionexample.py.in supervisionexample.py @ONLY) +CONFIGURE_FILE(supervisiongeomexample.py.in supervisiongeomexample.py @ONLY) +SET(script_DATA + ${CMAKE_CURRENT_BINARY_DIR}/libSALOME_Swig.py + ${CMAKE_CURRENT_BINARY_DIR}/supervisionexample.py + ${CMAKE_CURRENT_BINARY_DIR}/supervisiongeomexample.py +) +INSTALL(FILES ${script_DATA} DESTINATION ${GUI_salomescript_DATA} + PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) diff --git a/src/SOCC/CMakeLists.txt b/src/SOCC/CMakeLists.txt new file mode 100755 index 000000000..d7c6c1dd5 --- /dev/null +++ b/src/SOCC/CMakeLists.txt @@ -0,0 +1,60 @@ +# Copyright (C) 2012 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. +# +# 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_DIRECTORIES( + ${CAS_INCLUDE_DIRS} + ${QT_INCLUDE_DIRS} + ${BOOST_INCLUDE_DIRS} + ${PTHREAD_INCLUDE_DIRS} + ${KERNEL_ROOT_DIR}/include/salome + ${CMAKE_CURRENT_SOURCE_DIR}/../SUIT + ${CMAKE_CURRENT_SOURCE_DIR}/../OBJECT + ${CMAKE_CURRENT_SOURCE_DIR}/../Prs + ${CMAKE_CURRENT_SOURCE_DIR}/../OCCViewer + ${CMAKE_CURRENT_SOURCE_DIR}/../Qtx +) + +SET(COMMON_FLAGS "${QT_DEFINITIONS} ${CAS_DEFINITIONS} ${BOOST_DEFINITIONS} ${PLATFORM_DEFINITIONS}") +SET(COMMON_LIBS ${QT_LIBS} qtx suit SalomeObject SalomePrs OCCViewer) + +SET(GUI_HEADERS + SOCC_ViewModel.h + SOCC_ViewWindow.h +) +QT4_WRAP_CPP(GUI_HEADERS_MOC ${GUI_HEADERS}) + +SET(SOCC_SOURCES + SOCC_ViewModel.cxx + SOCC_Prs.cxx + SOCC_ViewWindow.cxx +) + +ADD_LIBRARY(SOCC SHARED ${SOCC_SOURCES} ${GUI_HEADERS_MOC}) +SET_TARGET_PROPERTIES(SOCC PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}") +TARGET_LINK_LIBRARIES(SOCC ${COMMON_LIBS}) +INSTALL(TARGETS SOCC DESTINATION ${GUI_salomelib_LIBS}) + +SET(COMMON_HEADERS_H + SOCC.h + SOCC_ViewModel.h + SOCC_Prs.h + SOCC_ViewWindow.h +) + +INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${GUI_salomeinclude_HEADERS}) diff --git a/src/SPlot2d/CMakeLists.txt b/src/SPlot2d/CMakeLists.txt new file mode 100755 index 000000000..3c7cc7064 --- /dev/null +++ b/src/SPlot2d/CMakeLists.txt @@ -0,0 +1,65 @@ +# Copyright (C) 2012 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. +# +# 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_DIRECTORIES( + ${CAS_INCLUDE_DIRS} + ${QT_INCLUDE_DIRS} + ${BOOST_INCLUDE_DIRS} + ${QWT_INCLUDE_DIRS} + ${PTHREAD_INCLUDE_DIRS} + ${KERNEL_ROOT_DIR}/include/salome + ${CMAKE_CURRENT_SOURCE_DIR}/../Qtx + ${CMAKE_CURRENT_SOURCE_DIR}/../SUIT + ${CMAKE_CURRENT_SOURCE_DIR}/../Plot2d + ${CMAKE_CURRENT_SOURCE_DIR}/../Prs + ${CMAKE_CURRENT_SOURCE_DIR}/../OBJECT +) + +SET(COMMON_FLAGS "${QT_DEFINITIONS} ${CAS_DEFINITIONS} ${BOOST_DEFINITIONS} ${QWT_DEFINITIONS} ${PLATFORM_DEFINITIONS}") +SET(COMMON_LIBS suit Plot2d SalomePrs SalomeObject) + +SET(GUI_HEADERS + SPlot2d_ViewModel.h + SPlot2d_ViewWindow.h +) +QT4_WRAP_CPP(GUI_HEADERS_MOC ${GUI_HEADERS}) + +SET(SPlot2d_SOURCES + SPlot2d_Curve.cxx + SPlot2d_Histogram.cxx + SPlot2d_Prs.cxx + SPlot2d_ViewModel.cxx + SPlot2d_ViewWindow.cxx +) + +ADD_LIBRARY(SPlot2d SHARED ${SPlot2d_SOURCES} ${GUI_HEADERS_MOC}) +SET_TARGET_PROPERTIES(SPlot2d PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}") +TARGET_LINK_LIBRARIES(SPlot2d ${COMMON_LIBS}) +INSTALL(TARGETS SPlot2d DESTINATION ${GUI_salomelib_LIBS}) + +SET(COMMON_HEADERS_H + SPlot2d.h + SPlot2d_Curve.h + SPlot2d_Histogram.h + SPlot2d_Prs.h + SPlot2d_ViewModel.h + SPlot2d_ViewWindow.h +) + +INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${GUI_salomeinclude_HEADERS}) diff --git a/src/STD/CMakeLists.txt b/src/STD/CMakeLists.txt new file mode 100755 index 000000000..f2b4ff424 --- /dev/null +++ b/src/STD/CMakeLists.txt @@ -0,0 +1,71 @@ +# Copyright (C) 2012 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. +# +# 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(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/UseQT4EXT.cmake) + +INCLUDE_DIRECTORIES( + ${QT_INCLUDE_DIRS} + ${KERNEL_ROOT_DIR}/include/salome + ${CMAKE_CURRENT_SOURCE_DIR}/../Qtx + ${CMAKE_CURRENT_SOURCE_DIR}/../SUIT +) + +SET(COMMON_FLAGS "${QT_DEFINITIONS} ${PLATFORM_DEFINITIONS}") +SET(COMMON_LIBS ${QT_MT_LIBS} suit qtx) + +SET(GUI_HEADERS + STD_Application.h + STD_MDIDesktop.h + STD_SDIDesktop.h + STD_TabDesktop.h +) +QT4_WRAP_CPP(GUI_HEADERS_MOC ${GUI_HEADERS}) + +SET(std_SOURCES + STD_Application.cxx + STD_MDIDesktop.cxx + STD_SDIDesktop.cxx + STD_TabDesktop.cxx +) + +SET(GUITS_SOURCES + resources/STD_images.ts + resources/STD_msg_en.ts + resources/STD_msg_fr.ts +) + +ADD_LIBRARY(std SHARED ${std_SOURCES} ${GUI_HEADERS_MOC}) +SET_TARGET_PROPERTIES(std PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}") +TARGET_LINK_LIBRARIES(std ${COMMON_LIBS}) +INSTALL(TARGETS std DESTINATION ${GUI_salomelib_LIBS}) + +SET(COMMON_HEADERS_H + STD.h + STD_Application.h + STD_MDIDesktop.h + STD_SDIDesktop.h + STD_TabDesktop.h +) + +INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${GUI_salomeinclude_HEADERS}) +QT4_INSTALL_TS_RESOURCES("${GUITS_SOURCES}" "${GUI_salomeres_DATA}") + +FILE(GLOB GUIPNG_DATA "${CMAKE_CURRENT_SOURCE_DIR}/resources/*.png") +SET(GUIPNG_DATA ${GUIPNG_DATA} ${CMAKE_CURRENT_SOURCE_DIR}/resources/std.ini) +INSTALL(FILES ${GUIPNG_DATA} DESTINATION ${GUI_salomeres_DATA}) diff --git a/src/SUIT/CMakeLists.txt b/src/SUIT/CMakeLists.txt new file mode 100644 index 000000000..fcd2d6c29 --- /dev/null +++ b/src/SUIT/CMakeLists.txt @@ -0,0 +1,114 @@ +# Copyright (C) 2012 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. +# +# 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(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/UseQT4EXT.cmake) + +INCLUDE_DIRECTORIES( + ${QT_INCLUDE_DIRS} + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/../Qtx + ${CMAKE_CURRENT_SOURCE_DIR}/../ObjBrowser +) + +SET(COMMON_LIBS + qtx + ObjBrowser + ${QT_LIBS} + ${PLATFORM_LIBS} +) +SET(COMMON_FLAGS "${PLATFORM_DEFINITIONS}") +IF(ENABLE_TESTRECORDER) + SET(COMMON_FLAGS "${COMMON_FLAGS} -DENABLE_TESTRECORDER ${TESTRECORDER_DEFINITIONS}") + SET(COMMON_LIBS ${COMMON_LIBS} ${TESTRECORDER_LIBS}) +ENDIF(ENABLE_TESTRECORDER) + +SET(GUI_HEADERS + SUIT_Accel.h + SUIT_ActionOperation.h + SUIT_Application.h + SUIT_DataBrowser.h + SUIT_DataObject.h + SUIT_Desktop.h + SUIT_LicenseDlg.h + SUIT_FileDlg.h + SUIT_Operation.h + SUIT_PopupClient.h + SUIT_PreferenceMgr.h + SUIT_SelectionMgr.h + SUIT_Selector.h + SUIT_Session.h + SUIT_Study.h + SUIT_TreeModel.h + SUIT_ViewManager.h + SUIT_ViewModel.h + SUIT_ViewWindow.h + SUIT_ShortcutMgr.h +) +QT4_WRAP_CPP(GUI_HEADERS_MOC ${GUI_HEADERS}) + +SET(suit_SOURCES + SUIT_Accel.cxx + SUIT_ActionOperation.cxx + SUIT_Application.cxx + SUIT_DataBrowser.cxx + SUIT_DataObject.cxx + SUIT_DataObjectIterator.cxx + SUIT_DataObjectKey.cxx + SUIT_DataOwner.cxx + SUIT_Desktop.cxx + SUIT_ExceptionHandler.cxx + SUIT_FileDlg.cxx + SUIT_LicenseDlg.cxx + SUIT_FileValidator.cxx + SUIT_MessageBox.cxx + SUIT_Operation.cxx + SUIT_OverrideCursor.cxx + SUIT_PopupClient.cxx + SUIT_PreferenceMgr.cxx + SUIT_ResourceMgr.cxx + SUIT_SelectionFilter.cxx + SUIT_SelectionMgr.cxx + SUIT_Selector.cxx + SUIT_Session.cxx + SUIT_Study.cxx + SUIT_Tools.cxx + SUIT_TreeModel.cxx + SUIT_ViewManager.cxx + SUIT_ViewModel.cxx + SUIT_ViewWindow.cxx + SUIT_ShortcutMgr.cxx +) +SET(GUITS_SOURCES + resources/SUIT_msg_en.ts + resources/SUIT_msg_fr.ts + resources/SUIT_images.ts +) + +ADD_LIBRARY(suit SHARED ${suit_SOURCES} ${GUI_HEADERS_MOC}) +SET_TARGET_PROPERTIES(suit PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}") +TARGET_LINK_LIBRARIES(suit ${COMMON_LIBS}) +INSTALL(TARGETS suit DESTINATION ${GUI_salomelib_LIBS}) + +FILE(GLOB COMMON_HEADERS_H "${CMAKE_CURRENT_SOURCE_DIR}/*.h") +INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${GUI_salomeinclude_HEADERS}) +QT4_INSTALL_TS_RESOURCES("${GUITS_SOURCES}" "${GUI_salomeres_DATA}") + +FILE(GLOB GUIPNG_DATA "${CMAKE_CURRENT_SOURCE_DIR}/resources/*.png") +INSTALL(FILES ${GUIPNG_DATA} DESTINATION ${GUI_salomeres_DATA}) + diff --git a/src/SUIT/SUIT_PreferenceMgr.cxx b/src/SUIT/SUIT_PreferenceMgr.cxx index d6286ac8b..83ff1805a 100644 --- a/src/SUIT/SUIT_PreferenceMgr.cxx +++ b/src/SUIT/SUIT_PreferenceMgr.cxx @@ -96,7 +96,7 @@ int SUIT_PreferenceMgr::addItem( const QString& title, const int pId, item = new QtxPagePrefTabsItem( title, parent, sect, param ); break; case 2: - item = new QtxPagePrefFrameItem( title, parent, sect, param ); + item = new QtxPagePrefFrameItem( title, parent, sect, param, true ); break; case 3: item = new QtxPagePrefGroupItem( title, parent, sect, param ); diff --git a/src/SUIT/SUIT_ResourceMgr.cxx b/src/SUIT/SUIT_ResourceMgr.cxx index b2fa90dcf..dc7d2aedc 100755 --- a/src/SUIT/SUIT_ResourceMgr.cxx +++ b/src/SUIT/SUIT_ResourceMgr.cxx @@ -125,40 +125,45 @@ QString SUIT_ResourceMgr::findAppropriateUserFile( const QString& fname ) const long id, appr = -1; + QStringList all_files; + // get all files from the same dir where use file is (should be) situated QDir d( QFileInfo( fname ).dir() ); if ( d.exists() ) { d.setFilter( QDir::Files | QDir::Hidden | QDir::NoSymLinks ); QStringList l = d.entryList(); - for( QStringList::const_iterator anIt = l.begin(), aLast = l.end(); anIt!=aLast; anIt++ ) - { - id = userFileId( *anIt ); - if ( id < 0 ) - continue; - if( appr < 0 || qAbs( id-id0 ) < qAbs( appr-id0 ) ) - { - appr = id; - appr_file = d.absoluteFilePath( *anIt ); - } - } + foreach( QString ll, l ) + all_files << d.absoluteFilePath( ll ); } - // backward compatibility: check also user's home directory (if it differs from above one) QDir home = QDir::home(); if ( home.exists() && d.canonicalPath() != home.canonicalPath() ) { home.setFilter( QDir::Files | QDir::Hidden | QDir::NoSymLinks ); QStringList l = home.entryList(); + foreach( QString ll, l ) + all_files << home.absoluteFilePath( ll ); + } + + for( QStringList::const_iterator anIt = all_files.begin(), aLast = all_files.end(); anIt!=aLast; anIt++ ) + { + id = userFileId( *anIt ); + if ( id < 0 ) + continue; - for( QStringList::const_iterator anIt = l.begin(), aLast = l.end(); anIt!=aLast; anIt++ ) + if( appr < 0 || qAbs( id-id0 ) < qAbs( appr-id0 ) ) { - id = userFileId( *anIt ); - if ( id < 0 ) - continue; - if( appr < 0 || qAbs( id-id0 ) < qAbs( appr-id0 ) ) - { - appr = id; + appr = id; + appr_file = d.absoluteFilePath( *anIt ); + } + else if ( qAbs( id-id0 ) == qAbs( appr-id0 ) ) { + // appr == id that means that another file with equal version id is detected + // this can happen, e.g. if one file begins with "." and other one - not + // ... + // VSR 24/09/2012: issue 0021781: since version 6.6.0 user filename is not prepended with "." + // when it is stored in the ~/.config/ directory; + // for backward compatibility we also check files prepended with "." with lower priority + if ( !QFileInfo( *anIt ).fileName().startsWith(".") ) appr_file = home.absoluteFilePath( *anIt ); - } } } diff --git a/src/SUIT/SUIT_TreeModel.cxx b/src/SUIT/SUIT_TreeModel.cxx index 9e4558138..53c9a94ba 100755 --- a/src/SUIT/SUIT_TreeModel.cxx +++ b/src/SUIT/SUIT_TreeModel.cxx @@ -1326,10 +1326,7 @@ void SUIT_TreeModel::updateTreeModel(SUIT_DataObject* obj,TreeItem* item) if(sitem==0) { //end of item list - if(kitem==0) - sitem=createItemAtPos(sobj,item,0); - else - sitem=createItemAtPos(sobj,item,kitem); + sitem=createItemAtPos(sobj,item,kitem); updateTreeModel(sobj,sitem); kobj++; kitem++; @@ -1347,7 +1344,8 @@ void SUIT_TreeModel::updateTreeModel(SUIT_DataObject* obj,TreeItem* item) else { // obj : new object - createItemAtPos(sobj,item,kitem); + sitem=createItemAtPos(sobj,item,kitem); + updateTreeModel(sobj,sitem); kobj++; kitem++; sobj=obj->childObject(kobj); @@ -1359,7 +1357,7 @@ void SUIT_TreeModel::updateTreeModel(SUIT_DataObject* obj,TreeItem* item) //obj and item are synchronised : go to next ones updateTreeModel(sobj,sitem); if(sobj->modified()) updateItem(sitem, true); - if( sobj ) sobj->update(); + sobj->update(); kobj++; kitem++; sobj=obj->childObject(kobj); @@ -1569,8 +1567,8 @@ SUIT_TreeModel::TreeItem* SUIT_TreeModel::createItemAtPos( SUIT_DataObject* obj, SUIT_TreeModel::TreeItem* item = new TreeItem( obj, parent, after ); myItems[ obj ] = item; - for(int pos=row;pos < parent->childCount();pos++) - parent->child(pos)->setPosition(pos); + for(int ppos=row;ppos < parent->childCount();ppos++) + parent->child(ppos)->setPosition(ppos); endInsertRows(); diff --git a/src/SUITApp/CMakeLists.txt b/src/SUITApp/CMakeLists.txt new file mode 100755 index 000000000..8bdd3a252 --- /dev/null +++ b/src/SUITApp/CMakeLists.txt @@ -0,0 +1,95 @@ +# Copyright (C) 2012 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. +# +# 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(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/UseQT4EXT.cmake) + +INCLUDE_DIRECTORIES( + ${QT_INCLUDE_DIRS} + ${PTHREAD_INCLUDE_DIRS} + ${PYTHON_INCLUDE_DIRS} + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_BINARY_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/../Qtx + ${CMAKE_CURRENT_SOURCE_DIR}/../SUIT + ${CMAKE_CURRENT_SOURCE_DIR}/../Style +) + +SET(COMMON_FLAGS "${QT_DEFINITIONS} ${PYTHON_DEFINITIONS} ${PLATFORM_DEFINITIONS}") + +SET(COMMON_LIBS + qtx + suit + SalomeStyle + ${QT_MT_LIBS} +) + +SET(GUI_HEADERS SUITApp_Application.h) +QT4_WRAP_CPP(GUI_HEADERS_MOC ${GUI_HEADERS}) + +SET(SUITApp_SOURCES + SUITApp.cxx + SUITApp_Application.cxx +) +SET(COMMON_HEADERS_HXX) +IF(ENABLE_PYCONSOLE) + SET(COMMON_HEADERS_HXX + ${COMMON_HEADERS_HXX} + SUITApp_init_python.hxx + ) + SET(SUITApp_SOURCES + ${SUITApp_SOURCES} + SUITApp_init_python.cxx + ) + SET(COMMON_LIBS + ${COMMON_LIBS} + ${PYTHON_LIBS} + ) +ENDIF(ENABLE_PYCONSOLE) + +IF(ENABLE_TESTRECORDER) + SET(COMMON_FLAGS + ${COMMON_FLAGS} + -DENABLE_TESTRECORDER + ${TESTRECORDER_DEFINITIONS} + ) + SET(COMMON_LIBS + ${COMMON_LIBS} + ${TESTRECORDER_LIBS} + ) +ENDIF(ENABLE_TESTRECORDER) + +SET(GUITS_SOURCES + resources/SUITApp_msg_en.ts + resources/SUITApp_msg_fr.ts +) + +ADD_LIBRARY(SUITApp SHARED ${SUITApp_SOURCES} ${GUI_HEADERS_MOC}) +SET_TARGET_PROPERTIES(SUITApp PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}") +TARGET_LINK_LIBRARIES(SUITApp ${COMMON_LIBS}) +INSTALL(TARGETS SUITApp DESTINATION ${GUI_salomelib_LIBS}) + +ADD_EXECUTABLE(TestSUITApp SUITApp.cxx) +SET_TARGET_PROPERTIES(TestSUITApp PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}" OUTPUT_NAME "SUITApp") +TARGET_LINK_LIBRARIES(TestSUITApp SUITApp ${COMMON_LIBS}) +INSTALL(TARGETS TestSUITApp DESTINATION ${GUI_salomebin_BINS}) + +FILE(GLOB COMMON_HEADERS_H "${CMAKE_CURRENT_SOURCE_DIR}/*.h") +SET(COMMON_HEADERS ${COMMON_HEADERS_H} ${COMMON_HEADERS_HXX}) +INSTALL(FILES ${COMMON_HEADERS} DESTINATION ${GUI_salomeinclude_HEADERS}) +QT4_INSTALL_TS_RESOURCES("${GUITS_SOURCES}" "${GUI_salomeres_DATA}") diff --git a/src/SUPERVGraph/CMakeLists.txt b/src/SUPERVGraph/CMakeLists.txt new file mode 100755 index 000000000..2fc8b3f00 --- /dev/null +++ b/src/SUPERVGraph/CMakeLists.txt @@ -0,0 +1,71 @@ +# Copyright (C) 2012 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. +# +# 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(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/UseQT4EXT.cmake) + +INCLUDE_DIRECTORIES( + ${CAS_INCLUDE_DIRS} + ${QT_INCLUDE_DIRS} + ${BOOST_INCLUDE_DIRS} + ${PTHREAD_INCLUDE_DIRS} + ${QT_INCLUDE_DIRS} + ${CMAKE_CURRENT_SOURCE_DIR}/../Qtx + ${CMAKE_CURRENT_SOURCE_DIR}/../SUIT + ${CMAKE_CURRENT_SOURCE_DIR}/../OBJECT +) + +SET(SUPERVGraph_SOURCES + SUPERVGraph.cxx + SUPERVGraph_ViewFrame.cxx + SUPERVGraph_ViewManager.cxx + SUPERVGraph_ViewModel.cxx +) + +SET(GUI_HEADERS + SUPERVGraph.h + SUPERVGraph_ViewFrame.h + SUPERVGraph_ViewManager.h + SUPERVGraph_ViewModel.h +) +QT4_WRAP_CPP(GUI_HEADERS_MOC ${GUI_HEADERS}) + +SET(dist_salomeres_DATA + resources/superv_view_pan.png + resources/superv_view_reset.png +) + +SET(GUITS_SOURCES + resources/SUPERVGraph_images.ts + resources/SUPERVGraph_msg_en.ts + resources/SUPERVGraph_msg_fr.ts +) + +ADD_LIBRARY(SUPERVGraph SHARED ${SUPERVGraph_SOURCES} ${GUI_HEADERS_MOC}) +SET_TARGET_PROPERTIES(SUPERVGraph PROPERTIES COMPILE_FLAGS "${QT_DEFINITIONS} ${CAS_DEFINITIONS} ${PYTHON_DEFINITIONS} ${BOOST_DEFINITIONS} ${PLATFORM_DEFINITIONS}") +TARGET_LINK_LIBRARIES(SUPERVGraph ${QT_MT_LIBS} suit SalomeObject) +INSTALL(TARGETS SUPERVGraph DESTINATION ${GUI_salomelib_LIBS}) + +FILE(GLOB COMMON_HEADERS_H "${CMAKE_CURRENT_SOURCE_DIR}/*.h") +INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${GUI_salomeinclude_HEADERS}) +QT4_INSTALL_TS_RESOURCES("${GUITS_SOURCES}" "${GUI_salomeres_DATA}") + +FILE(GLOB GUIPNG_DATA "${CMAKE_CURRENT_SOURCE_DIR}/resources/*.png") +INSTALL(FILES ${GUIPNG_DATA} DESTINATION ${GUI_salomeres_DATA}) + + diff --git a/src/SVTK/CMakeLists.txt b/src/SVTK/CMakeLists.txt new file mode 100755 index 000000000..de49ce5cd --- /dev/null +++ b/src/SVTK/CMakeLists.txt @@ -0,0 +1,154 @@ +# Copyright (C) 2012 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. +# +# 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(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/UseQT4EXT.cmake) + +INCLUDE_DIRECTORIES( + ${CAS_INCLUDE_DIRS} + ${QT_INCLUDE_DIRS} + ${VTK_INCLUDE_DIRS} + ${PTHREAD_INCLUDE_DIRS} + ${BOOST_INCLUDE_DIRS} + ${KERNEL_ROOT_DIR}/include/salome + ${CMAKE_BINARY_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/../Qtx + ${CMAKE_CURRENT_SOURCE_DIR}/../SUIT + ${CMAKE_CURRENT_SOURCE_DIR}/../ViewerTools + ${CMAKE_CURRENT_SOURCE_DIR}/../OBJECT + ${CMAKE_CURRENT_SOURCE_DIR}/../Prs + ${CMAKE_CURRENT_SOURCE_DIR}/../VTKViewer + ${CMAKE_CURRENT_SOURCE_DIR}/../OpenGLUtils +) +SET(COMMON_FLAGS "${QT_DEFINITIONS} ${CAS_DEFINITIONS} ${VTK_DEFINITIONS} ${BOOST_DEFINITIONS} ${PLATFORM_DEFINITIONS}") +SET(COMMON_LIBS + qtx + suit + ViewerTools + SalomeObject + SalomePrs + VTKViewer + OpenGLUtils + ${SALOMELocalTrace} + ${OpUtil} + ${VTK_LIBS} + ${OGL_LIBS} + ${QT_MT_LIBS} + ${CAS_KERNEL} + ${CAS_VIEWER} +) + +SET(GUI_HEADERS SVTK_GenericRenderWindowInteractor.h SVTK_RenderWindowInteractor.h SVTK_NonIsometricDlg.h + SVTK_UpdateRateDlg.h SVTK_CubeAxesDlg.h SVTK_FontWidget.h SVTK_ViewModelBase.h SVTK_ViewManager.h + SVTK_ViewWindow.h SVTK_ViewModel.h SVTK_View.h SVTK_SetRotationPointDlg.h SVTK_ViewParameterDlg.h + SVTK_ComboAction.h SVTK_RecorderDlg.h) +QT4_WRAP_CPP(GUI_HEADERS ${GUI_HEADERS}) + +SET(SVTK_SOURCES + SVTK_Prs.cxx + SVTK_Actor.cxx + SALOME_Actor.cxx + SVTK_RectPicker.cxx + SVTK_DeviceActor.cxx + SVTK_CubeAxesActor2D.cxx + SVTK_NonIsometricDlg.cxx + SVTK_UpdateRateDlg.cxx + SVTK_CubeAxesDlg.cxx + SVTK_FontWidget.cxx + SVTK_Trihedron.cxx + SVTK_View.cxx + SVTK_ViewManager.cxx + SVTK_ViewModel.cxx + SVTK_Renderer.cxx + SVTK_ViewWindow.cxx + SVTK_InteractorStyle.cxx + SVTK_KeyFreeInteractorStyle.cxx + SVTK_RenderWindowInteractor.cxx + SVTK_GenericRenderWindowInteractor.cxx + SVTK_SpaceMouse.cxx + SVTK_Selector.cxx + SVTK_SetRotationPointDlg.cxx + SVTK_ViewParameterDlg.cxx + SVTK_ComboAction.cxx + SVTK_Recorder.cxx + SVTK_RecorderDlg.cxx + SVTK_ImageWriter.cxx + SVTK_ImageWriterMgr.cxx + SVTK_Utils.cxx + vtkPVAxesActor.h + vtkPVAxesActor.cxx + vtkPVAxesWidget.h + vtkPVAxesWidget.cxx +) + +SET(GUITS_SOURCES + resources/SVTK_msg_en.ts + resources/SVTK_msg_fr.ts + resources/SVTK_images.ts +) + +ADD_LIBRARY(SVTK SHARED ${SVTK_SOURCES} ${GUI_HEADERS}) +SET_TARGET_PROPERTIES(SVTK PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}") +TARGET_LINK_LIBRARIES(SVTK ${COMMON_LIBS}) +INSTALL(TARGETS SVTK DESTINATION ${GUI_salomelib_LIBS}) + +#ADD_EXECUTABLE(TestSVTK SVTK.cxx) +#SET_TARGET_PROPERTIES(TestSVTK PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}" OUTPUT_NAME "SVTK") +#TARGET_LINK_LIBRARIES(TestSVTK SVTK ${COMMON_LIBS}) +#INSTALL(TARGETS TestSVTK DESTINATION ${GUI_salomebin_BINS}) + +SET(COMMON_HEADERS_H + SVTK.h + SVTK_Prs.h + SVTK_Actor.h + SALOME_Actor.h + SVTK_RectPicker.h + SVTK_DeviceActor.h + SVTK_FontWidget.h + SVTK_CubeAxesActor2D.h + SVTK_Functor.h + SVTK_View.h + SVTK_ViewManager.h + SVTK_ViewModel.h + SVTK_ViewWindow.h + SVTK_Renderer.h + SVTK_InteractorStyle.h + SVTK_KeyFreeInteractorStyle.h + SVTK_RenderWindowInteractor.h + SVTK_GenericRenderWindowInteractor.h + SVTK_Selector.h + SVTK_Selection.h + SVTK_SelectionEvent.h + SVTK_SpaceMouse.h + SVTK_Event.h + SVTK_ViewModelBase.h + SVTK_SetRotationPointDlg.h + SVTK_ViewParameterDlg.h + SVTK_ComboAction.h + SVTK_Recorder.h + SVTK_RecorderDlg.h + SVTK_ImageWriter.h + SVTK_ImageWriterMgr.h + SVTK_Utils.h +) +INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${GUI_salomeinclude_HEADERS}) +QT4_INSTALL_TS_RESOURCES("${GUITS_SOURCES}" "${GUI_salomeres_DATA}") + +FILE(GLOB GUIPNG_DATA "${CMAKE_CURRENT_SOURCE_DIR}/resources/*.png") +INSTALL(FILES ${GUIPNG_DATA} DESTINATION ${GUI_salomeres_DATA}) + diff --git a/src/SVTK/Makefile.am b/src/SVTK/Makefile.am index 144ad705e..c048c3f49 100755 --- a/src/SVTK/Makefile.am +++ b/src/SVTK/Makefile.am @@ -60,7 +60,8 @@ salomeinclude_HEADERS= \ SVTK_Recorder.h \ SVTK_RecorderDlg.h \ SVTK_ImageWriter.h \ - SVTK_ImageWriterMgr.h + SVTK_ImageWriterMgr.h \ + SVTK_Utils.h dist_libSVTK_la_SOURCES= \ SVTK_Prs.cxx \ @@ -92,6 +93,7 @@ dist_libSVTK_la_SOURCES= \ SVTK_RecorderDlg.cxx \ SVTK_ImageWriter.cxx \ SVTK_ImageWriterMgr.cxx \ + SVTK_Utils.cxx \ vtkPVAxesActor.h \ vtkPVAxesActor.cxx \ vtkPVAxesWidget.h \ diff --git a/src/SVTK/SALOME_Actor.cxx b/src/SVTK/SALOME_Actor.cxx index ad20490b2..74c57f9e9 100644 --- a/src/SVTK/SALOME_Actor.cxx +++ b/src/SVTK/SALOME_Actor.cxx @@ -108,7 +108,7 @@ namespace SALOME_Actor *theActor, vtkIdType theObjId) { - switch(theMode){ + switch(theMode) { case CellSelection: return true; case EdgeSelection: @@ -117,6 +117,15 @@ namespace return ( theActor->GetObjDimension( theObjId ) == 2 ); case VolumeSelection: return ( theActor->GetObjDimension( theObjId ) == 3 ); + case Elem0DSelection: + return ((theActor->GetObjDimension( theObjId ) == 0) && + theActor->GetElemCell(theObjId) && + (theActor->GetElemCell(theObjId)->GetCellType() == VTK_VERTEX)); + case BallSelection: + return ((theActor->GetObjDimension( theObjId ) == 0) && + theActor->GetElemCell(theObjId) && + (theActor->GetElemCell(theObjId)->GetCellType() == VTK_POLY_VERTEX)); + }; return false; } @@ -273,8 +282,8 @@ SALOME_Actor myRenderer = theRenderer; - theRenderer->AddActor( myPreHighlightActor.GetPointer() ); - theRenderer->AddActor( myHighlightActor.GetPointer() ); + myHighlightActor->AddToRender(theRenderer); + myPreHighlightActor->AddToRender(theRenderer); theRenderer->AddActor( myOutlineActor.GetPointer() ); theRenderer->AddActor( myNameActor.GetPointer() ); } @@ -288,6 +297,9 @@ SALOME_Actor { Superclass::RemoveFromRender(theRenderer); + myHighlightActor->RemoveFromRender(theRenderer); + myPreHighlightActor->RemoveFromRender(theRenderer); + theRenderer->RemoveActor( myPreHighlightActor.GetPointer() ); theRenderer->RemoveActor( myHighlightActor.GetPointer() ); theRenderer->RemoveActor( myOutlineActor.GetPointer() ); @@ -439,6 +451,8 @@ SALOME_Actor case EdgeSelection: case FaceSelection: case VolumeSelection: + case Elem0DSelection: + case BallSelection: myHighlightActor->GetProperty()->SetRepresentationToSurface(); myHighlightActor->MapCells( this, aMapIndex ); break; @@ -535,6 +549,8 @@ SALOME_Actor case EdgeSelection: case FaceSelection: case VolumeSelection: + case Elem0DSelection: + case BallSelection: { SVTK::TPickLimiter aPickLimiter( myCellPicker, this ); myCellPicker->Pick( x, y, z, aRenderer ); @@ -672,6 +688,8 @@ SALOME_Actor case EdgeSelection: case FaceSelection: case VolumeSelection: + case Elem0DSelection: + case BallSelection: { SVTK::TPickLimiter aPickLimiter( myCellPicker, this ); myCellPicker->Pick( x, y, z, aRenderer ); @@ -795,6 +813,8 @@ SALOME_Actor case EdgeSelection: case FaceSelection: case VolumeSelection: + case Elem0DSelection: + case BallSelection: { SVTK::TPickLimiter aPickLimiter( myCellRectPicker, this ); myCellRectPicker->Pick( x1, y1, z1, x2, y2, z2, aRenderer ); diff --git a/src/SVTK/SVTK_Actor.cxx b/src/SVTK/SVTK_Actor.cxx index 2ea4910cf..0155b629a 100644 --- a/src/SVTK/SVTK_Actor.cxx +++ b/src/SVTK/SVTK_Actor.cxx @@ -22,6 +22,7 @@ #include "SVTK_Actor.h" #include "SALOME_Actor.h" +#include "SVTK_Utils.h" #include "SALOME_InteractiveObject.hxx" @@ -41,19 +42,6 @@ #include "Utils_SALOME_Exception.hxx" #include "utilities.h" -static -void -CopyPoints(vtkUnstructuredGrid* theGrid, vtkDataSet *theSourceDataSet) -{ - vtkPoints *aPoints = vtkPoints::New(); - vtkIdType iEnd = theSourceDataSet->GetNumberOfPoints(); - aPoints->SetNumberOfPoints(iEnd); - for(vtkIdType i = 0; i < iEnd; i++){ - aPoints->SetPoint(i,theSourceDataSet->GetPoint(i)); - } - theGrid->SetPoints(aPoints); - aPoints->Delete(); -} vtkStandardNewMacro(SVTK_Actor); @@ -123,7 +111,7 @@ SVTK_Actor myUnstructuredGrid->Allocate(); vtkDataSet *aSourceDataSet = theMapActor->GetInput(); - CopyPoints(GetSource(),aSourceDataSet); + SVTK::CopyPoints(GetSource(),aSourceDataSet); int aNbOfParts = theMapIndex.Extent(); for(int ind = 1; ind <= aNbOfParts; ind++){ @@ -194,7 +182,7 @@ SVTK_Actor myUnstructuredGrid->Allocate(); vtkDataSet *aSourceDataSet = theMapActor->GetInput(); - CopyPoints(GetSource(),aSourceDataSet); + SVTK::CopyPoints(GetSource(),aSourceDataSet); if(theMapIndex.Extent() == 2){ @@ -223,3 +211,20 @@ SVTK_Actor myMapIndex = theMapIndex; } + +/*! + To publish the actor an all its internal devices +*/ +void +SVTK_Actor +::AddToRender(vtkRenderer* theRenderer) +{ + theRenderer->AddActor(this); +} + +void +SVTK_Actor +::RemoveFromRender(vtkRenderer* theRenderer) +{ + theRenderer->RemoveActor(this); +} diff --git a/src/SVTK/SVTK_Actor.h b/src/SVTK/SVTK_Actor.h index 00e92d4ce..d2b10164e 100644 --- a/src/SVTK/SVTK_Actor.h +++ b/src/SVTK/SVTK_Actor.h @@ -50,7 +50,7 @@ public: vtkTypeMacro(SVTK_Actor,SVTK_DeviceActor); //! Initialiaze the instance completely - void + virtual void Initialize(); //! Allows to set an external source @@ -61,18 +61,25 @@ public: vtkUnstructuredGrid* GetSource(); + virtual void + AddToRender(vtkRenderer* theRenderer); + + virtual void + RemoveFromRender(vtkRenderer* theRenderer); + + //! Allow to recostruct selected cells from source SALOME_Actor and map of subindexes - void + virtual void MapCells(SALOME_Actor* theMapActor, const TColStd_IndexedMapOfInteger& theMapIndex); //! Allow to recostruct selected points from source SALOME_Actor and map of subindexes - void + virtual void MapPoints(SALOME_Actor* theMapActor, const TColStd_IndexedMapOfInteger& theMapIndex); //! Allow to recostruct selected edges from source SALOME_Actor and map of subindexes - void + virtual void MapEdge(SALOME_Actor* theMapActor, const TColStd_IndexedMapOfInteger& theMapIndex); diff --git a/src/SVTK/SVTK_DeviceActor.cxx b/src/SVTK/SVTK_DeviceActor.cxx index 94e6ee09d..4a803ccc5 100644 --- a/src/SVTK/SVTK_DeviceActor.cxx +++ b/src/SVTK/SVTK_DeviceActor.cxx @@ -749,3 +749,10 @@ void SVTK_DeviceActor::SetCoincident3DAllowed(bool theFlag) { bool SVTK_DeviceActor::IsCoincident3DAllowed() const { return myGeomFilter->GetAppendCoincident3D(); } + +void +SVTK_DeviceActor +::SetResolveCoincidentTopology(bool theIsResolve) +{ + myIsResolveCoincidentTopology = theIsResolve; +} diff --git a/src/SVTK/SVTK_DeviceActor.h b/src/SVTK/SVTK_DeviceActor.h index 12d10220f..681f25263 100644 --- a/src/SVTK/SVTK_DeviceActor.h +++ b/src/SVTK/SVTK_DeviceActor.h @@ -249,6 +249,10 @@ class SVTK_EXPORT SVTK_DeviceActor: public vtkLODActor virtual bool IsCoincident3DAllowed() const; + + void + SetResolveCoincidentTopology(bool theIsResolve); + protected: diff --git a/src/SVTK/SVTK_Selection.h b/src/SVTK/SVTK_Selection.h index a985fc397..92d86fde8 100644 --- a/src/SVTK/SVTK_Selection.h +++ b/src/SVTK/SVTK_Selection.h @@ -38,6 +38,8 @@ const Selection_Mode EdgeSelection = 3; const Selection_Mode FaceSelection = 4; const Selection_Mode VolumeSelection = 5; const Selection_Mode ActorSelection = 6; +const Selection_Mode Elem0DSelection = 7; +const Selection_Mode BallSelection = 8; #endif diff --git a/src/SVTK/SVTK_Utils.cxx b/src/SVTK/SVTK_Utils.cxx new file mode 100644 index 000000000..77415a704 --- /dev/null +++ b/src/SVTK/SVTK_Utils.cxx @@ -0,0 +1,43 @@ +// Copyright (C) 2007-2012 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. +// +// 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 +// + +// SALOME OBJECT : implementation of interactive object visualization for OCC and VTK viewers +// File : SVTK_Utils.cxx +// Author : Roman NIKOLAEV + +#include "SVTK_Utils.h" + +#include + +namespace SVTK { + void CopyPoints(vtkUnstructuredGrid* theGrid, vtkDataSet *theSourceDataSet) + { + vtkPoints *aPoints = vtkPoints::New(); + vtkIdType iEnd = theSourceDataSet->GetNumberOfPoints(); + aPoints->SetNumberOfPoints(iEnd); + for(vtkIdType i = 0; i < iEnd; i++){ + aPoints->SetPoint(i,theSourceDataSet->GetPoint(i)); + } + theGrid->SetPoints(aPoints); + aPoints->Delete(); + } +} diff --git a/src/SVTK/SVTK_Utils.h b/src/SVTK/SVTK_Utils.h new file mode 100644 index 000000000..b5136300e --- /dev/null +++ b/src/SVTK/SVTK_Utils.h @@ -0,0 +1,41 @@ +// Copyright (C) 2007-2012 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. +// +// 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 +// + +// SALOME OBJECT : implementation of interactive object visualization for OCC and VTK viewers +// File : SVTK_Utils.h +// Author : Roman NIKOLAEV + +#ifndef SVTK_UTILS_H +#define SVTK_UTILS_H + +#include "SVTK.h" + +class vtkUnstructuredGrid; +class vtkDataSet; + +namespace SVTK { + + SVTK_EXPORT void CopyPoints(vtkUnstructuredGrid* theGrid, vtkDataSet *theSourceDataSet); + +} + +#endif diff --git a/src/SalomeApp/CMakeLists.txt b/src/SalomeApp/CMakeLists.txt new file mode 100755 index 000000000..5418df21f --- /dev/null +++ b/src/SalomeApp/CMakeLists.txt @@ -0,0 +1,174 @@ +# Copyright (C) 2012 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. +# +# 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 +# + +ADD_SUBDIRECTORY(pluginsdemo) + +IF(CPPUNIT_IS_OK) + IF(GUI_ENABLE_CORBA) + ADD_SUBDIRECTORY(Test) + ENDIF(GUI_ENABLE_CORBA) +ENDIF(CPPUNIT_IS_OK) + +INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/UseQT4EXT.cmake) +INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/SalomeMacros.cmake) + +INCLUDE_DIRECTORIES( + ${CAS_INCLUDE_DIRS} + ${QT_INCLUDE_DIRS} + ${VTK_INCLUDE_DIRS} + ${QWT_INCLUDE_DIRS} + ${BOOST_INCLUDE_DIRS} + ${PYTHON_INCLUDE_DIRS} + ${OMNIORB_INCLUDE_DIRS} + ${LIBXML_INCLUDE_DIRS} + ${PTHREAD_INCLUDE_DIRS} + ${KERNEL_ROOT_DIR}/include/salome + ${CMAKE_CURRENT_SOURCE_DIR}/../LightApp + ${CMAKE_CURRENT_SOURCE_DIR}/../CAM + ${CMAKE_CURRENT_SOURCE_DIR}/../Qtx + ${CMAKE_CURRENT_SOURCE_DIR}/../SUIT + ${CMAKE_CURRENT_SOURCE_DIR}/../OBJECT + ${CMAKE_CURRENT_SOURCE_DIR}/../SVTK + ${CMAKE_CURRENT_SOURCE_DIR}/../STD + ${CMAKE_CURRENT_SOURCE_DIR}/../VTKViewer + ${CMAKE_CURRENT_SOURCE_DIR}/../ObjBrowser + ${CMAKE_CURRENT_SOURCE_DIR}/../PyConsole + ${CMAKE_CURRENT_SOURCE_DIR}/../TOOLSGUI + ${CMAKE_CURRENT_SOURCE_DIR}/../PyInterp + ${CMAKE_CURRENT_SOURCE_DIR}/../Session + ${CMAKE_BINARY_DIR}/idl + ${CMAKE_CURRENT_SOURCE_DIR}/../Event + ${CMAKE_CURRENT_SOURCE_DIR}/../CASCatch + ${CMAKE_CURRENT_SOURCE_DIR}/../Prs +) + +SET(COMMON_FLAGS "${QT_DEFINITIONS} ${LIBXML_DEFINITIONS} ${CORBA_DEFINITIONS} ${VTK_DEFINITIONS} ${QWT_DEFINITIONS} ${CAS_DEFINITIONS} ${BOOST_DEFINITIONS} ${PYTHON_DEFINITIONS} ${PLATFORM_DEFINITIONS}") +SET(COMMON_LIBS + ${PYTHON_LIBS} + ${QT_MT_LIBS} + ${OpUtil} + ${SALOMELocalTrace} + ${SalomeDSClient} + suit + std + CAM + ObjBrowser + SalomePrs + SPlot2d + GLViewer + OCCViewer + VTKViewer + SalomeObject + SVTK + SOCC + PyInterp + PyConsole + LogWindow + LightApp + ToolsGUI + SalomeSession + Event + CASCatch + SalomePrs + ${CAS_KERNEL} +) + +SET(GUI_HEADERS + SalomeApp_Application.h + SalomeApp_DataModel.h + SalomeApp_Module.h + SalomeApp_LoadStudiesDlg.h + SalomeApp_Study.h + SalomeApp_StudyPropertiesDlg.h + SalomeApp_ListView.h + SalomeApp_CheckFileDlg.h + SalomeApp_ExitDlg.h + SalomeApp_NoteBookDlg.h + SalomeApp_DoubleSpinBox.h + SalomeApp_IntSpinBox.h +) +QT4_WRAP_CPP(GUI_HEADERS_MOC ${GUI_HEADERS}) + +SET(SalomeApp_SOURCES + SalomeApp_Module.cxx + SalomeApp_Application.cxx + SalomeApp_DataModel.cxx + SalomeApp_DataObject.cxx + SalomeApp_LoadStudiesDlg.cxx + SalomeApp_Study.cxx + SalomeApp_ExceptionHandler.cxx + SalomeApp_PyInterp.cxx + SalomeApp_Tools.cxx + SalomeApp_ImportOperation.cxx + SalomeApp_Filter.cxx + SalomeApp_TypeFilter.cxx + SalomeApp_StudyPropertiesDlg.cxx + SalomeApp_ListView.cxx + SalomeApp_CheckFileDlg.cxx + SalomeApp_VisualState.cxx + SalomeApp_ExitDlg.cxx + SalomeApp_NoteBookDlg.cxx + SalomeApp_DoubleSpinBox.cxx + SalomeApp_IntSpinBox.cxx +) + +SET(GUITS_SOURCES + resources/SalomeApp_images.ts + resources/SalomeApp_msg_en.ts + resources/SalomeApp_msg_fr.ts +) + +ADD_LIBRARY(SalomeApp SHARED ${SalomeApp_SOURCES} ${GUI_HEADERS_MOC}) +SET_TARGET_PROPERTIES(SalomeApp PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}") +TARGET_LINK_LIBRARIES(SalomeApp ${COMMON_LIBS}) +INSTALL(TARGETS SalomeApp DESTINATION ${GUI_salomelib_LIBS}) + +SET(COMMON_HEADERS_H + SalomeApp.h + SalomeApp_Application.h + SalomeApp_DataModel.h + SalomeApp_DataObject.h + SalomeApp_LoadStudiesDlg.h + SalomeApp_Module.h + SalomeApp_Study.h + SalomeApp_ExceptionHandler.h + SalomeApp_PyInterp.h + SalomeApp_Tools.h + SalomeApp_ImportOperation.h + SalomeApp_Filter.h + SalomeApp_TypeFilter.h + SalomeApp_StudyPropertiesDlg.h + SalomeApp_CheckFileDlg.h + SalomeApp_VisualState.h + SalomeApp_ExitDlg.h + SalomeApp_NoteBookDlg.h + SalomeApp_DoubleSpinBox.h + SalomeApp_IntSpinBox.h +) + +INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${GUI_salomeinclude_HEADERS}) +QT4_INSTALL_TS_RESOURCES("${GUITS_SOURCES}" "${GUI_salomeres_DATA}") + +FILE(GLOB GUIPNG_DATA "${CMAKE_CURRENT_SOURCE_DIR}/resources/*.png") +SET(INST_DATA ${GUIPNG_DATA} resources/SalomeApp.ini resources/SalomeApp.xml) +INSTALL(FILES ${INST_DATA} DESTINATION ${GUI_salomeres_DATA}) + +# python modules +SALOME_INSTALL_SCRIPTS("salome_pluginsmanager.py" ${GUI_salomepythondir}) +SALOME_INSTALL_SCRIPTS("addvars2notebook.py" ${GUI_salomescript_PYTHON}) diff --git a/src/SalomeApp/Makefile.am b/src/SalomeApp/Makefile.am index 8ec07496c..6191bd8e2 100755 --- a/src/SalomeApp/Makefile.am +++ b/src/SalomeApp/Makefile.am @@ -121,7 +121,7 @@ libSalomeApp_la_CPPFLAGS = $(PYTHON_INCLUDES) $(QT_INCLUDES) $(QWT_INCLUDES) \ -I$(srcdir)/../Event -I$(srcdir)/../CASCatch -I$(srcdir)/../Prs \ @CORBA_CXXFLAGS@ @CORBA_INCLUDES@ @LIBXML_INCLUDES@ libSalomeApp_la_LDFLAGS = $(PYTHON_LIBS) $(QT_MT_LIBS) -libSalomeApp_la_LIBADD = $(KERNEL_LDFLAGS) -lOpUtil -lSALOMELocalTrace -lSalomeDSClient \ +libSalomeApp_la_LIBADD = $(KERNEL_LDFLAGS) -lOpUtil -lSALOMELocalTrace -lSalomeLifeCycleCORBA -lSalomeDSClient \ ../SUIT/libsuit.la ../STD/libstd.la ../CAM/libCAM.la ../ObjBrowser/libObjBrowser.la \ ../Prs/libSalomePrs.la ../SPlot2d/libSPlot2d.la ../GLViewer/libGLViewer.la \ ../OCCViewer/libOCCViewer.la ../VTKViewer/libVTKViewer.la ../OBJECT/libSalomeObject.la \ diff --git a/src/SalomeApp/Test/CMakeLists.txt b/src/SalomeApp/Test/CMakeLists.txt new file mode 100755 index 000000000..a4777c43a --- /dev/null +++ b/src/SalomeApp/Test/CMakeLists.txt @@ -0,0 +1,39 @@ +# Copyright (C) 2012 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. +# +# 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_DIRECTORIES( + ${CPPUNIT_INCLUDE_DIRS} + ${KERNEL_ROOT_DIR}/include/salome +) + +SET(COMMON_LIBS ${CPPUNIT_LIBS} ${PLATFORM_LIBS}) +SET(COMMON_FLAGS "${CPPUNIT_DEFINITIONS} ${PLATFORM_DEFINITIONS}") + +ADD_LIBRARY(SalomeAppTest SHARED SalomeAppTest.cxx) +SET_TARGET_PROPERTIES(SalomeAppTest PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}") +TARGET_LINK_LIBRARIES(SalomeAppTest ${COMMON_LIBS}) +INSTALL(TARGETS SalomeAppTest DESTINATION ${GUI_salomelib_LIBS}) + +ADD_EXECUTABLE(TestSalomeApp TestSalomeApp.cxx) +SET_TARGET_PROPERTIES(TestSalomeApp PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}") +TARGET_LINK_LIBRARIES(TestSalomeApp SalomeAppTest ${COMMON_LIBS}) +INSTALL(TARGETS TestSalomeApp DESTINATION ${GUI_salomebin_BINS}) + +INSTALL(FILES SalomeAppTest.hxx DESTINATION ${GUI_salomeinclude_HEADERS}) +SALOME_INSTALL_SCRIPTS("TestSalomeApp.py" ${GUI_salomescript_PYTHON}) diff --git a/src/SalomeApp/Test/SalomeAppTest.hxx b/src/SalomeApp/Test/SalomeAppTest.hxx index 953774847..f3c9b16e6 100644 --- a/src/SalomeApp/Test/SalomeAppTest.hxx +++ b/src/SalomeApp/Test/SalomeAppTest.hxx @@ -25,7 +25,17 @@ #include -class SalomeAppTest : public CppUnit::TestFixture +#ifdef WIN32 +# if defined SALOMEAPPTEST_EXPORTS || defined SalomeAppTest_EXPORTS +# define SALOMEAPPTEST_EXPORT __declspec( dllexport ) +# else +# define SALOMEAPPTEST_EXPORT __declspec( dllimport ) +# endif +#else +# define SALOMEAPPTEST_EXPORT +#endif + +class SALOMEAPPTEST_EXPORT SalomeAppTest : public CppUnit::TestFixture { CPPUNIT_TEST_SUITE( SalomeAppTest ); CPPUNIT_TEST( testSalomeApp ); diff --git a/src/SalomeApp/pluginsdemo/CMakeLists.txt b/src/SalomeApp/pluginsdemo/CMakeLists.txt new file mode 100755 index 000000000..aac1491ae --- /dev/null +++ b/src/SalomeApp/pluginsdemo/CMakeLists.txt @@ -0,0 +1,42 @@ +# Copyright (C) 2012 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. +# +# 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 +# + +# +# Note that the plugins files should be installed in the directory +# (ROOT_DIR/share/salome/plugins) or one of this +# sub-directories (the search of plugins by the plugin manager is +# recurcive from this folder, in each SALOME module, i.e. each +# variable *_ROOT_DIR). +# + +INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/SalomeMacros.cmake) + +SET(plugins_PYTHON + salome_plugins.py + smesh_plugins.py + trihedron.py + tubedialog_ui.py + tubedialog.py + tubebuilder.py + xalome.py + minmax_dialog.py + minmax_plugin.py +) + +SALOME_INSTALL_SCRIPTS("${plugins_PYTHON}" ${GUI_salomepluginsdir}/demo DEF_PERMS) diff --git a/src/Session/CMakeLists.txt b/src/Session/CMakeLists.txt new file mode 100755 index 000000000..2968dfecd --- /dev/null +++ b/src/Session/CMakeLists.txt @@ -0,0 +1,111 @@ +# Copyright (C) 2012 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. +# +# 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_DIRECTORIES( + ${QT_INCLUDE_DIRS} + ${LIBXML_INCLUDE_DIRS} + ${PYTHON_INCLUDE_DIRS} + ${HDF5_INCLUDE_DIRS} + ${BOOST_INCLUDE_DIRS} + ${CAS_INCLUDE_DIRS} + ${OMNIORB_INCLUDE_DIRS} + ${PTHREAD_INCLUDE_DIRS} + ${KERNEL_ROOT_DIR}/include/salome + ${CMAKE_BINARY_DIR}/idl + ${CMAKE_BINARY_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/../Qtx + ${CMAKE_CURRENT_SOURCE_DIR}/../SUIT + ${CMAKE_CURRENT_SOURCE_DIR}/../Event + ${CMAKE_CURRENT_SOURCE_DIR}/../Style + ${CMAKE_CURRENT_SOURCE_DIR}/../CASCatch +) + +SET(COMMON_LIBS + ${SalomeNS} + ${SalomeLifeCycleCORBA} + ${OpUtil} + ${SALOMELocalTrace} + ${SalomeCatalog} + ${SalomeDSClient} + ${CAS_KERNEL} + ${with_loggerTraceCollector} + ${SalomeIDLKernel} + ${SalomeContainer} + ${TOOLSDS} + ${SalomeLauncher} + ${Registry} + ${SALOMEBasics} + suit + Event + SalomeIDLGUI + SalomeStyle + ${QT_LIBS} +) +SET(COMMON_FLAGS "${QT_DEFINITIONS} ${LIBXML_DEFINITIONS} ${PYTHON_DEFINITIONS} ${HDF5_DEFINITIONS} ${BOOST_DEFINITIONS} ${CAS_DEFINITIONS} ${CORBA_DEFINITIONS} ${PLATFORM_DEFINITIONS}") + +IF(ENABLE_TESTRECORDER) + SET(COMMON_FLAGS "${COMMON_FLAGS} -DENABLE_TESTRECORDER ${TESTRECORDER_DEFINITIONS}") + SET(COMMON_LIBS ${COMMON_LIBS} ${TESTRECORDER_LIBS}) +ENDIF(ENABLE_TESTRECORDER) + +SET(SalomeSession_SOURCES + Session_Session_i.cxx + Session_ServerThread.cxx + Session_ServerLauncher.cxx + Session_ServerCheck.cxx + SalomeApp_Engine_i.cxx +) +ADD_LIBRARY(SalomeSession SHARED ${SalomeSession_SOURCES}) +SET_TARGET_PROPERTIES(SalomeSession PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}") +TARGET_LINK_LIBRARIES(SalomeSession ${COMMON_LIBS}) +INSTALL(TARGETS SalomeSession DESTINATION ${GUI_salomelib_LIBS}) + +SET(SALOME_Session_Server_LIBS + ${COMMON_LIBS} + ${SalomeContainer} + ${SalomeResourcesManager} + ${TOOLSDS} + ${SalomeHDFPersist} + ${SalomeDSImpl} + ${SalomeGenericObj} + ${Registry} + ${SalomeNotification} + ${SALOMEBasics} + ${SalomeLauncher} + qtx + SalomeIDLGUI + SalomeSession + ${HDF5_LIBS} + ${PYTHON_LIBS} + ${OMNIORB_LIBS} +) +ADD_EXECUTABLE(SALOME_Session_Server SALOME_Session_Server.cxx) +SET_TARGET_PROPERTIES(SALOME_Session_Server PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}") +TARGET_LINK_LIBRARIES(SALOME_Session_Server ${SALOME_Session_Server_LIBS}) +INSTALL(TARGETS SALOME_Session_Server DESTINATION ${GUI_salomebin_BINS}) + +SET(COMMON_HEADERS_H + Session_Session_i.hxx + SALOME_Session.hxx + Session_ServerLauncher.hxx + Session_ServerThread.hxx + Session_ServerCheck.hxx + SalomeApp_Engine_i.hxx +) +INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${GUI_salomeinclude_HEADERS}) diff --git a/src/Session/SALOME_Session_Server.cxx b/src/Session/SALOME_Session_Server.cxx index 3dfee002d..f94e9a639 100755 --- a/src/Session/SALOME_Session_Server.cxx +++ b/src/Session/SALOME_Session_Server.cxx @@ -178,14 +178,59 @@ protected: virtual long userFileId( const QString& _fname ) const { + ////////////////////////////////////////////////////////////////////////////////////////////// + // In SALOME and SALOME-based applications the user preferences file is named as + // - .xml. on Windows + // - rc. on Linux + // where + // * AppName is application name, default SalomeApp (can be customized in SALOME-based + // applications + // * AppVersion is application version + // + // Since version 6.5.0 of SALOME, user file is situated in the ~/.config/salome + // directory. For backward compatibility, when user preferences from nearest + // version of application is searched, user home directory is also looked through, + // with lower priority. + // + // Since version 6.6.0 of SALOME, user file name on Linux is no more prefixed by dot + // symbol since it is situated in hidden ~/.config/salome directory. Files with dot + // prefix also though taken into account (with lower priority) for backward compatibility. + // + // Notes: + // - Currently the following format of version number is supported: + // [.[.[]]] + // Parts in square brackets are considered optional. Here: + // * major - major version id + // * minor - minor version id + // * release - maintenance version id + // * type - dev or patch marker; it can be either one alphabetical symbol (from 'a' to 'z') + // or 'rc' to point release candidate (case-insensitive) + // * dev - dev version or patch number + // All numerical values must be of range [1-99]. + // Examples: 1.0, 6.5.0, 1.2.0a1, 3.3.3rc3 (release candidate 3), 11.0.0p1 (patch 1) + // + // - Versioning approach can be customized by implementing and using own resource manager class, + // see QtxResurceMgr, SUIT_ResourceMgr classes. + ////////////////////////////////////////////////////////////////////////////////////////////// long id = -1; if ( !myExtAppName.isEmpty() ) { #ifdef WIN32 - QRegExp exp( QString( "%1\\.%2\\.([a-zA-Z0-9.]+)$" ).arg( myExtAppName ).arg( currentFormat() ) ); + // On Windows, user file name is something like SalomeApp.xml.6.5.0 where + // - SalomeApp is an application name (can be customized) + // - xml is a file format (xml or ini) + // - 6.5.0 is an application version, can include alfa/beta/rc marks, e.g. 6.5.0a3, 6.5.0rc1 + QRegExp exp( QString( "%1\\.%2\\.([a-zA-Z0-9.]+)" ).arg( myExtAppName ).arg( currentFormat() ) ); #else - QRegExp exp( QString( "\\.%1rc\\.([a-zA-Z0-9.]+)$" ).arg( myExtAppName ) ); + // On Linux, user file name is something like SalomeApprc.6.5.0 where + // - SalomeApp is an application name (can be customized) + // - 6.5.0 is an application version, can include alfa/beta/rc marks, e.g. 6.5.0a3, 6.5.0rc1 + + // VSR 24/09/2012: issue 0021781: since version 6.6.0 user filename is not prepended with "." + // when it is stored in the ~/.config/ directory; + // for backward compatibility we also check files prepended with "." with lower priority + QRegExp exp( QString( "\\.?%1rc\\.([a-zA-Z0-9.]+)" ).arg( myExtAppName ) ); #endif - QRegExp vers_exp( "^([0-9]+)([A-Za-z]?)([0-9]*)$" ); + QRegExp vers_exp( "^([0-9]+)([A-Z]|RC)?([0-9]*)", Qt::CaseInsensitive ); QString fname = QFileInfo( _fname ).fileName(); if( exp.exactMatch( fname ) ) { @@ -195,10 +240,17 @@ protected: if ( vers.count() > 0 ) major = vers[0].toInt(); if ( vers.count() > 1 ) minor = vers[1].toInt(); if ( vers.count() > 2 ) { - if( vers_exp.indexIn( vers[2] ) != -1 ) { + if ( vers_exp.indexIn( vers[2] ) != -1 ) { release = vers_exp.cap( 1 ).toInt(); - dev1 = vers_exp.cap( 2 )[ 0 ].toLatin1(); - dev2 = vers_exp.cap( 3 ).toInt(); + QString tag = vers_exp.cap( 2 ).toLower(); + if ( !tag.isEmpty() ) { + if ( tag == "rc" ) // release candidate + dev1 = 49; // 'rc'=49 + else // a, b, c, ... + dev1 = (int)( tag[ 0 ].toLatin1() ) - (int)( QChar('a').toLatin1() ) + 1; // 'a'=1, 'b'=2, ..., 'z'=26 + } + if ( !vers_exp.cap( 3 ).isEmpty() ) + dev2 = vers_exp.cap( 3 ).toInt(); } } @@ -207,7 +259,7 @@ protected: id*=100; id+=minor; id*=100; id+=release; id*=10000; - if ( dev > 0 ) id+=dev-10000; + if ( dev > 0 ) id-=dev; } } return id; diff --git a/src/Style/CMakeLists.txt b/src/Style/CMakeLists.txt new file mode 100755 index 000000000..3ca61786d --- /dev/null +++ b/src/Style/CMakeLists.txt @@ -0,0 +1,72 @@ +# Copyright (C) 2012 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. +# +# 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(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/UseQT4EXT.cmake) + +INCLUDE_DIRECTORIES( + ${QT_INCLUDE_DIRS} + ${KERNEL_ROOT_DIR}/include/salome + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/../Qtx +) + +SET(COMMON_FLAGS "${QT_DEFINITIONS} ${PLATFORM_DEFINITIONS}") +SET(COMMON_LIBS ${QT_MT_LIBS} qtx) + +SET(GUI_HEADERS + Style_PrefDlg.h + Style_Salome.h +) +QT4_WRAP_CPP(GUI_HEADERS_MOC ${GUI_HEADERS}) + +SET(RCCS Style.qrc) +QT4_ADD_RESOURCES(RCC_SRCS ${RCCS}) + +SET(SalomeStyle_SOURCES + Style.h + Style_Model.h + Style_PrefDlg.h + Style_Salome.h + Style_Tools.h + Style_ResourceMgr.h + Style_Model.cxx + Style_PrefDlg.cxx + Style_ResourceMgr.cxx + Style_Salome.cxx + Style_Tools.cxx +) + +SET(GUITS_SOURCES + resources/Style_msg_fr.ts +) + +ADD_LIBRARY(SalomeStyle SHARED ${SalomeStyle_SOURCES} ${GUI_HEADERS_MOC} ${RCC_SRCS}) +SET_TARGET_PROPERTIES(SalomeStyle PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}") +TARGET_LINK_LIBRARIES(SalomeStyle ${COMMON_LIBS}) +INSTALL(TARGETS SalomeStyle DESTINATION ${GUI_salomelib_LIBS}) + +SET(COMMON_HEADERS_H + Style.h + Style_PrefDlg.h + Style_Salome.h +) + +INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${GUI_salomeinclude_HEADERS}) +QT4_INSTALL_TS_RESOURCES("${GUITS_SOURCES}" "${GUI_salomeres_DATA}") + +INSTALL(FILES resources/SalomeStyle.xml DESTINATION ${GUI_salomeres_DATA}) diff --git a/src/TOOLSGUI/CMakeLists.txt b/src/TOOLSGUI/CMakeLists.txt new file mode 100755 index 000000000..ad53d1d8a --- /dev/null +++ b/src/TOOLSGUI/CMakeLists.txt @@ -0,0 +1,65 @@ +# Copyright (C) 2012 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. +# +# 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(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/UseQT4EXT.cmake) + +INCLUDE_DIRECTORIES( + ${CAS_INCLUDE_DIRS} + ${QT_INCLUDE_DIRS} + ${OMNIORB_INCLUDE_DIRS} + ${BOOST_INCLUDE_DIRS} + ${PTHREAD_INCLUDE_DIRS} + ${KERNEL_ROOT_DIR}/include/salome + ${CMAKE_BINARY_DIR}/idl + ${CMAKE_CURRENT_SOURCE_DIR}/../Qtx + ${CMAKE_CURRENT_SOURCE_DIR}/../SUIT) + +SET(COMMON_LIBS + ${QT_MT_LIBS} + suit + ${CAS_KERNEL} + ${SalomeIDLKernel} + ${SALOMELocalTrace} + ${SalomeNS} + ${OpUtil} + SalomeIDLGUI +) + +SET(GUI_HEADERS ToolsGUI_CatalogGeneratorDlg.h ToolsGUI_RegWidget.h) +QT4_WRAP_CPP(GUI_HEADERS ${GUI_HEADERS}) +SET(ToolsGUI_SOURCES + ToolsGUI_CatalogGeneratorDlg.cxx + ToolsGUI_RegWidget.cxx + ToolsGUI.cxx +) + +SET(GUITS_SOURCES + resources/ToolsGUI_msg_en.ts + resources/ToolsGUI_msg_fr.ts +) + +ADD_LIBRARY(ToolsGUI SHARED ${ToolsGUI_SOURCES} ${GUI_HEADERS}) +SET_TARGET_PROPERTIES(ToolsGUI PROPERTIES COMPILE_FLAGS "${QT_DEFINITIONS} ${CAS_DEFINITIONS} ${BOOST_DEFINITIONS} ${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}") +TARGET_LINK_LIBRARIES(ToolsGUI ${COMMON_LIBS}) +INSTALL(TARGETS ToolsGUI DESTINATION ${GUI_salomelib_LIBS}) + +FILE(GLOB COMMON_HEADERS_H "${CMAKE_CURRENT_SOURCE_DIR}/*.h") +INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${GUI_salomeinclude_HEADERS}) +QT4_INSTALL_TS_RESOURCES("${GUITS_SOURCES}" "${GUI_salomeres_DATA}") + diff --git a/src/TreeData/CMakeLists.txt b/src/TreeData/CMakeLists.txt new file mode 100755 index 000000000..d41e6256f --- /dev/null +++ b/src/TreeData/CMakeLists.txt @@ -0,0 +1,77 @@ +# Copyright (C) 2012 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. +# +# 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(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/UseQT4EXT.cmake) + +ADD_SUBDIRECTORY(Test) + +INCLUDE_DIRECTORIES( + ${CAS_INCLUDE_DIRS} + ${QT_INCLUDE_DIRS} + ${OMNIORB_INCLUDE_DIRS} + ${BOOST_INCLUDE_DIRS} + ${PTHREAD_INCLUDE_DIRS} + ${KERNEL_ROOT_DIR}/include/salome + ${CMAKE_CURRENT_SOURCE_DIR}/../SalomeApp + ${CMAKE_CURRENT_SOURCE_DIR}/../LightApp + ${CMAKE_CURRENT_SOURCE_DIR}/../CAM + ${CMAKE_CURRENT_SOURCE_DIR}/../STD + ${CMAKE_CURRENT_SOURCE_DIR}/../ObjBrowser + ${CMAKE_CURRENT_SOURCE_DIR}/../SUIT + ${CMAKE_CURRENT_SOURCE_DIR}/../Qtx + ${CMAKE_CURRENT_SOURCE_DIR}/../GuiHelpers +) + +SET(COMMON_FLAGS "${CAS_DEFINITIONS} ${QT_DEFINITIONS} ${BOOST_DEFINITIONS} ${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}") + +SET(COMMON_LIBS + ${CORBA_LIBS} + ${QT_LIBS} + ${KERNEL_LDFLAGS} + ${SalomeLifeCycleCORBA} + ${SalomeKernelHelpers} + SalomeApp + LightApp + suit + qtx + CAM + std + ObjBrowser +) + +SET(GUI_HEADERS TreeModel.hxx TreeView.hxx TreeObserver.hxx) +QT4_WRAP_CPP(GUI_HEADERS_MOC ${GUI_HEADERS}) +SET(SalomeTreeData_SOURCES + DockWidgets.cxx + TreeModel.cxx + TreeItem.cxx + TreeView.cxx + TreeObserver.cxx + DataModel.cxx + DataObject.cxx + DataProcessor.cxx + TreeGuiManager.cxx +) + +ADD_LIBRARY(SalomeTreeData SHARED ${SalomeTreeData_SOURCES} ${GUI_HEADERS_MOC}) +SET_TARGET_PROPERTIES(SalomeTreeData PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}") +TARGET_LINK_LIBRARIES(SalomeTreeData ${COMMON_LIBS}) +INSTALL(TARGETS SalomeTreeData DESTINATION ${GUI_salomelib_LIBS}) + +FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx") +INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${GUI_salomeinclude_HEADERS}) diff --git a/src/TreeData/Test/CMakeLists.txt b/src/TreeData/Test/CMakeLists.txt new file mode 100755 index 000000000..560aa8e88 --- /dev/null +++ b/src/TreeData/Test/CMakeLists.txt @@ -0,0 +1,67 @@ +# Copyright (C) 2012 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. +# +# 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(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/UseQT4EXT.cmake) + +INCLUDE_DIRECTORIES( + ${OMNIORB_INCLUDE_DIRS} + ${QT_INCLUDE_DIRS} + ${CMAKE_CURRENT_BINARY_DIR} + ${KERNEL_ROOT_DIR}/include/salome + ${CMAKE_SOURCE_DIR}/src/GuiHelpers + ${CMAKE_SOURCE_DIR}/src/TreeData +) + +SET(COMMON_LIBS + ${CORBA_LIBS} + ${QT_LIBS} + SalomeTreeData + SalomeGuiHelpers + ${SalomeLifeCycleCORBA} + ${SalomeKernelHelpers} +) + +SET(GUI_HEADERS mainwindow.hxx) +QT4_WRAP_CPP(GUI_HEADERS ${GUI_HEADERS}) +SET(GUI_FORMS mainwindow.ui) +QT4_WRAP_UI(GUI_FORMS_HEADERS ${GUI_FORMS}) + +SET(TreeData_guitester_SOURCES + testhelper.hxx + testhelper.cxx + guitester.cxx + mainwindow.hxx + mainwindow.cxx + MyDataModel.hxx + MyDataModel.cxx +) + +ADD_EXECUTABLE(TreeData_guitester ${TreeData_guitester_SOURCES} ${GUI_HEADERS} ${GUI_FORMS_HEADERS}) +SET_TARGET_PROPERTIES(TreeData_guitester PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} ${QT_DEFINITIONS} ${PLATFORM_DEFINITIONS}") +TARGET_LINK_LIBRARIES(TreeData_guitester ${COMMON_LIBS}) + +SET(TreeData_tester_SOURCES + tester.cxx + MyDataModel.cxx +) + +ADD_EXECUTABLE(TreeData_tester ${TreeData_tester_SOURCES}) +SET_TARGET_PROPERTIES(TreeData_tester PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} ${QT_DEFINITIONS} ${PLATFORM_DEFINITIONS}") +TARGET_LINK_LIBRARIES(TreeData_tester ${COMMON_LIBS}) + +INSTALL(TARGETS TreeData_guitester TreeData_tester DESTINATION ${GUI_salomebin_BINS}) diff --git a/src/TreeData/Test/data.txt b/src/TreeData/Test/data.txt index d28285b3b..df85cb24c 100755 --- a/src/TreeData/Test/data.txt +++ b/src/TreeData/Test/data.txt @@ -1,15 +1,15 @@ -Tuyauterie;RF1;T1 -Tuyauterie;RF1;T2 -Tuyauterie;RF1;T3 -Tuyauterie;RF2;T1 -Tuyauterie;RF3;T1 -Tuyauterie;RF3;T2 -Composansts;RF1;T1 -Composansts;RF1;T2 -Composansts;RF3;T2 -Genie Civil;RF1;T1 -Genie Civil;RF1;T2 -Genie Civil;RF1;T3 -Genie Civil;RF2;T1 -Genie Civil;RF3;T1 -Genie Civil;RF3;T2 +Tuyauterie;RF1;T1 +Tuyauterie;RF1;T2 +Tuyauterie;RF1;T3 +Tuyauterie;RF2;T1 +Tuyauterie;RF3;T1 +Tuyauterie;RF3;T2 +Composansts;RF1;T1 +Composansts;RF1;T2 +Composansts;RF3;T2 +Genie Civil;RF1;T1 +Genie Civil;RF1;T2 +Genie Civil;RF1;T3 +Genie Civil;RF2;T1 +Genie Civil;RF3;T1 +Genie Civil;RF3;T2 diff --git a/src/VTKViewer/CMakeLists.txt b/src/VTKViewer/CMakeLists.txt new file mode 100755 index 000000000..7d0442f1d --- /dev/null +++ b/src/VTKViewer/CMakeLists.txt @@ -0,0 +1,135 @@ +# Copyright (C) 2012 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. +# +# 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(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/UseQT4EXT.cmake) + +INCLUDE_DIRECTORIES( + ${CAS_INCLUDE_DIRS} + ${QT_INCLUDE_DIRS} + ${VTK_INCLUDE_DIRS} + ${PTHREAD_INCLUDE_DIRS} + ${KERNEL_ROOT_DIR}/include/salome + ${CMAKE_CURRENT_SOURCE_DIR}/../Qtx + ${CMAKE_CURRENT_SOURCE_DIR}/../SUIT +) + +SET(COMMON_FLAGS "${VTK_DEFINITIONS} ${CAS_DEFINITIONS} ${QT_DEFINITIONS} ${PLATFORM_DEFINITIONS}") +SET(COMMON_LIBS ${QT_MT_LIBS} ${OGL_LIBS} ${VTK_LIBS} ${CAS_KERNEL} qtx suit ${SALOMELocalTrace}) + +SET(GUI_HEADERS + VTKViewer_RenderWindow.h + VTKViewer_RenderWindowInteractor.h + VTKViewer_ViewManager.h + VTKViewer_ViewModel.h + VTKViewer_ViewWindow.h + VTKViewer_MarkerWidget.h + VTKViewer_MarkerDlg.h +) +QT4_WRAP_CPP(GUI_HEADERS_MOC ${GUI_HEADERS}) + +SET(RCCS VTKViewer.qrc) +QT4_ADD_RESOURCES(RCC_SRCS ${RCCS}) + +SET(VTKViewer_SOURCES + VTKViewer_CellLocationsArray.cxx + VTKViewer_Actor.cxx + VTKViewer_FramedTextActor.cxx + VTKViewer_ExtractUnstructuredGrid.cxx + VTKViewer_Filter.cxx + VTKViewer_GeometryFilter.cxx + VTKViewer_AppendFilter.cxx + VTKViewer_Algorithm.cxx + VTKViewer_InteractorStyle.cxx + VTKViewer_RenderWindow.cxx + VTKViewer_RenderWindowInteractor.cxx + VTKViewer_ShrinkFilter.cxx + VTKViewer_Transform.cxx + VTKViewer_TransformFilter.cxx + VTKViewer_Trihedron.cxx + VTKViewer_Utilities.cxx + VTKViewer_ViewManager.cxx + VTKViewer_ViewModel.cxx + VTKViewer_ConvexTool.cxx + VTKViewer_ViewWindow.cxx + VTKViewer_ArcBuilder.cxx + VTKViewer_MarkerUtils.cxx + VTKViewer_MarkerWidget.cxx + VTKViewer_MarkerDlg.cxx + VTKViewer_PolyDataMapper.cxx + VTKViewer_DataSetMapper.cxx + VTKViewer_Texture.cxx + VTKViewer_OpenGLRenderer.cxx + VTKViewer_CellCenters.cxx +) + +SET(GUITS_SOURCES + resources/VTKViewer_images.ts + resources/VTKViewer_msg_en.ts + resources/VTKViewer_msg_fr.ts +) + +ADD_LIBRARY(VTKViewer SHARED ${VTKViewer_SOURCES} ${GUI_HEADERS_MOC} ${RCC_SRCS}) +SET_TARGET_PROPERTIES(VTKViewer PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}") +TARGET_LINK_LIBRARIES(VTKViewer ${COMMON_LIBS}) +INSTALL(TARGETS VTKViewer DESTINATION ${GUI_salomelib_LIBS}) + +#ADD_EXECUTABLE(TestVTKViewer VTKViewer.cxx) +#SET_TARGET_PROPERTIES(TestVTKViewer PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}" OUTPUT_NAME "VTKViewer") +#TARGET_LINK_LIBRARIES(TestVTKViewer VTKViewer ${COMMON_LIBS}) +#INSTALL(TARGETS TestVTKViewer DESTINATION ${GUI_salomebin_BINS}) + +SET(COMMON_HEADERS_H + VTKViewer.h + VTKViewer_CellLocationsArray.h + VTKViewer_Actor.h + VTKViewer_FramedTextActor.h + VTKViewer_ExtractUnstructuredGrid.h + VTKViewer_ConvexTool.h + VTKViewer_Filter.h + VTKViewer_GeometryFilter.h + VTKViewer_AppendFilter.h + VTKViewer_Algorithm.h + VTKViewer_InteractorStyle.h + VTKViewer_RenderWindow.h + VTKViewer_RenderWindowInteractor.h + VTKViewer_ShrinkFilter.h + VTKViewer_TransformFilter.h + VTKViewer_Transform.h + VTKViewer_Trihedron.h + VTKViewer_Utilities.h + VTKViewer_ViewManager.h + VTKViewer_ViewModel.h + VTKViewer_ViewWindow.h + VTKViewer_Functor.h + VTKViewer_ArcBuilder.h + VTKViewer_MarkerDef.h + VTKViewer_MarkerUtils.h + VTKViewer_MarkerWidget.h + VTKViewer_MarkerDlg.h + VTKViewer_PolyDataMapper.h + VTKViewer_DataSetMapper.h + VTKViewer_Texture.h + VTKViewer_OpenGLRenderer.h + VTKViewer_CellCenters.h +) + +INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${GUI_salomeinclude_HEADERS}) +QT4_INSTALL_TS_RESOURCES("${GUITS_SOURCES}" "${GUI_salomeres_DATA}") + +FILE(GLOB GUIPNG_DATA "${CMAKE_CURRENT_SOURCE_DIR}/resources/*.png") +INSTALL(FILES ${GUIPNG_DATA} DESTINATION ${GUI_salomeres_DATA}) diff --git a/src/VTKViewer/VTKViewer_MarkerDlg.cxx b/src/VTKViewer/VTKViewer_MarkerDlg.cxx index 6f6d9ea57..8b02e5553 100644 --- a/src/VTKViewer/VTKViewer_MarkerDlg.cxx +++ b/src/VTKViewer/VTKViewer_MarkerDlg.cxx @@ -16,6 +16,8 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // +// File : VTKViewer_MarkerDlg.cxx +// Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com) #include "VTKViewer_MarkerDlg.h" #include "VTKViewer_MarkerWidget.h" @@ -26,117 +28,164 @@ #include #include -#include +#include #include /*! - * Class : VTKViewer_MarkerDlg - * Description : Dialog for specifying point marker parameters - */ + \class VTKViewer_MarkerDlg + \brief Dialog for specifying of point marker parameters +*/ /*! - Constructor + \brief Constructor + \param parent parent widget */ -VTKViewer_MarkerDlg::VTKViewer_MarkerDlg( QWidget* theParent ) -: QtxDialog( theParent, true, true ) +VTKViewer_MarkerDlg::VTKViewer_MarkerDlg( QWidget* parent ) +: QtxDialog( parent, true, true ) { + // set title setWindowTitle( tr( "SET_MARKER_TLT" ) ); - myMarkerWidget = new VTKViewer_MarkerWidget( mainFrame() ); + // create widgets + QFrame* frame = new QFrame( mainFrame() ); + frame->setFrameStyle( QFrame::Sunken | QFrame::Box ); + myMarkerWidget = new VTKViewer_MarkerWidget( frame ); + + // layoting + QBoxLayout* vl = new QVBoxLayout( frame ); + vl->setSpacing( 6 ) ; + vl->setMargin( 11 ); + vl->addWidget( myMarkerWidget ); - QBoxLayout* aTopLayout = new QHBoxLayout( mainFrame() ); - aTopLayout->setSpacing( 0 ); - aTopLayout->setMargin( 0 ); - aTopLayout->addWidget( myMarkerWidget ); + QBoxLayout* topLayout = new QVBoxLayout( mainFrame() ); + topLayout->setSpacing( 0 ) ; + topLayout->setMargin( 0 ); + topLayout->addWidget( frame ); + // connect signals / slots connect( this, SIGNAL( dlgHelp() ), this, SLOT( onHelp() ) ); } /*! - Destructor + \brief Destructor */ VTKViewer_MarkerDlg::~VTKViewer_MarkerDlg() { } -void VTKViewer_MarkerDlg::setHelpData( const QString& theModuleName, - const QString& theHelpFileName ) +/*! + \brief Associate documentation page with the dialog box + \param module module name + \param helpFile reference help file +*/ +void VTKViewer_MarkerDlg::setHelpData( const QString& module, + const QString& helpFile ) { - myModuleName = theModuleName; - myHelpFileName = theHelpFileName; + myModule = module; + myHelpFile = helpFile; } +/*! + \brief Process key press event + \param e key press event +*/ void VTKViewer_MarkerDlg::keyPressEvent( QKeyEvent* e ) { QtxDialog::keyPressEvent( e ); if ( e->isAccepted() ) return; + // invoke Help on key presss if ( e->key() == Qt::Key_F1 ) { e->accept(); onHelp(); } } +/*! + \brief Activate help for the dialog box +*/ void VTKViewer_MarkerDlg::onHelp() { - if( myModuleName.isNull() || myHelpFileName.isNull() ) - return; - - SUIT_Application* app = SUIT_Session::session()->activeApplication(); - if (app) - app->onHelpContextModule(myModuleName, myHelpFileName); - else { - QString platform; -#ifdef WIN32 - platform = "winapplication"; -#else - platform = "application"; -#endif - SUIT_MessageBox::warning(this, tr("WRN_WARNING"), - tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE"). - arg(app->resourceMgr()->stringValue("ExternalBrowser", - platform)). - arg(myHelpFileName)); + if ( !myModule.isEmpty() && !myHelpFile.isEmpty() ) { + SUIT_Session::session()->activeApplication()->onHelpContextModule( myModule, myHelpFile ); } } -void VTKViewer_MarkerDlg::setCustomMarkerMap( VTK::MarkerMap theMarkerMap ) +/*! + \brief Set custom markers data + \param markerMap custom marker data (a map {index:texture}) +*/ +void VTKViewer_MarkerDlg::setCustomMarkers( const VTK::MarkerMap& markerMap ) { - myMarkerWidget->setCustomMarkerMap( theMarkerMap ); + myMarkerWidget->setCustomMarkers( markerMap ); } -VTK::MarkerMap VTKViewer_MarkerDlg::getCustomMarkerMap() +/*! + \brief Get custom markers data + \return custom marker data +*/ +VTK::MarkerMap VTKViewer_MarkerDlg::customMarkers() const { - return myMarkerWidget->getCustomMarkerMap(); + return myMarkerWidget->customMarkers(); } -void VTKViewer_MarkerDlg::setStandardMarker( VTK::MarkerType theMarkerType, VTK::MarkerScale theMarkerScale ) +/*! + \brief Add standard marker + The marker type specified with \a type must be > VTK::MT_USER + \param type marker type + \param icon marker icon +*/ +void VTKViewer_MarkerDlg::addMarker( VTK::MarkerType type, const QPixmap& icon ) { - myMarkerWidget->setStandardMarker( theMarkerType, theMarkerScale ); + myMarkerWidget->addMarker( type, icon ); } -void VTKViewer_MarkerDlg::setCustomMarker( int theId ) +/*! + \brief Select specified standard marker as current one + \param type marker type + \param scale marker scale (optional parameter; can be omitted for extended markers) +*/ +void VTKViewer_MarkerDlg::setMarker( VTK::MarkerType type, VTK::MarkerScale scale ) { - myMarkerWidget->setCustomMarker( theId ); + myMarkerWidget->setMarker( type, scale ); } -VTK::MarkerType VTKViewer_MarkerDlg::getMarkerType() const +/*! + \brief Select specified custom marker as current one + \param id custom marker identifier +*/ +void VTKViewer_MarkerDlg::setCustomMarker( int id ) { - return myMarkerWidget->getMarkerType(); + myMarkerWidget->setCustomMarker( id ); } -VTK::MarkerScale VTKViewer_MarkerDlg::getStandardMarkerScale() const +/*! + \brief Get current marker's type. + For custom marker, VTK::MT_USER is returned and markerId() function + then returns its identifier. + \return currently selected marker type +*/ +VTK::MarkerType VTKViewer_MarkerDlg::markerType() const { - return myMarkerWidget->getStandardMarkerScale(); + return myMarkerWidget->markerType(); } -int VTKViewer_MarkerDlg::getCustomMarkerID() const +/*! + \brief Get current marker's scale size. + For custom marker return value is undefined. + \return currently selected marker scale size +*/ +VTK::MarkerScale VTKViewer_MarkerDlg::markerScale() const { - return myMarkerWidget->getCustomMarkerID(); + return myMarkerWidget->markerScale(); } -void VTKViewer_MarkerDlg::addExtraStdMarker( VTK::MarkerType theMarkerType, const QPixmap& thePixmap ) +/*! + \bried Get currently selected custom marker's identifier. + For standard markers return value is VTK::MT_NONE. +*/ +int VTKViewer_MarkerDlg::markerId() const { - myMarkerWidget->addExtraStdMarker( theMarkerType, thePixmap ); + return myMarkerWidget->markerId(); } diff --git a/src/VTKViewer/VTKViewer_MarkerDlg.h b/src/VTKViewer/VTKViewer_MarkerDlg.h index 59bf03a68..d0a1cbed7 100644 --- a/src/VTKViewer/VTKViewer_MarkerDlg.h +++ b/src/VTKViewer/VTKViewer_MarkerDlg.h @@ -16,6 +16,8 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // +// File : VTKViewer_MarkerDlg.h +// Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com) #ifndef VTKVIEWER_MARKERDLG_H #define VTKVIEWER_MARKERDLG_H @@ -27,10 +29,6 @@ class VTKViewer_MarkerWidget; -/*! - * Class : VTKViewer_MarkerDlg - * Description : Dialog for specifying point marker parameters - */ class VTKVIEWER_EXPORT VTKViewer_MarkerDlg : public QtxDialog { Q_OBJECT @@ -42,16 +40,15 @@ public: void setHelpData( const QString& theModuleName, const QString& theHelpFileName ); - void setCustomMarkerMap( VTK::MarkerMap ); - VTK::MarkerMap getCustomMarkerMap(); + void setCustomMarkers( const VTK::MarkerMap& ); + VTK::MarkerMap customMarkers() const; + void addMarker( VTK::MarkerType, const QPixmap& ); - void setStandardMarker( VTK::MarkerType, VTK::MarkerScale ); + void setMarker( VTK::MarkerType, VTK::MarkerScale ); void setCustomMarker( int ); - VTK::MarkerType getMarkerType() const; - VTK::MarkerScale getStandardMarkerScale() const; - int getCustomMarkerID() const; - - void addExtraStdMarker( VTK::MarkerType, const QPixmap& ); + VTK::MarkerType markerType() const; + VTK::MarkerScale markerScale() const; + int markerId() const; protected: void keyPressEvent( QKeyEvent* ); @@ -61,9 +58,8 @@ private slots: private: VTKViewer_MarkerWidget* myMarkerWidget; - - QString myModuleName; - QString myHelpFileName; + QString myModule; + QString myHelpFile; }; #endif diff --git a/src/VTKViewer/VTKViewer_MarkerUtils.cxx b/src/VTKViewer/VTKViewer_MarkerUtils.cxx index 8b68004aa..f21af7dc8 100755 --- a/src/VTKViewer/VTKViewer_MarkerUtils.cxx +++ b/src/VTKViewer/VTKViewer_MarkerUtils.cxx @@ -123,17 +123,24 @@ namespace VTK theImageData->GetExtent( extent ); int width = extent[1] - extent[0] + 1; int height = extent[3] - extent[2] + 1; + + const int wmin = 20; + const int hmin = 20; + + int xshift = width < wmin ? (wmin-width)/2 : 0; + int yshift = height < hmin ? (hmin-height)/2 : 0; - QImage anImage(width, height, QImage::Format_ARGB32); + QImage anImage(width < wmin ? wmin : width, height < hmin ? hmin : height, QImage::Format_ARGB32); + anImage.fill(qRgba(255,255,255,0)); for( int i = 0; i < height; i++ ) { - QRgb* bits = reinterpret_cast( anImage.scanLine(i) ); + QRgb* bits = reinterpret_cast( anImage.scanLine(i+yshift) ); unsigned char* row = static_cast( theImageData->GetScalarPointer( extent[0], extent[2] + height - i - 1, extent[4] ) ); for( int j = 0; j < width; j++ ) { unsigned char* data = &row[ j*4 ]; - bits[j] = qRgba( data[0], data[1], data[2], data[3] ); + bits[j+xshift] = qRgba( data[0], data[1], data[2], data[3] ); } } return anImage; diff --git a/src/VTKViewer/VTKViewer_MarkerWidget.cxx b/src/VTKViewer/VTKViewer_MarkerWidget.cxx index cc0f0d035..a28417ceb 100644 --- a/src/VTKViewer/VTKViewer_MarkerWidget.cxx +++ b/src/VTKViewer/VTKViewer_MarkerWidget.cxx @@ -20,254 +20,292 @@ #include "VTKViewer_MarkerWidget.h" #include "VTKViewer_MarkerUtils.h" -#include - #include #include #include -#include -#include +#include #include #include -#include -#include -#include +#include -#define MARGIN 9 -#define SPACING 6 +const int SPACING = 6; +enum { TypeRole = Qt::UserRole, IdRole }; /*! - * Class : VTKViewer_MarkerWidget - * Description : Widget for specifying point marker parameters - */ + \class VTKViewer_MarkerWidget + \brief Widget for specifying point marker parameters +*/ /*! - Constructor + \brief Constructor + \param parent parent widget */ -VTKViewer_MarkerWidget::VTKViewer_MarkerWidget( QWidget* theParent ) -: QWidget( theParent ) +VTKViewer_MarkerWidget::VTKViewer_MarkerWidget( QWidget* parent ) + : QWidget( parent ), myCurrentIdx( -1 ) { - QRadioButton* aStandardTypeRB = new QRadioButton( tr( "STANDARD_MARKER" ), this ); - QRadioButton* aCustomTypeRB = new QRadioButton( tr( "CUSTOM_MARKER" ), this ); - myTypeGroup = new QButtonGroup( this ); - myTypeGroup->addButton( aStandardTypeRB, 0 ); - myTypeGroup->addButton( aCustomTypeRB, 1 ); - - QHBoxLayout* aRadioLayout = new QHBoxLayout; - aRadioLayout->setMargin( 0 ); - aRadioLayout->setSpacing( SPACING ); - aRadioLayout->addWidget( aStandardTypeRB ); - aRadioLayout->addWidget( aCustomTypeRB ); - - // --- - - myWGStack = new QStackedWidget( this ); - myWGStack->setFrameStyle( QFrame::Box | QFrame::Sunken ); - - // --- - - QWidget* aStdWidget = new QWidget( myWGStack ); - - QLabel* aTypeLab = new QLabel( tr( "TYPE" ), aStdWidget ); - QLabel* aScaleLab = new QLabel( tr( "SCALE" ), aStdWidget ); - - myStdTypeCombo = new QtxComboBox( aStdWidget ); - myStdScaleCombo = new QtxComboBox( aStdWidget ); - - QGridLayout* aStdLayout = new QGridLayout; - aStdLayout->setMargin( MARGIN ); - aStdLayout->setSpacing( SPACING ); - aStdLayout->addWidget( aTypeLab, 0, 0 ); - aStdLayout->addWidget( myStdTypeCombo, 0, 1 ); - aStdLayout->addWidget( aScaleLab, 1, 0 ); - aStdLayout->addWidget( myStdScaleCombo, 1, 1 ); - aStdWidget->setLayout( aStdLayout ); - - // --- - - QWidget* aCustomWidget = new QWidget( myWGStack ); - - QLabel* aCustomLab = new QLabel( tr( "CUSTOM" ), aCustomWidget ); - myCustomTypeCombo = new QtxComboBox( aCustomWidget ); - QPushButton* aBrowseBtn = new QPushButton( tr( "BROWSE" ), aCustomWidget ); - - QGridLayout* aCustomLayout = new QGridLayout; - aCustomLayout->setMargin( MARGIN ); - aCustomLayout->setSpacing( SPACING ); - aCustomLayout->addWidget( aCustomLab, 0, 0 ); - aCustomLayout->addWidget( myCustomTypeCombo, 0, 1 ); - aCustomLayout->addWidget( aBrowseBtn, 0, 2 ); - aCustomLayout->setRowStretch( 1, 5 ); - aCustomWidget->setLayout( aCustomLayout ); - - // --- - - myWGStack->insertWidget( 0, aStdWidget ); - myWGStack->insertWidget( 1, aCustomWidget ); - - // --- - - QVBoxLayout* aTopLayout = new QVBoxLayout; - aTopLayout->setMargin( MARGIN ); - aTopLayout->setSpacing( SPACING ); - aTopLayout->addLayout( aRadioLayout ); - aTopLayout->addWidget( myWGStack ); - setLayout( aTopLayout ); - - // --- - - connect( myTypeGroup, SIGNAL( buttonClicked( int ) ), myWGStack, SLOT( setCurrentIndex( int ) ) ); - connect( myStdTypeCombo, SIGNAL( currentIndexChanged( int ) ), this, SLOT( onStdMarkerChanged( int ) ) ); - connect( aBrowseBtn, SIGNAL( clicked() ), this, SLOT( onBrowse() ) ); - - // --- - - aStandardTypeRB->setChecked( true ); + // create widgets + myTypeLab = new QLabel( tr( "TYPE" ), this ); + myScaleLab = new QLabel( tr( "SCALE" ), this ); + myType = new QComboBox( this ); + myScale = new QSpinBox( this ); + // layouting + QHBoxLayout* ml = new QHBoxLayout( this ); + ml->setMargin( 0 ); + ml->setSpacing( SPACING ); + ml->addWidget( myTypeLab ); + ml->addWidget( myType ); + ml->addWidget( myScaleLab ); + ml->addWidget( myScale ); + myType->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ); + myScale->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ); + // connect signals/slots + connect( myType, SIGNAL( currentIndexChanged( int ) ), this, SLOT( onTypeChanged( int ) ) ); + // initialize init(); } /*! - Destructor + \brief Destructor */ VTKViewer_MarkerWidget::~VTKViewer_MarkerWidget() { } -void VTKViewer_MarkerWidget::setCustomMarkerMap( VTK::MarkerMap theMarkerMap ) +/*! + \brief Set custom markers data + \param markerMap custom marker data (a map {index:texture}) +*/ +void VTKViewer_MarkerWidget::setCustomMarkers( const VTK::MarkerMap& markerMap ) { - myCustomMarkerMap = theMarkerMap; - - VTK::MarkerMap::const_iterator it = theMarkerMap.begin(), itEnd = theMarkerMap.end(); - for( ; it != itEnd; it++ ) + // store custom markers data + myCustomMarkers = markerMap; + // clear current custom markers + for ( int i = myType->count()-1; i >= 0; i-- ) { + int type = myType->itemData( i, TypeRole ).toInt(); + if ( type == VTK::MT_USER ) + myType->removeItem( i ); + } + // add custom markers + VTK::MarkerMap::const_iterator it; + for ( it = myCustomMarkers.begin(); it != myCustomMarkers.end(); ++it ) { - int anId = it->first; - VTK::MarkerData aMarkerData = it->second; - QPixmap aPixmap = markerFromData( aMarkerData ); - if( !aPixmap.isNull() ) + int id = it->first; + VTK::MarkerData markerData = it->second; + QPixmap icon = markerFromData( markerData ); + if( !icon.isNull() ) { - myCustomTypeCombo->addItem( aPixmap, QString::number( anId ) ); - myCustomTypeCombo->setId( myCustomTypeCombo->count()-1, anId ); + int idx = myType->count()-1; + myType->insertItem( idx, icon, QString() ); + myType->setItemData( idx, VTK::MT_USER, TypeRole ); + myType->setItemData( idx, id, IdRole ); } } } -VTK::MarkerMap VTKViewer_MarkerWidget::getCustomMarkerMap() +/*! + \brief Get custom markers data + \return custom marker data +*/ +VTK::MarkerMap VTKViewer_MarkerWidget::customMarkers() const { - return myCustomMarkerMap; + return myCustomMarkers; } -void VTKViewer_MarkerWidget::setStandardMarker( VTK::MarkerType theMarkerType, VTK::MarkerScale theMarkerScale ) +/*! + \brief Add standard marker + The marker type specified with \a type must be > VTK::MT_USER + \param type marker type + \param icon marker icon +*/ +void VTKViewer_MarkerWidget::addMarker( VTK::MarkerType type, const QPixmap& icon ) { - if ( ( theMarkerType > VTK::MT_NONE && theMarkerType < VTK::MT_USER ) || - myExtraMarkerList.contains( theMarkerType ) ) { - myTypeGroup->button( 0 )->setChecked( true ); - myWGStack->setCurrentIndex( 0 ); - myStdTypeCombo->setCurrentId( theMarkerType ); - int aMarkerScale = std::max( (int)VTK::MS_10, std::min( (int)VTK::MS_70, (int)theMarkerScale ) ); - myStdScaleCombo->setCurrentId( aMarkerScale ); + if ( type > VTK::MT_USER ) { + int idx = (int)VTK::MT_USER - 1; + // find insertion index + while ( idx < myType->count()-1 ) { + if ( myType->itemData( idx, TypeRole ) == VTK::MT_USER ) + break; + ++idx; + } + myType->insertItem( idx, icon, QString() ); + myType->setItemData( idx, type, TypeRole ); } } -void VTKViewer_MarkerWidget::setCustomMarker( int theId ) +/*! + \brief Select specified standard marker as current one + \param type marker type + \param scale marker scale (optional parameter; can be omitted for extended markers) +*/ +void VTKViewer_MarkerWidget::setMarker( VTK::MarkerType type, VTK::MarkerScale scale ) { - if ( theId > 0 ) { - myTypeGroup->button( 1 )->setChecked( true ); - myWGStack->setCurrentIndex( 1 ); - addTexture( theId ); - myCustomTypeCombo->setCurrentId( theId ); + if ( type != VTK::MT_USER ) { + for ( int i = 0; i < myType->count()-1; i++ ) { + if ( type == myType->itemData( i, TypeRole ).toInt() ) { + myType->setCurrentIndex( i ); + break; + } + } } + if ( scale != VTK::MS_NONE ) + myScale->setValue( qMax( (int)VTK::MS_10, qMin( (int)VTK::MS_70, (int)scale ) ) ); } -VTK::MarkerType VTKViewer_MarkerWidget::getMarkerType() const +/*! + \brief Select specified custom marker as current one + \param id custom marker identifier +*/ +void VTKViewer_MarkerWidget::setCustomMarker( int id ) { - return myWGStack->currentIndex() == 0 ? (VTK::MarkerType)myStdTypeCombo->currentId() : VTK::MT_USER; + for ( int i = 0; i < myType->count()-1; i++ ) { + int type = myType->itemData( i, TypeRole ).toInt(); + if ( type == VTK::MT_USER && id == myType->itemData( i, IdRole ).toInt() ) { + myType->setCurrentIndex( i ); + break; + } + } } -VTK::MarkerScale VTKViewer_MarkerWidget::getStandardMarkerScale() const +/*! + \brief Get current marker's type. + For custom marker, VTK::MT_USER is returned and markerId() function + then returns its identifier. + \return currently selected marker type +*/ +VTK::MarkerType VTKViewer_MarkerWidget::markerType() const { - return myWGStack->currentIndex() == 0 ? (VTK::MarkerScale)myStdScaleCombo->currentId() : VTK::MS_NONE; + return myType->itemData( myType->currentIndex(), TypeRole ).toInt(); } -int VTKViewer_MarkerWidget::getCustomMarkerID() const +/*! + \brief Get current marker's scale size. + For custom marker return value is undefined. + \return currently selected marker scale size +*/ +VTK::MarkerScale VTKViewer_MarkerWidget::markerScale() const { - return myWGStack->currentIndex() == 1 ? myCustomTypeCombo->currentId() : 0; + return myScale->value(); } -void VTKViewer_MarkerWidget::addExtraStdMarker( VTK::MarkerType theMarkerType, const QPixmap& thePixmap ) +/*! + \bried Get currently selected custom marker's identifier. + For standard markers return value is VTK::MT_NONE. +*/ +int VTKViewer_MarkerWidget::markerId() const { - if( myExtraMarkerList.isEmpty() ) - myStdTypeCombo->insertSeparator( myStdTypeCombo->count() ); - myStdTypeCombo->addItem( thePixmap, QString() ); - myStdTypeCombo->setId( myStdTypeCombo->count()-1, theMarkerType ); - - myExtraMarkerList.append( theMarkerType ); + int type = myType->itemData( myType->currentIndex(), TypeRole ).toInt(); + return type == VTK::MT_USER ? myType->itemData( myType->currentIndex(), IdRole ).toInt() : VTK::MT_NONE; } -void VTKViewer_MarkerWidget::init() +/*! + \brief Get access to the internal marker type label + \return marker type label widget +*/ +QLabel* VTKViewer_MarkerWidget::typeLabel() { - SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr(); - - for ( int i = VTK::MT_POINT; i < VTK::MT_USER; i++ ) { - QString icoFile = QString( "ICON_VERTEX_MARKER_%1" ).arg( i ); - QPixmap pixmap = resMgr->loadPixmap( "VTKViewer", tr( qPrintable( icoFile ) ) ); - myStdTypeCombo->addItem( pixmap, QString() ); - myStdTypeCombo->setId( myStdTypeCombo->count()-1, i ); - } - - for ( int i = VTK::MS_10; i <= VTK::MS_70; i++ ) { - myStdScaleCombo->addItem( QString::number( (i-1)*0.5 + 1.0 ) ); - myStdScaleCombo->setId( myStdScaleCombo->count()-1, i ); - } + return myTypeLab; } -void VTKViewer_MarkerWidget::addTexture( int id, bool select ) +/*! + \brief Get access to the internal marker scale label + \return marker scale label widget +*/ +QLabel* VTKViewer_MarkerWidget::scaleLabel() { - if ( id > 0 && myCustomTypeCombo->index( id ) == -1 && - myCustomMarkerMap.find( id ) != myCustomMarkerMap.end() ) { - VTK::MarkerData aMarkerData = myCustomMarkerMap[ id ]; - QPixmap pixmap = markerFromData( aMarkerData ); - if( !pixmap.isNull() ) { - myCustomTypeCombo->addItem( pixmap, QString::number( id ) ); - myCustomTypeCombo->setId( myCustomTypeCombo->count()-1, id ); - if ( select ) myCustomTypeCombo->setCurrentId( id ); - } - } + return myScaleLab; } -QPixmap VTKViewer_MarkerWidget::markerFromData( const VTK::MarkerData& theMarkerData ) +/*! + \brief Internal initialization +*/ +void VTKViewer_MarkerWidget::init() { - const VTK::MarkerTexture& aMarkerTexture = theMarkerData.second; - vtkSmartPointer anImageData = VTK::MakeVTKImage( aMarkerTexture, false ); + myType->blockSignals( true ); - QImage anImage = VTK::ConvertToQImage( anImageData.GetPointer() ); - if( anImage.isNull() ) - return QPixmap(); + SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr(); + // standard marker types + for ( int type = VTK::MT_POINT; type < VTK::MT_USER; type++ ) { + QString icoFile = QString( "ICON_VERTEX_MARKER_%1" ).arg( type ); + QPixmap pixmap = resMgr->loadPixmap( "VTKViewer", tr( qPrintable( icoFile ) ) ); + myType->addItem( pixmap, QString() ); + myType->setItemData( myType->count()-1, type, TypeRole ); + } + // standard marker sizes + myScale->setMinimum( (int)VTK::MS_10 ); + myScale->setMaximum( (int)VTK::MS_70 ); + // add item for loading custom textures + myType->addItem( "..." ); + myType->setItemData( myType->count()-1, VTK::MT_NONE, TypeRole ); - return QPixmap::fromImage( anImage ); + myType->blockSignals( false ); + + // set current item to first type in the list + myType->setCurrentIndex( 0 ); } -void VTKViewer_MarkerWidget::onStdMarkerChanged( int index ) +/*! + \brief Create icon from the custom marker data (texture) + \param markerData custom marker data + \return icon generated from texture specified with marker data +*/ +QPixmap VTKViewer_MarkerWidget::markerFromData( const VTK::MarkerData& markerData ) { - VTK::MarkerType aMarkerType = (VTK::MarkerType)myStdTypeCombo->id( index ); - bool anIsExtraMarker = myExtraMarkerList.contains( aMarkerType ); - myStdScaleCombo->setEnabled( !anIsExtraMarker ); + // get texture data + const VTK::MarkerTexture& texture = markerData.second; + // generate VTK image + vtkSmartPointer image = VTK::MakeVTKImage( texture, false ); + // convert VTK image to icon + QImage qimage = VTK::ConvertToQImage( image.GetPointer() ); + return qimage.isNull() ? QPixmap() : QPixmap::fromImage( qimage ); } -void VTKViewer_MarkerWidget::onBrowse() +/*! + \brief Called when marker type is changed (by the user or programmatically) + \param index index of item being selected +*/ +void VTKViewer_MarkerWidget::onTypeChanged( int index ) { - QStringList filters; - filters << tr( "Texture files (*.dat)" ) << tr( "All files (*)" ); - QString aFileName = SUIT_Session::session()->activeApplication()->getFileName( true, QString(), filters.join( ";;" ), tr( "LOAD_TEXTURE_TLT" ), this ); - if ( !aFileName.isEmpty() ) { - VTK::MarkerTexture aMarkerTexture; - if ( VTK::LoadTextureData( aFileName, VTK::MS_NONE, aMarkerTexture ) ) { - int anId = VTK::GetUniqueId( myCustomMarkerMap ); - VTK::MarkerData& aMarkerData = myCustomMarkerMap[ anId ]; - aMarkerData.first = aFileName.toStdString(); - aMarkerData.second = aMarkerTexture; - addTexture( anId, true ); + if ( index == myType->count()-1 ) { + // browse new custom texture file item is selected + QStringList filters; + filters << tr( "Texture files (*.dat)" ) << tr( "All files (*)" ); + QString fileName = SUIT_Session::session()->activeApplication()->getFileName( true, + QString(), + filters.join( ";;" ), + tr( "LOAD_TEXTURE_TLT" ), + parentWidget() ); + if ( !fileName.isEmpty() ) { + // load texture and add new marker + VTK::MarkerTexture texture; + if ( VTK::LoadTextureData( fileName, VTK::MS_NONE, texture ) ) { + int id = VTK::GetUniqueId( myCustomMarkers ); + VTK::MarkerData& markerData = myCustomMarkers[ id ]; + markerData.first = fileName.toStdString(); + markerData.second = texture; + QPixmap icon = markerFromData( markerData ); + if( !icon.isNull() ) { + int idx = myType->count()-1; + myType->blockSignals( true ); + myType->insertItem( idx, icon, QString() ); + myType->blockSignals( false ); + myType->setItemData( idx, VTK::MT_USER, TypeRole ); + myType->setItemData( idx, id, IdRole ); + myType->setCurrentIndex( idx ); + return; + } + } } + // if user cancelled texture loading or there was an error when loading texture + // reset to the previous item + myType->setCurrentIndex( myCurrentIdx ); + return; + } + else { + myCurrentIdx = index; } + int type = myType->itemData( index, TypeRole ).toInt(); + myScale->setEnabled( type < VTK::MT_USER ); + myScaleLab->setEnabled( type < VTK::MT_USER ); } diff --git a/src/VTKViewer/VTKViewer_MarkerWidget.h b/src/VTKViewer/VTKViewer_MarkerWidget.h index 671589087..357567f1a 100644 --- a/src/VTKViewer/VTKViewer_MarkerWidget.h +++ b/src/VTKViewer/VTKViewer_MarkerWidget.h @@ -16,6 +16,8 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // +// File : VTKViewer_MarkerWidget.h +// Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com) #ifndef VTKVIEWER_MARKERWIDGET_H #define VTKVIEWER_MARKERWIDGET_H @@ -25,10 +27,9 @@ #include -class QButtonGroup; -class QStackedWidget; - -class QtxComboBox; +class QComboBox; +class QLabel; +class QSpinBox; /*! * Class : VTKViewer_MarkerWidget @@ -42,36 +43,37 @@ public: VTKViewer_MarkerWidget( QWidget* ); virtual ~VTKViewer_MarkerWidget(); - void setCustomMarkerMap( VTK::MarkerMap ); - VTK::MarkerMap getCustomMarkerMap(); + void setCustomMarkers( const VTK::MarkerMap& ); + VTK::MarkerMap customMarkers() const; + void addMarker( VTK::MarkerType, const QPixmap& ); - void setStandardMarker( VTK::MarkerType, VTK::MarkerScale ); + void setMarker( VTK::MarkerType, VTK::MarkerScale = VTK::MS_NONE ); void setCustomMarker( int ); - VTK::MarkerType getMarkerType() const; - VTK::MarkerScale getStandardMarkerScale() const; - int getCustomMarkerID() const; - void addExtraStdMarker( VTK::MarkerType, const QPixmap& ); + VTK::MarkerType markerType() const; + VTK::MarkerScale markerScale() const; + int markerId() const; + + QLabel* typeLabel(); + QLabel* scaleLabel(); private: void init(); - void addTexture( int, bool = false ); QPixmap markerFromData( const VTK::MarkerData& ); private slots: - void onStdMarkerChanged( int ); - void onBrowse(); + void onTypeChanged( int ); private: - QButtonGroup* myTypeGroup; - QStackedWidget* myWGStack; - QtxComboBox* myStdTypeCombo; - QtxComboBox* myStdScaleCombo; - QtxComboBox* myCustomTypeCombo; - - VTK::MarkerMap myCustomMarkerMap; - - QList myExtraMarkerList; + // widgets + QLabel* myTypeLab; + QComboBox* myType; + QLabel* myScaleLab; + QSpinBox* myScale; + // custom markers data + VTK::MarkerMap myCustomMarkers; + // current item + int myCurrentIdx; }; #endif diff --git a/src/VTKViewer/VTKViewer_Utilities.cxx b/src/VTKViewer/VTKViewer_Utilities.cxx index 15cfe2060..cc8fec734 100755 --- a/src/VTKViewer/VTKViewer_Utilities.cxx +++ b/src/VTKViewer/VTKViewer_Utilities.cxx @@ -124,14 +124,30 @@ ComputeVisiblePropBounds(vtkRenderer* theRenderer, if(VTKViewer_Actor* anActor = VTKViewer_Actor::SafeDownCast(aProp)) if(anActor->IsInfinitive()) continue; - vtkFloatingPointType *aBounds = aProp->GetBounds(); + static vtkFloatingPointType MIN_DISTANCE = 1./VTK_LARGE_FLOAT; static vtkFloatingPointType MAX_DISTANCE = 0.9*VTK_LARGE_FLOAT; + + if(abs(aBounds[1] - aBounds[0]) < MIN_DISTANCE) { + aBounds[0]-=0.001; + aBounds[1]+=0.001; + } + + if(abs(aBounds[3] - aBounds[2]) < MIN_DISTANCE) { + aBounds[2]-=0.001; + aBounds[3]+=0.001; + } + + if(abs(aBounds[5] - aBounds[4]) < MIN_DISTANCE) { + aBounds[4]-=0.001; + aBounds[5]+=0.001; + } + // make sure we haven't got bogus bounds if ( aBounds != NULL && aBounds[0] > -MAX_DISTANCE && aBounds[1] < MAX_DISTANCE && aBounds[2] > -MAX_DISTANCE && aBounds[3] < MAX_DISTANCE && - aBounds[4] > -MAX_DISTANCE && aBounds[5] < MAX_DISTANCE ) + aBounds[4] > -MAX_DISTANCE && aBounds[5] < MAX_DISTANCE) { aCount++; diff --git a/src/ViewerTools/CMakeLists.txt b/src/ViewerTools/CMakeLists.txt new file mode 100755 index 000000000..538c95358 --- /dev/null +++ b/src/ViewerTools/CMakeLists.txt @@ -0,0 +1,46 @@ +# Copyright (C) 2012 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. +# +# 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(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/UseQT4EXT.cmake) + +INCLUDE_DIRECTORIES( + ${QT_INCLUDE_DIRS} + ${CMAKE_CURRENT_SOURCE_DIR}/../Qtx +) +SET(GUI_HEADERS ViewerTools_CubeAxesDlgBase.h ViewerTools_DialogBase.h ViewerTools_FontWidgetBase.h) +QT4_WRAP_CPP(GUI_HEADERS_MOC ${GUI_HEADERS}) +SET(ViewerTools_SOURCES + ViewerTools_CubeAxesDlgBase.cxx + ViewerTools_DialogBase.cxx + ViewerTools_FontWidgetBase.cxx +) + +SET(GUITS_SOURCES + resources/ViewerTools_msg_en.ts + resources/ViewerTools_msg_fr.ts +) + +ADD_LIBRARY(ViewerTools SHARED ${ViewerTools_SOURCES} ${GUI_HEADERS_MOC}) +SET_TARGET_PROPERTIES(ViewerTools PROPERTIES COMPILE_FLAGS "${QT_DEFINITIONS} ${PLATFORM_DEFINITIONS}") +TARGET_LINK_LIBRARIES(ViewerTools qtx ${QT_MT_LIBS}) +INSTALL(TARGETS ViewerTools DESTINATION ${GUI_salomelib_LIBS}) + +FILE(GLOB COMMON_HEADERS_H "${CMAKE_CURRENT_SOURCE_DIR}/*.h") +INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${GUI_salomeinclude_HEADERS}) +QT4_INSTALL_TS_RESOURCES("${GUITS_SOURCES}" "${GUI_salomeres_DATA}") diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt new file mode 100755 index 000000000..48a7c85a7 --- /dev/null +++ b/tools/CMakeLists.txt @@ -0,0 +1,27 @@ +# Copyright (C) 2012 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. +# +# 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 +# + +SET(SUBDIRS + vtkEDFOverloads + dlgfactory +) +FOREACH(dir ${SUBDIRS}) + ADD_SUBDIRECTORY(${dir}) +ENDFOREACH(dir ${SUBDIRS}) + diff --git a/tools/vtkEDFOverloads/CMakeLists.txt b/tools/vtkEDFOverloads/CMakeLists.txt new file mode 100755 index 000000000..43a3ca9d5 --- /dev/null +++ b/tools/vtkEDFOverloads/CMakeLists.txt @@ -0,0 +1,35 @@ +# Copyright (C) 2012 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. +# +# 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_DIRECTORIES( + ${VTK_INCLUDE_DIRS} +) + +ADD_LIBRARY(vtkTools SHARED vtkEDFCutter.cxx) +SET_TARGET_PROPERTIES(vtkTools PROPERTIES COMPILE_FLAGS "${VTK_DEFINITIONS}") +TARGET_LINK_LIBRARIES(vtkTools ${VTK_LIBS}) +INSTALL(TARGETS vtkTools DESTINATION ${GUI_salomelib_LIBS}) + +ADD_LIBRARY(vtkEDFOverloads SHARED vtkEDFFactory.cxx) +SET_TARGET_PROPERTIES(vtkEDFOverloads PROPERTIES COMPILE_FLAGS "${VTK_DEFINITIONS}") +TARGET_LINK_LIBRARIES(vtkEDFOverloads ${VTK_LIBS} vtkTools) +INSTALL(TARGETS vtkEDFOverloads DESTINATION ${GUI_paraviewlib_LIBS}) + +FILE(GLOB COMMON_HEADERS_H "${CMAKE_CURRENT_SOURCE_DIR}/*.h") +INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${GUI_salomeinclude_HEADERS}) -- 2.39.2