From 6f75b0c075ffb1dc9b36df5d9b000b3b9f18ac36 Mon Sep 17 00:00:00 2001 From: vsr Date: Mon, 26 Aug 2013 11:57:15 +0000 Subject: [PATCH] CMake build procedure improvements --- CMakeLists.txt | 9 +- adm_local/cmake_files/CMakeLists.txt | 3 +- adm_local/cmake_files/FindGUI.cmake | 2 - adm_local/cmake_files/FindPyQt4.cmake | 3 +- adm_local/cmake_files/FindSalomeVTK.cmake | 6 +- .../cmake_files/SalomeGUIConfig.cmake.in | 2 - adm_local/cmake_files/UsePyQt4.cmake | 113 +++ .../cmake_files/deprecated/FindGUI.cmake | 2 - adm_local/unix/CMakeLists.txt | 4 +- adm_local/unix/config_files/CMakeLists.txt | 10 - adm_local/unix/config_files/check_GLViewer.m4 | 47 -- .../unix/config_files/check_OCCViewer.m4 | 47 -- .../unix/config_files/check_Plot2dViewer.m4 | 47 -- .../unix/config_files/check_PyConsole.m4 | 47 -- .../unix/config_files/check_QxGraphViewer.m4 | 47 -- .../unix/config_files/check_SalomeObject.m4 | 47 -- .../config_files/check_SupervGraphViewer.m4 | 47 -- .../unix/config_files/check_VTKViewer.m4 | 47 -- .../unix/config_files/check_disable_Corba.m4 | 49 -- adm_local/unix/config_files/check_msg2qm.m4 | 79 -- src/CAF/CMakeLists.txt | 78 +- src/CAM/CMakeLists.txt | 74 +- src/CASCatch/CMakeLists.txt | 30 +- src/CMakeLists.txt | 68 +- src/DDS/CMakeLists.txt | 31 +- src/Event/CMakeLists.txt | 25 +- src/GLViewer/CMakeLists.txt | 116 ++- src/GUI_PY/CMakeLists.txt | 55 +- src/GuiHelpers/CMakeLists.txt | 73 +- src/LightApp/CMakeLists.txt | 394 +++++---- src/LightApp/LightApp_Application.cxx | 32 - src/LightApp/LightApp_Application.h | 4 +- src/LightApp/LightApp_OBFilter.cxx | 51 -- src/LightApp/LightApp_OBFilter.h | 48 -- src/LightApp/resources/LightApp.xml | 10 +- src/LightApp/resources/LightApp_msg_en.ts | 8 - src/LightApp/resources/LightApp_msg_fr.ts | 8 - src/LightApp/resources/LightApp_msg_ja.ts | 8 - src/LogWindow/CMakeLists.txt | 49 +- src/OBJECT/CMakeLists.txt | 50 +- src/OCCViewer/CMakeLists.txt | 190 +++-- src/ObjBrowser/CMakeLists.txt | 56 +- src/OpenGLUtils/CMakeLists.txt | 28 +- src/Plot2d/CMakeLists.txt | 190 +++-- src/Prs/CMakeLists.txt | 2 - src/PyConsole/CMakeLists.txt | 85 +- src/PyInterp/CMakeLists.txt | 59 +- src/QDS/CMakeLists.txt | 90 ++- src/Qtx/CMakeLists.txt | 138 ++-- src/QxGraph/CMakeLists.txt | 81 -- src/QxGraph/QxGraph.h | 37 - src/QxGraph/QxGraph_ActiveItem.h | 63 -- src/QxGraph/QxGraph_Canvas.cxx | 111 --- src/QxGraph/QxGraph_Canvas.h | 59 -- src/QxGraph/QxGraph_CanvasView.cxx | 763 ------------------ src/QxGraph/QxGraph_CanvasView.h | 114 --- src/QxGraph/QxGraph_Def.h | 36 - src/QxGraph/QxGraph_Prs.cxx | 253 ------ src/QxGraph/QxGraph_Prs.h | 77 -- src/QxGraph/QxGraph_ViewManager.cxx | 60 -- src/QxGraph/QxGraph_ViewManager.h | 48 -- src/QxGraph/QxGraph_ViewModel.cxx | 161 ---- src/QxGraph/QxGraph_ViewModel.h | 86 -- src/QxGraph/QxGraph_ViewWindow.cxx | 287 ------- src/QxGraph/QxGraph_ViewWindow.h | 97 --- src/QxGraph/resources/QxGraph_images.ts | 31 - src/QxGraph/resources/QxGraph_msg_en.ts | 31 - src/QxGraph/resources/QxGraph_msg_fr.ts | 31 - src/QxGraph/resources/QxGraph_msg_ja.ts | 31 - src/QxGraph/resources/qx_view_fitall.png | Bin 816 -> 0 bytes src/QxGraph/resources/qx_view_fitarea.png | Bin 912 -> 0 bytes src/QxGraph/resources/qx_view_glpan.png | Bin 1086 -> 0 bytes src/QxGraph/resources/qx_view_pan.png | Bin 982 -> 0 bytes src/QxGraph/resources/qx_view_reset.png | Bin 918 -> 0 bytes src/QxGraph/resources/qx_view_zoom.png | Bin 797 -> 0 bytes src/QxScene/CMakeLists.txt | 85 +- src/ResExporter/CMakeLists.txt | 19 +- src/SALOME_PY/CMakeLists.txt | 60 +- .../SALOME_PYQT_GUI/CMakeLists.txt | 88 +- .../SALOME_PYQT_GUILight/CMakeLists.txt | 145 ++-- src/SALOME_PYQT/SalomePyQt/CMakeLists.txt | 139 ++-- src/SALOME_SWIG/CMakeLists.txt | 103 ++- src/SALOME_SWIG/supervisionexample.py.in | 106 --- src/SALOME_SWIG/supervisiongeomexample.py.in | 124 --- src/SOCC/CMakeLists.txt | 69 +- src/SPlot2d/CMakeLists.txt | 70 +- src/STD/CMakeLists.txt | 93 ++- src/SUIT/CMakeLists.txt | 111 ++- src/SUIT/SUIT_MessageBox.h | 1 + src/SUITApp/CMakeLists.txt | 110 +-- src/SUPERVGraph/CMakeLists.txt | 73 -- src/SUPERVGraph/SUPERVGraph.cxx | 50 -- src/SUPERVGraph/SUPERVGraph.h | 59 -- src/SUPERVGraph/SUPERVGraph_ViewFrame.cxx | 361 --------- src/SUPERVGraph/SUPERVGraph_ViewFrame.h | 138 ---- src/SUPERVGraph/SUPERVGraph_ViewManager.cxx | 65 -- src/SUPERVGraph/SUPERVGraph_ViewManager.h | 51 -- src/SUPERVGraph/SUPERVGraph_ViewModel.cxx | 51 -- src/SUPERVGraph/SUPERVGraph_ViewModel.h | 45 -- .../resources/SUPERVGraph_images.ts | 15 - .../resources/SUPERVGraph_msg_en.ts | 27 - .../resources/SUPERVGraph_msg_fr.ts | 27 - .../resources/SUPERVGraph_msg_ja.ts | 27 - src/SUPERVGraph/resources/superv_view_pan.png | Bin 982 -> 0 bytes .../resources/superv_view_reset.png | Bin 918 -> 0 bytes src/SVTK/CMakeLists.txt | 246 +++--- src/SVTK/SVTK.cxx | 57 -- src/SalomeApp/CMakeLists.txt | 232 +++--- src/SalomeApp/Test/CMakeLists.txt | 16 +- src/SalomeApp/Test/SalomeAppTest.cxx | 56 -- src/SalomeApp/Test/SalomeAppTest.hxx | 51 -- src/SalomeApp/Test/TestSalomeApp.cxx | 43 +- src/SalomeApp/pluginsdemo/CMakeLists.txt | 18 +- src/Session/CMakeLists.txt | 104 ++- src/Style/CMakeLists.txt | 86 +- src/TOOLSGUI/CMakeLists.txt | 74 +- src/TreeData/CMakeLists.txt | 100 ++- src/TreeData/Test/CMakeLists.txt | 57 +- src/VTKViewer/CMakeLists.txt | 199 +++-- src/VTKViewer/VTKViewer.cxx | 51 -- src/ViewerTools/CMakeLists.txt | 62 +- 121 files changed, 2670 insertions(+), 6259 deletions(-) create mode 100644 adm_local/cmake_files/UsePyQt4.cmake delete mode 100644 adm_local/unix/config_files/check_GLViewer.m4 delete mode 100644 adm_local/unix/config_files/check_OCCViewer.m4 delete mode 100644 adm_local/unix/config_files/check_Plot2dViewer.m4 delete mode 100644 adm_local/unix/config_files/check_PyConsole.m4 delete mode 100644 adm_local/unix/config_files/check_QxGraphViewer.m4 delete mode 100644 adm_local/unix/config_files/check_SalomeObject.m4 delete mode 100644 adm_local/unix/config_files/check_SupervGraphViewer.m4 delete mode 100644 adm_local/unix/config_files/check_VTKViewer.m4 delete mode 100644 adm_local/unix/config_files/check_disable_Corba.m4 delete mode 100755 adm_local/unix/config_files/check_msg2qm.m4 delete mode 100644 src/LightApp/LightApp_OBFilter.cxx delete mode 100644 src/LightApp/LightApp_OBFilter.h delete mode 100755 src/QxGraph/CMakeLists.txt delete mode 100644 src/QxGraph/QxGraph.h delete mode 100644 src/QxGraph/QxGraph_ActiveItem.h delete mode 100644 src/QxGraph/QxGraph_Canvas.cxx delete mode 100644 src/QxGraph/QxGraph_Canvas.h delete mode 100644 src/QxGraph/QxGraph_CanvasView.cxx delete mode 100644 src/QxGraph/QxGraph_CanvasView.h delete mode 100644 src/QxGraph/QxGraph_Def.h delete mode 100644 src/QxGraph/QxGraph_Prs.cxx delete mode 100644 src/QxGraph/QxGraph_Prs.h delete mode 100644 src/QxGraph/QxGraph_ViewManager.cxx delete mode 100644 src/QxGraph/QxGraph_ViewManager.h delete mode 100644 src/QxGraph/QxGraph_ViewModel.cxx delete mode 100644 src/QxGraph/QxGraph_ViewModel.h delete mode 100644 src/QxGraph/QxGraph_ViewWindow.cxx delete mode 100644 src/QxGraph/QxGraph_ViewWindow.h delete mode 100644 src/QxGraph/resources/QxGraph_images.ts delete mode 100644 src/QxGraph/resources/QxGraph_msg_en.ts delete mode 100755 src/QxGraph/resources/QxGraph_msg_fr.ts delete mode 100644 src/QxGraph/resources/QxGraph_msg_ja.ts delete mode 100755 src/QxGraph/resources/qx_view_fitall.png delete mode 100755 src/QxGraph/resources/qx_view_fitarea.png delete mode 100644 src/QxGraph/resources/qx_view_glpan.png delete mode 100755 src/QxGraph/resources/qx_view_pan.png delete mode 100755 src/QxGraph/resources/qx_view_reset.png delete mode 100755 src/QxGraph/resources/qx_view_zoom.png delete mode 100755 src/SALOME_SWIG/supervisionexample.py.in delete mode 100755 src/SALOME_SWIG/supervisiongeomexample.py.in delete mode 100755 src/SUPERVGraph/CMakeLists.txt delete mode 100755 src/SUPERVGraph/SUPERVGraph.cxx delete mode 100755 src/SUPERVGraph/SUPERVGraph.h delete mode 100755 src/SUPERVGraph/SUPERVGraph_ViewFrame.cxx delete mode 100755 src/SUPERVGraph/SUPERVGraph_ViewFrame.h delete mode 100644 src/SUPERVGraph/SUPERVGraph_ViewManager.cxx delete mode 100644 src/SUPERVGraph/SUPERVGraph_ViewManager.h delete mode 100644 src/SUPERVGraph/SUPERVGraph_ViewModel.cxx delete mode 100644 src/SUPERVGraph/SUPERVGraph_ViewModel.h delete mode 100644 src/SUPERVGraph/resources/SUPERVGraph_images.ts delete mode 100644 src/SUPERVGraph/resources/SUPERVGraph_msg_en.ts delete mode 100755 src/SUPERVGraph/resources/SUPERVGraph_msg_fr.ts delete mode 100644 src/SUPERVGraph/resources/SUPERVGraph_msg_ja.ts delete mode 100644 src/SUPERVGraph/resources/superv_view_pan.png delete mode 100644 src/SUPERVGraph/resources/superv_view_reset.png delete mode 100644 src/SVTK/SVTK.cxx delete mode 100644 src/SalomeApp/Test/SalomeAppTest.cxx delete mode 100644 src/SalomeApp/Test/SalomeAppTest.hxx delete mode 100644 src/VTKViewer/VTKViewer.cxx diff --git a/CMakeLists.txt b/CMakeLists.txt index 39935faaa..00bd3df4b 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -69,12 +69,11 @@ OPTION(SALOME_USE_OCCVIEWER "Enable OCC visualization (Mandatory in classic conf OPTION(SALOME_USE_GLVIEWER "Enable OpenGL visualization (Mandatory in classic configurations)" ON) OPTION(SALOME_USE_PLOT2DVIEWER "Enable Plot2D visualization (Mandatory in classic configurations)" ON) OPTION(SALOME_USE_PYCONSOLE "Enable Python GUI interface (Mandatory in classic configurations)" ON) -OPTION(SALOME_USE_SUPERVGRAPHVIEWER "Enable Supervision visualization (Mandatory in classic configurations)" ON) OPTION(SALOME_USE_QXGRAPHVIEWER "Enable QX graph visualization (Mandatory in classic configurations)" ON) MARK_AS_ADVANCED(SALOME_LIGHT_ONLY SALOME_USE_LIBBATCH SALOME_USE_VTKVIEWER SALOME_USE_VTKVIEWER) MARK_AS_ADVANCED(SALOME_USE_SALOMEOBJECT SALOME_USE_OCCVIEWER SALOME_USE_GLVIEWER SALOME_USE_PLOT2DVIEWER) -MARK_AS_ADVANCED(SALOME_USE_PYCONSOLE SALOME_USE_SUPERVGRAPHVIEWER SALOME_USE_QXGRAPHVIEWER) +MARK_AS_ADVANCED(SALOME_USE_PYCONSOLE SALOME_USE_QXGRAPHVIEWER) # Prerequisites # ============= @@ -221,14 +220,10 @@ SET(_${PROJECT_NAME}_exposed_targets OCCViewer OpenGLUtils Plot2d PyConsole PyInterp QDS qtx QxScene SalomeApp SalomeIDLGUI SalomeObject SalomePrs SalomePyQtGUILight SalomePyQtGUI SalomePyQt SalomePy SalomeSession SalomeStyle SOCC SPlot2d std SUITApp suit - SUPERVGraph SVTK ToolsGUI ViewerTools VTKViewer vtkTools vtkEDFOverloads SalomeGuiHelpers + SVTK ToolsGUI ViewerTools VTKViewer vtkTools vtkEDFOverloads SalomeGuiHelpers SalomeTreeData ) -IF(SALOME_BUILD_TESTS) - LIST(APPEND _${PROJECT_NAME}_exposed_targets SalomeAppTest) -ENDIF() - # Add all targets to the build-tree export set EXPORT(TARGETS ${_${PROJECT_NAME}_exposed_targets} FILE ${PROJECT_BINARY_DIR}/${PROJECT_NAME}Targets.cmake) diff --git a/adm_local/cmake_files/CMakeLists.txt b/adm_local/cmake_files/CMakeLists.txt index 512846054..ca4003e95 100755 --- a/adm_local/cmake_files/CMakeLists.txt +++ b/adm_local/cmake_files/CMakeLists.txt @@ -26,7 +26,6 @@ ADD_SUBDIRECTORY(deprecated) # These files are data, module or lib files SET(_adm_data FindCAS.cmake - UseQt4Ext.cmake FindQwt.cmake FindGUI.cmake FindSIP.cmake @@ -39,5 +38,7 @@ SET(_adm_data FindSalomeVTK.cmake FindSalomeGUI.cmake FindSalomeOpenGL.cmake + UsePyQt4.cmake + UseQt4Ext.cmake ) INSTALL(FILES ${_adm_data} DESTINATION ${SALOME_INSTALL_CMAKE_LOCAL}) diff --git a/adm_local/cmake_files/FindGUI.cmake b/adm_local/cmake_files/FindGUI.cmake index e7f3117a3..66b579550 100644 --- a/adm_local/cmake_files/FindGUI.cmake +++ b/adm_local/cmake_files/FindGUI.cmake @@ -41,7 +41,6 @@ FIND_LIBRARY(QDS QDS ${GUI_ROOT_DIR}/lib/salome) FIND_LIBRARY(qtx qtx ${GUI_ROOT_DIR}/lib/salome) FIND_LIBRARY(QxScene QxScene ${GUI_ROOT_DIR}/lib/salome) FIND_LIBRARY(SalomeApp SalomeApp ${GUI_ROOT_DIR}/lib/salome) -FIND_LIBRARY(SalomeAppTest SalomeAppTest ${GUI_ROOT_DIR}/lib/salome) FIND_LIBRARY(SalomeIDLGUI SalomeIDLGUI ${GUI_ROOT_DIR}/lib/salome) FIND_LIBRARY(SalomeObject SalomeObject ${GUI_ROOT_DIR}/lib/salome) FIND_LIBRARY(SalomePrs SalomePrs ${GUI_ROOT_DIR}/lib/salome) @@ -56,7 +55,6 @@ FIND_LIBRARY(SPlot2d SPlot2d ${GUI_ROOT_DIR}/lib/salome) FIND_LIBRARY(std std ${GUI_ROOT_DIR}/lib/salome) FIND_LIBRARY(SUITApp SUITApp ${GUI_ROOT_DIR}/lib/salome) FIND_LIBRARY(suit suit ${GUI_ROOT_DIR}/lib/salome) -FIND_LIBRARY(SUPERVGraph SUPERVGraph ${GUI_ROOT_DIR}/lib/salome) FIND_LIBRARY(SVTK SVTK ${GUI_ROOT_DIR}/lib/salome) FIND_LIBRARY(ToolsGUI ToolsGUI ${GUI_ROOT_DIR}/lib/salome) FIND_LIBRARY(ViewerTools ViewerTools ${GUI_ROOT_DIR}/lib/salome) diff --git a/adm_local/cmake_files/FindPyQt4.cmake b/adm_local/cmake_files/FindPyQt4.cmake index 8ddfd220f..5de941421 100644 --- a/adm_local/cmake_files/FindPyQt4.cmake +++ b/adm_local/cmake_files/FindPyQt4.cmake @@ -86,7 +86,8 @@ SET(PYQT_INCLUDE_DIRS "${PYQT_SIPS_DIR}/QtTest" ) -SET(PYQT_SIPFLAGS ${PYQT_SIPFLAGS} -s .cc -c .) +SET(PYQT_CXX_EXT ".cc") +SET(PYQT_SIPFLAGS ${PYQT_SIPFLAGS} -s ${PYQT_CXX_EXT} -c .) FOREACH(_dir ${PYQT_INCLUDE_DIRS}) LIST(APPEND PYQT_SIPFLAGS -I ${_dir}) ENDFOREACH() diff --git a/adm_local/cmake_files/FindSalomeVTK.cmake b/adm_local/cmake_files/FindSalomeVTK.cmake index 5bcf9ab13..d634726fc 100644 --- a/adm_local/cmake_files/FindSalomeVTK.cmake +++ b/adm_local/cmake_files/FindSalomeVTK.cmake @@ -31,8 +31,10 @@ SET(SalomeVTK_FIND_COMPONENTS vtkRenderingFreeTypeOpenGL vtkRenderingLOD vtkRenderingAnnotation - vtkFiltersParallel - vtkIOExport) + vtkFiltersParallel + vtkIOExport + vtkWrappingPython +) # If no VTK root dir is specified, try the ParaView root dir: SET(PARAVIEW_ROOT_DIR "$ENV{PARAVIEW_ROOT_DIR}" CACHE PATH "Path to the ParaView installation") diff --git a/adm_local/cmake_files/SalomeGUIConfig.cmake.in b/adm_local/cmake_files/SalomeGUIConfig.cmake.in index 275b2dc44..fc180ee26 100644 --- a/adm_local/cmake_files/SalomeGUIConfig.cmake.in +++ b/adm_local/cmake_files/SalomeGUIConfig.cmake.in @@ -139,7 +139,6 @@ SET(GUI_QDS QDS) SET(GUI_qtx qtx) SET(GUI_QxScene QxScene) SET(GUI_SalomeApp SalomeApp) -SET(GUI_SalomeAppTest SalomeAppTest) SET(GUI_SalomeIDLGUI SalomeIDLGUI) SET(GUI_SalomeObject SalomeObject) SET(GUI_SalomePrs SalomePrs) @@ -154,7 +153,6 @@ SET(GUI_SPlot2d SPlot2d) SET(GUI_std std) SET(GUI_SUITApp SUITApp) SET(GUI_suit suit) -SET(GUI_SUPERVGraph SUPERVGraph) SET(GUI_SVTK SVTK) SET(GUI_ToolsGUI ToolsGUI) SET(GUI_ViewerTools ViewerTools) diff --git a/adm_local/cmake_files/UsePyQt4.cmake b/adm_local/cmake_files/UsePyQt4.cmake new file mode 100644 index 000000000..a5c33abfc --- /dev/null +++ b/adm_local/cmake_files/UsePyQt4.cmake @@ -0,0 +1,113 @@ +# Copyright (C) 2012-2013 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 +# +# Author: Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com) + +#################################################################### +# +# PYQT4_WRAP_UIC macro +# +# Create Python modules by processing input *.ui (Qt designer) files with +# PyQt4 pyuic4 tool. +# +# USAGE: PYQT4_WRAP_UIC(output_files pyuic_files) +# +# ARGUMENTS: +# output_files [out] variable where output file names are listed to +# pyuic_files [in] list of *.ui files +# +# NOTES: +# - Input files are considered relative to the current source directory. +# - Output files are generated in the current build directory. +# - Macro automatically adds custom build target to generate output files +# +#################################################################### +MACRO(PYQT4_WRAP_UIC outfiles) + FOREACH(_input ${ARGN}) + GET_FILENAME_COMPONENT(_input_name ${_input} NAME) + STRING(REPLACE ".ui" "_ui.py" _input_name ${_input_name}) + SET(_output ${CMAKE_CURRENT_BINARY_DIR}/${_input_name}) + ADD_CUSTOM_COMMAND( + OUTPUT ${_output} + COMMAND ${PYQT_PYUIC_EXECUTABLE} -o ${_output} ${CMAKE_CURRENT_SOURCE_DIR}/${_input} + MAIN_DEPENDENCY ${_input} + ) + SET(${outfiles} ${${outfiles}} ${_output}) + ENDFOREACH() + ADD_CUSTOM_TARGET(BUILD_UI_PY_FILES ALL DEPENDS ${${outfiles}}) +ENDMACRO(PYQT4_WRAP_UIC) + +#################################################################### +# +# PYQT4_WRAP_SIP macro +# +# Generate C++ wrappings for *.sip files by processing them with sip. +# +# USAGE: PYQT4_WRAP_SIP(output_files sip_files) +# +# ARGUMENTS: +# output_files [out] variable where output file names are listed to +# sip_files [in] list of *.sip files +# +# NOTES: +# - Input files are considered relative to the current source directory. +# - Output files are generated in the current build directory. +# - This version of macro requires class(es) definition in the +# *.sip file to be started on a new line without any preceeding characters. +# +# TODO: +# - Check if dependency of static sources on generated headers works properly: +# if header is changed, dependant sources should be recompiled. +# +#################################################################### +MACRO(PYQT4_WRAP_SIP outfiles) + FOREACH(_input ${ARGN}) + FILE(STRINGS ${_input} _sip_modules REGEX "%Module") + FILE(STRINGS ${_input} _sip_classes REGEX "^class ") + SET(_output) + FOREACH(_sip_module ${_sip_modules}) + STRING(REGEX MATCH ".*%Module *\\( *name=.*\\).*" _mod_name "${_sip_module}") + IF (_mod_name) + STRING(REGEX REPLACE ".*%Module *\\( *name=(.*).*\\).*" "\\1" _mod_name ${_sip_module}) + ELSE() + STRING(REGEX REPLACE ".*%Module *(.*)" "\\1" _mod_name ${_sip_module}) + ENDIF() + SET(_mod_header "sipAPI${_mod_name}.h") + SET(_mod_source "sip${_mod_name}cmodule${PYQT_CXX_EXT}") + LIST(APPEND _output ${CMAKE_CURRENT_BINARY_DIR}/${_mod_source}) + SET(${outfiles} ${${outfiles}} ${CMAKE_CURRENT_BINARY_DIR}/${_mod_source}) + ENDFOREACH() + FOREACH(_sip_class ${_sip_classes}) + STRING(REGEX MATCH ".*class +.* *:" _class_name "${_sip_class}") + IF (_class_name) + STRING(REGEX REPLACE ".*class +(.*) *:.*" "\\1" _class_name ${_sip_class}) + ELSE() + STRING(REGEX REPLACE ".*class *(.*)" "\\1" _class_name ${_sip_class}) + ENDIF() + STRING(STRIP ${_class_name} _class_name) + SET(_class_source "sip${_mod_name}${_class_name}${PYQT_CXX_EXT}") + LIST(APPEND _output ${CMAKE_CURRENT_BINARY_DIR}/${_class_source}) + SET(${outfiles} ${${outfiles}} ${CMAKE_CURRENT_BINARY_DIR}/${_class_source}) + ENDFOREACH() + ADD_CUSTOM_COMMAND( + OUTPUT ${_output} + COMMAND ${SIP_EXECUTABLE} ${PYQT_SIPFLAGS} ${CMAKE_CURRENT_SOURCE_DIR}/${_input} + MAIN_DEPENDENCY ${_input} + ) + ENDFOREACH() +ENDMACRO(PYQT4_WRAP_SIP) diff --git a/adm_local/cmake_files/deprecated/FindGUI.cmake b/adm_local/cmake_files/deprecated/FindGUI.cmake index 4136dcd53..731923b10 100644 --- a/adm_local/cmake_files/deprecated/FindGUI.cmake +++ b/adm_local/cmake_files/deprecated/FindGUI.cmake @@ -37,7 +37,6 @@ FIND_LIBRARY(QDS QDS ${GUI_ROOT_DIR}/lib/salome) FIND_LIBRARY(qtx qtx ${GUI_ROOT_DIR}/lib/salome) FIND_LIBRARY(QxScene QxScene ${GUI_ROOT_DIR}/lib/salome) FIND_LIBRARY(SalomeApp SalomeApp ${GUI_ROOT_DIR}/lib/salome) -FIND_LIBRARY(SalomeAppTest SalomeAppTest ${GUI_ROOT_DIR}/lib/salome) FIND_LIBRARY(SalomeIDLGUI SalomeIDLGUI ${GUI_ROOT_DIR}/lib/salome) FIND_LIBRARY(SalomeObject SalomeObject ${GUI_ROOT_DIR}/lib/salome) FIND_LIBRARY(SalomePrs SalomePrs ${GUI_ROOT_DIR}/lib/salome) @@ -52,7 +51,6 @@ FIND_LIBRARY(SPlot2d SPlot2d ${GUI_ROOT_DIR}/lib/salome) FIND_LIBRARY(std std ${GUI_ROOT_DIR}/lib/salome) FIND_LIBRARY(SUITApp SUITApp ${GUI_ROOT_DIR}/lib/salome) FIND_LIBRARY(suit suit ${GUI_ROOT_DIR}/lib/salome) -FIND_LIBRARY(SUPERVGraph SUPERVGraph ${GUI_ROOT_DIR}/lib/salome) FIND_LIBRARY(SVTK SVTK ${GUI_ROOT_DIR}/lib/salome) FIND_LIBRARY(ToolsGUI ToolsGUI ${GUI_ROOT_DIR}/lib/salome) FIND_LIBRARY(ViewerTools ViewerTools ${GUI_ROOT_DIR}/lib/salome) diff --git a/adm_local/unix/CMakeLists.txt b/adm_local/unix/CMakeLists.txt index e6a2aa459..2f895ae4b 100755 --- a/adm_local/unix/CMakeLists.txt +++ b/adm_local/unix/CMakeLists.txt @@ -16,5 +16,5 @@ # # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # - -ADD_SUBDIRECTORY(config_files) + +ADD_SUBDIRECTORY(config_files) diff --git a/adm_local/unix/config_files/CMakeLists.txt b/adm_local/unix/config_files/CMakeLists.txt index 90b01675a..c1387a1dd 100755 --- a/adm_local/unix/config_files/CMakeLists.txt +++ b/adm_local/unix/config_files/CMakeLists.txt @@ -21,22 +21,12 @@ # SET(_m4_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 ) diff --git a/adm_local/unix/config_files/check_GLViewer.m4 b/adm_local/unix/config_files/check_GLViewer.m4 deleted file mode 100644 index f988897f2..000000000 --- a/adm_local/unix/config_files/check_GLViewer.m4 +++ /dev/null @@ -1,47 +0,0 @@ -dnl Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE -dnl -dnl Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -dnl -dnl This library is free software; you can redistribute it and/or -dnl modify it under the terms of the GNU Lesser General Public -dnl License as published by the Free Software Foundation; either -dnl version 2.1 of the License. -dnl -dnl This library is distributed in the hope that it will be useful, -dnl but WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -dnl Lesser General Public License for more details. -dnl -dnl You should have received a copy of the GNU Lesser General Public -dnl License along with this library; if not, write to the Free Software -dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -dnl -dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -dnl - -# -# Check configure option --disable-glViewer=[yes|no|DIR] taking into account that -# DISABLE_GLVIEWER may be already set during build_configure, -# Set DISABLE_GLVIEWER to yes|no -# -# Author : Edawrd AGAPOV (OCC, 2005) -# - -AC_DEFUN([CHECK_GLVIEWER],[ - -AC_ARG_WITH(glViewer, - [ --disable-glViewer default=no ], - disable_glViewer="$withval",disable_glViewer="${DISABLE_GLVIEWER}") - -case $disable_glViewer in - yes) -# AC_MSG_RESULT(************************************************) -# AC_MSG_RESULT(******* DISABLE GLViewer configuration *****) -# AC_MSG_RESULT(************************************************) - DISABLE_GLVIEWER="yes" - AC_SUBST(DISABLE_GLVIEWER) -esac - - -])dnl diff --git a/adm_local/unix/config_files/check_OCCViewer.m4 b/adm_local/unix/config_files/check_OCCViewer.m4 deleted file mode 100644 index 71de9ea52..000000000 --- a/adm_local/unix/config_files/check_OCCViewer.m4 +++ /dev/null @@ -1,47 +0,0 @@ -dnl Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE -dnl -dnl Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -dnl -dnl This library is free software; you can redistribute it and/or -dnl modify it under the terms of the GNU Lesser General Public -dnl License as published by the Free Software Foundation; either -dnl version 2.1 of the License. -dnl -dnl This library is distributed in the hope that it will be useful, -dnl but WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -dnl Lesser General Public License for more details. -dnl -dnl You should have received a copy of the GNU Lesser General Public -dnl License along with this library; if not, write to the Free Software -dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -dnl -dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -dnl - -# -# Check configure option --disable-occViewer=[yes|no|DIR] taking into account that -# DISABLE_OCCVIEWER may be already set during build_configure, -# Set DISABLE_OCCVIEWER to yes|no -# -# Author : Edawrd AGAPOV (OCC, 2005) -# - -AC_DEFUN([CHECK_OCCVIEWER],[ - -AC_ARG_WITH(occViewer, - [ --disable-occViewer default=no ], - disable_occViewer="$withval",disable_occViewer="${DISABLE_OCCVIEWER}") - -case $disable_occViewer in - yes) -# AC_MSG_RESULT(************************************************) -# AC_MSG_RESULT(***** DISABLE OCCViewer configuration ******) -# AC_MSG_RESULT(************************************************) - DISABLE_OCCVIEWER="yes" - AC_SUBST(DISABLE_OCCVIEWER) -esac - - -])dnl diff --git a/adm_local/unix/config_files/check_Plot2dViewer.m4 b/adm_local/unix/config_files/check_Plot2dViewer.m4 deleted file mode 100644 index b5d81c3b4..000000000 --- a/adm_local/unix/config_files/check_Plot2dViewer.m4 +++ /dev/null @@ -1,47 +0,0 @@ -dnl Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE -dnl -dnl Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -dnl -dnl This library is free software; you can redistribute it and/or -dnl modify it under the terms of the GNU Lesser General Public -dnl License as published by the Free Software Foundation; either -dnl version 2.1 of the License. -dnl -dnl This library is distributed in the hope that it will be useful, -dnl but WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -dnl Lesser General Public License for more details. -dnl -dnl You should have received a copy of the GNU Lesser General Public -dnl License along with this library; if not, write to the Free Software -dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -dnl -dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -dnl - -# -# Check configure option --disable-plot2dViewer=[yes|no|DIR] taking into account that -# DISABLE_PLOT2DVIEWER may be already set during build_configure, -# Set DISABLE_PLOT2DVIEWER to yes|no -# -# Author : Edawrd AGAPOV (OCC, 2005) -# - -AC_DEFUN([CHECK_PLOT2DVIEWER],[ - -AC_ARG_WITH(plot2dViewer, - [ --disable-plot2dViewer default=no ], - disable_plot2dViewer="$withval",disable_plot2dViewer="${DISABLE_PLOT2DVIEWER}") - -case $disable_plot2dViewer in - yes) -# AC_MSG_RESULT(************************************************) -# AC_MSG_RESULT(*** DISABLE Plot2dViewer configuration *****) -# AC_MSG_RESULT(************************************************) - DISABLE_PLOT2DVIEWER="yes" - AC_SUBST(DISABLE_PLOT2DVIEWER) -esac - - -])dnl diff --git a/adm_local/unix/config_files/check_PyConsole.m4 b/adm_local/unix/config_files/check_PyConsole.m4 deleted file mode 100644 index 2e888a0ce..000000000 --- a/adm_local/unix/config_files/check_PyConsole.m4 +++ /dev/null @@ -1,47 +0,0 @@ -dnl Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE -dnl -dnl Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -dnl -dnl This library is free software; you can redistribute it and/or -dnl modify it under the terms of the GNU Lesser General Public -dnl License as published by the Free Software Foundation; either -dnl version 2.1 of the License. -dnl -dnl This library is distributed in the hope that it will be useful, -dnl but WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -dnl Lesser General Public License for more details. -dnl -dnl You should have received a copy of the GNU Lesser General Public -dnl License along with this library; if not, write to the Free Software -dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -dnl -dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -dnl - -# -# Check configure option --disable-pyConsole=[yes|no|DIR] taking into account that -# DISABLE_PYCONSOLE may be already set during build_configure, -# Set DISABLE_PYCONSOLE to yes|no -# -# Author : Edawrd AGAPOV (OCC, 2005) -# - -AC_DEFUN([CHECK_PYCONSOLE],[ - -AC_ARG_WITH(pyConsole, - [ --disable-pyConsole default=no ], - disable_pyConsole="$withval",disable_pyConsole="${DISABLE_PYCONSOLE}") - -case $disable_pyConsole in - yes) -# AC_MSG_RESULT(************************************************) -# AC_MSG_RESULT(***** DISABLE PyConsole configuration ******) -# AC_MSG_RESULT(************************************************) - DISABLE_PYCONSOLE="yes" - AC_SUBST(DISABLE_PYCONSOLE) -esac - - -])dnl diff --git a/adm_local/unix/config_files/check_QxGraphViewer.m4 b/adm_local/unix/config_files/check_QxGraphViewer.m4 deleted file mode 100644 index 984b62810..000000000 --- a/adm_local/unix/config_files/check_QxGraphViewer.m4 +++ /dev/null @@ -1,47 +0,0 @@ -dnl Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE -dnl -dnl Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -dnl -dnl This library is free software; you can redistribute it and/or -dnl modify it under the terms of the GNU Lesser General Public -dnl License as published by the Free Software Foundation; either -dnl version 2.1 of the License. -dnl -dnl This library is distributed in the hope that it will be useful, -dnl but WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -dnl Lesser General Public License for more details. -dnl -dnl You should have received a copy of the GNU Lesser General Public -dnl License along with this library; if not, write to the Free Software -dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -dnl -dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -dnl - -# -# Check configure option --disable-qxGraphViewer=[yes|no|DIR] taking into account that -# DISABLE_QXGRAPHVIEWER may be already set during build_configure, -# Set DISABLE_QXGRAPHVIEWER to yes|no -# -# Author : Edawrd AGAPOV (OCC, 2005) -# - -AC_DEFUN([CHECK_QXGRAPHVIEWER],[ - -AC_ARG_WITH(qxGraphViewer, - [ --disable-qxGraphViewer default=no ], - disable_qxGraphViewer="$withval",disable_qxGraphViewer="${DISABLE_QXGRAPHVIEWER}") - -case $disable_qxGraphViewer in - yes) -# AC_MSG_RESULT(************************************************) -# AC_MSG_RESULT(******* DISABLE QxGraphViewer configuration ********) -# AC_MSG_RESULT(************************************************) - DISABLE_QXGRAPHVIEWER="yes" - AC_SUBST(DISABLE_QXGRAPHVIEWER) -esac - - -])dnl diff --git a/adm_local/unix/config_files/check_SalomeObject.m4 b/adm_local/unix/config_files/check_SalomeObject.m4 deleted file mode 100644 index ad039b786..000000000 --- a/adm_local/unix/config_files/check_SalomeObject.m4 +++ /dev/null @@ -1,47 +0,0 @@ -dnl Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE -dnl -dnl Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -dnl -dnl This library is free software; you can redistribute it and/or -dnl modify it under the terms of the GNU Lesser General Public -dnl License as published by the Free Software Foundation; either -dnl version 2.1 of the License. -dnl -dnl This library is distributed in the hope that it will be useful, -dnl but WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -dnl Lesser General Public License for more details. -dnl -dnl You should have received a copy of the GNU Lesser General Public -dnl License along with this library; if not, write to the Free Software -dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -dnl -dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -dnl - -# -# Check configure option --disable-salomeObject=[yes|no|DIR] taking into account that -# DISABLE_SALOMEOBJECT may be already set during build_configure, -# Set DISABLE_SALOMEOBJECT to yes|no -# -# Author : Edawrd AGAPOV (OCC, 2005) -# - -AC_DEFUN([CHECK_SALOMEOBJECT],[ - -AC_ARG_WITH(salomeObject, - [ --disable-salomeObject default=no ], - disable_salomeObject="$withval",disable_salomeObject="${DISABLE_SALOMEOBJECT}") - -case $disable_salomeObject in - yes) -# AC_MSG_RESULT(************************************************) -# AC_MSG_RESULT(*** DISABLE Salome object configuration ****) -# AC_MSG_RESULT(************************************************) - DISABLE_SALOMEOBJECT="yes" - AC_SUBST(DISABLE_SALOMEOBJECT) -esac - - -])dnl diff --git a/adm_local/unix/config_files/check_SupervGraphViewer.m4 b/adm_local/unix/config_files/check_SupervGraphViewer.m4 deleted file mode 100644 index 5343daf05..000000000 --- a/adm_local/unix/config_files/check_SupervGraphViewer.m4 +++ /dev/null @@ -1,47 +0,0 @@ -dnl Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE -dnl -dnl Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -dnl -dnl This library is free software; you can redistribute it and/or -dnl modify it under the terms of the GNU Lesser General Public -dnl License as published by the Free Software Foundation; either -dnl version 2.1 of the License. -dnl -dnl This library is distributed in the hope that it will be useful, -dnl but WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -dnl Lesser General Public License for more details. -dnl -dnl You should have received a copy of the GNU Lesser General Public -dnl License along with this library; if not, write to the Free Software -dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -dnl -dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -dnl - -# -# Check configure option --disable-supervGraphViewer=[yes|no|DIR] taking into account that -# DISABLE_SUPERVGRAPHVIEWER may be already set during build_configure, -# Set DISABLE_SUPERVGRAPHVIEWER to yes|no -# -# Author : Edawrd AGAPOV (OCC, 2005) -# - -AC_DEFUN([CHECK_SUPERVGRAPHVIEWER],[ - -AC_ARG_WITH(supervGraphViewer, - [ --disable-supervGraphViewer default=no ], - disable_supervGraphViewer="$withval",disable_supervGraphViewer="${DISABLE_SUPERVGRAPHVIEWER}") - -case $disable_supervGraphViewer in - yes) -# AC_MSG_RESULT(************************************************) -# AC_MSG_RESULT(******* DISABLE SupervGraphViewer configuration ********) -# AC_MSG_RESULT(************************************************) - DISABLE_SUPERVGRAPHVIEWER="yes" - AC_SUBST(DISABLE_SUPERVGRAPHVIEWER) -esac - - -])dnl diff --git a/adm_local/unix/config_files/check_VTKViewer.m4 b/adm_local/unix/config_files/check_VTKViewer.m4 deleted file mode 100644 index 10f518695..000000000 --- a/adm_local/unix/config_files/check_VTKViewer.m4 +++ /dev/null @@ -1,47 +0,0 @@ -dnl Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE -dnl -dnl Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -dnl -dnl This library is free software; you can redistribute it and/or -dnl modify it under the terms of the GNU Lesser General Public -dnl License as published by the Free Software Foundation; either -dnl version 2.1 of the License. -dnl -dnl This library is distributed in the hope that it will be useful, -dnl but WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -dnl Lesser General Public License for more details. -dnl -dnl You should have received a copy of the GNU Lesser General Public -dnl License along with this library; if not, write to the Free Software -dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -dnl -dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -dnl - -# -# Check configure option --disable-vtkViewer=[yes|no|DIR] taking into account that -# DISABLE_VTKVIEWER may be already set during build_configure, -# Set DISABLE_VTKVIEWER to yes|no -# -# Author : Edawrd AGAPOV (OCC, 2005) -# - -AC_DEFUN([CHECK_VTKVIEWER],[ - -AC_ARG_WITH(vtkViewer, - [ --disable-vtkViewer default=no ], - disable_vtkViewer="$withval",disable_vtkViewer="${DISABLE_VTKVIEWER}") - -case $disable_vtkViewer in - yes) -# AC_MSG_RESULT(************************************************) -# AC_MSG_RESULT(***** DISABLE VTK Viewer configuration *****) -# AC_MSG_RESULT(************************************************) - DISABLE_VTKVIEWER="yes" - AC_SUBST(DISABLE_VTKVIEWER) -esac - - -])dnl diff --git a/adm_local/unix/config_files/check_disable_Corba.m4 b/adm_local/unix/config_files/check_disable_Corba.m4 deleted file mode 100644 index aee276b4a..000000000 --- a/adm_local/unix/config_files/check_disable_Corba.m4 +++ /dev/null @@ -1,49 +0,0 @@ -dnl Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE -dnl -dnl Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -dnl -dnl This library is free software; you can redistribute it and/or -dnl modify it under the terms of the GNU Lesser General Public -dnl License as published by the Free Software Foundation; either -dnl version 2.1 of the License. -dnl -dnl This library is distributed in the hope that it will be useful, -dnl but WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -dnl Lesser General Public License for more details. -dnl -dnl You should have received a copy of the GNU Lesser General Public -dnl License along with this library; if not, write to the Free Software -dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -dnl -dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -dnl - -# -# Check configure option --disable-corba=[yes|no|DIR] taking into account that -# GUI_DISABLE_CORBA may be already set during build_configure, -# Set GUI_DISABLE_CORBA to yes|no -# -# Author : Edawrd AGAPOV (OCC, 2005) -# - -AC_DEFUN([CHECK_DISABLE_CORBA],[ - -AC_ARG_WITH(corba, - [ --disable-corba-gen default=no ], - disable_corba="$withval",disable_corba="${GUI_DISABLE_CORBA}") - -case $disable_corba in - yes) -# AC_MSG_RESULT(************************************************) -# AC_MSG_RESULT(******* DISABLE CORBA configuration ********) -# AC_MSG_RESULT(************************************************) - GUI_DISABLE_CORBA="yes";; - *) - GUI_DISABLE_CORBA="no" -esac - -AC_SUBST(GUI_DISABLE_CORBA) - -])dnl diff --git a/adm_local/unix/config_files/check_msg2qm.m4 b/adm_local/unix/config_files/check_msg2qm.m4 deleted file mode 100755 index 7fa47c371..000000000 --- a/adm_local/unix/config_files/check_msg2qm.m4 +++ /dev/null @@ -1,79 +0,0 @@ -dnl Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE -dnl -dnl Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -dnl -dnl This library is free software; you can redistribute it and/or -dnl modify it under the terms of the GNU Lesser General Public -dnl License as published by the Free Software Foundation; either -dnl version 2.1 of the License. -dnl -dnl This library is distributed in the hope that it will be useful, -dnl but WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -dnl Lesser General Public License for more details. -dnl -dnl You should have received a copy of the GNU Lesser General Public -dnl License along with this library; if not, write to the Free Software -dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -dnl -dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -dnl - -# Check availability of Qt's msg2qm tool binary distribution -# -# Author : Jerome Roy (CEA, 2003) -# - -AC_DEFUN([CHECK_MSG2QM],[ - -AC_CHECKING(for msg2qm) - -msg2qm_ok=no - -AC_ARG_WITH(msg2qm, - [ --with-msg2qm=DIR root directory path of MSG2QM installation], - MSG2QM_DIR="$withval",MSG2QM_DIR="") - -if test "x$MSG2QM_DIR" == "x" ; then - -# no --with-MSG2QM-dir option used - - if test "x$MSG2QM_ROOT" != "x" ; then - - # MSG2QM_ROOT environment variable defined - MSG2QM_DIR=$MSG2QM_ROOT - - else - - # search MSG2QM binaries in PATH variable - AC_PATH_PROG(TEMP, msg2qm) - if test "x$TEMP" != "x" ; then - MSG2QM_DIR=`dirname $TEMP` - fi - - fi -# -fi - -# look for msg2qm in ${MSG2QM_DIR} directory -if test -f ${MSG2QM_DIR}/msg2qm ; then - msg2qm_ok=yes - MSG2QM="${MSG2QM_DIR}/msg2qm" - AC_MSG_RESULT(Using MSG2QM executable in ${MSG2QM_DIR}) -else - # if not found, look for msg2qm in ${MSG2QM_DIR}/bin directory - if test -f ${MSG2QM_DIR}/bin/msg2qm ; then - msg2qm_ok=yes - MSG2QM="${MSG2QM_DIR}/bin/msg2qm" - AC_MSG_RESULT(Using MSG2QM executable in ${MSG2QM_DIR}/bin) - else - AC_MSG_WARN("Cannot find MSG2QM executable") - fi -fi - -AC_SUBST(MSG2QM) -AC_MSG_RESULT(for MSG2QM: $msg2qm_ok) - -])dnl - diff --git a/src/CAF/CMakeLists.txt b/src/CAF/CMakeLists.txt index 64b1e347b..c7e5f8653 100755 --- a/src/CAF/CMakeLists.txt +++ b/src/CAF/CMakeLists.txt @@ -19,46 +19,72 @@ INCLUDE(UseQt4Ext) +# --- options --- + +# additional include directories INCLUDE_DIRECTORIES( - ${PTHREAD_INCLUDE_DIRS} + ${QT_INCLUDES} ${CAS_INCLUDE_DIRS} ${KERNEL_INCLUDE_DIRS} - ${CMAKE_CURRENT_SOURCE_DIR} - ${CMAKE_CURRENT_SOURCE_DIR}/../Qtx - ${CMAKE_CURRENT_SOURCE_DIR}/../SUIT - ${CMAKE_CURRENT_SOURCE_DIR}/../STD + ${PROJECT_SOURCE_DIR}/src/Qtx + ${PROJECT_SOURCE_DIR}/src/SUIT + ${PROJECT_SOURCE_DIR}/src/STD ) -SET(COMMON_LIBS - qtx - suit - std - ${QT_LIBRARIES} - ${CAS_OCAF} - ${CAS_OCAFVIS} +# additional preprocessor / compiler flags +ADD_DEFINITIONS(${CAS_DEFINITIONS} ${QT_DEFINITIONS}) + +# libraries to link to +SET(_link_LIBRARIES ${QT_LIBRARIES} ${CAS_OCAF} ${CAS_OCAFVIS} qtx suit std) + +# --- headers --- + +# header files / to be processed by moc +SET(_moc_HEADERS + CAF_Application.h + CAF_Operation.h + CAF_Study.h ) -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 +# header files / no moc processing +SET(_other_HEADERS + CAF.h + CAF_Tools.h ) -SET(GUITS_SOURCES +# header files / to install +SET(caf_HEADERS ${_moc_HEADERS} ${_other_HEADERS}) + +# --- resources --- + +# resource files / to be processed by lrelease +SET(_ts_RESOURCES resources/CAF_msg_en.ts resources/CAF_msg_fr.ts resources/CAF_msg_ja.ts ) -ADD_DEFINITIONS(${CAS_DEFINITIONS} ${QT_DEFINITIONS}) +# --- sources --- + +# sources / moc wrappings +QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS}) + +# sources / static +SET(_other_SOURCES + CAF_Application.cxx + CAF_Operation.cxx + CAF_Study.cxx + CAF_Tools.cxx +) + +# sources / to compile +SET(caf_SOURCES ${_other_SOURCES} ${_moc_SOURCES}) + +# --- rules --- -ADD_LIBRARY(caf ${caf_SOURCES} ${GUI_HEADERS}) -TARGET_LINK_LIBRARIES(caf ${COMMON_LIBS}) +ADD_LIBRARY(caf ${caf_SOURCES}) +TARGET_LINK_LIBRARIES(caf ${QT_LIBRARIES} ${_link_LIBRARIES}) INSTALL(TARGETS caf EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS}) -FILE(GLOB COMMON_HEADERS_H "${CMAKE_CURRENT_SOURCE_DIR}/*.h") -INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${SALOME_INSTALL_HEADERS}) -QT4_INSTALL_TS_RESOURCES("${GUITS_SOURCES}" "${SALOME_GUI_INSTALL_RES_DATA}") +INSTALL(FILES ${caf_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS}) +QT4_INSTALL_TS_RESOURCES("${_ts_RESOURCES}" "${SALOME_GUI_INSTALL_RES_DATA}") diff --git a/src/CAM/CMakeLists.txt b/src/CAM/CMakeLists.txt index ad355f57a..00a24f948 100755 --- a/src/CAM/CMakeLists.txt +++ b/src/CAM/CMakeLists.txt @@ -19,27 +19,59 @@ INCLUDE(UseQt4Ext) +# --- options --- + +# additional include directories INCLUDE_DIRECTORIES( ${QT_INCLUDES} ${KERNEL_INCLUDE_DIRS} - ${CMAKE_CURRENT_SOURCE_DIR} ${PROJECT_BINARY_DIR} - ${CMAKE_CURRENT_SOURCE_DIR}/../Qtx - ${CMAKE_CURRENT_SOURCE_DIR}/../SUIT - ${CMAKE_CURRENT_SOURCE_DIR}/../STD + ${PROJECT_SOURCE_DIR}/src/Qtx + ${PROJECT_SOURCE_DIR}/src/SUIT + ${PROJECT_SOURCE_DIR}/src/STD +) + +# additional preprocessor / compiler flags +ADD_DEFINITIONS(${QT_DEFINITIONS}) + +# libraries to link to +SET(_link_LIBRARIES ${QT_LIBRARIES} qtx suit std) + +# --- headers --- + +# header files / to be processed by moc +SET(_moc_HEADERS + CAM_Application.h + CAM_DataModel.h + CAM_Module.h + CAM_Study.h ) -SET(COMMON_LIBS - qtx - suit - std - ${QT_LIBRARIES} +# header files / no moc processing +SET(_other_HEADERS + CAM.h + CAM_DataObject.h +) + +# header files / to install +SET(CAM_HEADERS ${_moc_HEADERS} ${_other_HEADERS}) + +# --- resources --- + +# resource files / to be processed by lrelease +SET(_ts_RESOURCES + resources/CAM_msg_en.ts + resources/CAM_msg_fr.ts + resources/CAM_msg_ja.ts ) -SET(CAM_HEADERS CAM_Application.h CAM_Module.h CAM_Study.h CAM_DataModel.h) -QT4_WRAP_CPP(CAM_HEADERS_MOC ${CAM_HEADERS}) +# --- sources --- + +# sources / moc wrappings +QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS}) -SET(CAM_SOURCES +# sources / static +SET(_other_SOURCES CAM_Application.cxx CAM_DataModel.cxx CAM_DataObject.cxx @@ -47,18 +79,14 @@ SET(CAM_SOURCES CAM_Study.cxx ) -SET(CAMTS_SOURCES - resources/CAM_msg_en.ts - resources/CAM_msg_fr.ts - resources/CAM_msg_ja.ts -) +# sources / to compile +SET(CAM_SOURCES ${_other_SOURCES} ${_moc_SOURCES}) -ADD_DEFINITIONS(${QT_DEFINITIONS}) +# --- rules --- -ADD_LIBRARY(CAM ${CAM_SOURCES} ${CAM_HEADERS_MOC}) -TARGET_LINK_LIBRARIES(CAM ${COMMON_LIBS}) +ADD_LIBRARY(CAM ${CAM_SOURCES}) +TARGET_LINK_LIBRARIES(CAM ${_link_LIBRARIES}) INSTALL(TARGETS CAM EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS}) -FILE(GLOB COMMON_HEADERS_H "${CMAKE_CURRENT_SOURCE_DIR}/*.h") -INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${SALOME_INSTALL_HEADERS}) -QT4_INSTALL_TS_RESOURCES("${CAMTS_SOURCES}" "${SALOME_GUI_INSTALL_RES_DATA}") +INSTALL(FILES ${CAM_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS}) +QT4_INSTALL_TS_RESOURCES("${_ts_RESOURCES}" "${SALOME_GUI_INSTALL_RES_DATA}") diff --git a/src/CASCatch/CMakeLists.txt b/src/CASCatch/CMakeLists.txt index 1c6f1cf61..cb84737ff 100755 --- a/src/CASCatch/CMakeLists.txt +++ b/src/CASCatch/CMakeLists.txt @@ -17,23 +17,43 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # +# --- options --- + +# additional include directories INCLUDE_DIRECTORIES( - ${PTHREAD_INCLUDE_DIRS} ${CAS_INCLUDE_DIRS} ) +# additional preprocessor / compiler flags +ADD_DEFINITIONS(${CAS_DEFINITIONS}) + +# libraries to link to +SET(_link_LIBRARIES ${CAS_KERNEL}) + +# --- headers --- + +# header files / to install +SET(CASCatch_HEADERS + CASCatch.hxx + CASCatch_CatchSignals.hxx + CASCatch_ErrorHandler.hxx + CASCatch_Failure.hxx +) + +# --- sources --- + +# sources / static SET(CASCatch_SOURCES CASCatch_CatchSignals.cxx CASCatch_ErrorHandler.cxx CASCatch_Failure.cxx ) -ADD_DEFINITIONS(${CAS_DEFINITIONS}) +# --- rules --- ADD_LIBRARY(CASCatch ${CASCatch_SOURCES}) -TARGET_LINK_LIBRARIES(CASCatch ${CAS_KERNEL}) +TARGET_LINK_LIBRARIES(CASCatch ${_link_LIBRARIES}) INSTALL(TARGETS CASCatch EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS}) -FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx") -INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${SALOME_INSTALL_HEADERS}) +INSTALL(FILES ${CASCatch_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS}) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index af0221b96..fa419361c 100755 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -21,22 +21,8 @@ # Common packages ## SET(SUBDIRS_COMMON - CASCatch - Qtx - Style - DDS - QDS - ObjBrowser - SUIT - SUITApp - STD - CAF - CAM - LogWindow - Prs - Event - OpenGLUtils - GUI_PY + CASCatch Qtx Style DDS QDS ObjBrowser SUIT SUITApp STD CAF + CAM LogWindow Prs Event OpenGLUtils ViewerTools GUI_PY ) ## @@ -60,8 +46,7 @@ IF(SALOME_USE_VTKVIEWER) SET(SUBDIRS_VTKVIEWER VTKViewer) IF(SALOME_USE_SALOMEOBJECT) - SET(SUBDIRS_VTKVIEWER ${SUBDIRS_VTKVIEWER} SVTK) - SET(SUBDIRS_VIEWERTOOLSViewerTools) + LIST(APPEND SUBDIRS_VTKVIEWER SVTK) ENDIF(SALOME_USE_SALOMEOBJECT) ENDIF(SALOME_USE_VTKVIEWER) @@ -70,10 +55,9 @@ ENDIF(SALOME_USE_VTKVIEWER) ## IF(SALOME_USE_OCCVIEWER) SET(SUBDIRS_OCCVIEWER OCCViewer) - SET(SUBDIRS_VIEWERTOOLS ViewerTools) IF(SALOME_USE_SALOMEOBJECT) - SET(SUBDIRS_OCCVIEWER ${SUBDIRS_OCCVIEWER} SOCC) + LIST(APPEND SUBDIRS_OCCVIEWER SOCC) ENDIF(SALOME_USE_SALOMEOBJECT) ENDIF(SALOME_USE_OCCVIEWER) @@ -81,82 +65,52 @@ ENDIF(SALOME_USE_OCCVIEWER) # Plot2d viewer ## IF(SALOME_USE_PLOT2DVIEWER) - SET(SUBDIRS_PLOT2DVIEWER Plot2d) + SET(SUBDIRS_PLOT2DVIEWER Plot2d) IF(SALOME_USE_SALOMEOBJECT) - SET(SUBDIRS_PLOT2DVIEWER ${SUBDIRS_PLOT2DVIEWER} SPlot2d) + LIST(APPEND SUBDIRS_PLOT2DVIEWER SPlot2d) ENDIF(SALOME_USE_SALOMEOBJECT) ENDIF(SALOME_USE_PLOT2DVIEWER) -## -# SUPERV graph viewer -## -IF(SALOME_USE_SUPERVGRAPHVIEWER) - SET(SUBDIRS_SUPERVGRAPHVIEWER SUPERVGraph) -ENDIF(SALOME_USE_SUPERVGRAPHVIEWER) - ## # Qx scene viewer ## -###VSR: QxGraph has been replaced by QxScene -###SUBDIRS_QXGRAPHVIEWER = QxGraph IF(SALOME_USE_QXGRAPHVIEWER) SET(SUBDIRS_QXGRAPHVIEWER QxScene) ENDIF(SALOME_USE_QXGRAPHVIEWER) ## -# Python console (base) +# Python-based packages ## IF(SALOME_USE_PYCONSOLE) SET(SUBDIRS_PYCONSOLE PyInterp PyConsole) + SET(SUBDIRS_PYTHON SALOME_SWIG SALOME_PY SALOME_PYQT) ENDIF(SALOME_USE_PYCONSOLE) ## # Light SALOME packages ## -SET(SUBDIRS_LIGHT - LightApp - ResExporter -) +SET(SUBDIRS_LIGHT LightApp ResExporter) ## # Full (CORBA) SALOME packages ## IF(NOT SALOME_LIGHT_ONLY) - SET(SUBDIRS_CORBA - TOOLSGUI - Session - SalomeApp - GuiHelpers - TreeData - ) + SET(SUBDIRS_CORBA TOOLSGUI Session SalomeApp GuiHelpers TreeData) ENDIF(NOT SALOME_LIGHT_ONLY) -## -# Extra Python packages -## -IF(SALOME_USE_PYCONSOLE) - SET(SUBDIRS_PY_LIGHT - SALOME_SWIG - SALOME_PY - SALOME_PYQT - ) -ENDIF(SALOME_USE_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} + ${SUBDIRS_PYTHON} ) FOREACH(dir ${SUBDIRS}) diff --git a/src/DDS/CMakeLists.txt b/src/DDS/CMakeLists.txt index bbbb6b191..735d69db9 100755 --- a/src/DDS/CMakeLists.txt +++ b/src/DDS/CMakeLists.txt @@ -20,12 +20,34 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # +# --- options --- + +# additional include directories INCLUDE_DIRECTORIES( - ${PTHREAD_INCLUDE_DIRS} ${CAS_INCLUDE_DIRS} ${KERNEL_INCLUDE_DIRS} ) +# additional preprocessor / compiler flags +ADD_DEFINITIONS(${CAS_DEFINITIONS}) + +# libraries to link to +SET(_link_LIBRARIES ${CAS_KERNEL} ${CAS_OCAF}) + +# --- headers --- + +# header files / to install +SET(DDS_HEADERS + DDS.h + DDS_DicGroup.h + DDS_DicItem.h + DDS_Dictionary.h + DDS_KeyWords.h +) + +# --- sources --- + +# sources / static SET(DDS_SOURCES DDS_DicGroup.cxx DDS_DicItem.cxx @@ -33,12 +55,11 @@ SET(DDS_SOURCES DDS_KeyWords.cxx ) -ADD_DEFINITIONS(${CAS_DEFINITIONS}) +# --- rules --- ADD_LIBRARY(DDS ${DDS_SOURCES}) -TARGET_LINK_LIBRARIES(DDS ${CAS_KERNEL} ${CAS_OCAF}) +TARGET_LINK_LIBRARIES(DDS ${_link_LIBRARIES}) INSTALL(TARGETS DDS EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS}) -FILE(GLOB COMMON_HEADERS_H "${CMAKE_CURRENT_SOURCE_DIR}/*.h") -INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${SALOME_INSTALL_HEADERS}) +INSTALL(FILES ${DDS_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS}) diff --git a/src/Event/CMakeLists.txt b/src/Event/CMakeLists.txt index ee1974dc3..0fef68e5c 100755 --- a/src/Event/CMakeLists.txt +++ b/src/Event/CMakeLists.txt @@ -17,17 +17,26 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -SET(Event_SOURCES - ${QT_INCLUDES} - SALOME_Event.cxx - SALOME_EventFilter.cxx -) +# --- options --- +# additional preprocessor / compiler flags ADD_DEFINITIONS(${QT_DEFINITIONS}) +# libraries to link to +SET(_link_LIBRARIES ${QT_LIBRARIES}) + +# --- headers --- + +SET(Event_HEADERS Event.h SALOME_Event.h SALOME_EventFilter.h) + +# --- sources --- + +SET(Event_SOURCES SALOME_Event.cxx SALOME_EventFilter.cxx) + +# --- rules --- + ADD_LIBRARY(Event ${Event_SOURCES}) -TARGET_LINK_LIBRARIES(Event ${QT_LIBRARIES}) +TARGET_LINK_LIBRARIES(Event ${_link_LIBRARIES}) INSTALL(TARGETS Event EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS}) -FILE(GLOB COMMON_HEADERS_H "${CMAKE_CURRENT_SOURCE_DIR}/*.h") -INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${SALOME_INSTALL_HEADERS}) +INSTALL(FILES ${Event_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS}) diff --git a/src/GLViewer/CMakeLists.txt b/src/GLViewer/CMakeLists.txt index 1db8b99bd..20d212068 100755 --- a/src/GLViewer/CMakeLists.txt +++ b/src/GLViewer/CMakeLists.txt @@ -19,25 +19,95 @@ INCLUDE(UseQt4Ext) +# --- options --- + INCLUDE_DIRECTORIES( ${CAS_INCLUDE_DIRS} - ${PTHREAD_INCLUDE_DIRS} ${QT_INCLUDES} - ${CMAKE_CURRENT_SOURCE_DIR}/../Qtx - ${CMAKE_CURRENT_SOURCE_DIR}/../SUIT + ${PROJECT_SOURCE_DIR}/src/Qtx + ${PROJECT_SOURCE_DIR}/src/SUIT +) + +# additional preprocessor / compiler flags +ADD_DEFINITIONS(${CAS_DEFINITIONS} ${QT_DEFINITIONS}) + +# libraries to link to +SET(_link_LIBRARIES ${QT_LIBRARIES} ${CAS_KERNEL} ${OPENGL_LIBRARIES} qtx suit) +IF(NOT WINDOWS) + LIST(APPEND _link_LIBRARIES Xmu) +ENDIF() + +# --- headers --- + +# header files / to be processed by moc +SET(_moc_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 +) + +# header files / no moc processing +SET(_other_HEADERS + GLViewer.h + GLViewer_AspectLine.h + GLViewer_BaseDrawers.h + GLViewer_BaseObjects.h + GLViewer_Compass.h + GLViewer_Context.h + GLViewer_CoordSystem.h + GLViewer_Defs.h + GLViewer_Drawer.h + GLViewer_Geom.h + GLViewer_Grid.h + GLViewer_Group.h + GLViewer_MimeData.h + GLViewer_Object.h + GLViewer_Text.h + GLViewer_Tools.h +) + +# header files / to install +SET(GLViewer_HEADERS ${_moc_HEADERS} ${_other_HEADERS}) + +# --- resources --- + +# resource files / to be processed by lrelease +SET(_ts_RESOURCES + resources/GLViewer_images.ts + resources/GLViewer_msg_en.ts + resources/GLViewer_msg_fr.ts + resources/GLViewer_msg_ja.ts ) -SET(COMMON_LIBS - suit - ${QT_LIBRARIES} - ${CAS_KERNEL} - ${OPENGL_LIBRARIES} +# resource files / static +SET(_other_RESOURCES + resources/gl_cursor_rotate.png + resources/gl_cursor_sketch.png + resources/gl_cursor_zoom.png + resources/gl_view_dump.png + resources/gl_view_fitall.png + resources/gl_view_fitarea.png + resources/gl_view_fitselect.png + resources/gl_view_glpan.png + resources/gl_view_pan.png + resources/gl_view_reset.png + resources/gl_view_zoom.png ) -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}) +# --- sources --- + +# sources / moc wrappings +QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS}) -SET(GLViewer_SOURCES +# sources / static +SET(_other_SOURCES GLViewer_AspectLine.cxx GLViewer_BaseDrawers.cxx GLViewer_BaseObjects.cxx @@ -53,8 +123,8 @@ SET(GLViewer_SOURCES GLViewer_Selector.cxx GLViewer_Selector2d.cxx GLViewer_Text.cxx - GLViewer_Tools.cxx GLViewer_ToolTip.cxx + GLViewer_Tools.cxx GLViewer_ViewFrame.cxx GLViewer_ViewManager.cxx GLViewer_ViewPort.cxx @@ -64,22 +134,16 @@ SET(GLViewer_SOURCES GLViewer_Widget.cxx ) -SET(GUITS_SOURCES - resources/GLViewer_images.ts - resources/GLViewer_msg_en.ts - resources/GLViewer_msg_fr.ts - resources/GLViewer_msg_ja.ts -) +# sources / to compile +SET(GLViewer_SOURCES ${_other_SOURCES} ${_moc_SOURCES}) -ADD_DEFINITIONS(${CAS_DEFINITIONS}) +# --- rules --- -ADD_LIBRARY(GLViewer ${GLViewer_SOURCES} ${GUI_HEADERS_MOC}) -TARGET_LINK_LIBRARIES(GLViewer ${COMMON_LIBS}) +ADD_LIBRARY(GLViewer ${GLViewer_SOURCES}) +TARGET_LINK_LIBRARIES(GLViewer ${_link_LIBRARIES}) INSTALL(TARGETS GLViewer EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS}) -FILE(GLOB COMMON_HEADERS_H "${CMAKE_CURRENT_SOURCE_DIR}/*.h") -INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${SALOME_INSTALL_HEADERS}) -QT4_INSTALL_TS_RESOURCES("${GUITS_SOURCES}" "${SALOME_GUI_INSTALL_RES_DATA}") +INSTALL(FILES ${GLViewer_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS}) +QT4_INSTALL_TS_RESOURCES("${_ts_RESOURCES}" "${SALOME_GUI_INSTALL_RES_DATA}") -FILE(GLOB GUIPNG_DATA "${CMAKE_CURRENT_SOURCE_DIR}/resources/*.png") -INSTALL(FILES ${GUIPNG_DATA} DESTINATION ${SALOME_GUI_INSTALL_RES_DATA}) +INSTALL(FILES ${_other_RESOURCES} DESTINATION ${SALOME_GUI_INSTALL_RES_DATA}) diff --git a/src/GUI_PY/CMakeLists.txt b/src/GUI_PY/CMakeLists.txt index d67ee9ad0..061897088 100755 --- a/src/GUI_PY/CMakeLists.txt +++ b/src/GUI_PY/CMakeLists.txt @@ -17,39 +17,36 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -INCLUDE_DIRECTORIES( - ${CMAKE_CURRENT_BINARY_DIR} +INCLUDE(UsePyQt4) + +# --- resources --- + +# uic files / to be processed by pyuic +SET(_pyuic_files + SelectVarsDialog.ui + genericdialog.ui + mytestdialog.ui ) -# Python modules to be installed -SET(mypkgpython_PYTHON + +# --- scripts --- + +# scripts / pyuic wrappings + +PYQT4_WRAP_UIC(_pyuic_SCRIPTS ${_pyuic_files}) + +# scripts / static +SET(_other_SCRIPTS __init__.py - selectvars.py genericdialog.py - mytestdialog.py helper.py + mytestdialog.py + selectvars.py ) -SALOME_INSTALL_SCRIPTS("${mypkgpython_PYTHON}" ${SALOME_INSTALL_PYTHON}/salome/gui) -SET(PYUIC_FILES - SelectVarsDialog_ui.py - genericdialog_ui.py - mytestdialog_ui.py -) +# scritps / to install + +SET(_all_SCRIPTS ${_other_SCRIPTS} ${_pyuic_SCRIPTS}) + +# --- rules --- -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 ${PYQT_PYUIC_EXECUTABLE} -o ${output} ${input} - MAIN_DEPENDENCY ${input} - ) - #${PYQT_PYUIC_EXECUTABLE} -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 ${SALOME_INSTALL_PYTHON}/salome/gui) -ENDFOREACH(output ${PYUIC_FILES}) +SALOME_INSTALL_SCRIPTS("${_all_SCRIPTS}" ${SALOME_INSTALL_PYTHON}/salome/gui) diff --git a/src/GuiHelpers/CMakeLists.txt b/src/GuiHelpers/CMakeLists.txt index 914695ebc..a8e02eccf 100755 --- a/src/GuiHelpers/CMakeLists.txt +++ b/src/GuiHelpers/CMakeLists.txt @@ -17,35 +17,74 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # +# additional include directories INCLUDE_DIRECTORIES( ${CAS_INCLUDE_DIRS} ${QT_INCLUDES} ${Boost_INCLUDE_DIRS} ${OMNIORB_INCLUDE_DIR} - ${PTHREAD_INCLUDE_DIRS} ${KERNEL_INCLUDE_DIRS} - ${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 + ${PROJECT_SOURCE_DIR}/src/SalomeApp + ${PROJECT_SOURCE_DIR}/src/LightApp + ${PROJECT_SOURCE_DIR}/src/SUIT + ${PROJECT_SOURCE_DIR}/src/Qtx + ${PROJECT_SOURCE_DIR}/src/CAM + ${PROJECT_SOURCE_DIR}/src/STD + ${PROJECT_SOURCE_DIR}/src/OBJECT ) -SET(GUI_HEADERS StandardApp_Module.hxx) -QT4_WRAP_CPP(GUI_HEADERS_MOC ${GUI_HEADERS}) -SET(SalomeGuiHelpers_SOURCES - SALOME_GuiServices.cxx +# additional preprocessor / compiler flags +ADD_DEFINITIONS( + ${CAS_DEFINITIONS} + ${QT_DEFINITIONS} + ${BOOST_DEFINITIONS} + ${OMNIORB_DEFINITIONS} +) + +# libraries to link to +SET(_link_LIBRARIES + ${CORBA_LIBS} + ${KERNEL_SalomeKernelHelpers} + qtx suit std CAM SalomeObject LightApp SalomeApp +) + +# --- headers --- + +# header files / to be processed by moc +SET(_moc_HEADERS + StandardApp_Module.hxx +) + +# header files / no moc processing +SET(_other_HEADERS + QtHelper.hxx + SALOME_AppStudyEditor.hxx + SALOME_GuiServices.hxx + SalomeGuiHelpers.hxx +) + +# header files / to install +SET(SalomeGuiHelpers_HEADERS ${_moc_HEADERS} ${_other_HEADERS}) + +# --- sources --- + +# sources / moc wrappings +QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS}) + +# sources / static +SET(_other_SOURCES SALOME_AppStudyEditor.cxx + SALOME_GuiServices.cxx StandardApp_Module.cxx ) -ADD_DEFINITIONS(${CAS_DEFINITIONS} ${QT_DEFINITIONS} ${BOOST_DEFINITIONS} ${OMNIORB_DEFINITIONS}) +# sources / to compile +SET(SalomeGuiHelpers_SOURCES ${_other_SOURCES} ${_moc_SOURCES}) + +# --- rules --- -ADD_LIBRARY(SalomeGuiHelpers ${SalomeGuiHelpers_SOURCES} ${GUI_HEADERS_MOC}) -TARGET_LINK_LIBRARIES(SalomeGuiHelpers SalomeApp ${SalomeKernelHelpers} ${CORBA_LIBS}) +ADD_LIBRARY(SalomeGuiHelpers ${SalomeGuiHelpers_SOURCES}) +TARGET_LINK_LIBRARIES(SalomeGuiHelpers ${_link_LIBRARIES}) INSTALL(TARGETS SalomeGuiHelpers EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS}) -FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx") -INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${SALOME_INSTALL_HEADERS}) +INSTALL(FILES ${SalomeGuiHelpers_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS}) diff --git a/src/LightApp/CMakeLists.txt b/src/LightApp/CMakeLists.txt index 99b4928ac..d365a89e5 100755 --- a/src/LightApp/CMakeLists.txt +++ b/src/LightApp/CMakeLists.txt @@ -16,75 +16,230 @@ # # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + INCLUDE(UseQt4Ext) +# --- options --- + +# additional include directories INCLUDE_DIRECTORIES( ${CAS_INCLUDE_DIRS} ${QT_INCLUDES} ${HDF5_INCLUDE_DIRS} - ${PYTHON_INCLUDE_DIRS} - ${PTHREAD_INCLUDE_DIRS} - ${QWT_INCLUDE_DIR} ${KERNEL_INCLUDE_DIRS} ${PROJECT_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 + ${PROJECT_SOURCE_DIR}/src/CAM + ${PROJECT_SOURCE_DIR}/src/CASCatch + ${PROJECT_SOURCE_DIR}/src/Event + ${PROJECT_SOURCE_DIR}/src/LogWindow + ${PROJECT_SOURCE_DIR}/src/ObjBrowser + ${PROJECT_SOURCE_DIR}/src/Prs + ${PROJECT_SOURCE_DIR}/src/Qtx + ${PROJECT_SOURCE_DIR}/src/STD + ${PROJECT_SOURCE_DIR}/src/SUIT + ${PROJECT_SOURCE_DIR}/src/Style ) +IF(SALOME_USE_SALOMEOBJECT) + INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/src/OBJECT) +ENDIF() +IF(SALOME_USE_GLVIEWER) + INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/src/GLViewer) +ENDIF() +IF(SALOME_USE_OCCVIEWER) + INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/src/OCCViewer) + IF(SALOME_USE_SALOMEOBJECT) + INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/src/SOCC) + ENDIF() +ENDIF() +IF(SALOME_USE_PLOT2DVIEWER) + INCLUDE_DIRECTORIES(${QWT_INCLUDE_DIR}) + INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/src/Plot2d) + IF(SALOME_USE_SALOMEOBJECT) + INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/src/SPlot2d) + ENDIF() +ENDIF() +IF(SALOME_USE_VTKVIEWER) + INCLUDE_DIRECTORIES(${VTK_INCLUDE_DIRS}) + INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/src/VTKViewer) + IF(SALOME_USE_SALOMEOBJECT) + INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/src/SVTK) + ENDIF() +ENDIF() +IF(SALOME_USE_QXGRAPHVIEWER) + INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/src/QxScene) +ENDIF() +IF(SALOME_USE_PYCONSOLE) + INCLUDE_DIRECTORIES( + ${PYTHON_INCLUDE_DIRS} + ${PROJECT_SOURCE_DIR}/src/PyConsole + ${PROJECT_SOURCE_DIR}/src/PyInterp + ${PROJECT_SOURCE_DIR}/src/SUITApp + ) +ENDIF() -ADD_DEFINITIONS(${PYTHON_DEFINITIONS} ${HDF5_DEFINITIONS} ${CAS_DEFINITIONS} ${QT_DEFINITIONS}) - +# additional preprocessor / compiler flags +ADD_DEFINITIONS(${CAS_DEFINITIONS} ${QT_DEFINITIONS} ${HDF5_DEFINITIONS}) IF(NOT WINDOWS) ADD_DEFINITIONS("-Wno-deprecated") -ENDIF(NOT WINDOWS) +ENDIF() +IF(NOT SALOME_USE_SALOMEOBJECT) + ADD_DEFINITIONS("-DDISABLE_SALOMEOBJECT") +ENDIF() +IF (NOT SALOME_USE_GLVIEWER) + ADD_DEFINITIONS("-DDISABLE_GLVIEWER") +ENDIF() +IF(NOT SALOME_USE_OCCVIEWER) + ADD_DEFINITIONS("-DDISABLE_OCCVIEWER") +ENDIF() +IF(SALOME_USE_PLOT2DVIEWER) + ADD_DEFINITIONS(${QWT_DEFINITIONS}) +ELSE() + ADD_DEFINITIONS("-DDISABLE_PLOT2DVIEWER") +ENDIF() +IF(NOT SALOME_USE_VTKVIEWER) + ADD_DEFINITIONS("-DDISABLE_VTKVIEWER") +ENDIF() +IF(NOT SALOME_USE_QXGRAPHVIEWER) + ADD_DEFINITIONS("-DDISABLE_QXGRAPHVIEWER") +ENDIF() +IF(SALOME_USE_PYCONSOLE) + ADD_DEFINITIONS(${PYTHON_DEFINITIONS}) +ELSE() + ADD_DEFINITIONS("-DDISABLE_PYCONSOLE") +ENDIF() -SET(COMMON_LIBS - ${QT_LIBRARIES} - suit - std - CAM - LogWindow +# libraries to link to +SET(_link_LIBRARIES ${CAS_KERNEL} - SalomePrs - ObjBrowser - SalomeStyle - Event + ${QT_LIBRARIES} ${HDF5_LIBRARIES} - ${KERNEL_LDFLAGS} - ${KERNEL_SalomeHDFPersist} - ${KERNEL_SALOMELocalTrace} + CASCatch qtx suit std SalomeStyle SalomePrs CAM LogWindow ObjBrowser + ${KERNEL_SalomeHDFPersist} ${KERNEL_SALOMELocalTrace} ) +IF(SALOME_USE_SALOMEOBJECT) + LIST(APPEND _link_LIBRARIES SalomeObject) +ENDIF() +IF(SALOME_USE_GLVIEWER) + LIST(APPEND _link_LIBRARIES GLViewer) +ENDIF() +IF(SALOME_USE_OCCVIEWER) + LIST(APPEND _link_LIBRARIES OCCViewer) + IF(SALOME_USE_SALOMEOBJECT) + LIST(APPEND _link_LIBRARIES SOCC) + ENDIF() +ENDIF() +IF(SALOME_USE_PLOT2DVIEWER) + LIST(APPEND _link_LIBRARIES Plot2d) + IF(SALOME_USE_SALOMEOBJECT) + LIST(APPEND _link_LIBRARIES SPlot2d) + ENDIF() +ENDIF() +IF(SALOME_USE_VTKVIEWER) + LIST(APPEND _link_LIBRARIES VTKViewer) + IF(SALOME_USE_SALOMEOBJECT) + LIST(APPEND _link_LIBRARIES SVTK) + ENDIF() +ENDIF() +IF(SALOME_USE_QXGRAPHVIEWER) + LIST(APPEND _link_LIBRARIES QxScene) +ENDIF() +IF(SALOME_USE_PYCONSOLE) + LIST(APPEND _link_LIBRARIES PyInterp PyConsole SUITApp) +ENDIF() -SET(GUI_HEADERS +# --- headers --- + +# header files / to be processed by moc +SET(_moc_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_OBSelector.h + LightApp_Operation.h + LightApp_Preferences.h + LightApp_PreferencesDlg.h LightApp_SelectionMgr.h LightApp_ShowHideOp.h LightApp_Study.h LightApp_SwitchOp.h - LightApp_Preferences.h - LightApp_PreferencesDlg.h LightApp_WgViewModel.h ) +IF(SALOME_USE_GLVIEWER) + LIST(APPEND _moc_HEADERS LightApp_GLSelector.h) +ENDIF() +IF(SALOME_USE_OCCVIEWER) + LIST(APPEND _moc_HEADERS LightApp_OCCSelector.h) +ENDIF() +IF(SALOME_USE_PLOT2DVIEWER) + LIST(APPEND _moc_HEADERS LightApp_Plot2dSelector.h) +ENDIF() +IF(SALOME_USE_VTKVIEWER) + IF(SALOME_USE_SALOMEOBJECT) + LIST(APPEND _moc_HEADERS LightApp_VTKSelector.h) + ENDIF() +ENDIF() + +# header files / no moc processing +SET(_other_HEADERS + LightApp.h + LightApp_DataObject.h + LightApp_DataOwner.h + LightApp_DataSubOwner.h + LightApp_Displayer.h + LightApp_Driver.h + LightApp_EventFilter.h + LightApp_FullScreenHelper.h + LightApp_HDFDriver.h + LightApp_Selection.h + LightApp_UpdateFlags.h +) +IF(SALOME_USE_PYCONSOLE) + LIST(APPEND _other_HEADERS LightApp_PyInterp.h) +ENDIF() + +# header files / to install +SET(LightApp_HEADERS ${_moc_HEADERS} ${_other_HEADERS}) + +# --- resources --- + +# resource files / to be processed by rcc +SET(_rcc_RESOURCES LightApp.qrc) + +# resource files / to be processed by lrelease +SET(_ts_RESOURCES + resources/LightApp_images.ts + resources/LightApp_msg_en.ts + resources/LightApp_msg_fr.ts + resources/LightApp_msg_ja.ts +) -SET(RCCS LightApp.qrc) +# resource files / static +SET(_other_RESOURCES + resources/icon_about.png + resources/icon_applogo.png + resources/icon_default.png + resources/icon_module.png + resources/icon_module_big.png + resources/icon_select.png + resources/LightApp.ini + resources/LightApp.xml +) + +# --- sources --- + +# sources / rcc wrappings +QT4_ADD_RESOURCES(_rcc_SOURCES ${_rcc_RESOURCES}) -SET(LightApp_SOURCES +# sources / moc wrappings +QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS}) + +# sources / static +SET(_other_SOURCES LightApp_AboutDlg.cxx LightApp_Application.cxx LightApp_DataModel.cxx @@ -95,6 +250,7 @@ SET(LightApp_SOURCES LightApp_Displayer.cxx LightApp_Driver.cxx LightApp_EventFilter.cxx + LightApp_FullScreenHelper.cxx LightApp_HDFDriver.cxx LightApp_Module.cxx LightApp_ModuleAction.cxx @@ -102,159 +258,43 @@ SET(LightApp_SOURCES LightApp_NameDlg.cxx LightApp_OBSelector.cxx LightApp_Operation.cxx + LightApp_Preferences.cxx + LightApp_PreferencesDlg.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 - resources/LightApp_msg_ja.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(SALOME_USE_PYCONSOLE) - INCLUDE_DIRECTORIES( - ${PYTHON_INCLUDE_DIRS} - ${CMAKE_CURRENT_SOURCE_DIR}/../PyConsole - ${CMAKE_CURRENT_SOURCE_DIR}/../PyInterp - ${CMAKE_CURRENT_SOURCE_DIR}/../SUITApp - ) - 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(SALOME_USE_PYCONSOLE) - ADD_DEFINITIONS("-DDISABLE_PYCONSOLE") -ENDIF(SALOME_USE_PYCONSOLE) - -IF(SALOME_USE_VTKVIEWER) - INCLUDE_DIRECTORIES( - ${VTK_INCLUDE_DIRS} - ${CMAKE_CURRENT_SOURCE_DIR}/../VTKViewer - ) - SET(COMMON_LIBS ${COMMON_LIBS} ${VTK_LIBRARIES} VTKViewer) - IF(SALOME_USE_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(SALOME_USE_SALOMEOBJECT) -ELSE(SALOME_USE_VTKVIEWER) - ADD_DEFINITIONS("-DDISABLE_VTKVIEWER") -ENDIF(SALOME_USE_VTKVIEWER) - -IF(SALOME_USE_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(SALOME_USE_OCCVIEWER) - ADD_DEFINITIONS("-DDISABLE_OCCVIEWER") -ENDIF(SALOME_USE_OCCVIEWER) - IF(SALOME_USE_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(SALOME_USE_GLVIEWER) - ADD_DEFINITIONS("-DDISABLE_GLVIEWER") -ENDIF(SALOME_USE_GLVIEWER) - + LIST(APPEND _other_SOURCES LightApp_GLSelector.cxx) +ENDIF() +IF(SALOME_USE_OCCVIEWER) + LIST(APPEND _other_SOURCES LightApp_OCCSelector.cxx) +ENDIF() IF(SALOME_USE_PLOT2DVIEWER) - INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../Plot2d) - ADD_DEFINITIONS(${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(SALOME_USE_PLOT2DVIEWER) - ADD_DEFINITIONS("-DDISABLE_PLOT2DVIEWER") -ENDIF(SALOME_USE_PLOT2DVIEWER) + LIST(APPEND _other_SOURCES LightApp_Plot2dSelector.cxx) +ENDIF() +IF(SALOME_USE_VTKVIEWER) + IF(SALOME_USE_SALOMEOBJECT) + LIST(APPEND _other_SOURCES LightApp_VTKSelector.cxx) + ENDIF() +ENDIF() +IF(SALOME_USE_PYCONSOLE) + LIST(APPEND _other_SOURCES LightApp_PyInterp.cxx) +ENDIF() -IF(SALOME_USE_SUPERVGRAPHVIEWER) - INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../SUPERVGraph) - SET(COMMON_LIBS ${COMMON_LIBS} SUPERVGraph) -ELSE(SALOME_USE_SUPERVGRAPHVIEWER) - ADD_DEFINITIONS("-DDISABLE_SUPERVGRAPHVIEWER") -ENDIF(SALOME_USE_SUPERVGRAPHVIEWER) +# sources / to compile +SET(LightApp_SOURCES ${_other_SOURCES} ${_moc_SOURCES} ${_rcc_SOURCES}) -IF(SALOME_USE_QXGRAPHVIEWER) - INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../QxScene) - SET(COMMON_LIBS ${COMMON_LIBS} QxScene) -ELSE(SALOME_USE_QXGRAPHVIEWER) - ADD_DEFINITIONS("-DDISABLE_QXGRAPHVIEWER") -ENDIF(SALOME_USE_QXGRAPHVIEWER) - -IF(SALOME_USE_SALOMEOBJECT) - INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../OBJECT) - SET(COMMON_LIBS ${COMMON_LIBS} SalomeObject) - IF(SALOME_USE_PLOT2DVIEWER) - INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../SPlot2d) - SET(COMMON_LIBS ${COMMON_LIBS} SPlot2d) - ENDIF(SALOME_USE_PLOT2DVIEWER) - - IF(SALOME_USE_OCCVIEWER) - INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../SOCC) - SET(COMMON_LIBS ${COMMON_LIBS} SOCC) - ENDIF(SALOME_USE_OCCVIEWER) +# --- rules --- - IF(SALOME_USE_VTKVIEWER) - INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../SVTK) - ENDIF(SALOME_USE_VTKVIEWER) -ELSE(SALOME_USE_SALOMEOBJECT) - ADD_DEFINITIONS("-DDISABLE_SALOMEOBJECT") -ENDIF(SALOME_USE_SALOMEOBJECT) - -QT4_WRAP_CPP(GUI_HEADERS_MOC ${GUI_HEADERS}) -QT4_ADD_RESOURCES(RCC_SRCS ${RCCS}) -ADD_LIBRARY(LightApp ${LightApp_SOURCES} ${GUI_HEADERS_MOC} ${RCC_SRCS}) -TARGET_LINK_LIBRARIES(LightApp ${COMMON_LIBS}) +ADD_LIBRARY(LightApp ${LightApp_SOURCES}) +TARGET_LINK_LIBRARIES(LightApp ${_link_LIBRARIES}) INSTALL(TARGETS LightApp EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS}) -INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${SALOME_INSTALL_HEADERS}) -QT4_INSTALL_TS_RESOURCES("${GUITS_SOURCES}" "${SALOME_GUI_INSTALL_RES_DATA}") +INSTALL(FILES ${LightApp_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS}) +QT4_INSTALL_TS_RESOURCES("${_ts_RESOURCES}" "${SALOME_GUI_INSTALL_RES_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 ${SALOME_GUI_INSTALL_RES_DATA}) +INSTALL(FILES ${_other_RESOURCES} DESTINATION ${SALOME_GUI_INSTALL_RES_DATA}) diff --git a/src/LightApp/LightApp_Application.cxx b/src/LightApp/LightApp_Application.cxx index 1196ad50d..5c8c36c8c 100644 --- a/src/LightApp/LightApp_Application.cxx +++ b/src/LightApp/LightApp_Application.cxx @@ -49,7 +49,6 @@ #include "LightApp_AboutDlg.h" #include "LightApp_ModuleAction.h" // temporary commented -//#include "LightApp_OBFilter.h" #include "LightApp_EventFilter.h" #include "LightApp_OBSelector.h" #include "LightApp_SelectionMgr.h" @@ -138,17 +137,7 @@ #include #endif -//#ifndef DISABLE_SUPERVGRAPHVIEWER -// #include -// #include -// #include -//#endif - #ifndef DISABLE_QXGRAPHVIEWER -//VSR: QxGraph has been replaced by QxScene -// #include -// #include -// #include #include #include #include @@ -684,8 +673,6 @@ void LightApp_Application::createActions() createActionForViewer( NewVTKViewId, newWinMenu, QString::number( 3 ), Qt::ALT+Qt::Key_K ); #endif #ifndef DISABLE_QXGRAPHVIEWER -//VSR: QxGraph has been replaced by QxScene -// createActionForViewer( NewQxGraphViewId, newWinMenu, QString::number( 4 ), Qt::ALT+Qt::Key_C ); createActionForViewer( NewQxSceneViewId, newWinMenu, QString::number( 4 ), Qt::ALT+Qt::Key_S ); #endif @@ -798,10 +785,6 @@ void LightApp_Application::onNewWindow() break; #endif #ifndef DISABLE_QXGRAPHVIEWER -//VSR: QxGraph has been replaced by QxScene -// case NewQxGraphViewId: -// type = QxGraph_Viewer::Type(); -// break; case NewQxSceneViewId: type = QxScene_Viewer::Type(); break; @@ -925,8 +908,6 @@ void LightApp_Application::updateCommandsStatus() #endif #ifndef DISABLE_QXGRAPHVIEWER -//VSR: QxGraph has been replaced by QxScene -// a = action( NewQxGraphViewId ); a = action( NewQxSceneViewId ); if( a ) a->setEnabled( activeStudy() ); @@ -1423,18 +1404,7 @@ SUIT_ViewManager* LightApp_Application::createViewManager( const QString& vmType } } #endif - //#ifndef DISABLE_SUPERVGRAPHVIEWER - // if( vmType == SUPERVGraph_Viewer::Type() ) - // { - // viewMgr = new SUPERVGraph_ViewManager( activeStudy(), desktop(), new SUPERVGraph_Viewer() ); - // } - //#endif #ifndef DISABLE_QXGRAPHVIEWER -//VSR: QxGraph has been replaced by QxScene -// if( vmType == QxGraph_Viewer::Type() ) -// { -// viewMgr = new QxGraph_ViewManager( activeStudy(), desktop(), new QxGraph_Viewer() ); -// } if( vmType == QxScene_Viewer::Type() ) { viewMgr = new QxScene_ViewManager( activeStudy(), desktop() ); @@ -1845,8 +1815,6 @@ QWidget* LightApp_Application::createWindow( const int flag ) OB_ListView* ob_list = dynamic_cast( const_cast( ob->listView() ) ); if( ob_list ) ob_list->setColumnMaxWidth( 0, desktop()->width()/4 ); - - ob->setFilter( new LightApp_OBFilter( selectionMgr() ) ); */ // Create OBSelector diff --git a/src/LightApp/LightApp_Application.h b/src/LightApp/LightApp_Application.h index af4370a15..20ec3d6d1 100644 --- a/src/LightApp/LightApp_Application.h +++ b/src/LightApp/LightApp_Application.h @@ -84,8 +84,8 @@ public: enum { RenameId = CAM_Application::UserID, CloseId, CloseAllId, GroupAllId, PreferencesId, MRUId, ModulesListId, - NewGLViewId, NewPlot2dId, NewOCCViewId, NewVTKViewId, NewQxGraphViewId, - NewQxSceneViewId = NewQxGraphViewId, StyleId, FullScreenId, + NewGLViewId, NewPlot2dId, NewOCCViewId, NewVTKViewId, + NewQxSceneViewId, StyleId, FullScreenId, UserID }; protected: diff --git a/src/LightApp/LightApp_OBFilter.cxx b/src/LightApp/LightApp_OBFilter.cxx deleted file mode 100644 index a7f5b9367..000000000 --- a/src/LightApp/LightApp_OBFilter.cxx +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (C) 2007-2013 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 "LightApp_OBFilter.h" - -#include "LightApp_SelectionMgr.h" -#include "LightApp_DataObject.h" -#include "LightApp_DataOwner.h" - -/*! - Constructor. -*/ -LightApp_OBFilter::LightApp_OBFilter( LightApp_SelectionMgr* theSelMgr ) -{ - mySelMgr = theSelMgr; -} - -/*!Destructor.*/ -LightApp_OBFilter::~LightApp_OBFilter() -{ -} - -/*!Checks: data object is ok?*/ -bool LightApp_OBFilter::isOk( const SUIT_DataObject* theDataObj ) const -{ - const LightApp_DataObject* obj = dynamic_cast( theDataObj ); - if ( obj ) - return mySelMgr->isOk( new LightApp_DataOwner( obj->entry() ) ); - - return true; -} - diff --git a/src/LightApp/LightApp_OBFilter.h b/src/LightApp/LightApp_OBFilter.h deleted file mode 100644 index 5d7f8af6f..000000000 --- a/src/LightApp/LightApp_OBFilter.h +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (C) 2007-2013 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 LIGHTAPP_OBFILTER_H -#define LIGHTAPP_OBFILTER_H - -#include "LightApp.h" -#include "OB_Filter.h" - -class LightApp_SelectionMgr; - -/*! - \class LightApp_OBFilter - Custom Object Browser filter, that checks correctness of object by all filters set in selection manager -*/ -class LIGHTAPP_EXPORT LightApp_OBFilter: public OB_Filter -{ -public: - LightApp_OBFilter( LightApp_SelectionMgr* theSelMgr ); - ~LightApp_OBFilter(); - - virtual bool isOk( const SUIT_DataObject* ) const; - -private: - LightApp_SelectionMgr* mySelMgr; - -}; - -#endif diff --git a/src/LightApp/resources/LightApp.xml b/src/LightApp/resources/LightApp.xml index 078a2185d..f04bae680 100644 --- a/src/LightApp/resources/LightApp.xml +++ b/src/LightApp/resources/LightApp.xml @@ -73,8 +73,6 @@ - - @@ -187,14 +185,8 @@ -
- - - - -
- + diff --git a/src/LightApp/resources/LightApp_msg_en.ts b/src/LightApp/resources/LightApp_msg_en.ts index 7bc6b2127..7da5d4acd 100644 --- a/src/LightApp/resources/LightApp_msg_en.ts +++ b/src/LightApp/resources/LightApp_msg_en.ts @@ -466,10 +466,6 @@ The changes will be applied on the next application session. PREF_BROWSE_ALWAYS Always - - PREF_GROUP_SUPERV - Graph Supervisor - PREF_TAB_OBJBROWSER Object browser @@ -496,10 +492,6 @@ The changes will be applied on the next application session. NEW_WINDOW_4 - &QxGraph 2D view - - - NEW_WINDOW_5 Qx&Scene 2D view diff --git a/src/LightApp/resources/LightApp_msg_fr.ts b/src/LightApp/resources/LightApp_msg_fr.ts index c44f5eaae..33a8b23d6 100755 --- a/src/LightApp/resources/LightApp_msg_fr.ts +++ b/src/LightApp/resources/LightApp_msg_fr.ts @@ -466,10 +466,6 @@ Les modifications seront appliquées à la prochaine session. PREF_BROWSE_ALWAYS Toujours - - PREF_GROUP_SUPERV - Superviseur des graphes - PREF_TAB_OBJBROWSER Arbre d'étude @@ -496,10 +492,6 @@ Les modifications seront appliquées à la prochaine session. NEW_WINDOW_4 - Scène &QxGraph - - - NEW_WINDOW_5 Scène Qx&Scene diff --git a/src/LightApp/resources/LightApp_msg_ja.ts b/src/LightApp/resources/LightApp_msg_ja.ts index 536a58a10..9bb16bf0c 100644 --- a/src/LightApp/resources/LightApp_msg_ja.ts +++ b/src/LightApp/resources/LightApp_msg_ja.ts @@ -474,10 +474,6 @@ PREF_BROWSE_ALWAYS 常に - - PREF_GROUP_SUPERV - グラフのスーパーバイザー - PREF_TAB_OBJBROWSER オブジェクト ブラウザー @@ -504,10 +500,6 @@ NEW_WINDOW_4 - & QxGraph 2D ビュー - - - NEW_WINDOW_5 Qx & シーン 2 D ビュー diff --git a/src/LogWindow/CMakeLists.txt b/src/LogWindow/CMakeLists.txt index e90db2717..150d02c11 100755 --- a/src/LogWindow/CMakeLists.txt +++ b/src/LogWindow/CMakeLists.txt @@ -19,27 +19,54 @@ INCLUDE(UseQt4Ext) +# --- options --- + +# additional include directories INCLUDE_DIRECTORIES( ${QT_INCLUDES} - ${CMAKE_CURRENT_SOURCE_DIR}/../Qtx - ${CMAKE_CURRENT_SOURCE_DIR}/../SUIT + ${PROJECT_SOURCE_DIR}/src/Qtx + ${PROJECT_SOURCE_DIR}/src/SUIT ) -SET(GUI_HEADERS LogWindow.h) -QT4_WRAP_CPP(GUI_HEADERS_MOC ${GUI_HEADERS}) +# additional preprocessor / compiler flags +ADD_DEFINITIONS(${QT_DEFINITIONS}) + +# libraries to link to +SET(_link_LIBRARIES ${QT_LIBRARIES} qtx suit) + +# --- headers --- + +# header files / to be processed by moc +SET(_moc_HEADERS LogWindow.h) + +# header files / to install +SET(LogWindow_HEADERS ${_moc_HEADERS}) -SET(GUITS_SOURCES +# --- resources --- + +# resource files / to be processed by lrelease +SET(_ts_RESOURCES resources/LogWindow_msg_en.ts resources/LogWindow_msg_fr.ts resources/LogWindow_msg_ja.ts ) -ADD_DEFINITIONS(${QT_DEFINITIONS}) +# --- sources --- + +# sources / moc wrappings +QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS}) + +# sources / static +SET(_other_SOURCES LogWindow.cxx) + +# sources / to compile +SET(LogWindow_SOURCES ${_other_SOURCES} ${_moc_SOURCES}) + +# --- rules --- -ADD_LIBRARY(LogWindow LogWindow.cxx ${GUI_HEADERS_MOC}) -TARGET_LINK_LIBRARIES(LogWindow qtx suit ${QT_LIBRARIES}) +ADD_LIBRARY(LogWindow ${LogWindow_SOURCES}) +TARGET_LINK_LIBRARIES(LogWindow ${_link_LIBRARIES}) INSTALL(TARGETS LogWindow EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS}) -FILE(GLOB COMMON_HEADERS_H "${CMAKE_CURRENT_SOURCE_DIR}/*.h") -INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${SALOME_INSTALL_HEADERS}) -QT4_INSTALL_TS_RESOURCES("${GUITS_SOURCES}" "${SALOME_GUI_INSTALL_RES_DATA}") +INSTALL(FILES ${LogWindow_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS}) +QT4_INSTALL_TS_RESOURCES("${_ts_RESOURCES}" "${SALOME_GUI_INSTALL_RES_DATA}") diff --git a/src/OBJECT/CMakeLists.txt b/src/OBJECT/CMakeLists.txt index f9273b70d..c0ac02c13 100755 --- a/src/OBJECT/CMakeLists.txt +++ b/src/OBJECT/CMakeLists.txt @@ -17,20 +17,49 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # +# --- options --- + +# additional include directories INCLUDE_DIRECTORIES( - ${PTHREAD_INCLUDE_DIRS} ${CAS_INCLUDE_DIRS} - ${QT_INCLUDES} ${KERNEL_INCLUDE_DIRS} ) -SET(COMMON_LIBS - ${QT_LIBRARIES} - ${CAS_LDPATH} - ${CAS_KERNEL} - ${CAS_TKV3d} +# additional preprocessor / compiler flags +ADD_DEFINITIONS(${QT_DEFINITIONS} ${CAS_DEFINITIONS}) + +# libraries to link to +SET(_link_LIBRARIES ${QT_LIBRARIES} ${CAS_LDPATH} ${CAS_KERNEL} ${CAS_TKV3d}) + +# --- headers --- + +# header files / to install +SET(SalomeObject_HEADERS + Handle_SALOME_AISObject.hxx + Handle_SALOME_AISShape.hxx + Handle_SALOME_DataMapNodeOfDataMapOfIOMapOfInteger.hxx + Handle_SALOME_Filter.hxx + Handle_SALOME_InteractiveObject.hxx + Handle_SALOME_ListNodeOfListIO.hxx + Handle_SALOME_TypeFilter.hxx + SALOME_AISObject.hxx + SALOME_AISShape.hxx + SALOME_DataMapIteratorOfDataMapOfIOMapOfInteger.hxx + SALOME_DataMapNodeOfDataMapOfIOMapOfInteger.hxx + SALOME_DataMapOfIOMapOfInteger.hxx + SALOME_Filter.hxx + SALOME_InteractiveObject.hxx + SALOME_ListIO.hxx + SALOME_ListIteratorOfListIO.hxx + SALOME_ListNodeOfListIO.hxx + SALOME_Selection.h + SALOME_TypeFilter.hxx ) +# --- sources --- + +# sources / to compile + SET(SalomeObject_SOURCES SALOME_InteractiveObject.cxx SALOME_AISShape.cxx @@ -45,11 +74,10 @@ SET(SalomeObject_SOURCES SALOME_DataMapIteratorOfDataMapOfIOMapOfInteger_0.cxx ) -ADD_DEFINITIONS(${QT_DEFINITIONS} ${CAS_DEFINITIONS}) +# --- rules --- ADD_LIBRARY(SalomeObject ${SalomeObject_SOURCES}) -TARGET_LINK_LIBRARIES(SalomeObject ${COMMON_LIBS}) +TARGET_LINK_LIBRARIES(SalomeObject ${_link_LIBRARIES}) INSTALL(TARGETS SalomeObject EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS}) -FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx") -INSTALL(FILES ${COMMON_HEADERS_HXX} SALOME_Selection.h DESTINATION ${SALOME_INSTALL_HEADERS}) +INSTALL(FILES ${SalomeObject_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS}) diff --git a/src/OCCViewer/CMakeLists.txt b/src/OCCViewer/CMakeLists.txt index 3de6bf38b..89f863207 100755 --- a/src/OCCViewer/CMakeLists.txt +++ b/src/OCCViewer/CMakeLists.txt @@ -22,105 +22,149 @@ INCLUDE(UseQt4Ext) +# --- options --- + +# additional include directories INCLUDE_DIRECTORIES( ${CAS_INCLUDE_DIRS} ${OGL_INCLUDE_DIRS} ${QT_INCLUDES} - ${PTHREAD_INCLUDE_DIRS} ${KERNEL_INCLUDE_DIRS} - ${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 + ${PROJECT_SOURCE_DIR}/src/CASCatch + ${PROJECT_SOURCE_DIR}/src/Qtx + ${PROJECT_SOURCE_DIR}/src/OpenGLUtils + ${PROJECT_SOURCE_DIR}/src/SUIT + ${PROJECT_SOURCE_DIR}/src/ViewerTools ) +# additional preprocessor / compiler flags +ADD_DEFINITIONS(${QT_DEFINITIONS} ${CAS_DEFINITIONS} ${OGL_DEFINITIONS}) - -SET(COMMON_LIBS - qtx - suit - ViewerTools - OpenGLUtils - ${OPENGL_LIBRARIES} - ${QT_LIBRARIES} - ${CAS_KERNEL} - ${CAS_VIEWER} +# libraries to link to +SET(_link_LIBRARIES + ${OPENGL_LIBRARIES} ${QT_LIBRARIES} ${CAS_KERNEL} ${CAS_VIEWER} + CASCatch qtx suit OpenGLUtils ViewerTools ) -SET(GUI_HEADERS +# --- headers --- + +# header files / to be processed by moc +SET(_moc_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_ClippingDlg.h + OCCViewer_CreateRestoreViewDlg.h OCCViewer_CubeAxesDlg.h + OCCViewer_FontWidget.h + OCCViewer_SetRotationPointDlg.h OCCViewer_ToolTip.h OCCViewer_ViewFrame.h + OCCViewer_ViewManager.h + OCCViewer_ViewModel.h + OCCViewer_ViewPort.h + OCCViewer_ViewPort3d.h + OCCViewer_ViewSketcher.h + OCCViewer_ViewWindow.h +) + +# header files / no moc processing +SET(_other_HEADERS + OCCViewer.h + OCCViewer_Trihedron.h + OCCViewer_VService.h ) -QT4_WRAP_CPP(GUI_HEADERS ${GUI_HEADERS}) -SET(OCCViewer_SOURCES +# header files / no moc processing / internal +# no processing currently: TODO: check for MSVS project +SET(_internal_HEADERS + OCCViewer_VService.h +) + +# header files / to install +SET(OCCViewer_HEADERS ${_moc_HEADERS} ${_other_HEADERS}) + +# --- resources --- + +# resource files / to be processed by lrelease +SET(_ts_RESOURCES + resources/OCCViewer_images.ts + resources/OCCViewer_msg_en.ts + resources/OCCViewer_msg_fr.ts + resources/OCCViewer_msg_ja.ts +) + +# resource files / static +SET(_other_RESOURCES + resources/occ_view_ambient.png + resources/occ_view_anticlockwise.png + resources/occ_view_back.png + resources/occ_view_bottom.png + resources/occ_view_camera_dump.png + resources/occ_view_clipping.png + resources/occ_view_clipping_pressed.png + resources/occ_view_clockwise.png + resources/occ_view_clone.png + resources/occ_view_fitall.png + resources/occ_view_fitarea.png + resources/occ_view_front.png + resources/occ_view_glpan.png + resources/occ_view_graduated_axes.png + resources/occ_view_left.png + resources/occ_view_maximized.png + resources/occ_view_minimized.png + resources/occ_view_pan.png + resources/occ_view_preselection.png + resources/occ_view_presets.png + resources/occ_view_reset.png + resources/occ_view_right.png + resources/occ_view_rotate.png + resources/occ_view_rotation_point.png + resources/occ_view_scaling.png + resources/occ_view_selection.png + resources/occ_view_shoot.png + resources/occ_view_style_switch.png + resources/occ_view_top.png + resources/occ_view_triedre.png + resources/occ_view_zoom.png + resources/occ_view_zooming_style_switch.png +) + +# --- sources --- + +# sources / moc wrappings +QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS}) + +# sources / static +SET(_other_SOURCES OCCViewer_AISSelector.cxx + OCCViewer_AxialScaleDlg.cxx + OCCViewer_ClippingDlg.cxx + OCCViewer_CreateRestoreViewDlg.cxx + OCCViewer_CubeAxesDlg.cxx + OCCViewer_FontWidget.cxx + OCCViewer_SetRotationPointDlg.cxx + OCCViewer_ToolTip.cxx + OCCViewer_Trihedron.cxx + OCCViewer_VService.cxx + OCCViewer_ViewFrame.cxx OCCViewer_ViewManager.cxx OCCViewer_ViewModel.cxx - OCCViewer_ViewPort3d.cxx OCCViewer_ViewPort.cxx + OCCViewer_ViewPort3d.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 - resources/OCCViewer_msg_ja.ts -) +# sources / to compile +SET(OCCViewer_SOURCES ${_other_SOURCES} ${_moc_SOURCES}) -ADD_DEFINITIONS(${QT_DEFINITIONS} ${CAS_DEFINITIONS} ${OGL_DEFINITIONS}) +# --- rules --- -ADD_LIBRARY(OCCViewer ${OCCViewer_SOURCES} ${GUI_HEADERS}) -TARGET_LINK_LIBRARIES(OCCViewer ${COMMON_LIBS}) +ADD_LIBRARY(OCCViewer ${OCCViewer_SOURCES}) +TARGET_LINK_LIBRARIES(OCCViewer ${_link_LIBRARIES}) INSTALL(TARGETS OCCViewer EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_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 ${SALOME_INSTALL_HEADERS}) -QT4_INSTALL_TS_RESOURCES("${GUITS_SOURCES}" "${SALOME_GUI_INSTALL_RES_DATA}") -FILE(GLOB GUIPNG_DATA "${CMAKE_CURRENT_SOURCE_DIR}/resources/*.png") -INSTALL(FILES ${GUIPNG_DATA} DESTINATION ${SALOME_GUI_INSTALL_RES_DATA}) +INSTALL(FILES ${OCCViewer_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS}) +QT4_INSTALL_TS_RESOURCES("${_ts_RESOURCES}" "${SALOME_GUI_INSTALL_RES_DATA}") + +INSTALL(FILES ${_other_RESOURCES} DESTINATION ${SALOME_GUI_INSTALL_RES_DATA}) diff --git a/src/ObjBrowser/CMakeLists.txt b/src/ObjBrowser/CMakeLists.txt index e87dea144..80811c3de 100644 --- a/src/ObjBrowser/CMakeLists.txt +++ b/src/ObjBrowser/CMakeLists.txt @@ -19,32 +19,56 @@ INCLUDE(UseQt4Ext) +# --- options --- + +# additional include directories INCLUDE_DIRECTORIES( ${QT_INCLUDES} - ${CMAKE_CURRENT_SOURCE_DIR}/../Qtx + ${PROJECT_SOURCE_DIR}/src/Qtx ) -SET(GUI_HEADERS OB_Browser.h) -QT4_WRAP_CPP(GUI_HEADERS ${GUI_HEADERS}) -SET(ObjBrowser_SOURCES - OB_Browser.cxx -) +# additional preprocessor / compiler flags +ADD_DEFINITIONS(${QT_DEFINITIONS}) + +# libraries to link to +SET(_link_LIBRARIES ${QT_LIBRARIES} qtx) + +# --- headers --- + +# header files / to be processed by moc +SET(_moc_HEADERS OB_Browser.h) + +# header files / no moc processing +SET(_other_HEADERS OB.h) + +# header files / to install +SET(ObjBrowser_HEADERS ${_moc_HEADERS} ${_other_HEADERS}) -SET(GUITS_SOURCES +# --- resources --- + +# resource files / to be processed by lrelease +SET(_ts_RESOURCES resources/OB_msg_en.ts resources/OB_msg_fr.ts resources/OB_msg_ja.ts ) -ADD_DEFINITIONS(${QT_DEFINITIONS}) +# --- sources --- + +# sources / moc wrappings +QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS}) + +# sources / static +SET(_other_SOURCES OB_Browser.cxx) -ADD_LIBRARY(ObjBrowser ${ObjBrowser_SOURCES} ${GUI_HEADERS}) -TARGET_LINK_LIBRARIES(ObjBrowser qtx ${QT_LIBRARIES}) +# sources / to compile +SET(ObjBrowser_SOURCES ${_other_SOURCES} ${_moc_SOURCES}) + +# --- rules --- + +ADD_LIBRARY(ObjBrowser ${ObjBrowser_SOURCES}) +TARGET_LINK_LIBRARIES(ObjBrowser ${_link_LIBRARIES}) INSTALL(TARGETS ObjBrowser EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS}) -SET(COMMON_HEADERS_H - OB.h - OB_Browser.h -) -INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${SALOME_INSTALL_HEADERS}) -QT4_INSTALL_TS_RESOURCES("${GUITS_SOURCES}" "${SALOME_GUI_INSTALL_RES_DATA}") +INSTALL(FILES ${ObjBrowser_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS}) +QT4_INSTALL_TS_RESOURCES("${_ts_RESOURCES}" "${SALOME_GUI_INSTALL_RES_DATA}") diff --git a/src/OpenGLUtils/CMakeLists.txt b/src/OpenGLUtils/CMakeLists.txt index 9c558ac5e..3677f011c 100755 --- a/src/OpenGLUtils/CMakeLists.txt +++ b/src/OpenGLUtils/CMakeLists.txt @@ -17,20 +17,28 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # +# --- options --- + +# additional include directories INCLUDE_DIRECTORIES( - ${PTHREAD_INCLUDE_DIRS} ${KERNEL_INCLUDE_DIRS} ) -SET(COMMON_LIBS ${OPENGL_LIBRARIES} ${KERNEL_SALOMELocalTrace}) +# libraries to link to +SET(_link_LIBRARIES ${OPENGL_LIBRARIES} ${KERNEL_SALOMELocalTrace}) -ADD_LIBRARY(OpenGLUtils OpenGLUtils_FrameBuffer.cxx) -TARGET_LINK_LIBRARIES(OpenGLUtils ${COMMON_LIBS}) -INSTALL(TARGETS OpenGLUtils EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS}) +# --- headers --- -SET(COMMON_HEADERS_H - OpenGLUtils.h - OpenGLUtils_FrameBuffer.h -) +SET(OpenGLUtils_HEADERS OpenGLUtils.h OpenGLUtils_FrameBuffer.h) + +# --- sources --- + +SET(OpenGLUtils_SOURCES OpenGLUtils_FrameBuffer.cxx) + +# --- rules --- + +ADD_LIBRARY(OpenGLUtils ${OpenGLUtils_SOURCES}) +TARGET_LINK_LIBRARIES(OpenGLUtils ${_link_LIBRARIES}) +INSTALL(TARGETS OpenGLUtils EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS}) -INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${SALOME_INSTALL_HEADERS}) +INSTALL(FILES ${OpenGLUtils_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS}) diff --git a/src/Plot2d/CMakeLists.txt b/src/Plot2d/CMakeLists.txt index 1ce40667f..2ac2d87ca 100755 --- a/src/Plot2d/CMakeLists.txt +++ b/src/Plot2d/CMakeLists.txt @@ -19,109 +19,151 @@ INCLUDE(UseQt4Ext) +# --- options --- + +# additional include directories INCLUDE_DIRECTORIES( - ${QWT_INCLUDE_DIR} ${QT_INCLUDES} - ${Boost_INCLUDE_DIRS} - ${PYTHON_INCLUDE_DIRS} - ${KERNEL_INCLUDE_DIRS} - ${CMAKE_CURRENT_SOURCE_DIR}/../Qtx - ${CMAKE_CURRENT_SOURCE_DIR}/../SUIT + ${QWT_INCLUDE_DIR} + ${PROJECT_SOURCE_DIR}/src/Qtx + ${PROJECT_SOURCE_DIR}/src/SUIT ) +IF(SALOME_USE_PYCONSOLE) + INCLUDE_DIRECTORIES(${PYTHON_INCLUDE_DIRS}) +ENDIF() +# additional preprocessor / compiler flags ADD_DEFINITIONS(${QT_DEFINITIONS} ${QWT_DEFINITIONS} ${PYTHON_DEFINITIONS}) +IF(SALOME_USE_PYCONSOLE) + ADD_DEFINITIONS(${PYTHON_DEFINITIONS}) +ENDIF() -SET(COMMON_LIBS ${QWT_LIBRARY} ${QT_LIBRARIES} ${PYTHON_LIBRARIES} suit) +# libraries to link to +SET(_link_LIBRARIES ${QT_LIBRARIES} ${QWT_LIBRARY} qtx suit) +IF(SALOME_USE_PYCONSOLE) + LIST(APPEND _link_LIBRARIES ${PYTHON_LIBRARIES}) +ENDIF() -SET(GUI_HEADERS +# --- headers --- + +# header files / to be processed by moc +SET(_moc_HEADERS + Plot2d_Algorithm.h Plot2d_FitDataDlg.h + Plot2d_NormalizeAlgorithm.h + Plot2d_SetupCurveDlg.h + Plot2d_SetupCurveScaleDlg.h Plot2d_SetupViewDlg.h + Plot2d_ToolTip.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 ) +IF(SALOME_USE_PYCONSOLE) + LIST(APPEND _moc_HEADERS + Plot2d_AnalyticalCurveDlg.h + ) +ENDIF() -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 +# header files / no moc processing +SET(_other_HEADERS + Plot2d.h + Plot2d_Curve.h + Plot2d_Histogram.h + Plot2d_Object.h + Plot2d_PlotItems.h + Plot2d_Prs.h ) +IF(SALOME_USE_PYCONSOLE) + LIST(APPEND _other_HEADERS + Plot2d_AnalyticalCurve.h + Plot2d_AnalyticalParser.h + ) +ENDIF() + +# header files / to install +SET(Plot2d_HEADERS ${_moc_HEADERS} ${_other_HEADERS}) + +# --- resources --- -SET(GUITS_SOURCES +# resource files / to be processed by lrelease +SET(_ts_RESOURCES resources/Plot2d_images.ts resources/Plot2d_msg_en.ts resources/Plot2d_msg_fr.ts resources/Plot2d_msg_ja.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 +# resource files / static +SET(_other_RESOURCES + resources/plot2d_analytical_curve.png + resources/plot2d_camera_dump.png + resources/plot2d_clone.png + resources/plot2d_fitall.png + resources/plot2d_fitarea.png + resources/plot2d_glpan.png + resources/plot2d_legend.png + resources/plot2d_linear.png + resources/plot2d_linear_y.png + resources/plot2d_lines.png + resources/plot2d_lmax_normalization.png + resources/plot2d_lmin_normalization.png + resources/plot2d_log.png + resources/plot2d_log_y.png + resources/plot2d_pan.png + resources/plot2d_points.png + resources/plot2d_print.png + resources/plot2d_rmax_normalization.png + resources/plot2d_rmin_normalization.png + resources/plot2d_settings.png + resources/plot2d_splines.png + resources/plot2d_zoom.png ) +# --- sources --- + +# sources / moc wrappings +QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS}) + +# sources / static +SET(_other_SOURCES + Plot2d.cxx + Plot2d_Algorithm.cxx + Plot2d_Curve.cxx + Plot2d_FitDataDlg.cxx + Plot2d_Histogram.cxx + Plot2d_NormalizeAlgorithm.cxx + Plot2d_Object.cxx + Plot2d_PlotItems.cxx + Plot2d_Prs.cxx + Plot2d_SetupCurveDlg.cxx + Plot2d_SetupCurveScaleDlg.cxx + Plot2d_SetupViewDlg.cxx + Plot2d_ToolTip.cxx + Plot2d_ViewFrame.cxx + Plot2d_ViewManager.cxx + Plot2d_ViewModel.cxx + Plot2d_ViewWindow.cxx +) IF(SALOME_USE_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 + LIST(APPEND _other_SOURCES + Plot2d_AnalyticalCurve.cxx + Plot2d_AnalyticalCurveDlg.cxx + Plot2d_AnalyticalParser.cxx ) - SET(GUI_HEADERS - ${GUI_HEADERS} - Plot2d_AnalyticalCurveDlg.h - ) -ENDIF(SALOME_USE_PYCONSOLE) +ENDIF() + +# sources / to compile +SET(Plot2d_SOURCES ${_other_SOURCES} ${_moc_SOURCES}) -QT4_WRAP_CPP(GUI_HEADERS_MOC ${GUI_HEADERS}) +# --- rules --- -ADD_LIBRARY(Plot2d ${Plot2d_SOURCES} ${GUI_HEADERS_MOC}) -TARGET_LINK_LIBRARIES(Plot2d ${COMMON_LIBS}) +ADD_LIBRARY(Plot2d ${Plot2d_SOURCES}) +TARGET_LINK_LIBRARIES(Plot2d ${_link_LIBRARIES}) INSTALL(TARGETS Plot2d EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS}) -INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${SALOME_INSTALL_HEADERS}) -QT4_INSTALL_TS_RESOURCES("${GUITS_SOURCES}" "${SALOME_GUI_INSTALL_RES_DATA}") +INSTALL(FILES ${Plot2d_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS}) +QT4_INSTALL_TS_RESOURCES("${_ts_RESOURCES}" "${SALOME_GUI_INSTALL_RES_DATA}") -FILE(GLOB GUIPNG_DATA "${CMAKE_CURRENT_SOURCE_DIR}/resources/*.png") -INSTALL(FILES ${GUIPNG_DATA} DESTINATION ${SALOME_GUI_INSTALL_RES_DATA}) +INSTALL(FILES ${_other_RESOURCES} DESTINATION ${SALOME_GUI_INSTALL_RES_DATA}) diff --git a/src/Prs/CMakeLists.txt b/src/Prs/CMakeLists.txt index fca4b65bd..1b3311b74 100755 --- a/src/Prs/CMakeLists.txt +++ b/src/Prs/CMakeLists.txt @@ -19,6 +19,4 @@ ADD_LIBRARY(SalomePrs SALOME_Prs.cxx) INSTALL(TARGETS SalomePrs EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS}) - INSTALL(FILES SALOME_Prs.h DESTINATION ${SALOME_INSTALL_HEADERS}) - diff --git a/src/PyConsole/CMakeLists.txt b/src/PyConsole/CMakeLists.txt index 38175ffe8..ab3e1af87 100755 --- a/src/PyConsole/CMakeLists.txt +++ b/src/PyConsole/CMakeLists.txt @@ -19,58 +19,79 @@ INCLUDE(UseQt4Ext) +# --- options --- + +# additional include directories INCLUDE_DIRECTORIES( ${QT_INCLUDES} - ${PTHREAD_INCLUDE_DIRS} ${PYTHON_INCLUDE_DIRS} - ${KERNEL_INCLUDE_DIRS} - ${CMAKE_CURRENT_SOURCE_DIR}/../Qtx - ${CMAKE_CURRENT_SOURCE_DIR}/../SUIT - ${CMAKE_CURRENT_SOURCE_DIR}/../PyInterp - ${CMAKE_CURRENT_SOURCE_DIR}/../Event + ${PROJECT_SOURCE_DIR}/src/Qtx + ${PROJECT_SOURCE_DIR}/src/SUIT + ${PROJECT_SOURCE_DIR}/src/Event + ${PROJECT_SOURCE_DIR}/src/PyInterp ) -SET(COMMON_LIBS ${PYTHON_LIBRARIES} ${QT_LIBRARIES} ${SALOMELocalTrace} qtx suit PyInterp Event) +# additional preprocessor / compiler flags +ADD_DEFINITIONS(${QT_DEFINITIONS} ${PYTHON_DEFINITIONS}) + +# libraries to link to +SET(_link_LIBRARIES ${QT_LIBRARIES} ${PYTHON_LIBRARIES} qtx suit PyInterp Event) -SET(GUI_HEADERS +# --- headers --- + +# header files / to be processed by moc +SET(_moc_HEADERS + PyConsole_Console.h PyConsole_Editor.h PyConsole_EnhEditor.h - PyConsole_Console.h ) -QT4_WRAP_CPP(GUI_HEADERS_MOC ${GUI_HEADERS}) -SET(PyConsole_SOURCES +# header files / no moc processing +SET(_other_HEADERS + PyConsole.h + PyConsole_EnhInterp.h + PyConsole_Event.h + PyConsole_Interp.h + PyConsole_Request.h +) + +# header files / to install +SET(PyConsole_HEADERS ${_moc_HEADERS} ${_other_HEADERS}) + +# --- resources --- + +# resource files / to be processed by lrelease +SET(_ts_RESOURCES + resources/PyConsole_msg_en.ts + resources/PyConsole_msg_fr.ts + resources/PyConsole_msg_ja.ts +) + +# --- sources --- + +# sources / moc wrappings +QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS}) + +# sources / static +SET(_other_SOURCES PyConsole_Console.cxx PyConsole_Editor.cxx PyConsole_EnhEditor.cxx - PyConsole_Interp.cxx PyConsole_EnhInterp.cxx PyConsole_Event.cxx + PyConsole_Interp.cxx PyConsole_Request.cxx ) -SET(GUITS_SOURCES - resources/PyConsole_msg_en.ts - resources/PyConsole_msg_fr.ts - resources/PyConsole_msg_ja.ts -) +# sources / to compile +SET(PyConsole_SOURCES ${_other_SOURCES} ${_moc_SOURCES}) -ADD_DEFINITIONS(${QT_DEFINITIONS} ${PYTHON_DEFINITIONS}) +# --- rules --- -ADD_LIBRARY(PyConsole ${PyConsole_SOURCES} ${GUI_HEADERS_MOC}) -TARGET_LINK_LIBRARIES(PyConsole ${COMMON_LIBS}) +ADD_LIBRARY(PyConsole ${PyConsole_SOURCES}) +TARGET_LINK_LIBRARIES(PyConsole ${_link_LIBRARIES}) INSTALL(TARGETS PyConsole EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS}) -SET(COMMON_HEADERS_H - PyConsole.h - PyConsole_Console.h - PyConsole_Editor.h - PyConsole_EnhEditor.h - PyConsole_Interp.h - PyConsole_EnhInterp.h - PyConsole_Event.h - PyConsole_Request.h -) -INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${SALOME_INSTALL_HEADERS}) -QT4_INSTALL_TS_RESOURCES("${GUITS_SOURCES}" "${SALOME_GUI_INSTALL_RES_DATA}") +INSTALL(FILES ${PyConsole_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS}) +QT4_INSTALL_TS_RESOURCES("${_ts_RESOURCES}" "${SALOME_GUI_INSTALL_RES_DATA}") diff --git a/src/PyInterp/CMakeLists.txt b/src/PyInterp/CMakeLists.txt index e94a79852..2de9c321d 100755 --- a/src/PyInterp/CMakeLists.txt +++ b/src/PyInterp/CMakeLists.txt @@ -19,36 +19,59 @@ INCLUDE(UseQt4Ext) +# --- options --- + +# additional include directories INCLUDE_DIRECTORIES( ${QT_INCLUDES} ${PYTHON_INCLUDE_DIRS} - ${KERNEL_INCLUDE_DIRS} - ${CMAKE_CURRENT_SOURCE_DIR}/../Event + ${PROJECT_SOURCE_DIR}/src/Event ) -SET(COMMON_LIBS ${PYTHON_LIBRARIES} ${QT_LIBRARIES} Event) +# additional preprocessor / compiler flags +ADD_DEFINITIONS(${QT_DEFINITIONS} ${PYTHON_DEFINITIONS}) -SET(GUI_HEADERS PyInterp_Watcher.h) -QT4_WRAP_CPP(GUI_HEADERS_MOC ${GUI_HEADERS}) +# libraries to link to +SET(_link_LIBRARIES ${QT_LIBRARIES} ${PYTHON_LIBRARIES} Event) -SET(PyInterp_SOURCES - PyInterp_Interp.cxx +# --- headers --- + +# header files / to be processed by moc / internal +# TODO: check for MSVS project +SET(_moc_internal_HEADERS PyInterp_Watcher.h) + +# header files / no moc processing +SET(_other_HEADERS + PyInterp.h + PyInterp_Dispatcher.h + PyInterp_Event.h + PyInterp_Interp.h + PyInterp_Request.h +) + +# header files / to install +SET(PyInterp_HEADERS ${_other_HEADERS}) + +# --- sources --- + +# sources / moc wrappings +QT4_WRAP_CPP(_moc_SOURCES ${_moc_internal_HEADERS}) + +# sources / static +SET(_other_SOURCES PyInterp_Dispatcher.cxx PyInterp_Event.cxx + PyInterp_Interp.cxx PyInterp_Request.cxx ) -ADD_DEFINITIONS(${QT_DEFINITIONS} ${PYTHON_DEFINITIONS}) +# sources / to compile +SET(PyInterp_SOURCES ${_other_SOURCES} ${_moc_SOURCES}) + +# --- rules --- -ADD_LIBRARY(PyInterp ${PyInterp_SOURCES} ${GUI_HEADERS_MOC}) -TARGET_LINK_LIBRARIES(PyInterp ${COMMON_LIBS}) +ADD_LIBRARY(PyInterp ${PyInterp_SOURCES}) +TARGET_LINK_LIBRARIES(PyInterp ${_link_LIBRARIES}) INSTALL(TARGETS PyInterp EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS}) -SET(COMMON_HEADERS_H - PyInterp.h - PyInterp_Interp.h - PyInterp_Dispatcher.h - PyInterp_Event.h - PyInterp_Request.h -) -INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${SALOME_INSTALL_HEADERS}) +INSTALL(FILES ${PyInterp_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS}) diff --git a/src/QDS/CMakeLists.txt b/src/QDS/CMakeLists.txt index f657ac43f..0b612b0df 100755 --- a/src/QDS/CMakeLists.txt +++ b/src/QDS/CMakeLists.txt @@ -19,67 +19,89 @@ INCLUDE(UseQt4Ext) +# --- options --- + +# additional include directories INCLUDE_DIRECTORIES( ${CAS_INCLUDE_DIRS} - ${PTHREAD_INCLUDE_DIRS} ${QT_INCLUDES} - ${KERNEL_INCLUDE_DIRS} - ${CMAKE_CURRENT_SOURCE_DIR}/../Qtx - ${CMAKE_CURRENT_SOURCE_DIR}/../DDS + ${PROJECT_SOURCE_DIR}/src/Qtx + ${PROJECT_SOURCE_DIR}/src/DDS ) -SET(COMMON_LIBS ${QT_LIBRARIES} ${CAS_KERNEL} DDS qtx) +# additional preprocessor / compiler flags +ADD_DEFINITIONS(${QT_DEFINITIONS} ${CAS_DEFINITIONS}) + +# libraries to link to +SET(_link_LIBRARIES ${QT_LIBRARIES} ${CAS_KERNEL} qtx DDS) -SET(GUI_HEADERS +# --- headers --- + +# header files / to be processed by moc +SET(_moc_HEADERS QDS_CheckBox.h QDS_ComboBox.h QDS_Datum.h QDS_LineEdit.h + QDS_RadioBox.h QDS_SpinBox.h QDS_SpinBoxDbl.h QDS_TextEdit.h - QDS_RadioBox.h ) -QT4_WRAP_CPP(GUI_HEADERS_MOC ${GUI_HEADERS}) -SET(QDS_SOURCES +# obsolete files: not migrated to Qt4 +# _moc_HEADERS << QDS_Table.h +# TODO: migrate or remove? + +# header files / no moc processing +SET(_other_HEADERS + QDS.h + QDS_Validator.h +) + +# header files / to install +SET(QDS_HEADERS ${_moc_HEADERS} ${_other_HEADERS}) + +# --- resources --- + +# resource files / to be processed by lrelease +SET(_ts_RESOURCES + resources/QDS_msg_en.ts + resources/QDS_msg_fr.ts + resources/QDS_msg_ja.ts +) + +# --- sources --- + +# sources / moc wrappings +QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS}) + +# sources / static +SET(_other_SOURCES QDS.cxx QDS_CheckBox.cxx QDS_ComboBox.cxx QDS_Datum.cxx QDS_LineEdit.cxx + QDS_RadioBox.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 - resources/QDS_msg_ja.ts ) -ADD_DEFINITIONS(${QT_DEFINITIONS} ${CAS_DEFINITIONS}) +# obsolete files: not migrated to Qt4 +# _other_SOURCES << QDS_Table.cxx +# TODO: migrate or remove? -ADD_LIBRARY(QDS ${QDS_SOURCES} ${GUI_HEADERS_MOC}) -TARGET_LINK_LIBRARIES(QDS ${COMMON_LIBS}) -INSTALL(TARGETS QDS EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS}) +# sources / to compile +SET(QDS_SOURCES ${_other_SOURCES} ${_moc_SOURCES}) -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 -) +# --- rules --- -INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${SALOME_INSTALL_HEADERS}) -QT4_INSTALL_TS_RESOURCES("${GUITS_SOURCES}" "${SALOME_GUI_INSTALL_RES_DATA}") +ADD_LIBRARY(QDS ${QDS_SOURCES}) +TARGET_LINK_LIBRARIES(QDS ${_link_LIBRARIES}) +INSTALL(TARGETS QDS EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS}) +INSTALL(FILES ${QDS_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS}) +QT4_INSTALL_TS_RESOURCES("${_ts_RESOURCES}" "${SALOME_GUI_INSTALL_RES_DATA}") diff --git a/src/Qtx/CMakeLists.txt b/src/Qtx/CMakeLists.txt index 0caedd7b7..7cf483a88 100755 --- a/src/Qtx/CMakeLists.txt +++ b/src/Qtx/CMakeLists.txt @@ -19,13 +19,21 @@ INCLUDE(UseQt4Ext) -INCLUDE_DIRECTORIES( - ${QT_INCLUDES} -) +# --- options --- + +# additional include directories +INCLUDE_DIRECTORIES(${QT_INCLUDES}) + +# additional preprocessor / compiler flags +ADD_DEFINITIONS(${QT_DEFINITIONS}) +# libraries to link to +SET(_link_LIBRARIES ${QT_LIBRARIES} ${OPENGL_LIBRARIES}) +# --- headers --- -SET(GUI_HEADERS +# header files / to be processed by moc +SET(_moc_HEADERS QtxAction.h QtxActionGroup.h QtxActionMenuMgr.h @@ -46,12 +54,11 @@ SET(GUI_HEADERS QtxGroupBox.h QtxIntSpinBox.h QtxListAction.h - QtxTreeView.h QtxLogoMgr.h + QtxMRUAction.h QtxMainWindow.h QtxMenu.h QtxMultiAction.h - QtxMRUAction.h QtxPagePrefMgr.h QtxPathDialog.h QtxPathEdit.h @@ -63,19 +70,50 @@ SET(GUI_HEADERS QtxSplash.h QtxToolBar.h QtxToolTip.h + QtxTreeView.h QtxValidator.h + QtxWebBrowser.h QtxWorkspace.h QtxWorkspaceAction.h QtxWorkstack.h QtxWorkstackAction.h - QtxWebBrowser.h ) -QT4_WRAP_CPP(GUI_HEADERS_MOC ${GUI_HEADERS}) -SET(RCCS Qtx.qrc) -QT4_ADD_RESOURCES(RCC_SRCS ${RCCS}) +# obsolete files: not migrated to Qt4 +# _moc_HEADERS << QtxListBox.h QtxTable.h +# TODO: migrate or remove? + +# header files / no moc processing +SET(_other_HEADERS + Qtx.h + QtxEvalExpr.h + QtxMap.h + QtxPreferenceMgr.h + QtxResourceMgr.h + QtxTranslator.h +) + +# header files / to install +SET(qtx_HEADERS ${_moc_HEADERS} ${_other_HEADERS}) + +# --- resources --- + +# resource files / to be processed by rcc +SET(_rcc_RESOURCES Qtx.qrc) + +# resource files / to be processed by lrelease +SET(_ts_RESOURCES resources/Qtx_msg_fr.ts) -SET(qtx_SOURCES +# --- sources --- + +# sources / rcc wrappings +QT4_ADD_RESOURCES(_rcc_SOURCES ${_rcc_RESOURCES}) + +# sources / moc wrappings +QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS}) + +# sources / static +SET(_other_SOURCES Qtx.cxx QtxAction.cxx QtxActionGroup.cxx @@ -98,12 +136,11 @@ SET(qtx_SOURCES QtxGroupBox.cxx QtxIntSpinBox.cxx QtxListAction.cxx - QtxTreeView.cxx QtxLogoMgr.cxx + QtxMRUAction.cxx QtxMainWindow.cxx QtxMenu.cxx QtxMultiAction.cxx - QtxMRUAction.cxx QtxPagePrefMgr.cxx QtxPathDialog.cxx QtxPathEdit.cxx @@ -118,72 +155,27 @@ SET(qtx_SOURCES QtxToolBar.cxx QtxToolTip.cxx QtxTranslator.cxx + QtxTreeView.cxx QtxValidator.cxx + QtxWebBrowser.cxx QtxWorkspace.cxx QtxWorkspaceAction.cxx QtxWorkstack.cxx QtxWorkstackAction.cxx - QtxWebBrowser.cxx -) -SET(GUITS_SOURCES - resources/Qtx_msg_fr.ts ) -ADD_DEFINITIONS(${QT_DEFINITIONS}) -ADD_LIBRARY(qtx ${qtx_SOURCES} ${GUI_HEADERS_MOC} ${RCC_SRCS}) -TARGET_LINK_LIBRARIES(qtx ${QT_LIBRARIES} ${OPENGL_LIBRARIES}) +# obsolete files: not migrated to Qt4 +# _other_SOURCES << QtxListBox.cxx QtxTable.cxx +# TODO: migrate or remove? + +# sources / to compile +SET(qtx_SOURCES ${_other_SOURCES} ${_moc_SOURCES} ${_rcc_SOURCES}) + +# --- rules --- + +ADD_LIBRARY(qtx ${qtx_SOURCES}) +TARGET_LINK_LIBRARIES(qtx ${_link_LIBRARIES}) INSTALL(TARGETS qtx EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_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 ${SALOME_INSTALL_HEADERS}) -QT4_INSTALL_TS_RESOURCES("${GUITS_SOURCES}" "${SALOME_GUI_INSTALL_RES_DATA}") \ No newline at end of file +INSTALL(FILES ${qtx_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS}) +QT4_INSTALL_TS_RESOURCES("${_ts_RESOURCES}" "${SALOME_GUI_INSTALL_RES_DATA}") \ No newline at end of file diff --git a/src/QxGraph/CMakeLists.txt b/src/QxGraph/CMakeLists.txt deleted file mode 100755 index 9a9eb5f50..000000000 --- a/src/QxGraph/CMakeLists.txt +++ /dev/null @@ -1,81 +0,0 @@ -# Copyright (C) 2012-2013 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(UseQt4Ext) - -INCLUDE_DIRECTORIES( - ${CAS_INCLUDE_DIRS} - ${QT_INCLUDES} - ${Boost_INCLUDE_DIRS} - ${PYTHON_INCLUDE_DIRS} - ${KERNEL_INCLUDE_DIRS} - ${CMAKE_CURRENT_SOURCE_DIR}/../Qtx - ${CMAKE_CURRENT_SOURCE_DIR}/../SUIT -) - -SET(COMMON_LIBS ${QT_LIBRARIES} 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 - resources/QxGraph_msg_ja.ts -) - -ADD_DEFINITIONS("${QT_DEFINITIONS} ${CAS_DEFINITIONS} ${BOOST_DEFINITIONS} ${PYTHON_DEFINITIONS}") - -ADD_LIBRARY(QxGraph ${QxGraph_SOURCES} ${GUI_HEADERS_MOC}) -TARGET_LINK_LIBRARIES(QxGraph ${COMMON_LIBS}) -INSTALL(TARGETS QxGraph EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_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 ${SALOME_INSTALL_HEADERS}) -QT4_INSTALL_TS_RESOURCES("${GUITS_SOURCES}" "${SALOME_GUI_INSTALL_RES_DATA}") - -FILE(GLOB GUIPNG_DATA "${CMAKE_CURRENT_SOURCE_DIR}/resources/*.png") -INSTALL(FILES ${GUIPNG_DATA} DESTINATION ${SALOME_GUI_INSTALL_RES_DATA}) diff --git a/src/QxGraph/QxGraph.h b/src/QxGraph/QxGraph.h deleted file mode 100644 index 05f93adc3..000000000 --- a/src/QxGraph/QxGraph.h +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (C) 2007-2013 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 QxGraph : build Supervisor viewer into desktop -// -#ifdef WNT -#if defined QXGRAPH_EXPORTS || defined QxGraph_EXPORTS -#define QXGRAPH_EXPORT __declspec(dllexport) -#else -#define QXGRAPH_EXPORT __declspec(dllimport) -#endif -#else -#define QXGRAPH_EXPORT -#endif - -#ifdef WNT -#pragma warning ( disable:4251 ) -#endif diff --git a/src/QxGraph/QxGraph_ActiveItem.h b/src/QxGraph/QxGraph_ActiveItem.h deleted file mode 100644 index df73ae954..000000000 --- a/src/QxGraph/QxGraph_ActiveItem.h +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (C) 2007-2013 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 QXGRAPH_ACTIVEITEM_H -#define QXGRAPH_ACTIVEITEM_H - -#include "QxGraph.h" - -#include -#include -#include - -class QXGRAPH_EXPORT QxGraph_ActiveItem -{ - public: - QxGraph_ActiveItem() {} - ~QxGraph_ActiveItem() {} - - virtual bool isMoveable() = 0; - virtual void beforeMoving() = 0; - virtual void afterMoving() = 0; - - virtual bool isResizable(QPoint thePoint, int& theCursorType) { return false; } - virtual bool isResizing() { return false; } - virtual void beforeResizing(int theCursorType) {} - virtual void resize(QPoint thePoint) {} - virtual void afterResizing() {} - - virtual void hilight(const QPoint& theMousePos, const bool toHilight = true) = 0; - virtual void select(const QPoint& theMousePos, const bool toSelect = true) = 0; - virtual void showPopup(QWidget* theParent, QMouseEvent* theEvent, const QPoint& theMousePos = QPoint()) = 0; - - virtual QString getToolTipText(const QPoint& theMousePos, QRect& theRect) const = 0; - - virtual bool arePartsOfOtherItem(QxGraph_ActiveItem* theSecondItem) { return false; } - - void setTMatrix(QWMatrix theMatrix) { myTMatrix = theMatrix; } - QWMatrix getTMatrix() const { return myTMatrix; } - - private: - QWMatrix myTMatrix; // canvas view's current transformation matrix -}; - -#endif diff --git a/src/QxGraph/QxGraph_Canvas.cxx b/src/QxGraph/QxGraph_Canvas.cxx deleted file mode 100644 index 82526d118..000000000 --- a/src/QxGraph/QxGraph_Canvas.cxx +++ /dev/null @@ -1,111 +0,0 @@ -// Copyright (C) 2007-2013 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 QxGraph : build Supervisor viewer into desktop -// -#include "QxGraph_Canvas.h" -#include "QxGraph_Def.h" -#include "QxGraph_Prs.h" - -#include - -#include -#include - -/*! - Constructor -*/ -QxGraph_Canvas::QxGraph_Canvas(SUIT_ResourceMgr* theMgr) : - QCanvas() -{ - printf("Construct QxGraph_Canvas\n"); - - resize(GRAPH_WIDTH, GRAPH_HEIGHT); - setDoubleBuffering(true); - - QColor aColor = theMgr->colorValue( "QxGraph", "Background", DEF_BACK_COLOR ); - setBackgroundColor(aColor); -} - -/*! - Destructor -*/ -QxGraph_Canvas::~QxGraph_Canvas() -{ - /*QObjectList* aNodeList = queryList("QObject"); - QObjectListIt aIt(*aNodeList); - QObject* anObj; - while ( (anObj = aIt.current()) != 0 ) { - ++aIt; - aNodeList->removeRef(anObj); - delete anObj; - } - delete aNodeList;*/ - - myPrsList.setAutoDelete(true); - myPrsList.clear(); -} - -/*! - Add view -*/ -void QxGraph_Canvas::addView(QCanvasView* theView) -{ - myViews.append( theView ); - QCanvas::addView(theView); - theView->setPaletteBackgroundColor(backgroundColor().light(120)); -} - -/*! - Remove view -*/ -void QxGraph_Canvas::removeView( QCanvasView* theView ) -{ - myViews.remove( theView ); -} - -/*! - Remove item -*/ -void QxGraph_Canvas::removeItem( QCanvasItem* theItem ) -{ - QValueList< QCanvasView* >::iterator anIter; - for ( anIter = myViews.begin(); anIter != myViews.end(); ++anIter ) - { - QxGraph_CanvasView* aView = dynamic_cast( *anIter ); - if ( aView ) - aView->itemRemoved( theItem ); - } - - QCanvas::removeItem( theItem ); -} - -/*! - Get Prs object with index theIndex -*/ -QxGraph_Prs* QxGraph_Canvas::getPrs(int theIndex) -{ - QxGraph_Prs* aRetPrs = 0; - if ( theIndex >= 0 && theIndex < myPrsList.count() ) - aRetPrs = myPrsList.at(theIndex); - return aRetPrs; -} diff --git a/src/QxGraph/QxGraph_Canvas.h b/src/QxGraph/QxGraph_Canvas.h deleted file mode 100644 index 18ea619df..000000000 --- a/src/QxGraph/QxGraph_Canvas.h +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (C) 2007-2013 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 QxGraph : build Supervisor viewer into desktop -// -#ifndef QXGRAPH_CANVAS_H -#define QXGRAPH_CANVAS_H - -#include "QxGraph.h" - -#include -#include - -class SUIT_ResourceMgr; -class QxGraph_Prs; - -class QXGRAPH_EXPORT QxGraph_Canvas : public QCanvas { - Q_OBJECT - - public: - QxGraph_Canvas(SUIT_ResourceMgr*); - virtual ~QxGraph_Canvas(); - - virtual void addView(QCanvasView* theView); - virtual void removeView(QCanvasView*); - - QPtrList getPrsList() const { return myPrsList; } - QxGraph_Prs* getPrs(int theIndex = 0); - void addPrs(QxGraph_Prs* thePrs) { myPrsList.append(thePrs); } - - virtual void removeItem( QCanvasItem* ); - -private: - - QValueList< QCanvasView* > myViews; - QPtrList myPrsList; - -}; - -#endif diff --git a/src/QxGraph/QxGraph_CanvasView.cxx b/src/QxGraph/QxGraph_CanvasView.cxx deleted file mode 100644 index b9fd4377a..000000000 --- a/src/QxGraph/QxGraph_CanvasView.cxx +++ /dev/null @@ -1,763 +0,0 @@ -// Copyright (C) 2007-2013 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 QxGraph : build Supervisor viewer into desktop -// -#include "QxGraph_CanvasView.h" -#include "QxGraph_Canvas.h" -#include "QxGraph_ViewWindow.h" -#include "QxGraph_ActiveItem.h" -#include "QxGraph_Def.h" - -#include -#include - -const char* imageZoomCursor[] = { -"32 32 3 1", -". c None", -"a c #000000", -"# c #ffffff", -"................................", -"................................", -".#######........................", -"..aaaaaaa.......................", -"................................", -".............#####..............", -"...........##.aaaa##............", -"..........#.aa.....a#...........", -".........#.a.........#..........", -".........#a..........#a.........", -"........#.a...........#.........", -"........#a............#a........", -"........#a............#a........", -"........#a............#a........", -"........#a............#a........", -".........#...........#.a........", -".........#a..........#a.........", -".........##.........#.a.........", -"........#####.....##.a..........", -".......###aaa#####.aa...........", -"......###aa...aaaaa.......#.....", -".....###aa................#a....", -"....###aa.................#a....", -"...###aa...............#######..", -"....#aa.................aa#aaaa.", -".....a....................#a....", -"..........................#a....", -"...........................a....", -"................................", -"................................", -"................................", -"................................"}; - -const char* imageCrossCursor[] = { - "32 32 3 1", - ". c None", - "a c #000000", - "# c #ffffff", - "................................", - "................................", - "................................", - "................................", - "................................", - "................................", - "................................", - "...............#................", - "...............#a...............", - "...............#a...............", - "...............#a...............", - "...............#a...............", - "...............#a...............", - "...............#a...............", - "...............#a...............", - ".......#################........", - "........aaaaaaa#aaaaaaaaa.......", - "...............#a...............", - "...............#a...............", - "...............#a...............", - "...............#a...............", - "...............#a...............", - "...............#a...............", - "...............#a...............", - "................a...............", - "................................", - "................................", - "................................", - "................................", - "................................", - "................................", - "................................"}; - -/*! - Constructor -*/ -QxGraph_CanvasView::QxGraph_CanvasView(QxGraph_Canvas* theCanvas, QxGraph_ViewWindow* theViewWindow) : - QCanvasView(theCanvas, theViewWindow, 0, Qt::WRepaintNoErase), - myCurrentItem(0), - myHilightedItem(0), - mySelectedItem(0), - myMovingDone(false), - myCenter(0,0) -{ - printf("Construct QxGraph_CanvasView\n"); - setName("QxGraph_CanvasView"); - - myOperation = NOTHING; - myCursor = cursor(); - mySelectedRect = 0; - - myTimer = new QTimer(this); - connect(myTimer, SIGNAL(timeout()), this, SLOT(onTimeout())); - - viewport()->setMouseTracking(true); -} - -/*! - Destructor -*/ -QxGraph_CanvasView::~QxGraph_CanvasView() -{ -} - -void QxGraph_CanvasView::contentsMousePressEvent(QMouseEvent* theEvent) -{ - myPoint = inverseWorldMatrix().map(theEvent->pos()); - myGlobalPoint = theEvent->globalPos(); - myCurrentItem = 0; - - if ( theEvent->button() == Qt::MidButton && theEvent->state() == Qt::ControlButton - || - myOperation == PANVIEW ) - { // Panning - if ( myOperation != PANVIEW ) { - myOperation = PANVIEW; - myCursor = cursor(); // save old cursor - QCursor panCursor (Qt::SizeAllCursor); - setCursor(panCursor); - } - return; - } - - if ( myOperation == PANGLOBAL ) - { // Global panning - return; - } - - if ( myOperation == WINDOWFIT ) - { // Fit area - return; - } - - if ( theEvent->button() == Qt::LeftButton && theEvent->state() == Qt::ControlButton - || - myOperation == ZOOMVIEW ) - { // Zoom - if ( myOperation != ZOOMVIEW ) { - myOperation = ZOOMVIEW; - myCursor = cursor(); // save old cursor - QPixmap zoomPixmap (imageZoomCursor); - QCursor zoomCursor (zoomPixmap); - setCursor(zoomCursor); - - // the center of the view before zooming - int aXVCenter = viewport()->width()/2; - int aYVCenter = viewport()->height()/2; - myCenter = viewportToContents(QPoint(aXVCenter,aYVCenter)); - } - return; - } - - if ( theEvent->button() == Qt::LeftButton ) - { - QCanvasItemList aList = canvas()->collisions(myPoint); - // to move items on canvas view - for (QCanvasItemList::Iterator it = aList.begin(); it != aList.end(); ++it) { - QxGraph_ActiveItem* anActItem = dynamic_cast( *it ); - int aCursorType; - if ( anActItem && anActItem->isResizable(myPoint,aCursorType) ) - { // resize itself only active items if it is resizable - anActItem->beforeResizing(aCursorType); - myCurrentItem = *it; - return; - } - else if ( anActItem && anActItem->isMoveable() ) - { // move itself only active items if it is moveable - anActItem->beforeMoving(); - myCurrentItem = *it; - return; - } - } - } -} - -void QxGraph_CanvasView::contentsMouseMoveEvent(QMouseEvent* theEvent) -{ - QPoint aPoint = inverseWorldMatrix().map(theEvent->pos()); - QPoint aGlobalPoint = theEvent->globalPos(); - - if (myTimer->isActive()) myTimer->stop(); - - if ( myOperation == PANVIEW ) - { // Panning - scrollBy(myGlobalPoint.x() - aGlobalPoint.x(), - myGlobalPoint.y() - aGlobalPoint.y()); - myGlobalPoint = aGlobalPoint; - myMovingDone = true; - return; - } - - if ( myOperation == WINDOWFIT ) - { // Fit within rectangle - int aLX, aTY; //left x and top y - if (myPoint.x() < aPoint.x()) aLX = myPoint.x(); - else aLX = aPoint.x(); - if (myPoint.y() < aPoint.y()) aTY = myPoint.y(); - else aTY = aPoint.y(); - QRect aRect(aLX, aTY, abs(myPoint.x()-aPoint.x()), abs(myPoint.y()-aPoint.y())); - QCanvasRectangle* aRect1 = new QCanvasRectangle(aRect, canvas()); - - //hide old selected rectangle - if (mySelectedRect) - mySelectedRect->hide(); - //draw new selected rectangle - QPen pen(Qt::black,1,Qt::SolidLine); - aRect1->setPen(pen); - aRect1->setZ(1E+6); - aRect1->show(); - - mySelectedRect = aRect1; - canvas()->update(); - - return; - } - - if ( myOperation == ZOOMVIEW ) - { // Zoom - QCanvasItemList aList = canvas()->allItems(); - for (QCanvasItemList::Iterator it = aList.begin(); it != aList.end(); ++it) - (*it)->hide(); - - int aXContCenter = myCenter.x(); - int aYContCenter = myCenter.y(); - - QWMatrix m = worldMatrix(); - - double dx = aGlobalPoint.x() - myGlobalPoint.x(); - double s = 1. + fabs(dx)*( (m.m11() < 1) ? m.m11() : 1. )/70.; - if (dx < 0) s = 1./s; - - int aXContCenterScaled = aXContCenter*s; - int aYContCenterScaled = aYContCenter*s; - - m.scale(s, s); - setWorldMatrix(m); - - center(aXContCenterScaled,aYContCenterScaled); - - myCenter.setX(aXContCenterScaled); - myCenter.setY(aYContCenterScaled); - - // remember the canvas view's current transformation matrix in all canvas items - aList = canvas()->allItems(); - for (QCanvasItemList::Iterator it = aList.begin(); it != aList.end(); ++it) { - QxGraph_ActiveItem* anActItem = dynamic_cast( *it ); - if ( anActItem ) anActItem->setTMatrix(m); - (*it)->show(); - } - - myGlobalPoint = aGlobalPoint; - myMovingDone = true; - - return; - } - - if ( myCurrentItem ) - { - QxGraph_ActiveItem* anActItem = dynamic_cast( myCurrentItem ); - if ( anActItem && anActItem->isResizing() ) - { // to resize items on canvas view - anActItem->resize(aPoint); - myMovingDone = true; - return; - } - - // to move items on canvas view - if ( myCurrentItem->x() && myCurrentItem->y() ) { - double cx = myCurrentItem->x() - myPoint.x(); - double cy = myCurrentItem->y() - myPoint.y(); - - if (aPoint.x()+cx < 0) aPoint.setX(-(int)cx); - if (aPoint.y()+cy < 0) aPoint.setY(-(int)cy); - } - myCurrentItem->moveBy(aPoint.x() - myPoint.x(), - aPoint.y() - myPoint.y()); - myMovingDone = true; - myPoint = aPoint; - canvas()->update(); - - // scroll contents if mouse is outside - QRect r(contentsX(), contentsY(), visibleWidth(), visibleHeight()); - if (!r.contains(theEvent->pos())) { - int dx = 0, dy = 0; - if (theEvent->pos().x() < r.left()) dx = theEvent->pos().x() - r.left(); - if (theEvent->pos().x() > r.right()) dx = theEvent->pos().x() - r.right(); - if (theEvent->pos().y() < r.top()) dy = theEvent->pos().y() - r.top(); - if (theEvent->pos().y() > r.bottom()) dy = theEvent->pos().y() - r.bottom(); - scrollBy(dx, dy); - // start timer to scroll in silent mode - myDX = dx; myDY = dy; - myTimer->start(100); - } - - return; - } - else - { - QCanvasItemList aList = canvas()->collisions(aPoint); - // perform actions for active items - bool isHilightPerformed = false; - - for (QCanvasItemList::Iterator it = aList.begin(); it != aList.end(); ++it) { - QxGraph_ActiveItem* anActItem = dynamic_cast( *it ); - - if (!isHilightPerformed && anActItem) { - // hilight - anActItem->hilight(aPoint); - if (anActItem != myHilightedItem) { - if (myHilightedItem) - myHilightedItem->hilight(aPoint, false); - myHilightedItem = anActItem; - } - isHilightPerformed = true; - - // show tooltip - QxGraph_ToolTip* aToolTip = new QxGraph_ToolTip(this); - aToolTip->maybeTip(aPoint); - } - - int aCursorType; - if ( anActItem && anActItem->isResizable(aPoint,aCursorType) ) { - // set resize cursor - QCursor resizeCursor; - switch (aCursorType) - { - case 1: //left - case 3: //right - resizeCursor = QCursor(Qt::SizeHorCursor); - break; - case 2: //top - case 4: //bottom - resizeCursor = QCursor(Qt::SizeVerCursor); - break; - case 5: //left-top - case 7: //right-bottom - resizeCursor = QCursor(Qt::SizeFDiagCursor); - break; - case 6: //right-top - case 8: //left-bottom - resizeCursor = QCursor(Qt::SizeBDiagCursor); - break; - default : - resizeCursor = QCursor(Qt::ArrowCursor); - break; - } - setCursor(resizeCursor); - return; - } - else { - // reset old cursor - setCursor(QCursor(Qt::ArrowCursor)); - return; - } - } - - if (!isHilightPerformed && myHilightedItem) { - myHilightedItem->hilight(aPoint, false); - myHilightedItem = 0; - QToolTip::hide(); //@ temporary solution - } - - if ( cursor().shape() == Qt::SizeVerCursor || cursor().shape() == Qt::SizeHorCursor - || cursor().shape() == Qt::SizeBDiagCursor || cursor().shape() == Qt::SizeFDiagCursor) - setCursor(QCursor(Qt::ArrowCursor)); - } -} - -/*! - This method is called by QxGraph_Canvas when item is removed. - QxGraph_CanvasView updates its own data accordingly -*/ -void QxGraph_CanvasView::itemRemoved( QCanvasItem* theItem ) -{ - if ( myCurrentItem == theItem ) - myCurrentItem = 0; - - QxGraph_ActiveItem* anActiveItem = dynamic_cast( theItem ); - if ( anActiveItem ) - { - if ( myHilightedItem == anActiveItem ) - myHilightedItem = 0; - if ( mySelectedItem == anActiveItem ) - mySelectedItem = 0; - } -} - -void QxGraph_CanvasView::setSelectedItem( QxGraph_ActiveItem* theItem ) -{ - mySelectedItem = theItem; -} - -QxGraph_ActiveItem* QxGraph_CanvasView::getSelectedItem() const -{ - return mySelectedItem; -} - -void QxGraph_CanvasView::contentsMouseReleaseEvent(QMouseEvent* theEvent) -{ - QPoint aPoint = inverseWorldMatrix().map(theEvent->pos()); - - if (myTimer->isActive()) myTimer->stop(); - - if (myCurrentItem) - { // to move items on canvas view - QxGraph_ActiveItem* anActItem = dynamic_cast( myCurrentItem ); - if ( anActItem && anActItem->isResizing() ) - { - anActItem->afterResizing(); - // reset old cursor - setCursor(QCursor(Qt::ArrowCursor)); - } - else if ( anActItem && anActItem->isMoveable() ) - anActItem->afterMoving(); - } - myCurrentItem = 0; - - if ( myOperation == PANVIEW ) - { // Panning - myOperation = NOTHING; - viewport()->setMouseTracking(true); - setCursor(myCursor); - - emit viewOperationDone(); - } - - if ( myOperation == PANGLOBAL ) - { // Global panning - myOperation = NOTHING; - center( theEvent->x(), theEvent->y() ); - setCursor(myCursor); - - emit viewOperationDone(); - } - - if ( myOperation == WINDOWFIT ) - { // Fit within rectangle - myOperation = NOTHING; - - if (mySelectedRect) { - mySelectedRect->hide(); - mySelectedRect = 0; - //canvas()->update(); - } - - //myPoint is the start point for selecting rectangle now - int aLX, aTY; //left x and top y - if (myPoint.x() < aPoint.x()) aLX = myPoint.x(); - else aLX = aPoint.x(); - if (myPoint.y() < aPoint.y()) aTY = myPoint.y(); - else aTY = aPoint.y(); - - //calculate width and height for new view and new zoom factor - double aXzoom = ((double)visibleWidth())/((double)(abs(myPoint.x()-aPoint.x()))); - double aYzoom = ((double)visibleHeight())/((double)(abs(myPoint.y()-aPoint.y()))); - if (aXzoom > aYzoom) aXzoom = aYzoom; - - QWMatrix m; - m.scale(aXzoom, aXzoom); - setWorldMatrix(m); - - // remember the canvas view's current transformation matrix in all canvas items - QCanvasItemList aList = canvas()->allItems(); - for (QCanvasItemList::Iterator it = aList.begin(); it != aList.end(); ++it) { - QxGraph_ActiveItem* anActItem = dynamic_cast( *it ); - if ( anActItem ) anActItem->setTMatrix(m); - } - - setContentsPos((int)(aLX*aXzoom), (int)(aTY*aYzoom)); - - canvas()->update(); - - viewport()->setMouseTracking(true); - setCursor(myCursor); - - emit viewOperationDone(); - } - - if ( myOperation == ZOOMVIEW ) - { // Zoom - myOperation = NOTHING; - viewport()->setMouseTracking(true); - setCursor(myCursor); - - emit viewOperationDone(); - } - - if ( theEvent->button() == RightButton ) - { - // Selection mechanism - QCanvasItemList aList = canvas()->collisions(aPoint); - bool isSelectionPerformed = false; - - for (QCanvasItemList::Iterator it = aList.begin(); it != aList.end(); ++it) { - QxGraph_ActiveItem* anActItem = dynamic_cast( *it ); - if (!isSelectionPerformed && anActItem) - { - anActItem->select(aPoint); - if (anActItem != mySelectedItem) - { - if (mySelectedItem && isSelectedItemInCanvas() && - !mySelectedItem->arePartsOfOtherItem(anActItem)) mySelectedItem->select(aPoint, false); - mySelectedItem = anActItem; - - // unhilight hilighted item if selection was performed - if (myHilightedItem) { - myHilightedItem->hilight(aPoint, false); - myHilightedItem = 0; - } - } - isSelectionPerformed = true; - } - } - - if (!isSelectionPerformed) - { - if ( mySelectedItem ) - { - if ( isSelectedItemInCanvas() ) mySelectedItem->select(aPoint, false); - mySelectedItem = 0; - } - - // Background popup - printf("Background popup\n"); - QContextMenuEvent aEvent( QContextMenuEvent::Mouse, - theEvent->pos(), theEvent->globalPos(), - theEvent->state() ); - if ( getViewWindow() ) - getViewWindow()->contextPopupEvent(&aEvent); // => emit contextMenuRequested( &aEvent ); - } - else - { // show context popup for the selected item - mySelectedItem->showPopup(viewport(), theEvent, aPoint); - } - } - - if ( theEvent->button() == LeftButton && !myMovingDone ) - { - // Selection mechanism - QCanvasItemList aList = canvas()->collisions(aPoint); - - if ( aList.empty() && mySelectedItem ) - { - if ( isSelectedItemInCanvas() ) mySelectedItem->select(aPoint, false); - mySelectedItem = 0; - } - else - { - for (QCanvasItemList::Iterator it = aList.begin(); it != aList.end(); ++it) { - QxGraph_ActiveItem* anActItem = dynamic_cast( *it ); - if (anActItem) - { - anActItem->select(aPoint); - if (anActItem != mySelectedItem) - { - if (mySelectedItem && isSelectedItemInCanvas() && - !mySelectedItem->arePartsOfOtherItem(anActItem)) mySelectedItem->select(aPoint, false); - mySelectedItem = anActItem; - } - break; - } - } - } - } - - myMovingDone = false; -} - -void QxGraph_CanvasView::contentsMouseDoubleClickEvent(QMouseEvent* theEvent) -{ - -} - -bool QxGraph_CanvasView::isSelectedItemInCanvas() -{ - // check if mySelectedItem is included into the canvas: - // if yes => unselect it - // if no => do nothing - bool anIsInCanvas = false; - QCanvasItemList aListC = canvas()->allItems(); - for (QCanvasItemList::Iterator itC = aListC.begin(); itC != aListC.end(); ++itC) { - QxGraph_ActiveItem* anActItemC = dynamic_cast( *itC ); - if ( anActItemC && anActItemC == mySelectedItem ) { - anIsInCanvas = true; - break; - } - } - return anIsInCanvas; -} - -void QxGraph_CanvasView::activateFitAll() -{ - //myOperation = FITALL; - int w = 0, h = 0; - QCanvasItemList l = canvas()->allItems(); - for (QCanvasItemList::Iterator it = l.begin(); it != l.end(); ++it) { - QRect r = (*it)->boundingRect(); - if (w < r.right()) w = r.right(); - if (h < r.bottom()) h = r.bottom(); - } - w += GRAPH_MARGIN; h += GRAPH_MARGIN; - double s = ((double)visibleWidth())/((double)w); - double s1 = ((double)visibleHeight())/((double)h); - if (s > s1) s = s1; - - setContentsPos(0,0); - QWMatrix m; - m.scale(s, s); - setWorldMatrix(m); - - // remember the canvas view's current transformation matrix in all canvas items - QCanvasItemList aList = canvas()->allItems(); - for (QCanvasItemList::Iterator it = aList.begin(); it != aList.end(); ++it) { - QxGraph_ActiveItem* anActItem = dynamic_cast( *it ); - if ( anActItem ) anActItem->setTMatrix(m); - } - - canvas()->update(); - //myOperation = NOTHING; - - emit viewOperationDone(); -} - -void QxGraph_CanvasView::activateFitRect() -{ - myOperation = WINDOWFIT; - viewport()->setMouseTracking(false); - myCursor = cursor(); // save old cursor - QCursor handCursor (Qt::PointingHandCursor); - setCursor(handCursor); -} - -void QxGraph_CanvasView::activateZoom() -{ - myOperation = ZOOMVIEW; - viewport()->setMouseTracking(false); - myCursor = cursor(); // save old cursor - QPixmap zoomPixmap (imageZoomCursor); - QCursor zoomCursor (zoomPixmap); - setCursor(zoomCursor); -} - -void QxGraph_CanvasView::activatePanning() -{ - myOperation = PANVIEW; - viewport()->setMouseTracking(false); - myCursor = cursor(); // save old cursor - QCursor panCursor (Qt::SizeAllCursor); - setCursor(panCursor); -} - -void QxGraph_CanvasView::activateGlobalPanning() -{ - myOperation = PANGLOBAL; - myCursor = cursor(); // save old cursor - QPixmap globalPanPixmap (imageCrossCursor); - QCursor glPanCursor (globalPanPixmap); - setCursor(glPanCursor); -} - -void QxGraph_CanvasView::activateReset() -{ - //myOperation = RESETVIEW; - setContentsPos(0,0); - QWMatrix m; - setWorldMatrix(m); - - // remember the canvas view's current transformation matrix in all canvas items - QCanvasItemList aList = canvas()->allItems(); - for (QCanvasItemList::Iterator it = aList.begin(); it != aList.end(); ++it) { - QxGraph_ActiveItem* anActItem = dynamic_cast( *it ); - if ( anActItem ) anActItem->setTMatrix(m); - } - - //myOperation = NOTHING; - - emit viewOperationDone(); -} - -void QxGraph_CanvasView::onTimeout() -{ - if (myCurrentItem) { - scrollBy(myDX, myDY); - - double cx, cy; - inverseWorldMatrix().map((double)myDX, (double)myDY, &cx, &cy); - if (myCurrentItem->x()+cx < 0) cx = -myCurrentItem->x(); - if (myCurrentItem->y()+cy < 0) cy = -myCurrentItem->y(); - myCurrentItem->moveBy(cx, cy); - myPoint.setX(myPoint.x()+(int)cx); - myPoint.setY(myPoint.y()+(int)cy); - canvas()->update(); - } -} - -QxGraph_ViewWindow* QxGraph_CanvasView::getViewWindow() const -{ - return dynamic_cast( parent() ); -} - -/*! - Shows tooltip if necessary -*/ -void QxGraph_ToolTip::maybeTip(const QPoint& theMousePos) { - QCanvasItemList aList = ((QCanvasView*)parentWidget())->canvas()->collisions(theMousePos); - - for (QCanvasItemList::Iterator it = aList.begin(); it != aList.end(); ++it) { - QxGraph_ActiveItem* anActItem = dynamic_cast( *it ); - if (anActItem) - { - QRect aRect; - QString aText = anActItem->getToolTipText(theMousePos, aRect); - int avX, avY; - QWMatrix aWM = ((QCanvasView*)parentWidget())->worldMatrix(); - ((QCanvasView*)parentWidget())->contentsToViewport((int)(aRect.left()*aWM.m11()), - (int)(aRect.top()*aWM.m22()), - avX, avY); - QRect aTipRect(avX, avY, (int)(aRect.width()*aWM.m11()), (int)(aRect.height()*aWM.m22())); - if (!aText.isEmpty()) - tip(aTipRect, aText); - return; - } - } -} - - - diff --git a/src/QxGraph/QxGraph_CanvasView.h b/src/QxGraph/QxGraph_CanvasView.h deleted file mode 100644 index f0e9a7377..000000000 --- a/src/QxGraph/QxGraph_CanvasView.h +++ /dev/null @@ -1,114 +0,0 @@ -// Copyright (C) 2007-2013 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 QxGraph : build Supervisor viewer into desktop -// -#ifndef QXGRAPH_CANVASVIEW_H -#define QXGRAPH_CANVASVIEW_H - -#include "QxGraph.h" - -#include -#include -#include -#include - -class QxGraph_Canvas; -class QxGraph_ViewWindow; -class QxGraph_ActiveItem; - -class QXGRAPH_EXPORT QxGraph_CanvasView : public QCanvasView { - Q_OBJECT - - public: - enum OperationType{ NOTHING, PANVIEW, ZOOMVIEW, PANGLOBAL, - WINDOWFIT, FITALLVIEW, RESETVIEW }; - - QxGraph_CanvasView(QxGraph_Canvas* theCanvas, QxGraph_ViewWindow* theViewWindow); - virtual ~QxGraph_CanvasView(); - - QxGraph_ViewWindow* getViewWindow() const; - - void activateFitAll(); - void activateFitRect(); - void activateZoom(); - void activatePanning(); - void activateGlobalPanning(); - void activateReset(); - - void itemRemoved( QCanvasItem* ); - - void setSelectedItem( QxGraph_ActiveItem* theItem ); - QxGraph_ActiveItem* getSelectedItem() const; - - signals: - void viewOperationDone(); - - public slots: - void onTimeout(); - //void changeBackground(); - - protected: - void contentsMousePressEvent(QMouseEvent* theEvent); - void contentsMouseMoveEvent(QMouseEvent* theEvent); - void contentsMouseReleaseEvent(QMouseEvent* theEvent); - void contentsMouseDoubleClickEvent(QMouseEvent* theEvent); - - bool isSelectedItemInCanvas(); - - private: - // for moving items - QCanvasItem* myCurrentItem; - QPoint myPoint; - QPoint myGlobalPoint; - bool myMovingDone; - QPoint myCenter; - - // for control toolbar actions - OperationType myOperation; - QCursor myCursor; - QCanvasRectangle* mySelectedRect; - - // for automatic content scrolling if mouse is outside - QTimer* myTimer; - int myDX; - int myDY; - - // for hilight - QxGraph_ActiveItem* myHilightedItem; - - // for selection - QxGraph_ActiveItem* mySelectedItem; -}; - - -class QxGraph_ToolTip: public QToolTip { - - public: - QxGraph_ToolTip(QWidget* theWidget, QToolTipGroup* theGroup = 0): - QToolTip(theWidget, theGroup) {} - ~QxGraph_ToolTip() { remove(parentWidget()); } - - virtual void maybeTip(const QPoint& theMousePos); -}; - -#endif diff --git a/src/QxGraph/QxGraph_Def.h b/src/QxGraph/QxGraph_Def.h deleted file mode 100644 index ce6489675..000000000 --- a/src/QxGraph/QxGraph_Def.h +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (C) 2007-2013 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 QxGraph : build Supervisor viewer into desktop -// -#ifndef QXGRAPH_DEF_H -#define QXGRAPH_DEF_H - -#define DEF_BACK_COLOR QColor(144, 208, 211) -#define RECTANGLE_BODY QColor(255,249,147) - -#define GRAPH_WIDTH 1250 -#define GRAPH_HEIGHT 950 - -#define GRAPH_MARGIN 50 - -#endif diff --git a/src/QxGraph/QxGraph_Prs.cxx b/src/QxGraph/QxGraph_Prs.cxx deleted file mode 100644 index 5189d49fb..000000000 --- a/src/QxGraph/QxGraph_Prs.cxx +++ /dev/null @@ -1,253 +0,0 @@ -// Copyright (C) 2007-2013 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 QxGraph : build Supervisor viewer into desktop -// -#include "QxGraph_Prs.h" - -#include "QxGraph_Canvas.h" -#include "QxGraph_Def.h" // for debug only - -#include "SUIT_Session.h" // for debug only - -/*! - Constructor -*/ -QxGraph_Prs::QxGraph_Prs(QxGraph_Canvas* theCanvas): - myCanvas(theCanvas), - myDMode(0), - needUpdate(true) -{ - myCanvas->addPrs(this); -} - -/*! - Destructor -*/ -QxGraph_Prs::~QxGraph_Prs() -{ - for ( DMode2ItemList::iterator it1 = myDisplayMap.begin(); - it1 != myDisplayMap.end(); - it1++ ) - { - for ( std::list::iterator it2 = (*it1).second.begin(); - it2 != (*it1).second.end(); - it2++ ) - { - QCanvasItem* anItem = *it2; - if ( anItem ) delete anItem; - } - } - - myDisplayMap.clear(); -} - -/*! - Add item to display in the view with index theDMode -*/ -void QxGraph_Prs::addItem(QCanvasItem* theItem, int theDMode) -{ - if ( theDMode == -1 ) // add item for the current display mode - myDisplayMap[myDMode].push_back(theItem); - else - myDisplayMap[theDMode].push_back(theItem); -} - -/*! - Remove item from the view with index theDMode -*/ -void QxGraph_Prs::removeItem(QCanvasItem* theItem, int theDMode) -{ - if ( theDMode == -1 ) // remove item from the current display mode - myDisplayMap[myDMode].remove(theItem); - else - myDisplayMap[theDMode].remove(theItem); -} - -/*! Adds all the items of this presentation for the current display mode - * to the canvas. - */ -void QxGraph_Prs::show() -{ - if ( isToUpdate() ) - update(); - - for ( std::list::iterator it = myDisplayMap[myDMode].begin(); - it != myDisplayMap[myDMode].end(); - it++ ) - { - QCanvasItem* anItem = *it; - if ( anItem ) - { - anItem->setCanvas( myCanvas ); - anItem->show(); - } - } -} - -/*! Removes all the items belonging to this presentation from the canvas. - */ -void QxGraph_Prs::hide() -{ - for ( DMode2ItemList::iterator it1 = myDisplayMap.begin(); - it1 != myDisplayMap.end(); - it1++ ) - { - for ( std::list::iterator it2 = (*it1).second.begin(); - it2 != (*it1).second.end(); - it2++ ) - { - QCanvasItem* anItem = *it2; - if ( anItem ) - { - anItem->setCanvas( 0 ); - } - } - } -} - -/*! Prepare for full recomputation of the presentation - */ -void QxGraph_Prs::setToUpdate( const bool theFlag ) -{ - needUpdate = theFlag; -} - -/*! Re-fills the presentation with items. - * Base implementation just resets flag. - * It should be called at the end by re-implementations. - */ -void QxGraph_Prs::update() -{ - setToUpdate( false ); -} - -/*! - Add a QCanvasRectangle item for display mode DMode -*/ -QCanvasItem* QxGraph_Prs::addRectangleItem(QRect theRect, int theDMode) -{ - QCanvasRectangle* aRectItem; - if ( myCanvas ) - { - QCanvasRectangle* aRectItem = new QCanvasRectangle(theRect, myCanvas); - aRectItem->setZ(0); - aRectItem->show(); - myCanvas->update(); - - // test drawing features: brush, pen ... - QBrush aBr(SUIT_Session::session()->resourceMgr()->colorValue( "QxGraph", "NodeBody", RECTANGLE_BODY )); - aRectItem->setBrush(aBr); - } - addItem(aRectItem); - return aRectItem; -} - -/*! - Add a QCanvasPolygon item for display mode DMode -*/ -QCanvasItem* QxGraph_Prs::addPolygonItem(QPointArray thePA, int theDMode) -{ - QCanvasPolygon* aPolyItem; - if ( myCanvas ) - { - aPolyItem = new QCanvasPolygon(myCanvas); - aPolyItem->setZ(0); - aPolyItem->setPoints(thePA); - aPolyItem->show(); - myCanvas->update(); - - // test drawing features: brush, pen ... - QBrush aBr(SUIT_Session::session()->resourceMgr()->colorValue( "QxGraph", "NodeBody", RECTANGLE_BODY )); - aPolyItem->setBrush(aBr); - QPen aPen(Qt::black,2); - aPolyItem->setPen(aPen); - } - addItem(aPolyItem); - return aPolyItem; -} - -/*! - Add a QCanvasLine item for display mode DMode -*/ -QCanvasItem* QxGraph_Prs::addLineItem(QPoint theStart, QPoint theEnd, int theDMode) -{ - QCanvasLine* aLineItem; - if ( myCanvas ) - { - aLineItem = new QCanvasLine(myCanvas); - aLineItem->setZ(0); - aLineItem->setPoints(theStart.x(), theStart.y(), theEnd.x(), theEnd.y()); - aLineItem->show(); - myCanvas->update(); - - // test drawing features: brush, pen ... - QPen aPen(Qt::black,2); - aLineItem->setPen(aPen); - } - addItem(aLineItem); - return aLineItem; -} - -/*! - Add a QCanvasEllipse item for display mode DMode -*/ -QCanvasItem* QxGraph_Prs::addEllipseItem(int theW, int theH, int theStartAngle, int theAngle, int theDMode) -{ - QCanvasEllipse* aEllipseItem; - if ( myCanvas ) - { - aEllipseItem = new QCanvasEllipse(theW, theH, theStartAngle, theAngle, myCanvas); - aEllipseItem->setZ(0); - aEllipseItem->show(); - myCanvas->update(); - - // test drawing features: brush, pen ... - QBrush aBr(SUIT_Session::session()->resourceMgr()->colorValue( "QxGraph", "NodeBody", RECTANGLE_BODY )); - aEllipseItem->setBrush(aBr); - QPen aPen(Qt::black,2); - aEllipseItem->setPen(aPen); - } - addItem(aEllipseItem); - return aEllipseItem; -} - -/*! - Add a QCanvasText item for display mode DMode -*/ -QCanvasItem* QxGraph_Prs::addTextItem(QString theText, int theDMode) -{ - QCanvasText* aTextItem; - if ( myCanvas ) - { - aTextItem = new QCanvasText(theText, myCanvas); - aTextItem->setZ(0); - aTextItem->show(); - myCanvas->update(); - - // test drawing features: font, color, text flags ... - aTextItem->setColor(Qt::darkBlue); - //aTextItem->setFont(QFont("Times"/*"Helvetica"*/, 14, QFont::Normal, true)); - } - addItem(aTextItem); - return aTextItem; -} diff --git a/src/QxGraph/QxGraph_Prs.h b/src/QxGraph/QxGraph_Prs.h deleted file mode 100644 index 2202dee5d..000000000 --- a/src/QxGraph/QxGraph_Prs.h +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (C) 2007-2013 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 QXGRAPH_PRS_H -#define QXGRAPH_PRS_H - -#include "QxGraph.h" - -#include -#include -#include - -class QxGraph_Canvas; - -class QXGRAPH_EXPORT QxGraph_Prs -{ - public: - QxGraph_Prs(QxGraph_Canvas*); - virtual ~QxGraph_Prs(); - - QxGraph_Canvas* getCanvas() const { return myCanvas; } - - void addItem(QCanvasItem* theItem, int theDMode = -1); - void removeItem(QCanvasItem* theItem, int theDMode = -1); - - /* add items for display mode theDMode - if theDMode is equal to -1 add item for the current (active) display mode */ - QCanvasItem* addRectangleItem(QRect theRect, int theDMode = -1); - QCanvasItem* addPolygonItem(QPointArray thePA, int theDMode = -1); - QCanvasItem* addLineItem(QPoint theStart, QPoint theEnd, int theDMode = -1); - QCanvasItem* addEllipseItem(int theW, int theH, int theStartAngle, int theAngle, int theDMode = -1); - QCanvasItem* addTextItem(QString theText, int theDMode = -1); - - typedef std::map< int, std::list > DMode2ItemList; - - const DMode2ItemList& getDisplayMap() const { return myDisplayMap; } - const std::list& getItems(int theDMode) { return myDisplayMap[theDMode]; } - - void setDMode(int theDMode) { myDMode = theDMode; } - int getDMode() const { return myDMode; } - - virtual void show(); - virtual void hide(); - virtual void setToUpdate( const bool ); - bool isToUpdate() { return needUpdate; } - -protected: - virtual void update(); - -private: - QxGraph_Canvas* myCanvas; - DMode2ItemList myDisplayMap; - - int myDMode; - bool needUpdate; -}; - -#endif diff --git a/src/QxGraph/QxGraph_ViewManager.cxx b/src/QxGraph/QxGraph_ViewManager.cxx deleted file mode 100644 index 46072a8ff..000000000 --- a/src/QxGraph/QxGraph_ViewManager.cxx +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (C) 2007-2013 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 "QxGraph_ViewManager.h" - -/*! - Constructor -*/ -QxGraph_ViewManager::QxGraph_ViewManager( SUIT_Study* theStudy, - SUIT_Desktop* theDesktop, - SUIT_ViewModel* theViewModel ) - : SUIT_ViewManager( theStudy, theDesktop, theViewModel ) -{ -} - -/*! - Destructor -*/ -QxGraph_ViewManager::~QxGraph_ViewManager() -{ -} - -/*! - Sets view name - \param theView - view to assign name -*/ -void QxGraph_ViewManager::setViewName(SUIT_ViewWindow* theView) -{ - int aPos = myViews.find(theView); - theView->setCaption( QString( "QxGraph scene:%1 - viewer:%2" ).arg( myId ).arg(aPos+1)); -} - -/*! - Fills popup menu with custom actions - \param popup - popup menu to be filled with -*/ -void QxGraph_ViewManager::contextMenuPopup( QPopupMenu* thePopup) -{ - SUIT_ViewManager::contextMenuPopup( thePopup ); - // to be implemented -} diff --git a/src/QxGraph/QxGraph_ViewManager.h b/src/QxGraph/QxGraph_ViewManager.h deleted file mode 100644 index b7e07afd6..000000000 --- a/src/QxGraph/QxGraph_ViewManager.h +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (C) 2007-2013 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 QXGRAPH_VIEWMANAGER_H -#define QXGRAPH_VIEWMANAGER_H - -#include "QxGraph.h" - -#include "QxGraph_ViewModel.h" -#include "SUIT_ViewManager.h" - -class SUIT_Desktop; - -class QXGRAPH_EXPORT QxGraph_ViewManager : public SUIT_ViewManager -{ - Q_OBJECT - -public: - QxGraph_ViewManager( SUIT_Study* theStudy, SUIT_Desktop* theDesktop, SUIT_ViewModel* theViewModel = 0 ); - ~QxGraph_ViewManager(); - - virtual void contextMenuPopup( QPopupMenu* thePopup ); - -protected: - void setViewName(SUIT_ViewWindow* theView); - -}; - -#endif diff --git a/src/QxGraph/QxGraph_ViewModel.cxx b/src/QxGraph/QxGraph_ViewModel.cxx deleted file mode 100644 index 92a5d8dd6..000000000 --- a/src/QxGraph/QxGraph_ViewModel.cxx +++ /dev/null @@ -1,161 +0,0 @@ -// Copyright (C) 2007-2013 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 "QxGraph_ViewModel.h" -#include "QxGraph_ViewWindow.h" -#include "QxGraph_Canvas.h" -#include "QxGraph_CanvasView.h" -#include "QxGraph_Def.h" -#include "QxGraph_Prs.h" - -#include "SUIT_Desktop.h" -#include "SUIT_ViewWindow.h" -#include "SUIT_Session.h" - -#include -#include -#include // for addRectangleItem(...) method (can be removed in the future) - -/*! - Constructor -*/ -QxGraph_Viewer::QxGraph_Viewer() - :SUIT_ViewModel(), - myCanvas(0), - myCurrentView(0) -{ - printf("Construct QxGraph_Viewer\n"); - //myCanvases.setAutoDelete(true); - //myCanvasViews.setAutoDelete(true); -} - -/*! - Destructor -*/ -QxGraph_Viewer::~QxGraph_Viewer() -{ - if ( myCanvas ) delete myCanvas; - //if ( !myCanvases.isEmpty() ) myCanvases.clear(); - if ( !myCanvasViews.isEmpty() ) myCanvasViews.clear(); - myCurrentView = 0; -} - -/*! - Start initialization of view window - \param view - view window to be initialized -*/ -void QxGraph_Viewer::initView( QxGraph_ViewWindow* view ) -{ - if ( view ) - { - view->initLayout(); - - /* - // test add items into the current canvas view - QRect aRect(100,200,200,100); - QCanvasItem* aRectItem = aPrs->addRectangleItem(aRect); - //delete aRectItem; - - QPointArray aPA(6); - aPA.putPoints(0, 6, 400,100, 500,70, 600,100, 600,200, 500,230, 400,200); - QCanvasItem* aPolyItem = aPrs->addPolygonItem(aPA); - //delete aPolyItem; - - QPoint aStart(500,300), aEnd(700,250); - QCanvasItem* aLineItem = aPrs->addLineItem(aStart, aEnd); - //delete aLineItem; - - QCanvasItem* aEllipseItem = aPrs->addEllipseItem(200, 100, 30*16, 120*16); - aEllipseItem->setX(400); - aEllipseItem->setY(400); - //delete aEllipseItem; - - QCanvasItem* aTextItem = aPrs->addTextItem("This is a QCanvasText item"); - aTextItem->setX(100); - aTextItem->setY(500); - //delete aTextItem; - */ - } -} - -/*! - Creates new view window - \param theDesktop - main window of application -*/ -SUIT_ViewWindow* QxGraph_Viewer::createView(SUIT_Desktop* theDesktop) -{ - QxGraph_ViewWindow* aRes = new QxGraph_ViewWindow( theDesktop, this ); - initView( aRes ); - return aRes; -} - -/*! - Set view with index theIndex from myCanvasViews as current view - \param theIndex - the index of the view in the list -*/ -void QxGraph_Viewer::setCurrentView(int theIndex) -{ - if ( theIndex >= 0 && theIndex < myCanvasViews.count() ) - { - myCurrentView = myCanvasViews.at(theIndex); - myViewManager->getActiveView()->setCentralWidget(myCurrentView); - } -} - -/*! - Builds popup for QxGraph viewer -*/ -void QxGraph_Viewer::contextMenuPopup(QPopupMenu* thePopup) -{ - printf("QxGraph_Viewer::contextMenuPopup\n"); - thePopup->insertItem( tr( "MEN_CHANGE_BACKGROUND" ), this, SLOT( onChangeBgColor() ) ); - - thePopup->insertSeparator(); - - QxGraph_ViewWindow* aView = (QxGraph_ViewWindow*)(myViewManager->getActiveView()); - if ( aView && !aView->getToolBar()->isVisible() ) - thePopup->insertItem( tr( "MEN_SHOW_TOOLBAR" ), this, SLOT( onShowToolbar() ) ); -} - -/*! - SLOT: called if background color is to be changed changed, passes new color to current canvas view -*/ -void QxGraph_Viewer::onChangeBgColor() -{ - QxGraph_ViewWindow* aView = (QxGraph_ViewWindow*)(myViewManager->getActiveView()); - if( !aView ) - return; - QColor aColorActive = aView->backgroundColor(); - - QColor selColor = QColorDialog::getColor( aColorActive, aView); - if ( selColor.isValid() ) - aView->setBackgroundColor(selColor); -} - -/*! - SLOT: called when popup item "Show toolbar" is activated, shows toolbar of active view window -*/ -void QxGraph_Viewer::onShowToolbar() { - QxGraph_ViewWindow* aView = (QxGraph_ViewWindow*)(myViewManager->getActiveView()); - if ( aView ) - aView->getToolBar()->show(); -} diff --git a/src/QxGraph/QxGraph_ViewModel.h b/src/QxGraph/QxGraph_ViewModel.h deleted file mode 100644 index 6d52b1bd5..000000000 --- a/src/QxGraph/QxGraph_ViewModel.h +++ /dev/null @@ -1,86 +0,0 @@ -// Copyright (C) 2007-2013 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 QXGRAPH_VIEWMODEL_H -#define QXGRAPH_VIEWMODEL_H - -#include "QxGraph.h" - -#include "SUIT_ViewModel.h" - -class QCanvasItem; // for addRectangleItem(...) method (can be removed in the future) - -class QxGraph_Canvas; -class QxGraph_CanvasView; -class QxGraph_ViewWindow; -class QxGraph_Prs; - -class QXGRAPH_EXPORT QxGraph_Viewer: public SUIT_ViewModel -{ - Q_OBJECT - - public: - static QString Type() { return "QxGraphViewer"; } - - QxGraph_Viewer(); - virtual ~QxGraph_Viewer(); - - virtual SUIT_ViewWindow* createView(SUIT_Desktop* theDesktop); - virtual QString getType() const { return Type(); } - - virtual void contextMenuPopup(QPopupMenu*); - - QxGraph_Canvas* getCanvas() const { return myCanvas; } - void setCanvas(QxGraph_Canvas* theCanvas) { myCanvas = theCanvas; } - //QPtrList getCanvases() { return myCanvases; } - //void setCanvases(QPtrList theCanvases) { myCanvases = theCanvases; } - - //void addCanvas(QxGraph_Canvas* theCanvas) { myCanvases.append(theCanvas); } - //void removeCanvas(QxGraph_Canvas* theCanvas) { myCanvases.remove(theCanvas); } - - QPtrList getCanvasViews() { return myCanvasViews; } - void setCanvasViews(QPtrList theViews) { myCanvasViews = theViews; } - - void addView(QxGraph_CanvasView* theView) { myCanvasViews.append(theView); } - void removeView(QxGraph_CanvasView* theView) { myCanvasViews.remove(theView); } - - QxGraph_CanvasView* getCurrentView() const { return myCurrentView; } - void setCurrentView(QxGraph_CanvasView* theView) { myCurrentView = theView; } - void setCurrentView(int theIndex); - - protected: - void initView(QxGraph_ViewWindow* view); - - protected slots: - void onShowToolbar(); - void onChangeBgColor(); - - private: - QxGraph_Canvas* myCanvas; - //QPtrList myCanvases; - QPtrList myCanvasViews; - - QxGraph_CanvasView* myCurrentView; - -}; - -#endif diff --git a/src/QxGraph/QxGraph_ViewWindow.cxx b/src/QxGraph/QxGraph_ViewWindow.cxx deleted file mode 100644 index 0f9ece52d..000000000 --- a/src/QxGraph/QxGraph_ViewWindow.cxx +++ /dev/null @@ -1,287 +0,0 @@ -// Copyright (C) 2007-2013 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 QxGraph : build Supervisor viewer into desktop -// -#include "QxGraph_ViewWindow.h" -#include "QxGraph_Def.h" -#include "QxGraph_Canvas.h" -#include "QxGraph_CanvasView.h" - -#include -#include -#include - -//QT Include -#include -#include - -/*! - Constructor -*/ -QxGraph_ViewWindow::QxGraph_ViewWindow( SUIT_Desktop* theDesktop, QxGraph_Viewer* theModel) - : SUIT_ViewWindow( theDesktop ) -{ - printf("Construct QxGraph_ViewWindow\n"); - myViewModel = theModel; -} - -/*! - Initialization -*/ -void QxGraph_ViewWindow::initLayout() -{ - initCanvas(); - initCanvasViews(); - - myToolBar = new QToolBar(this); - myToolBar->setCloseMode(QDockWindow::Undocked); - myToolBar->setLabel(tr("LBL_TOOLBAR_LABEL")); - createActions(); - createToolBar(); -} - -/*! - Canvas initialization -*/ -void QxGraph_ViewWindow::initCanvas() -{ - if ( myViewModel ) - myViewModel->setCanvas( new QxGraph_Canvas(resMgr()) ); - //myViewModel->addCanvas( new QxGraph_Canvas(resMgr()) ); -} - -/*! - Canvas views initialization -*/ -void QxGraph_ViewWindow::initCanvasViews() -{ - if ( myViewModel ) - { - for (int i = 0; i < 2; i++) - { - //QxGraph_Canvas* aCanvas = new QxGraph_Canvas(resMgr()); - //myViewModel->addCanvas( aCanvas ); - - QxGraph_CanvasView* aCanvasView = new QxGraph_CanvasView( myViewModel->getCanvas(), this ); - //QxGraph_CanvasView* aCanvasView = new QxGraph_CanvasView( aCanvas, this ); - myViewModel->addView(aCanvasView); - - aCanvasView->hide(); - } - - // the first view is shown and is the current - myViewModel->getCanvasViews().first()->show(); - myViewModel->setCurrentView( myViewModel->getCanvasViews().first() ); - - /* test for 1 view --> - QxGraph_CanvasView* aCanvasView = new QxGraph_CanvasView( myViewModel->getCanvas(), this ); - myViewModel->addView(aCanvasView); - myViewModel->setCurrentView(aCanvasView); - test for 1 view <-- */ - - setCentralWidget( myViewModel->getCurrentView() ); - - /*if ( inherits( "QMainWindow" ) ) { - printf("== > 1\n"); - ( ( QMainWindow* )this )->setCentralWidget( myViewModel->getCurrentView() ); - } - else { - printf("== > 2\n"); - QBoxLayout* layout = new QVBoxLayout( this ); - layout->addWidget( myViewModel->getCurrentView() ); - }*/ - } -} - -/*! - Creates actions of QxGraph view window -*/ -void QxGraph_ViewWindow::createActions() -{ - if (!myActionsMap.isEmpty()) return; - SUIT_ResourceMgr* aResMgr = resMgr(); - QtxAction* aAction; - - // FitAll - aAction = new QtxAction(tr("MNU_FITALL"), aResMgr->loadPixmap( "QxGraph", tr( "ICON_QXGRAPH_FITALL" ) ), - tr( "MNU_FITALL" ), 0, this); - aAction->setStatusTip(tr("DSC_FITALL")); - connect(aAction, SIGNAL(activated()), this, SLOT(onViewFitAll())); - myActionsMap[ FitAllId ] = aAction; - - // FitRect - aAction = new QtxAction(tr("MNU_FITRECT"), aResMgr->loadPixmap( "QxGraph", tr( "ICON_QXGRAPH_FITAREA" ) ), - tr( "MNU_FITRECT" ), 0, this); - aAction->setStatusTip(tr("DSC_FITRECT")); - connect(aAction, SIGNAL(activated()), this, SLOT(onViewFitArea())); - myActionsMap[ FitRectId ] = aAction; - - // Zoom - aAction = new QtxAction(tr("MNU_ZOOM_VIEW"), aResMgr->loadPixmap( "QxGraph", tr( "ICON_QXGRAPH_ZOOM" ) ), - tr( "MNU_ZOOM_VIEW" ), 0, this); - aAction->setStatusTip(tr("DSC_ZOOM_VIEW")); - connect(aAction, SIGNAL(activated()), this, SLOT(onViewZoom())); - myActionsMap[ ZoomId ] = aAction; - - // Panning - aAction = new QtxAction(tr("MNU_PAN_VIEW"), aResMgr->loadPixmap( "QxGraph", tr( "ICON_QXGRAPH_PAN" ) ), - tr( "MNU_PAN_VIEW" ), 0, this); - aAction->setStatusTip(tr("DSC_PAN_VIEW")); - connect(aAction, SIGNAL(activated()), this, SLOT(onViewPan())); - myActionsMap[ PanId ] = aAction; - - // Global Panning - aAction = new QtxAction(tr("MNU_GLOBALPAN_VIEW"), aResMgr->loadPixmap( "QxGraph", tr( "ICON_QXGRAPH_GLOBALPAN" ) ), - tr( "MNU_GLOBALPAN_VIEW" ), 0, this); - aAction->setStatusTip(tr("DSC_GLOBALPAN_VIEW")); - connect(aAction, SIGNAL(activated()), this, SLOT(onViewGlobalPan())); - myActionsMap[ GlobalPanId ] = aAction; - - // Reset - aAction = new QtxAction(tr("MNU_RESET_VIEW"), aResMgr->loadPixmap( "QxGraph", tr( "ICON_QXGRAPH_RESET" ) ), - tr( "MNU_RESET_VIEW" ), 0, this); - aAction->setStatusTip(tr("DSC_RESET_VIEW")); - connect(aAction, SIGNAL(activated()), this, SLOT(onViewReset())); - myActionsMap[ ResetId ] = aAction; -} - -/*! - Creates toolbar of QxGraph view window -*/ -void QxGraph_ViewWindow::createToolBar() -{ - SUIT_ToolButton* aScaleBtn = new SUIT_ToolButton(myToolBar, "scale"); - aScaleBtn->AddAction(myActionsMap[FitAllId]); - aScaleBtn->AddAction(myActionsMap[FitRectId]); - aScaleBtn->AddAction(myActionsMap[ZoomId]); - - SUIT_ToolButton* aPanningBtn = new SUIT_ToolButton(myToolBar, "pan"); - aPanningBtn->AddAction(myActionsMap[PanId]); - aPanningBtn->AddAction(myActionsMap[GlobalPanId]); - - myActionsMap[ResetId]->addTo(myToolBar); -} - -/*! - Destructor -*/ -QxGraph_ViewWindow::~QxGraph_ViewWindow() {} - -/*! - Reset the active view -*/ -void QxGraph_ViewWindow::onViewReset() -{ - printf( "QxGraph_ViewWindow::onViewReset\n" ); - if ( myViewModel && myViewModel->getCurrentView() ) - myViewModel->getCurrentView()->activateReset(); -} - -/*! - Sets a new center of the active view -*/ -void QxGraph_ViewWindow::onViewGlobalPan() -{ - printf( "QxGraph_ViewWindow::onViewGlobalPan\n" ); - if ( myViewModel && myViewModel->getCurrentView() ) - myViewModel->getCurrentView()->activateGlobalPanning(); -} - -/*! - Zooms the active view -*/ -void QxGraph_ViewWindow::onViewZoom() -{ - printf( "QxGraph_ViewWindow::onViewZoom\n" ); - if ( myViewModel && myViewModel->getCurrentView() ) - myViewModel->getCurrentView()->activateZoom(); -} - -/*! - Moves the active view -*/ -void QxGraph_ViewWindow::onViewPan() -{ - printf( "QxGraph_ViewWindow::onViewPan\n" ); - if ( myViewModel && myViewModel->getCurrentView() ) - myViewModel->getCurrentView()->activatePanning(); -} - -/*! - Fits all obejcts within a rectangular area of the active view -*/ -void QxGraph_ViewWindow::onViewFitArea() -{ - printf( "QxGraph_ViewWindow::onViewFitArea\n" ); - if ( myViewModel && myViewModel->getCurrentView() ) - myViewModel->getCurrentView()->activateFitRect(); -} - -/*! - Fits all objects in the active view -*/ -void QxGraph_ViewWindow::onViewFitAll() -{ - printf( "QxGraph_ViewWindow::onViewFitAll\n" ); - if ( myViewModel && myViewModel->getCurrentView() ) - myViewModel->getCurrentView()->activateFitAll(); -} - -/*! - Set background of the viewport -*/ -void QxGraph_ViewWindow::setBackgroundColor( const QColor& color ) -{ - if ( myViewModel && myViewModel->getCurrentView()) { - myViewModel->getCurrentView()->canvas()->setBackgroundColor(color); - myViewModel->getCurrentView()->setPaletteBackgroundColor(color.light(120)); - } -} - -/*! - Returns background of the viewport -*/ -QColor QxGraph_ViewWindow::backgroundColor() const -{ - if ( myViewModel && myViewModel->getCurrentView()) - return myViewModel->getCurrentView()->canvas()->backgroundColor(); - return QColor(); -} - -/*! - Custom resize event handler -*/ -void QxGraph_ViewWindow::resizeEvent( QResizeEvent* theEvent ) -{ - // QMainWindow::resizeEvent( theEvent ); - //if ( myView ) myView->resizeView( theEvent ); -} - -/*! - Get resource manager -*/ -SUIT_ResourceMgr* QxGraph_ViewWindow::resMgr() const -{ - return SUIT_Session::session()->resourceMgr(); -} - diff --git a/src/QxGraph/QxGraph_ViewWindow.h b/src/QxGraph/QxGraph_ViewWindow.h deleted file mode 100644 index 6a0a16f2b..000000000 --- a/src/QxGraph/QxGraph_ViewWindow.h +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright (C) 2007-2013 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 QxGraph : build Supervisor viewer into desktop -// -#ifndef QXGRAPH_VIEWWINDOW_H -#define QXGRAPH_VIEWWINDOW_H - -#include "QxGraph.h" -#include "QxGraph_ViewModel.h" - -#include "SUIT_ViewWindow.h" - -#include "QtxAction.h" - -#include - -#ifdef WIN32 -#pragma warning ( disable:4251 ) -#endif - -class SUIT_ResourceMgr; - -class QXGRAPH_EXPORT QxGraph_ViewWindow : public SUIT_ViewWindow { - Q_OBJECT - - public: - QxGraph_ViewWindow(SUIT_Desktop* theDesktop, QxGraph_Viewer* theModel); - virtual ~QxGraph_ViewWindow(); - - void setBackgroundColor( const QColor& ); - QColor backgroundColor() const; - - QToolBar* getToolBar() { return myToolBar; } - - SUIT_ResourceMgr* resMgr() const; - - QxGraph_Viewer* getViewModel() const { return myViewModel; } - void setViewModel(QxGraph_Viewer* theViewModel) { myViewModel = theViewModel; } - - virtual void initLayout(); - - void contextPopupEvent(QContextMenuEvent* theEvent) { emit contextMenuRequested( theEvent); } - - public slots: - void onViewFitAll(); - void onViewFitArea(); - void onViewZoom(); - void onViewPan(); - void onViewGlobalPan(); - void onViewReset(); - - protected: - void resizeEvent( QResizeEvent* theEvent ); - - virtual void initCanvas(); - virtual void initCanvasViews(); - - private: - void createActions(); - void createToolBar(); - - //! Actions ID - enum { FitAllId, FitRectId, ZoomId, PanId, GlobalPanId, ResetId }; - typedef QMap ActionsMap; - - ActionsMap myActionsMap; - QToolBar* myToolBar; - - QxGraph_Viewer* myViewModel; - -}; - -#ifdef WIN32 -#pragma warning ( default:4251 ) -#endif - -#endif diff --git a/src/QxGraph/resources/QxGraph_images.ts b/src/QxGraph/resources/QxGraph_images.ts deleted file mode 100644 index b2b6b360e..000000000 --- a/src/QxGraph/resources/QxGraph_images.ts +++ /dev/null @@ -1,31 +0,0 @@ - - - - - @default - - ICON_QXGRAPH_RESET - qx_view_reset.png - - - ICON_QXGRAPH_ZOOM - qx_view_zoom.png - - - ICON_QXGRAPH_GLOBALPAN - qx_view_glpan.png - - - ICON_QXGRAPH_PAN - qx_view_pan.png - - - ICON_QXGRAPH_FITALL - qx_view_fitall.png - - - ICON_QXGRAPH_FITAREA - qx_view_fitarea.png - - - diff --git a/src/QxGraph/resources/QxGraph_msg_en.ts b/src/QxGraph/resources/QxGraph_msg_en.ts deleted file mode 100644 index 08f6833f9..000000000 --- a/src/QxGraph/resources/QxGraph_msg_en.ts +++ /dev/null @@ -1,31 +0,0 @@ - - - - - @default - - MEN_CHANGE_BACKGROUND - Change Background... - - - MNU_PAN_VIEW - Panning - - - DSC_PAN_VIEW - Panning the view - - - MNU_RESET_VIEW - Reset - - - DSC_RESET_VIEW - Reset View Point - - - LBL_TOOLBAR_LABEL - View Operations - - - diff --git a/src/QxGraph/resources/QxGraph_msg_fr.ts b/src/QxGraph/resources/QxGraph_msg_fr.ts deleted file mode 100755 index c03cdeb51..000000000 --- a/src/QxGraph/resources/QxGraph_msg_fr.ts +++ /dev/null @@ -1,31 +0,0 @@ - - - - - @default - - MEN_CHANGE_BACKGROUND - Changer l'arrière-plan... - - - MNU_PAN_VIEW - Déplacement - - - DSC_PAN_VIEW - Déplacer la vue - - - MNU_RESET_VIEW - Restaurer - - - DSC_RESET_VIEW - Restaurer le point de vue - - - LBL_TOOLBAR_LABEL - Opérations de Visualisation - - - diff --git a/src/QxGraph/resources/QxGraph_msg_ja.ts b/src/QxGraph/resources/QxGraph_msg_ja.ts deleted file mode 100644 index 3d48a27a2..000000000 --- a/src/QxGraph/resources/QxGraph_msg_ja.ts +++ /dev/null @@ -1,31 +0,0 @@ - - - - - @default - - MEN_CHANGE_BACKGROUND - 背景の変更. - - - MNU_PAN_VIEW - パン - - - DSC_PAN_VIEW - パン表示] - - - MNU_RESET_VIEW - リセット - - - DSC_RESET_VIEW - リセット ビュー ポイント - - - LBL_TOOLBAR_LABEL - [操作の表示 - - - diff --git a/src/QxGraph/resources/qx_view_fitall.png b/src/QxGraph/resources/qx_view_fitall.png deleted file mode 100755 index 87e001dd80b2755858d4599857106a0c9c0b3500..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 816 zcmV-01JC@4P)z@;j(q!3lK=n!AY({UO#lFTB>(_`g8%^e{{R4h=>PzA zFaQARU;qF*m;eA5Z<1fdMgRZ;rb$FWRCwBA{Qv(y12q9a0I`6G?+lD6rgAd;XCy{5 zHhlmA#Dc^@mIHB63}s|w3&>x^7VEp$V z!_S{T8NPo0%wTSB4^{^=10aA{2t*_sGYc!&H9+&gF8uxbH^cX@Ux5bxVEFUvH&_hp zNhkmaASMC^p1OMBJi~90i+=rL`10u!!-sco89u&$$ME^%M~1IozA)UpbP22urU4*; z81W@+U>Ndq^YVU}wt5|dps+B*k8j@@e*E~(@bkwHhQELQGJN^`k)bg^7i72+(46}q zJpciO*M(YIT7fc>k_-*mnGENS9|s!*!oPv8y?^^ALw|iO$gn1uVITkyKn&QD3J3!Y zt1#5l`yc4!^j}9?`#%#C(;-P2+5cJwhW{mHWkKFL1H{Sb`Tzn5YousvYge$bu(Yd+ zi!(g^@BtL?iGTn8T>uOM_2*9>%K?=<1!}&AO)o$IVT2*juu`C5U1~tXo&y8^?Uyf= zSFc{}AhvJ-2p}dj!}3{~naMT`1ONgE>_SkfVWO=i2{i0E$eXW$2^NUUfQEGwYY@l` zP;LPTAh-*gnwp;TadI-eff!amiebp56hHvMT?i_^fL=}k3i1H)bfAI1NHGa!20#G8 u4Wv>5%K#8S$g%vNP}zvfo5&o100RIgKz|e1YHVKs0000aa diff --git a/src/QxGraph/resources/qx_view_fitarea.png b/src/QxGraph/resources/qx_view_fitarea.png deleted file mode 100755 index 450dc56c6ce722c040b4e5b77459207e8256cd58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 912 zcmV;B18@9^P)z@;j(q!3lK=n!AY({UO#lFTB>(_`g8%^e{{R4h=>PzA zFaQARU;qF*m;eA5Z<1fdMgRZ<21!IgRCwBA`2YVu0|yT@j4)mLY4&S1Wi z-OcbHM57sG48)m^9-he_0f7usvT_X1pFT0(yLC(8&W#(k0Oh^{@n4u?fB<44!Y5g^ z-MvYH5s?faC;S8YMon9X!N%2{!P42~V^d*1!@s|O;pPAY5EB8zLY%$4ll;RYzy^Ww zzyAz>|Nmq7`|lrvqn8hZdq5CKT`^1pKmZXkFx1h@8)yK~5THSSfQEqa-+v50fBt0n z`uQ`1xxGC|T`bJU00BhE%bd(CtYFsw%>%pe_wU~f-@kqZ8u)|Z&#&KLF(43ts^eU0F)F)_Iu>vs%)X>*Rt^|Sq00D$yAS*L-7tFAGPoM68`t<2NpzvEDJ`2PkgPEZQ zf?W3=>e4ST{Qv>Pgyb@bC5sj@fV}w<7@K#WJlO{{>@HC171XfPKztRHl%RYNeIJNF z01K4gATvM(3qSzDi!W_$?G#}ip4rTdj11l(AtV=F=_OOZ1q?s{!3|_&WMorRR4o7X z>z4u0Wlx|ky9mWEfcQ5q!$2+r83v*O0tneaP`Ky0YCsD8wiRZ mF(6igmT$M9kwFpw2rvMsC6+#;$I7?>0000P)z@;j(q!3lK=n!AY({UO#lFTB>(_`g8%^e{{R4h=>PzA zFaQARU;qF*m;eA5Z<1fdMgRZc>jKeOv$OzL15I`)*h9FA-UC3*1Z~uwm?OTSQ4<0bQ ze(?e}13&j7BtjOg8oBY{u_wj195)S?b{&f6+rwNh(Uq* zK0ZGF9!TB4fBzVey$%pSph#d!NlE$3!NI}s_3KxL7r?*=#V#=XRDg2aKr9Qy%0Mg# zwcu`6R@RnZzkY$$K7Ra|;oiM_44*%L1}7(g00Oy$^}~k`3@Z!_7=WS-7i47_^npo& z_1d*NKskL-Yy$BYAm#zl;o;#2riOWv!1Q5tTw%b52J!EBN z_zMj9Ye2(a0MpVAL405VabQDXA%mWt-g{_beh*a#GW3?PurN#?D4ah51P}|7@?T7UooaWF76FUtY(e=N8Ih<%~* zEa-Xx0ti>}^$+SLM<6zX=4AnBQUWFN&ro@cDgYqB0GrW?VpB4t`v3p{07*qoM6N<$ Eg6tg6&Hw-a diff --git a/src/QxGraph/resources/qx_view_pan.png b/src/QxGraph/resources/qx_view_pan.png deleted file mode 100755 index ec56cacc779342a978f183ecf747860c8b6dafb4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 982 zcmV;{11bE8P)z@;j(q!3lK=n!AY({UO#lFTB>(_`g8%^e{{R4h=>PzA zFaQARU;qF*m;eA5Z<1fdMgRZb!otG-18H_3W&!c>DFz52f`;Yh z=KlYG@Zf(vJw1@2;y}!e&rpB>!e<*(Vq)UoNnv3OZ?0TnIIE=v5_imOsnQ(>_Q@}D9Q|HpzmfY=u#@9*!A5&HlE#0WDiKR^HPSD@Ek zzkbaCa@oa;7a4y4{_O{p(+6UCAm#(&Px|`$DQaqJ3~X#{4Da5(V|e)RA;Yz6*FdiR z0t!=r00NsF6BF}yLQoI`!>?Zq4Bx&nFns>Zz!(z)vWNqS-$A_va>-9lVB{=URRycP zpsdWG&(6-kdhOZ^SVRE?5Q~nE&fmqMp$spM9AUWs@+E@^Q1mI#KqwFe;@8la1=_~I z2J*$jJ9ilVe*DOA?ZXF#7k~dU%-7RnNW63j9QyzP#B$}z6$wUv{}&HSOBrrFdBPyW z&(HAr=TDe{d{D#gLnA=o6)=Lf|NhPJ2I#_XKyN<>8oU@7aj@722p~`x$^o%15O2W} zQ4K(R5QwirT?%sXD=g|(05K?CodF0SP#A)o^9gFhL?B)Zjj^{zMn(Vgg6j zxpU_jK79D#4wN$jVr3vsfvN|&{yoSXfB<5F#?CWnLd}P!GmwE_`1tr3R)vHxJUVoU z;RMiI;U7Ty82F(McnHLu(3}E_l-nS400M{wntfhCo&E)yX#avZ-#{@A45MF<9x;Hz z4lSY{BV~fOP)EH02p|@y4KPE$Kyv_tjEu~^`}glN965WI;l_&>3~!m4VFpeGVn3)0 zVaeeeEFA&_5G?D#4E+fW52hzio+tt7dm^Ah;l~e#JMZ4X4D5u`pP`QU2lWw%{s$01 zxUwNTH0uR`vRkc+3M|{L0pd2OxFS>?3IGToW*i2Bk`pV``xg$qd*=yF8X#vr0J$9M zy07T20tg^xJOwPwRUpGpK{Y>y#^wX4;lH73-~b@N0A_|Q{Wj4Xb^rhX07*qoM6N<$ Ef)-GsSpWb4 diff --git a/src/QxGraph/resources/qx_view_reset.png b/src/QxGraph/resources/qx_view_reset.png deleted file mode 100755 index 66f81e60471b7b587c37166a4e206b45f74e7fc2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 918 zcmV;H18Mw;P)z@;j(q!3lK=n!AY({UO#lFTB>(_`g8%^e{{R4h=>PzA zFaQARU;qF*m;eA5Z<1fdMgRZ<3`s;mRCwBA`2YVu0}KO!sHi9>h~bSaP6`GHAOZXQ009Iu ztVK?a_y6WCKL3CH$@>5IfA;^Iw`2aBnTdlW&7exTp@zi+u{AD30Ro7Lk&#hUNQk5Q z?D;STpjR1~nHj+nii&(-KGfwPzyqZXfLH~Ij{*P!hzW=@vvYJAfQEtvwrzdL@b~Y3 zhTx#>3=Q?CrT~SeL)CtP(l4O+3pN7*0*D2Ojg5^(!JOKflMHLu++jF%N|j;rru$QX z!I2B}0Zi>zGy}h4GY}wvKrZ|XauEp3n0^K5WhREsj&mSx69e%89{T_R1ajfcn>Rmz zIq%;60AXz)^A6B;zi?=K-}sfC-?tzTH62r z+1dZM`}+RpVPyp=a)o&VAb=Q=3jlDg;ox}n@#jy5zyJSR0p*SZ#Xz=e0L9NFXlO8m zC@V8qN=Sg!-~8}_;lk_J40EqvXW0Gtu^UimH$VWPmo_{g8)rH={0C|R3ET$aE+9^W z#_sAO0|T(@KsZfX8>D6hvI_wMh!MSr0=mcm=$i9OU0oSe`1u*u-@C_f=i^5PHYO$p zdueHgKqVyxW?=4l`t>V=_OfLRAAkK40Gja;rXL`H7_pRjAVWa`o#`Ya<56K`#Na9` ziz0vj(z@;j(q!3lK=n!AY({UO#lFTB>(_`g8%^e{{R4h=>PzA zFaQARU;qF*m;eA5Z<1fdMgRZ;lSxEDRCwBA{Qv(y12q9a05LI882|(j3yAp6z=+{Y zPKN)C$b3dd#y}ty1;mO#{0NBG0DZR%T^~RIu^?$iH}pTm97baxo$2V|nd}h|$RH&v z$MF2=6XU&Gw*&&^{D5-Pfd(IhX#xl!22dE{!$2^nw!8QLxyR4`p9SL6kDmTN`QXX_ zWA`8bZ*#;G5q}bli};<&kW}F_F#1|4FCbe zLcl;aW)@bkYk=l~UHJR=Z-(z*zXA>X!SLtTZ?G6R8lV6mfC#zp)YS{;8GeIY^y?SH zmrtJL&@bUdShR+{AGJO5=h2iF{4FCbeh%aFS!;qhwm-oZ8)$14pg@qY@ zeEZJuHQCMa{8~Mt^J>giRqA}jO>3c z1H=E4va%p=odM!xbbSB;gf&vMwY4kQSXkOs#l;z(e)s?i_{6_||1JOqf%@|&kL7?$ zo&q&r!=@J?fH1-kXjm!Gur4*AVb6g9|Mtt5%Bxqec3{&C%ChKL6d-_@&RKiH#D= b009O7QZ{F9XF19?00000NkvXXu0mjfwM|pG diff --git a/src/QxScene/CMakeLists.txt b/src/QxScene/CMakeLists.txt index 214a180dd..2f9472849 100755 --- a/src/QxScene/CMakeLists.txt +++ b/src/QxScene/CMakeLists.txt @@ -19,54 +19,81 @@ INCLUDE(UseQt4Ext) +# --- options --- + +# additional include directories INCLUDE_DIRECTORIES( - ${CAS_INCLUDE_DIRS} ${QT_INCLUDES} - ${Boost_INCLUDE_DIRS} - ${PYTHON_INCLUDE_DIRS} - ${KERNEL_INCLUDE_DIRS} - ${CMAKE_CURRENT_SOURCE_DIR}/../Qtx - ${CMAKE_CURRENT_SOURCE_DIR}/../SUIT + ${PROJECT_SOURCE_DIR}/src/Qtx + ${PROJECT_SOURCE_DIR}/src/SUIT ) -SET(COMMON_LIBS ${QT_LIBRARIES} suit) +# additional preprocessor / compiler flags +ADD_DEFINITIONS(${QT_DEFINITIONS}) -SET(GUI_HEADERS - QxScene_ViewWindow.h +# libraries to link to +SET(_link_LIBRARIES ${QT_LIBRARIES} qtx suit) + +# --- headers --- + +# header files / to be processed by moc +SET(_moc_HEADERS QxScene_ViewManager.h QxScene_ViewModel.h + QxScene_ViewWindow.h ) -QT4_WRAP_CPP(GUI_HEADERS_MOC ${GUI_HEADERS}) -SET(QxScene_SOURCES - QxScene_ViewWindow.cxx - QxScene_ViewManager.cxx - QxScene_ViewModel.cxx +# header files / no moc processing +SET(_other_HEADERS + QxScene.h + QxScene_Def.h ) -SET(GUITS_SOURCES +# header files / to install +SET(QxScene_HEADERS ${_moc_HEADERS} ${_other_HEADERS}) + +# --- resources --- + +# resource files / to be processed by lrelease +SET(_ts_RESOURCES resources/QxSceneViewer_images.ts resources/QxSceneViewer_msg_en.ts resources/QxSceneViewer_msg_fr.ts resources/QxSceneViewer_msg_ja.ts ) -ADD_DEFINITIONS(${QT_DEFINITIONS} ${CAS_DEFINITIONS} ${BOOST_DEFINITIONS} ${PYTHON_DEFINITIONS}) +# resource files / static +SET(_other_RESOURCES + resources/qx_view_fitall.png + resources/qx_view_fitarea.png + resources/qx_view_glpan.png + resources/qx_view_pan.png + resources/qx_view_reset.png + resources/qx_view_zoom.png +) -ADD_LIBRARY(QxScene ${QxScene_SOURCES} ${GUI_HEADERS_MOC}) -TARGET_LINK_LIBRARIES(QxScene ${COMMON_LIBS}) -INSTALL(TARGETS QxScene EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS}) +# --- sources --- -SET(COMMON_HEADERS_H - QxScene_ViewWindow.h - QxScene_ViewManager.h - QxScene_ViewModel.h - QxScene_Def.h - QxScene.h +# sources / moc wrappings +QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS}) + +# sources / static +SET(_other_SOURCES + QxScene_ViewManager.cxx + QxScene_ViewModel.cxx + QxScene_ViewWindow.cxx ) -INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${SALOME_INSTALL_HEADERS}) -QT4_INSTALL_TS_RESOURCES("${GUITS_SOURCES}" "${SALOME_GUI_INSTALL_RES_DATA}") +# sources / to compile +SET(QxScene_SOURCES ${_other_SOURCES} ${_moc_SOURCES}) + +# --- rules --- + +ADD_LIBRARY(QxScene ${QxScene_SOURCES}) +TARGET_LINK_LIBRARIES(QxScene ${_link_LIBRARIES}) +INSTALL(TARGETS QxScene EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS}) + +INSTALL(FILES ${QxScene_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS}) +QT4_INSTALL_TS_RESOURCES("${_ts_RESOURCES}" "${SALOME_GUI_INSTALL_RES_DATA}") -FILE(GLOB GUIPNG_DATA "${CMAKE_CURRENT_SOURCE_DIR}/resources/*.png") -INSTALL(FILES ${GUIPNG_DATA} DESTINATION ${SALOME_GUI_INSTALL_RES_DATA}) +INSTALL(FILES ${_other_RESOURCES} DESTINATION ${SALOME_GUI_INSTALL_RES_DATA}) diff --git a/src/ResExporter/CMakeLists.txt b/src/ResExporter/CMakeLists.txt index a44d04ecc..de0e10f19 100755 --- a/src/ResExporter/CMakeLists.txt +++ b/src/ResExporter/CMakeLists.txt @@ -17,19 +17,24 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # +# --- options --- + +# additional include directories INCLUDE_DIRECTORIES( ${QT_INCLUDES} - ${CMAKE_CURRENT_SOURCE_DIR} ${PROJECT_BINARY_DIR} - ${CMAKE_CURRENT_SOURCE_DIR}/../Qtx - ${CMAKE_CURRENT_SOURCE_DIR}/../SUIT + ${PROJECT_SOURCE_DIR}/src/Qtx + ${PROJECT_SOURCE_DIR}/src/SUIT ) -SET(COMMON_LIBS qtx suit ${QT_LIBRARIES}) - +# additional preprocessor / compiler flags ADD_DEFINITIONS(${QT_DEFINITIONS}) +# libraries to link to +SET(_link_LIBRARIES ${QT_LIBRARIES} qtx suit) + +# --- rules --- + ADD_EXECUTABLE(ResourceExporter ResourceExporter.cxx) -TARGET_LINK_LIBRARIES(ResourceExporter SUITApp ${COMMON_LIBS}) +TARGET_LINK_LIBRARIES(ResourceExporter SUITApp ${_link_LIBRARIES}) INSTALL(TARGETS ResourceExporter EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_BINS}) - diff --git a/src/SALOME_PY/CMakeLists.txt b/src/SALOME_PY/CMakeLists.txt index 340161354..5b2a8a26b 100755 --- a/src/SALOME_PY/CMakeLists.txt +++ b/src/SALOME_PY/CMakeLists.txt @@ -19,51 +19,49 @@ INCLUDE(${VTK_USE_FILE}) +# --- options --- + +# additional include directories INCLUDE_DIRECTORIES( ${CAS_INCLUDE_DIRS} ${QT_INCLUDES} ${PYTHON_INCLUDE_DIRS} - ${Boost_INCLUDE_DIRS} - ${PTHREAD_INCLUDE_DIRS} - ${KERNEL_INCLUDE_DIRS} - ${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 + ${PROJECT_SOURCE_DIR}/src/CAM + ${PROJECT_SOURCE_DIR}/src/Event + ${PROJECT_SOURCE_DIR}/src/LightApp + ${PROJECT_SOURCE_DIR}/src/OBJECT + ${PROJECT_SOURCE_DIR}/src/Qtx + ${PROJECT_SOURCE_DIR}/src/STD + ${PROJECT_SOURCE_DIR}/src/SUIT + ${PROJECT_SOURCE_DIR}/src/SVTK + ${PROJECT_SOURCE_DIR}/src/VTKViewer +) + +# additional preprocessor / compiler flags +ADD_DEFINITIONS( + ${CAS_DEFINITIONS} + ${QT_DEFINITIONS} + ${PYTHON_DEFINITIONS} ) -SET(COMMON_LIBS +# libraries to link to +SET(_link_LIBRARIES ${PYTHON_LIBRARIES} ${QT_LIBRARIES} - ${VTK_LIBRARIES} ${OPENGL_LIBRARIES} + ${VTK_LIBRARIES} LightApp - ${VTK_PYLIBS} - # ${vtkCommonPythonD} - # ${vtkGraphicsPythonD} - # ${vtkImagingPythonD} - # ${vtkPythonCore} ) -IF(WINDOWS) - ADD_DEFINITIONS("${CAS_DEFINITIONS} ${QT_DEFINITIONS} ${BOOST_DEFINITIONS} ${PYTHON_DEFINITIONS}") -ELSE(WINDOWS) - ADD_DEFINITIONS("-DHAVE_CONFIG_H ${CAS_DEFINITIONS} ${QT_DEFINITIONS} ${BOOST_DEFINITIONS} ${PYTHON_DEFINITIONS}") -ENDIF(WINDOWS) + +# --- rules --- ADD_LIBRARY(SalomePy SalomePy.cxx) -TARGET_LINK_LIBRARIES(SalomePy ${COMMON_LIBS}) +TARGET_LINK_LIBRARIES(SalomePy ${_link_LIBRARIES}) INSTALL(TARGETS SalomePy DESTINATION ${SALOME_INSTALL_LIBS}) +# TODO: check on windows IF(WINDOWS) - IF(CMAKE_BUILD_TYPE STREQUAL Release) - INSTALL(FILES ${CMAKE_INSTALL_PREFIX}/${SALOME_INSTALL_LIBS}/SalomePy.dll DESTINATION ${SALOME_INSTALL_LIBS} RENAME libSalomePy.pyd) - ELSE(CMAKE_BUILD_TYPE STREQUAL Release) - INSTALL(FILES ${CMAKE_INSTALL_PREFIX}/${SALOME_INSTALL_LIBS}/SalomePy.dll DESTINATION ${SALOME_INSTALL_LIBS} RENAME libSalomePy_d.pyd) - ENDIF(CMAKE_BUILD_TYPE STREQUAL Release) + SET_TARGET_PROPERTIES(SalomePy PROPERTIES PREFIX "lib" SUFFIX ".pyd" DEBUG_OUTPUT_NAME SalomePy_d RELEASE_OUTPUT_NAME SalomePy) ENDIF(WINDOWS) + +# TODO: check if PYTHON_ADD_MODULE() macro can be used to build this target \ No newline at end of file diff --git a/src/SALOME_PYQT/SALOME_PYQT_GUI/CMakeLists.txt b/src/SALOME_PYQT/SALOME_PYQT_GUI/CMakeLists.txt index 1df0b24de..50967f85c 100755 --- a/src/SALOME_PYQT/SALOME_PYQT_GUI/CMakeLists.txt +++ b/src/SALOME_PYQT/SALOME_PYQT_GUI/CMakeLists.txt @@ -3,7 +3,7 @@ # 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 @@ -19,61 +19,73 @@ INCLUDE(${VTK_USE_FILE}) +# --- options --- + +# additional include directories INCLUDE_DIRECTORIES( ${CAS_INCLUDE_DIRS} ${QT_INCLUDES} - ${PTHREAD_INCLUDE_DIRS} - ${PYTHON_INCLUDE_DIRS} ${SIP_INCLUDE_DIRS} - ${Boost_INCLUDE_DIRS} ${PYTHON_INCLUDE_DIRS} + ${Boost_INCLUDE_DIRS} ${OMNIORB_INCLUDE_DIR} ${KERNEL_INCLUDE_DIRS} - ${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 + ${PROJECT_SOURCE_DIR}/src/CAM + ${PROJECT_SOURCE_DIR}/src/LightApp + ${PROJECT_SOURCE_DIR}/src/PyInterp + ${PROJECT_SOURCE_DIR}/src/Qtx + ${PROJECT_SOURCE_DIR}/src/SALOME_PYQT/SALOME_PYQT_GUILight + ${PROJECT_SOURCE_DIR}/src/STD + ${PROJECT_SOURCE_DIR}/src/SUIT + ${PROJECT_SOURCE_DIR}/src/SalomeApp +) + +# additional preprocessor / compiler flags +ADD_DEFINITIONS( + "-DCALL_OLD_METHODS" + ${QT_DEFINITIONS} + ${CAS_DEFINITIONS} + ${PYTHON_DEFINITIONS} + ${BOOST_DEFINITIONS} + ${OMNIORB_DEFINITIONS} ) -SET(COMMON_LIBS +# libraries to link to +SET(_link_LIBRARIES ${PYTHON_LIBRARIES} - ${PYQT_LIBRARIES} ${VTK_LIBRARIES} ${OPENGL_LIBRARIES} ${PLATFORM_LIBS} ${OMNIORB_LIBRARIES} - PyInterp - SalomeApp - OCCViewer - Plot2d - SalomePyQtGUILight + SalomePyQtGUILight SalomeApp ) -SET(GUI_HEADERS SALOME_PYQT_Module.h) -QT4_WRAP_CPP(GUI_HEADERS_MOC ${GUI_HEADERS}) +# --- headers --- -IF(WINDOWS) - ADD_DEFINITIONS("-DCALL_OLD_METHODS ${QT_DEFINITIONS} ${PYTHON_DEFINITIONS} ${CAS_DEFINITIONS} ${BOOST_DEFINITIONS} ${OMNIORB_DEFINITIONS}") -ELSE(WINDOWS) - ADD_DEFINITIONS("-DCALL_OLD_METHODS -DHAVE_CONFIG_H ${QT_DEFINITIONS} ${PYTHON_DEFINITIONS} ${CAS_DEFINITIONS} ${BOOST_DEFINITIONS} ${OMNIORB_DEFINITIONS}") -ENDIF(WINDOWS) +# header files / to be processed by moc +SET(_moc_HEADERS SALOME_PYQT_Module.h) +# header files / no moc processing +SET(_other_HEADERS SALOME_PYQT_GUI.h) -ADD_LIBRARY(SalomePyQtGUI SALOME_PYQT_Module.cxx ${GUI_HEADERS_MOC}) -TARGET_LINK_LIBRARIES(SalomePyQtGUI ${COMMON_LIBS}) -INSTALL(TARGETS SalomePyQtGUI DESTINATION ${SALOME_INSTALL_LIBS}) +# header files / to install +SET(SalomePyQtGUI_HEADERS ${_moc_HEADERS} ${_other_HEADERS}) -SET(COMMON_HEADERS_H - SALOME_PYQT_GUI.h - SALOME_PYQT_Module.h -) +# --- sources --- + +# sources / moc wrappings +QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS}) + +# sources / static +SET(_other_SOURCES SALOME_PYQT_Module.cxx) + +# sources / to compile +SET(SalomePyQtGUI_SOURCES ${_other_SOURCES} ${_moc_SOURCES}) + +# --- rules --- + +ADD_LIBRARY(SalomePyQtGUI ${SalomePyQtGUI_SOURCES}) +TARGET_LINK_LIBRARIES(SalomePyQtGUI ${_link_LIBRARIES}) +INSTALL(TARGETS SalomePyQtGUI DESTINATION ${SALOME_INSTALL_LIBS}) -INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${SALOME_INSTALL_HEADERS}) +INSTALL(FILES ${SalomePyQtGUI_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS}) diff --git a/src/SALOME_PYQT/SALOME_PYQT_GUILight/CMakeLists.txt b/src/SALOME_PYQT/SALOME_PYQT_GUILight/CMakeLists.txt index 52467a60c..5cb2805f1 100755 --- a/src/SALOME_PYQT/SALOME_PYQT_GUILight/CMakeLists.txt +++ b/src/SALOME_PYQT/SALOME_PYQT_GUILight/CMakeLists.txt @@ -17,95 +17,102 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # +INCLUDE(UsePyQt4) INCLUDE(${VTK_USE_FILE}) +# --- options --- + +# additional include directories INCLUDE_DIRECTORIES( ${CAS_INCLUDE_DIRS} ${QT_INCLUDES} ${SIP_INCLUDE_DIR} - ${Boost_INCLUDE_DIRS} ${PYTHON_INCLUDE_DIRS} - ${PTHREAD_INCLUDE_DIRS} ${KERNEL_INCLUDE_DIRS} ${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 - ${CMAKE_CURRENT_SOURCE_DIR}/../../Event + ${PROJECT_SOURCE_DIR}/src/CAM + ${PROJECT_SOURCE_DIR}/src/Event + ${PROJECT_SOURCE_DIR}/src/LightApp + ${PROJECT_SOURCE_DIR}/src/OCCViewer + ${PROJECT_SOURCE_DIR}/src/Plot2d + ${PROJECT_SOURCE_DIR}/src/PyConsole + ${PROJECT_SOURCE_DIR}/src/PyInterp + ${PROJECT_SOURCE_DIR}/src/Qtx + ${PROJECT_SOURCE_DIR}/src/STD + ${PROJECT_SOURCE_DIR}/src/SUIT + ${PROJECT_SOURCE_DIR}/src/SUITApp ) -SET(COMMON_LIBS ${PYTHON_LIBRARIES} ${PYQT_LIBRARIES} ${VTK_LIBRARIES} ${OPENGL_LIBRARIES} PyInterp LightApp) +# additional preprocessor / compiler flags +ADD_DEFINITIONS( + "-DCALL_OLD_METHODS" + ${QT_DEFINITIONS} + ${CAS_DEFINITIONS} + ${PYTHON_DEFINITIONS} +) +IF(SALOME_LIGHT_ONLY) + ADD_DEFINITIONS("-DGUI_DISABLE_CORBA") +ENDIF() +# libraries to link to +SET(_link_LIBRARIES + ${PYTHON_LIBRARIES} + ${VTK_LIBRARIES} + ${OPENGL_LIBRARIES} + LightApp +) IF(NOT SALOME_LIGHT_ONLY) - INCLUDE_DIRECTORIES( - ${CMAKE_CURRENT_SOURCE_DIR}/../../SalomeApp - ${OMNIORB_INCLUDE_DIR} - ) - SET(COMMON_LIBS ${COMMON_LIBS} SalomeApp ${SalomeContainer}) -ELSE(NOT SALOME_LIGHT_ONLY) - SET(COMMON_FLAGS "${COMMON_FLAGS} -DGUI_DISABLE_CORBA") -ENDIF(NOT SALOME_LIGHT_ONLY) - -SET(GUI_HEADERS SALOME_PYQT_PyModule.h 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 + LIST(APPEND _link_LIBRARIES ${KERNEL_SalomeContainer}) +ENDIF() + +# --- headers --- + +# header files / to be processed by moc +SET(_moc_HEADERS + SALOME_PYQT_DataModelLight.h + SALOME_PYQT_ModuleLight.h + SALOME_PYQT_PyModule.h ) -# Sip definition file -SET(SIP_FILES - SALOME_PYQT_GUILight.sip + +# header files / no moc processing +SET(_other_HEADERS + SALOME_PYQT_DataObjectLight.h + SALOME_PYQT_GUILight.h + SALOME_PYQT_PyInterp.h ) -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_PyModule.cxx - SALOME_PYQT_ModuleLight.cxx - SALOME_PYQT_DataObjectLight.cxx + +# header files / to install +SET(SalomePyQtGUILight_HEADERS ${_moc_HEADERS} ${_other_HEADERS}) + +# --- resources --- + +# sip files / to be processed by sip +SET(_sip_files SALOME_PYQT_GUILight.sip) + +# --- sources --- + +# sources / moc wrappings +QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS}) + +# sources / sip wrappings +PYQT4_WRAP_SIP(_sip_SOURCES ${_sip_files}) + +# sources / static +SET(_other_SOURCES SALOME_PYQT_DataModelLight.cxx + SALOME_PYQT_DataObjectLight.cxx + SALOME_PYQT_ModuleLight.cxx SALOME_PYQT_PyInterp.cxx + SALOME_PYQT_PyModule.cxx ) +# sources / to compile +SET(SalomePyQtGUILight_SOURCES ${_other_SOURCES} ${_moc_SOURCES} ${_sip_SOURCES}) -IF(WINDOWS) - ADD_DEFINITIONS( "-DCALL_OLD_METHODS ${QT_DEFINITIONS} ${CAS_DEFINITIONS} ${BOOST_DEFINITIONS} ${PYTHON_DEFINITIONS}") -ELSE(WINDOWS) - ADD_DEFINITIONS( "-DHAVE_CONFIG_H -DCALL_OLD_METHODS ${QT_DEFINITIONS} ${CAS_DEFINITIONS} ${BOOST_DEFINITIONS} ${PYTHON_DEFINITIONS}") -ENDIF(WINDOWS) +# --- rules --- - -ADD_LIBRARY(SalomePyQtGUILight ${SalomePyQtGUI_SOURCES} ${GUI_HEADERS_MOC} ${SIP_SRC}) -TARGET_LINK_LIBRARIES(SalomePyQtGUILight ${COMMON_LIBS}) +ADD_LIBRARY(SalomePyQtGUILight ${SalomePyQtGUILight_SOURCES}) +TARGET_LINK_LIBRARIES(SalomePyQtGUILight ${_link_LIBRARIES}) INSTALL(TARGETS SalomePyQtGUILight DESTINATION ${SALOME_INSTALL_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 ${SALOME_INSTALL_HEADERS}) +INSTALL(FILES ${SalomePyQtGUILight_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS}) diff --git a/src/SALOME_PYQT/SalomePyQt/CMakeLists.txt b/src/SALOME_PYQT/SalomePyQt/CMakeLists.txt index 3c5560d07..9827dc25f 100755 --- a/src/SALOME_PYQT/SalomePyQt/CMakeLists.txt +++ b/src/SALOME_PYQT/SalomePyQt/CMakeLists.txt @@ -17,8 +17,12 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # +INCLUDE(UsePyQt4) INCLUDE(${VTK_USE_FILE}) +# --- options --- + +# additional include directories INCLUDE_DIRECTORIES( ${CAS_INCLUDE_DIRS} ${QT_INCLUDES} @@ -26,92 +30,73 @@ INCLUDE_DIRECTORIES( ${SIP_INCLUDE_DIR} ${Boost_INCLUDE_DIRS} ${PYTHON_INCLUDE_DIRS} - ${PTHREAD_INCLUDE_DIRS} ${KERNEL_INCLUDE_DIRS} - ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR} - ${PROJECT_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 + ${PROJECT_SOURCE_DIR}/src/CAM + ${PROJECT_SOURCE_DIR}/src/Event + ${PROJECT_SOURCE_DIR}/src/LightApp + ${PROJECT_SOURCE_DIR}/src/LogWindow + ${PROJECT_SOURCE_DIR}/src/OBJECT + ${PROJECT_SOURCE_DIR}/src/OCCViewer + ${PROJECT_SOURCE_DIR}/src/ObjBrowser + ${PROJECT_SOURCE_DIR}/src/Plot2d + ${PROJECT_SOURCE_DIR}/src/PyInterp + ${PROJECT_SOURCE_DIR}/src/Qtx + ${PROJECT_SOURCE_DIR}/src/SALOME_PYQT/SALOME_PYQT_GUILight + ${PROJECT_SOURCE_DIR}/src/STD + ${PROJECT_SOURCE_DIR}/src/SUIT +) + +# additional preprocessor / compiler flags +ADD_DEFINITIONS( + ${QWT_DEFINITIONS} + ${QT_DEFINITIONS} + ${CAS_DEFINITIONS} + ${BOOST_DEFINITIONS} + ${PYTHON_DEFINITIONS} ) -SET(COMMON_LIBS + +# libraries to link to +SET(_link_LIBRARIES ${PYTHON_LIBRARIES} - ${SIP_LIBS} - ${PYQT_LIBRARIES} ${VTK_LIBRARIES} - ${QWT_LIBRARY} ${OPENGL_LIBRARIES} - suit - CAM - std - qtx - Event - LogWindow - VTKViewer + ${QWT_LIBRARY} 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) - -# -DHAVE_CONFIG_H -ADD_DEFINITIONS("${QWT_DEFINITIONS} ${QT_DEFINITIONS} ${CAS_DEFINITIONS} ${BOOST_DEFINITIONS} ${PYTHON_DEFINITIONS}") - -ADD_LIBRARY(SalomePyQt ${SalomePyQt_SOURCES} ${GUI_HEADERS_MOC} ${SIP_SRC}) -TARGET_LINK_LIBRARIES(SalomePyQt ${COMMON_LIBS}) +# --- headers --- + +# header files / to be processed by moc +SET(_moc_HEADERS SalomePyQt.h) + +# --- resources --- + +# sip files / to be processed by sip +SET(_sip_files SalomePyQt.sip) + +# --- sources --- + +# sources / moc wrappings +QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS}) + +# sources / sip wrappings +PYQT4_WRAP_SIP(_sip_SOURCES ${_sip_files}) + +# sources / static +SET(_other_SOURCES SalomePyQt.cxx) + +# sources / to compile +SET(SalomePyQt_SOURCES ${_other_SOURCES} ${_moc_SOURCES} ${_sip_SOURCES}) + +# --- rules --- + +ADD_LIBRARY(SalomePyQt ${SalomePyQt_SOURCES}) +TARGET_LINK_LIBRARIES(SalomePyQt ${_link_LIBRARIES}) INSTALL(TARGETS SalomePyQt DESTINATION ${SALOME_INSTALL_LIBS}) IF(WINDOWS) - IF(CMAKE_BUILD_TYPE STREQUAL Release) - INSTALL(FILES ${CMAKE_INSTALL_PREFIX}/${SALOME_INSTALL_LIBS}/SalomePyQt.dll DESTINATION ${SALOME_INSTALL_LIBS} RENAME SalomePyQt.pyd) - ELSE(CMAKE_BUILD_TYPE STREQUAL Release) - INSTALL(FILES ${CMAKE_INSTALL_PREFIX}/${SALOME_INSTALL_LIBS}/SalomePyQt.dll DESTINATION ${SALOME_INSTALL_LIBS} RENAME SalomePyQt_d.pyd) - ENDIF(CMAKE_BUILD_TYPE STREQUAL Release) -ELSE(WINDOWS) - INSTALL(CODE "EXECUTE_PROCESS(COMMAND ln -sf libSalomePyQt.so SalomePyQt.so - WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX}/${SALOME_INSTALL_LIBS} - OUTPUT_VARIABLE ln_res)" ) -ENDIF(WINDOWS) + SET_TARGET_PROPERTIES(SalomePyQt PROPERTIES SUFFIX ".pyd" DEBUG_OUTPUT_NAME SalomePyQt_d RELEASE_OUTPUT_NAME SalomePyQt) +ELSE() + SET_TARGET_PROPERTIES(SalomePyQt PROPERTIES PREFIX "") +ENDIF() diff --git a/src/SALOME_SWIG/CMakeLists.txt b/src/SALOME_SWIG/CMakeLists.txt index 5dfd50f19..29e37ffdc 100755 --- a/src/SALOME_SWIG/CMakeLists.txt +++ b/src/SALOME_SWIG/CMakeLists.txt @@ -20,79 +20,76 @@ INCLUDE(${SWIG_USE_FILE}) INCLUDE(${VTK_USE_FILE}) -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") +# --- options --- +# additional include directories INCLUDE_DIRECTORIES( ${PYTHON_INCLUDE_DIRS} ${CAS_INCLUDE_DIRS} ${QT_INCLUDES} ${QWT_INCLUDE_DIR} - ${Boost_INCLUDE_DIRS} - ${PTHREAD_INCLUDE_DIRS} - ${CMAKE_CURRENT_SOURCE_DIR} - ${PROJECT_BINARY_DIR}/salome_adm - ${PROJECT_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 + ${PROJECT_SOURCE_DIR}/src/CAM + ${PROJECT_SOURCE_DIR}/src/Event + ${PROJECT_SOURCE_DIR}/src/LightApp + ${PROJECT_SOURCE_DIR}/src/OBJECT + ${PROJECT_SOURCE_DIR}/src/OCCViewer + ${PROJECT_SOURCE_DIR}/src/Plot2d + ${PROJECT_SOURCE_DIR}/src/Prs + ${PROJECT_SOURCE_DIR}/src/Qtx + ${PROJECT_SOURCE_DIR}/src/SOCC + ${PROJECT_SOURCE_DIR}/src/STD + ${PROJECT_SOURCE_DIR}/src/SUIT + ${PROJECT_SOURCE_DIR}/src/SVTK + ${PROJECT_SOURCE_DIR}/src/SPlot2d + ${PROJECT_SOURCE_DIR}/src/VTKViewer ) -ADD_DEFINITIONS(${PYTHON_DEFINITIONS} ${CAS_DEFINITIONS} ${QT_DEFINITIONS} ${QWT_DEFINITIONS} ${BOOST_DEFINITIONS}) - -SWIG_ADD_MODULE(libSALOME_Swig python libSALOME_Swig.i SALOMEGUI_Swig.cxx) -SWIG_LINK_LIBRARIES(libSALOME_Swig LightApp ${PYTHON_LIBRARIES}) +# swig flags +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") -IF(WINDOWS) - SET_TARGET_PROPERTIES(_libSALOME_Swig PROPERTIES DEBUG_OUTPUT_NAME _libSALOME_Swig_d) -ENDIF(WINDOWS) +# additional preprocessor / compiler flags +ADD_DEFINITIONS(${QT_DEFINITIONS} ${QWT_DEFINITIONS} ${CAS_DEFINITIONS} ${PYTHON_DEFINITIONS}) -INSTALL(TARGETS _libSALOME_Swig DESTINATION ${SALOME_INSTALL_PYTHON}) +# --- headers --- -SET(COMMON_HEADERS - libSALOME_Swig.i +# header files / to install +SET(libSALOME_Swig_HEADERS SALOMEGUI_Swig.hxx SALOMEGUI_Swig.i + libSALOME_Swig.i ) -INSTALL(FILES ${COMMON_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS}) -INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/libSALOME_Swig.py DESTINATION ${SALOME_INSTALL_PYTHON}) -# -# =============================================================== -# Files to be installed -# =============================================================== -# -SET(PYTHON_FILES +# --- scripts --- + +# scripts / swig wrappings +SET(_swig_SCRIPTS + ${CMAKE_CURRENT_BINARY_DIR}/libSALOME_Swig.py +) + +# scripts / static +SET(_other_SCRIPTS examplevtk1.py test_table.py test_big_table.py test_many_objects.py test_remove_ref.py ) -SALOME_INSTALL_SCRIPTS("${PYTHON_FILES}" ${SALOME_INSTALL_SCRIPT_DATA}) -SALOME_INSTALL_SCRIPTS("SALOMEGUI_shared_modules.py" ${SALOME_INSTALL_PYTHON_SHARED}) -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 ${SALOME_INSTALL_SCRIPT_DATA} - PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) +# --- rules --- + +SWIG_ADD_MODULE(libSALOME_Swig python libSALOME_Swig.i SALOMEGUI_Swig.cxx) +SWIG_LINK_LIBRARIES(libSALOME_Swig ${PYTHON_LIBRARIES} LightApp) +IF(WINDOWS) + SET_TARGET_PROPERTIES(_libSALOME_Swig PROPERTIES DEBUG_OUTPUT_NAME _libSALOME_Swig_d) +ENDIF(WINDOWS) + +INSTALL(TARGETS _libSALOME_Swig DESTINATION ${SALOME_INSTALL_PYTHON}) + +SALOME_INSTALL_SCRIPTS("${_swig_SCRIPTS}" ${SALOME_INSTALL_PYTHON}) +SALOME_INSTALL_SCRIPTS("${_other_SCRIPTS}" ${SALOME_INSTALL_SCRIPT_DATA}) +SALOME_INSTALL_SCRIPTS(SALOMEGUI_shared_modules.py ${SALOME_INSTALL_PYTHON_SHARED}) + +INSTALL(FILES ${libSALOME_Swig_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS}) diff --git a/src/SALOME_SWIG/supervisionexample.py.in b/src/SALOME_SWIG/supervisionexample.py.in deleted file mode 100755 index 2e314f4da..000000000 --- a/src/SALOME_SWIG/supervisionexample.py.in +++ /dev/null @@ -1,106 +0,0 @@ -# Copyright (C) 2007-2013 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 -# - -#============================================================================== -# File : supervisionexample.py -# Created : 23 nov 2001 -# Author : Jean Rahuel -# Project : SALOME -#============================================================================== -# -from SuperV import * - - - -# load this object with Nodes, Links and Datas stored in GraphEssai.xml -# (GraphEssai.xml was created with python in SuperVisionTest and GraphEssai.py) -myGraph = Graph("@ROOT_BUILDDIR@/share/salome/resources/superv/GraphEssai.xml") - -#myGraph = Graph("/home/data/jr_HEAD/build/share/salome/resources/superv/GraphEssai.xml") -# This DataFlow is "valid" : no loop, correct links between Nodes etc... - -print myGraph.IsValid() - -# Get Nodes -myGraph.PrintNodes() -Add,Sub,Mul,Div = myGraph.Nodes() - -# Load Datas -Addx = Add.Input("x",3.) -Addy = Add.Input("y",4.5) -Subx = Sub.Input("x",1.5) - -# Get Output Port -Addz = Add.Port('z') -Subz = Sub.Port('z') -Mulz = Mul.Port('z') -Divz = Div.Port('z') - -# This DataFlow is "executable" : all pending Ports are defined with Datas -print myGraph.IsExecutable() - -# Starts only execution of that DataFlow and gets control immediatly -print myGraph.Run() - -# That DataFlow is running ==> 0 (false) -print myGraph.IsDone() - -# Events of execution : -aStatus,aNode,anEvent,aState = myGraph.Event() -while aStatus : - print aNode.Thread(),aNode.SubGraph(),aNode.Name(),anEvent,aState - aStatus,aNode,anEvent,aState = myGraph.Event() -print myGraph.IsDone() - -# Wait for Completion (but it is already done after event loop ...) -print "Done : ",myGraph.DoneW() - -# Get result -print "Result : ",Divz.ToString() - -# Intermediate results : -print "Intermediate Result Add\z : ",Addz.ToString() -print "Intermediate Result Sub\z : ",Subz.ToString() -print "Intermediate Result Mul\z : ",Mulz.ToString() - -print " " -print "Type : print myGraph.IsDone()" -print " If execution is finished ==> 1 (true)" -print " " -print "Type : print Divz.ToString()" -print " You will get the result" -print " " -print "Type : myGraph.PrintPorts()" -print " to see input and output values of the graph" -print " " -print "Type : Add.PrintPorts()" -print "Type : Sub.PrintPorts()" -print "Type : Mul.PrintPorts()" -print "Type : Div.PrintPorts()" -print " to see input and output values of nodes" - -# Export will create newsupervisionexample.xml and the corresponding .py file -print myGraph.Export("@ROOT_BUILDDIR@/share/salome/resources/superv/newsupervisionexample.xml") - -print " " -print "See file @ROOT_BUILDDIR@/share/salome/resources/superv/newsupervisionexample.xml" -print "See file @ROOT_BUILDDIR@/share/salome/resources/superv/newsupervisionexample.py" diff --git a/src/SALOME_SWIG/supervisiongeomexample.py.in b/src/SALOME_SWIG/supervisiongeomexample.py.in deleted file mode 100755 index 6400fa000..000000000 --- a/src/SALOME_SWIG/supervisiongeomexample.py.in +++ /dev/null @@ -1,124 +0,0 @@ -# Copyright (C) 2007-2013 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 -# - -# Generated python file of Graph GraphGeom2Essai -# -from SuperV import * - -import salome - -import geompy - - -geom = lcc.FindOrLoadComponent("FactoryServer", "Geometry") -geom.GetCurrentStudy(salome.myStudyId) - -myBuilder = salome.myStudy.NewBuilder() - -# Graph creation -GraphGeom2Essai = Graph( 'GraphGeom2Essai' ) -print GraphGeom2Essai.SetAuthor( '' ) -print GraphGeom2Essai.SetComment( '' ) -GraphGeom2Essai.Coords( 0 , 0 ) - -# Creation of Nodes -MakeSphere = GraphGeom2Essai.Node( 'Geometry' , 'Geometry' , 'MakeSphere' ) -print MakeSphere.SetAuthor( '' ) -print MakeSphere.SetContainer( 'FactoryServer' ) -print MakeSphere.SetComment( '' ) -MakeSphere.Coords( 26 , 13 ) -MakeCopy = GraphGeom2Essai.Node( 'Geometry' , 'Geometry' , 'MakeCopy' ) -print MakeCopy.SetAuthor( '' ) -print MakeCopy.SetContainer( 'FactoryServer' ) -print MakeCopy.SetComment( '' ) -MakeCopy.Coords( 219 , 12 ) -MakeTranslation = GraphGeom2Essai.Node( 'Geometry' , 'Geometry' , 'MakeTranslation' ) -print MakeTranslation.SetAuthor( '' ) -print MakeTranslation.SetContainer( 'FactoryServer' ) -print MakeTranslation.SetComment( '' ) -MakeTranslation.Coords( 219 , 159 ) -MakeFuse = GraphGeom2Essai.Node( 'Geometry' , 'Geometry' , 'MakeFuse' ) -print MakeFuse.SetAuthor( '' ) -print MakeFuse.SetContainer( 'FactoryServer' ) -print MakeFuse.SetComment( '' ) -MakeFuse.Coords( 465 , 106 ) - -# Creation of intermediate Output variables and of links -MakeSphereshape = MakeSphere.Port( 'shape' ) -MakeCopyshape1 = GraphGeom2Essai.Link( MakeSphereshape , MakeCopy.Port( 'shape1' ) ) -MakeTranslationshape1 = GraphGeom2Essai.Link( MakeSphereshape , MakeTranslation.Port( 'shape1' ) ) -MakeCopyshape = MakeCopy.Port( 'shape' ) -MakeFuseshape1 = GraphGeom2Essai.Link( MakeCopyshape , MakeFuse.Port( 'shape1' ) ) -MakeTranslationshape = MakeTranslation.Port( 'shape' ) -MakeFuseshape2 = GraphGeom2Essai.Link( MakeTranslationshape , MakeFuse.Port( 'shape2' ) ) - -# Creation of Input datas -MakeSpherex1 = MakeSphere.Input( 'x1' , 0) -MakeSpherey1 = MakeSphere.Input( 'y1' , 0) -MakeSpherez1 = MakeSphere.Input( 'z1' , 0) -MakeSphereradius = MakeSphere.Input( 'radius' , 50) -MakeTranslationx1 = MakeTranslation.Input( 'x1' , 80) -MakeTranslationy1 = MakeTranslation.Input( 'y1' , 0) -MakeTranslationz1 = MakeTranslation.Input( 'z1' , 0) - -# Missing Input datas : None - -# Creation of Output variables -MakeFuseshape = MakeFuse.Port( 'shape' ) - -# State of Ports of the Graph -GraphGeom2Essai.PrintPorts() - -# Start asynchronous run -print GraphGeom2Essai.Run() - -# Done ? -print GraphGeom2Essai.IsDone() - -# Events of execution : -aStatus,aNode,anEvent,aState = GraphGeom2Essai.Event() -while aStatus : - print aNode.Thread(),aNode.SubGraph(),aNode.Name(),anEvent,aState - aStatus,aNode,anEvent,aState = GraphGeom2Essai.Event() -print GraphGeom2Essai.IsDone() - -# Waiting end of execution : -print GraphGeom2Essai.DoneW() - -print " " -print "Type print GraphGeom2Essai.IsDone()" -print "1 <==> It's done" -print " " -print "Type print GraphGeom2Essai.DoneW()" -print "Wait until end of execution : 1(success)" -print " " -print "Type GraphGeom2Essai.PrintPorts()" -print " to see input and output values of the graph" -print " " -print "Type MakeSphere.PrintPorts()" -print "Type MakeCopy.PrintPorts()" -print "Type MakeTranslation.PrintPorts()" -print "Type MakeFuse.PrintPorts()" -print " to see input and output values of nodes" -print " " -print "Type print GraphGeom2Essai.Export('File-Name')" -print "You will get a .py and a .xml file of this graph" diff --git a/src/SOCC/CMakeLists.txt b/src/SOCC/CMakeLists.txt index 7e89f1a75..416e21d41 100755 --- a/src/SOCC/CMakeLists.txt +++ b/src/SOCC/CMakeLists.txt @@ -17,44 +17,67 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # +INCLUDE(UseQt4Ext) + +# --- options --- + +# additional include directories INCLUDE_DIRECTORIES( ${CAS_INCLUDE_DIRS} ${QT_INCLUDES} - ${Boost_INCLUDE_DIRS} - ${PTHREAD_INCLUDE_DIRS} ${KERNEL_INCLUDE_DIRS} - ${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 + ${PROJECT_SOURCE_DIR}/src/Qtx + ${PROJECT_SOURCE_DIR}/src/SUIT + ${PROJECT_SOURCE_DIR}/src/OBJECT + ${PROJECT_SOURCE_DIR}/src/Prs + ${PROJECT_SOURCE_DIR}/src/OCCViewer +) + +# additional preprocessor / compiler flags +ADD_DEFINITIONS(${QT_DEFINITIONS} ${CAS_DEFINITIONS} ${OGL_DEFINITIONS}) + +# libraries to link to +SET(_link_LIBRARIES + ${QT_LIBRARIES} ${CAS_KERNEL} ${CAS_VIEWER} + qtx suit SalomeObject SalomePrs OCCViewer ) -SET(COMMON_LIBS ${QT_LIBRARIES} qtx suit SalomeObject SalomePrs OCCViewer) +# --- headers --- -SET(GUI_HEADERS +# header files / to be processed by moc +SET(_moc_HEADERS SOCC_ViewModel.h SOCC_ViewWindow.h ) -QT4_WRAP_CPP(GUI_HEADERS_MOC ${GUI_HEADERS}) -SET(SOCC_SOURCES - SOCC_ViewModel.cxx +# header files / no moc processing +SET(_other_HEADERS + SOCC.h + SOCC_Prs.h +) + +# header files / to install +SET(SOCC_HEADERS ${_moc_HEADERS} ${_other_HEADERS}) + +# --- sources --- + +# sources / moc wrappings +QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS}) + +# sources / static +SET(_other_SOURCES SOCC_Prs.cxx + SOCC_ViewModel.cxx SOCC_ViewWindow.cxx ) -ADD_DEFINITIONS(${QT_DEFINITIONS} ${CAS_DEFINITIONS} ${BOOST_DEFINITIONS}) +# sources / to compile +SET(SOCC_SOURCES ${_other_SOURCES} ${_moc_SOURCES}) -ADD_LIBRARY(SOCC ${SOCC_SOURCES} ${GUI_HEADERS_MOC}) -TARGET_LINK_LIBRARIES(SOCC ${COMMON_LIBS}) -INSTALL(TARGETS SOCC EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS}) +# --- rules --- -SET(COMMON_HEADERS_H - SOCC.h - SOCC_ViewModel.h - SOCC_Prs.h - SOCC_ViewWindow.h -) +ADD_LIBRARY(SOCC ${SOCC_SOURCES}) +TARGET_LINK_LIBRARIES(SOCC ${_link_LIBRARIES}) +INSTALL(TARGETS SOCC EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS}) -INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${SALOME_INSTALL_HEADERS}) +INSTALL(FILES ${SOCC_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS}) diff --git a/src/SPlot2d/CMakeLists.txt b/src/SPlot2d/CMakeLists.txt index a4335db8a..5060151c7 100755 --- a/src/SPlot2d/CMakeLists.txt +++ b/src/SPlot2d/CMakeLists.txt @@ -17,30 +17,54 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # +INCLUDE(UseQt4Ext) + +# --- options --- + +# additional include directories INCLUDE_DIRECTORIES( ${CAS_INCLUDE_DIRS} ${QT_INCLUDES} - ${Boost_INCLUDE_DIRS} ${QWT_INCLUDE_DIR} - ${PTHREAD_INCLUDE_DIRS} - ${KERNEL_INCLUDE_DIRS} - ${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 + ${PROJECT_SOURCE_DIR}/src/Qtx + ${PROJECT_SOURCE_DIR}/src/SUIT + ${PROJECT_SOURCE_DIR}/src/Plot2d + ${PROJECT_SOURCE_DIR}/src/Prs + ${PROJECT_SOURCE_DIR}/src/OBJECT ) -ADD_DEFINITIONS("${QT_DEFINITIONS} ${CAS_DEFINITIONS} ${BOOST_DEFINITIONS} ${QWT_DEFINITIONS}") -SET(COMMON_LIBS suit Plot2d SalomePrs SalomeObject) +# additional preprocessor / compiler flags +ADD_DEFINITIONS(${QT_DEFINITIONS} ${QWT_DEFINITIONS} ${CAS_DEFINITIONS}) + +# libraries to link to +SET(_link_LIBRARIES ${QT_LIBRARIES} ${QWT_LIBRARY} qtx suit Plot2d SalomePrs SalomeObject) -SET(GUI_HEADERS +# --- headers --- + +# header files / to be processed by moc +SET(_moc_HEADERS SPlot2d_ViewModel.h SPlot2d_ViewWindow.h ) -QT4_WRAP_CPP(GUI_HEADERS_MOC ${GUI_HEADERS}) -SET(SPlot2d_SOURCES +# header files / no moc processing +SET(_other_HEADERS + SPlot2d.h + SPlot2d_Curve.h + SPlot2d_Histogram.h + SPlot2d_Prs.h +) + +# header files / to install +SET(SPlot2d_HEADERS ${_moc_HEADERS} ${_other_HEADERS}) + +# --- sources --- + +# sources / moc wrappings +QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS}) + +# sources / static +SET(_other_SOURCES SPlot2d_Curve.cxx SPlot2d_Histogram.cxx SPlot2d_Prs.cxx @@ -48,17 +72,13 @@ SET(SPlot2d_SOURCES SPlot2d_ViewWindow.cxx ) -ADD_LIBRARY(SPlot2d ${SPlot2d_SOURCES} ${GUI_HEADERS_MOC}) -TARGET_LINK_LIBRARIES(SPlot2d ${COMMON_LIBS}) -INSTALL(TARGETS SPlot2d EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS}) +# sources / to compile +SET(SPlot2d_SOURCES ${_other_SOURCES} ${_moc_SOURCES}) -SET(COMMON_HEADERS_H - SPlot2d.h - SPlot2d_Curve.h - SPlot2d_Histogram.h - SPlot2d_Prs.h - SPlot2d_ViewModel.h - SPlot2d_ViewWindow.h -) +# --- rules --- + +ADD_LIBRARY(SPlot2d ${SPlot2d_SOURCES}) +TARGET_LINK_LIBRARIES(SPlot2d ${_link_LIBRARIES}) +INSTALL(TARGETS SPlot2d EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS}) -INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${SALOME_INSTALL_HEADERS}) +INSTALL(FILES ${SPlot2d_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS}) diff --git a/src/STD/CMakeLists.txt b/src/STD/CMakeLists.txt index f8b03b739..f69cab544 100755 --- a/src/STD/CMakeLists.txt +++ b/src/STD/CMakeLists.txt @@ -19,54 +19,91 @@ INCLUDE(UseQt4Ext) +# --- options --- + +# additional include directories INCLUDE_DIRECTORIES( ${QT_INCLUDES} - ${KERNEL_INCLUDE_DIRS} - ${CMAKE_CURRENT_SOURCE_DIR}/../Qtx - ${CMAKE_CURRENT_SOURCE_DIR}/../SUIT + ${PROJECT_SOURCE_DIR}/src/Qtx + ${PROJECT_SOURCE_DIR}/src/SUIT ) -SET(COMMON_LIBS ${QT_LIBRARIES} suit qtx) +# additional preprocessor / compiler flags +ADD_DEFINITIONS(${QT_DEFINITIONS}) + +# libraries to link to +SET(_link_LIBRARIES ${QT_LIBRARIES} qtx suit) + +# --- headers --- -SET(GUI_HEADERS +# header files / to be processed by moc +SET(_moc_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 -) +# header files / no moc processing +SET(_other_HEADERS STD.h) + +# header files / to install +SET(std_HEADERS ${_moc_HEADERS} ${_other_HEADERS}) + +# --- resources --- -SET(GUITS_SOURCES +# resource files / to be processed by lrelease +SET(_ts_RESOURCES resources/STD_images.ts resources/STD_msg_en.ts resources/STD_msg_fr.ts resources/STD_msg_ja.ts ) -ADD_DEFINITIONS(${QT_DEFINITIONS}) +# resource files / static +SET(_other_RESOURCES + resources/cascade.png + resources/close.png + resources/copy.png + resources/cut.png + resources/delete.png + resources/help.png + resources/htile.png + resources/new.png + resources/open.png + resources/paste.png + resources/print.png + resources/redo.png + resources/reset.png + resources/save.png + resources/std.ini + resources/undo.png + resources/vtile.png +) -ADD_LIBRARY(std ${std_SOURCES} ${GUI_HEADERS_MOC}) -TARGET_LINK_LIBRARIES(std ${COMMON_LIBS}) -INSTALL(TARGETS std EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS}) +# --- sources --- -SET(COMMON_HEADERS_H - STD.h - STD_Application.h - STD_MDIDesktop.h - STD_SDIDesktop.h - STD_TabDesktop.h +# sources / moc wrappings +QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS}) + +# sources / static +SET(_other_SOURCES + STD_Application.cxx + STD_MDIDesktop.cxx + STD_SDIDesktop.cxx + STD_TabDesktop.cxx ) -INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${SALOME_INSTALL_HEADERS}) -QT4_INSTALL_TS_RESOURCES("${GUITS_SOURCES}" "${SALOME_GUI_INSTALL_RES_DATA}") +# sources / to compile +SET(std_SOURCES ${_other_SOURCES} ${_moc_SOURCES}) + +# --- rules --- + +ADD_LIBRARY(std ${std_SOURCES}) +TARGET_LINK_LIBRARIES(std ${_link_LIBRARIES}) +INSTALL(TARGETS std EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS}) + +INSTALL(FILES ${std_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS}) +QT4_INSTALL_TS_RESOURCES("${_ts_RESOURCES}" "${SALOME_GUI_INSTALL_RES_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 ${SALOME_GUI_INSTALL_RES_DATA}) +INSTALL(FILES ${_other_RESOURCES} DESTINATION ${SALOME_GUI_INSTALL_RES_DATA}) diff --git a/src/SUIT/CMakeLists.txt b/src/SUIT/CMakeLists.txt index 8d2c7337a..4104502af 100644 --- a/src/SUIT/CMakeLists.txt +++ b/src/SUIT/CMakeLists.txt @@ -19,53 +19,102 @@ INCLUDE(UseQt4Ext) +# --- options --- + +# additional include directories INCLUDE_DIRECTORIES( ${QT_INCLUDES} - ${CMAKE_CURRENT_SOURCE_DIR} - ${CMAKE_CURRENT_SOURCE_DIR}/../Qtx - ${CMAKE_CURRENT_SOURCE_DIR}/../ObjBrowser + ${PROJECT_SOURCE_DIR}/src/Qtx + ${PROJECT_SOURCE_DIR}/src/ObjBrowser ) -SET(COMMON_LIBS - qtx - ObjBrowser - ${QT_LIBRARIES} - ${PLATFORM_LIBS} -) +# additional preprocessor / compiler flags +ADD_DEFINITIONS(${QT_DEFINITIONS}) IF(ENABLE_TESTRECORDER) ADD_DEFINITIONS("-DENABLE_TESTRECORDER ${TESTRECORDER_DEFINITIONS}") - SET(COMMON_LIBS ${COMMON_LIBS} ${TESTRECORDER_LIBS}) -ENDIF(ENABLE_TESTRECORDER) +ENDIF() + +# libraries to link to +SET(_link_LIBRARIES ${PLATFORM_LIBS} ${QT_LIBRARIES} qtx ObjBrowser) +IF(ENABLE_TESTRECORDER) + LIST(APPEND _link_LIBRARIES ${TESTRECORDER_LIBS}) +ENDIF() + +# --- headers --- -SET(GUI_HEADERS +# header files / to be processed by moc +SET(_moc_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_LicenseDlg.h + SUIT_MessageBox.h SUIT_Operation.h SUIT_PopupClient.h SUIT_PreferenceMgr.h SUIT_SelectionMgr.h - SUIT_Selector.h SUIT_Session.h + SUIT_ShortcutMgr.h SUIT_Study.h SUIT_TreeModel.h SUIT_ViewManager.h SUIT_ViewModel.h SUIT_ViewWindow.h - SUIT_ShortcutMgr.h +) + +# header files / no moc processing +SET(_other_HEADERS + SUIT.h SUIT_CameraProperties.h + SUIT_DataObjectIterator.h + SUIT_DataObjectKey.h + SUIT_DataOwner.h + SUIT_ExceptionHandler.h + SUIT_FileValidator.h + SUIT_OverrideCursor.h + SUIT_ResourceMgr.h + SUIT_SelectionFilter.h + SUIT_Selector.h + SUIT_SmartPtr.h + SUIT_Tools.h + SUIT_TreeSync.h +) + +# header files / to install +SET(suit_HEADERS ${_moc_HEADERS} ${_other_HEADERS}) + +# --- resources --- + +# resource files / to be processed by lrelease +SET(_ts_RESOURCES + resources/SUIT_msg_en.ts + resources/SUIT_msg_fr.ts + resources/SUIT_msg_ja.ts + resources/SUIT_images.ts +) + +# resource files / static +SET(_other_RESOURCES + resources/icon_visibility_on.png + resources/icon_visibility_off.png + resources/view_sync.png ) -QT4_WRAP_CPP(GUI_HEADERS_MOC ${GUI_HEADERS}) -SET(suit_SOURCES +# --- sources --- + +# sources / moc wrappings +QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS}) + +# sources / static +SET(_other_SOURCES SUIT_Accel.cxx SUIT_ActionOperation.cxx SUIT_Application.cxx + SUIT_CameraProperties.cxx SUIT_DataBrowser.cxx SUIT_DataObject.cxx SUIT_DataObjectIterator.cxx @@ -74,8 +123,8 @@ SET(suit_SOURCES SUIT_Desktop.cxx SUIT_ExceptionHandler.cxx SUIT_FileDlg.cxx - SUIT_LicenseDlg.cxx SUIT_FileValidator.cxx + SUIT_LicenseDlg.cxx SUIT_MessageBox.cxx SUIT_Operation.cxx SUIT_OverrideCursor.cxx @@ -86,30 +135,26 @@ SET(suit_SOURCES SUIT_SelectionMgr.cxx SUIT_Selector.cxx SUIT_Session.cxx + SUIT_ShortcutMgr.cxx SUIT_Study.cxx SUIT_Tools.cxx SUIT_TreeModel.cxx SUIT_ViewManager.cxx SUIT_ViewModel.cxx SUIT_ViewWindow.cxx - SUIT_ShortcutMgr.cxx - SUIT_CameraProperties.cxx -) -SET(GUITS_SOURCES - resources/SUIT_msg_en.ts - resources/SUIT_msg_fr.ts - resources/SUIT_msg_ja.ts - resources/SUIT_images.ts ) -ADD_LIBRARY(suit ${suit_SOURCES} ${GUI_HEADERS_MOC}) -TARGET_LINK_LIBRARIES(suit ${COMMON_LIBS}) +# sources / to compile +SET(suit_SOURCES ${_other_SOURCES} ${_moc_SOURCES}) + +# --- rules --- + +ADD_LIBRARY(suit ${suit_SOURCES}) +TARGET_LINK_LIBRARIES(suit ${_link_LIBRARIES}) INSTALL(TARGETS suit EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS}) -FILE(GLOB COMMON_HEADERS_H "${CMAKE_CURRENT_SOURCE_DIR}/*.h") -INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${SALOME_INSTALL_HEADERS}) -QT4_INSTALL_TS_RESOURCES("${GUITS_SOURCES}" "${SALOME_GUI_INSTALL_RES_DATA}") +INSTALL(FILES ${suit_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS}) +QT4_INSTALL_TS_RESOURCES("${_ts_RESOURCES}" "${SALOME_GUI_INSTALL_RES_DATA}") -FILE(GLOB GUIPNG_DATA "${CMAKE_CURRENT_SOURCE_DIR}/resources/*.png") -INSTALL(FILES ${GUIPNG_DATA} DESTINATION ${SALOME_GUI_INSTALL_RES_DATA}) +INSTALL(FILES ${_other_RESOURCES} DESTINATION ${SALOME_GUI_INSTALL_RES_DATA}) diff --git a/src/SUIT/SUIT_MessageBox.h b/src/SUIT/SUIT_MessageBox.h index 5cfaf3c0a..e950f5263 100755 --- a/src/SUIT/SUIT_MessageBox.h +++ b/src/SUIT/SUIT_MessageBox.h @@ -31,6 +31,7 @@ class SUIT_EXPORT SUIT_MessageBox : public QMessageBox { + Q_OBJECT public: // construction/destruction SUIT_MessageBox( QWidget* = 0 ); diff --git a/src/SUITApp/CMakeLists.txt b/src/SUITApp/CMakeLists.txt index 6ea25732c..424b18324 100755 --- a/src/SUITApp/CMakeLists.txt +++ b/src/SUITApp/CMakeLists.txt @@ -19,76 +19,92 @@ INCLUDE(UseQt4Ext) +# --- options --- + +# additional include directories INCLUDE_DIRECTORIES( ${QT_INCLUDES} - ${PTHREAD_INCLUDE_DIRS} ${PYTHON_INCLUDE_DIRS} - ${CMAKE_CURRENT_SOURCE_DIR} ${PROJECT_BINARY_DIR} - ${CMAKE_CURRENT_SOURCE_DIR}/../Qtx - ${CMAKE_CURRENT_SOURCE_DIR}/../SUIT - ${CMAKE_CURRENT_SOURCE_DIR}/../Style + ${PROJECT_SOURCE_DIR}/src/Qtx + ${PROJECT_SOURCE_DIR}/src/SUIT + ${PROJECT_SOURCE_DIR}/src/Style ) +# additional preprocessor / compiler flags +ADD_DEFINITIONS(${QT_DEFINITIONS} ${PYTHON_DEFINITIONS}) +IF(SALOME_USE_PYCONSOLE) + ADD_DEFINITIONS("-DSUIT_ENABLE_PYTHON") +ENDIF() +IF(ENABLE_TESTRECORDER) + ADD_DEFINITIONS("-DENABLE_TESTRECORDER ${TESTRECORDER_DEFINITIONS}") +ENDIF() + +# libraries to link to +SET(_link_LIBRARIES ${PLATFORM_LIBS} ${QT_LIBRARIES} qtx suit SalomeStyle) +IF(SALOME_USE_PYCONSOLE) + LIST(APPEND _link_LIBRARIES ${PYTHON_LIBRARIES}) +ENDIF() +IF(ENABLE_TESTRECORDER) + LIST(APPEND _link_LIBRARIES ${TESTRECORDER_LIBS}) +ENDIF() +# --- headers --- -SET(COMMON_LIBS - qtx - suit - SalomeStyle - ${QT_LIBRARIES} +# header files / to be processed by moc +SET(_moc_HEADERS + SUITApp_Application.h ) -SET(GUI_HEADERS SUITApp_Application.h) -QT4_WRAP_CPP(GUI_HEADERS_MOC ${GUI_HEADERS}) - -SET(SUITApp_SOURCES - SUITApp.cxx - SUITApp_Application.cxx +# header files / internal +# no processing currently: TODO: check for MSVS project +SET(_internal_HEADERS + SUITApp_init_python.hxx ) -SET(COMMON_HEADERS_HXX) + +# header files / no moc processing IF(SALOME_USE_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_LIBRARIES} - ) - ADD_DEFINITIONS("-DSUIT_ENABLE_PYTHON") -ENDIF(SALOME_USE_PYCONSOLE) + SET(_other_HEADERS SUITApp_init_python.hxx) +ENDIF() -IF(ENABLE_TESTRECORDER) - ADD_DEFINITIONS("-DENABLE_TESTRECORDER ${TESTRECORDER_DEFINITIONS}") - SET(COMMON_LIBS - ${COMMON_LIBS} - ${TESTRECORDER_LIBS} - ) -ENDIF(ENABLE_TESTRECORDER) +# header files / to install +SET(SUITApp_HEADERS ${_moc_HEADERS} ${_other_HEADERS}) -SET(GUITS_SOURCES +# --- resources --- + +# resource files / to be processed by lrelease +SET(_ts_RESOURCES resources/SUITApp_msg_en.ts resources/SUITApp_msg_fr.ts resources/SUITApp_msg_ja.ts ) -ADD_DEFINITIONS(${QT_DEFINITIONS} ${PYTHON_DEFINITIONS}) +# --- sources --- + +# sources / moc wrappings +QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS}) + +# sources / static +SET(_other_SOURCES + SUITApp_Application.cxx +) +IF(SALOME_USE_PYCONSOLE) + LIST(APPEND _other_SOURCES SUITApp_init_python.cxx) +ENDIF() + +# sources / to compile +SET(SUITApp_SOURCES ${_other_SOURCES} ${_moc_SOURCES}) + +# --- rules --- -ADD_LIBRARY(SUITApp ${SUITApp_SOURCES} ${GUI_HEADERS_MOC}) -TARGET_LINK_LIBRARIES(SUITApp ${COMMON_LIBS}) +ADD_LIBRARY(SUITApp ${SUITApp_SOURCES}) +TARGET_LINK_LIBRARIES(SUITApp ${_link_LIBRARIES}) INSTALL(TARGETS SUITApp EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS}) ADD_EXECUTABLE(TestSUITApp SUITApp.cxx) SET_TARGET_PROPERTIES(TestSUITApp PROPERTIES OUTPUT_NAME "SUITApp") -TARGET_LINK_LIBRARIES(TestSUITApp SUITApp ${COMMON_LIBS}) +TARGET_LINK_LIBRARIES(TestSUITApp ${_link_LIBRARIES} SUITApp) INSTALL(TARGETS TestSUITApp EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_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 ${SALOME_INSTALL_HEADERS}) -QT4_INSTALL_TS_RESOURCES("${GUITS_SOURCES}" "${SALOME_GUI_INSTALL_RES_DATA}") +INSTALL(FILES ${SUITApp_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS}) +QT4_INSTALL_TS_RESOURCES("${_ts_RESOURCES}" "${SALOME_GUI_INSTALL_RES_DATA}") diff --git a/src/SUPERVGraph/CMakeLists.txt b/src/SUPERVGraph/CMakeLists.txt deleted file mode 100755 index 73917211b..000000000 --- a/src/SUPERVGraph/CMakeLists.txt +++ /dev/null @@ -1,73 +0,0 @@ -# Copyright (C) 2012-2013 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(UseQt4Ext) - -INCLUDE_DIRECTORIES( - ${CAS_INCLUDE_DIRS} - ${QT_INCLUDES} - ${Boost_INCLUDE_DIRS} - ${PTHREAD_INCLUDE_DIRS} - ${QT_INCLUDES} - ${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 - resources/SUPERVGraph_msg_ja.ts -) - -ADD_DEFINITIONS(${QT_DEFINITIONS} ${CAS_DEFINITIONS} ${PYTHON_DEFINITIONS} ${BOOST_DEFINITIONS}) - -ADD_LIBRARY(SUPERVGraph ${SUPERVGraph_SOURCES} ${GUI_HEADERS_MOC}) -TARGET_LINK_LIBRARIES(SUPERVGraph ${QT_LIBRARIES} suit SalomeObject) -INSTALL(TARGETS SUPERVGraph EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS}) - -FILE(GLOB COMMON_HEADERS_H "${CMAKE_CURRENT_SOURCE_DIR}/*.h") -INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${SALOME_INSTALL_HEADERS}) -QT4_INSTALL_TS_RESOURCES("${GUITS_SOURCES}" "${SALOME_GUI_INSTALL_RES_DATA}") - -FILE(GLOB GUIPNG_DATA "${CMAKE_CURRENT_SOURCE_DIR}/resources/*.png") -INSTALL(FILES ${GUIPNG_DATA} DESTINATION ${SALOME_GUI_INSTALL_RES_DATA}) - - diff --git a/src/SUPERVGraph/SUPERVGraph.cxx b/src/SUPERVGraph/SUPERVGraph.cxx deleted file mode 100755 index 4acf75764..000000000 --- a/src/SUPERVGraph/SUPERVGraph.cxx +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (C) 2007-2013 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 SUPERVGraph : build Supervisor viewer into desktop -// File : SUPERVGraph.cxx -// Author : Nicolas REJNERI - -#include "SUPERVGraph.h" -#include "SUPERVGraph_ViewFrame.h" - -#include "SUIT_Desktop.h" -#include "SUIT_ViewWindow.h" - -/*! - Creates view -*/ -SUIT_ViewWindow* SUPERVGraph::createView(SUIT_Desktop* parent) -{ - return new SUPERVGraph_ViewFrame( parent ); -} - -extern "C" -{ - /*! - Creates view - */ - SUIT_ViewWindow* createView(SUIT_Desktop* parent) - { - return SUPERVGraph::createView(parent); - } -} diff --git a/src/SUPERVGraph/SUPERVGraph.h b/src/SUPERVGraph/SUPERVGraph.h deleted file mode 100755 index ab97bfcaf..000000000 --- a/src/SUPERVGraph/SUPERVGraph.h +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (C) 2007-2013 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 SUPERVGraph : build Supervisor viewer into desktop -// File : SUPERVGraph.h -// Author : Nicolas REJNERI - -#ifndef SUPERVGraph_HeaderFile -#define SUPERVGraph_HeaderFile - -#ifdef WIN32 -#if defined SUPERVGRAPH_EXPORTS || defined SUPERVGraph_EXPORTS -#define SUPERVGRAPH_EXPORT __declspec(dllexport) -#else -#define SUPERVGRAPH_EXPORT __declspec(dllimport) -#endif -#else -#define SUPERVGRAPH_EXPORT -#endif - -#if defined WIN32 -#pragma warning ( disable: 4251 ) -#endif - -#include - -class SUIT_Desktop; -class SUIT_ViewWindow; - -class SUPERVGRAPH_EXPORT SUPERVGraph : public QObject -{ - Q_OBJECT - -public : - - static SUIT_ViewWindow* createView ( SUIT_Desktop* parent); - -}; - -#endif diff --git a/src/SUPERVGraph/SUPERVGraph_ViewFrame.cxx b/src/SUPERVGraph/SUPERVGraph_ViewFrame.cxx deleted file mode 100755 index f0def3bef..000000000 --- a/src/SUPERVGraph/SUPERVGraph_ViewFrame.cxx +++ /dev/null @@ -1,361 +0,0 @@ -// Copyright (C) 2007-2013 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 SUPERVGraph : build Supervisor viewer into desktop -// File : SUPERVGraph_ViewFrame.cxx -// Author : Nicolas REJNERI - -#include "SUPERVGraph_ViewFrame.h" - -#include -#include - -//QT Include -#include -#include - -/*! - Constructor -*/ -SUPERVGraph_View::SUPERVGraph_View( QWidget* theParent ): QWidget( theParent ) -{ - init(theParent); -} - -/*! - Constructor -*/ -SUPERVGraph_View::SUPERVGraph_View( SUPERVGraph_View* theParent ): QWidget( theParent ) -{ - init(theParent); -} - -/*! - Builds popup for SUPERVGraph viewer -*/ -void SUPERVGraph_View::contextMenuPopup( QMenu* ) -{ - // to be implemented -} - -/*! - Initialization -*/ -void SUPERVGraph_View::init( QWidget* theParent ) -{ - if ( theParent->inherits( "QMainWindow" ) ) { - ( ( QMainWindow* )theParent )->setCentralWidget( this ); - } - else { - QBoxLayout* layout = new QVBoxLayout( theParent ); - layout->addWidget( this ); - } - -} - -/*! - Constructor -*/ -SUPERVGraph_ViewFrame::SUPERVGraph_ViewFrame( SUIT_Desktop* theDesktop ) - : SUIT_ViewWindow( theDesktop ) -{ - myView = 0; - - //myView = new SUPERVGraph_View(this); - // Set BackgroundColor - /* - int R = QAD_CONFIG->getSetting("SUPERVGraph:BackgroundColorRed").toInt(); - int G = QAD_CONFIG->getSetting("SUPERVGraph:BackgroundColorGreen").toInt(); - int B = QAD_CONFIG->getSetting("SUPERVGraph:BackgroundColorBlue").toInt(); - setBackgroundColor(QColor(R,G,B));*/ - - myToolBar = new QToolBar(this); - myToolBar->setFloatable(false); - //myToolBar->setCloseMode(QDockWindow::Undocked); - myToolBar->setWindowTitle(tr("LBL_TOOLBAR_LABEL")); - createActions(); - createToolBar(); -} - -/*! - Creates actions of SUPERVGraph view window -*/ -void SUPERVGraph_ViewFrame::createActions() -{ - if (!myActionsMap.isEmpty()) return; - SUIT_ResourceMgr* aResMgr = SUIT_Session::session()->resourceMgr(); - QtxAction* aAction; - - // Panning - aAction = new QtxAction(tr("MNU_PAN_VIEW"), aResMgr->loadPixmap( "SUPERVGraph", tr( "ICON_SUPERVGraph_PAN" ) ), - tr( "MNU_PAN_VIEW" ), 0, this); - aAction->setStatusTip(tr("DSC_PAN_VIEW")); - connect(aAction, SIGNAL(activated()), this, SLOT(onViewPan())); - myActionsMap[ PanId ] = aAction; - - // Reset - aAction = new QtxAction(tr("MNU_RESET_VIEW"), aResMgr->loadPixmap( "SUPERVGraph", tr( "ICON_SUPERVGraph_RESET" ) ), - tr( "MNU_RESET_VIEW" ), 0, this); - aAction->setStatusTip(tr("DSC_RESET_VIEW")); - connect(aAction, SIGNAL(activated()), this, SLOT(onViewReset())); - myActionsMap[ ResetId ] = aAction; -} - -/*! - Creates toolbar of SUPERVGraph view window -*/ -void SUPERVGraph_ViewFrame::createToolBar() -{ - myToolBar->addAction( myActionsMap[PanId] ); - myToolBar->addAction( myActionsMap[ResetId] ); -} - -/*! - Destructor -*/ -SUPERVGraph_ViewFrame::~SUPERVGraph_ViewFrame() {} - -/*! - Returns widget containing 3D-Viewer -*/ -SUPERVGraph_View* SUPERVGraph_ViewFrame::getViewWidget() -{ - return myView; -} - - -/*! - Sets new view widget - \param theView - new view widget -*/ -void SUPERVGraph_ViewFrame::setViewWidget( SUPERVGraph_View* theView ) -{ - myView = theView; -} - - -/*! - Display/hide Trihedron -*/ -void SUPERVGraph_ViewFrame::onViewTrihedron() -{ -// MESSAGE ( "SUPERVGraph_ViewFrame::onViewTrihedron" ) -} - -/*! - Provides top projection of the active view -*/ -void SUPERVGraph_ViewFrame::onViewTop() -{ -// MESSAGE ( "SUPERVGraph_ViewFrame::onViewTop" ) -} - -/*! - Provides bottom projection of the active view -*/ -void SUPERVGraph_ViewFrame::onViewBottom() -{ -// MESSAGE ( "SUPERVGraph_ViewFrame::onViewBottom" ) -} - -/*! - Provides left projection of the active view -*/ -void SUPERVGraph_ViewFrame::onViewLeft() -{ -// MESSAGE ( "SUPERVGraph_ViewFrame::onViewLeft" ) -} - -/*! - Provides right projection of the active view -*/ -void SUPERVGraph_ViewFrame::onViewRight() -{ -// MESSAGE ( "SUPERVGraph_ViewFrame::onViewRight" ) -} - -/*! - Provides back projection of the active view -*/ -void SUPERVGraph_ViewFrame::onViewBack() -{ -// MESSAGE ( "SUPERVGraph_ViewFrame::onViewBack" ) -} - -/*! - Provides front projection of the active view -*/ -void SUPERVGraph_ViewFrame::onViewFront() -{ -// MESSAGE ( "SUPERVGraph_ViewFrame::onViewFront" ) -} - -/*! - Reset the active view -*/ -void SUPERVGraph_ViewFrame::onViewReset() -{ -// MESSAGE ( "SUPERVGraph_ViewFrame::onViewReset" ) - if (myView) - myView->ResetView(); -} - -/*! - Rotates the active view -*/ -void SUPERVGraph_ViewFrame::onViewRotate() -{ -// MESSAGE ( "SUPERVGraph_ViewFrame::onViewRotate" ) -} - -/*! - Sets a new center of the active view -*/ -void SUPERVGraph_ViewFrame::onViewGlobalPan() -{ -// MESSAGE ( "SUPERVGraph_ViewFrame::onViewGlobalPan" ) -} - -/*! - Zooms the active view -*/ -void SUPERVGraph_ViewFrame::onViewZoom() -{ -// MESSAGE ( "SUPERVGraph_ViewFrame::onViewZoom" ) -} - -/*! - Moves the active view -*/ -void SUPERVGraph_ViewFrame::onViewPan() -{ -// MESSAGE ( "SUPERVGraph_ViewFrame::onViewPan" ) - if (myView != NULL) - myView->ActivatePanning(); -} - -/*! - Fits all obejcts within a rectangular area of the active view -*/ -void SUPERVGraph_ViewFrame::onViewFitArea() -{ -// MESSAGE ( "SUPERVGraph_ViewFrame::onViewFitArea" ) -} - -/*! - Fits all objects in the active view -*/ -void SUPERVGraph_ViewFrame::onViewFitAll() -{ -// MESSAGE ( "SUPERVGraph_ViewFrame::onViewFitAll" ) -} - -/*! - Set background of the viewport -*/ -void SUPERVGraph_ViewFrame::setBackgroundColor( const QColor& color ) -{ - if (myView) { - QPalette palette; - palette.setColor(myView->backgroundRole(), color); - myView->setPalette(palette); - } -} - -/*! - Returns background of the viewport -*/ -QColor SUPERVGraph_ViewFrame::backgroundColor() const -{ - if (myView) - return myView->palette().color( myView->backgroundRole() ); - return palette().color( backgroundRole() ); -} - -/*! -*/ -void SUPERVGraph_ViewFrame::onAdjustTrihedron() -{ -// MESSAGE ( "SUPERVGraph_ViewFrame::onAdjustTrihedron" ) -} - -/*! - Changes name of object - \param obj - object to be renamed - \param name - new name -*/ -void SUPERVGraph_ViewFrame::rename( const Handle(SALOME_InteractiveObject)& IObject, - QString newName ) -{ -// MESSAGE ( "SUPERVGraph_ViewFrame::rename" ) -} - -/*! - Unhilights all object in viewer - \param updateviewer - update current viewer -*/ -void SUPERVGraph_ViewFrame::unHighlightAll() -{ -// MESSAGE ( "SUPERVGraph_ViewFrame::unHighlightAll" ) -} - -/*! - Hilights/unhilights object in viewer - \param obj - object to be updated - \param hilight - if it is true, object will be hilighted, otherwise it will be unhilighted - \param update - update current viewer -*/ -void SUPERVGraph_ViewFrame::highlight( const Handle(SALOME_InteractiveObject)& IObject, - bool highlight, bool immediatly ) -{ -// MESSAGE ( "SUPERVGraph_ViewFrame::highlight" ) -} - -/*! - \return true if object is in viewer or in collector - \param obj - object to be checked - \param onlyInViewer - search object only in viewer (so object must be displayed) -*/ -bool SUPERVGraph_ViewFrame::isInViewer( const Handle(SALOME_InteractiveObject)& IObject ) -{ -// MESSAGE ( "SUPERVGraph_ViewFrame::isInViewer" ) - return false; -} - -/*! - \return true if object is displayed in viewer - \param obj - object to be checked -*/ -bool SUPERVGraph_ViewFrame::isVisible( const Handle(SALOME_InteractiveObject)& IObject ) -{ -// MESSAGE ( "SUPERVGraph_ViewFrame::isVisible" ) - return false; -} - -/*! - Custom resize event handler -*/ -void SUPERVGraph_ViewFrame::resizeEvent( QResizeEvent* theEvent ) -{ - QMainWindow::resizeEvent( theEvent ); - if ( myView ) myView->resizeView( theEvent ); -} diff --git a/src/SUPERVGraph/SUPERVGraph_ViewFrame.h b/src/SUPERVGraph/SUPERVGraph_ViewFrame.h deleted file mode 100755 index 6dfaf1799..000000000 --- a/src/SUPERVGraph/SUPERVGraph_ViewFrame.h +++ /dev/null @@ -1,138 +0,0 @@ -// Copyright (C) 2007-2013 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 SUPERVGraph : build Supervisor viewer into desktop -// File : SUPERVGraph_ViewFrame.h -// Author : Nicolas REJNERI - -#ifndef SUPERVGraph_ViewFrame_H -#define SUPERVGraph_ViewFrame_H - -#include "SUPERVGraph.h" - -#include "SALOME_InteractiveObject.hxx" -#include "SUIT_PopupClient.h" -#include "SUIT_ViewWindow.h" - -#include - -#ifdef WIN32 -#pragma warning ( disable:4251 ) -#endif - -class SUPERVGRAPH_EXPORT SUPERVGraph_View: public QWidget, public SUIT_PopupClient { - Q_OBJECT; - public: - static QString Type() { return "SUPERVGraphViewer"; } - - SUPERVGraph_View(QWidget* theParent); - SUPERVGraph_View(SUPERVGraph_View* theParent); - - virtual void ActivatePanning() = 0; - virtual void ResetView() = 0; - - /* redefine functions from SUIT_PopupClient */ - virtual QString popupClientType() const { return Type(); } - virtual void contextMenuPopup( QMenu* ); - - virtual void resizeView( QResizeEvent* theEvent ) {}; - - protected: - void init(QWidget* theParent); - -}; - -class SUPERVGRAPH_EXPORT SUPERVGraph_ViewFrame : public SUIT_ViewWindow { - Q_OBJECT - - public: - SUPERVGraph_ViewFrame(SUIT_Desktop* theDesktop ); - ~SUPERVGraph_ViewFrame(); - - SUPERVGraph_View* getViewWidget(); - void setViewWidget(SUPERVGraph_View* theView); - - void setBackgroundColor( const QColor& ); - QColor backgroundColor() const; - - void onAdjustTrihedron( ); - - /* interactive object management */ - void highlight( const Handle(SALOME_InteractiveObject)& IObject, - bool highlight, bool immediatly = true ); - void unHighlightAll(); - void rename( const Handle(SALOME_InteractiveObject)& IObject, - QString newName ); - bool isInViewer( const Handle(SALOME_InteractiveObject)& IObject ); - bool isVisible( const Handle(SALOME_InteractiveObject)& IObject ); - - /* selection */ - Handle(SALOME_InteractiveObject) FindIObject(const char* Entry) { Handle(SALOME_InteractiveObject) o; return o; }; - - /* display */ - void Display(const Handle(SALOME_InteractiveObject)& IObject, bool immediatly = true){}; - void DisplayOnly(const Handle(SALOME_InteractiveObject)& IObject){}; - void Erase(const Handle(SALOME_InteractiveObject)& IObject, bool immediatly = true){}; - void DisplayAll(){}; - void EraseAll(){}; - void Repaint() {}; - - QToolBar* getToolBar() { return myToolBar; } - - public slots: - void onViewPan(); - void onViewZoom(); - void onViewFitAll(); - void onViewFitArea(); - void onViewGlobalPan(); - void onViewRotate(); - void onViewReset(); - void onViewFront(); - void onViewBack(); - void onViewRight(); - void onViewLeft(); - void onViewBottom(); - void onViewTop(); - void onViewTrihedron(); - - protected: - void resizeEvent( QResizeEvent* theEvent ); - - private: - void createActions(); - void createToolBar(); - - //! Actions ID - enum { PanId, ResetId }; - typedef QMap ActionsMap; - - ActionsMap myActionsMap; - QToolBar* myToolBar; - - SUPERVGraph_View* myView; -}; - -#ifdef WIN32 -#pragma warning ( default:4251 ) -#endif - -#endif diff --git a/src/SUPERVGraph/SUPERVGraph_ViewManager.cxx b/src/SUPERVGraph/SUPERVGraph_ViewManager.cxx deleted file mode 100644 index ff31337e8..000000000 --- a/src/SUPERVGraph/SUPERVGraph_ViewManager.cxx +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (C) 2007-2013 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 "SUPERVGraph_ViewManager.h" - -#include "SUIT_ViewWindow.h" - -int SUPERVGraph_ViewManager::myMaxId = 0; - -/*! - Constructor -*/ -SUPERVGraph_ViewManager::SUPERVGraph_ViewManager( SUIT_Study* theStudy, - SUIT_Desktop* theDesktop, - SUIT_ViewModel* theViewModel ) - : SUIT_ViewManager( theStudy, theDesktop, theViewModel ) -{ - myId = ++myMaxId; -} - -/*! - Destructor -*/ -SUPERVGraph_ViewManager::~SUPERVGraph_ViewManager() -{ -} - -/*! - Sets view name - \param theView - view to assign name -*/ -void SUPERVGraph_ViewManager::setViewName(SUIT_ViewWindow* theView) -{ - int aPos = myViews.indexOf(theView); - theView->setWindowTitle( QString( "SUPERVISION scene:%1 - viewer:%2" ).arg( myId ).arg(aPos+1)); -} - -/*! - Fills popup menu with custom actions - \param popup - popup menu to be filled with -*/ -void SUPERVGraph_ViewManager::contextMenuPopup( QMenu* thePopup) -{ - SUIT_ViewManager::contextMenuPopup( thePopup ); - // to be implemented -} diff --git a/src/SUPERVGraph/SUPERVGraph_ViewManager.h b/src/SUPERVGraph/SUPERVGraph_ViewManager.h deleted file mode 100644 index 9a62aa9d4..000000000 --- a/src/SUPERVGraph/SUPERVGraph_ViewManager.h +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (C) 2007-2013 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 SUPERVGRAPH_VIEWMANAGER_H -#define SUPERVGRAPH_VIEWMANAGER_H - -#include "SUPERVGraph.h" - -#include "SUIT_ViewManager.h" - -class SUIT_Desktop; - -class SUPERVGRAPH_EXPORT SUPERVGraph_ViewManager : public SUIT_ViewManager -{ - Q_OBJECT - -public: - SUPERVGraph_ViewManager( SUIT_Study* theStudy, SUIT_Desktop* theDesktop, SUIT_ViewModel* theViewModel = 0 ); - ~SUPERVGraph_ViewManager(); - - virtual void contextMenuPopup( QMenu* thePopup ); - -protected: - void setViewName(SUIT_ViewWindow* theView); - -private: - static int myMaxId; - int myId; - -}; - -#endif diff --git a/src/SUPERVGraph/SUPERVGraph_ViewModel.cxx b/src/SUPERVGraph/SUPERVGraph_ViewModel.cxx deleted file mode 100644 index ed59e9c26..000000000 --- a/src/SUPERVGraph/SUPERVGraph_ViewModel.cxx +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (C) 2007-2013 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 "SUPERVGraph_ViewModel.h" -#include "SUPERVGraph_ViewFrame.h" -#include "SUIT_Desktop.h" -#include "SUIT_ViewWindow.h" - -/*! - Constructor -*/ -SUPERVGraph_Viewer::SUPERVGraph_Viewer() -:SUIT_ViewModel() -{ -} - -/*! - Destructor -*/ -SUPERVGraph_Viewer::~SUPERVGraph_Viewer() -{ -} - -/*! - Creates new view window - \param theDesktop - main window of application -*/ -SUIT_ViewWindow* SUPERVGraph_Viewer::createView(SUIT_Desktop* theDesktop) -{ - SUPERVGraph_ViewFrame* aRes = new SUPERVGraph_ViewFrame( theDesktop ); - return aRes; -} diff --git a/src/SUPERVGraph/SUPERVGraph_ViewModel.h b/src/SUPERVGraph/SUPERVGraph_ViewModel.h deleted file mode 100644 index 375b283c1..000000000 --- a/src/SUPERVGraph/SUPERVGraph_ViewModel.h +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (C) 2007-2013 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 SUPERVGRAPH_VIEWMODEL_H -#define SUPERVGRAPH_VIEWMODEL_H - -#include "SUPERVGraph.h" - -#include "SUIT_ViewModel.h" - -class SUPERVGRAPH_EXPORT SUPERVGraph_Viewer: public SUIT_ViewModel -{ - Q_OBJECT - -public: - static QString Type() { return "SUPERVGraphViewer"; } - - SUPERVGraph_Viewer(); - virtual ~SUPERVGraph_Viewer(); - - virtual SUIT_ViewWindow* createView(SUIT_Desktop* theDesktop); - virtual QString getType() const { return Type(); } - -}; - -#endif diff --git a/src/SUPERVGraph/resources/SUPERVGraph_images.ts b/src/SUPERVGraph/resources/SUPERVGraph_images.ts deleted file mode 100644 index 74ebf2e82..000000000 --- a/src/SUPERVGraph/resources/SUPERVGraph_images.ts +++ /dev/null @@ -1,15 +0,0 @@ - - - - - @default - - ICON_SUPERVGraph_PAN - superv_view_pan.png - - - ICON_SUPERVGraph_RESET - superv_view_reset.png - - - diff --git a/src/SUPERVGraph/resources/SUPERVGraph_msg_en.ts b/src/SUPERVGraph/resources/SUPERVGraph_msg_en.ts deleted file mode 100644 index 6a21a259e..000000000 --- a/src/SUPERVGraph/resources/SUPERVGraph_msg_en.ts +++ /dev/null @@ -1,27 +0,0 @@ - - - - - @default - - MNU_PAN_VIEW - Panning - - - DSC_PAN_VIEW - Panning the view - - - MNU_RESET_VIEW - Reset - - - DSC_RESET_VIEW - Reset View Point - - - LBL_TOOLBAR_LABEL - View Operations - - - diff --git a/src/SUPERVGraph/resources/SUPERVGraph_msg_fr.ts b/src/SUPERVGraph/resources/SUPERVGraph_msg_fr.ts deleted file mode 100755 index 27458b761..000000000 --- a/src/SUPERVGraph/resources/SUPERVGraph_msg_fr.ts +++ /dev/null @@ -1,27 +0,0 @@ - - - - - @default - - MNU_PAN_VIEW - Déplacement - - - DSC_PAN_VIEW - Déplacement de la vue - - - MNU_RESET_VIEW - Restaurer - - - DSC_RESET_VIEW - Restaurer le point de vue - - - LBL_TOOLBAR_LABEL - Opérations de visualisation - - - diff --git a/src/SUPERVGraph/resources/SUPERVGraph_msg_ja.ts b/src/SUPERVGraph/resources/SUPERVGraph_msg_ja.ts deleted file mode 100644 index 2cebf0b1e..000000000 --- a/src/SUPERVGraph/resources/SUPERVGraph_msg_ja.ts +++ /dev/null @@ -1,27 +0,0 @@ - - - - - @default - - MNU_PAN_VIEW - パン - - - DSC_PAN_VIEW - パン表示] - - - MNU_RESET_VIEW - リセット - - - DSC_RESET_VIEW - リセット ビュー ポイント - - - LBL_TOOLBAR_LABEL - [操作の表示 - - - diff --git a/src/SUPERVGraph/resources/superv_view_pan.png b/src/SUPERVGraph/resources/superv_view_pan.png deleted file mode 100644 index ec56cacc779342a978f183ecf747860c8b6dafb4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 982 zcmV;{11bE8P)z@;j(q!3lK=n!AY({UO#lFTB>(_`g8%^e{{R4h=>PzA zFaQARU;qF*m;eA5Z<1fdMgRZb!otG-18H_3W&!c>DFz52f`;Yh z=KlYG@Zf(vJw1@2;y}!e&rpB>!e<*(Vq)UoNnv3OZ?0TnIIE=v5_imOsnQ(>_Q@}D9Q|HpzmfY=u#@9*!A5&HlE#0WDiKR^HPSD@Ek zzkbaCa@oa;7a4y4{_O{p(+6UCAm#(&Px|`$DQaqJ3~X#{4Da5(V|e)RA;Yz6*FdiR z0t!=r00NsF6BF}yLQoI`!>?Zq4Bx&nFns>Zz!(z)vWNqS-$A_va>-9lVB{=URRycP zpsdWG&(6-kdhOZ^SVRE?5Q~nE&fmqMp$spM9AUWs@+E@^Q1mI#KqwFe;@8la1=_~I z2J*$jJ9ilVe*DOA?ZXF#7k~dU%-7RnNW63j9QyzP#B$}z6$wUv{}&HSOBrrFdBPyW z&(HAr=TDe{d{D#gLnA=o6)=Lf|NhPJ2I#_XKyN<>8oU@7aj@722p~`x$^o%15O2W} zQ4K(R5QwirT?%sXD=g|(05K?CodF0SP#A)o^9gFhL?B)Zjj^{zMn(Vgg6j zxpU_jK79D#4wN$jVr3vsfvN|&{yoSXfB<5F#?CWnLd}P!GmwE_`1tr3R)vHxJUVoU z;RMiI;U7Ty82F(McnHLu(3}E_l-nS400M{wntfhCo&E)yX#avZ-#{@A45MF<9x;Hz z4lSY{BV~fOP)EH02p|@y4KPE$Kyv_tjEu~^`}glN965WI;l_&>3~!m4VFpeGVn3)0 zVaeeeEFA&_5G?D#4E+fW52hzio+tt7dm^Ah;l~e#JMZ4X4D5u`pP`QU2lWw%{s$01 zxUwNTH0uR`vRkc+3M|{L0pd2OxFS>?3IGToW*i2Bk`pV``xg$qd*=yF8X#vr0J$9M zy07T20tg^xJOwPwRUpGpK{Y>y#^wX4;lH73-~b@N0A_|Q{Wj4Xb^rhX07*qoM6N<$ Ef)-GsSpWb4 diff --git a/src/SUPERVGraph/resources/superv_view_reset.png b/src/SUPERVGraph/resources/superv_view_reset.png deleted file mode 100644 index 66f81e60471b7b587c37166a4e206b45f74e7fc2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 918 zcmV;H18Mw;P)z@;j(q!3lK=n!AY({UO#lFTB>(_`g8%^e{{R4h=>PzA zFaQARU;qF*m;eA5Z<1fdMgRZ<3`s;mRCwBA`2YVu0}KO!sHi9>h~bSaP6`GHAOZXQ009Iu ztVK?a_y6WCKL3CH$@>5IfA;^Iw`2aBnTdlW&7exTp@zi+u{AD30Ro7Lk&#hUNQk5Q z?D;STpjR1~nHj+nii&(-KGfwPzyqZXfLH~Ij{*P!hzW=@vvYJAfQEtvwrzdL@b~Y3 zhTx#>3=Q?CrT~SeL)CtP(l4O+3pN7*0*D2Ojg5^(!JOKflMHLu++jF%N|j;rru$QX z!I2B}0Zi>zGy}h4GY}wvKrZ|XauEp3n0^K5WhREsj&mSx69e%89{T_R1ajfcn>Rmz zIq%;60AXz)^A6B;zi?=K-}sfC-?tzTH62r z+1dZM`}+RpVPyp=a)o&VAb=Q=3jlDg;ox}n@#jy5zyJSR0p*SZ#Xz=e0L9NFXlO8m zC@V8qN=Sg!-~8}_;lk_J40EqvXW0Gtu^UimH$VWPmo_{g8)rH={0C|R3ET$aE+9^W z#_sAO0|T(@KsZfX8>D6hvI_wMh!MSr0=mcm=$i9OU0oSe`1u*u-@C_f=i^5PHYO$p zdueHgKqVyxW?=4l`t>V=_OfLRAAkK40Gja;rXL`H7_pRjAVWa`o#`Ya<56K`#Na9` ziz0vj( - -#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 ); - CPPUNIT_TEST_SUITE_END(); - -public: - - void setUp(); - void tearDown(); - void testSalomeApp(); -}; - -#endif diff --git a/src/SalomeApp/Test/TestSalomeApp.cxx b/src/SalomeApp/Test/TestSalomeApp.cxx index ebddf0861..5dfd07166 100644 --- a/src/SalomeApp/Test/TestSalomeApp.cxx +++ b/src/SalomeApp/Test/TestSalomeApp.cxx @@ -20,14 +20,47 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// --- include all SalomeApp Test from basics until the present directory -// -#include "SalomeAppTest.hxx" +#include + +/*! + \class SalomeAppTest: test suit +*/ +class SalomeAppTest : public CppUnit::TestFixture +{ + CPPUNIT_TEST_SUITE( SalomeAppTest ); + CPPUNIT_TEST( testSalomeApp ); + CPPUNIT_TEST_SUITE_END(); + +public: + void setUp(); + void tearDown(); + void testSalomeApp(); +}; + +/*! + Set up each test case +*/ +void SalomeAppTest::setUp() +{ +} +/*! + Clean-up each test case +*/ +void SalomeAppTest::tearDown() +{ +} +/*! + Check SalomeApp functionality (empty for the moment) +*/ +void SalomeAppTest::testSalomeApp() +{ + printf("asdasdasdasdsadasdasdsdasdsad\n"); +} -// --- Registers the fixture into the 'registry' +// --- Register the fixture into the 'registry' CPPUNIT_TEST_SUITE_REGISTRATION( SalomeAppTest ); -// --- generic Main program from Basic/Test +// --- Generic main() program from Basics/Test (KERNEL module) #include "BasicMainTest.hxx" diff --git a/src/SalomeApp/pluginsdemo/CMakeLists.txt b/src/SalomeApp/pluginsdemo/CMakeLists.txt index 1e2749197..26bee90e8 100755 --- a/src/SalomeApp/pluginsdemo/CMakeLists.txt +++ b/src/SalomeApp/pluginsdemo/CMakeLists.txt @@ -25,16 +25,22 @@ # variable *_ROOT_DIR). # -SET(plugins_PYTHON - salome_plugins.py - smesh_plugins.py +# --- scripts --- + +# scripts / static +# TODO: process UIC files via PyQt4 pyuic tool, see UsePyQt4.cmake +SET(_plugins_SCRIPTS + minmax_dialog.py + minmax_plugin.py trihedron.py tubedialog_ui.py tubedialog.py tubebuilder.py + salome_plugins.py + smesh_plugins.py xalome.py - minmax_dialog.py - minmax_plugin.py ) -SALOME_INSTALL_SCRIPTS("${plugins_PYTHON}" ${SALOME_GUI_INSTALL_PLUGINS}/demo DEF_PERMS) +# --- rules --- + +SALOME_INSTALL_SCRIPTS("${_plugins_SCRIPTS}" ${SALOME_GUI_INSTALL_PLUGINS}/demo DEF_PERMS) diff --git a/src/Session/CMakeLists.txt b/src/Session/CMakeLists.txt index 40c994185..9c933a12b 100755 --- a/src/Session/CMakeLists.txt +++ b/src/Session/CMakeLists.txt @@ -17,93 +17,87 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # +# --- options --- + +# additional include directories INCLUDE_DIRECTORIES( ${QT_INCLUDES} ${LIBXML2_INCLUDE_DIR} ${PYTHON_INCLUDE_DIRS} - ${HDF5_INCLUDE_DIRS} - ${Boost_INCLUDE_DIRS} ${CAS_INCLUDE_DIRS} ${OMNIORB_INCLUDE_DIR} - ${PTHREAD_INCLUDE_DIRS} ${KERNEL_INCLUDE_DIRS} - ${PROJECT_BINARY_DIR}/idl ${PROJECT_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 + ${PROJECT_SOURCE_DIR}/src/Qtx + ${PROJECT_SOURCE_DIR}/src/SUIT + ${PROJECT_SOURCE_DIR}/src/Event + ${PROJECT_SOURCE_DIR}/src/Style +) + +# additional preprocessor / compiler flags +ADD_DEFINITIONS( + ${QT_DEFINITIONS} + ${LIBXML2_DEFINITIONS} + ${PYTHON_DEFINITIONS} + ${CAS_DEFINITIONS} + ${OMNIORB_DEFINITIONS} ) +IF(ENABLE_TESTRECORDER) + ADD_DEFINITIONS("-DENABLE_TESTRECORDER ${TESTRECORDER_DEFINITIONS}") +ENDIF() -SET(COMMON_LIBS +# libraries to link to +SET(_link_LIBRARIES + ${QT_LIBRARIES} + ${CAS_KERNEL} + ${OMNIORB_LIBRARIES} ${KERNEL_SalomeNS} ${KERNEL_SalomeLifeCycleCORBA} ${KERNEL_OpUtil} ${KERNEL_SALOMELocalTrace} ${KERNEL_SalomeCatalog} ${KERNEL_SalomeDSClient} - ${CAS_KERNEL} ${KERNEL_with_loggerTraceCollector} ${KERNEL_SalomeIDLKernel} ${KERNEL_SalomeContainer} - ${KERNEL_TOOLSDS} ${KERNEL_SalomeLauncher} ${KERNEL_Registry} ${KERNEL_SALOMEBasics} - ${OMNIORB_LIBRARIES} - suit - Event - SalomeIDLGUI - SalomeStyle - ${QT_LIBRARIES} + qtx suit Event SalomeStyle SalomeIDLGUI ) +IF(ENABLE_TESTRECORDER) + LIST(APPEND _link_LIBRARIES ${TESTRECORDER_LIBS}) +ENDIF() -ADD_DEFINITIONS(${QT_DEFINITIONS} ${LIBXML2_DEFINITIONS} ${PYTHON_DEFINITIONS} ${HDF5_DEFINITIONS} ${BOOST_DEFINITIONS} ${CAS_DEFINITIONS} ${OMNIORB_DEFINITIONS}) +# --- headers --- -IF(ENABLE_TESTRECORDER) - ADD_DEFINITIONS("-DENABLE_TESTRECORDER ${TESTRECORDER_DEFINITIONS}") - SET(COMMON_LIBS ${COMMON_LIBS} ${TESTRECORDER_LIBS}) -ENDIF(ENABLE_TESTRECORDER) +# header files / to install +SET(SalomeSession_HEADERS + SALOME_Session.hxx + Session_ServerCheck.hxx + Session_ServerLauncher.hxx + Session_ServerThread.hxx + Session_Session_i.hxx +) + +# --- sources --- +# sources / to compile SET(SalomeSession_SOURCES - Session_Session_i.cxx - Session_ServerThread.cxx - Session_ServerLauncher.cxx Session_ServerCheck.cxx + Session_ServerLauncher.cxx + Session_ServerThread.cxx + Session_Session_i.cxx ) + +# --- rules --- + ADD_LIBRARY(SalomeSession ${SalomeSession_SOURCES}) -TARGET_LINK_LIBRARIES(SalomeSession ${COMMON_LIBS}) +TARGET_LINK_LIBRARIES(SalomeSession ${_link_LIBRARIES}) INSTALL(TARGETS SalomeSession EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS}) -SET(SALOME_Session_Server_LIBS - ${COMMON_LIBS} - ${SalomeContainer} - ${SalomeResourcesManager} - ${TOOLSDS} - ${SalomeHDFPersist} - ${SalomeDSImpl} - ${SalomeGenericObj} - ${Registry} - ${SalomeNotification} - ${SALOMEBasics} - ${SalomeLauncher} - qtx - SalomeIDLGUI - SalomeSession - ${HDF5_LIBRARIES} - ${PYTHON_LIBRARIES} - ${OMNIORB_LIBRARIES} -) ADD_EXECUTABLE(SALOME_Session_Server SALOME_Session_Server.cxx) -TARGET_LINK_LIBRARIES(SALOME_Session_Server ${SALOME_Session_Server_LIBS}) +TARGET_LINK_LIBRARIES(SALOME_Session_Server ${_link_LIBRARIES} SalomeSession) INSTALL(TARGETS SALOME_Session_Server EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_BINS}) -SET(COMMON_HEADERS_H - Session_Session_i.hxx - SALOME_Session.hxx - Session_ServerLauncher.hxx - Session_ServerThread.hxx - Session_ServerCheck.hxx -) -INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${SALOME_INSTALL_HEADERS}) +INSTALL(FILES ${SalomeSession_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS}) diff --git a/src/Style/CMakeLists.txt b/src/Style/CMakeLists.txt index 0a4a6cf04..139c15578 100755 --- a/src/Style/CMakeLists.txt +++ b/src/Style/CMakeLists.txt @@ -16,33 +16,68 @@ # # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + INCLUDE(UseQt4Ext) +# --- options --- + +# additional include directories INCLUDE_DIRECTORIES( ${QT_INCLUDES} - ${KERNEL_INCLUDE_DIRS} - ${CMAKE_CURRENT_SOURCE_DIR} - ${CMAKE_CURRENT_SOURCE_DIR}/../Qtx + ${PROJECT_SOURCE_DIR}/src/Qtx ) -SET(COMMON_LIBS ${QT_LIBRARIES} qtx) +# additional preprocessor / compiler flags +ADD_DEFINITIONS(${QT_DEFINITIONS}) + +# libraries to link to +SET(_link_LIBRARIES ${QT_LIBRARIES} qtx) -SET(GUI_HEADERS +# --- headers --- + +# header files / to be processed by moc +SET(_moc_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 +# header files / internal +# no processing currently: TODO: check for MSVS project +SET(_internal_HEADERS Style_Model.h - Style_PrefDlg.h - Style_Salome.h - Style_Tools.h Style_ResourceMgr.h + Style_Tools.h +) + +# header files / no moc processing +SET(_other_HEADERS + Style.h +) + +# header files / to install (internal ones are excluded) +SET(SalomeStyle_HEADERS ${_moc_HEADERS} ${_other_HEADERS}) + +# --- resources --- + +# resource files / to be processed by rcc +SET(_rcc_RESOURCES Style.qrc) + +# resource files / to be processed by lrelease +SET(_ts_RESOURCES resources/Style_msg_fr.ts) + +# resource files / other (static) +SET(_other_RESOURCES resources/SalomeStyle.xml) + +# --- sources --- + +# sources / moc wrappings +QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS}) + +# sources / rcc wrappings +QT4_ADD_RESOURCES(_rcc_SOURCES ${_rcc_RESOURCES}) + +# sources / static +SET(_other_SOURCES Style_Model.cxx Style_PrefDlg.cxx Style_ResourceMgr.cxx @@ -50,23 +85,16 @@ SET(SalomeStyle_SOURCES Style_Tools.cxx ) -SET(GUITS_SOURCES - resources/Style_msg_fr.ts -) +# sources / to compile +SET(SalomeStyle_SOURCES ${_other_SOURCES} ${_moc_SOURCES} ${_rcc_SOURCES}) -ADD_DEFINITIONS(${QT_DEFINITIONS}) +# --- rules --- -ADD_LIBRARY(SalomeStyle ${SalomeStyle_SOURCES} ${GUI_HEADERS_MOC} ${RCC_SRCS}) -TARGET_LINK_LIBRARIES(SalomeStyle ${COMMON_LIBS}) +ADD_LIBRARY(SalomeStyle ${SalomeStyle_SOURCES}) +TARGET_LINK_LIBRARIES(SalomeStyle ${_link_LIBRARIES}) INSTALL(TARGETS SalomeStyle EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS}) -SET(COMMON_HEADERS_H - Style.h - Style_PrefDlg.h - Style_Salome.h -) - -INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${SALOME_INSTALL_HEADERS}) -QT4_INSTALL_TS_RESOURCES("${GUITS_SOURCES}" "${SALOME_GUI_INSTALL_RES_DATA}") +INSTALL(FILES ${SalomeStyle_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS}) +QT4_INSTALL_TS_RESOURCES("${_ts_RESOURCES}" "${SALOME_GUI_INSTALL_RES_DATA}") -INSTALL(FILES resources/SalomeStyle.xml DESTINATION ${SALOME_GUI_INSTALL_RES_DATA}) +INSTALL(FILES "${_other_RESOURCES}" DESTINATION ${SALOME_GUI_INSTALL_RES_DATA}) diff --git a/src/TOOLSGUI/CMakeLists.txt b/src/TOOLSGUI/CMakeLists.txt index 35e4cbbee..b590fc4bb 100755 --- a/src/TOOLSGUI/CMakeLists.txt +++ b/src/TOOLSGUI/CMakeLists.txt @@ -19,51 +19,83 @@ INCLUDE(UseQt4Ext) +# --- options --- INCLUDE_DIRECTORIES( - ${CAS_INCLUDE_DIRS} ${QT_INCLUDES} + ${CAS_INCLUDE_DIRS} ${OMNIORB_INCLUDE_DIR} ${Boost_INCLUDE_DIRS} - ${PTHREAD_INCLUDE_DIRS} ${KERNEL_INCLUDE_DIRS} - ${PROJECT_BINARY_DIR}/idl - ${CMAKE_CURRENT_SOURCE_DIR}/../Qtx - ${CMAKE_CURRENT_SOURCE_DIR}/../SUIT) + ${PROJECT_SOURCE_DIR}/src/Qtx + ${PROJECT_SOURCE_DIR}/src/SUIT +) + +# additional preprocessor / compiler flags +ADD_DEFINITIONS( + ${QT_DEFINITIONS} + ${CAS_DEFINITIONS} + ${BOOST_DEFINITIONS} + ${OMNIORB_DEFINITIONS} +) -SET(COMMON_LIBS +# libraries to link to +SET(_link_LIBRARIES ${QT_LIBRARIES} - suit ${CAS_KERNEL} ${KERNEL_SalomeIDLKernel} ${KERNEL_SALOMELocalTrace} ${KERNEL_SalomeNS} ${KERNEL_OpUtil} ${OMNIORB_LIBRARIES} - SalomeIDLGUI + qtx suit ) -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 +# --- headers --- + +# header files / to be processed by moc +SET(_moc_HEADERS + ToolsGUI_CatalogGeneratorDlg.h + ToolsGUI_RegWidget.h ) -SET(GUITS_SOURCES +# header files / no moc processing +SET(_other_HEADERS + ToolsGUI.h +) + +# header files / to install +SET(ToolsGUI_HEADERS ${_moc_HEADERS} ${_other_HEADERS}) + +# --- resources --- + +# resource files / to be processed by lrelease +SET(_ts_RESOURCES resources/ToolsGUI_msg_en.ts resources/ToolsGUI_msg_fr.ts resources/ToolsGUI_msg_ja.ts +) + +# --- sources --- + +# sources / moc wrappings +QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS}) + +# sources / static +SET(_other_SOURCES + ToolsGUI.cxx + ToolsGUI_CatalogGeneratorDlg.cxx + ToolsGUI_RegWidget.cxx ) -ADD_DEFINITIONS(${QT_DEFINITIONS} ${CAS_DEFINITIONS} ${BOOST_DEFINITIONS} ${OMNIORB_DEFINITIONS}) +# sources / to compile +SET(ToolsGUI_SOURCES ${_other_SOURCES} ${_moc_SOURCES}) +# --- rules --- -ADD_LIBRARY(ToolsGUI ${ToolsGUI_SOURCES} ${GUI_HEADERS}) -TARGET_LINK_LIBRARIES(ToolsGUI ${COMMON_LIBS}) +ADD_LIBRARY(ToolsGUI ${ToolsGUI_SOURCES}) +TARGET_LINK_LIBRARIES(ToolsGUI ${_link_LIBRARIES}) INSTALL(TARGETS ToolsGUI EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS}) -FILE(GLOB COMMON_HEADERS_H "${CMAKE_CURRENT_SOURCE_DIR}/*.h") -INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${SALOME_INSTALL_HEADERS}) -QT4_INSTALL_TS_RESOURCES("${GUITS_SOURCES}" "${SALOME_GUI_INSTALL_RES_DATA}") +INSTALL(FILES ${ToolsGUI_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS}) +QT4_INSTALL_TS_RESOURCES("${_ts_RESOURCES}" "${SALOME_GUI_INSTALL_RES_DATA}") diff --git a/src/TreeData/CMakeLists.txt b/src/TreeData/CMakeLists.txt index d01cde94a..7b5b85a69 100755 --- a/src/TreeData/CMakeLists.txt +++ b/src/TreeData/CMakeLists.txt @@ -16,62 +16,94 @@ # # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -INCLUDE(UseQt4Ext) ADD_SUBDIRECTORY(Test) +INCLUDE(UseQt4Ext) + +# --- options --- + +# additional include directories INCLUDE_DIRECTORIES( ${CAS_INCLUDE_DIRS} ${QT_INCLUDES} ${OMNIORB_INCLUDE_DIR} ${Boost_INCLUDE_DIRS} - ${PTHREAD_INCLUDE_DIRS} ${KERNEL_INCLUDE_DIRS} - ${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 + ${PROJECT_SOURCE_DIR}/src/CAM + ${PROJECT_SOURCE_DIR}/src/GuiHelpers + ${PROJECT_SOURCE_DIR}/src/LightApp + ${PROJECT_SOURCE_DIR}/src/ObjBrowser + ${PROJECT_SOURCE_DIR}/src/Qtx + ${PROJECT_SOURCE_DIR}/src/STD + ${PROJECT_SOURCE_DIR}/src/SUIT + ${PROJECT_SOURCE_DIR}/src/SalomeApp ) +# additional preprocessor / compiler flags +ADD_DEFINITIONS( + ${CAS_DEFINITIONS} + ${QT_DEFINITIONS} + ${BOOST_DEFINITIONS} + ${OMNIORB_DEFINITIONS} +) -SET(COMMON_LIBS +# libraries to link to +SET(_link_LIBRARIES ${OMNIORB_LIBRARIES} ${QT_LIBRARIES} - ${KERNEL_LDFLAGS} - ${KERNEL_SalomeLifeCycleCORBA} - ${KERNEL_SalomeKernelHelpers} - SalomeApp - LightApp - suit - qtx - CAM - std - ObjBrowser + ${KERNEL_SalomeLifeCycleCORBA} ${KERNEL_SalomeKernelHelpers} + qtx suit std CAM ObjBrowser LightApp SalomeApp ) -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 +# --- headers --- + +# header files / to be processed by moc +SET(_moc_HEADERS + TreeModel.hxx + TreeObserver.hxx + TreeView.hxx +) + +# header files / no moc processing +SET(_other_HEADERS + DataModel.hxx + DataObject.hxx + DataProcessor.hxx + DockWidgets.hxx + TreeData.hxx + TreeGuiManager.hxx + TreeItem.hxx +) + +# header files / to install +SET(SalomeTreeData_HEADERS ${_moc_HEADERS} ${_other_HEADERS}) + +# --- sources --- + +# sources / moc wrappings +QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS}) + +# sources / static +SET(_other_SOURCES DataModel.cxx DataObject.cxx DataProcessor.cxx + DockWidgets.cxx TreeGuiManager.cxx + TreeItem.cxx + TreeModel.cxx + TreeObserver.cxx + TreeView.cxx ) -ADD_DEFINITIONS(${CAS_DEFINITIONS} ${QT_DEFINITIONS} ${BOOST_DEFINITIONS} ${OMNIORB_DEFINITIONS}) +# sources / to compile +SET(SalomeTreeData_SOURCES ${_other_SOURCES} ${_moc_SOURCES}) + +# --- rules --- -ADD_LIBRARY(SalomeTreeData ${SalomeTreeData_SOURCES} ${GUI_HEADERS_MOC}) -TARGET_LINK_LIBRARIES(SalomeTreeData ${COMMON_LIBS}) +ADD_LIBRARY(SalomeTreeData ${SalomeTreeData_SOURCES}) +TARGET_LINK_LIBRARIES(SalomeTreeData ${_link_LIBRARIES}) INSTALL(TARGETS SalomeTreeData EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS}) -FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx") -INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${SALOME_INSTALL_HEADERS}) +INSTALL(FILES ${SalomeTreeData_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS}) diff --git a/src/TreeData/Test/CMakeLists.txt b/src/TreeData/Test/CMakeLists.txt index 2f9dc2146..741f24cfe 100755 --- a/src/TreeData/Test/CMakeLists.txt +++ b/src/TreeData/Test/CMakeLists.txt @@ -16,8 +16,12 @@ # # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + INCLUDE(UseQt4Ext) +# --- options --- + +# additional include directories INCLUDE_DIRECTORIES( ${OMNIORB_INCLUDE_DIR} ${QT_INCLUDES} @@ -27,38 +31,45 @@ INCLUDE_DIRECTORIES( ${PROJECT_SOURCE_DIR}/src/TreeData ) -SET(COMMON_LIBS +# additional preprocessor / compiler flags +ADD_DEFINITIONS(${OMNIORB_DEFINITIONS} ${QT_DEFINITIONS}) + +# libraries to link to +SET(_link_LIBRARIES ${CORBA_LIBS} ${QT_LIBRARIES} - SalomeTreeData - SalomeGuiHelpers - ${SalomeLifeCycleCORBA} - ${SalomeKernelHelpers} + SalomeTreeData SalomeGuiHelpers + ${KERNEL_SalomeLifeCycleCORBA} ${KERNEL_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}) +# --- resources --- -SET(TreeData_guitester_SOURCES - testhelper.cxx - guitester.cxx - mainwindow.cxx - MyDataModel.cxx -) +# resource files / to be processed by uic +SET(_uic_files mainwindow.ui) -ADD_DEFINITIONS(${OMNIORB_DEFINITIONS} ${QT_DEFINITIONS}) +# --- headers --- -ADD_EXECUTABLE(TreeData_guitester ${TreeData_guitester_SOURCES} ${GUI_HEADERS} ${GUI_FORMS_HEADERS}) -TARGET_LINK_LIBRARIES(TreeData_guitester ${COMMON_LIBS}) +# header files / to be processed by moc +SET(_moc_HEADERS mainwindow.hxx) -SET(TreeData_tester_SOURCES - tester.cxx - MyDataModel.cxx -) +# header files / uic wrappings +QT4_WRAP_UI(_uic_HEADERS ${_uic_files}) + +# --- sources --- + +# sources / moc wrappings +QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS}) + +# sources / to compile +SET(TreeData_guitester_SOURCES MyDataModel.cxx guitester.cxx mainwindow.cxx testhelper.cxx ${_moc_SOURCES} ${_uic_HEADERS}) +SET(TreeData_tester_SOURCES MyDataModel.cxx tester.cxx) + +# --- rules --- + +ADD_EXECUTABLE(TreeData_guitester ${TreeData_guitester_SOURCES}) +TARGET_LINK_LIBRARIES(TreeData_guitester ${_link_LIBRARIES}) ADD_EXECUTABLE(TreeData_tester ${TreeData_tester_SOURCES}) -TARGET_LINK_LIBRARIES(TreeData_tester ${COMMON_LIBS}) +TARGET_LINK_LIBRARIES(TreeData_tester ${_link_LIBRARIES}) INSTALL(TARGETS TreeData_guitester TreeData_tester DESTINATION ${SALOME_INSTALL_BINS}) diff --git a/src/VTKViewer/CMakeLists.txt b/src/VTKViewer/CMakeLists.txt index ddb8bce52..c419cef22 100755 --- a/src/VTKViewer/CMakeLists.txt +++ b/src/VTKViewer/CMakeLists.txt @@ -16,121 +16,166 @@ # # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # + INCLUDE(UseQt4Ext) INCLUDE(${VTK_USE_FILE}) +# --- options --- + +# additional include directories INCLUDE_DIRECTORIES( ${CAS_INCLUDE_DIRS} ${QT_INCLUDES} - ${PTHREAD_INCLUDE_DIRS} ${KERNEL_INCLUDE_DIRS} - ${CMAKE_CURRENT_SOURCE_DIR}/../Qtx - ${CMAKE_CURRENT_SOURCE_DIR}/../SUIT + ${PROJECT_SOURCE_DIR}/src/Qtx + ${PROJECT_SOURCE_DIR}/src/SUIT ) +# additional preprocessor / compiler flags ADD_DEFINITIONS(${CAS_DEFINITIONS} ${QT_DEFINITIONS}) -SET(COMMON_LIBS ${QT_LIBRARIES} ${OPENGL_LIBRARIES} ${VTK_LIBRARIES} ${CAS_KERNEL} qtx suit ${KERNEL_SALOMELocalTrace}) +# libraries to link to +SET(_link_LIBRARIES ${QT_LIBRARIES} ${OPENGL_LIBRARIES} ${VTK_LIBRARIES} ${CAS_KERNEL} qtx suit) -SET(GUI_HEADERS +# --- headers --- + +# header files / to be processed by moc +SET(_moc_HEADERS + VTKViewer_MarkerDlg.h + VTKViewer_MarkerWidget.h 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}) +# header files / no moc processing +SET(_other_HEADERS + VTKViewer.h + VTKViewer_Actor.h + VTKViewer_AppendFilter.h + VTKViewer_Algorithm.h + VTKViewer_ArcBuilder.h + VTKViewer_CellCenters.h + VTKViewer_CellLocationsArray.h + VTKViewer_ConvexTool.h + VTKViewer_DataSetMapper.h + VTKViewer_ExtractUnstructuredGrid.h + VTKViewer_Filter.h + VTKViewer_FramedTextActor.h + VTKViewer_Functor.h + VTKViewer_GeometryFilter.h + VTKViewer_InteractorStyle.h + VTKViewer_MarkerDef.h + VTKViewer_MarkerUtils.h + VTKViewer_OpenGLRenderer.h + VTKViewer_PolyDataMapper.h + VTKViewer_ShrinkFilter.h + VTKViewer_Texture.h + VTKViewer_Transform.h + VTKViewer_TransformFilter.h + VTKViewer_Trihedron.h + VTKViewer_Utilities.h +) + +# header files / to install +SET(VTKViewer_HEADERS ${_moc_HEADERS} ${_other_HEADERS}) -SET(VTKViewer_SOURCES - VTKViewer_CellLocationsArray.cxx +# --- resources --- + +# resource files / to be processed by rcc +SET(_rcc_RESOURCES VTKViewer.qrc) + +# resource files / to be processed by lrelease +SET(_ts_RESOURCES + resources/VTKViewer_images.ts + resources/VTKViewer_msg_en.ts + resources/VTKViewer_msg_fr.ts + resources/VTKViewer_msg_ja.ts +) + +# resource files / static +SET(_other_RESOURCES + resources/vtk_view_anticlockwise.png + resources/vtk_view_clockwise.png + resources/vtk_view_back.png + resources/vtk_view_bottom.png + resources/vtk_view_camera_dump.png + resources/vtk_view_fitall.png + resources/vtk_view_fitarea.png + resources/vtk_view_front.png + resources/vtk_view_glpan.png + resources/vtk_view_left.png + resources/vtk_view_pan.png + resources/vtk_view_reset.png + resources/vtk_view_right.png + resources/vtk_view_rotate.png + resources/vtk_view_top.png + resources/vtk_view_triedre.png + resources/vtk_view_zoom.png + resources/marker_1.png + resources/marker_2.png + resources/marker_3.png + resources/marker_4.png + resources/marker_5.png + resources/marker_6.png + resources/marker_7.png + resources/marker_8.png + resources/marker_9.png +) + +# --- sources --- + +# sources / rcc wrappings +QT4_ADD_RESOURCES(_rcc_SOURCES ${_rcc_RESOURCES}) + +# sources / moc wrappings +QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS}) + +# sources / static +SET(_other_SOURCES VTKViewer_Actor.cxx - VTKViewer_FramedTextActor.cxx + VTKViewer_Algorithm.cxx + VTKViewer_AppendFilter.cxx + VTKViewer_ArcBuilder.cxx + VTKViewer_CellCenters.cxx + VTKViewer_CellLocationsArray.cxx + VTKViewer_ConvexTool.cxx + VTKViewer_DataSetMapper.cxx VTKViewer_ExtractUnstructuredGrid.cxx VTKViewer_Filter.cxx + VTKViewer_FramedTextActor.cxx VTKViewer_GeometryFilter.cxx - VTKViewer_AppendFilter.cxx - VTKViewer_Algorithm.cxx VTKViewer_InteractorStyle.cxx + VTKViewer_MarkerDlg.cxx + VTKViewer_MarkerUtils.cxx + VTKViewer_MarkerWidget.cxx + VTKViewer_OpenGLRenderer.cxx + VTKViewer_PolyDataMapper.cxx VTKViewer_RenderWindow.cxx VTKViewer_RenderWindowInteractor.cxx VTKViewer_ShrinkFilter.cxx + VTKViewer_Texture.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 - resources/VTKViewer_msg_ja.ts ) -ADD_LIBRARY(VTKViewer ${VTKViewer_SOURCES} ${GUI_HEADERS_MOC} ${RCC_SRCS}) -TARGET_LINK_LIBRARIES(VTKViewer ${COMMON_LIBS}) -INSTALL(TARGETS VTKViewer EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS}) +# sources / to compile +SET(VTKViewer_SOURCES ${_other_SOURCES} ${_moc_SOURCES} ${_rcc_SOURCES}) -#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 ${SALOME_INSTALL_BINS}) +# --- rules --- -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 -) +ADD_LIBRARY(VTKViewer ${VTKViewer_SOURCES}) +TARGET_LINK_LIBRARIES(VTKViewer ${_link_LIBRARIES}) +INSTALL(TARGETS VTKViewer EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS}) -INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${SALOME_INSTALL_HEADERS}) -QT4_INSTALL_TS_RESOURCES("${GUITS_SOURCES}" "${SALOME_GUI_INSTALL_RES_DATA}") +INSTALL(FILES ${VTKViewer_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS}) +QT4_INSTALL_TS_RESOURCES("${_ts_RESOURCES}" "${SALOME_GUI_INSTALL_RES_DATA}") -FILE(GLOB GUIPNG_DATA "${CMAKE_CURRENT_SOURCE_DIR}/resources/*.png") -INSTALL(FILES ${GUIPNG_DATA} DESTINATION ${SALOME_GUI_INSTALL_RES_DATA}) +INSTALL(FILES ${_other_RESOURCES} DESTINATION ${SALOME_GUI_INSTALL_RES_DATA}) diff --git a/src/VTKViewer/VTKViewer.cxx b/src/VTKViewer/VTKViewer.cxx deleted file mode 100644 index 24d0f77db..000000000 --- a/src/VTKViewer/VTKViewer.cxx +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (C) 2007-2013 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 VTKViewer : build VTK viewer into Salome desktop -// File : -// Author : - -#include "VTKViewer_Actor.h" -#include "VTKViewer_ExtractUnstructuredGrid.h" -#include "VTKViewer_ConvexTool.h" -#include "VTKViewer_Filter.h" -#include "VTKViewer_GeometryFilter.h" -#include "VTKViewer_AppendFilter.h" -#include "VTKViewer_Algorithm.h" -#include "VTKViewer_InteractorStyle.h" -#include "VTKViewer_RenderWindow.h" -#include "VTKViewer_RenderWindowInteractor.h" -#include "VTKViewer_ShrinkFilter.h" -#include "VTKViewer_TransformFilter.h" -#include "VTKViewer_Transform.h" -#include "VTKViewer_Trihedron.h" -#include "VTKViewer_Utilities.h" -#include "VTKViewer_ViewManager.h" -#include "VTKViewer_ViewModel.h" -#include "VTKViewer_ViewWindow.h" -#include "VTKViewer_Functor.h" - -int -main(int argc, char** argv) -{ - return 0; -} diff --git a/src/ViewerTools/CMakeLists.txt b/src/ViewerTools/CMakeLists.txt index 4b24bb6a3..e644a6a4c 100755 --- a/src/ViewerTools/CMakeLists.txt +++ b/src/ViewerTools/CMakeLists.txt @@ -19,30 +19,64 @@ INCLUDE(UseQt4Ext) +# --- options --- + +# additional include directories INCLUDE_DIRECTORIES( ${QT_INCLUDES} - ${CMAKE_CURRENT_SOURCE_DIR}/../Qtx + ${PROJECT_SOURCE_DIR}/src/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 + +# additional preprocessor / compiler flags +ADD_DEFINITIONS(${QT_DEFINITIONS}) + +# libraries to link to +SET(_link_LIBRARIES ${QT_LIBRARIES} qtx) + +# --- headers --- + +# header files / to be processed by moc +SET(_moc_HEADERS + ViewerTools_CubeAxesDlgBase.h + ViewerTools_DialogBase.h + ViewerTools_FontWidgetBase.h ) -SET(GUITS_SOURCES +# header files / no moc processing +SET(_other_HEADERS ViewerTools.h) + +# header files / to install +SET(ViewerTools_HEADERS ${_moc_HEADERS} ${_other_HEADERS}) + +# --- resources --- + +# resource files / to be processed by lrelease +SET(_ts_RESOURCES resources/ViewerTools_msg_en.ts resources/ViewerTools_msg_fr.ts resources/ViewerTools_msg_ja.ts ) -ADD_DEFINITIONS(${QT_DEFINITIONS}) +# --- sources --- + +# sources / moc wrappings +QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS}) + +# sources / static +SET(_other_SOURCES + ViewerTools_CubeAxesDlgBase.cxx + ViewerTools_DialogBase.cxx + ViewerTools_FontWidgetBase.cxx +) + +# sources / to compile +SET(ViewerTools_SOURCES ${_other_SOURCES} ${_moc_SOURCES}) + +# --- rules --- -ADD_LIBRARY(ViewerTools ${ViewerTools_SOURCES} ${GUI_HEADERS_MOC}) -TARGET_LINK_LIBRARIES(ViewerTools qtx ${QT_LIBRARIES}) +ADD_LIBRARY(ViewerTools ${ViewerTools_SOURCES}) +TARGET_LINK_LIBRARIES(ViewerTools ${_link_LIBRARIES}) INSTALL(TARGETS ViewerTools EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS}) -FILE(GLOB COMMON_HEADERS_H "${CMAKE_CURRENT_SOURCE_DIR}/*.h") -INSTALL(FILES ${COMMON_HEADERS_H} DESTINATION ${SALOME_INSTALL_HEADERS}) -QT4_INSTALL_TS_RESOURCES("${GUITS_SOURCES}" "${SALOME_GUI_INSTALL_RES_DATA}") +INSTALL(FILES ${ViewerTools_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS}) +QT4_INSTALL_TS_RESOURCES("${_ts_RESOURCES}" "${SALOME_GUI_INSTALL_RES_DATA}") -- 2.30.2