]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Porting to SALOME_8.2.0
authornds <nds@opencascade.com>
Thu, 15 Dec 2016 09:21:39 +0000 (12:21 +0300)
committernds <nds@opencascade.com>
Thu, 15 Dec 2016 09:21:39 +0000 (12:21 +0300)
93 files changed:
CMakeCommon/FindCAS.cmake
CMakeCommon/FindQt.cmake [deleted file]
CMakeCommon/FindSalomeQt5.cmake [new file with mode: 0644]
CMakeCommon/SalomeMacros.cmake [new file with mode: 0644]
CMakeCommon/UseQtExt.cmake [new file with mode: 0644]
CMakeLists.txt
build_Salome_deb.bat
build_Salome_eclipse.bat
src/CollectionPlugin/CMakeLists.txt
src/GeomAlgoAPI/CMakeLists.txt
src/GeomAlgoAPI/GeomAlgoAPI_ShapeTools.cpp
src/GeomValidators/GeomValidators_Face.cpp
src/Model/Model_Application.cpp
src/Model/Model_Application.h
src/Model/Model_AttributeSelectionList.cpp
src/Model/Model_Document.cpp
src/ModuleBase/CMakeLists.txt
src/ModuleBase/ModuleBase_FilterValidated.cpp
src/ModuleBase/ModuleBase_FilterValidated.h
src/ModuleBase/ModuleBase_IModule.h
src/ModuleBase/ModuleBase_ISelection.h
src/ModuleBase/ModuleBase_ResultPrs.cpp
src/ModuleBase/ModuleBase_ResultPrs.h
src/ModuleBase/ModuleBase_Tools.h
src/ModuleBase/ModuleBase_ViewerFilters.cpp
src/ModuleBase/ModuleBase_ViewerFilters.h
src/ModuleBase/ModuleBase_ViewerPrs.cpp
src/ModuleBase/ModuleBase_ViewerPrs.h
src/ModuleBase/ModuleBase_WidgetExprEditor.cpp
src/ModuleBase/ModuleBase_WidgetValidated.h
src/ParametersPlugin/CMakeLists.txt
src/PartSet/CMakeLists.txt
src/PartSet/PartSet_FilterInfinite.cpp
src/PartSet/PartSet_FilterInfinite.h
src/PartSet/PartSet_Filters.cpp
src/PartSet/PartSet_Filters.h
src/PartSet/PartSet_Module.cpp
src/PartSet/PartSet_OperationPrs.cpp
src/PartSet/PartSet_OperationPrs.h
src/PartSet/PartSet_ResultSketchPrs.cpp
src/PartSet/PartSet_ResultSketchPrs.h
src/PartSet/PartSet_SketcherMgr.h
src/PartSet/PartSet_Tools.cpp
src/PartSet/PartSet_Tools.h
src/PythonAPI/CMakeLists.txt
src/PythonAddons/CMakeLists.txt
src/SHAPERGUI/CMakeLists.txt
src/SamplePanelPlugin/CMakeLists.txt
src/SketchPlugin/SketchPlugin_Feature.h
src/SketcherPrs/SketcherPrs_Angle.cpp
src/SketcherPrs/SketcherPrs_Angle.h
src/SketcherPrs/SketcherPrs_Coincident.cpp
src/SketcherPrs/SketcherPrs_Coincident.h
src/SketcherPrs/SketcherPrs_Collinear.cpp
src/SketcherPrs/SketcherPrs_Collinear.h
src/SketcherPrs/SketcherPrs_DimensionStyleListener.cpp
src/SketcherPrs/SketcherPrs_Equal.cpp
src/SketcherPrs/SketcherPrs_Equal.h
src/SketcherPrs/SketcherPrs_HVDirection.cpp
src/SketcherPrs/SketcherPrs_HVDirection.h
src/SketcherPrs/SketcherPrs_LengthDimension.cpp
src/SketcherPrs/SketcherPrs_LengthDimension.h
src/SketcherPrs/SketcherPrs_Middle.cpp
src/SketcherPrs/SketcherPrs_Middle.h
src/SketcherPrs/SketcherPrs_Mirror.cpp
src/SketcherPrs/SketcherPrs_Mirror.h
src/SketcherPrs/SketcherPrs_Parallel.cpp
src/SketcherPrs/SketcherPrs_Parallel.h
src/SketcherPrs/SketcherPrs_Perpendicular.cpp
src/SketcherPrs/SketcherPrs_Perpendicular.h
src/SketcherPrs/SketcherPrs_Radius.cpp
src/SketcherPrs/SketcherPrs_Radius.h
src/SketcherPrs/SketcherPrs_Rigid.cpp
src/SketcherPrs/SketcherPrs_Rigid.h
src/SketcherPrs/SketcherPrs_SensitivePoint.cpp
src/SketcherPrs/SketcherPrs_SensitivePoint.h
src/SketcherPrs/SketcherPrs_SymbolPrs.cpp
src/SketcherPrs/SketcherPrs_SymbolPrs.h
src/SketcherPrs/SketcherPrs_Tangent.cpp
src/SketcherPrs/SketcherPrs_Tangent.h
src/SketcherPrs/SketcherPrs_Tools.cpp
src/SketcherPrs/SketcherPrs_Tools.h
src/SketcherPrs/SketcherPrs_Transformation.cpp
src/SketcherPrs/SketcherPrs_Transformation.h
src/XGUI/CMakeLists.txt
src/XGUI/XGUI_DataModel.cpp
src/XGUI/XGUI_Displayer.cpp
src/XGUI/XGUI_ModuleConnector.h
src/XGUI/XGUI_ObjectsBrowser.cpp
src/XGUI/XGUI_ObjectsBrowser.h
src/XGUI/XGUI_Selection.cpp
src/XGUI/XGUI_Selection.h
src/XGUI/XGUI_Workshop.cpp

index 745622ff32858223a02d7c153be5164d95fa857c..b8366797eb4618475b6026f91f634fe83ea2d0af 100644 (file)
-## Copyright (C) 2014-20xx CEA/DEN, EDF R&D
-
-# Copyright (C) 2007-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
-#
-
-IF(NOT CAS_FIND_QUIETLY)
-    MESSAGE(STATUS "Looking for OpenCascade (CAS) ...")
-ENDIF()
-
-SET(_CAS_VERSION_FILE_NAME Standard_Version.hxx)
-
-# Include directories:
-FIND_PATH(CAS_INCLUDE_DIRS NAMES ${_CAS_VERSION_FILE_NAME} HINTS ENV CAS_ROOT_DIR PATH_SUFFIXES inc)
-FIND_FILE(CAS_VERSION_FILE NAMES ${_CAS_VERSION_FILE_NAME} HINTS ENV CAS_ROOT_DIR PATH_SUFFIXES inc)
-
-MARK_AS_ADVANCED(CAS_VERSION_FILE)
-
-# Is this a development version:
-SET(CAS_VERSION_DEVELOPMENT 0)
-IF(CAS_VERSION_FILE)
-  FILE(STRINGS ${CAS_VERSION_FILE} CAS_VERSION_DEVELOPMENT_STR
-      REGEX "^ *#define OCC_VERSION_DEVELOPMENT *\"dev\".*$")
-  IF(CAS_VERSION_DEVELOPMENT_STR)
-    SET(CAS_VERSION_DEVELOPMENT 1)
-  ENDIF(CAS_VERSION_DEVELOPMENT_STR)
-  
-  # Extract normal version:
-  FILE(STRINGS ${CAS_VERSION_FILE} _tmp
-      REGEX "^ *#define OCC_VERSION_COMPLETE *\"[^\"]*\".*$")
-  STRING(REGEX REPLACE ".*\"([^\"]*)\".*" "\\1" CAS_VERSION_STR "${_tmp}")
-      
-ENDIF()
-
-IF(CAS_VERSION_DEVELOPMENT AND (NOT CAS_FIND_QUIETLY))
-  MESSAGE(STATUS "OpenCascade: development version is being used!")
-ENDIF()
-
-# Win specific stuff:
-IF(WIN32)
-  IF(CMAKE_BUILD_TYPE STREQUAL Debug)
-    SET(CMAKE_LIBRARY_PATH $ENV{CAS_ROOT_DIR}/win32/libd)
-  ELSE()
-    SET(CMAKE_LIBRARY_PATH $ENV{CAS_ROOT_DIR}/win32/lib)
-  ENDIF()
-ENDIF()
-
-# Definitions:
-SET(CAS_DEFINITIONS "-DLIN -DLINTEL -DCSFDB")
-SET(CAS_DEFINITIONS "${CAS_DEFINITIONS} -DNo_exception")
-
-# No config.h file in the OPEN CASCADE on WINDOWS platform 
-IF(NOT WIN32)
- SET(CAS_DEFINITIONS "${CAS_DEFINITIONS} -DHAVE_CONFIG_H")
-ELSE()
- SET(CAS_DEFINITIONS "${CAS_DEFINITIONS} -DWNT")
-ENDIF()
-
-SET(CAS_DEFINITIONS "${CAS_DEFINITIONS} -DOCC_CONVERT_SIGNALS")
-
-# Test for 64 bit machine:
-IF(CMAKE_SIZEOF_VOID_P STREQUAL 8)
-  SET(CAS_DEFINITIONS "${CAS_DEFINITIONS} -D_OCC64")
-ENDIF()
-
-IF(CAS_VERSION_DEVELOPMENT STREQUAL 1)
-  SET(CAS_DEFINITIONS "${CAS_DEFINITIONS} -DCAS_VERSION_DEVELOPMENT")
-ENDIF()
-
-# Find Xmu library (X11 widgets?)
-IF(NOT WIN32)
-  FIND_LIBRARY(CAS_Xmu Xmu)
-  IF(Xmu)
-    SET(CAS_LDPATH ${Xmu})
-  ENDIF()
-ENDIF()
-
-FIND_LIBRARY(CAS_FWOSPlugin NAMES FWOSPlugin HINTS ENV CAS_ROOT_DIR PATH_SUFFIXES lib)
-
-MESSAGE(STATUS "FWOS " ${CAS_FWOSPlugin})
-
-FIND_LIBRARY(CAS_PTKernel PTKernel HINTS ENV CAS_ROOT_DIR PATH_SUFFIXES lib)
-FIND_LIBRARY(CAS_TKBin TKBin HINTS ENV CAS_ROOT_DIR PATH_SUFFIXES lib)
-FIND_LIBRARY(CAS_TKBinL TKBinL HINTS ENV CAS_ROOT_DIR PATH_SUFFIXES lib)
-FIND_LIBRARY(CAS_TKBinTObj TKBinTObj HINTS ENV CAS_ROOT_DIR PATH_SUFFIXES lib)
-FIND_LIBRARY(CAS_TKBinXCAF TKBinXCAF HINTS ENV CAS_ROOT_DIR PATH_SUFFIXES lib)
-FIND_LIBRARY(CAS_TKBO TKBO HINTS ENV CAS_ROOT_DIR PATH_SUFFIXES lib)
-FIND_LIBRARY(CAS_TKBool TKBool HINTS ENV CAS_ROOT_DIR PATH_SUFFIXES lib)
-FIND_LIBRARY(CAS_TKBRep TKBRep HINTS ENV CAS_ROOT_DIR PATH_SUFFIXES lib)
-FIND_LIBRARY(CAS_TKCAF TKCAF HINTS ENV CAS_ROOT_DIR PATH_SUFFIXES lib)
-FIND_LIBRARY(CAS_TKCDF TKCDF HINTS ENV CAS_ROOT_DIR PATH_SUFFIXES lib)
-FIND_LIBRARY(CAS_TKernel TKernel HINTS ENV CAS_ROOT_DIR PATH_SUFFIXES lib)
-FIND_LIBRARY(CAS_TKFeat TKFeat HINTS ENV CAS_ROOT_DIR PATH_SUFFIXES lib)
-FIND_LIBRARY(CAS_TKFillet TKFillet HINTS ENV CAS_ROOT_DIR PATH_SUFFIXES lib)
-FIND_LIBRARY(CAS_TKG2d TKG2d HINTS ENV CAS_ROOT_DIR PATH_SUFFIXES lib)
-FIND_LIBRARY(CAS_TKG3d TKG3d HINTS ENV CAS_ROOT_DIR PATH_SUFFIXES lib)
-FIND_LIBRARY(CAS_TKGeomAlgo TKGeomAlgo HINTS ENV CAS_ROOT_DIR PATH_SUFFIXES lib)
-FIND_LIBRARY(CAS_TKGeomBase TKGeomBase HINTS ENV CAS_ROOT_DIR PATH_SUFFIXES lib)
-FIND_LIBRARY(CAS_TKHLR TKHLR HINTS ENV CAS_ROOT_DIR PATH_SUFFIXES lib)
-FIND_LIBRARY(CAS_TKIGES TKIGES HINTS ENV CAS_ROOT_DIR PATH_SUFFIXES lib)
-FIND_LIBRARY(CAS_TKLCAF TKLCAF HINTS ENV CAS_ROOT_DIR PATH_SUFFIXES lib)
-FIND_LIBRARY(CAS_TKMath TKMath HINTS ENV CAS_ROOT_DIR PATH_SUFFIXES lib)
-FIND_LIBRARY(CAS_TKMesh TKMesh HINTS ENV CAS_ROOT_DIR PATH_SUFFIXES lib)
-FIND_LIBRARY(CAS_TKMeshVS TKMeshVS HINTS ENV CAS_ROOT_DIR PATH_SUFFIXES lib)
-FIND_LIBRARY(CAS_TKNIS TKNIS HINTS ENV CAS_ROOT_DIR PATH_SUFFIXES lib)
-FIND_LIBRARY(CAS_TKOffset TKOffset HINTS ENV CAS_ROOT_DIR PATH_SUFFIXES lib)
-FIND_LIBRARY(CAS_TKOpenGl TKOpenGl HINTS ENV CAS_ROOT_DIR PATH_SUFFIXES lib)
-FIND_LIBRARY(CAS_TKPCAF TKPCAF HINTS ENV CAS_ROOT_DIR PATH_SUFFIXES lib)
-FIND_LIBRARY(CAS_TKPLCAF TKPLCAF HINTS ENV CAS_ROOT_DIR PATH_SUFFIXES lib)
-FIND_LIBRARY(CAS_TKPrim TKPrim HINTS ENV CAS_ROOT_DIR PATH_SUFFIXES lib)
-FIND_LIBRARY(CAS_TKPShape TKPShape HINTS ENV CAS_ROOT_DIR PATH_SUFFIXES lib)
-FIND_LIBRARY(CAS_TKService TKService HINTS ENV CAS_ROOT_DIR PATH_SUFFIXES lib)
-FIND_LIBRARY(CAS_TKShapeSchema TKShapeSchema HINTS ENV CAS_ROOT_DIR PATH_SUFFIXES lib)
-FIND_LIBRARY(CAS_TKShHealing TKShHealing HINTS ENV CAS_ROOT_DIR PATH_SUFFIXES lib)
-FIND_LIBRARY(CAS_TKStdLSchema TKStdLSchema HINTS ENV CAS_ROOT_DIR PATH_SUFFIXES lib)
-FIND_LIBRARY(CAS_TKStdSchema TKStdSchema HINTS ENV CAS_ROOT_DIR PATH_SUFFIXES lib)
-FIND_LIBRARY(CAS_TKSTEP TKSTEP HINTS ENV CAS_ROOT_DIR PATH_SUFFIXES lib)
-FIND_LIBRARY(CAS_TKSTEP209 TKSTEP209 HINTS ENV CAS_ROOT_DIR PATH_SUFFIXES lib)
-FIND_LIBRARY(CAS_TKSTEPAttr TKSTEPAttr HINTS ENV CAS_ROOT_DIR PATH_SUFFIXES lib)
-FIND_LIBRARY(CAS_TKSTEPBase TKSTEPBase HINTS ENV CAS_ROOT_DIR PATH_SUFFIXES lib)
-FIND_LIBRARY(CAS_TKSTL TKSTL HINTS ENV CAS_ROOT_DIR PATH_SUFFIXES lib)
-FIND_LIBRARY(CAS_TKTObj TKTObj HINTS ENV CAS_ROOT_DIR PATH_SUFFIXES lib)
-FIND_LIBRARY(CAS_TKTopAlgo TKTopAlgo HINTS ENV CAS_ROOT_DIR PATH_SUFFIXES lib)
-FIND_LIBRARY(CAS_TKV3d TKV3d HINTS ENV CAS_ROOT_DIR PATH_SUFFIXES lib)
-FIND_LIBRARY(CAS_TKVRML TKVRML HINTS ENV CAS_ROOT_DIR PATH_SUFFIXES lib)
-FIND_LIBRARY(CAS_TKXCAF TKXCAF HINTS ENV CAS_ROOT_DIR PATH_SUFFIXES lib)
-FIND_LIBRARY(CAS_TKXCAFSchema TKXCAFSchema HINTS ENV CAS_ROOT_DIR PATH_SUFFIXES lib)
-FIND_LIBRARY(CAS_TKXDEIGES TKXDEIGES HINTS ENV CAS_ROOT_DIR PATH_SUFFIXES lib)
-FIND_LIBRARY(CAS_TKXDESTEP TKXDESTEP HINTS ENV CAS_ROOT_DIR PATH_SUFFIXES lib)
-FIND_LIBRARY(CAS_TKXMesh TKXMesh HINTS ENV CAS_ROOT_DIR PATH_SUFFIXES lib)
-FIND_LIBRARY(CAS_TKXml TKXml HINTS ENV CAS_ROOT_DIR PATH_SUFFIXES lib)
-FIND_LIBRARY(CAS_TKXmlL TKXmlL HINTS ENV CAS_ROOT_DIR PATH_SUFFIXES lib)
-FIND_LIBRARY(CAS_TKXmlTObj TKXmlTObj HINTS ENV CAS_ROOT_DIR PATH_SUFFIXES lib)
-FIND_LIBRARY(CAS_TKXmlXCAF TKXmlXCAF HINTS ENV CAS_ROOT_DIR PATH_SUFFIXES lib)
-FIND_LIBRARY(CAS_TKXSBase TKXSBase HINTS ENV CAS_ROOT_DIR PATH_SUFFIXES lib)
-
-SET(CAS_KERNEL ${CAS_TKernel} ${CAS_TKMath})
-SET(CAS_OCAF ${CAS_TKernel} ${CAS_TKMath} ${CAS_TKCDF} ${CAS_TKLCAF})
-SET(CAS_VIEWER ${CAS_TKService} ${CAS_TKV3d} ${CAS_TKG3d} ${CAS_TKGeomBase} ${CAS_TKBRep})
-SET(CAS_OCAFVIS ${CAS_TKCAF} ${CAS_TKBRep} ${CAS_TKG2d})
-SET(CAS_MODELER ${CAS_TKG3d} ${CAS_TKGeomBase} ${CAS_TKGeomAlgo} ${CAS_TKBRep} ${CAS_TKTopAlgo} ${CAS_TKG2d} ${CAS_TKFeat})
-# TODO(mpv, vsv) Give a proper name for the following variable
-SET(CAS_SHAPE ${CAS_TKShHealing} ${CAS_TKMesh} ${CAS_TKHLR})
-
-
-SET(CAS_TKV3d_EA ${CAS_TKernel} ${CAS_TKMath} ${CAS_TKV3d})
-SET(CAS_TKBool_EA ${CAS_TKernel} ${CAS_TKMath} ${CAS_TKBRep} ${CAS_TKG2d} ${CAS_TKG3d} ${CAS_TKGeomBase} ${CAS_TKGeomAlgo} ${CAS_TKTopAlgo} ${CAS_TKBool})
-SET(CAS_TKBRep_EA ${CAS_TKernel} ${CAS_TKMath} ${CAS_TKBRep})
-SET(CAS_TKIGES_EA ${CAS_TKernel} ${CAS_TKMath} ${CAS_TKXSBase} ${CAS_TKBRep} ${CAS_TKIGES})
-SET(CAS_TKSTEP_EA ${CAS_TKernel} ${CAS_TKMath} ${CAS_TKXSBase} ${CAS_TKBRep} ${CAS_TKSTEP})
-SET(CAS_TKSTL_EA ${CAS_TKernel} ${CAS_TKMath} ${CAS_TKSTL})
-SET(CAS_TKCAF_EA ${CAS_TKPrim} ${CAS_TKCAF})
-
-SET(CAS_TKV3d ${CAS_TKV3d_EA})
-SET(CAS_TKBool ${CAS_TKBool_EA})
-SET(CAS_TKBRep ${CAS_TKBRep_EA})
-SET(CAS_TKIGES ${CAS_TKIGES_EA})
-SET(CAS_TKSTEP ${CAS_TKSTEP_EA})
-SET(CAS_TKSTL ${CAS_TKSTL_EA})
-SET(CAS_TKCAF ${CAS_TKCAF_EA})
-
-INCLUDE(FindPackageHandleStandardArgs)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(CAS 
-      REQUIRED_VARS CAS_INCLUDE_DIRS  
-        CAS_FWOSPlugin
-        CAS_PTKernel
-        CAS_TKBin
-        CAS_TKBinL
-        CAS_TKBinTObj
-        CAS_TKBinXCAF
-        CAS_TKBO
-        CAS_TKBool
-        CAS_TKBRep
-        CAS_TKCAF
-        CAS_TKCDF
-        CAS_TKernel
-        CAS_TKFeat
-        CAS_TKFillet
-        CAS_TKG2d
-        CAS_TKG3d
-        CAS_TKGeomAlgo
-        CAS_TKGeomBase
-        CAS_TKHLR
-        CAS_TKIGES
-        CAS_TKLCAF
-        CAS_TKMath
-        CAS_TKMesh
-        CAS_TKMeshVS
-        CAS_TKNIS
-        CAS_TKOffset
-        CAS_TKOpenGl
-        CAS_TKPCAF
-        CAS_TKPLCAF
-        CAS_TKPrim
-        CAS_TKPShape
-        CAS_TKService
-        CAS_TKShapeSchema
-        CAS_TKShHealing
-        CAS_TKStdLSchema
-        CAS_TKStdSchema
-        CAS_TKSTEP
-        CAS_TKSTEP209
-        CAS_TKSTEPAttr
-        CAS_TKSTEPBase
-        CAS_TKSTL
-        CAS_TKTObj
-        CAS_TKTopAlgo
-        CAS_TKV3d
-        CAS_TKVRML
-        CAS_TKXCAF
-        CAS_TKXCAFSchema
-        CAS_TKXDEIGES
-        CAS_TKXDESTEP
-        CAS_TKXMesh
-        CAS_TKXml
-        CAS_TKXmlL
-        CAS_TKXmlTObj
-        CAS_TKXmlXCAF
-        CAS_TKXSBase
-)
-
-IF(CAS_FOUND AND NOT CAS_FIND_QUIETLY)
-  MESSAGE(STATUS "Found OpenCascade version: ${CAS_VERSION_STR}")
-ENDIF()
-
-
+# Copyright (C) 2007-2016  CEA/DEN, EDF R&D, OPEN CASCADE\r
+#\r
+# This library is free software; you can redistribute it and/or\r
+# modify it under the terms of the GNU Lesser General Public\r
+# License as published by the Free Software Foundation; either\r
+# version 2.1 of the License, or (at your option) any later version.\r
+#\r
+# This library is distributed in the hope that it will be useful,\r
+# but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
+# Lesser General Public License for more details.\r
+#\r
+# You should have received a copy of the GNU Lesser General Public\r
+# License along with this library; if not, write to the Free Software\r
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA\r
+#\r
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com\r
+#\r
+\r
+IF(NOT CAS_FIND_QUIETLY)\r
+    MESSAGE(STATUS "Looking for Open CASCADE Technology ...")\r
+ENDIF()\r
+\r
+SET(_CAS_VERSION_FILE_NAME Standard_Version.hxx)\r
+\r
+# Include directories:\r
+FIND_PATH(CAS_INCLUDE_DIRS ${_CAS_VERSION_FILE_NAME} PATH_SUFFIXES include/opencascade)\r
+FIND_FILE(CAS_VERSION_FILE ${_CAS_VERSION_FILE_NAME} PATH_SUFFIXES include/opencascade)\r
+IF(CAS_INCLUDE_DIRS)\r
+  SET(CAS_UPCOUNT 2)\r
+ELSE()\r
+  FIND_PATH(CAS_INCLUDE_DIRS ${_CAS_VERSION_FILE_NAME} PATH_SUFFIXES include inc)\r
+  FIND_FILE(CAS_VERSION_FILE ${_CAS_VERSION_FILE_NAME} PATH_SUFFIXES include inc)\r
+ENDIF()\r
+MARK_AS_ADVANCED(CAS_VERSION_FILE)\r
+\r
+SET(CAS_VERSION_DEVELOPMENT 0)\r
+IF(CAS_VERSION_FILE)\r
+  # Check if this is a development version:\r
+  FILE(STRINGS ${CAS_VERSION_FILE} CAS_VERSION_DEVELOPMENT_STR\r
+      REGEX "^ *#define OCC_VERSION_DEVELOPMENT")\r
+  IF(CAS_VERSION_DEVELOPMENT_STR)\r
+    SET(CAS_VERSION_DEVELOPMENT 1)\r
+  ENDIF(CAS_VERSION_DEVELOPMENT_STR)\r
+  \r
+  # Extract actual version number:\r
+  FILE(STRINGS ${CAS_VERSION_FILE} _tmp\r
+      REGEX "^ *#define OCC_VERSION_COMPLETE *\"[^\"]*\".*$")\r
+  STRING(REGEX REPLACE ".*\"([^\"]*)\".*" "\\1" CAS_VERSION_STR "${_tmp}")\r
+ENDIF()\r
+\r
+# Win specific stuff:\r
+IF(WIN32)\r
+  IF(CMAKE_BUILD_TYPE STREQUAL Debug)\r
+    SET(CMAKE_LIBRARY_PATH ${CAS_ROOT_DIR}/win32/libd ${CAS_ROOT_DIR}/win64/lib/vc10)\r
+  ELSE()\r
+    SET(CMAKE_LIBRARY_PATH ${CAS_ROOT_DIR}/win32/lib ${CAS_ROOT_DIR}/win64/lib/vc10)\r
+  ENDIF()\r
+ENDIF()\r
+\r
+# Definitions:\r
+SET(CAS_DEFINITIONS "-DLIN -DLINTEL -DCSFDB")\r
+SET(CAS_DEFINITIONS "${CAS_DEFINITIONS} -DNo_exception")\r
+\r
+# Check config.h file\r
+FIND_FILE(CAS_CONFIG_H config.h PATHS ${CAS_INCLUDE_DIRS} NO_DEFAULT_PATH)\r
+IF(CAS_CONFIG_H)\r
+ SET(CAS_DEFINITIONS "${CAS_DEFINITIONS} -DHAVE_CONFIG_H")\r
+ENDIF()\r
+\r
+# Test for 64 bit machine:\r
+IF(CMAKE_SIZEOF_VOID_P STREQUAL 8)\r
+  SET(CAS_DEFINITIONS "${CAS_DEFINITIONS} -D_OCC64")\r
+ENDIF()\r
+\r
+# Find Xmu library (X11 widgets?)\r
+IF(NOT WIN32)\r
+  FIND_LIBRARY(CAS_Xmu Xmu)\r
+  IF(Xmu)\r
+    SET(CAS_LDPATH ${Xmu})\r
+  ENDIF()\r
+ENDIF()\r
+\r
+IF(CAS_VERSION_STR VERSION_LESS "7.0.1")\r
+  FIND_LIBRARY(CAS_FWOSPlugin FWOSPlugin PATH_SUFFIXES lib lin64/gcc/lib bin)\r
+ELSE()\r
+  FIND_LIBRARY(CAS_TKStd TKStd PATH_SUFFIXES lib lin64/gcc/lib bin)\r
+ENDIF()\r
+FIND_LIBRARY(CAS_TKBin TKBin PATH_SUFFIXES lib lin64/gcc/lib bin)\r
+FIND_LIBRARY(CAS_TKBinL TKBinL PATH_SUFFIXES lib lin64/gcc/lib bin)\r
+FIND_LIBRARY(CAS_TKBinTObj TKBinTObj PATH_SUFFIXES lib lin64/gcc/lib bin)\r
+FIND_LIBRARY(CAS_TKBinXCAF TKBinXCAF PATH_SUFFIXES lib lin64/gcc/lib bin)\r
+FIND_LIBRARY(CAS_TKBO TKBO PATH_SUFFIXES lib lin64/gcc/lib bin)\r
+FIND_LIBRARY(CAS_TKBool TKBool PATH_SUFFIXES lib lin64/gcc/lib bin)\r
+FIND_LIBRARY(CAS_TKBRep TKBRep PATH_SUFFIXES lib lin64/gcc/lib bin)\r
+FIND_LIBRARY(CAS_TKCAF TKCAF PATH_SUFFIXES lib lin64/gcc/lib bin)\r
+FIND_LIBRARY(CAS_TKCDF TKCDF PATH_SUFFIXES lib lin64/gcc/lib bin)\r
+FIND_LIBRARY(CAS_TKernel TKernel PATH_SUFFIXES lib lin64/gcc/lib bin)\r
+FIND_LIBRARY(CAS_TKFeat TKFeat PATH_SUFFIXES lib lin64/gcc/lib bin)\r
+FIND_LIBRARY(CAS_TKFillet TKFillet PATH_SUFFIXES lib lin64/gcc/lib bin)\r
+FIND_LIBRARY(CAS_TKG2d TKG2d PATH_SUFFIXES lib lin64/gcc/lib bin)\r
+FIND_LIBRARY(CAS_TKG3d TKG3d PATH_SUFFIXES lib lin64/gcc/lib bin)\r
+FIND_LIBRARY(CAS_TKGeomAlgo TKGeomAlgo PATH_SUFFIXES lib lin64/gcc/lib bin)\r
+FIND_LIBRARY(CAS_TKGeomBase TKGeomBase PATH_SUFFIXES lib lin64/gcc/lib bin)\r
+FIND_LIBRARY(CAS_TKHLR TKHLR PATH_SUFFIXES lib lin64/gcc/lib bin)\r
+FIND_LIBRARY(CAS_TKIGES TKIGES PATH_SUFFIXES lib lin64/gcc/lib bin)\r
+FIND_LIBRARY(CAS_TKLCAF TKLCAF PATH_SUFFIXES lib lin64/gcc/lib bin)\r
+FIND_LIBRARY(CAS_TKMath TKMath PATH_SUFFIXES lib lin64/gcc/lib bin)\r
+FIND_LIBRARY(CAS_TKMesh TKMesh PATH_SUFFIXES lib lin64/gcc/lib bin)\r
+FIND_LIBRARY(CAS_TKMeshVS TKMeshVS PATH_SUFFIXES lib lin64/gcc/lib bin)\r
+IF(CAS_VERSION_STR VERSION_LESS "6.9.1")\r
+  FIND_LIBRARY(CAS_TKNIS TKNIS PATH_SUFFIXES lib lin64/gcc/lib bin)\r
+ENDIF()\r
+FIND_LIBRARY(CAS_TKOffset TKOffset PATH_SUFFIXES lib lin64/gcc/lib bin)\r
+FIND_LIBRARY(CAS_TKOpenGl TKOpenGl PATH_SUFFIXES lib lin64/gcc/lib bin)\r
+FIND_LIBRARY(CAS_TKPrim TKPrim PATH_SUFFIXES lib lin64/gcc/lib bin)\r
+FIND_LIBRARY(CAS_TKService TKService PATH_SUFFIXES lib lin64/gcc/lib bin)\r
+FIND_LIBRARY(CAS_TKShHealing TKShHealing PATH_SUFFIXES lib lin64/gcc/lib bin)\r
+FIND_LIBRARY(CAS_TKSTEP TKSTEP PATH_SUFFIXES lib lin64/gcc/lib bin)\r
+FIND_LIBRARY(CAS_TKSTEP209 TKSTEP209 PATH_SUFFIXES lib lin64/gcc/lib bin)\r
+FIND_LIBRARY(CAS_TKSTEPAttr TKSTEPAttr PATH_SUFFIXES lib lin64/gcc/lib bin)\r
+FIND_LIBRARY(CAS_TKSTEPBase TKSTEPBase PATH_SUFFIXES lib lin64/gcc/lib bin)\r
+FIND_LIBRARY(CAS_TKSTL TKSTL PATH_SUFFIXES lib lin64/gcc/lib bin)\r
+FIND_LIBRARY(CAS_TKTObj TKTObj PATH_SUFFIXES lib lin64/gcc/lib bin)\r
+FIND_LIBRARY(CAS_TKTopAlgo TKTopAlgo PATH_SUFFIXES lib lin64/gcc/lib bin)\r
+FIND_LIBRARY(CAS_TKV3d TKV3d PATH_SUFFIXES lib lin64/gcc/lib bin)\r
+FIND_LIBRARY(CAS_TKVRML TKVRML PATH_SUFFIXES lib lin64/gcc/lib bin)\r
+FIND_LIBRARY(CAS_TKXCAF TKXCAF PATH_SUFFIXES lib lin64/gcc/lib bin)\r
+FIND_LIBRARY(CAS_TKXDEIGES TKXDEIGES PATH_SUFFIXES lib lin64/gcc/lib bin)\r
+FIND_LIBRARY(CAS_TKXDESTEP TKXDESTEP PATH_SUFFIXES lib lin64/gcc/lib bin)\r
+FIND_LIBRARY(CAS_TKXMesh TKXMesh PATH_SUFFIXES lib lin64/gcc/lib bin)\r
+FIND_LIBRARY(CAS_TKXml TKXml PATH_SUFFIXES lib lin64/gcc/lib bin)\r
+FIND_LIBRARY(CAS_TKXmlL TKXmlL PATH_SUFFIXES lib lin64/gcc/lib bin)\r
+FIND_LIBRARY(CAS_TKXmlTObj TKXmlTObj PATH_SUFFIXES lib lin64/gcc/lib bin)\r
+FIND_LIBRARY(CAS_TKXmlXCAF TKXmlXCAF PATH_SUFFIXES lib lin64/gcc/lib bin)\r
+FIND_LIBRARY(CAS_TKXSBase TKXSBase PATH_SUFFIXES lib lin64/gcc/lib bin)\r
+\r
+IF(CAS_VERSION_STR VERSION_LESS "7.0")\r
+  FIND_LIBRARY(CAS_PTKernel PTKernel PATH_SUFFIXES lib lin64/gcc/lib bin)\r
+  FIND_LIBRARY(CAS_TKPCAF TKPCAF PATH_SUFFIXES lib lin64/gcc/lib bin)\r
+  FIND_LIBRARY(CAS_TKPLCAF TKPLCAF PATH_SUFFIXES lib lin64/gcc/lib bin)\r
+  FIND_LIBRARY(CAS_TKPShape TKPShape PATH_SUFFIXES lib lin64/gcc/lib bin)\r
+  FIND_LIBRARY(CAS_TKShapeSchema TKShapeSchema PATH_SUFFIXES lib lin64/gcc/lib bin)\r
+  FIND_LIBRARY(CAS_TKStdLSchema TKStdLSchema PATH_SUFFIXES lib lin64/gcc/lib bin)\r
+  FIND_LIBRARY(CAS_TKStdSchema TKStdSchema PATH_SUFFIXES lib lin64/gcc/lib bin)\r
+  FIND_LIBRARY(CAS_TKXCAFSchema TKXCAFSchema PATH_SUFFIXES lib lin64/gcc/lib bin)\r
+ENDIF()\r
+\r
+SET(CAS_KERNEL ${CAS_TKernel} ${CAS_TKMath})\r
+SET(CAS_OCAF ${CAS_TKernel} ${CAS_TKMath} ${CAS_TKCDF} ${CAS_TKLCAF})\r
+SET(CAS_VIEWER ${CAS_TKService} ${CAS_TKV3d} ${CAS_TKG3d} ${CAS_TKGeomBase} ${CAS_TKBRep})\r
+SET(CAS_OCAFVIS ${CAS_TKCAF} ${CAS_TKBRep} ${CAS_TKG2d})\r
+SET(CAS_MODELER ${CAS_TKG3d} ${CAS_TKGeomBase} ${CAS_TKGeomAlgo} ${CAS_TKBRep} ${CAS_TKTopAlgo} ${CAS_TKG2d})\r
+\r
+SET(CAS_TKV3d_EA ${CAS_TKernel} ${CAS_TKMath} ${CAS_TKV3d})\r
+SET(CAS_TKBool_EA ${CAS_TKernel} ${CAS_TKMath} ${CAS_TKBRep} ${CAS_TKG2d} ${CAS_TKG3d} ${CAS_TKGeomBase} ${CAS_TKGeomAlgo} ${CAS_TKTopAlgo} ${CAS_TKBool})\r
+SET(CAS_TKBRep_EA ${CAS_TKernel} ${CAS_TKMath} ${CAS_TKBRep})\r
+SET(CAS_TKIGES_EA ${CAS_TKernel} ${CAS_TKMath} ${CAS_TKXSBase} ${CAS_TKBRep} ${CAS_TKIGES})\r
+SET(CAS_TKSTEP_EA ${CAS_TKernel} ${CAS_TKMath} ${CAS_TKXSBase} ${CAS_TKBRep} ${CAS_TKSTEP})\r
+SET(CAS_TKSTL_EA ${CAS_TKernel} ${CAS_TKMath} ${CAS_TKSTL})\r
+SET(CAS_TKCAF_EA ${CAS_TKPrim} ${CAS_TKCAF})\r
+\r
+SET(CAS_TKV3d ${CAS_TKV3d_EA})\r
+SET(CAS_TKBool ${CAS_TKBool_EA})\r
+SET(CAS_TKBRep ${CAS_TKBRep_EA})\r
+SET(CAS_TKIGES ${CAS_TKIGES_EA})\r
+SET(CAS_TKSTEP ${CAS_TKSTEP_EA})\r
+SET(CAS_TKSTL ${CAS_TKSTL_EA})\r
+SET(CAS_TKCAF ${CAS_TKCAF_EA})\r
+\r
+SET(_libs\r
+  CAS_TKBin\r
+  CAS_TKBinL\r
+  CAS_TKBinTObj\r
+  CAS_TKBinXCAF\r
+  CAS_TKBO\r
+  CAS_TKBool\r
+  CAS_TKBRep\r
+  CAS_TKCAF\r
+  CAS_TKCDF\r
+  CAS_TKernel\r
+  CAS_TKFeat\r
+  CAS_TKFillet\r
+  CAS_TKG2d\r
+  CAS_TKG3d\r
+  CAS_TKGeomAlgo\r
+  CAS_TKGeomBase\r
+  CAS_TKHLR\r
+  CAS_TKIGES\r
+  CAS_TKLCAF\r
+  CAS_TKMath\r
+  CAS_TKMesh\r
+  CAS_TKMeshVS\r
+  CAS_TKOffset\r
+  CAS_TKOpenGl\r
+  CAS_TKPrim\r
+  CAS_TKService\r
+  CAS_TKShHealing\r
+  CAS_TKSTEP\r
+  CAS_TKSTEP209\r
+  CAS_TKSTEPAttr\r
+  CAS_TKSTEPBase\r
+  CAS_TKSTL\r
+  CAS_TKTObj\r
+  CAS_TKTopAlgo\r
+  CAS_TKV3d\r
+  CAS_TKVRML\r
+  CAS_TKXCAF\r
+  CAS_TKXDEIGES\r
+  CAS_TKXDESTEP\r
+  CAS_TKXMesh\r
+  CAS_TKXml\r
+  CAS_TKXmlL\r
+  CAS_TKXmlTObj\r
+  CAS_TKXmlXCAF\r
+  CAS_TKXSBase\r
+)\r
+\r
+IF(CAS_VERSION_STR VERSION_LESS "7.0.1")\r
+  LIST(APPEND _libs CAS_FWOSPlugin)\r
+ELSE()\r
+  LIST(APPEND _libs CAS_TKStd)\r
+ENDIF()\r
+\r
+IF(CAS_VERSION_STR VERSION_LESS "6.9.1")\r
+  LIST(APPEND _libs CAS_TKNIS)\r
+ENDIF()\r
+\r
+IF(CAS_VERSION_STR VERSION_LESS "7.0")\r
+  LIST(APPEND _libs\r
+    CAS_PTKernel\r
+    CAS_TKPCAF\r
+    CAS_TKPLCAF\r
+    CAS_TKPShape\r
+    CAS_TKShapeSchema\r
+    CAS_TKStdLSchema\r
+    CAS_TKStdSchema\r
+    CAS_TKXCAFSchema\r
+    )\r
+ENDIF()\r
+\r
+\r
+INCLUDE(FindPackageHandleStandardArgs)\r
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(CAS REQUIRED_VARS CAS_INCLUDE_DIRS ${_libs})\r
+\r
+IF(CAS_FOUND AND NOT CAS_FIND_QUIETLY)\r
+  IF(CAS_VERSION_DEVELOPMENT)\r
+    MESSAGE(STATUS "Found OpenCascade version: ${CAS_VERSION_STR} (development)")\r
+  ELSE(CAS_VERSION_DEVELOPMENT)\r
+    MESSAGE(STATUS "Found OpenCascade version: ${CAS_VERSION_STR}")\r
+  ENDIF(CAS_VERSION_DEVELOPMENT)\r
+ENDIF()\r
diff --git a/CMakeCommon/FindQt.cmake b/CMakeCommon/FindQt.cmake
deleted file mode 100644 (file)
index 389f01f..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-## Copyright (C) 2014-20xx CEA/DEN, EDF R&D
-
-CMAKE_MINIMUM_REQUIRED(VERSION 2.8.10)
-IF(WIN32)
-    SET(QT_USE_QTMAIN ON)
-ENDIF()
-
-# Widgets finds its own dependencies (QtGui and QtCore).
-FIND_PACKAGE(Qt4 REQUIRED)
-
-IF(NOT QT4_FOUND)
-    MESSAGE(FATAL_ERROR "Qt not found.")
-ENDIF()
-
-INCLUDE(${QT_USE_FILE})
-
-# The Qt5Widgets_INCLUDES also includes the include directories for
-# dependencies QtCore and QtGui
-INCLUDE_DIRECTORIES(${QT_INCLUDES})
-
-# We need add -DQT_WIDGETS_LIB when using QtWidgets in Qt 5.
-ADD_DEFINITIONS(${QT_DEFINITIONS})
-
-# Executables fail to build with Qt 5 in the default configuration
-# without -fPIE. We add that here.
-#SET(CMAKE_CXX_FLAGS "${Qt5Widgets_EXECUTABLE_COMPILE_FLAGS}")
diff --git a/CMakeCommon/FindSalomeQt5.cmake b/CMakeCommon/FindSalomeQt5.cmake
new file mode 100644 (file)
index 0000000..8a4f48e
--- /dev/null
@@ -0,0 +1,91 @@
+# Copyright (C) 2013-2015  CEA/DEN, EDF R&D, OPEN CASCADE\r
+#\r
+# This library is free software; you can redistribute it and/or\r
+# modify it under the terms of the GNU Lesser General Public\r
+# License as published by the Free Software Foundation; either\r
+# version 2.1 of the License, or (at your option) any later version.\r
+#\r
+# This library is distributed in the hope that it will be useful,\r
+# but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
+# Lesser General Public License for more details.\r
+#\r
+# You should have received a copy of the GNU Lesser General Public\r
+# License along with this library; if not, write to the Free Software\r
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA\r
+#\r
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com\r
+#\r
+# Author: Adrien Bruneton\r
+#\r
+\r
+# Qt5 detection for Salome\r
+#\r
+#  !! Please read the generic detection procedure in SalomeMacros.cmake !!\r
+#\r
+\r
+# Qt5_FIND_COMPONENTS variable is set here to prevent ParaView to reset list of Qt5 modules,\r
+# just to avoid extra dependencies\r
+\r
+SET(QT_INCLUDES)\r
+SET(QT_DEFINITIONS)\r
+SET(QT_LIBRARIES)\r
+# Find Qt5Core to get Qt version\r
+SET(Qt5_FIND_COMPONENTS QtCore)\r
+SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(Qt5Core Qt5Core_INCLUDE_DIRS 1 ENVVAR QT5_ROOT_DIR)\r
+IF(Qt5Core_FOUND)\r
+  LIST(APPEND QT_INCLUDES    ${Qt5Core_INCLUDE_DIRS})\r
+  LIST(APPEND QT_DEFINITIONS ${Qt5Core_DEFINITIONS})\r
+  LIST(APPEND QT_LIBRARIES   ${Qt5Core_LIBRARIES})\r
+  SET(QT_VERSION "${Qt5Core_VERSION}")\r
+ENDIF()\r
+\r
+SET(Qt5_FIND_COMPONENTS Gui Widgets Network Xml OpenGL PrintSupport Help Test Sql Sensors Positioning Quick Qml Multimedia MultimediaWidgets WebChannel UiTools)\r
+\r
+IF ("${QT_VERSION}" VERSION_LESS "5.6.0")\r
+  LIST(APPEND Qt5_FIND_COMPONENTS WebKit WebKitWidgets)\r
+ELSE()\r
+  LIST(APPEND Qt5_OPTIONAL_COMPONENTS WebEngine WebEngineWidgets)\r
+ENDIF()\r
+\r
+IF(NOT WIN32)\r
+  LIST(APPEND Qt5_FIND_COMPONENTS X11Extras)\r
+ENDIF()\r
+\r
+FOREACH(_Qt5_COMPONENT_ ${Qt5_FIND_COMPONENTS} ${Qt5_OPTIONAL_COMPONENTS})\r
+  SET(_Qt5_COMPONENT Qt5${_Qt5_COMPONENT_})\r
+  LIST(FIND Qt5_OPTIONAL_COMPONENTS ${_Qt5_COMPONENT_} idx)\r
+  IF(${idx} GREATER -1)\r
+   SET(Salome${_Qt5_COMPONENT}_FIND_QUIETLY TRUE)\r
+  ENDIF()\r
+  SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(${_Qt5_COMPONENT} ${_Qt5_COMPONENT}_INCLUDE_DIRS 1 ENVVAR QT5_ROOT_DIR)\r
+  LIST(APPEND QT_INCLUDES    ${${_Qt5_COMPONENT}_INCLUDE_DIRS})\r
+  LIST(APPEND QT_DEFINITIONS ${${_Qt5_COMPONENT}_DEFINITIONS})\r
+  LIST(APPEND QT_LIBRARIES   ${${_Qt5_COMPONENT}_LIBRARIES})\r
+ENDFOREACH()\r
+\r
+FIND_PACKAGE(Qt5LinguistTools)\r
+GET_TARGET_PROPERTY(QT_LRELEASE_EXECUTABLE Qt5::lrelease LOCATION)\r
+MARK_AS_ADVANCED(QT_LRELEASE_EXECUTABLE)\r
+\r
+GET_FILENAME_COMPONENT(QT_BINARY_DIR ${QT_LRELEASE_EXECUTABLE} DIRECTORY)\r
+MARK_AS_ADVANCED(QT_BINARY_DIR)\r
+\r
+# This is only needed to correctly detect Qt help generator tool, to workaround an error \r
+# coming from ParaView detection procedure\r
+FIND_PROGRAM(QT_HELP_GENERATOR\r
+    qhelpgenerator\r
+    PATHS "${QT_BINARY_DIR}"\r
+    NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH\r
+    DOC "qhelpgenerator used to compile Qt help project files")\r
+MARK_AS_ADVANCED(QT_HELP_GENERATOR)\r
+\r
+IF(Qt5Core_FOUND) \r
+  SALOME_ACCUMULATE_HEADERS(QT_INCLUDES)\r
+  SALOME_ACCUMULATE_ENVIRONMENT(PATH ${LINGUIST_PATH})\r
+  SALOME_ACCUMULATE_ENVIRONMENT(LD_LIBRARY_PATH ${Qt5Core_LIBRARIES})\r
+  GET_FILENAME_COMPONENT(Qt5_DIR ${Qt5Core_DIR} PATH)\r
+  FILE(TO_NATIVE_PATH "${Qt5_DIR}/Qt5" Qt5_DIR)\r
+  SET(SalomeQt5_COMPONENTS ${Qt5_FIND_COMPONENTS})\r
+  MESSAGE(STATUS "Qt version is ${QT_VERSION}")\r
+ENDIF()\r
diff --git a/CMakeCommon/SalomeMacros.cmake b/CMakeCommon/SalomeMacros.cmake
new file mode 100644 (file)
index 0000000..970f7c1
--- /dev/null
@@ -0,0 +1,975 @@
+# Copyright (C) 2012-2016  CEA/DEN, EDF R&D, OPEN CASCADE\r
+#\r
+# This library is free software; you can redistribute it and/or\r
+# modify it under the terms of the GNU Lesser General Public\r
+# License as published by the Free Software Foundation; either\r
+# version 2.1 of the License, or (at your option) any later version.\r
+#\r
+# This library is distributed in the hope that it will be useful,\r
+# but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
+# Lesser General Public License for more details.\r
+#\r
+# You should have received a copy of the GNU Lesser General Public\r
+# License along with this library; if not, write to the Free Software\r
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA\r
+#\r
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com\r
+#\r
+# Author: A.Geay, V. Sandler, A. Bruneton\r
+#\r
+\r
+#----------------------------------------------------------------------------\r
+# LIST_CONTAINS is a macro useful for determining whether a list has a \r
+# particular entry\r
+#----------------------------------------------------------------------------\r
+MACRO(LIST_CONTAINS var value)\r
+  SET(${var})\r
+  FOREACH(value2 ${ARGN})\r
+    IF(${value} STREQUAL "${value2}")\r
+      SET(${var} TRUE)\r
+    ENDIF (${value} STREQUAL "${value2}")\r
+  ENDFOREACH (value2)\r
+ENDMACRO(LIST_CONTAINS)\r
+\r
+#----------------------------------------------------------------------------\r
+# The PARSE_ARGUMENTS macro will take the arguments of another macro and\r
+# define several variables.\r
+#\r
+# USAGE:  PARSE_ARGUMENTS(prefix arg_names options arg1 arg2...)\r
+#\r
+# ARGUMENTS:\r
+#\r
+# prefix: IN: a prefix to put on all variables it creates.\r
+#\r
+# arg_names: IN: a list of names.\r
+# For each item in arg_names, PARSE_ARGUMENTS will create a \r
+# variable with that name, prefixed with prefix_. Each variable will be filled\r
+# with the arguments that occur after the given arg_name is encountered\r
+# up to the next arg_name or the end of the arguments. All options are\r
+# removed from these lists. PARSE_ARGUMENTS also creates a\r
+# prefix_DEFAULT_ARGS variable containing the list of all arguments up\r
+# to the first arg_name encountered.\r
+#\r
+# options: IN: a list of options.\r
+# For each item in options, PARSE_ARGUMENTS will create a\r
+# variable with that name, prefixed with prefix_. So, for example, if prefix is\r
+# MY_MACRO and options is OPTION1;OPTION2, then PARSE_ARGUMENTS will\r
+# create the variables MY_MACRO_OPTION1 and MY_MACRO_OPTION2. These\r
+# variables will be set to true if the option exists in the command line\r
+# or false otherwise.\r
+# arg_names and options lists should be quoted.\r
+#\r
+# The rest of PARSE_ARGUMENTS are arguments from another macro to be parsed.\r
+#----------------------------------------------------------------------------\r
+MACRO(PARSE_ARGUMENTS prefix arg_names option_names)\r
+  SET(DEFAULT_ARGS)\r
+  FOREACH(arg_name ${arg_names})\r
+    SET(${prefix}_${arg_name})\r
+  ENDFOREACH(arg_name)\r
+  FOREACH(option ${option_names})\r
+    SET(${prefix}_${option} FALSE)\r
+  ENDFOREACH(option)\r
+  SET(current_arg_name DEFAULT_ARGS)\r
+  SET(current_arg_list)\r
+  FOREACH(arg ${ARGN})\r
+    LIST_CONTAINS(is_arg_name ${arg} ${arg_names})\r
+    IF (is_arg_name)\r
+      SET(${prefix}_${current_arg_name} ${current_arg_list})\r
+      SET(current_arg_name ${arg})\r
+      SET(current_arg_list)\r
+    ELSE (is_arg_name)\r
+      LIST_CONTAINS(is_option ${arg} ${option_names})\r
+      IF (is_option)\r
+      SET(${prefix}_${arg} TRUE)\r
+      ELSE (is_option)\r
+      SET(current_arg_list ${current_arg_list} ${arg})\r
+      ENDIF (is_option)\r
+    ENDIF (is_arg_name)\r
+  ENDFOREACH(arg)\r
+  SET(${prefix}_${current_arg_name} ${current_arg_list})\r
+ENDMACRO(PARSE_ARGUMENTS)\r
+\r
+#----------------------------------------------------------------------------\r
+# SALOME_INSTALL_SCRIPTS is a macro useful for installing scripts.\r
+#\r
+# USAGE: SALOME_INSTALL_SCRIPTS(file_list path [WORKING_DIRECTORY dir] [DEF_PERMS])\r
+#\r
+# ARGUMENTS:\r
+# file_list: IN : list of files to be installed. This list should be quoted.\r
+# path: IN : full pathname for installing.\r
+# \r
+# By default files to be installed as executable scripts.\r
+# If DEF_PERMS option is provided, than permissions for installed files are\r
+# only OWNER_WRITE, OWNER_READ, GROUP_READ, and WORLD_READ. \r
+#----------------------------------------------------------------------------\r
+MACRO(SALOME_INSTALL_SCRIPTS file_list path)\r
+  PARSE_ARGUMENTS(SALOME_INSTALL_SCRIPTS "WORKING_DIRECTORY" "DEF_PERMS" ${ARGN})\r
+  SET(PERMS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ)\r
+  IF(NOT SALOME_INSTALL_SCRIPTS_DEF_PERMS)\r
+    SET(PERMS ${PERMS} OWNER_EXECUTE GROUP_EXECUTE WORLD_EXECUTE)\r
+  ENDIF(NOT SALOME_INSTALL_SCRIPTS_DEF_PERMS)\r
+  SET(_all_pyc)\r
+  SET(_all_pyo)\r
+  SET(_all_subdirs)\r
+  FOREACH(file ${file_list})\r
+    SET(PREFIX "")\r
+    SET(_source_prefix "")\r
+    GET_FILENAME_COMPONENT(file_name ${file} NAME)\r
+    IF(NOT IS_ABSOLUTE ${file})\r
+      IF(SALOME_INSTALL_SCRIPTS_WORKING_DIRECTORY)\r
+           SET(PREFIX "${SALOME_INSTALL_SCRIPTS_WORKING_DIRECTORY}/")\r
+      ENDIF(SALOME_INSTALL_SCRIPTS_WORKING_DIRECTORY)\r
+      SET(_source_prefix "${CMAKE_CURRENT_SOURCE_DIR}/")\r
+    ENDIF(NOT IS_ABSOLUTE ${file})\r
+    INSTALL(FILES ${PREFIX}${file} DESTINATION ${path} PERMISSIONS ${PERMS})\r
+    GET_FILENAME_COMPONENT(ext ${file} EXT)\r
+    GET_FILENAME_COMPONENT(we_ext ${file} NAME_WE)\r
+\r
+    IF(ext STREQUAL .py)    \r
+      # Generate and install the pyc and pyo\r
+      # [ABN] Important: we avoid references or usage of CMAKE_INSTALL_PREFIX which is not correctly set \r
+      # when using CPack.       \r
+      SET(_pyc_file "${CMAKE_CURRENT_BINARY_DIR}/${we_ext}.pyc")\r
+      SET(_pyo_file "${CMAKE_CURRENT_BINARY_DIR}/${we_ext}.pyo")\r
+      LIST(APPEND _all_pyc ${_pyc_file})\r
+      LIST(APPEND _all_pyo ${_pyo_file})\r
+      ADD_CUSTOM_COMMAND(\r
+           OUTPUT ${_pyc_file}\r
+           COMMAND ${PYTHON_EXECUTABLE} -c "import py_compile ; py_compile.compile('${_source_prefix}${file}', '${_pyc_file}', doraise=True )"\r
+           DEPENDS ${PREFIX}${file}\r
+           VERBATIM\r
+       )\r
+      ADD_CUSTOM_COMMAND(\r
+           OUTPUT ${_pyo_file}\r
+           COMMAND ${PYTHON_EXECUTABLE} -O -c "import py_compile ; py_compile.compile('${_source_prefix}${file}', '${_pyo_file}', doraise=True )"\r
+           DEPENDS ${PREFIX}${file}\r
+           VERBATIM\r
+       )\r
+      # Install the .pyo and the .pyc\r
+      INSTALL(FILES ${_pyc_file} DESTINATION ${path} PERMISSIONS ${PERMS})\r
+      INSTALL(FILES ${_pyo_file} DESTINATION ${path} PERMISSIONS ${PERMS})\r
+    ENDIF(ext STREQUAL .py)\r
+\r
+  # get relativa path (from CMAKE_SOURCE_DIR to CMAKE_CURRENT_SOURCE_DIR)\r
+  STRING(REGEX REPLACE ${CMAKE_SOURCE_DIR} "" rel_dir ${CMAKE_CURRENT_SOURCE_DIR})\r
+  # convert "/" to "_"\r
+  IF(rel_dir)\r
+    STRING(REGEX REPLACE "/" "_" unique_name ${rel_dir})\r
+  ELSE(rel_dir)\r
+    SET(unique_name _)\r
+  ENDIF(rel_dir)\r
+\r
+  ENDFOREACH(file ${file_list})\r
+  # Generate only one target for all requested Python script compilation.\r
+  # Make sure that the target name is unique too. \r
+  IF(_all_pyc)\r
+     SET(_cnt 0)\r
+     WHILE(TARGET "PYCOMPILE${unique_name}_${_cnt}")\r
+       MATH(EXPR _cnt ${_cnt}+1)\r
+     ENDWHILE()\r
+     ADD_CUSTOM_TARGET("PYCOMPILE${unique_name}_${_cnt}" ALL DEPENDS ${_all_pyc} ${_all_pyo})\r
+  ENDIF()\r
+ENDMACRO(SALOME_INSTALL_SCRIPTS)\r
+\r
+#----------------------------------------------------------------------------\r
+# SALOME_CONFIGURE_FILE is a macro useful for copying a file to another location \r
+# and modify its contents.\r
+#\r
+# USAGE: SALOME_CONFIGURE_FILE(in_file out_file [INSTALL dir])\r
+#\r
+# ARGUMENTS:\r
+# in_file: IN : input file (if relative path is given, full file path is computed from current source dir).\r
+# out_file: IN : output file (if relative path is given, full file path is computed from current build dir).\r
+# If INSTALL is specified, then 'out_file' will be installed to the 'dir' directory.\r
+#----------------------------------------------------------------------------\r
+MACRO(SALOME_CONFIGURE_FILE IN_FILE OUT_FILE)\r
+  IF(IS_ABSOLUTE ${IN_FILE})\r
+    SET(_in_file ${IN_FILE})\r
+  ELSE()\r
+    SET(_in_file ${CMAKE_CURRENT_SOURCE_DIR}/${IN_FILE})\r
+  ENDIF()\r
+  IF(IS_ABSOLUTE  ${OUT_FILE})\r
+    SET(_out_file ${OUT_FILE})\r
+  ELSE()\r
+    SET(_out_file ${CMAKE_CURRENT_BINARY_DIR}/${OUT_FILE})\r
+  ENDIF()\r
+  MESSAGE(STATUS "Creation of ${_out_file}")\r
+  CONFIGURE_FILE(${_in_file} ${_out_file} @ONLY)\r
+  PARSE_ARGUMENTS(SALOME_CONFIGURE_FILE "INSTALL" "" ${ARGN})\r
+  IF(SALOME_CONFIGURE_FILE_INSTALL)\r
+    INSTALL(FILES ${_out_file} DESTINATION ${SALOME_CONFIGURE_FILE_INSTALL})\r
+  ENDIF(SALOME_CONFIGURE_FILE_INSTALL)\r
+ENDMACRO(SALOME_CONFIGURE_FILE)\r
+\r
+\r
+#######################################################################################\r
+# Useful macros for SALOME own package detection system\r
+#\r
+\r
+###\r
+# SALOME_CHECK_EQUAL_PATHS(result path1 path2)\r
+#  Check if two paths are identical, resolving links. If the paths do not exist a simple\r
+#  text comparison is performed.\r
+#  result is a boolean.\r
+###\r
+MACRO(SALOME_CHECK_EQUAL_PATHS varRes path1 path2)  \r
+  SET("${varRes}" OFF)\r
+  IF(EXISTS "${path1}")\r
+    GET_FILENAME_COMPONENT(_tmp1 "${path1}" REALPATH)\r
+  ELSE()\r
+    SET(_tmp1 "${path1}")\r
+  ENDIF() \r
+\r
+  IF(EXISTS "${path2}")\r
+    GET_FILENAME_COMPONENT(_tmp2 "${path2}" REALPATH)\r
+  ELSE()\r
+    SET(_tmp2 "${path2}")\r
+  ENDIF() \r
+\r
+  IF("${_tmp1}" STREQUAL "${_tmp2}")\r
+    SET("${varRes}" ON)\r
+  ENDIF()\r
+#  MESSAGE(${${varRes}})\r
+ENDMACRO()\r
+\r
+####\r
+# SALOME_LOG_OPTIONAL_PACKAGE(pkg flag)\r
+#\r
+# Register in global variables the detection status (found or not) of the optional package 'pkg' \r
+# and the configuration flag that should be turned off to avoid detection of the package.\r
+# The global variables are read again by SALOME_PACKAGE_REPORT_AND_CHECK to produce \r
+# a summary report of the detection status and stops the process if necessary.\r
+MACRO(SALOME_LOG_OPTIONAL_PACKAGE pkg flag)\r
+  # Was the package found\r
+  STRING(TOUPPER ${pkg} _pkg_UC)\r
+  IF(${pkg}_FOUND OR ${_pkg_UC}_FOUND)\r
+    SET(_isFound TRUE)\r
+  ELSE()\r
+    SET(_isFound FALSE)\r
+  ENDIF()\r
+\r
+  # Is the package already in the list? Then update its status:\r
+  LIST(FIND _SALOME_OPTIONAL_PACKAGES_names ${pkg} _result)\r
+  IF(NOT ${_result} EQUAL -1)\r
+    LIST(REMOVE_AT _SALOME_OPTIONAL_PACKAGES_found ${_result})\r
+    LIST(REMOVE_AT _SALOME_OPTIONAL_PACKAGES_flags ${_result})\r
+    LIST(INSERT    _SALOME_OPTIONAL_PACKAGES_found ${_result} ${_isFound})\r
+    LIST(INSERT    _SALOME_OPTIONAL_PACKAGES_flags ${_result} ${flag})\r
+  ELSE()\r
+    # Otherwise insert it\r
+    LIST(APPEND _SALOME_OPTIONAL_PACKAGES_names ${pkg})\r
+    LIST(APPEND _SALOME_OPTIONAL_PACKAGES_found ${_isFound})\r
+    LIST(APPEND _SALOME_OPTIONAL_PACKAGES_flags ${flag})\r
+  ENDIF() \r
+  \r
+ENDMACRO(SALOME_LOG_OPTIONAL_PACKAGE)\r
+\r
+####\r
+# SALOME_JUSTIFY_STRING()\r
+#\r
+# Justifies the string specified as an argument to the given length\r
+# adding required number of spaces to the end. Does noting if input\r
+# string is longer as required length.\r
+# Puts the result to the output variable.\r
+#\r
+# USAGE: SALOME_JUSTIFY_STRING(input length result)\r
+#\r
+# ARGUMENTS:\r
+#   input  [in] input string\r
+#   length [in] required length of resulting string\r
+#   result [out] name of variable where the result string is put to\r
+#\r
+MACRO(SALOME_JUSTIFY_STRING input length result)\r
+  SET(${result} ${input})\r
+  STRING(LENGTH ${input} _input_length)\r
+  MATH(EXPR _nb_spaces "${length}-${_input_length}-1")\r
+  IF (_nb_spaces GREATER 0)\r
+    FOREACH(_idx RANGE ${_nb_spaces})  \r
+      SET(${result} "${${result}} ")\r
+    ENDFOREACH()\r
+  ENDIF()\r
+ENDMACRO(SALOME_JUSTIFY_STRING)\r
+\r
+####\r
+# SALOME_PACKAGE_REPORT_AND_CHECK()\r
+#\r
+# Print a quick summary of the detection of optional prerequisites.\r
+# If a package was not found, the configuration is stopped. The summary also indicates \r
+# which flag should be turned off to skip the detection of the package. \r
+#\r
+# If optional JUSTIFY argument is specified, names of packages\r
+# are left-justified to the given length; default value is 10.\r
+#\r
+# USAGE: SALOME_PACKAGE_REPORT_AND_CHECK([JUSTIFY length])\r
+#\r
+MACRO(SALOME_PACKAGE_REPORT_AND_CHECK)\r
+  SET(_will_fail OFF)\r
+  PARSE_ARGUMENTS(SALOME_PACKAGE_REPORT "JUSTIFY" "" ${ARGN})\r
+  IF(SALOME_PACKAGE_REPORT_JUSTIFY)\r
+    SET(_length ${SALOME_PACKAGE_REPORT_JUSTIFY})\r
+  ELSE()\r
+    SET(_length 23)\r
+  ENDIF()\r
+  MESSAGE(STATUS "") \r
+  MESSAGE(STATUS "  Optional packages - Detection report ")\r
+  MESSAGE(STATUS "  ==================================== ")\r
+  MESSAGE(STATUS "")\r
+  IF(DEFINED _SALOME_OPTIONAL_PACKAGES_names)\r
+    LIST(LENGTH _SALOME_OPTIONAL_PACKAGES_names _list_len)\r
+    # Another CMake stupidity - FOREACH(... RANGE r) generates r+1 numbers ...\r
+    MATH(EXPR _range "${_list_len}-1")\r
+    FOREACH(_idx RANGE ${_range})  \r
+      LIST(GET _SALOME_OPTIONAL_PACKAGES_names ${_idx} _pkg_name)\r
+      LIST(GET _SALOME_OPTIONAL_PACKAGES_found ${_idx} _pkg_found)\r
+      LIST(GET _SALOME_OPTIONAL_PACKAGES_flags ${_idx} _pkg_flag)\r
+      SALOME_JUSTIFY_STRING(${_pkg_name} ${_length} _pkg_name)\r
+      IF(_pkg_found)\r
+        SET(_found_msg "Found")\r
+        SET(_flag_msg "")\r
+      ELSE()\r
+        SET(_will_fail ON)\r
+        SET(_found_msg "NOT Found")\r
+        SET(_flag_msg " - ${_pkg_flag} can be switched OFF to skip this prerequisite.")\r
+      ENDIF()\r
+    \r
+      MESSAGE(STATUS "  * ${_pkg_name}  ->  ${_found_msg}${_flag_msg}")\r
+    ENDFOREACH()\r
+  ENDIF(DEFINED _SALOME_OPTIONAL_PACKAGES_names)\r
+  MESSAGE(STATUS "")\r
+  MESSAGE(STATUS "")\r
+  \r
+  # Failure if some packages were missing:\r
+  IF(_will_fail)\r
+    MESSAGE(FATAL_ERROR "Some required prerequisites have NOT been found. Take a look at the report above to fix this.")\r
+  ENDIF()\r
+ENDMACRO(SALOME_PACKAGE_REPORT_AND_CHECK)\r
+\r
+####\r
+# SALOME_FIND_PACKAGE(englobingPackageName standardPackageName modus [onlyTryQuietly])\r
+#\r
+# example:  SALOME_FIND_PACKAGE(SalomeVTK VTK CONFIG)\r
+#\r
+# Encapsulate the call to the standard FIND_PACKAGE(standardPackageName) passing all the options\r
+# given when calling the command FIND_PACKAGE(SalomeXYZ). Those options are stored implicitly in \r
+# CMake variables: xyz__FIND_QUIETLY, xyz_FIND_REQUIRED, etc ...\r
+# \r
+# If a list of components was specified when invoking the initial FIND_PACKAGE(SalomeXyz ...) this is \r
+# also handled properly.\r
+#\r
+# Modus is either MODULE or CONFIG (cf standard FIND_PACKAGE() documentation).\r
+# The last argument is optional and if set to TRUE will force the search to be OPTIONAL and QUIET.\r
+# If the package is looked for in CONFIG mode, the standard system paths are skipped. If you still want a \r
+# system installation to be found in this mode, you have to set the ROOT_DIR variable explicitly to /usr (for\r
+# example). \r
+#  \r
+# This macro is to be called from within the FindSalomeXXXX.cmake file.\r
+#\r
+####\r
+MACRO(SALOME_FIND_PACKAGE englobPkg stdPkg mode)\r
+  SET(_OPT_ARG ${ARGV3})\r
+  # Only bother if the package was not already found:\r
+  # Some old packages use the lower case version - standard should be to always use\r
+  # upper case:\r
+  STRING(TOUPPER ${stdPkg} stdPkgUC)\r
+  IF(NOT (${stdPkg}_FOUND OR ${stdPkgUC}_FOUND))\r
+    IF(${englobPkg}_FIND_QUIETLY OR _OPT_ARG)\r
+      SET(_tmp_quiet "QUIET")\r
+    ELSE()\r
+      SET(_tmp_quiet)\r
+    ENDIF()  \r
+    IF(${englobPkg}_FIND_REQUIRED AND NOT _OPT_ARG)\r
+      SET(_tmp_req "REQUIRED")\r
+    ELSE()\r
+      SET(_tmp_req)\r
+    ENDIF()  \r
+    IF(${englobPkg}_FIND_VERSION_EXACT)\r
+      SET(_tmp_exact "EXACT")\r
+    ELSE()\r
+      SET(_tmp_exact)\r
+    ENDIF()\r
+\r
+    # Call the CMake FIND_PACKAGE() command:    \r
+    STRING(TOLOWER ${stdPkg} _pkg_lc)\r
+    IF(("${mode}" STREQUAL "NO_MODULE") OR ("${mode}" STREQUAL "CONFIG"))\r
+      # Hope to find direclty a CMake config file, indicating the SALOME CMake file\r
+      # paths (the command already looks in places like "share/cmake", etc ... by default)\r
+      # Note the options NO_CMAKE_BUILDS_PATH, NO_CMAKE_PACKAGE_REGISTRY to avoid (under Windows)\r
+      # looking into a previous CMake build done via a GUI, or into the Win registry.\r
+      # NO_CMAKE_SYSTEM_PATH and NO_SYSTEM_ENVIRONMENT_PATH ensure any _system_ files like 'xyz-config.cmake' \r
+      # don't get loaded (typically Boost). To force their loading, set the XYZ_ROOT_DIR variable to '/usr'. \r
+      # See documentation of FIND_PACKAGE() for full details.\r
+      \r
+      # Do we need to call the signature using components?\r
+      IF(${englobPkg}_FIND_COMPONENTS)\r
+        FIND_PACKAGE(${stdPkg} ${${englobPkg}_FIND_VERSION} ${_tmp_exact} \r
+              NO_MODULE ${_tmp_quiet} ${_tmp_req} COMPONENTS ${${englobPkg}_FIND_COMPONENTS}\r
+              PATH_SUFFIXES "salome_adm/cmake_files" "adm_local/cmake_files" "adm/cmake"\r
+              NO_CMAKE_BUILDS_PATH NO_CMAKE_PACKAGE_REGISTRY NO_CMAKE_SYSTEM_PACKAGE_REGISTRY NO_CMAKE_SYSTEM_PATH\r
+                NO_SYSTEM_ENVIRONMENT_PATH)\r
+      ELSE()\r
+        FIND_PACKAGE(${stdPkg} ${${englobPkg}_FIND_VERSION} ${_tmp_exact} \r
+              NO_MODULE ${_tmp_quiet} ${_tmp_req}\r
+              PATH_SUFFIXES "salome_adm/cmake_files" "adm_local/cmake_files" "adm/cmake"\r
+              NO_CMAKE_BUILDS_PATH NO_CMAKE_PACKAGE_REGISTRY NO_CMAKE_SYSTEM_PACKAGE_REGISTRY NO_CMAKE_SYSTEM_PATH\r
+                 NO_SYSTEM_ENVIRONMENT_PATH)\r
+      ENDIF()\r
+      MARK_AS_ADVANCED(${stdPkg}_DIR)\r
+      \r
+    ELSEIF("${mode}" STREQUAL "MODULE")\r
+    \r
+      # Do we need to call the signature using components?\r
+      IF(${englobPkg}_FIND_COMPONENTS)\r
+        FIND_PACKAGE(${stdPkg} ${${englobPkg}_FIND_VERSION} ${_tmp_exact} \r
+              MODULE ${_tmp_quiet} ${_tmp_req} COMPONENTS ${${englobPkg}_FIND_COMPONENTS})\r
+      ELSE()\r
+        FIND_PACKAGE(${stdPkg} ${${englobPkg}_FIND_VERSION} ${_tmp_exact} \r
+              MODULE ${_tmp_quiet} ${_tmp_req})\r
+      ENDIF()\r
+      \r
+    ELSE()\r
+    \r
+      MESSAGE(FATAL_ERROR "Invalid mode argument in the call to the macro SALOME_FIND_PACKAGE. Should be CONFIG or MODULE.")\r
+      \r
+    ENDIF()\r
+    \r
+  ENDIF()\r
+ENDMACRO()\r
+\r
+\r
+####################################################################\r
+# SALOME_FIND_PACKAGE_DETECT_CONFLICTS(pkg referenceVariable upCount)\r
+#    pkg              : name of the system package to be detected\r
+#    referenceVariable: variable containing a path that can be browsed up to \r
+# retrieve the package root directory (xxx_ROOT_DIR)\r
+#    upCount          : number of times we have to go up from the path <referenceVariable>\r
+# to obtain the package root directory.\r
+# If this is a path to a file, going up one time gives the directory containing the file\r
+# going up 2 times gives the parent directory.\r
+#   \r
+# For example:  SALOME_FIND_PACKAGE_DETECT_CONFLICTS(SWIG SWIG_EXECUTABLE 2)\r
+#     with SWIG_EXECUTABLE set to '/usr/bin/swig'\r
+#     will produce '/usr' \r
+#\r
+# Generic detection (and conflict check) procedure for package XYZ:\r
+# 1. Load a potential env variable XYZ_ROOT_DIR as a default choice for the cache entry XYZ_ROOT_DIR\r
+#    If empty, load a potential XYZ_ROOT_DIR_EXP as default value (path exposed by another package depending\r
+# directly on XYZ)\r
+# 2. Invoke FIND_PACKAGE() in this order:\r
+#    * in CONFIG mode first (if possible): priority is given to a potential \r
+#    "XYZ-config.cmake" file\r
+#    * then switch to the standard MODULE mode, appending on CMAKE_PREFIX_PATH \r
+# the above XYZ_ROOT_DIR variable\r
+# 3. Extract the path actually found into a temp variable _XYZ_TMP_DIR\r
+# 4. Warn if XYZ_ROOT_DIR is set and doesn't match what was found (e.g. when CMake found the system installation\r
+#    instead of what is pointed to by XYZ_ROOT_DIR - happens when a typo in the content of XYZ_ROOT_DIR).\r
+# 5. Conflict detection:\r
+#    * check the temp variable against a potentially existing XYZ_ROOT_DIR_EXP\r
+# 6. Finally expose what was *actually* found in XYZ_ROOT_DIR.  \r
+# 7. Specific stuff: for example exposing a prerequisite of XYZ to the rest of the world for future \r
+# conflict detection. This is added after the call to the macro by the callee.\r
+#\r
+MACRO(SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS pkg referenceVariable upCount)\r
+  ##\r
+  ## 0. Initialization\r
+  ##\r
+  PARSE_ARGUMENTS(SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS "ENVVAR" "" ${ARGN})\r
+  \r
+  # Package name, upper case\r
+  STRING(TOUPPER ${pkg} pkg_UC)\r
+\r
+  ##\r
+  ## 1. Load environment or any previously detected root dir for the package\r
+  ##\r
+  SET(_envvar ${pkg_UC}_ROOT_DIR)\r
+  IF(SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS_ENVVAR)\r
+    SET(_envvar "${SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS_ENVVAR}")\r
+  ENDIF()\r
+  IF(DEFINED ENV{${_envvar}})\r
+    FILE(TO_CMAKE_PATH "$ENV{${_envvar}}" _${pkg_UC}_ROOT_DIR_ENV)\r
+    SET(_dflt_value "${_${pkg_UC}_ROOT_DIR_ENV}")\r
+  ELSE()\r
+    # will be blank if no package was previously loaded:\r
+    SET(_dflt_value "${${pkg_UC}_ROOT_DIR_EXP}")\r
+  ENDIF()\r
+  # Detect if the variable has been set on the command line or elsewhere:\r
+  IF(DEFINED ${_envvar})\r
+     SET(_var_already_there TRUE)\r
+  ELSE()\r
+     SET(_var_already_there FALSE)\r
+  ENDIF()\r
+  #   Make cache entry \r
+  SET(${_envvar} "${_dflt_value}" CACHE PATH "Path to ${pkg_UC} directory")\r
+\r
+  ##\r
+  ## 2. Find package - try CONFIG mode first (i.e. looking for XYZ-config.cmake)\r
+  ##\r
+  \r
+  # Override the variable - don't append to it, as it would give precedence\r
+  # to what was stored there before!  \r
+  IF(DEFINED ${_envvar})\r
+    SET(CMAKE_PREFIX_PATH "${${_envvar}}")\r
+  ENDIF()\r
+    \r
+  # Try find_package in config mode. This has the priority, but is \r
+  # performed QUIET and not REQUIRED:\r
+  SALOME_FIND_PACKAGE("Salome${pkg}" ${pkg} NO_MODULE TRUE)\r
+  \r
+  IF (${pkg_UC}_FOUND OR ${pkg}_FOUND)\r
+    MESSAGE(STATUS "Found ${pkg} in CONFIG mode!")\r
+  ENDIF()\r
+\r
+  # Otherwise try the standard way (module mode, with the standard CMake Find*** macro):\r
+  # We do it quietly to produce our own error message, except if we are in debug mode:\r
+  IF(SALOME_CMAKE_DEBUG)\r
+    SALOME_FIND_PACKAGE("Salome${pkg}" ${pkg} MODULE FALSE)\r
+  ELSE()\r
+    SALOME_FIND_PACKAGE("Salome${pkg}" ${pkg} MODULE TRUE)\r
+  ENDIF()\r
+  \r
+  # Set the "FOUND" variable for the SALOME wrapper:\r
+  IF(${pkg_UC}_FOUND OR ${pkg}_FOUND)\r
+    SET(SALOME${pkg_UC}_FOUND TRUE)\r
+  ELSE()\r
+    SET(SALOME${pkg_UC}_FOUND FALSE)\r
+    IF(NOT Salome${pkg}_FIND_QUIETLY)\r
+      IF(Salome${pkg}_FIND_REQUIRED)\r
+         MESSAGE(FATAL_ERROR "Package ${pkg} couldn't be found - did you set the corresponing root dir correctly? "\r
+         "It currently contains ${_envvar}=${${_envvar}}  "\r
+         "Append -DSALOME_CMAKE_DEBUG=ON on the command line if you want to see the original CMake error.")\r
+      ELSE()\r
+         MESSAGE(WARNING "Package ${pkg} couldn't be found - did you set the corresponing root dir correctly? "\r
+         "It currently contains ${_envvar}=${${_envvar}}  "\r
+         "Append -DSALOME_CMAKE_DEBUG=ON on the command line if you want to see the original CMake error.")\r
+      ENDIF()\r
+    ENDIF()\r
+  ENDIF()\r
+  \r
+  IF (${pkg_UC}_FOUND OR ${pkg}_FOUND)\r
+    ## 3. Set the root dir which was finally retained by going up "upDir" times\r
+    ## from the given reference path. The variable "referenceVariable" may be a list.\r
+    ## In this case we take its first element. \r
+    \r
+    # First test if the variable exists, warn otherwise:\r
+    IF(NOT DEFINED ${referenceVariable})\r
+      MESSAGE(WARNING "${pkg}: the reference variable '${referenceVariable}' used when calling the macro "\r
+      "SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS() is not defined.")\r
+    ENDIF()\r
+    \r
+    LIST(LENGTH ${referenceVariable} _tmp_len)\r
+    IF(_tmp_len)\r
+       LIST(GET ${referenceVariable} 0 _tmp_ROOT_DIR)\r
+    ELSE()\r
+       #  Note the double de-reference of "referenceVariable":\r
+       SET(_tmp_ROOT_DIR "${${referenceVariable}}")\r
+    ENDIF()\r
+    # Up cound can be reset by detection procedure\r
+    SET(_upCount ${upCount})\r
+    IF(DEFINED ${pkg_UC}_UPCOUNT)\r
+      SET(_upCount ${${pkg_UC}_UPCOUNT})\r
+    ENDIF()\r
+    IF(${_upCount}) \r
+      FOREACH(_unused RANGE 1 ${_upCount})        \r
+        GET_FILENAME_COMPONENT(_tmp_ROOT_DIR "${_tmp_ROOT_DIR}" PATH)\r
+      ENDFOREACH()\r
+    ENDIF()\r
+\r
+    ##\r
+    ## 4. Warn if CMake found something not located under ENV(XYZ_ROOT_DIR)\r
+    ##\r
+    IF(DEFINED ENV{${_envvar}})\r
+      SALOME_CHECK_EQUAL_PATHS(_res "${_tmp_ROOT_DIR}" "${_${pkg_UC}_ROOT_DIR_ENV}")\r
+      IF(NOT _res)\r
+        MESSAGE(WARNING "${pkg} was found, but not at the path given by the "\r
+            "environment ${_envvar}! Is the variable correctly set? "\r
+            "The two paths are: ${_tmp_ROOT_DIR} and: ${_${pkg_UC}_ROOT_DIR_ENV}")\r
+        \r
+      ELSE()\r
+        MESSAGE(STATUS "${pkg} found directory matches what was specified in the ${_envvar} variable, all good!")    \r
+      ENDIF()\r
+    ELSE()\r
+        IF(NOT _var_already_there) \r
+          MESSAGE(STATUS "Variable ${_envvar} was not explicitly defined. "\r
+          "An installation was found anyway: ${_tmp_ROOT_DIR}")\r
+        ENDIF()\r
+    ENDIF()\r
+\r
+    ##\r
+    ## 5. Conflict detection\r
+    ##     From another prerequisite using the package:\r
+    ##\r
+    IF(${pkg_UC}_ROOT_DIR_EXP)\r
+        SALOME_CHECK_EQUAL_PATHS(_res "${_tmp_ROOT_DIR}" "${${pkg_UC}_ROOT_DIR_EXP}") \r
+        IF(NOT _res)\r
+           MESSAGE(WARNING "Warning: ${pkg}: detected version conflicts with a previously found ${pkg}!"\r
+                           " The two paths are " ${_tmp_ROOT_DIR} " vs " ${${pkg_UC}_ROOT_DIR_EXP})\r
+        ELSE()\r
+            MESSAGE(STATUS "${pkg} directory matches what was previously exposed by another prereq, all good!")\r
+        ENDIF()        \r
+    ENDIF()\r
+    \r
+    ##\r
+    ## 6. Save the detected installation\r
+    ##\r
+    SET(${_envvar} "${_tmp_ROOT_DIR}")\r
+     \r
+  ELSE()\r
+    MESSAGE(STATUS "${pkg} was not found.")  \r
+  ENDIF()\r
+  \r
+  SET(Salome${pkg}_FOUND "${pkg}_FOUND")\r
+ENDMACRO(SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS)\r
+\r
+\r
+####################################################################\r
+# SALOME_ADD_MPI_TO_HDF5()\r
+# \r
+# Overload the HDF5 flags so that they also contain MPI references.\r
+# This is to be used when HDF5 was compiled with MPI support;\r
+MACRO(SALOME_ADD_MPI_TO_HDF5)  \r
+  SET(HDF5_INCLUDE_DIRS ${HDF5_INCLUDE_DIRS} ${MPI_INCLUDE_DIRS})\r
+  SET(HDF5_DEFINITIONS "${HDF5_DEFINITIONS} ${MPI_DEFINITIONS}")\r
+  SET(HDF5_LIBRARIES ${HDF5_LIBRARIES} ${MPI_LIBRARIES})\r
+ENDMACRO(SALOME_ADD_MPI_TO_HDF5)\r
+\r
+####################################################################\r
+# SALOME_TOHEXA()\r
+# Convert a number (smaller than 16) into hexadecimal representation\r
+# with a leading 0.\r
+MACRO(SALOME_TOHEXA num result)\r
+  SET(_hexa_map a b c d e f)\r
+  IF(${num} LESS 10)\r
+    SET(${result} "0${num}")\r
+  ELSE()\r
+    MATH(EXPR _res "${num}-10" )\r
+    LIST(GET _hexa_map ${_res} _out)\r
+    SET(${result} "0${_out}")\r
+  ENDIF()\r
+ENDMACRO(SALOME_TOHEXA)\r
+\r
+####################################################################\r
+# SALOME_XVERSION()\r
+# \r
+# Computes hexadecimal version of SALOME package\r
+#\r
+# USAGE: SALOME_XVERSION(package)\r
+#\r
+# ARGUMENTS:\r
+#\r
+# package: IN: SALOME package name\r
+#\r
+# The macro reads SALOME package version from PACKAGE_VERSION variable\r
+# (note package name in uppercase as assumed for SALOME modules);\r
+# hexadecimal version value in form 0xAABBCC (where AA, BB and CC are\r
+# major, minor and maintenance components of package version in\r
+# hexadecimal form) is put to the PACKAGE_XVERSION variable\r
+MACRO(SALOME_XVERSION pkg)\r
+  STRING(TOUPPER ${pkg} _pkg_UC)\r
+  IF(${_pkg_UC}_VERSION)\r
+    SET(_major)\r
+    SET(_minor)\r
+    SET(_patch)\r
+    SALOME_TOHEXA(${${_pkg_UC}_MAJOR_VERSION} _major)\r
+    SALOME_TOHEXA(${${_pkg_UC}_MINOR_VERSION} _minor)\r
+    SALOME_TOHEXA(${${_pkg_UC}_PATCH_VERSION} _patch)\r
+    SET(${_pkg_UC}_XVERSION "0x${_major}${_minor}${_patch}")\r
+  ENDIF()\r
+ENDMACRO(SALOME_XVERSION)\r
+\r
+\r
+#########################################################################\r
+# SALOME_ACCUMULATE_HEADERS()\r
+# \r
+# This macro is called in the various FindSalomeXYZ.cmake modules to accumulate\r
+# internally the list of include headers to be saved for future export. \r
+# The full set of include is saved in a variable called \r
+#      _${PROJECT_NAME}_EXTRA_HEADERS\r
+#\r
+MACRO(SALOME_ACCUMULATE_HEADERS lst)\r
+  FOREACH(l IN LISTS ${lst})\r
+    LIST(FIND _${PROJECT_NAME}_EXTRA_HEADERS "${l}" _res)\r
+    IF(_res EQUAL "-1")\r
+      IF(NOT "${l}" STREQUAL "/usr/include")\r
+        LIST(APPEND _${PROJECT_NAME}_EXTRA_HEADERS "${l}")\r
+      ENDIF()\r
+    ENDIF()\r
+  ENDFOREACH()\r
+ENDMACRO(SALOME_ACCUMULATE_HEADERS)\r
+\r
+#########################################################################\r
+# SALOME_ACCUMULATE_ENVIRONMENT()\r
+# \r
+# USAGE: SALOME_ACCUMULATE_ENVIRONMENT(envvar value [value ...])\r
+#\r
+# ARGUMENTS:\r
+#   envvar [in] environment variable name, e.g. PATH\r
+#   value  [in] value(s) to be added to environment variable\r
+#\r
+# This macro is called in the various FindSalomeXYZ.cmake modules to \r
+# accumulate environment variables, to be used later to run some command\r
+# in proper environment.\r
+#\r
+# 1. Each envrironment variable is stored in specific CMake variable\r
+#    _${PROJECT_NAME}_EXTRA_ENV_<var>, where <var> is name of variable.\r
+# 2. Full list of environment variable names is stored in CMake variable\r
+#    _${PROJECT_NAME}_EXTRA_ENV.\r
+#\r
+# Notes:\r
+# - The arguments list can include optional CHECK or NOCHECK keywords:\r
+#   * For all arguments following CHECK keyword the macro perform an\r
+#     additional check (see below); this is the default mode, it is suitable\r
+#     for path variables (PATH, LD_LIBRARY_PATH, etc).\r
+#   * For all arguments following NOCHECK keyword, no additional check is\r
+#     performed.\r
+#   Checking an argument means that we check:\r
+#    - That the path actually exists\r
+#    - That this is not a standard system path (starting with "/usr"); this avoids\r
+#   polluting LD_LIBRARY_PATH or PATH with things like "/usr/lib64" ...\r
+#\r
+MACRO(SALOME_ACCUMULATE_ENVIRONMENT envvar)\r
+  SET(_is_check ON)\r
+  FOREACH(_item ${ARGN})\r
+    IF(${_item} STREQUAL "NOCHECK")\r
+      SET(_is_check OFF)\r
+    ELSEIF(${_item} STREQUAL "CHECK")\r
+      SET(_is_check ON)\r
+    ELSE()\r
+      IF(_is_check)\r
+        IF(NOT IS_DIRECTORY ${_item})\r
+          IF(TARGET ${_item})\r
+            GET_TARGET_PROPERTY(_item ${_item} LOCATION)\r
+          ENDIF()        \r
+          GET_FILENAME_COMPONENT(_item ${_item} PATH)\r
+        ENDIF()    \r
+        IF(EXISTS ${_item})\r
+          STRING(REGEX MATCH "^(/usr|/lib|/bin)" _usr_find ${_item})\r
+          LIST(FIND _${PROJECT_NAME}_EXTRA_ENV_${envvar} ${_item} _res)\r
+          IF(NOT _usr_find AND _res EQUAL -1)\r
+              LIST(APPEND _${PROJECT_NAME}_EXTRA_ENV_${envvar} ${_item})\r
+          ENDIF()  \r
+        ENDIF()\r
+      ELSE(_is_check)\r
+        LIST(FIND _${PROJECT_NAME}_EXTRA_ENV_${envvar} ${_item} _res)\r
+        IF( _res EQUAL -1)\r
+          LIST(APPEND _${PROJECT_NAME}_EXTRA_ENV_${envvar} ${_item})\r
+        ENDIF()  \r
+      ENDIF(_is_check)\r
+    ENDIF()   \r
+  ENDFOREACH()\r
+  \r
+  LIST(FIND _${PROJECT_NAME}_EXTRA_ENV ${envvar} _res)\r
+  IF(_res EQUAL -1)\r
+    LIST(APPEND _${PROJECT_NAME}_EXTRA_ENV ${envvar})\r
+  ENDIF()\r
+  SET(_${PROJECT_NAME}_EXTRA_ENV_FULL "SET\(${PROJECT_NAME}_EXTRA_ENV ${_${PROJECT_NAME}_EXTRA_ENV}\)")\r
+  FOREACH(_res ${_${PROJECT_NAME}_EXTRA_ENV})\r
+    STRING(REPLACE "${CMAKE_INSTALL_PREFIX}" "\${PACKAGE_PREFIX_DIR}" _res_path "${_${PROJECT_NAME}_EXTRA_ENV_${_res}}")\r
+    SET(_${PROJECT_NAME}_EXTRA_ENV_FULL "${_${PROJECT_NAME}_EXTRA_ENV_FULL}\nSET\(${PROJECT_NAME}_EXTRA_ENV_${_res} ${_res_path}\)")\r
+  ENDFOREACH()\r
+ENDMACRO(SALOME_ACCUMULATE_ENVIRONMENT)\r
+\r
+#########################################################################\r
+# SALOME_GENERATE_ENVIRONMENT_SCRIPT()\r
+# \r
+# USAGE: SALOME_GENERATE_ENVIRONMENT_SCRIPT(output script cmd opts)\r
+#\r
+# ARGUMENTS:\r
+#   output [out] output command, e.g. for creation of target.\r
+#   script [in]  output environement script name\r
+#   cmd    [in]  input command, e.g. sphinx or python command.\r
+#   opts   [in]  options for input command (cmd).\r
+#\r
+# This macro is called when it's necessary to use given environment to run some command. \r
+# Macro generates environement script using previously created variables\r
+# _${PROJECT_NAME}_EXTRA_ENV_<var>, where <var> is name of variable and\r
+# _${PROJECT_NAME}_EXTRA_ENV (see marco SALOME_ACCUMULATE_ENVIRONMENT);\r
+# and puts generated command in proper environment into <output> argument.\r
+# \r
+# Notes:\r
+# - If <script> is specified as relative path, it is computed from the current build\r
+#   directory.\r
+#\r
+MACRO(SALOME_GENERATE_ENVIRONMENT_SCRIPT output script cmd opts)\r
+  IF(IS_ABSOLUTE ${script})\r
+    SET(_script ${script})\r
+  ELSE()\r
+    SET(_script ${CMAKE_CURRENT_BINARY_DIR}/${script})\r
+  ENDIF()\r
+\r
+  IF(WIN32)\r
+    SET(_ext "bat")\r
+    SET(_call_cmd "call")\r
+  ELSE()\r
+    SET(_ext "sh")\r
+    SET(_call_cmd ".")\r
+  ENDIF()\r
+  \r
+  SET(_env)\r
+  FOREACH(_item ${_${PROJECT_NAME}_EXTRA_ENV})\r
+    FOREACH(_val ${_${PROJECT_NAME}_EXTRA_ENV_${_item}})\r
+      IF(WIN32)\r
+        IF(${_item} STREQUAL "LD_LIBRARY_PATH")\r
+          SET(_item PATH)\r
+        ENDIF()\r
+        STRING(REPLACE "/" "\\" _env "${_env} @SET ${_item}=${_val};%${_item}%\n")        \r
+      ELSE(WIN32)\r
+        SET(_env "${_env} export ${_item}=${_val}:\${${_item}}\n")\r
+      ENDIF(WIN32)\r
+    ENDFOREACH()\r
+  ENDFOREACH()\r
+  \r
+  SET(_script ${_script}.${_ext})\r
+  FILE(WRITE ${_script} "${_env}")\r
+  \r
+  SET(${output} ${_call_cmd} ${_script} && ${cmd} ${opts})\r
+  \r
+ENDMACRO(SALOME_GENERATE_ENVIRONMENT_SCRIPT)\r
+\r
+#########################################################################\r
+# SALOME_GENERATE_TESTS_ENVIRONMENT()\r
+# \r
+# USAGE: SALOME_GENERATE_TESTS_ENVIRONMENT(output)\r
+#\r
+# ARGUMENTS:\r
+#   output [out] output environement variable.\r
+#\r
+# This macro generates <output> variable to use given environment to run some tests. \r
+# Macro generates environement variable using previously created variables\r
+# _${PROJECT_NAME}_EXTRA_ENV_<var>, where <var> is name of variable and\r
+# _${PROJECT_NAME}_EXTRA_ENV (see marco SALOME_ACCUMULATE_ENVIRONMENT);\r
+# and puts this variable into <output> argument.\r
+#\r
+MACRO(SALOME_GENERATE_TESTS_ENVIRONMENT output)\r
+ SET(_env)\r
+ SET(_WIN_LD_LIBRARY OFF)\r
+ FOREACH(_item ${_${PROJECT_NAME}_EXTRA_ENV})\r
+   IF(${_item} STREQUAL "LD_LIBRARY_PATH")\r
+     SET(_WIN_LD_LIBRARY ON)\r
+   ENDIF()\r
+   SET(_env_${_item})\r
+   FOREACH(_val ${_${PROJECT_NAME}_EXTRA_ENV_${_item}})\r
+     IF(WIN32)\r
+       STRING(REPLACE "/" "\\" _val "${_val}")\r
+       SET(_env_${_item} "${_val};${_env_${_item}}")\r
+     ELSE()\r
+       SET(_env_${_item} "${_val}:${_env_${_item}}")\r
+     ENDIF()\r
+   ENDFOREACH()\r
+ ENDFOREACH()\r
+\r
+ IF(_WIN_LD_LIBRARY AND WIN32)\r
+   SET(_env_PATH "${_env_PATH}$ENV{LD_LIBRARY_PATH};${_env_LD_LIBRARY_PATH}")\r
+ ENDIF()\r
+\r
+ IF(WIN32)\r
+   SET(sep ",")\r
+ ELSE()\r
+   SET(sep ";")\r
+ ENDIF()\r
\r
+ FOREACH(_item ${_${PROJECT_NAME}_EXTRA_ENV})\r
+   IF(WIN32)\r
+     IF(NOT ${_item} STREQUAL "LD_LIBRARY_PATH")\r
+       SET(_env "${_item}=$ENV{${_item}};${_env_${_item}}${sep}${_env}")\r
+     ENDIF()\r
+   ELSE()\r
+     STRING(REPLACE ";" ":" _iii "$ENV{${_item}}")\r
+     SET(_env "${_item}=${_iii}:${_env_${_item}}${sep}${_env}")\r
+   ENDIF()\r
+ ENDFOREACH()\r
+\r
+ # Get module name as substring of "Salome<ModuleName>"\r
+ STRING(REGEX MATCH "^Salome" _is_salome_project ${PROJECT_NAME})\r
+ IF(_is_salome_project)\r
+   STRING(SUBSTRING "${PROJECT_NAME}" 6 -1 PRNAME) \r
+ ELSE()\r
+   SET(PRNAME ${PROJECT_NAME})\r
+ ENDIF()\r
+ SET(_env "${PRNAME}_ROOT_DIR=${CMAKE_INSTALL_PREFIX}${sep}${_env}")\r
+  \r
+ # Creating follow string for Windows environement:\r
+ # "VAR1_ENV=1\;2\;3\;...\;...\;...;VAR2_ENV=1\;2\;3\;...\;...\;...;VAR3_ENV=1\;2\;3\;...\;...\;...;..."\r
+ IF(WIN32)\r
+   STRING(REGEX REPLACE "\\\\*;" "\\\\;" _env "${_env}")\r
+   STRING(REGEX REPLACE "\\\\*;*," ";" _env "${_env}")\r
+ ENDIF()\r
+\r
+ SET(${output} "${_env}")\r
+\r
+ENDMACRO(SALOME_GENERATE_TESTS_ENVIRONMENT) \r
+\r
+#########################################################################\r
+# SALOME_APPEND_LIST_OF_LIST()\r
+# \r
+# USAGE: SALOME_APPEND_LIST_OF_LIST(result element_list)\r
+#\r
+# Build a list of lists. The element_list is first parsed to convert it \r
+# from \r
+#     a;b;c;d;e\r
+# to \r
+#     a,b,c,d,e\r
+#\r
+# It is then added to the big list 'result'. Hence 'result' looks like:\r
+#     a,b,c,d,e;f,g,h; ...\r
+#\r
+MACRO(SALOME_APPEND_LIST_OF_LIST result element_list)\r
+  SET(_tmp_res)\r
+  STRING(REPLACE ";" "," _tmp_res "${${element_list}}")\r
+\r
+  # Yet another CMake stupidity - LIST(LENGTH ";" var) returns 0\r
+  STRING(LENGTH result _list_len)\r
+  IF(NOT _list_len EQUAL 0)\r
+    SET(${result} "${${result}}${_tmp_res};")  # LIST(APPEND ...) doesn't handle well empty elements!?\r
+  ELSE()\r
+    SET(${result} "${_tmp_res};")              # to avoid redundant ';' at the beginning of the list\r
+  ENDIF()\r
+\r
+ENDMACRO(SALOME_APPEND_LIST_OF_LIST)\r
+\r
+#########################################################################\r
+# SALOME_CONFIGURE_PREPARE()\r
+# \r
+# USAGE: SALOME_CONFIGURE_PREPARE(pkg1 pkg2 ...)\r
+#\r
+# Prepare the variable that will be used to configure the file Salome<MODULE>Config.cmake,\r
+# namely:\r
+#    - _PREREQ_LIST      : the list of level 1 external prerequisites\r
+#    - _PREREQ_DIR_LIST  : their corresponding CMake directories (i.e. where the CMake configuration\r
+#    file for this package can be found, if there is any!)\r
+#    - _PREREQ_COMPO_LIST: the list of components requested when this package was invoked\r
+#\r
+# All this information is built from the package_list, the list of level 1 packages for this module.\r
+# Only the packages found in CONFIG mode are retained.\r
+#\r
+MACRO(SALOME_CONFIGURE_PREPARE)\r
+  SET(_tmp_prereq "${ARGV}")\r
+  SET(_PREREQ_LIST)\r
+  SET(_PREREQ_DIR_LIST)\r
+  SET(_PREREQ_COMPO_LIST)\r
+  FOREACH(_prereq IN LISTS _tmp_prereq)\r
+    IF(${_prereq}_DIR)\r
+      SET(_PREREQ_LIST "${_PREREQ_LIST} ${_prereq}")\r
+      FILE(TO_CMAKE_PATH ${${_prereq}_DIR} CURR_DIR)\r
+      SET(_PREREQ_DIR_LIST "${_PREREQ_DIR_LIST} \"${CURR_DIR}\"")\r
+      SALOME_APPEND_LIST_OF_LIST(_PREREQ_COMPO_LIST Salome${_prereq}_COMPONENTS)\r
+    ENDIF()\r
+  ENDFOREACH()\r
+ENDMACRO(SALOME_CONFIGURE_PREPARE)\r
+\r
+#######################################################################\r
+#\r
+# From a version string like "2.7.12+" extract the major, minor and patch number\r
+# taking ONLY the numerical part.\r
+# This macro was created to treat Ubuntu Python version number where the libs are\r
+# version 2.7.12+ and the interp is 2.7.12 ...\r
+#\r
+MACRO(SALOME_EXTRACT_VERSION version_string major minor patch)\r
+  IF(${version_string} MATCHES "[0-9]+[^0-9]*\\.[0-9]+[^0-9]*\\.[0-9]+[^0-9]*")\r
+    STRING(REGEX REPLACE "^([0-9]+)[^0-9]*\\.[0-9]+[^0-9]*\\.[0-9]+[^0-9]*" "\\1" ${major} "${version_string}")\r
+    STRING(REGEX REPLACE "^[0-9]+[^0-9]*\\.([0-9]+)[^0-9]*\\.[0-9]+[^0-9]*" "\\1" ${minor} "${version_string}")\r
+    STRING(REGEX REPLACE "^[0-9]+[^0-9]*\\.[0-9]+[^0-9]*\\.([0-9]+)[^0-9]*" "\\1" ${patch} "${version_string}")\r
+  ELSE()\r
+    MESSAGE("MACRO(SALOME_EXTRACT_VERSION ${version_string} ${major} ${minor} ${patch}")\r
+    MESSAGE(FATAL_ERROR "Problem parsing version string, I can't parse it properly.")\r
+  ENDIF()\r
+ENDMACRO(SALOME_EXTRACT_VERSION)\r
diff --git a/CMakeCommon/UseQtExt.cmake b/CMakeCommon/UseQtExt.cmake
new file mode 100644 (file)
index 0000000..36d7da1
--- /dev/null
@@ -0,0 +1,101 @@
+# Copyright (C) 2007-2016  CEA/DEN, EDF R&D, OPEN CASCADE\r
+#\r
+# This library is free software; you can redistribute it and/or\r
+# modify it under the terms of the GNU Lesser General Public\r
+# License as published by the Free Software Foundation; either\r
+# version 2.1 of the License, or (at your option) any later version.\r
+#\r
+# This library is distributed in the hope that it will be useful,\r
+# but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
+# Lesser General Public License for more details.\r
+#\r
+# You should have received a copy of the GNU Lesser General Public\r
+# License along with this library; if not, write to the Free Software\r
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA\r
+#\r
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com\r
+#\r
+\r
+IF (QT_VERSION VERSION_LESS "5.0")\r
+  INCLUDE(${QT_USE_FILE})\r
+ENDIF()\r
+\r
+# This MACRO uses the following vars\r
+# - QT_LRELEASE_EXECUTABLE : (given by default by FindQT.cmake)\r
+#\r
+# tsfiles containing all ts files to be compiled.\r
+# installdir contains directory (relative to install_prefix) where to install files after compilation of ts files too qm.\r
+MACRO(QT_INSTALL_TS_RESOURCES tsfiles installdir)\r
+  FOREACH(_input ${tsfiles})\r
+    GET_FILENAME_COMPONENT(_name ${_input} NAME_WE)\r
+    SET(_output ${CMAKE_CURRENT_BINARY_DIR}/${_name}.qm)\r
+    SET(_cmd_${_name} ${QT_LRELEASE_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/${_input} -qm ${_output})\r
+    ADD_CUSTOM_TARGET(QT_INSTALL_TS_RESOURCES_${_name} ALL COMMAND ${_cmd_${_name}} DEPENDS ${_input})\r
+    INSTALL(FILES ${_output} DESTINATION ${installdir})\r
+  ENDFOREACH()\r
+ENDMACRO(QT_INSTALL_TS_RESOURCES)\r
+\r
+MACRO(QT_WRAP_MOC)\r
+IF (QT_VERSION VERSION_LESS "5.0")\r
+  QT4_WRAP_CPP(${ARGN})\r
+ELSE()\r
+  QT5_WRAP_CPP(${ARGN})  \r
+  # Workaround to avoid problem with bug in moc preprocessor:\r
+  # The problem is reproduced on Linux in case if native system Qt is installed\r
+  # and "-I/usr/include" parameter is presented in the moc command line before\r
+  # custom Qt includes. This bug takes place in Qt-5.6.0 and newer. To avoid this\r
+  # bug move "-I/usr/include" parameter in the "moc parameters" file to the end\r
+  # of the "include section".\r
+  IF (NOT WIN32)\r
+    FOREACH(IT ${ARGN})\r
+      GET_FILENAME_COMPONENT(IT ${IT} ABSOLUTE)\r
+      GET_FILENAME_COMPONENT(PFILE ${IT} NAME_WE)\r
+      SET(OUTFILE ${CMAKE_CURRENT_BINARY_DIR}/moc_${PFILE}.cpp_parameters)\r
+      IF(EXISTS ${OUTFILE})      \r
+        SET(NEW_CONTENT)\r
+       SET(IS_INCLUDE_SECTION TRUE)\r
+       SET(HAS_SYSTEM_INC FALSE)\r
+        FILE(READ ${OUTFILE} CONTENT)\r
+       STRING(REGEX REPLACE "\n" ";" CONTENT "${CONTENT}")\r
+       list(REMOVE_DUPLICATES CONTENT)\r
+        FOREACH(S ${CONTENT})\r
+          IF("${S}" MATCHES "^-I")\r
+           IF("${S}" STREQUAL "-I/usr/include")\r
+             SET(HAS_SYSTEM_INC TRUE)\r
+           ELSE()\r
+             SET(NEW_CONTENT ${NEW_CONTENT} "${S}\n")\r
+           ENDIF()\r
+         ELSE()\r
+           SET(IS_INCLUDE_SECTION FALSE)\r
+         ENDIF()\r
+         IF(NOT IS_INCLUDE_SECTION)\r
+           IF(HAS_SYSTEM_INC)\r
+             SET(NEW_CONTENT ${NEW_CONTENT} "-I/usr/include\n")\r
+             SET(HAS_SYSTEM_INC FALSE)\r
+           ENDIF()\r
+           SET(NEW_CONTENT ${NEW_CONTENT} "${S}\n")\r
+         ENDIF()\r
+        ENDFOREACH()\r
+        FILE(WRITE ${OUTFILE} ${NEW_CONTENT})  \r
+      ENDIF()\r
+    ENDFOREACH()\r
+  ENDIF()\r
+ENDIF()\r
+ENDMACRO(QT_WRAP_MOC)\r
+\r
+MACRO(QT_WRAP_UIC)\r
+IF (QT_VERSION VERSION_LESS "5.0")\r
+  QT4_WRAP_UI(${ARGN})\r
+ELSE()\r
+  QT5_WRAP_UI(${ARGN})\r
+ENDIF()\r
+ENDMACRO(QT_WRAP_UIC)\r
+\r
+MACRO(QT_ADD_RESOURCES)\r
+IF (QT_VERSION VERSION_LESS "5.0")\r
+  QT4_ADD_RESOURCES(${ARGN})\r
+ELSE()\r
+  QT5_ADD_RESOURCES(${ARGN})\r
+ENDIF()\r
+ENDMACRO(QT_ADD_RESOURCES)\r
index 8bcca06d0d968b047dc220e77ebdb0876062c3d2..487d771566bfd6559db23f840020a931b5ec0df0 100644 (file)
@@ -1,13 +1,21 @@
 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.10)
 
 PROJECT (SHAPER)
+# Ensure a proper linker behavior:
+CMAKE_POLICY(SET CMP0003 NEW)
+IF(WIN32)
+  CMAKE_POLICY(SET CMP0020 OLD) # disable automatic linking to qtmain.lib 
+ENDIF(WIN32)
+
 SET (SHAPER_Version 2.6.0)
 
 SET(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/CMakeCommon" ${CMAKE_MODULE_PATH})
 
+INCLUDE(SalomeMacros)
+
 INCLUDE(FindEclipse)
 INCLUDE(Common)
-INCLUDE(FindQt)
+INCLUDE(FindSalomeQt5)
 INCLUDE(FindPython)
 INCLUDE(FindSalome)
 INCLUDE(FindCAS)
index 48c360bc09da5800498a7fea8c713ae68e72d95f..76a4b4c805d0db0eea5d321927efa22a175badb4 100644 (file)
@@ -14,6 +14,6 @@ call %SRC_DIR%\env_Salome.bat d
 mkdir %ROOT_DIR%\build
 cd %ROOT_DIR%\build
 
-cmake %SRC_DIR% -G "Visual Studio 10 Win64" -DPYTHON_EXECUTABLE=%PYTHONHOME%\python_d.exe -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX:PATH=%ROOT_DIR%\install
+cmake %SRC_DIR% -G "Visual Studio 10 Win64" -DPYTHON_EXECUTABLE=%PYTHONHOME%\python.exe -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX:PATH=%ROOT_DIR%\install
 
 start "" %MSVC_EXE% SHAPER.sln
index b2c3e8a04f8d0971b21e845625a6d73c1aac1e97..9d68f2064c0ace774b0f1fb8d9cb640850264fd2 100644 (file)
@@ -21,7 +21,7 @@ cd %ROOT_DIR%\build-eclipse
 @SET CMAKE_ARGS=%CMAKE_ARGS% -DCMAKE_BUILD_TYPE=Debug
 @SET CMAKE_ARGS=%CMAKE_ARGS% -DCMAKE_ECLIPSE_GENERATE_SOURCE_PROJECT=OFF
 @SET CMAKE_ARGS=%CMAKE_ARGS% -DCMAKE_INSTALL_PREFIX:PATH=%ROOT_DIR%\install
-@SET CMAKE_ARGS=%CMAKE_ARGS% -DPYTHON_EXECUTABLE=%PYTHONHOME%\python_d.exe
+@SET CMAKE_ARGS=%CMAKE_ARGS% -DPYTHON_EXECUTABLE=%PYTHONHOME%\python.exe
 @SET CMAKE_ARGS=%CMAKE_ARGS% %SRC_DIR%
 
 cmake %CMAKE_ARGS%
index 31bd93d10052182dedcc20077f9e4c7bbfcd692a..16e2b216639f0623e89d6693c5c29ecbe6407c17 100644 (file)
@@ -2,7 +2,6 @@
 
 INCLUDE(Common)
 INCLUDE(UnitTest)
-SET(CMAKE_AUTOMOC ON)
 
 SET(PROJECT_HEADERS
     CollectionPlugin.h
@@ -52,7 +51,7 @@ SET(PROJECT_LIBRARIES
     GeomAlgoAPI
     GeomValidators
     ModuleBase
-       XGUI
+    XGUI
 )
 
 ADD_DEFINITIONS(-DCOLLECTIONPLUGIN_EXPORTS ${CAS_DEFINITIONS})
index 783cbf3851673ab5f2185f2874acfb7f94397052..a4d85ea57f7cc5d5808c060faa60b073bdc7ee31 100644 (file)
@@ -109,6 +109,7 @@ SET(PROJECT_LIBRARIES
     ${CAS_TKTopAlgo}
     ${CAS_TKXSBase}
     ${CAS_TKOffset}
+    ${CAS_TKShHealing}
 )
 
 ADD_DEFINITIONS(-DGEOMALGOAPI_EXPORTS ${CAS_DEFINITIONS})
index 5bc4fe03f4acefa8e70af55bfcafe3b06df42d5c..12e6c3c3bd190d62d18983b61ce0d6ace75bf355 100644 (file)
@@ -30,7 +30,7 @@
 #include <BRepTools.hxx>
 #include <BRepTopAdaptor_FClass2d.hxx>
 #include <Geom2d_Curve.hxx>
-#include <Handle_Geom2d_Curve.hxx>
+#include <Geom2d_Curve.hxx>
 #include <BRepLib_CheckCurveOnSurface.hxx>
 #include <BRep_Tool.hxx>
 #include <Geom_Plane.hxx>
index 1979d7d7152a0bca99baa02936f0aa95f83e2ed9..ac1bbdae55459363048c9fe13c8d668096b93b55 100644 (file)
@@ -12,9 +12,6 @@
 
 #include <Events_InfoMessage.h>
 
-#include <QString>
-#include <QMap>
-
 typedef std::map<std::string, GeomAbs_SurfaceType> FaceTypes;
 static FaceTypes MyFaceTypes;
 
index 875e1537fb6ab1c98ae51fb527b518952bf9dd5e..50fa75c0478896d638676807d39ea928d8dad73b 100644 (file)
@@ -9,7 +9,6 @@
 
 #include <ModelAPI_Events.h>
 
-IMPLEMENT_STANDARD_HANDLE(Model_Application, TDocStd_Application)
 IMPLEMENT_STANDARD_RTTIEXT(Model_Application, TDocStd_Application)
 
 static Handle_Model_Application TheApplication = new Model_Application;
index 3593decbadfb2bd9826181201c7902b18fc9d908..492326dc32657f5e61fabb33cde4bac0e7d6cdb3 100644 (file)
@@ -30,7 +30,7 @@ public:
   // CASCADE RTTI
   /// Definition of "Handles" usage
   /// \param Model_Application is the class name that is covered by the OCCT Handle
-  DEFINE_STANDARD_RTTI(Model_Application);
+  DEFINE_STANDARD_RTTIEXT(Model_Application, TDocStd_Application)
 
   //! Retuns the application: one per process
   MODEL_EXPORT static Handle_Model_Application getApplication();
index d8ea9da5c0c6c12616dace412a2947b6b1d53a89..80808ae884cb38cf0c8122af5d71b692910cdb3c 100644 (file)
@@ -13,6 +13,7 @@
 #include <TDF_AttributeIterator.hxx>
 #include <TDF_ChildIterator.hxx>
 #include <TDF_RelocationTable.hxx>
+#include <TDF_DeltaOnAddition.hxx>
 #include <TopAbs_ShapeEnum.hxx>
 #include <TopoDS.hxx>
 #include <TopoDS_Shape.hxx>
@@ -20,6 +21,7 @@
 #include <BRep_Tool.hxx>
 #include <TNaming_Builder.hxx>
 #include <TNaming_Iterator.hxx>
+#include <TNaming_NamedShape.hxx>
 #include <NCollection_List.hxx>
 
 void Model_AttributeSelectionList::append(
index 411f8bac7fd42540cc7b792f9c47d303b1cb9049..e3af397f36feadbbaac93639749c7ed852b43acb 100755 (executable)
@@ -37,6 +37,7 @@
 #include <TDF_ListIteratorOfAttributeDeltaList.hxx>
 #include <TDF_ListIteratorOfLabelList.hxx>
 #include <TDF_LabelMap.hxx>
+#include <TDF_DeltaOnAddition.hxx>
 #include <TNaming_SameShapeIterator.hxx>
 #include <TNaming_Iterator.hxx>
 #include <TNaming_NamedShape.hxx>
index e71e3501b06b423634c4ba07451d648d01f5066c..f45095636da25d13bab2eb849c585c07b99bcb25 100644 (file)
@@ -1,7 +1,15 @@
 ## Copyright (C) 2014-20xx CEA/DEN, EDF R&D
 
 INCLUDE(Common)
-SET(CMAKE_AUTOMOC ON)
+INCLUDE(UseQtExt)
+
+# --- options ---
+
+# additional include directories
+INCLUDE_DIRECTORIES(${QT_INCLUDES})
+
+# additional preprocessor / compiler flags
+ADD_DEFINITIONS(${QT_DEFINITIONS})
 
 SET(PROJECT_HEADERS
   ModuleBase.h
@@ -134,6 +142,7 @@ SET(PROJECT_SOURCES
 )
 
 SET(PROJECT_LIBRARIES
+       ${QT_LIBRARIES}
        Config
        Events
        ModelAPI
@@ -150,11 +159,9 @@ SET(PROJECT_LIBRARIES
        ${ViewerData}
 )
 
-SET(PROJECT_AUTOMOC
-    ${CMAKE_CURRENT_BINARY_DIR}/ModuleBase_automoc.cpp
-)
+# sources / moc wrappings
+QT_WRAP_MOC(PROJECT_AUTOMOC ${PROJECT_HEADERS})
 
-#QT5_ADD_RESOURCES(PROJECT_COMPILED_RESOURCES ${PROJECT_RESOURCES})
 #QT5_ADD_TRANSLATION(QM_RESOURCES ${TEXT_RESOURCES})
 
 SOURCE_GROUP ("Generated Files" FILES ${PROJECT_AUTOMOC} ${PROJECT_COMPILED_RESOURCES} ${QM_RESOURCES})
@@ -173,7 +180,7 @@ INCLUDE_DIRECTORIES(
 )
 
 ADD_DEFINITIONS(-DMODULEBASE_EXPORTS ${CAS_DEFINITIONS})
-ADD_LIBRARY(ModuleBase SHARED ${PROJECT_SOURCES} ${PROJECT_HEADERS})
+ADD_LIBRARY(ModuleBase SHARED ${PROJECT_SOURCES} ${PROJECT_HEADERS} ${PROJECT_AUTOMOC})
 TARGET_LINK_LIBRARIES(ModuleBase GeomAPI ${PROJECT_LIBRARIES})
 
 INSTALL(TARGETS ModuleBase DESTINATION ${SHAPER_INSTALL_BIN})
index 829a70579781f50ef707254da7e524f3924f68bf..be964c72bbdabebe0aa1c6ae7edde13b007dde0f 100644 (file)
@@ -17,7 +17,6 @@
 #include <ModuleBase_ViewerPrs.h>
 #include <ModuleBase_Tools.h>
 
-IMPLEMENT_STANDARD_HANDLE(ModuleBase_FilterValidated, SelectMgr_Filter);
 IMPLEMENT_STANDARD_RTTIEXT(ModuleBase_FilterValidated, SelectMgr_Filter);
 
 Standard_Boolean ModuleBase_FilterValidated::
index 2d7f92f8334d35c75c51e68bd6aaf58bcc7ff364..6dbb05a9abb7ffc61fc5d1be512ea02c4673fe9c 100644 (file)
@@ -42,8 +42,7 @@ public:
   Standard_EXPORT virtual
     Standard_Boolean IsOk(const Handle(SelectMgr_EntityOwner)& theOwner) const;
 
-  DEFINE_STANDARD_RTTI(ModuleBase_FilterValidated)
-
+  DEFINE_STANDARD_RTTIEXT(ModuleBase_FilterValidated, SelectMgr_Filter)
 protected:
   /// Instance of workshop interface
   ModuleBase_IWorkshop* myWorkshop;
index b74ea6c074942d7998c0f57d6b212942f6783540..3b395d297297b3a5fb6e39cdb00f705ce940b483 100755 (executable)
@@ -31,7 +31,7 @@ class ModuleBase_Operation;
 class ModuleBase_IWorkshop;
 class ModelAPI_Result;
 
-class Handle_AIS_InteractiveObject;
+class AIS_InteractiveObject;
 
 /**
  * \ingroup GUI
@@ -251,7 +251,7 @@ class MODULEBASE_EXPORT ModuleBase_IModule : public QObject
   /// Create specific for the module presentation
   /// \param theResult an object for presentation
   /// \return created presentation or NULL(default value)
-  virtual Handle_AIS_InteractiveObject createPresentation(
+  virtual Handle(AIS_InteractiveObject) createPresentation(
                            const std::shared_ptr<ModelAPI_Result>& theResult);
 
   //! Returns data object by AIS
index 62e017eea23fe6376e83122eb9f3b0f8bd5f7f04..45022231bd8ce7103712a3101742d964013e7187 100644 (file)
@@ -22,7 +22,7 @@
 #include <QList>
 
 class ModuleBase_ViewerPrs;
-class Handle_SelectMgr_EntityOwner;
+class SelectMgr_EntityOwner;
 
 /**
 * \ingroup GUI
@@ -55,7 +55,7 @@ class ModuleBase_ISelection
   /// \param thePrs a container for selection
   /// \param theOwner a selection owner
   virtual void fillPresentation(std::shared_ptr<ModuleBase_ViewerPrs>& thePrs,
-                                const Handle_SelectMgr_EntityOwner& theOwner) const = 0;
+                                const Handle(SelectMgr_EntityOwner)& theOwner) const = 0;
 
   /**
    * Returns list of features currently selected in object browser
@@ -78,7 +78,7 @@ class ModuleBase_ISelection
   virtual void selectedAISObjects(AIS_ListOfInteractive& theList) const = 0;
 
   //! Returns list of currently selected QModelIndexes
-  virtual ObjectPtr getSelectableObject(const Handle_SelectMgr_EntityOwner& theOwner) const = 0;
+  virtual ObjectPtr getSelectableObject(const Handle(SelectMgr_EntityOwner)& theOwner) const = 0;
 
   //! Return the shape from the viewer presentation.
   //! If the shape is equal to the shape of selected object, it returns an empty shape
index 19ceb3e9b7374306d4f57c0cb6f898772d671836..1dba0503d3c7793ef6fb85e37ccc3faf60727db1 100755 (executable)
@@ -25,7 +25,7 @@
 #include <SelectMgr_SequenceOfOwner.hxx>
 #include <SelectMgr_EntityOwner.hxx>
 #include <SelectMgr_SelectionManager.hxx>
-#include <StdPrs_WFDeflectionShape.hxx>
+#include <StdPrs_WFShape.hxx>
 #include <StdSelect_BRepSelectionTool.hxx>
 #include <AIS_InteractiveContext.hxx>
 #include <AIS_Selection.hxx>
 #include <Graphic3d_AspectMarker3d.hxx>
 #include <TopExp_Explorer.hxx>
 
-IMPLEMENT_STANDARD_HANDLE(ModuleBase_BRepOwner, StdSelect_BRepOwner);
 IMPLEMENT_STANDARD_RTTIEXT(ModuleBase_BRepOwner, StdSelect_BRepOwner);
 
 //*******************************************************************************************
 
-IMPLEMENT_STANDARD_HANDLE(ModuleBase_ResultPrs, ViewerData_AISShape);
 IMPLEMENT_STANDARD_RTTIEXT(ModuleBase_ResultPrs, ViewerData_AISShape);
 
 
@@ -182,19 +180,23 @@ void ModuleBase_ResultPrs::HilightSelected(const Handle(PrsMgr_PresentationManag
   for (int i = 1; i <= theOwners.Length(); i++) {
     anOwner = theOwners.Value(i);
     aCompOwner = Handle(ModuleBase_BRepOwner)::DownCast(anOwner);
-    if (aCompOwner.IsNull())
-      anOwner->Hilight(thePM);
+    if (aCompOwner.IsNull()) {
+      // PORTING_TO_SALOME_8
+      //anOwner->Hilight(thePM);
+    }
     else {
       TopoDS_Shape aShape = aCompOwner->Shape();
       Handle( Prs3d_Presentation ) aSelectionPrs = GetSelectPresentation( thePM );
       aSelectionPrs->Clear();
 
-      StdPrs_WFDeflectionShape::Add(aSelectionPrs, aShape, myDrawer);
+      StdPrs_WFShape::Add(aSelectionPrs, aShape, myDrawer);
 
       aSelectionPrs->SetDisplayPriority(9);
-      aSelectionPrs->Highlight(Aspect_TOHM_COLOR, aSelectionPrs->HighlightColor());
+      // PORTING_TO_SALOME_8
+      //aSelectionPrs->Highlight(Aspect_TOHM_COLOR, aSelectionPrs->HighlightColor());
       aSelectionPrs->Display();
-      thePM->Highlight(this);
+      // PORTING_TO_SALOME_8
+      //thePM->Highlight(this);
     }
   }
 }
@@ -203,6 +205,8 @@ void ModuleBase_ResultPrs::HilightOwnerWithColor(const Handle(PrsMgr_Presentatio
                                                  const Quantity_NameOfColor theColor,
                                                  const Handle(SelectMgr_EntityOwner)& theOwner)
 {
+  // PORTING_TO_SALOME_8
+  /*
   Handle(StdSelect_BRepOwner) aOwner = Handle(StdSelect_BRepOwner)::DownCast(theOwner);
   if (aOwner.IsNull())
     return;
@@ -214,10 +218,10 @@ void ModuleBase_ResultPrs::HilightOwnerWithColor(const Handle(PrsMgr_Presentatio
     Handle( Prs3d_Presentation ) aHilightPrs = GetHilightPresentation( thePM );
     aHilightPrs->Clear();
 
-    StdPrs_WFDeflectionShape::Add(aHilightPrs, aShape, myDrawer);
+    StdPrs_WFShape::Add(aHilightPrs, aShape, myDrawer);
     aHilightPrs->Highlight(Aspect_TOHM_COLOR, theColor);
 
     if (thePM->IsImmediateModeOn())
       thePM->AddToImmediateList(aHilightPrs);
-  }
+  }*/
 }
index dc7aff38dee85d571fd75bde9b6441de6cd02445..040056639fc26df6eab0ae4f5bd5b67c25f81e7a 100644 (file)
@@ -42,9 +42,12 @@ public:
   /// \param aMode a drawing mode
   virtual void HilightWithColor (const Handle(PrsMgr_PresentationManager3d)& aPM,
     const Quantity_NameOfColor aCol, const Standard_Integer aMode = 0)
-  {  Selectable()->HilightOwnerWithColor(aPM, aCol, this); }
+  {
+    //PORTING_TO_SALOME_8
+    //Selectable()->HilightOwnerWithColor(aPM, aCol, this);
+  }
 
-  DEFINE_STANDARD_RTTI(ModuleBase_BRepOwner)
+  DEFINE_STANDARD_RTTIEXT(ModuleBase_BRepOwner, StdSelect_BRepOwner)
 };
 
 
@@ -93,7 +96,7 @@ public:
   /// \param thePriority a new priority value
   Standard_EXPORT void setAdditionalSelectionPriority(const int thePriority);
 
-  DEFINE_STANDARD_RTTI(ModuleBase_ResultPrs)
+  DEFINE_STANDARD_RTTIEXT(ModuleBase_ResultPrs, ViewerData_AISShape)
 protected:
   /// Redefinition of virtual function
   Standard_EXPORT virtual void Compute(
index 5b4610878a9583fafece39a7864369c4ccd770fc..0e1c428ff4b451b192029c35c5e44d76952b7896 100755 (executable)
@@ -26,8 +26,6 @@
 
 #include <map>
 
-class Handle_AIS_InteractiveContext;
-
 class QWidget;
 class QLayout;
 class QDoubleSpinBox;
index b96672f8909c0f1a510fc085677f7571aa32e2ee..eddfc51cb4c6b1885ab0e51b2d0e4d380e461ef9 100644 (file)
@@ -32,7 +32,6 @@
 #include <Geom_Curve.hxx>
 #include <gp_Pln.hxx>
 
-IMPLEMENT_STANDARD_HANDLE(ModuleBase_ShapeDocumentFilter, SelectMgr_Filter);
 IMPLEMENT_STANDARD_RTTIEXT(ModuleBase_ShapeDocumentFilter, SelectMgr_Filter);
 
 
@@ -73,7 +72,6 @@ Standard_Boolean ModuleBase_ShapeDocumentFilter::IsOk(
   return aValid;
 }
 
-IMPLEMENT_STANDARD_HANDLE(ModuleBase_ShapeInPlaneFilter, SelectMgr_Filter);
 IMPLEMENT_STANDARD_RTTIEXT(ModuleBase_ShapeInPlaneFilter, SelectMgr_Filter);
 
 Standard_Boolean ModuleBase_ShapeInPlaneFilter::IsOk(
index ce421b15cc71b316585633a6144f7e34bc189390..58cc0e137831c32055ac02c5b7a4ad522ecff72d 100644 (file)
@@ -41,7 +41,7 @@ public:
   Standard_EXPORT virtual
     Standard_Boolean IsOk(const Handle(SelectMgr_EntityOwner)& theOwner) const;
 
-  DEFINE_STANDARD_RTTI(ModuleBase_ShapeDocumentFilter)
+  DEFINE_STANDARD_RTTIEXT(ModuleBase_ShapeDocumentFilter, SelectMgr_Filter)
 
 protected:
   /// Reference to workshop
@@ -73,7 +73,7 @@ public:
   Standard_EXPORT virtual
     Standard_Boolean IsOk(const Handle(SelectMgr_EntityOwner)& theOwner) const;
 
-  DEFINE_STANDARD_RTTI(ModuleBase_ShapeInPlaneFilter)
+  DEFINE_STANDARD_RTTIEXT(ModuleBase_ShapeInPlaneFilter, SelectMgr_Filter)
 private:
   /// Working plane
   std::shared_ptr<GeomAPI_Pln> myPlane;
index 0aa2182e128c436cd77f64ab07e28b1448356616..0cf6d0f81de9e824e7b1b5f77e5da7585d17b5ea 100644 (file)
@@ -31,7 +31,7 @@ bool ModuleBase_ViewerPrs::isEqual(ModuleBase_ViewerPrs* thePrs) const
                        (myShape.get() && myShape->isEqual(thePrs->shape()));
   bool isEqualIO = (myInteractive == thePrs->interactive()) == Standard_True;
 
-  bool isEqualOwner = (myOwner.Access() == thePrs->owner().Access());
+  bool isEqualOwner = myOwner.get() == thePrs->owner().get();
   if (isEqualResult && isEqualShape && isEqualIO &&
       !isEqualOwner) { /// owners are different
     // as we might loading object with the same shape in different modes like
@@ -73,7 +73,7 @@ bool ModuleBase_ViewerPrs::operator==(const ModuleBase_ViewerPrs& thePrs)
                        (myShape.get() && myShape->isEqual(thePrs.shape()));
   bool isEqualIO = (myInteractive == thePrs.interactive()) == Standard_True;
 
-  bool isEqualOwner = (myOwner.Access() == thePrs.owner().Access());
+  bool isEqualOwner = myOwner.get() == thePrs.owner().get();
   if (isEqualResult && isEqualShape && isEqualIO &&
       !isEqualOwner) { /// owners are different
     // as we might loading object with the same shape in different modes like
index 4dcca83c2d95a33b0ba99d790b6b7d214c98a716..fe69f619f82eae4e3d7324354c98bd517e8fed3b 100644 (file)
@@ -29,7 +29,7 @@ class ModuleBase_ViewerPrs
   /// \param theOwner a selection owner
   MODULEBASE_EXPORT ModuleBase_ViewerPrs(ObjectPtr theResult = ObjectPtr(),
                                          const GeomShapePtr& theShape = GeomShapePtr(),
-                                         Handle_SelectMgr_EntityOwner theOwner = NULL);
+                                         Handle(SelectMgr_EntityOwner) theOwner = NULL);
 
   /// Destructor
   MODULEBASE_EXPORT virtual ~ModuleBase_ViewerPrs();
index 1fb6bf1aa8e735af11c357b3f5df4ff3abe6bac1..c5c9989090d808bfca750e9cb2ea098bfe3e75b7 100644 (file)
@@ -31,6 +31,8 @@
 #include <QScrollBar>
 #include <QFontMetrics>
 #include <QPainter>
+#include <QStyle>
+#include <QAbstractItemView>
 
 #include <memory>
 #include <string>
index d31bfe768136dfadb894b9aa63c92799e6bda76a..71f9c8a2e1b5233092e1dd7a2e056198c93bd15b 100644 (file)
@@ -29,7 +29,6 @@ class ModuleBase_ISelection;
 class ModuleBase_WidgetSelectorStore;
 class ModelAPI_Validator;
 class Config_WidgetAPI;
-class Handle_SelectMgr_EntityOwner;
 
 //#define LIST_OF_VALID_PRS
 
index e5c32be9e745d355b3c7a9625326984d91e057e0..d48ade3a59ad92d8643f15079e682304fab1f555 100644 (file)
@@ -1,6 +1,12 @@
 INCLUDE(Common)
 INCLUDE(UnitTest)
-SET(CMAKE_AUTOMOC ON)
+INCLUDE(UseQtExt)
+
+# additional include directories
+INCLUDE_DIRECTORIES(${QT_INCLUDES})
+
+# additional preprocessor / compiler flags
+ADD_DEFINITIONS(${QT_DEFINITIONS})
 
 SET(PROJECT_HEADERS
     ParametersPlugin.h
@@ -57,15 +63,24 @@ SET(TEXT_RESOURCES
 #                                         OPTIONS -extensions cpp -no-recursive
 #                                         )
 
-SET(PROJECT_AUTOMOC
-    ${CMAKE_CURRENT_BINARY_DIR}/ParametersPlugin_automoc.cpp
-)
+#SET(PROJECT_AUTOMOC
+#    ${CMAKE_CURRENT_BINARY_DIR}/ParametersPlugin_automoc.cpp
+#)
+# sources / moc wrappings
+QT_WRAP_MOC(PROJECT_AUTOMOC ${PROJECT_HEADERS})
 
 
 SOURCE_GROUP ("Generated Files" FILES ${PROJECT_AUTOMOC} ${QM_RESOURCES})
 SOURCE_GROUP ("Resource Files" FILES ${TEXT_RESOURCES})
 
-ADD_LIBRARY(ParametersPlugin MODULE ${PROJECT_SOURCES} ${PROJECT_HEADERS} ${XML_RESOURCES} ${TEXT_RESOURCES} ${QM_RESOURCES})
+ADD_LIBRARY(ParametersPlugin MODULE
+            ${PROJECT_SOURCES}
+            ${PROJECT_HEADERS}
+            ${XML_RESOURCES}
+            ${TEXT_RESOURCES}
+            ${QM_RESOURCES}
+            ${PROJECT_AUTOMOC}
+)
 
 
 TARGET_LINK_LIBRARIES(ParametersPlugin ${PROJECT_LIBRARIES})
index f237ce295b7ab9a749444b6f97881e6c25713cde..4d8c40d3eaf3fabe16ea437a9f8817716d2ee33e 100644 (file)
@@ -1,8 +1,13 @@
 ## Copyright (C) 2014-20xx CEA/DEN, EDF R&D
 
 INCLUDE(Common)
+INCLUDE(UseQtExt)
 
-SET(CMAKE_AUTOMOC ON)
+# additional include directories
+INCLUDE_DIRECTORIES(${QT_INCLUDES})
+
+# additional preprocessor / compiler flags
+ADD_DEFINITIONS(${QT_DEFINITIONS})
 
 SET(PROJECT_HEADERS
        PartSet.h
@@ -84,11 +89,14 @@ SET(PROJECT_LIBRARIES
     ${CAS_SHAPE}
 )
 
-SET(PROJECT_AUTOMOC
-    ${CMAKE_CURRENT_BINARY_DIR}/PartSet_automoc.cpp
-)
+#SET(PROJECT_AUTOMOC
+#    ${CMAKE_CURRENT_BINARY_DIR}/PartSet_automoc.cpp
+#)
+# sources / moc wrappings
+QT_WRAP_MOC(PROJECT_AUTOMOC ${PROJECT_HEADERS})
 
-QT4_ADD_RESOURCES(PROJECT_COMPILED_RESOURCES ${PROJECT_RESOURCES})
+# sources / rcc wrappings
+QT_ADD_RESOURCES(PROJECT_COMPILED_RESOURCES ${PROJECT_RESOURCES})
 #QT4_ADD_TRANSLATION(QM_RESOURCES ${TEXT_RESOURCES})
 #QT4_CREATE_TRANSLATION(QM_RESOURCES
 #                                         ${PROJECT_SOURCES}
@@ -128,6 +136,7 @@ ADD_LIBRARY(PartSet SHARED
        ${PROJECT_SOURCES}
        ${PROJECT_HEADERS}
        ${PROJECT_COMPILED_RESOURCES}
+       ${PROJECT_AUTOMOC}
 #      ${TEXT_RESOURCES}
 #      ${QM_RESOURCES}
 )
index 22ad88b992db11eab0df313d9828a095a3174d5b..da4a394aa669f2b5f8022b99e8a9bf261acfaa77 100755 (executable)
@@ -17,7 +17,6 @@
 #include <TopoDS_Shape.hxx>
 #include <StdSelect_BRepOwner.hxx>
 
-IMPLEMENT_STANDARD_HANDLE(PartSet_FilterInfinite, SelectMgr_Filter);
 IMPLEMENT_STANDARD_RTTIEXT(PartSet_FilterInfinite, SelectMgr_Filter);
 
 PartSet_FilterInfinite::PartSet_FilterInfinite(ModuleBase_IWorkshop* theWorkshop)
index c58ca058c2b945e0061fe823c18d520b5506c968..cc244b688ac10d07dc26d2aaa26b2d5a2be8187d 100755 (executable)
@@ -31,7 +31,7 @@ public:
   Standard_EXPORT virtual Standard_Boolean
     IsOk(const Handle(SelectMgr_EntityOwner)& theOwner) const;
 
-  DEFINE_STANDARD_RTTI(PartSet_FilterInfinite)
+  DEFINE_STANDARD_RTTIEXT(PartSet_FilterInfinite, SelectMgr_Filter)
 
 protected:
   /// Reference to workshop
index 8d66327f8cf6549617ba16f5968839c958efc4a8..9f4aa612b924a386bffc5e81329da736d3d2fe91 100644 (file)
@@ -19,7 +19,6 @@
 #include <StdSelect_BRepOwner.hxx>
 
 
-IMPLEMENT_STANDARD_HANDLE(PartSet_GlobalFilter, ModuleBase_ShapeDocumentFilter);
 IMPLEMENT_STANDARD_RTTIEXT(PartSet_GlobalFilter, ModuleBase_ShapeDocumentFilter);
 
 Standard_Boolean PartSet_GlobalFilter::IsOk(const Handle(SelectMgr_EntityOwner)& theOwner) const
@@ -66,7 +65,6 @@ Standard_Boolean PartSet_GlobalFilter::IsOk(const Handle(SelectMgr_EntityOwner)&
   return aValid;
 }
 
-IMPLEMENT_STANDARD_HANDLE(PartSet_CirclePointFilter, SelectMgr_Filter);
 IMPLEMENT_STANDARD_RTTIEXT(PartSet_CirclePointFilter, SelectMgr_Filter);
 
 Standard_Boolean
index c1bd7dee454ba16b25dd2257233b99a9d873eecf..00481706173a3ed2eb07b27895dba8896d153bd9 100644 (file)
@@ -29,7 +29,7 @@ public:
   Standard_EXPORT virtual Standard_Boolean
     IsOk(const Handle(SelectMgr_EntityOwner)& theOwner) const;
 
-  DEFINE_STANDARD_RTTI(PartSet_GlobalFilter)
+  DEFINE_STANDARD_RTTIEXT(PartSet_GlobalFilter, ModuleBase_ShapeDocumentFilter)
 };
 
 
@@ -53,7 +53,7 @@ public:
   Standard_EXPORT virtual Standard_Boolean
     IsOk(const Handle(SelectMgr_EntityOwner)& theOwner) const;
 
-  DEFINE_STANDARD_RTTI(PartSet_CirclePointFilter)
+  DEFINE_STANDARD_RTTIEXT(PartSet_CirclePointFilter, SelectMgr_Filter)
 
 private:
 
index 667766244b64b5fcb22cff1c07eaeddbba26362f..4baa040de7218cc423e697c323d7fccc03aa6533 100755 (executable)
 #include <Config_PropManager.h>
 #include <Config_Keywords.h>
 
+#include <AIS_Dimension.hxx>
+#include <AIS_InteractiveObject.hxx>
 #include <StdSelect_TypeOfFace.hxx>
 #include <TopoDS_Vertex.hxx>
 #include <TopoDS.hxx>
 #include <TopoDS_Shape.hxx>
 #include <BRep_Tool.hxx>
-#include <AIS_Dimension.hxx>
 
 #include <QObject>
 #include <QMouseEvent>
index 2724a329767607262bcd8a98729562067551ee3f..31efa6041197b8ece3291807446e71b0db9c12fd 100755 (executable)
@@ -36,7 +36,7 @@
 
 #include <GeomAPI_IPresentable.h>
 
-#include <StdPrs_WFDeflectionShape.hxx>
+#include <StdPrs_WFShape.hxx>
 
 #include <QList>
 
@@ -56,7 +56,6 @@
 #include <SketchPlugin_SketchEntity.h>
 #endif
 
-IMPLEMENT_STANDARD_HANDLE(PartSet_OperationPrs, ViewerData_AISShape);
 IMPLEMENT_STANDARD_RTTIEXT(PartSet_OperationPrs, ViewerData_AISShape);
 
 PartSet_OperationPrs::PartSet_OperationPrs(ModuleBase_IWorkshop* theWorkshop)
@@ -128,7 +127,7 @@ void PartSet_OperationPrs::Compute(
         setWidth(aDrawer, aWidth);
       }
     }
-    StdPrs_WFDeflectionShape::Add(thePresentation, aShape, aDrawer);
+    StdPrs_WFShape::Add(thePresentation, aShape, aDrawer);
   }
   Set(aComp);
   if (!aReadyToDisplay) {
index 4577d7b7756dc38693e5638ec7ef8cab63894c58..95ce374efa159fddc39855bcaf403cb3a47d188c 100755 (executable)
@@ -23,6 +23,9 @@
 
 #include <Quantity_Color.hxx>
 #include <NCollection_List.hxx>
+#include <NCollection_DataMap.hxx>
+#include <TopoDS_Shape.hxx>
+#include <AIS_InteractiveObject.hxx>
 
 #include <QMap>
 #include <QList>
@@ -32,7 +35,7 @@
 DEFINE_STANDARD_HANDLE(PartSet_OperationPrs, ViewerData_AISShape)
 
 class XGUI_Displayer;
-class Handle_AIS_InteractiveObject;
+class SelectMgr_Selection;
 
 /**
 * \ingroup GUI
@@ -58,7 +61,7 @@ public:
   /// Switch on using of the AIS presentation with of the shape object increased on the delta
   void useAISWidth();
 
-  DEFINE_STANDARD_RTTI(PartSet_OperationPrs)
+  DEFINE_STANDARD_RTTIEXT(PartSet_OperationPrs, ViewerData_AISShape)
 
 protected:
   /// Redefinition of virtual function
@@ -73,7 +76,7 @@ protected:
 protected:
   /// list of visualized shapes
   /// \return a map of shapes
-  NCollection_DataMap<TopoDS_Shape, Handle_AIS_InteractiveObject>& shapesMap();
+  NCollection_DataMap<TopoDS_Shape, Handle(AIS_InteractiveObject)>& shapesMap();
 
 private:
   /// Fills the map by the feature object and shapes, which should be visuaziled
index 9cd8bace74fc822549207a7a7db812af9f3e1e23..6a96a15d47152ca9ae7938ef3b4b90d4b87f879d 100755 (executable)
@@ -28,7 +28,7 @@
 #include <Prs3d_PointAspect.hxx>
 #include <TopoDS_Builder.hxx>
 #include <SelectMgr_SelectionManager.hxx>
-#include <StdPrs_WFDeflectionShape.hxx>
+#include <StdPrs_WFShape.hxx>
 #include <StdSelect_BRepSelectionTool.hxx>
 #include <Graphic3d_AspectLine3d.hxx>
 #include <Prs3d_LineAspect.hxx>
@@ -43,7 +43,6 @@
 
 //*******************************************************************************************
 
-IMPLEMENT_STANDARD_HANDLE(PartSet_ResultSketchPrs, ViewerData_AISShape);
 IMPLEMENT_STANDARD_RTTIEXT(PartSet_ResultSketchPrs, ViewerData_AISShape);
 
 PartSet_ResultSketchPrs::PartSet_ResultSketchPrs(ResultPtr theResult)
@@ -99,7 +98,7 @@ void PartSet_ResultSketchPrs::Compute(
     setAuxiliaryPresentationStyle(true);
 
     Handle(Prs3d_Drawer) aDrawer = Attributes();
-    StdPrs_WFDeflectionShape::Add(thePresentation, myAuxiliaryCompound, aDrawer);
+    StdPrs_WFShape::Add(thePresentation, myAuxiliaryCompound, aDrawer);
   }
 
   if (!aReadyToDisplay) {
index 2eaa6bff0c3d7ceb421f4f47a607b3e94ccaf365..b374c0a7b04bf624a807c4d1b2964687a0259953 100755 (executable)
@@ -29,7 +29,7 @@ public:
   /// \param theResult a result object
   Standard_EXPORT PartSet_ResultSketchPrs(ResultPtr theResult);
 
-  DEFINE_STANDARD_RTTI(PartSet_ResultSketchPrs)
+  DEFINE_STANDARD_RTTIEXT(PartSet_ResultSketchPrs, ViewerData_AISShape)
 protected:
   /// Redefinition of virtual function
   Standard_EXPORT virtual void Compute(
index 2029cc4a4e7bd53a295d7e4edf831471fca576fa..9ea23ef94329f71fc6cc57931f2080557953f16b 100644 (file)
@@ -35,7 +35,7 @@ class ModuleBase_Operation;
 class XGUI_OperationMgr;
 class XGUI_Workshop;
 
-class Handle_AIS_InteractiveObject;
+class AIS_InteractiveObject;
 
 class QMouseEvent;
 
@@ -248,7 +248,7 @@ public:
   /// Create specific for the module presentation
   /// \param theResult an object for presentation
   /// \return created presentation or NULL(default value)
-  virtual Handle_AIS_InteractiveObject createPresentation(const ResultPtr& theResult);
+  virtual Handle(AIS_InteractiveObject) createPresentation(const ResultPtr& theResult);
 
   /// Connects or disconnects to the value changed signal of the property panel widgets
   /// \param theWidget a property contol widget
index 53c1dc13fb77177cb87957788ac0ccc43d9e9bf1..b5b5163ff4809fe9dae83572dbe889e0eb601e12 100755 (executable)
@@ -721,7 +721,7 @@ ResultPtr PartSet_Tools::findExternalVertex(CompositeFeaturePtr theSketch,
 
 
 bool PartSet_Tools::hasVertexShape(const ModuleBase_ViewerPrsPtr& thePrs, FeaturePtr theSketch,
-                                   Handle_V3d_View theView, double& theX, double& theY)
+                                   Handle(V3d_View) theView, double& theX, double& theY)
 {
   bool aHasVertex = false;
 
index 10699dd2743e399489a9efc994ba722acf1d0406..63812a712b7a2c7e5e7d4ddb0ef02a33b6cadd94 100755 (executable)
@@ -24,7 +24,7 @@
 
 #include <memory>
 
-class Handle_V3d_View;
+class V3d_View;
 class ModuleBase_ViewerPrs;
 class ModuleBase_IWorkshop;
 class GeomDataAPI_Point2D;
@@ -62,7 +62,7 @@ public:
   /// Converts the 2D screen point to the 3D point on the view according to the point of view
   /// \param thePoint a screen point
   /// \param theView a 3D view
-  static gp_Pnt convertClickToPoint(QPoint thePoint, Handle_V3d_View theView);
+  static gp_Pnt convertClickToPoint(QPoint thePoint, Handle(V3d_View) theView);
 
   /// \brief Converts the 3D point to the projected coodinates on the sketch plane.
   /// \param thePoint the 3D point in the viewer
@@ -216,7 +216,7 @@ public:
   /// \param theY the output vertical coordinate of the point
   static bool hasVertexShape(const std::shared_ptr<ModuleBase_ViewerPrs>& thePrs,
                              FeaturePtr theSketch,
-                             Handle_V3d_View theView, double& theX, double& theY);
+                             Handle(V3d_View) theView, double& theX, double& theY);
 
 
   /**
index a28227ccbc3db35355c2b8d70cfa3a3c87f11482..a72cecb7fe607b9b43eec6020f2d1c3e922d359d 100644 (file)
@@ -1,8 +1,5 @@
 ## Copyright (C) 2014-20xx  OPEN CASCADE
 
-
-SET(CMAKE_AUTOMOC ON)
-
 INSTALL(DIRECTORY geom model examples DESTINATION ${SHAPER_INSTALL_PYTHON_API})
 INSTALL(FILES shaper.py DESTINATION ${SHAPER_INSTALL_PYTHON_API})
 
index a79a28cb51b0c77f30e1b74ebb0e4ae8d17fbf5b..07e9b7b0ac0607cfa457515aa8b74cc48e83ca15 100644 (file)
@@ -1,8 +1,5 @@
 ## Copyright (C) 2014-20xx  OPEN CASCADE
 
-
-SET(CMAKE_AUTOMOC ON)
-
 SET(TEXT_RESOURCES
        PythonAddons_msg_en.ts
 )
index cc819f8b67fd37d2abb1350f76f35b62e212d744..204f6c1f9eb4e23ffe6e859061a8a90fc21fa9e7 100644 (file)
@@ -1,7 +1,12 @@
 ## Copyright (C) 2014-20xx CEA/DEN, EDF R&D
 
+INCLUDE(UseQtExt)
 
-SET(CMAKE_AUTOMOC ON)
+# additional include directories
+INCLUDE_DIRECTORIES(${QT_INCLUDES})
+
+# additional preprocessor / compiler flags
+ADD_DEFINITIONS(${QT_DEFINITIONS})
 
 SET(PROJECT_HEADERS
        SHAPER_SHAPERGUI.h
@@ -12,9 +17,8 @@ SET(PROJECT_HEADERS
        SHAPERGUI_NestedButton.h
 )
 
-SET(PROJECT_AUTOMOC
-    ${CMAKE_CURRENT_BINARY_DIR}/SHAPERGUI_automoc.cpp
-)
+# sources / moc wrappings
+QT_WRAP_MOC(PROJECT_AUTOMOC ${PROJECT_HEADERS})
 
 SET(PROJECT_SOURCES
        SHAPERGUI.cpp
@@ -33,35 +37,36 @@ SET(PROJECT_RESOURCES
 SET(PROJECT_LIBRARIES
     Events
     Config
-       XGUI
-       ModuleBase
-       ${QT_LIBRARIES}
-       ${suit}
-       ${std}
-       ${LightApp}
-       ${CAM}
-       ${OCCViewer}
-       ${qtx}
-       ${CAS_SHAPE}
+    XGUI
+    ModuleBase
+    ${QT_LIBRARIES}
+    ${suit}
+    ${std}
+    ${LightApp}
+    ${CAM}
+    ${OCCViewer}
+    ${qtx}
+    ${CAS_SHAPE}
 )
 
 ADD_DEFINITIONS( -DSHAPERGUI_EXPORTS ${CAS_DEFINITIONS} )
 
 INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/src/XGUI
-                                       ${PROJECT_SOURCE_DIR}/src/Events
-                                       ${PROJECT_SOURCE_DIR}/src/ModuleBase
+                    ${PROJECT_SOURCE_DIR}/src/Events
+                    ${PROJECT_SOURCE_DIR}/src/ModuleBase
                     ${PROJECT_SOURCE_DIR}/src/ModelAPI
                     ${PROJECT_SOURCE_DIR}/src/GeomAPI
                     ${PROJECT_SOURCE_DIR}/src/Config
-                                       ${PROJECT_SOURCE_DIR}/src/ExchangePlugin
-                                       ${SALOME_GUI_INCLUDE}
-                                       ${SALOME_KERNEL_INCLUDE}
+                    ${PROJECT_SOURCE_DIR}/src/ExchangePlugin
+                    ${SALOME_GUI_INCLUDE}
+                    ${SALOME_KERNEL_INCLUDE}
                     ${CAS_INCLUDE_DIRS}
 )
 
 ADD_LIBRARY(SHAPER SHARED
        ${PROJECT_SOURCES}
        ${PROJECT_HEADERS}
+       ${PROJECT_AUTOMOC}
 )
 
 ADD_DEPENDENCIES(SHAPER XGUI)
index 0c6867856381f7c1b90a48c86e72aca787a0bc0a..2cf83e159c6996aac5036783e93652d09403a233 100755 (executable)
@@ -1,7 +1,13 @@
 ## Copyright (C) 2014-20xx CEA/DEN, EDF R&D
 
 INCLUDE(Common)
-SET(CMAKE_AUTOMOC ON)
+INCLUDE(UseQtExt)
+
+# additional include directories
+INCLUDE_DIRECTORIES(${QT_INCLUDES})
+
+# additional preprocessor / compiler flags
+ADD_DEFINITIONS(${QT_DEFINITIONS})
 
 SET(PROJECT_HEADERS
     SamplePanelPlugin.h
@@ -33,9 +39,16 @@ SET(PROJECT_LIBRARIES
 SET(XML_RESOURCES
   plugin-SamplePanel.xml
 )
+# sources / moc wrappings
+QT_WRAP_MOC(PROJECT_AUTOMOC ${PROJECT_HEADERS})
 
 ADD_DEFINITIONS(-DSAMPLEPANELPLUGIN_EXPORTS -DWNT)
-ADD_LIBRARY(SamplePanelPlugin MODULE ${PROJECT_SOURCES} ${PROJECT_HEADERS} ${XML_RESOURCES})
+ADD_LIBRARY(SamplePanelPlugin MODULE
+            ${PROJECT_SOURCES}
+            ${PROJECT_HEADERS}
+            ${XML_RESOURCES}
+            ${PROJECT_AUTOMOC})
+
 TARGET_LINK_LIBRARIES(SamplePanelPlugin ${PROJECT_LIBRARIES})
 
 INCLUDE_DIRECTORIES(
index 8829f102f5f9ea007d555b0fda4c71fb8dcd41b6..418e6804aaa3f2d4388be2d9bda661505c8100f3 100644 (file)
@@ -17,7 +17,6 @@
 #include <Config_PropManager.h>
 
 class SketchPlugin_Sketch;
-class Handle_AIS_InteractiveObject;
 
 /**\class SketchPlugin_Feature
  * \ingroup Plugins
index 4376f773ff39720b91e527883dd3d49ebf360fcb..03b495a84a5fcf39672a20fe8b6cb94c994b513c 100644 (file)
@@ -31,7 +31,6 @@
 //  #define COMPILATION_CORRECTION
 //#endif
 
-IMPLEMENT_STANDARD_HANDLE(SketcherPrs_Angle, AIS_AngleDimension);
 IMPLEMENT_STANDARD_RTTIEXT(SketcherPrs_Angle, AIS_AngleDimension);
 
 SketcherPrs_Angle::SketcherPrs_Angle(ModelAPI_Feature* theConstraint,
@@ -176,12 +175,13 @@ void SketcherPrs_Angle::Compute(const Handle(PrsMgr_PresentationManager3d)& theP
   switch (anAngleType) {
     case SketcherPrs_Tools::ANGLE_DIRECT: {
 #ifndef COMPILATION_CORRECTION
-      SetArrowVisible(Standard_False/*first*/, Standard_True/*second*/);
+      SetArrowsVisibility(AIS_TOAV_Second);
 #endif
       SetMeasuredGeometry(myFirstPoint, myCenterPoint, mySecondPoint);
 #ifndef COMPILATION_CORRECTION
       bool isReversedPlanes = isAnglePlaneReversedToSketchPlane();
-      SetAngleReversed(!isReversedPlanes);
+      SetType(!isReversedPlanes ? AIS_TypeOfAngle::AIS_TOA_Exterior
+                                : AIS_TypeOfAngle::AIS_TOA_Interior);
 #endif
     }
     break;
@@ -192,18 +192,19 @@ void SketcherPrs_Angle::Compute(const Handle(PrsMgr_PresentationManager3d)& theP
                           gp_Vec(myCenterPoint, myFirstPoint).Normalized() * (-anEdge1Length));
       SetMeasuredGeometry(aFirstPoint, myCenterPoint, mySecondPoint);
 #ifndef COMPILATION_CORRECTION
-      SetAngleReversed(false);
+      SetType(AIS_TypeOfAngle::AIS_TOA_Interior);
 #endif
     }
     break;
     case SketcherPrs_Tools::ANGLE_BACKWARD: {
 #ifndef COMPILATION_CORRECTION
-      SetArrowVisible(Standard_False/*first*/, Standard_True/*second*/);
+      SetArrowsVisibility(AIS_TypeOfAngleArrowVisibility::AIS_TOAV_Second);
 #endif
       SetMeasuredGeometry(myFirstPoint, myCenterPoint, mySecondPoint);
       bool isReversedPlanes = isAnglePlaneReversedToSketchPlane();
 #ifndef COMPILATION_CORRECTION
-      SetAngleReversed(isReversedPlanes);
+      SetType(isReversedPlanes ? AIS_TypeOfAngle::AIS_TOA_Exterior
+                               : AIS_TypeOfAngle::AIS_TOA_Interior);
 #endif
     }
     break;
index f3769984824d304d0812e68dde10e339478cd380..a2f9a640376915748feb68fac61c46e56b4275eb 100644 (file)
@@ -34,7 +34,7 @@ public:
   /// Destructor
   Standard_EXPORT ~SketcherPrs_Angle();
 
-  DEFINE_STANDARD_RTTI(SketcherPrs_Angle)
+  DEFINE_STANDARD_RTTIEXT(SketcherPrs_Angle, AIS_AngleDimension)
 
   /// Returns true if the constraint feature arguments are correcly filled
   /// to build AIS presentation
index 1409192b70527a58150eb844adc69f463581b076..6681fa1f6ca64d1e4afa6c8fe0b6b6b048e94a73 100644 (file)
@@ -29,7 +29,6 @@
 #include <Select3D_SensitivePoint.hxx>
 
 
-IMPLEMENT_STANDARD_HANDLE(SketcherPrs_Coincident, AIS_InteractiveObject);
 IMPLEMENT_STANDARD_RTTIEXT(SketcherPrs_Coincident, AIS_InteractiveObject);
 
 SketcherPrs_Coincident::SketcherPrs_Coincident(ModelAPI_Feature* theConstraint,
index fd09748434c5e89253a2b9f4463dcbc8356e6ee2..773a9c5ea2415224976e3446857ca494a90354f8 100644 (file)
@@ -54,7 +54,7 @@ public:
   static bool IsReadyToDisplay(ModelAPI_Feature* theConstraint,
                                const std::shared_ptr<GeomAPI_Ax3>& thePlane);
 
-  DEFINE_STANDARD_RTTI(SketcherPrs_Coincident)
+  DEFINE_STANDARD_RTTIEXT(SketcherPrs_Coincident, AIS_InteractiveObject)
 protected:
   /// Redefinition of virtual function
   Standard_EXPORT virtual void Compute(
index cf075c52c801dd7a511d863aaab9c04715115a0d..e485076aa307bbb4dbffd8dd538e32476b8e145b 100755 (executable)
@@ -14,7 +14,6 @@
 #include <Prs3d_Root.hxx>
 
 
-IMPLEMENT_STANDARD_HANDLE(SketcherPrs_Collinear, SketcherPrs_SymbolPrs);
 IMPLEMENT_STANDARD_RTTIEXT(SketcherPrs_Collinear, SketcherPrs_SymbolPrs);
 
 static Handle(Image_AlienPixMap) MyPixMap;
index cd75c58d0d185ce178b965b32f3dfd6264b78925..99c3ac2897aed9bcc0cb3810f568b71846428cc6 100755 (executable)
@@ -25,7 +25,7 @@ public:
   /// \param thePlane a coordinate plane of current sketch
   Standard_EXPORT SketcherPrs_Collinear(ModelAPI_Feature* theConstraint,
                                        const std::shared_ptr<GeomAPI_Ax3>& thePlane);
-  DEFINE_STANDARD_RTTI(SketcherPrs_Collinear)
+  DEFINE_STANDARD_RTTIEXT(SketcherPrs_Collinear, SketcherPrs_SymbolPrs)
 
   /// Returns true if the constraint feature arguments are correcly filled to build AIS presentation
   /// \param theConstraint a constraint feature
index 704e2af0c3fd1c62102869112441dd9146c4f20a..c53d7240c09dec96c8395f2bcf34bfe8bd94cc45 100755 (executable)
@@ -5,6 +5,7 @@
 // Author:      Natalia ERMOLAEVA
 
 #include "SketcherPrs_DimensionStyleListener.h"
+#include <Prs3d_DimensionAspect.hxx>
 #include "SketcherPrs_Tools.h"
 
 #include <Events_Loop.h>
index 5e504590ae957dd4eba456417d42824391ab048a..b070c171de3e86f2f4c212fb6cb23f25319c7f66 100644 (file)
@@ -14,7 +14,6 @@
 #include <Prs3d_Root.hxx>
 
 
-IMPLEMENT_STANDARD_HANDLE(SketcherPrs_Equal, SketcherPrs_SymbolPrs);
 IMPLEMENT_STANDARD_RTTIEXT(SketcherPrs_Equal, SketcherPrs_SymbolPrs);
 
 static Handle(Image_AlienPixMap) MyPixMap;
index 6103dc8bea65e225b666e44af5879d9deed1aab1..5fd1c55198b4ebc5dd95921983f23e39ecf4980e 100644 (file)
@@ -25,7 +25,7 @@ public:
   /// \param thePlane a coordinate plane of current sketch
   Standard_EXPORT SketcherPrs_Equal(ModelAPI_Feature* theConstraint,
                                        const std::shared_ptr<GeomAPI_Ax3>& thePlane);
-  DEFINE_STANDARD_RTTI(SketcherPrs_Equal)
+  DEFINE_STANDARD_RTTIEXT(SketcherPrs_Equal, SketcherPrs_SymbolPrs)
 
   /// Returns true if the constraint feature arguments are correcly filled to build AIS presentation
   /// \param theConstraint a constraint feature
index 44d62c5aec94ad71a63d7905ec7f52238e1331cb..e1a7ed60118de059498e437db6e8b0d0eb855c28 100644 (file)
@@ -14,7 +14,6 @@
 #include <Prs3d_Root.hxx>
 
 
-IMPLEMENT_STANDARD_HANDLE(SketcherPrs_HVDirection, SketcherPrs_SymbolPrs);
 IMPLEMENT_STANDARD_RTTIEXT(SketcherPrs_HVDirection, SketcherPrs_SymbolPrs);
 
 static Handle(Image_AlienPixMap) MyPixMap;
index 8da2cd498c86bb4e926069ea96576a6dd4bbb4c6..ffe5415706593c1afda0dcc02bd9efb4d04a2d06 100644 (file)
@@ -29,7 +29,7 @@ public:
                                          const std::shared_ptr<GeomAPI_Ax3>& thePlane,
                                          bool isHorisontal);
 
-  DEFINE_STANDARD_RTTI(SketcherPrs_HVDirection)
+  DEFINE_STANDARD_RTTIEXT(SketcherPrs_HVDirection, SketcherPrs_SymbolPrs)
 
   /// Returns true if the constraint feature arguments are correcly filled to build AIS presentation
   /// \param theConstraint a constraint feature
index f47575fe7cefac2d81caffdb3086e1fd83872718..a315082f264beac53b8f35fb2f7bbaec8b343c0c 100644 (file)
@@ -31,7 +31,6 @@ static const gp_Pnt MyDefStart(0,0,0);
 static const gp_Pnt MyDefEnd(1,0,0);
 static const gp_Pln MyDefPln(gp_Pnt(0,0,0), gp_Dir(0,0,1));
 
-IMPLEMENT_STANDARD_HANDLE(SketcherPrs_LengthDimension, AIS_LengthDimension);
 IMPLEMENT_STANDARD_RTTIEXT(SketcherPrs_LengthDimension, AIS_LengthDimension);
 
 SketcherPrs_LengthDimension::SketcherPrs_LengthDimension(ModelAPI_Feature* theConstraint,
@@ -45,7 +44,8 @@ SketcherPrs_LengthDimension::SketcherPrs_LengthDimension(ModelAPI_Feature* theCo
   myDistance(1),
   myValue(0., false, "")
 {
-  SetDimensionAspect(SketcherPrs_Tools::createDimensionAspect());
+  // PORTING_TO_SALOME_8
+  // SetDimensionAspect(SketcherPrs_Tools::createDimensionAspect());
   myStyleListener = new SketcherPrs_DimensionStyleListener();
 }
 
@@ -87,7 +87,9 @@ void SketcherPrs_LengthDimension::Compute(
   // Update variable aspect parameters (depending on viewer scale)
   double aTextSize = 0.0;
   GetValueString(aTextSize);
-  SketcherPrs_Tools::updateArrows(DimensionAspect(), GetValue(), aTextSize);
+
+  // PORTING_TO_SALOME_8
+  //SketcherPrs_Tools::updateArrows(DimensionAspect(), GetValue(), aTextSize);
 
   // Update text visualization: parameter value or parameter text
   myStyleListener->updateDimensions(this, myValue);
index a15ba7ca942f78864b0c5c90cdb3ff86081ba2db..f38474f43870a445b65f87225239eaa77809040a 100644 (file)
@@ -38,7 +38,7 @@ public:
   /// Destructor
   Standard_EXPORT ~SketcherPrs_LengthDimension();
 
-  DEFINE_STANDARD_RTTI(SketcherPrs_LengthDimension)
+  DEFINE_STANDARD_RTTIEXT(SketcherPrs_LengthDimension, AIS_LengthDimension)
 
   /// Returns true if the constraint feature arguments are correcly filled
   /// to build AIS presentation
index 9c4bbd3542a32a8b1d7d52c62b0351d51d35eef1..af78d67e810e4454db868f2fd4f1e1ac59ec3b56 100755 (executable)
@@ -14,7 +14,6 @@
 #include <Prs3d_Root.hxx>
 
 
-IMPLEMENT_STANDARD_HANDLE(SketcherPrs_Middle, SketcherPrs_SymbolPrs);
 IMPLEMENT_STANDARD_RTTIEXT(SketcherPrs_Middle, SketcherPrs_SymbolPrs);
 
 static Handle(Image_AlienPixMap) MyPixMap;
index 00b6ad0eef37217afd6a015abaff2c78884263cb..25c97b43035af50f289692087a0fede2aa5dfbc2 100755 (executable)
@@ -25,7 +25,7 @@ public:
   /// \param thePlane a coordinate plane of current sketch
   Standard_EXPORT SketcherPrs_Middle(ModelAPI_Feature* theConstraint,
                                        const std::shared_ptr<GeomAPI_Ax3>& thePlane);
-  DEFINE_STANDARD_RTTI(SketcherPrs_Middle)
+  DEFINE_STANDARD_RTTIEXT(SketcherPrs_Middle, SketcherPrs_SymbolPrs)
 
   /// Returns true if the constraint feature arguments are correcly filled to build AIS presentation
   /// \param theConstraint a constraint feature
index b94f40efaef5c3b9fd6feb2c7c57cfae4b5a4454..28ecf09cdd6e43896b122158c9fa54b53117a45c 100644 (file)
@@ -16,7 +16,6 @@
 
 
 
-IMPLEMENT_STANDARD_HANDLE(SketcherPrs_Mirror, SketcherPrs_SymbolPrs);
 IMPLEMENT_STANDARD_RTTIEXT(SketcherPrs_Mirror, SketcherPrs_SymbolPrs);
 
 static Handle(Image_AlienPixMap) MyPixMap;
index 098d1c27975e060a09e2dbc1763a48448d053366..3c57b95b0b61c953a7a2fd7620c784f314bb8414 100644 (file)
@@ -25,7 +25,7 @@ public:
   /// \param thePlane a coordinate plane of current sketch
   Standard_EXPORT SketcherPrs_Mirror(ModelAPI_Feature* theConstraint,
                                        const std::shared_ptr<GeomAPI_Ax3>& thePlane);
-  DEFINE_STANDARD_RTTI(SketcherPrs_Mirror)
+  DEFINE_STANDARD_RTTIEXT(SketcherPrs_Mirror, SketcherPrs_SymbolPrs)
 
   /// Returns true if the constraint feature arguments are correcly filled to build AIS presentation
   /// \param theConstraint a constraint feature
index 6a6d4bbee9542005215062c957a9fe3e9d83ccc2..430d8818abc7512385441eed813be9049d4e12d1 100644 (file)
@@ -15,7 +15,6 @@
 
 
 
-IMPLEMENT_STANDARD_HANDLE(SketcherPrs_Parallel, SketcherPrs_SymbolPrs);
 IMPLEMENT_STANDARD_RTTIEXT(SketcherPrs_Parallel, SketcherPrs_SymbolPrs);
 
 static Handle(Image_AlienPixMap) MyPixMap;
index d5ae2530097b8e5a17d8bada8403d5dd76439b24..83ff20bb85e3683d0c480dde1b37e22dda256e85 100644 (file)
@@ -25,7 +25,7 @@ public:
   /// \param thePlane a coordinate plane of current sketch
   Standard_EXPORT SketcherPrs_Parallel(ModelAPI_Feature* theConstraint,
                                        const std::shared_ptr<GeomAPI_Ax3>& thePlane);
-  DEFINE_STANDARD_RTTI(SketcherPrs_Parallel)
+  DEFINE_STANDARD_RTTIEXT(SketcherPrs_Parallel, SketcherPrs_SymbolPrs)
 
   /// Returns true if the constraint feature arguments are correcly filled to build AIS presentation
   /// \param theConstraint a constraint feature
index 96a63b3a3a4af4ea093b8d7448e375745798a9cb..a0bda9731d6080b0783260789dc6e6a722bc60b2 100644 (file)
@@ -15,7 +15,6 @@
 
 
 
-IMPLEMENT_STANDARD_HANDLE(SketcherPrs_Perpendicular, SketcherPrs_SymbolPrs);
 IMPLEMENT_STANDARD_RTTIEXT(SketcherPrs_Perpendicular, SketcherPrs_SymbolPrs);
 
 static Handle(Image_AlienPixMap) MyPixMap;
index c1f1622d3115a5fd97aaf1459e58f269d31b4e78..3b07a25e8d544583e092c668b29baed368547e1c 100644 (file)
@@ -28,7 +28,7 @@ public:
   Standard_EXPORT SketcherPrs_Perpendicular(ModelAPI_Feature* theConstraint,
                                        const std::shared_ptr<GeomAPI_Ax3>& thePlane);
 
-  DEFINE_STANDARD_RTTI(SketcherPrs_Perpendicular)
+  DEFINE_STANDARD_RTTIEXT(SketcherPrs_Perpendicular, SketcherPrs_SymbolPrs)
 
   /// Returns true if the constraint feature arguments are correcly filled to build AIS presentation
   /// \param theConstraint a constraint feature
index fe73e5059b686ecf467b130a2fc8f9450fcedc40..985f6babc4239686fc3ebccfc394df8868f8bb9d 100644 (file)
@@ -23,7 +23,6 @@
 
 static const gp_Circ MyDefCirc(gp_Ax2(gp_Pnt(0,0,0), gp_Dir(0,0,1)), 1);
 
-IMPLEMENT_STANDARD_HANDLE(SketcherPrs_Radius, AIS_RadiusDimension);
 IMPLEMENT_STANDARD_RTTIEXT(SketcherPrs_Radius, AIS_RadiusDimension);
 
 SketcherPrs_Radius::SketcherPrs_Radius(ModelAPI_Feature* theConstraint,
@@ -33,7 +32,8 @@ SketcherPrs_Radius::SketcherPrs_Radius(ModelAPI_Feature* theConstraint,
   myAnchorPoint(gp_Pnt(0, 0, 2)),
   myValue(1, false, "")
 {
-  SetDimensionAspect(SketcherPrs_Tools::createDimensionAspect());
+  // PORTING_TO_SALOME_8
+  // SetDimensionAspect(SketcherPrs_Tools::createDimensionAspect());
   myStyleListener = new SketcherPrs_DimensionStyleListener();
 }
 
@@ -138,7 +138,8 @@ void SketcherPrs_Radius::Compute(
   // Update variable aspect parameters (depending on viewer scale)
   double aTextSize = 0.0;
   GetValueString(aTextSize);
-  SketcherPrs_Tools::updateArrows(DimensionAspect(), GetValue(), aTextSize);
+  // PORTING_TO_SALOME_8
+  //SketcherPrs_Tools::updateArrows(DimensionAspect(), GetValue(), aTextSize);
 
 
   AIS_RadiusDimension::Compute(thePresentationManager, thePresentation, theMode);
index 28a455aa64a2f88cafe3a158f80a699e04236f56..9e431254bc048ef421aa6e11c925a0988b4fe0f9 100644 (file)
@@ -34,7 +34,7 @@ public:
   /// Destructor
   Standard_EXPORT ~SketcherPrs_Radius();
 
-  DEFINE_STANDARD_RTTI(SketcherPrs_Radius)
+  DEFINE_STANDARD_RTTIEXT(SketcherPrs_Radius, AIS_RadiusDimension)
 
   /// Returns true if the constraint feature arguments are correcly filled
   /// to build AIS presentation
index ce56fdf9c540b8cbffb2fe0ef0ec572077bc1648..a430ef2c1728c28672fbe1e22a79d94481cbd5a5 100644 (file)
@@ -30,7 +30,6 @@
 
 
 
-IMPLEMENT_STANDARD_HANDLE(SketcherPrs_Rigid, SketcherPrs_SymbolPrs);
 IMPLEMENT_STANDARD_RTTIEXT(SketcherPrs_Rigid, SketcherPrs_SymbolPrs);
 
 static Handle(Image_AlienPixMap) MyPixMap;
index 0f17fd12c4f0082dc79cd78cc1228cecbdafccd2..d430148553443edf5fb608f395adbd96bab3d6b6 100644 (file)
@@ -29,7 +29,7 @@ public:
                                        const std::shared_ptr<GeomAPI_Ax3>& thePlane);
 
 
-  DEFINE_STANDARD_RTTI(SketcherPrs_Rigid)
+  DEFINE_STANDARD_RTTIEXT(SketcherPrs_Rigid, SketcherPrs_SymbolPrs)
 
   /// Returns true if the constraint feature arguments are correcly filled to build AIS presentation
   /// \param theConstraint a constraint feature
index 61c33fab80d3b361e4d5835095537ea1487cf1a2..2edfea572a854fa59d30a71e8ff92b1223362aa2 100644 (file)
@@ -12,7 +12,6 @@
 
 #define DEBUG_SENSITIVE_TO_BE_CORRECTED
 
-IMPLEMENT_STANDARD_HANDLE(SketcherPrs_SensitivePoint, Select3D_SensitiveEntity);
 IMPLEMENT_STANDARD_RTTIEXT(SketcherPrs_SensitivePoint, Select3D_SensitiveEntity);
 
 SketcherPrs_SensitivePoint::SketcherPrs_SensitivePoint(
index 22adc0442c61958223048a1254fd8ec645e87d51..132140beef42639df3c68c4bc5b08342161c814e 100644 (file)
@@ -53,7 +53,7 @@ public:
   /// Clear sub-elements
   Standard_EXPORT virtual void Clear() Standard_OVERRIDE;
 
-  DEFINE_STANDARD_RTTI(SketcherPrs_SensitivePoint)
+  DEFINE_STANDARD_RTTIEXT(SketcherPrs_SensitivePoint, Select3D_SensitiveEntity)
 
 private:
   int myId;
index d88e2bb71e56ce44425c698355595e275301c5ff..ba5424ea642f4b64e65a61fff72639db3a4036f4 100644 (file)
@@ -230,7 +230,8 @@ private:
 
 
 //**************************************************************
-//! Definition of call back
+// PORTING_TO_SALOME_8
+/*//! Definition of call back
 OpenGl_Element* SymbolPrsCallBack(const CALL_DEF_USERDRAW * theUserDraw)
 {
   Handle(SketcherPrs_SymbolPrs) anIObj = (SketcherPrs_SymbolPrs*)theUserDraw->Data;
@@ -240,11 +241,10 @@ OpenGl_Element* SymbolPrsCallBack(const CALL_DEF_USERDRAW * theUserDraw)
       << std::endl;
   }
   return new SketcherPrs_Element(anIObj);
-}
+}*/
 
 
 //*****************************************************************************
-IMPLEMENT_STANDARD_HANDLE(SketcherPrs_SymbolPrs, AIS_InteractiveObject);
 IMPLEMENT_STANDARD_RTTIEXT(SketcherPrs_SymbolPrs, AIS_InteractiveObject);
 
 
@@ -344,7 +344,8 @@ void SketcherPrs_SymbolPrs::HilightSelected(const Handle(PrsMgr_PresentationMana
 
   aSelectionPrs->SetDisplayPriority(9);
   aSelectionPrs->Display();
-  thePM->Highlight(this);
+  // PORTING_TO_SALOME_8
+  //thePM->Highlight(this);
 }
 
 void SketcherPrs_SymbolPrs::HilightOwnerWithColor(
@@ -352,6 +353,8 @@ void SketcherPrs_SymbolPrs::HilightOwnerWithColor(
   const Quantity_NameOfColor theColor,
   const Handle(SelectMgr_EntityOwner)& theOwner)
 {
+  // PORTING_TO_SALOME_8
+  /*
   thePM->Color(this, theColor);
 
   Handle( Prs3d_Presentation ) aHilightPrs = GetHilightPresentation( thePM );
@@ -360,6 +363,7 @@ void SketcherPrs_SymbolPrs::HilightOwnerWithColor(
 
   if (thePM->IsImmediateModeOn())
     thePM->AddToImmediateList(aHilightPrs);
+  */
 }
 
 void SketcherPrs_SymbolPrs::Compute(
@@ -375,7 +379,8 @@ void SketcherPrs_SymbolPrs::Compute(
     Handle(OpenGl_GraphicDriver)::DownCast(aCtx->CurrentViewer()->Driver());
   if (!aDriver.IsNull()) {
     // register the custom element factory function
-    aDriver->UserDrawCallback() = SymbolPrsCallBack;
+    // PORTING_TO_SALOME_8
+    //aDriver->UserDrawCallback() = SymbolPrsCallBack;
   }
 
   // Update points with default shift value
@@ -409,7 +414,8 @@ void SketcherPrs_SymbolPrs::Compute(
   }
 
   // Pint the group with custom procedure (see Render)
-  aGroup->UserDraw(this, true);
+  // PORTING_TO_SALOME_8
+  //aGroup->UserDraw(this, true);
 
   // Disable frustum culling for this object by marking it as mutable
   aGroup->Structure()->SetMutable(true);
@@ -452,6 +458,8 @@ void SketcherPrs_SymbolPrs::SetConflictingConstraint(const bool& theConflicting,
 
 void SketcherPrs_SymbolPrs::Render(const Handle(OpenGl_Workspace)& theWorkspace) const
 {
+  // PORTING_TO_SALOME_8
+  /*
   // this method is a combination of OCCT OpenGL functions. The main purpose is to have
   // equal distance from the source object to symbol indpendently of zoom.
   // It is base on OCCT 6.9.1 and might need changes when using later OCCT versions.
@@ -543,6 +551,7 @@ void SketcherPrs_SymbolPrs::Render(const Handle(OpenGl_Workspace)& theWorkspace)
     GetContext()->MainSelector()->RebuildSensitivesTree (this);
     GetContext()->MainSelector()->RebuildObjectsTree (false);
   }
+*/
 }
 
 
index 622230433a0ba46daf70a8abb6d957cc2a758fec..5b7c077420b1fd2835de0557e58598acad682b4b 100644 (file)
@@ -84,7 +84,7 @@ public:
   /// \param theBndBox the common bounding box to update
   Standard_EXPORT virtual void BoundingBox (Bnd_Box& theBndBox) Standard_OVERRIDE;
 
-  DEFINE_STANDARD_RTTI(SketcherPrs_SymbolPrs)
+  DEFINE_STANDARD_RTTIEXT(SketcherPrs_SymbolPrs, AIS_InteractiveObject)
 
 protected:
   /// Redefinition of virtual function
index 640b3b9ab0d8e11cbc756eee3cd9919ec7ab0467..5f657b8aacf660a4f364f405ba28ff5b3624eff2 100644 (file)
@@ -18,7 +18,6 @@
 #include <StdPrs_DeflectionCurve.hxx>
 
 
-IMPLEMENT_STANDARD_HANDLE(SketcherPrs_Tangent, SketcherPrs_SymbolPrs);
 IMPLEMENT_STANDARD_RTTIEXT(SketcherPrs_Tangent, SketcherPrs_SymbolPrs);
 
 static Handle(Image_AlienPixMap) MyPixMap;
index cc2b0cc0537ffd9fff0ab28d5e9bd5728dde6dbf..a3bdf4a44862b917864b47231ae3c3c0b94382e2 100644 (file)
@@ -27,7 +27,7 @@ public:
   Standard_EXPORT SketcherPrs_Tangent(ModelAPI_Feature* theConstraint,
                                        const std::shared_ptr<GeomAPI_Ax3>& thePlane);
 
-  DEFINE_STANDARD_RTTI(SketcherPrs_Tangent)
+  DEFINE_STANDARD_RTTIEXT(SketcherPrs_Tangent, SketcherPrs_SymbolPrs)
 
   /// Returns true if the constraint feature arguments are correcly filled to build AIS presentation
   /// \param theConstraint a constraint feature
index 04611afa7a199db46a51214f202f1a1c3104635b..edd56ad301fe9fe41b0bb62325cd9a5754ed1813 100644 (file)
@@ -28,7 +28,7 @@
 #include <TopoDS_Shape.hxx>
 #include <TopoDS_Vertex.hxx>
 
-#include <Prs3d_DimensionAspect.hxx>
+//#include <Prs3d_DimensionAspect.hxx>
 
 #include <BRep_Tool.hxx>
 #include <Precision.hxx>
@@ -297,7 +297,7 @@ void sendExpressionShownEvent(const bool& theState)
   Events_Loop::loop()->flush(anId);
 }
 
-Handle(Prs3d_DimensionAspect) createDimensionAspect()
+/*Handle(Prs3d_DimensionAspect) createDimensionAspect()
 {
   Handle(Prs3d_DimensionAspect) anAspect = new Prs3d_DimensionAspect();
   anAspect->MakeArrows3d(false);
@@ -329,7 +329,7 @@ void updateArrows(Handle(Prs3d_DimensionAspect) theDimAspect,
   theDimAspect->SetArrowTailSize(theDimAspect->ArrowAspect()->Length());
   // The value of vertical aligment is sometimes changed
   theDimAspect->TextAspect()->SetVerticalJustification(Graphic3d_VTA_CENTER);
-}
+}*/
 
 void sendEmptyPresentationError(ModelAPI_Feature* theFeature, const std::string theError)
 {
index ac76fdac95075eacdb1bbbb54db200ec1c16096c..365961fcbcc32a6ee143a7bfea3d34f7d1ba61c9 100644 (file)
 #include <Events_Loop.h>
 #include <Events_Message.h>
 
+// PORTING_TO_SALOME_8
+//class Handle_Prs3d_DimensionAspect;
+
 class GeomDataAPI_Point2D;
 class AIS_Dimension;
-class Handle_Prs3d_DimensionAspect;
 
 //#define MyTextHeight 20
 
@@ -171,14 +173,14 @@ namespace SketcherPrs_Tools {
 
   /// Creates an aspect to be shown in length/radius dimension presentations
   /// \return an instance of aspect
-  SKETCHERPRS_EXPORT Handle_Prs3d_DimensionAspect createDimensionAspect();
+  //SKETCHERPRS_EXPORT Handle_Prs3d_DimensionAspect createDimensionAspect();
 
   /// Update variable aspect parameters (depending on viewer scale)
   /// \param theDimAspect an aspect to be changed
   /// \param theDimValue an arrow value
   /// \param theTextSize an arrow value
-  SKETCHERPRS_EXPORT void updateArrows(Handle_Prs3d_DimensionAspect theDimAspect,
-                                       double theDimValue, double theTextSize);
+  //SKETCHERPRS_EXPORT void updateArrows(Handle_Prs3d_DimensionAspect theDimAspect,
+  //                                     double theDimValue, double theTextSize);
 
   /// Throws an exception(in debug mode) and sends a signal about necessity to hide the object
   /// \param theFeature a feature where AIS presentation is empty
index 785267baa8c79117766439458be969075b5c712e..285133c84bbe670ef7ae4bae6d9736c643cbccc0 100644 (file)
@@ -23,7 +23,6 @@
 
 
 
-IMPLEMENT_STANDARD_HANDLE(SketcherPrs_Transformation, SketcherPrs_SymbolPrs);
 IMPLEMENT_STANDARD_RTTIEXT(SketcherPrs_Transformation, SketcherPrs_SymbolPrs);
 
 static Handle(Image_AlienPixMap) MyPixMap;
index 41986751735091144f24432a382797c172a8e171..7ac6360f7ada81f83994746e673549fdee4bd5ce 100644 (file)
@@ -29,7 +29,7 @@ public:
                                          const std::shared_ptr<GeomAPI_Ax3>& thePlane,
                                          bool isTranslation);
 
-  DEFINE_STANDARD_RTTI(SketcherPrs_Transformation)
+  DEFINE_STANDARD_RTTIEXT(SketcherPrs_Transformation, SketcherPrs_SymbolPrs)
 
   /// Returns true if the constraint feature arguments are correcly filled to build AIS presentation
   /// \param theConstraint a constraint feature
index 7adccd4ebf73dbf309d2502227ffc1bcfa0bb558..2d8de0559cf94e8b249de25957f09259036c5e22 100644 (file)
@@ -1,7 +1,12 @@
 ## Copyright (C) 2014-20xx CEA/DEN, EDF R&D
 
+INCLUDE(UseQtExt)
 
-SET(CMAKE_AUTOMOC ON)
+# additional include directories
+INCLUDE_DIRECTORIES(${QT_INCLUDES})
+
+# additional preprocessor / compiler flags
+ADD_DEFINITIONS(${QT_DEFINITIONS})
 
 SET(PROJECT_HEADERS
        XGUI.h
@@ -32,9 +37,8 @@ SET(PROJECT_HEADERS
        XGUI_WorkshopListener.h
 )
 
-SET(PROJECT_AUTOMOC
-    ${CMAKE_CURRENT_BINARY_DIR}/XGUI_automoc.cpp
-)
+# sources / moc wrappings
+QT_WRAP_MOC(PROJECT_AUTOMOC ${PROJECT_HEADERS})
 
 SET(PROJECT_SOURCES
        XGUI_ActionsMgr.cpp
@@ -103,9 +107,8 @@ ELSE()
     SET(PROJECT_LIBRARIES ${PROJECT_LIBRARIES} GL)
 ENDIF()
 
-QT4_ADD_RESOURCES(PROJECT_COMPILED_RESOURCES ${PROJECT_RESOURCES})
+QT_ADD_RESOURCES(PROJECT_COMPILED_RESOURCES ${PROJECT_RESOURCES})
 #QT5_ADD_TRANSLATION(QM_RESOURCES ${TEXT_RESOURCES})
-
 # QT4_CREATE_TRANSLATION(QM_RESOURCES
 #                                         ${PROJECT_SOURCES}
 #                                         ${TEXT_RESOURCES}
@@ -160,6 +163,7 @@ ADD_LIBRARY(XGUI SHARED
        ${TEXT_RESOURCES}
        ${QM_RESOURCES}
        ${PREFERENCES_XML}
+       ${PROJECT_AUTOMOC}
 )
 
 ADD_DEPENDENCIES(XGUI ModelAPI)
index 3aa3e351c0081f9280502a48bc8671c79675b666..e3fa711bfd57d29f9f33e5c6c723d34ffa7721ca 100644 (file)
@@ -26,7 +26,7 @@
 #include <QIcon>
 #include <QBrush>
 
-#define ACTIVE_COLOR Qt::black
+#define ACTIVE_COLOR QColor(Qt::black)
 //#define ACTIVE_COLOR QColor(0,72,140)
 //#define PASSIVE_COLOR Qt::black
 
index a6063a2d3eebf13dd516c990d1832f4bdfc19a25..f9a751ce638c5e6c3fbb28f80675f6b3a33ef1e6 100644 (file)
@@ -200,7 +200,7 @@ bool XGUI_Displayer::display(ObjectPtr theObject, bool theUpdateViewer)
           else {
             Handle(AIS_Shape) aShapePrs = Handle(AIS_Shape)::DownCast(anAISPrs);
             if (!aShapePrs.IsNull())
-              ModuleBase_Tools::setPointBallHighlighting((AIS_Shape*) aShapePrs.Access());
+              ModuleBase_Tools::setPointBallHighlighting((AIS_Shape*) aShapePrs.get());
           }
           anAIS->setImpl(new Handle(AIS_InteractiveObject)(anAISPrs));
           //anAIS->createShape(aShapePtr);
@@ -1230,14 +1230,14 @@ bool XGUI_Displayer::hasSelectionFilter(const Handle(SelectMgr_Filter)& theFilte
   const SelectMgr_ListOfFilter& aFilters = aContext->Filters();
   SelectMgr_ListIteratorOfListOfFilter aIt(aFilters);
   for (; aIt.More() && !aFilterFound; aIt.Next()) {
-    if (theFilter.Access() == aIt.Value().Access())
+    if (theFilter.get() == aIt.Value().get())
       aFilterFound = true;
   }
   Handle(SelectMgr_CompositionFilter) aCompositeFilter = GetFilter();
   if (!aCompositeFilter.IsNull()) {
     const SelectMgr_ListOfFilter& aStoredFilters = aCompositeFilter->StoredFilters();
     for (aIt.Initialize(aStoredFilters); aIt.More() && !aFilterFound; aIt.Next()) {
-      if (theFilter.Access() == aIt.Value().Access())
+      if (theFilter.get() == aIt.Value().get())
         aFilterFound = true;
     }
   }
@@ -1545,6 +1545,8 @@ void XGUI_Displayer::AddOrRemoveSelectedShapes(Handle(AIS_InteractiveContext) th
                            const NCollection_DataMap<TopoDS_Shape,
                            NCollection_Map<Handle(AIS_InteractiveObject)>>& theShapesToBeSelected)
 {
+  /*
+  // PORTING_TO_SALOME_8
   Handle(AIS_LocalContext) aLContext = theContext->LocalContext();
   TCollection_AsciiString aSelectionName = aLContext->SelectionName();
   aLContext->UnhilightPicked(Standard_False);
@@ -1562,9 +1564,9 @@ void XGUI_Displayer::AddOrRemoveSelectedShapes(Handle(AIS_InteractiveContext) th
   QList<long> aSelectedIds; // Remember of selected address in order to avoid duplicates
   for (; anOwnersIt.More(); anOwnersIt.Next()) {
     anOwner = Handle(SelectMgr_EntityOwner)::DownCast (anOwnersIt.Value());
-    if (aSelectedIds.contains((long)anOwner.Access()))
+    if (aSelectedIds.contains((long)anOwner.get()))
       continue;
-    aSelectedIds.append((long)anOwner.Access());
+    aSelectedIds.append((long)anOwner.get());
 
     Handle(StdSelect_BRepOwner) BROwnr = Handle(StdSelect_BRepOwner)::DownCast(anOwner);
     if (!BROwnr.IsNull() && BROwnr->HasShape()) {
@@ -1582,4 +1584,5 @@ void XGUI_Displayer::AddOrRemoveSelectedShapes(Handle(AIS_InteractiveContext) th
     }
   }
   aLContext->HilightPicked(Standard_False);
+*/
 }
index 062ffe450570a3a912d3b7db58657c28f5471a59..b86c0ef8ba2277515b1536837e83ce0e74421613 100644 (file)
@@ -11,7 +11,6 @@
 #include <ModuleBase_Definitions.h>
 #include <ModuleBase_IWorkshop.h>
 
-class Handle_AIS_InteractiveContext;
 class XGUI_Workshop;
 class XGUI_Displayer;
 
index eb40a0a9c6f949bbde3ccd9938636c7ab46a5171..2ac7f97d9f484539ba119346ef34cbad3fa75c58 100644 (file)
@@ -213,10 +213,10 @@ void XGUI_TreeViewStyle::drawPrimitive(PrimitiveElement theElement,
         aState &= ~QStyle::State_MouseOver;
       QStyleOptionViewItemV4* aOpt = (QStyleOptionViewItemV4*) aOptions;
       aOpt->state = aState;
-      QWindowsVistaStyle::drawPrimitive(theElement, aOpt, thePainter, theWidget);
+      QCommonStyle/*QWindowsVistaStyle*/::drawPrimitive(theElement, aOpt, thePainter, theWidget);
     }
   }
-  QWindowsVistaStyle::drawPrimitive(theElement, theOption, thePainter, theWidget);
+  QCommonStyle/*QWindowsVistaStyle*/::drawPrimitive(theElement, theOption, thePainter, theWidget);
 }
 #endif
 
index 416088e32dd325f57a09c77c75e7a8dd99bd1ec6..f1c51e964371e39176d20c066836f98e48b04e70 100644 (file)
@@ -63,16 +63,18 @@ private:
 
 
 #if (!defined HAVE_SALOME) && (defined WIN32)
-#include <QWindowsVistaStyle>
-/**
+// PORTING_TO_SALOME_8
+//#include <QWindowsVistaStyle>
+#include <QCommonStyle>
+  /**
 * \ingroup GUI
 * Implementation of XGUI_DataTree custom style
 */
-class XGUI_TreeViewStyle : public QWindowsVistaStyle
+class XGUI_TreeViewStyle : public QCommonStyle // PORTING_TO_SALOME_8 QWindowsVistaStyle
 {
   Q_OBJECT
 public:
-  XGUI_TreeViewStyle() : QWindowsVistaStyle() {}
+  XGUI_TreeViewStyle() : QCommonStyle/*QWindowsVistaStyle*/() {}
 
   void drawPrimitive(PrimitiveElement theElement, const QStyleOption* theOption,
                      QPainter* thePainter, const QWidget* theWidget = 0) const;
index d5510051e69aa010aef214aaf02c516bbaf066bc..6718012dbaa5b01475fc70a70b761ce7c76599d2 100644 (file)
@@ -86,9 +86,9 @@ void XGUI_Selection::getSelectedInViewer(QList<ModuleBase_ViewerPrsPtr>& thePres
       ModuleBase_ViewerPrsPtr aPrs(new ModuleBase_ViewerPrs());
       Handle(SelectMgr_EntityOwner) anOwner = aContext->SelectedOwner();
 
-      if (aSelectedIds.contains((long)anOwner.Access()))
+      if (aSelectedIds.contains((long)anOwner.get()))
         continue;
-      aSelectedIds.append((long)anOwner.Access());
+      aSelectedIds.append((long)anOwner.get());
 
       fillPresentation(aPrs, anOwner);
 
@@ -234,9 +234,9 @@ QList<ModuleBase_ViewerPrsPtr> XGUI_Selection::getHighlighted() const
   for (aContext->InitDetected(); aContext->MoreDetected(); aContext->NextDetected()) {
     Handle(SelectMgr_EntityOwner) anOwner = aContext->DetectedOwner();
     if (!anOwner.IsNull()) {
-      if (aSelectedIds.contains((long)anOwner.Access()))
+      if (aSelectedIds.contains((long)anOwner.get()))
         continue;
-      aSelectedIds.append((long)anOwner.Access());
+      aSelectedIds.append((long)anOwner.get());
 
       ModuleBase_ViewerPrsPtr aPrs(new ModuleBase_ViewerPrs());
       fillPresentation(aPrs, anOwner);
index 4cb69571dc7ac30363bd0141ecbb985f487cfe53..cf9fec382307e3618a69c7151bff4f499c3a253c 100644 (file)
@@ -20,7 +20,7 @@
 #include <SelectMgr_IndexedMapOfOwner.hxx>
 
 class XGUI_Workshop;
-class Handle_SelectMgr_EntityOwner;
+class SelectMgr_EntityOwner;
 class ModuleBase_ViewerPrs;
 
 /**
@@ -43,7 +43,7 @@ class XGUI_EXPORT XGUI_Selection : public ModuleBase_ISelection
   /// \param thePrs a container for selection
   /// \param theOwner a selection owner
   virtual void fillPresentation(std::shared_ptr<ModuleBase_ViewerPrs>& thePrs,
-                                const Handle_SelectMgr_EntityOwner& theOwner) const;
+                                const Handle(SelectMgr_EntityOwner)& theOwner) const;
 
   /// Returns a list of viewer highlited presentations
   /// \return list of presentations
index d80fcaf25a929030e72bbddbbc4f21c88df6a5db..bedf4f9254de9729b55efc53cdfad8fd567e729b 100755 (executable)
@@ -905,7 +905,9 @@ bool XGUI_Workshop::onSaveAs()
   QFileDialog dialog(desktop());
   dialog.setWindowTitle(tr("Select directory to save files..."));
   dialog.setFileMode(QFileDialog::Directory);
-  dialog.setFilter(tr("Directories (*)"));
+  // PORTING_TO_SALOME_8
+  dialog.selectNameFilter(tr("Directories (*)"));
+  //dialog.setFilter(tr("Directories (*)");
   dialog.setOptions(QFileDialog::HideNameFilterDetails | QFileDialog::ShowDirsOnly);
   dialog.setViewMode(QFileDialog::Detail);