-# Copyright (C) 2012-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2012-2014 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.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8 FATAL_ERROR)
+INCLUDE(CMakeDependentOption)
+
PROJECT(SalomeGUI C CXX)
# Ensure a proper linker behavior:
SET(${PROJECT_NAME_UC}_PATCH_VERSION 1)
SET(${PROJECT_NAME_UC}_VERSION
${${PROJECT_NAME_UC}_MAJOR_VERSION}.${${PROJECT_NAME_UC}_MINOR_VERSION}.${${PROJECT_NAME_UC}_PATCH_VERSION})
-SET(${PROJECT_NAME_UC}_VERSION_DEV 0)
+SET(${PROJECT_NAME_UC}_VERSION_DEV 1)
# Find KERNEL
# ===========
OPTION(SALOME_GUI_USE_OBSERVERS "Use study observers in GUI (advanced)" ON)
# Advanced options:
+CMAKE_DEPENDENT_OPTION(SALOME_LIGHT_ONLY "Build SALOME Light only (no CORBA)" OFF
+ "NOT SALOME_KERNEL_LIGHT_ONLY" ON)
OPTION(SALOME_USE_VTKVIEWER "Enable VTK visualization (Mandatory in classic configurations)" ON)
-OPTION(SALOME_USE_SALOMEOBJECT "Enable Salome Object (Mandatory in classic configurations)" ON)
OPTION(SALOME_USE_OCCVIEWER "Enable OCC visualization (Mandatory in classic configurations)" ON)
OPTION(SALOME_USE_GLVIEWER "Enable OpenGL visualization (Mandatory in classic configurations)" ON)
OPTION(SALOME_USE_GRAPHICSVIEW "Enable GraphicsView visualization (Mandatory in classic configurations)" ON)
OPTION(SALOME_USE_PLOT2DVIEWER "Enable Plot2D visualization (Mandatory in classic configurations)" ON)
OPTION(SALOME_USE_PYCONSOLE "Enable Python GUI interface (Mandatory in classic configurations)" ON)
OPTION(SALOME_USE_QXGRAPHVIEWER "Enable QX graph visualization (Mandatory in classic configurations)" ON)
+CMAKE_DEPENDENT_OPTION(SALOME_USE_SALOMEOBJECT "Enable Salome Object (Mandatory in classic configurations)" ON
+ "SALOME_LIGHT_ONLY" ON)
OPTION(SALOME_USE_SINGLE_DESKTOP "Enable multiple document interface" ON)
-MARK_AS_ADVANCED(SALOME_USE_VTKVIEWER SALOME_USE_VTKVIEWER SALOME_USE_GRAPHICSVIEW)
+MARK_AS_ADVANCED(SALOME_LIGHT_ONLY SALOME_USE_VTKVIEWER SALOME_USE_GRAPHICSVIEW)
MARK_AS_ADVANCED(SALOME_USE_SALOMEOBJECT SALOME_USE_OCCVIEWER SALOME_USE_GLVIEWER SALOME_USE_PLOT2DVIEWER)
MARK_AS_ADVANCED(SALOME_USE_PYCONSOLE SALOME_USE_QXGRAPHVIEWER)
MARK_AS_ADVANCED(SALOME_USE_SINGLE_DESKTOP)
IF(NOT SALOME_LIGHT_ONLY)
FIND_PACKAGE(SalomeOmniORB REQUIRED)
FIND_PACKAGE(SalomeOmniORBPy REQUIRED)
+ELSE()
+ ADD_DEFINITIONS("-DGUI_DISABLE_CORBA")
ENDIF()
IF(SALOME_BUILD_TESTS)
ENABLE_TESTING()
# OCCT
FIND_PACKAGE(SalomeCAS REQUIRED)
+IF(NOT SALOME_USE_OCCVIEWER)
+ ADD_DEFINITIONS("-DDISABLE_OCCVIEWER")
+ENDIF()
# Qt4
FIND_PACKAGE(SalomeQt4 REQUIRED COMPONENTS QtCore QtGui QtXml QtWebKit QtOpenGL)
IF(SALOME_USE_GLVIEWER)
FIND_PACKAGE(SalomeOpenGL)
SALOME_LOG_OPTIONAL_PACKAGE(OpenGL SALOME_USE_GLVIEWER)
+ELSE()
+ ADD_DEFINITIONS("-DDISABLE_GLVIEWER")
ENDIF()
IF(SALOME_USE_VTKVIEWER)
# Required components are listed in the FindSalomeVTK.cmake file:
FIND_PACKAGE(SalomeVTK 6.1)
SALOME_LOG_OPTIONAL_PACKAGE(VTK SALOME_USE_VTKVIEWER)
+ELSE()
+ ADD_DEFINITIONS("-DDISABLE_VTKVIEWER")
ENDIF()
IF(SALOME_USE_PLOT2DVIEWER)
FIND_PACKAGE(SalomeQwt)
SALOME_LOG_OPTIONAL_PACKAGE(Qwt SALOME_USE_PLOT2DVIEWER)
+ELSE()
+ ADD_DEFINITIONS("-DDISABLE_PLOT2DVIEWER")
+ENDIF()
+IF (NOT SALOME_USE_GRAPHICSVIEW)
+ ADD_DEFINITIONS("-DDISABLE_GRAPHICSVIEW")
+ENDIF()
+IF(SALOME_USE_PYCONSOLE)
+ # Build with obsolete Python module's methods
+ ADD_DEFINITIONS(-DCALL_OLD_METHODS)
+ELSE()
+ ADD_DEFINITIONS("-DDISABLE_PYCONSOLE")
+ENDIF()
+IF(NOT SALOME_USE_QXGRAPHVIEWER)
+ ADD_DEFINITIONS("-DDISABLE_QXGRAPHVIEWER")
+ENDIF()
+IF(NOT SALOME_USE_SALOMEOBJECT)
+ ADD_DEFINITIONS("-DDISABLE_SALOMEOBJECT")
ENDIF()
# Detection summary:
# They all have to be INSTALL'd with the option "EXPORT ${PROJECT_NAME}TargetGroup"
SET(_${PROJECT_NAME}_exposed_targets
caf CAM CASCatch DDS Event LightApp LogWindow ObjBrowser OpenGLUtils
- QDS qtx SalomeIDLGUI SalomePrs SalomeStyle std SUITApp suit ViewerTools ViewerData
- vtkTools vtkEDFOverloads ImageComposer
+ QDS qtx SalomePrs SalomeStyle std SUITApp suit ViewerTools ViewerData
+ ImageComposer
)
# SALOME object specific targets:
# VTK specific targets:
IF(SALOME_USE_VTKVIEWER)
LIST(APPEND _${PROJECT_NAME}_exposed_targets
- VTKViewer)
+ VTKViewer vtkTools vtkEDFOverloads)
IF(SALOME_USE_SALOMEOBJECT)
LIST(APPEND _${PROJECT_NAME}_exposed_targets
SVTK)
# Python-based packages specific targets:
IF(SALOME_USE_PYCONSOLE)
LIST(APPEND _${PROJECT_NAME}_exposed_targets
- PyInterp PyConsole SalomePy SalomePyQtGUI SalomePyQtGUILight SalomePyQt)
+ PyInterp PyConsole SalomePyQtGUILight)
+ IF(SALOME_USE_PLOT2DVIEWER)
+ LIST(APPEND _${PROJECT_NAME}_exposed_targets SalomePyQt)
+ ENDIF()
+ IF(NOT SALOME_LIGHT_ONLY)
+ LIST(APPEND _${PROJECT_NAME}_exposed_targets SalomePyQtGUI)
+ ENDIF()
+ IF(SALOME_USE_VTKVIEWER)
+ LIST(APPEND _${PROJECT_NAME}_exposed_targets SalomePy)
+ ENDIF(SALOME_USE_VTKVIEWER)
ENDIF(SALOME_USE_PYCONSOLE)
# CORBA specific targets:
IF(NOT SALOME_LIGHT_ONLY)
LIST(APPEND _${PROJECT_NAME}_exposed_targets
- SalomeSession SalomeApp SalomeGuiHelpers SalomeTreeData ToolsGUI)
+ SalomeIDLGUI SalomeSession SalomeApp SalomeGuiHelpers SalomeTreeData ToolsGUI)
ENDIF(NOT SALOME_LIGHT_ONLY)
# Add all targets to the build-tree export set
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-# - Config file for the @PROJECT_NAME@ package
-# It defines the following variables.
-# Specific to the pacakge @PROJECT_NAME@ itself:
-# @PROJECT_NAME_UC@_ROOT_DIR_EXP - the root path of the installation providing this CMake file
+# Copyright (C) 2013-2014 CEA/DEN, EDF R&D, OPEN CASCADE
#
-
-###############################################################
-# 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, or (at your option) any later version.
#
-# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+# 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.
#
-# 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.
+# 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
#
-# 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.
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-# 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
+
+# - Config file for the @PROJECT_NAME@ package
+# It defines the following variables.
+# Specific to the pacakge @PROJECT_NAME@ itself:
+# @PROJECT_NAME_UC@_ROOT_DIR_EXP - the root path of the installation providing this CMake file
#
-# See http://www.salome-platform.org/ or
-# email : webmaster.salome@opencascade.com
-###############################################################
### Initialisation performed by CONFIGURE_PACKAGE_CONFIG_FILE:
@PACKAGE_INIT@
# Options exported by the package:
SET(SALOME_GUI_BUILD_DOC @SALOME_BUILD_DOC@)
SET(SALOME_GUI_BUILD_TESTS @SALOME_BUILD_TESTS@)
-SET(SALOME_LIGHT_ONLY @SALOME_LIGHT_ONLY@)
+SET(SALOME_GUI_LIGHT_ONLY @SALOME_LIGHT_ONLY@)
# Advanced options
-SET(SALOME_USE_OCCVIEWER @SALOME_USE_OCCVIEWER@)
-SET(SALOME_USE_GLVIEWER @SALOME_USE_GLVIEWER@)
-SET(SALOME_USE_VTKVIEWER @SALOME_USE_VTKVIEWER@)
-SET(SALOME_USE_PLOT2DVIEWER @SALOME_USE_PLOT2DVIEWER@)
+SET(SALOME_USE_OCCVIEWER @SALOME_USE_OCCVIEWER@)
+SET(SALOME_USE_GLVIEWER @SALOME_USE_GLVIEWER@)
+SET(SALOME_USE_VTKVIEWER @SALOME_USE_VTKVIEWER@)
+SET(SALOME_USE_PLOT2DVIEWER @SALOME_USE_PLOT2DVIEWER@)
+SET(SALOME_USE_GRAPHICSVIEW @SALOME_USE_GRAPHICSVIEW@)
+SET(SALOME_USE_QXGRAPHVIEWER @SALOME_USE_QXGRAPHVIEWER@)
+SET(SALOME_USE_PYCONSOLE @SALOME_USE_PYCONSOLE@)
+SET(SALOME_USE_SALOMEOBJECT @SALOME_USE_SALOMEOBJECT@)
SET(SALOME_USE_SINGLE_DESKTOP @SALOME_USE_SINGLE_DESKTOP@)
+SET(SALOME_GUI_USE_OBSERVERS @SALOME_GUI_USE_OBSERVERS@)
+
+IF(SALOME_GUI_LIGHT_ONLY)
+ LIST(APPEND GUI_DEFINITIONS "-DGUI_DISABLE_CORBA")
+ENDIF()
IF(SALOME_USE_SINGLE_DESKTOP)
LIST(APPEND GUI_DEFINITIONS "-DSINGLE_DESKTOP")
ENDIF()
-SET(SALOME_GUI_USE_OBSERVERS @SALOME_GUI_USE_OBSERVERS@)
IF(SALOME_GUI_USE_OBSERVERS)
LIST(APPEND GUI_DEFINITIONS "-DWITH_SALOMEDS_OBSERVER")
ENDIF()
+IF(NOT SALOME_USE_OCCVIEWER)
+ LIST(APPEND GUI_DEFINITIONS "-DDISABLE_OCCVIEWER")
+ENDIF()
+IF(NOT SALOME_USE_GLVIEWER)
+ LIST(APPEND GUI_DEFINITIONS "-DDISABLE_GLVIEWER")
+ENDIF()
+
+IF(NOT SALOME_USE_VTKVIEWER)
+ LIST(APPEND GUI_DEFINITIONS "-DDISABLE_VTKVIEWER")
+ENDIF()
+IF(NOT SALOME_USE_PLOT2DVIEWER)
+ LIST(APPEND GUI_DEFINITIONS "-DDISABLE_PLOT2DVIEWER")
+ENDIF()
+IF (NOT SALOME_USE_GRAPHICSVIEW)
+ LIST(APPEND GUI_DEFINITIONS "-DDISABLE_GRAPHICSVIEW")
+ENDIF()
+IF(NOT SALOME_USE_PYCONSOLE)
+ LIST(APPEND GUI_DEFINITIONS "-DDISABLE_PYCONSOLE")
+ENDIF()
+IF(NOT SALOME_USE_QXGRAPHVIEWER)
+ LIST(APPEND GUI_DEFINITIONS "-DDISABLE_QXGRAPHVIEWER")
+ENDIF()
+IF(NOT SALOME_USE_SALOMEOBJECT)
+ LIST(APPEND GUI_DEFINITIONS "-DDISABLE_SALOMEOBJECT")
+ENDIF()
# Level 1 prerequisites:
SET_AND_CHECK(KERNEL_ROOT_DIR_EXP "@PACKAGE_KERNEL_ROOT_DIR@")
-# Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
#
# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
-# version 2.1 of the License.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# Copyright (C) 2012-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2012-2014 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.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014 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.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# Copyright (C) 2013-2014 CEA/DEN, EDF R&D, OPEN CASCADE
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
# - Find PyQt4 installation
# Sets the following variables:
# PYQT_PYUIC_EXECUTABLE - path to the pyuic executable
# Headers are located by looking for the header file
# qobject.sip
-#########################################################################
-# Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
IF(NOT PyQt4_FIND_QUIETLY)
MESSAGE(STATUS "Looking for PyQt4 ...")
ENDIF()
-# - Find Qwt installation
-# Sets the following variables:
-# QWT_LIBRARY - path to the Qwt library
-# QWT_INCLUDE_DIR - path to the Qwt headers
-#
-# The header qwt_plot.h is looked for.
-# The libraries
-# qwt-qt4, qwt
-# are looked for.
-#
-
-#########################################################################
-# Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+# Copyright (C) 2013-2014 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.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+# - Find Qwt installation
+# Sets the following variables:
+# QWT_LIBRARY - path to the Qwt library
+# QWT_INCLUDE_DIR - path to the Qwt headers
+#
+# The header qwt_plot.h is looked for.
+# The libraries
+# qwt-qt4, qwt
+# are looked for.
+#
+
IF(NOT Qwt_FIND_QUIETLY)
MESSAGE(STATUS "Looking for Qwt ...")
ENDIF()
-# - Find SIP
-# Sets the following variables:
-# SIP_EXECUTABLE - path to the SIP executable
-# SIP_INCLUDE_DIR - path to the SIP headers
-# SIP_PYTHONPATH - path to the SIP Python packages
-#
-# The header sip.h is looked for.
-# The binary 'sip' is looked for.
-#
-
-#########################################################################
-# Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+# Copyright (C) 2013-2014 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.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+# - Find SIP
+# Sets the following variables:
+# SIP_EXECUTABLE - path to the SIP executable
+# SIP_INCLUDE_DIR - path to the SIP headers
+# SIP_PYTHONPATH - path to the SIP Python packages
+#
+# The header sip.h is looked for.
+# The binary 'sip' is looked for.
+#
+
IF(NOT SIP_FIND_QUIETLY)
MESSAGE(STATUS "Looking for SIP ...")
ENDIF()
-# Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014 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.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-#
# Author: Adrien Bruneton
#
FOREACH(_res ${SalomeGUI_EXTRA_ENV})
SALOME_ACCUMULATE_ENVIRONMENT(${_res} "${SalomeGUI_EXTRA_ENV_${_res}}")
-ENDFOREACH()
\ No newline at end of file
+ENDFOREACH()
+
+#----------------------------------------------------------------------------
+# FULL_GUI is a macro useful for determining whether a GUI module
+# builded in full mode
+#----------------------------------------------------------------------------
+#########################################################################
+# FULL_GUI()
+#
+# USAGE: FULL_GUI(with_corba)
+#
+# ARGUMENTS:
+# with_corba [input] TRUE or FALSE - use CORBA for building module or no.
+#
+MACRO(FULL_GUI with_corba)
+ SET(_options)
+ IF(${with_corba} AND ${SALOME_GUI_LIGHT_ONLY})
+ SET(_corba_message "We absolutely need a Salome GUI module with CORBA.\nPlease set option SALOME_LIGHT_ONLY to OFF when building GUI module.")
+ ENDIF()
+
+ LIST(APPEND _options SALOME_USE_OCCVIEWER SALOME_USE_GLVIEWER SALOME_USE_VTKVIEWER
+ SALOME_USE_PLOT2DVIEWER SALOME_USE_GRAPHICSVIEW SALOME_USE_QXGRAPHVIEWER
+ SALOME_USE_SALOMEOBJECT SALOME_USE_PYCONSOLE)
+
+ SET(_message)
+ FOREACH(_option ${_options})
+ IF(NOT ${_option})
+ LIST(APPEND _message ${_option})
+ ENDIF()
+ ENDFOREACH()
+ IF(_message)
+ SET(_message "We absolutely need a Salome GUI module in full mode.\nThe following options should be set to ON when building GUI module:\n${_message}\n")
+ IF(_corba_message)
+ MESSAGE(FATAL_ERROR "${_corba_message}\n${_message}")
+ ELSE()
+ MESSAGE(FATAL_ERROR "${_message}")
+ ENDIF()
+ ELSEIF(_corba_message)
+ MESSAGE(FATAL_ERROR "${_corba_message}")
+ ENDIF()
+
+ENDMACRO(FULL_GUI)
-# Copyright (C) 2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2013-2014 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.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# Copyright (C) 2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2013-2014 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.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# Copyright (C) 2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2013-2014 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.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# Copyright (C) 2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2013-2014 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.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# Copyright (C) 2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2013-2014 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.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# Copyright (C) 2012-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2012-2014 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.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014 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.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# Copyright (C) 2012-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2012-2014 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.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014 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.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014 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.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014 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.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014 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.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014 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.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014 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.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014 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.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014 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.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# Copyright (C) 2012-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2012-2014 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.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
#
# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
-# version 2.1 of the License.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
-dnl Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+dnl Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
dnl
dnl Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
dnl This library is free software; you can redistribute it and/or
dnl modify it under the terms of the GNU Lesser General Public
dnl License as published by the Free Software Foundation; either
-dnl version 2.1 of the License.
+dnl version 2.1 of the License, or (at your option) any later version.
dnl
dnl This library is distributed in the hope that it will be useful,
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
-dnl Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+dnl Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
dnl
dnl This library is free software; you can redistribute it and/or
dnl modify it under the terms of the GNU Lesser General Public
dnl License as published by the Free Software Foundation; either
-dnl version 2.1 of the License.
+dnl version 2.1 of the License, or (at your option) any later version.
dnl
dnl This library is distributed in the hope that it will be useful,
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
-dnl Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+dnl Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
dnl
dnl Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
dnl This library is free software; you can redistribute it and/or
dnl modify it under the terms of the GNU Lesser General Public
dnl License as published by the Free Software Foundation; either
-dnl version 2.1 of the License.
+dnl version 2.1 of the License, or (at your option) any later version.
dnl
dnl This library is distributed in the hope that it will be useful,
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
-dnl Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+dnl Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
dnl
dnl Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
dnl This library is free software; you can redistribute it and/or
dnl modify it under the terms of the GNU Lesser General Public
dnl License as published by the Free Software Foundation; either
-dnl version 2.1 of the License.
+dnl version 2.1 of the License, or (at your option) any later version.
dnl
dnl This library is distributed in the hope that it will be useful,
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
-dnl Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+dnl Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
dnl
dnl Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
dnl This library is free software; you can redistribute it and/or
dnl modify it under the terms of the GNU Lesser General Public
dnl License as published by the Free Software Foundation; either
-dnl version 2.1 of the License.
+dnl version 2.1 of the License, or (at your option) any later version.
dnl
dnl This library is distributed in the hope that it will be useful,
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
-dnl Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+dnl Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
dnl
dnl Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
dnl This library is free software; you can redistribute it and/or
dnl modify it under the terms of the GNU Lesser General Public
dnl License as published by the Free Software Foundation; either
-dnl version 2.1 of the License.
+dnl version 2.1 of the License, or (at your option) any later version.
dnl
dnl This library is distributed in the hope that it will be useful,
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
-dnl Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+dnl Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
dnl
dnl Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
dnl This library is free software; you can redistribute it and/or
dnl modify it under the terms of the GNU Lesser General Public
dnl License as published by the Free Software Foundation; either
-dnl version 2.1 of the License.
+dnl version 2.1 of the License, or (at your option) any later version.
dnl
dnl This library is distributed in the hope that it will be useful,
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
-dnl Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+dnl Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
dnl
dnl Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
dnl This library is free software; you can redistribute it and/or
dnl modify it under the terms of the GNU Lesser General Public
dnl License as published by the Free Software Foundation; either
-dnl version 2.1 of the License.
+dnl version 2.1 of the License, or (at your option) any later version.
dnl
dnl This library is distributed in the hope that it will be useful,
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
-# Copyright (C) 2012-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2012-2014 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.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
#! /usr/bin/env python
# -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014 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.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
#!/bin/csh -f
-# Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
#
# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
-# version 2.1 of the License.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
#!/bin/bash -f
-# Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
#
# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
-# version 2.1 of the License.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
#
# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
-# version 2.1 of the License.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
#
# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
-# version 2.1 of the License.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
#
# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
-# version 2.1 of the License.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
#
# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
-# version 2.1 of the License.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
- <b>Set to Origin</b> button restores the default rotation point
coordinates.
-- <b>Select Point from View</b> button allows to select the rotation
- point in the 3D Viewer.
+- <b>Gravity Center of Select Object</b> button allows to choose Point, Edge, Face or Solid in drop-down menu.
+ As soon as corresponding object is selected in the viewer, its gravity center will be used as center of the rotation point.
<hr>
to retrieve the salome object from selection. It can be a GEOM, SMESH, or any
other module object.
- If it is a mesh, then it is possible to call GetMEDMesh() on the object.
+ If it is a mesh, then it is possible to call methods of the SMESH::SMESH_Mesh interface
+ on the object, for example GetShapeToMesh().
If it is not a mesh, this call will raise an exception.
- So it is possible to write the mesh retrieval in the following way:
+ So it is possible to write the code retrieving the shape a mesh is built on in the following way:
\code
mesh = None
try:
- mesh = salomeObj.GetMEDMesh()
+ shape = salomeObj.GetShapeToMesh()
except:
print "The selection is not a mesh"
\endcode
By default the rotation point is located in the Center of the bounding
box of an object.
-\image html set_rotation_point_dialog2.png
+\image html set_rotation_point_dialog3.png
Unchecking <b>Use Bounding Box Center</b> check-box allows you to
define the coordinates of the rotation point manually.
- <b>Set to Origin</b> button restores the default rotation point
coordinates.
-- <b>Select Point from View</b> button allows to select the rotation
- point in the 3D Viewer.
+- <b>Gravity Center of Select Object</b> button allows to choose Point, Edge, Face or Volume in drop-down menu.
+ As soon as corresponding object is selected in the viewer, its gravity center will be used as center of the rotation point.
<hr>
<ul>
$navpath
<li class="footer">
- Copyright © 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE<br>
+ Copyright © 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE<br>
Copyright © 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS<br>
</li>
</ul>
-# Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
#
# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
-# version 2.1 of the License.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
#
# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
-# version 2.1 of the License.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
<ul>
$navpath
<li class="footer">
- Copyright © 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE<br>
+ Copyright © 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE<br>
Copyright © 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS<br>
</li>
</ul>
-# Copyright (C) 2012-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2012-2014 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.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-# Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
#
# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
-# version 2.1 of the License.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-# Copyright (C) 2012-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2012-2014 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.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
#include "CAM_Application.h"
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-# Copyright (C) 2012-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2012-2014 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.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-# Copyright (C) 2012-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2012-2014 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.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# Copyright (C) 2012-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2012-2014 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.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
##
IF(SALOME_USE_PYCONSOLE)
SET(SUBDIRS_PYCONSOLE PyInterp PyConsole)
- SET(SUBDIRS_PYTHON SALOME_SWIG SALOME_PY SALOME_PYQT)
+ SET(SUBDIRS_PYTHON SALOME_PYQT)
+ IF(SALOME_USE_VTKVIEWER)
+ LIST(APPEND SUBDIRS_PYTHON SALOME_PY)
+ ENDIF()
+ IF(SALOME_USE_SALOMEOBJECT)
+ LIST(APPEND SUBDIRS_PYTHON SALOME_SWIG)
+ ENDIF()
ENDIF(SALOME_USE_PYCONSOLE)
##
# Full (CORBA) SALOME packages
##
IF(NOT SALOME_LIGHT_ONLY)
- SET(SUBDIRS_CORBA TOOLSGUI Session SalomeApp GuiHelpers TreeData)
+ SET(SUBDIRS_CORBA TOOLSGUI SalomeApp Session GuiHelpers TreeData)
ENDIF(NOT SALOME_LIGHT_ONLY)
SET(SUBDIRS
-# Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
#
# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
-# version 2.1 of the License.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-# Copyright (C) 2012-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2012-2014 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.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-# Copyright (C) 2012-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2012-2014 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.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-# Copyright (C) 2012-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2012-2014 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.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
#
# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
-# version 2.1 of the License.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# -*- coding: iso-8859-1 -*-
-# Copyright (C) 2010-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2010-2014 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.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014 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.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# -*- coding: iso-8859-1 -*-
-# Copyright (C) 2010-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2010-2014 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.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
#
# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
-# version 2.1 of the License.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# Copyright (C) 2012-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2012-2014 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.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2013-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2013-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2013-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2013-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2013-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2013-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2013-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2013-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2013-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2013-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2013-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2013-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2013-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2013-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2013-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2013-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2013-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2013-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-# Copyright (C) 2012-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2012-2014 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.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2011-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2011-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
{
theMap.clear();
theMap.insert( SalomeApp_Application::WT_ObjectBrowser, Qt::LeftDockWidgetArea );
+#ifndef DISABLE_PYCONSOLE
theMap.insert( SalomeApp_Application::WT_PyConsole, Qt::BottomDockWidgetArea );
+#endif
}
// Module's engine IOR
-// Copyright (C) 2011-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2011-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-# Copyright (C) 2012-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2012-2014 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.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2013-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2013-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2013-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2013-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2013-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2013-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2013-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2013-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2013-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2013-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2013-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2013-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2013-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2013-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-# Copyright (C) 2012-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2012-2014 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.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# additional preprocessor / compiler flags
ADD_DEFINITIONS(${CAS_DEFINITIONS} ${QT_DEFINITIONS} ${HDF5_DEFINITIONS})
-IF(NOT WIN32)
- ADD_DEFINITIONS("-Wno-deprecated")
-ENDIF()
-IF(NOT SALOME_USE_SALOMEOBJECT)
- ADD_DEFINITIONS("-DDISABLE_SALOMEOBJECT")
-ENDIF()
-IF (NOT SALOME_USE_GLVIEWER)
- ADD_DEFINITIONS("-DDISABLE_GLVIEWER")
-ENDIF()
-IF (NOT SALOME_USE_GRAPHICSVIEW)
- ADD_DEFINITIONS("-DDISABLE_GRAPHICSVIEW")
-ENDIF()
-IF(NOT SALOME_USE_OCCVIEWER)
- ADD_DEFINITIONS("-DDISABLE_OCCVIEWER")
-ENDIF()
IF(SALOME_USE_PLOT2DVIEWER)
ADD_DEFINITIONS(${QWT_DEFINITIONS})
-ELSE()
- ADD_DEFINITIONS("-DDISABLE_PLOT2DVIEWER")
-ENDIF()
-IF(NOT SALOME_USE_VTKVIEWER)
- ADD_DEFINITIONS("-DDISABLE_VTKVIEWER")
-ENDIF()
-IF(NOT SALOME_USE_QXGRAPHVIEWER)
- ADD_DEFINITIONS("-DDISABLE_QXGRAPHVIEWER")
ENDIF()
IF(SALOME_USE_PYCONSOLE)
ADD_DEFINITIONS(${PYTHON_DEFINITIONS})
-ELSE()
- ADD_DEFINITIONS("-DDISABLE_PYCONSOLE")
ENDIF()
# libraries to link to
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
#include "LightApp_Application.h"
#include "LightApp_Module.h"
#include "LightApp_DataModel.h"
+#include "LightApp_DataOwner.h"
#include "LightApp_Study.h"
#include "LightApp_Preferences.h"
#include "LightApp_PreferencesDlg.h"
// ... "Trihedron" group <<end>>
// .. "3D viewer" group <<end>>
+ QString formats;
+ int bgId;
+#ifndef DISABLE_OCCVIEWER
// .. "OCC viewer" group <<start>>
int occGroup = pref->addPreference( tr( "PREF_GROUP_OCCVIEWER" ), salomeCat );
aValuesList.clear();
anIndicesList.clear();
txtList.clear();
- QString formats = OCCViewer_Viewer::backgroundData( aValuesList, idList, txtList );
+ formats = OCCViewer_Viewer::backgroundData( aValuesList, idList, txtList );
foreach( int gid, idList ) anIndicesList << gid;
// .... -> 3D viewer background
- int bgId = pref->addPreference( tr( "PREF_3DVIEWER_BACKGROUND" ), bgGroup,
+ bgId = pref->addPreference( tr( "PREF_3DVIEWER_BACKGROUND" ), bgGroup,
LightApp_Preferences::Background, "OCCViewer", "background" );
pref->setItemProperty( "gradient_names", aValuesList, bgId );
pref->setItemProperty( "gradient_ids", anIndicesList, bgId );
pref->setItemProperty( "columns", 2, occGen );
// ... -> empty frame (for layout) <<end>>
// .. "OCC viewer" group <<end>>
+#endif
+#ifndef DISABLE_VTKVIEWER
// .. "VTK viewer" group <<start>>
int vtkGroup = pref->addPreference( tr( "PREF_GROUP_VTKVIEWER" ), salomeCat ); //viewTab
aValuesList.clear();
anIndicesList.clear();
txtList.clear();
+#ifndef DISABLE_SALOMEOBJECT
formats = SVTK_Viewer::backgroundData( aValuesList, idList, txtList );
+#endif
foreach( int gid, idList ) anIndicesList << gid;
bgId = pref->addPreference( tr( "PREF_VIEWER_BACKGROUND" ), vtkGen,
LightApp_Preferences::Background, "VTKViewer", "background" );
pref->setItemProperty( "texture_tile_enabled", (bool)txtList.contains( Qtx::TileTexture ), bgId );
pref->setItemProperty( "texture_stretch_enabled", (bool)txtList.contains( Qtx::StretchTexture ), bgId );
pref->setItemProperty( "custom_enabled", false, bgId );
+#ifndef DISABLE_SALOMEOBJECT
pref->setItemProperty( "image_formats", formats, bgId );
+#endif
// .... -> speed increment
int vtkSpeed = pref->addPreference( tr( "PREF_INCREMENTAL_SPEED" ), vtkGen,
LightApp_Preferences::IntSpin, "VTKViewer", "speed_value" );
pref->setItemProperty( "step", 0.1, transPref );
// ... -> group names sub-group <<end>>
// .. "VTK viewer" group <<end>>
+#endif
// .. "Plot2d viewer" group <<start>>
int plot2dGroup = pref->addPreference( tr( "PREF_GROUP_PLOT2DVIEWER" ), salomeCat ); //viewTab
if ( aResMgr->hasValue("windows_geometry" ,modName ) ) {
QByteArray arr;
aResMgr->value("windows_geometry", modName , arr );
- QByteArray aTargetArray = processState(arr, storeWin, storeTb, aDefaultState);
+ QByteArray aTargetArray = processState(arr, storeWin, storeTb, true, aDefaultState);
desktop()->restoreState( aTargetArray );
}
+ /*
if ( !myWinVis.contains( modName ) && aDefaultVisibility.isEmpty())
return;
dwMap = &defaultDwMap;
}
}
-
+
if(tbMap) {
QList<QToolBar*> tbList = findToolBars();
for ( QList<QToolBar*>::iterator tit = tbList.begin(); tit != tbList.end(); ++tit )
dw->setVisible( (*dwMap)[dw->objectName()] );
}
}
+ */
}
modName = activeModule()->name();
QByteArray arr = desktop()->saveState();
- resourceMgr()->setValue( "windows_geometry", modName, processState(arr, storeWin, storeTb) );
+ resourceMgr()->setValue( "windows_geometry", modName, processState(arr, storeWin, storeTb, false) );
QByteArray visArr;
if ( myWinVis.contains( modName ) )
a->setShortcut( ob->shortcutKey(SUIT_DataBrowser::UpdateShortcut) );
}
+#ifndef DISABLE_SALOMEOBJECT
if ( selMgr && ob ) {
SALOME_ListIO selected;
selMgr->selectedObjects( selected );
}
}
}
+#endif
selMgr->setSelectionCacheEnabled( cacheIsOn );
}
/*!
Internal method to parse toolbars and dockable windows state.
*/
-QByteArray LightApp_Application::processState(QByteArray& input, const bool processWin,const bool processTb, QByteArray defaultState) {
+QByteArray LightApp_Application::processState(QByteArray& input,
+ const bool processWin,
+ const bool processTb,
+ const bool isRestoring,
+ QByteArray defaultState) {
QByteArray aRes;
bool hasDefaultState = !defaultState.isEmpty();
bool isDockWinWriten = false;
- if(processWin && processTb) {
+ int nbDocWin = -1;
+ //Write date from users settings
+ if(isRestoring){
+ QDataStream tmpInputData(&input, QIODevice::ReadOnly);
+ int marker, version;
+ uchar dockmarker;
+ tmpInputData >> marker;
+ tmpInputData >> version;
+ tmpInputData >> dockmarker;
+ tmpInputData >> nbDocWin;
+ }
+ if(processWin && processTb && !isRestoring) {
aRes = input;
} else if(!processWin && !processTb ) {
if(hasDefaultState)
QDataStream* aTargetData = 0;
int aTargetIndex = -1;
- if(processWin) {
- //Write date from users settings
+ QByteArray currentArr = desktop()->saveState();
+ QDataStream anInputDataCur(¤tArr, QIODevice::ReadOnly);
+ bool useInputData = !isRestoring || (isRestoring && nbDocWin > 0);
+ if(processWin && useInputData) {
aTargetData = &anInputData;
aTargetIndex = toolBarMarkerIndex;
} else {
//Write date from default settings
if(hasDefaultState) {
aTargetData = &anInputDataDef;
- aTargetIndex = toolBarMarkerIndexDef;
+ aTargetIndex = toolBarMarkerIndexDef;
+ } else {
+ //If no default state, write current snapshot of the dockable windows
+ if(isRestoring) {
+ aTargetData = &anInputDataCur;
+ int toolBarMarkerIndexCur = getToolbarMarkerIndex(currentArr, aNames);
+ aTargetIndex = toolBarMarkerIndexCur;
+ }
}
}
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
void emptyPreferences( const QString& );
QList<QToolBar*> findToolBars();
- QByteArray processState(QByteArray& input, const bool processWin,const bool processTb, QByteArray defaultState = QByteArray());
+ QByteArray processState(QByteArray& input,
+ const bool processWin,
+ const bool processTb,
+ const bool isRestoring,
+ QByteArray defaultState = QByteArray());
protected:
typedef QPointer<QWidget> WinPtr;
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
#include <QMenuBar>
#include <QStatusBar>
-#include <PyConsole_Console.h>
-
#include <STD_Application.h>
#include <SUIT_Session.h>
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2013-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2013-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
#include <QVariant>
#include <QString>
#include <QStringList>
+#include <QAction>
#include <iostream>
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
if ( !myViewer )
return;
+ if ( !myViewer->isSelectionEnabled() )
+ return;
+
AIS_ListOfInteractive aSelList;
myViewer->getSelectedObjects( aSelList );
for ( AIS_ListIteratorOfListOfInteractive anIt( aSelList ); anIt.More(); anIt.Next() )
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
#include "LightApp_Application.h"
#include "SUIT_SelectionMgr.h"
-#include <SPlot2d_ViewModel.h>
-
-#include <SALOME_ListIO.hxx>
+#ifndef DISABLE_SALOMEOBJECT
+ #include <SALOME_ListIO.hxx>
+ #ifndef DISABLE_PLOT2DVIEWER
+ #include <SPlot2d_ViewModel.h>
+ #endif
+#endif
/*!
Constructor
*/
void LightApp_Plot2dSelector::getSelection( SUIT_DataOwnerPtrList& theList ) const
{
- if( !myCurEntry.isNull() )
+ if( !myCurEntry.isNull() ) {
+#ifndef DISABLE_SALOMEOBJECT
theList.append( new LightApp_DataOwner( new SALOME_InteractiveObject(qPrintable(myCurEntry),"","") ) );
+#else
+ theList.append( new LightApp_DataOwner( myCurEntry ) );
+#endif
+ }
}
/*!Sets selection.*/
void LightApp_Plot2dSelector::setSelection( const SUIT_DataOwnerPtrList& theList )
{
+#ifndef DISABLE_SALOMEOBJECT
SALOME_ListIO anIOList;
for ( SUIT_DataOwnerPtrList::const_iterator it = theList.begin(); it != theList.end(); ++it ) {
const LightApp_DataOwner* owner = dynamic_cast<const LightApp_DataOwner*>( (*it).operator->() );
if ( owner ) {
if( !owner->IO().IsNull() ) {
- anIOList.Append(owner->IO());
- } else if ( !owner->entry().isEmpty() ) {
- anIOList.Append( new SALOME_InteractiveObject(qPrintable(owner->entry()),"","") );
+ anIOList.Append(owner->IO());
+ }
+ else if ( !owner->entry().isEmpty() ) {
+ anIOList.Append( new SALOME_InteractiveObject(qPrintable(owner->entry()),"","") );
}
}
}
if(v)
v->setObjectsSelected(anIOList);
+#endif
}
/*!On selection changed.*/
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
theList = selList;
}
+/*!
+ Append selected objects.
+*/
+void LightApp_SelectionMgr::setSelectedObjects( const QStringList& lst, const bool append )
+{
+ SUIT_DataOwnerPtrList owners;
+ foreach( const QString& aValue, lst ) {
+ if ( !aValue.isNull() )
+ owners.append( new LightApp_DataOwner( aValue ) );
+ }
+
+ setSelected( owners, append );
+}
+
#endif
/*!
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
void selectedSubOwners( MapEntryOfMapOfInteger& theMap );
#else
void selectedObjects( QStringList&, const QString& = QString(), const bool = true ) const;
+ void setSelectedObjects( const QStringList&, const bool = false );
#endif
void clearSelectionCache();
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
entries.append( entry );
}
- // be sure to use real obejct entries
+ // be sure to use real object entries
QStringList objEntries;
QStringList::const_iterator it = entries.begin(), last = entries.end();
for ( ; it!=last; ++it )
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
LightApp_VTKSelector
::getSelection( SUIT_DataOwnerPtrList& aList ) const
{
- if(myViewer){
+ if( myViewer ) {
+ if( SVTK_Viewer* aSViewer = dynamic_cast<SVTK_Viewer*>(myViewer) ) {
+ if( !aSViewer->isSelectionEnabled() )
+ return;
+ }
if(SUIT_ViewManager* aViewManager = myViewer->getViewManager()){
if(SVTK_ViewManager* aViewMgr = dynamic_cast<SVTK_ViewManager*>(aViewManager)){
if(SVTK_ViewWindow* aView = dynamic_cast<SVTK_ViewWindow*>(aViewMgr->getActiveView())){
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-# Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
#
# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
-# version 2.1 of the License.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
<!--
- Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+ Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
- version 2.1 of the License.
+ version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
<!-- Additional help resources -->
<parameter name="Developer resources" value="${DOCUMENTATION_ROOT_DIR}/index.html" />
</section>
+ <section name="windows_geometry">
+ <parameter value="#00 #00 #00 #FF #00 #00 #00 #00 #FD #00 #00 #00 #02 #00 #00 #00 #00 #00 #00 #01 #00 #00 #00 #02 #88 #FC #02 #00 #00 #00 #01 #FC #00 #00 #00 #37 #00 #00 #02 #88 #00 #00 #00 #97 #01 #00 #00 #14 #FA #00 #00 #00 #00 #01 #00 #00 #00 #02 #FB #00 #00 #00 #10 #00 #77 #00 #69 #00 #6E #00 #64 #00 #6F #00 #77 #00 #5F #00 #30 #01 #00 #00 #00 #00 #FF #FF #FF #FF #00 #00 #00 #46 #00 #FF #FF #FF #FB #00 #00 #00 #10 #00 #77 #00 #69 #00 #6E #00 #64 #00 #6F #00 #77 #00 #5F #00 #33 #01 #00 #00 #00 #00 #00 #00 #01 #00 #00 #00 #00 #C0 #00 #FF #FF #FF #00 #00 #00 #03 #00 #00 #05 #40 #00 #00 #00 #53 #FC #01 #00 #00 #00 #01 #FB #00 #00 #00 #10 #00 #77 #00 #69 #00 #6E #00 #64 #00 #6F #00 #77 #00 #5F #00 #31 #01 #00 #00 #00 #00 #00 #00 #05 #40 #00 #00 #00 #46 #00 #FF #FF #FF #00 #00 #04 #38 #00 #00 #02 #88 #00 #00 #00 #04 #00 #00 #00 #04 #00 #00 #00 #08 #00 #00 #00 #08 #FC #00 #00 #00 #01 #00 #00 #00 #02 #00 #00 #00 #02 #00 #00 #00 #10 #00 #53 #00 #74 #00 #61 #00 #6E #00 #64 #00 #61 #00 #72 #00 #64 #01 #00 #00 #00 #00 #FF #FF #FF #FF #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #0E #00 #4D #00 #6F #00 #64 #00 #75 #00 #6C #00 #65 #00 #73 #01 #00 #00 #00 #CE #FF #FF #FF #FF #00 #00 #00 #00 #00 #00 #00 #00" name=""/>
+ </section>
+ <section name="windows_visibility">
+ <parameter value="#00 #00 #00 #00 #02 #00 #00 #00 #0E #00 #4D #00 #6F #00 #64 #00 #75 #00 #6C #00 #65 #00 #73 #01 #00 #00 #00 #10 #00 #53 #00 #74 #00 #61 #00 #6E #00 #64 #00 #61 #00 #72 #00 #64 #01 #01 #00 #00 #00 #03 #00 #00 #00 #10 #00 #77 #00 #69 #00 #6E #00 #64 #00 #6F #00 #77 #00 #5F #00 #30 #01 #00 #00 #00 #10 #00 #77 #00 #69 #00 #6E #00 #64 #00 #6F #00 #77 #00 #5F #00 #31 #01 #00 #00 #00 #10 #00 #77 #00 #69 #00 #6E #00 #64 #00 #6F #00 #77 #00 #5F #00 #33 #01" name=""/>
+ </section>
</document>
</message>
<message>
<source>ABOUT_COPYRIGHT</source>
- <translation>Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+ <translation>Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6,
CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS</translation>
</message>
<message>
<source>ABOUT_COPYRIGHT</source>
- <translation>Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+ <translation>Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6,
CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS</translation>
</message>
<message>
<source>ABOUT_COPYRIGHT</source>
- <translation>Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+ <translation>Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6,
CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS</translation>
-# Copyright (C) 2012-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2012-2014 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.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-# Copyright (C) 2012-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2012-2014 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.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-# Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
#
# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
-# version 2.1 of the License.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# libraries to link to
SET(_link_LIBRARIES
- ${OPENGL_LIBRARIES} ${QT_LIBRARIES} ${CAS_KERNEL} ${CAS_VIEWER}
+ ${OPENGL_LIBRARIES} ${QT_LIBRARIES} ${CAS_KERNEL} ${CAS_VIEWER} ${CAS_TKGeomAlgo}
+ ${CAS_TKTopAlgo} ${CAS_TKG2d}
CASCatch qtx suit OpenGLUtils ViewerTools ViewerData
)
OCCViewer_ViewPort3d.h
OCCViewer_ViewSketcher.h
OCCViewer_ViewWindow.h
+ OCCViewer_ViewportInputFilter.h
+ OCCViewer_ClipPlaneInteractor.h
)
# header files / no moc processing
OCCViewer_ViewPort3d.cxx
OCCViewer_ViewSketcher.cxx
OCCViewer_ViewWindow.cxx
+ OCCViewer_ViewportInputFilter.cxx
+ OCCViewer_ClipPlaneInteractor.cxx
)
# sources / to compile
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
//
#include "OCCViewer_ClipPlane.h"
+#include <gp_Dir.hxx>
+#include <gp_Ax3.hxx>
+#include <Precision.hxx>
-#include <gp_Pln.hxx>
+namespace
+{
+ /*!
+ Cross product of two 3-vectors. Result vector in result[3].
+ */
+ void Cross(const double first[3], const double second[3], double result[3])
+ {
+ result[0] = first[1]*second[2] - first[2]*second[1];
+ result[1] = first[2]*second[0] - first[0]*second[2];
+ result[2] = first[0]*second[1] - first[1]*second[0];
+ }
+};
-/*!
- Constructor of class OrientedPlane
- */
-OrientedPlane::OrientedPlane():
- Orientation (0),
- Distance (0.5),
- Rotation1 (0),
- Rotation2 (0)
+OCCViewer_ClipPlane::OCCViewer_ClipPlane()
+: X( 0.0 ),
+ Y( 0.0 ),
+ Z( 0.0 ),
+ Mode( Absolute ),
+ IsOn( true )
{
+ OrientationType = AbsoluteCustom;
+ AbsoluteOrientation.Dx = 0.0;
+ AbsoluteOrientation.Dy = 0.0;
+ AbsoluteOrientation.Dz = 1.0;
+ AbsoluteOrientation.IsInvert = false;
}
/*!
- Operator of another OrientedPlane assignment.
- @param other the OrientedPlane to assign.
- @return the assigned OrientedPlane.
+ Operator of another OCCViewer_ClipPlane assignment.
+ @param theOther the OCCViewer_ClipPlane to assign.
+ @return the assigned OCCViewer_ClipPlane.
*/
-OrientedPlane& OrientedPlane::operator = ( const OrientedPlane& other )
+OCCViewer_ClipPlane& OCCViewer_ClipPlane::operator = ( const OCCViewer_ClipPlane& theOther )
{
- Orientation = other.Orientation;
- Distance = other.Distance;
- Rotation1 = other.Rotation1;
- Rotation2 = other.Rotation2;
+ X = theOther.X;
+ Y = theOther.Y;
+ Z = theOther.Z;
+ IsOn = theOther.IsOn;
+ Mode = theOther.Mode;
+
+ OrientationType = theOther.OrientationType;
+
+ switch ( Mode )
+ {
+ case Absolute :
+ AbsoluteOrientation.IsInvert = theOther.AbsoluteOrientation.IsInvert;
+ AbsoluteOrientation.Dx = theOther.AbsoluteOrientation.Dx;
+ AbsoluteOrientation.Dy = theOther.AbsoluteOrientation.Dy;
+ AbsoluteOrientation.Dz = theOther.AbsoluteOrientation.Dz;
+ break;
+
+ case Relative :
+ RelativeOrientation.Rotation1 = theOther.RelativeOrientation.Rotation1;
+ RelativeOrientation.Rotation2 = theOther.RelativeOrientation.Rotation2;
+ break;
+ }
+
return *this;
}
-OCCViewer_ClipPlane::OCCViewer_ClipPlane() :
- RelativeMode(),
- X (0.0), Y (0.0), Z (0.0),
- Dx(1.0), Dy(1.0), Dz(1.0),
- Orientation (0),
- IsInvert (false),
- PlaneMode (Absolute),
- IsOn(true)
+/*!
+ Converts defined orientation to direction.
+ @param theDx [out] the direction x component.
+ @param theDy [out] the direction y component.
+ @param theDz [out] the direction y component.
+*/
+void OCCViewer_ClipPlane::OrientationToXYZ( double &theDx, double &theDy, double &theDz ) const
{
+ // Absolute definition of the clipping plane
+ if ( Mode == Absolute )
+ {
+ switch ( OrientationType )
+ {
+ case AbsoluteXY :
+ theDx = 0.0;
+ theDy = 0.0;
+ theDz = AbsoluteOrientation.IsInvert ? 1.0 : -1.0;
+ break;
+
+ case AbsoluteYZ :
+ theDx = AbsoluteOrientation.IsInvert ? 1.0 : -1.0;
+ theDy = 0.0;
+ theDz = 0.0;
+ break;
+
+ case AbsoluteZX :
+ theDx = 0.0;
+ theDy = AbsoluteOrientation.IsInvert ? 1.0 : -1.0;
+ theDz = 0.0;
+ break;
+
+ case AbsoluteCustom :
+ theDx = AbsoluteOrientation.Dx;
+ theDy = AbsoluteOrientation.Dy;
+ theDz = AbsoluteOrientation.Dz;
+ break;
+ }
+
+ return;
+ }
+
+ // Relative definition of the clipping plane
+ RelativeToDXYZ( OrientationType,
+ RelativeOrientation.Rotation1,
+ RelativeOrientation.Rotation2,
+ theDx, theDy, theDz );
}
/*!
- Operator of another OCCViewer_ClipPlane assignment.
- @param other the OCCViewer_ClipPlane to assign.
- @return the assigned OCCViewer_ClipPlane.
+ Converts normal direction to relative definition.
+ @param theDx [in] the direction x component.
+ @param theDy [in] the direction y component.
+ @param theDz [in] the direction y component.
+ @param theRelativeType [in] the relative orientation type.
+ @param theRotation1 [out] the angle of rotation around first axis.
+ @param theRotation2 [out] the angle of rotation around second axis.
*/
-OCCViewer_ClipPlane& OCCViewer_ClipPlane::operator = ( const OCCViewer_ClipPlane& other )
+void OCCViewer_ClipPlane::DXYZToRelative( const double theDx,
+ const double theDy,
+ const double theDz,
+ const int theOrientationType,
+ double& theRotation1,
+ double& theRotation2 )
{
- RelativeMode = other.RelativeMode;
- X = other.X;
- Y = other.Y;
- Z = other.Z;
- Dx = other.Dx;
- Dy = other.Dy;
- Dz = other.Dz;
- Orientation = other.Orientation;
- IsInvert = other.IsInvert;
- PlaneMode = other.PlaneMode;
- IsOn = other.IsOn;
- return *this;
+ gp_Dir aPlaneN( theDx, theDy, theDz );
+
+ const gp_Dir& aDX = gp::DX();
+ const gp_Dir& aDY = gp::DY();
+ const gp_Dir& aDZ = gp::DZ();
+ double anAng1 = 0.0;
+ double anAng2 = 0.0;
+ switch ( theOrientationType )
+ {
+ case RelativeXY :
+ {
+ if ( aDY.IsParallel( aPlaneN, Precision::Angular() ) )
+ {
+ anAng1 = 0.0;
+ anAng2 = 0.0;
+ break;
+ }
+
+ if ( aDX.IsParallel( aPlaneN, Precision::Angular() ) )
+ {
+ anAng1 = 0.0;
+ anAng2 = 0.0;
+ break;
+ }
+
+ gp_Dir aDir1 = aPlaneN ^ aDX;
+ gp_Dir aDir2 = aDY ^ aPlaneN;
+ gp_Ax3 aRightHand( gp::Origin(), aPlaneN, aDY ^ aPlaneN );
+
+ if ( aDir1 * aRightHand.YDirection() < 0.0 )
+ {
+ aDir1.Reverse();
+ }
+ if ( aDir2 * aRightHand.XDirection() < 0.0 )
+ {
+ aDir2.Reverse();
+ }
+
+ anAng1 = aDY.AngleWithRef( aDir1, aDX );
+ anAng2 = aDX.AngleWithRef( aDir2, -aDY );
+ }
+ break;
+
+ case RelativeYZ :
+ {
+ if ( aDZ.IsParallel( aPlaneN, Precision::Angular() ) )
+ {
+ anAng1 = 0.0;
+ anAng2 = 0.0;
+ break;
+ }
+
+ if ( aDY.IsParallel( aPlaneN, Precision::Angular() ) )
+ {
+ anAng1 = 0.0;
+ anAng2 = 0.0;
+ break;
+ }
+
+ gp_Dir aDir1 = aPlaneN ^ aDY;
+ gp_Dir aDir2 = aDZ ^ aPlaneN;
+ gp_Ax3 aRightHand( gp::Origin(), aPlaneN, aDZ ^ aPlaneN );
+
+ if ( aDir1 * aRightHand.YDirection() < 0.0 )
+ {
+ aDir1.Reverse();
+ }
+ if ( aDir2 * aRightHand.XDirection() < 0.0 )
+ {
+ aDir2.Reverse();
+ }
+
+ anAng1 = aDZ.AngleWithRef( aDir1, aDY );
+ anAng2 = aDY.AngleWithRef( aDir2, -aDZ );
+ }
+ break;
+
+ case RelativeZX :
+ {
+ if ( aDX.IsParallel( aPlaneN, Precision::Angular() ) )
+ {
+ anAng1 = 0.0;
+ anAng2 = 0.0;
+ break;
+ }
+
+ if ( aDZ.IsParallel( aPlaneN, Precision::Angular() ) )
+ {
+ anAng1 = 0.0;
+ anAng2 = 0.0;
+ break;
+ }
+
+ gp_Dir aDir1 = aPlaneN ^ aDZ;
+ gp_Dir aDir2 = aDX ^ aPlaneN;
+ gp_Ax3 aRightHand( gp::Origin(), aPlaneN, aDX ^ aPlaneN );
+
+ if ( aDir1 * aRightHand.YDirection() < 0.0 )
+ {
+ aDir1.Reverse();
+ }
+ if ( aDir2 * aRightHand.XDirection() < 0.0 )
+ {
+ aDir2.Reverse();
+ }
+
+ anAng1 = aDX.AngleWithRef( aDir1, aDZ );
+ anAng2 = aDZ.AngleWithRef( aDir2, -aDX );
+ }
+ break;
+ }
+
+ theRotation1 = anAng1 * ( 180.0 / M_PI );
+ theRotation2 = anAng2 * ( 180.0 / M_PI );
+}
+
+/*!
+ Converts normal direction to relative definition.
+ @param theDx [in] the direction x component.
+ @param theDy [in] the direction y component.
+ @param theDz [in] the direction y component.
+ @param theRelativeType [in] the relative orientation type.
+ @param theRotation1 [out] the angle of rotation around first axis.
+ @param theRotation2 [out] the angle of rotation around second axis.
+*/
+void OCCViewer_ClipPlane::RelativeToDXYZ( const int theOrientationType,
+ const double theRotation1,
+ const double theRotation2,
+ double& theDx,
+ double& theDy,
+ double& theDz )
+{
+ double aNormal[3];
+ double aDir[2][3] = { { 0.0, 0.0, 0.0 }, { 0.0, 0.0, 0.0 } };
+
+ static double aCoeff = M_PI / 180.0;
+
+ double anU[2] = { cos( aCoeff * theRotation1 ), cos( aCoeff * theRotation2 ) };
+ double aV[2] = { sqrt( 1.0 - anU[0] * anU[0] ), sqrt( 1.0 - anU[1] * anU[1] ) };
+
+ aV[0] = theRotation1 > 0.0 ? aV[0] : -aV[0];
+ aV[1] = theRotation2 > 0.0 ? aV[1] : -aV[1];
+
+ switch ( theOrientationType )
+ {
+ case RelativeXY :
+ aDir[0][1] = anU[0];
+ aDir[0][2] = aV[0];
+ aDir[1][0] = anU[1];
+ aDir[1][2] = aV[1];
+ break;
+
+ case RelativeYZ :
+ aDir[0][2] = anU[0];
+ aDir[0][0] = aV[0];
+ aDir[1][1] = anU[1];
+ aDir[1][0] = aV[1];
+ break;
+
+ case RelativeZX :
+ aDir[0][0] = anU[0];
+ aDir[0][1] = aV[0];
+ aDir[1][2] = anU[1];
+ aDir[1][1] = aV[1];
+ break;
+ }
+
+ Cross( aDir[1], aDir[0], aNormal );
+
+ // Normalize
+ double aDen;
+ aDen = sqrt( aNormal[0] * aNormal[0] + aNormal[1] * aNormal[1] + aNormal[2] * aNormal[2] );
+ if ( aDen != 0.0 )
+ {
+ for (int i = 0; i < 3; i++)
+ {
+ aNormal[i] /= aDen;
+ }
+ }
+
+ theDx = aNormal[0];
+ theDy = aNormal[1];
+ theDz = aNormal[2];
}
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
#include <Graphic3d_ClipPlane.hxx>
#include <vector>
-enum ClipPlaneMode { Absolute, Relative };
-
/*!
- \class OrientedPlane
- \brief Parameters of clipping plane in relative mode
+ \class OCCViewer_ClipPlane
+ Definition of OCC viewer clipping plane.
*/
-class OCCVIEWER_EXPORT OrientedPlane {
+class OCCVIEWER_EXPORT OCCViewer_ClipPlane
+{
+public:
- public:
- OrientedPlane();
- OrientedPlane& operator =(const OrientedPlane& other);
+ enum PlaneMode
+ {
+ Absolute,
+ Relative
+ };
- public:
- Standard_Integer Orientation;
- Standard_Real Distance;
- Standard_Real Rotation1;
- Standard_Real Rotation2;
-};
+ enum AbsoluteOrientationType
+ {
+ AbsoluteCustom,
+ AbsoluteXY,
+ AbsoluteYZ,
+ AbsoluteZX
+ };
+
+ enum RelativeOrientationType
+ {
+ RelativeXY,
+ RelativeYZ,
+ RelativeZX
+ };
+
+public:
-class OCCVIEWER_EXPORT OCCViewer_ClipPlane
-{
-
- public:
OCCViewer_ClipPlane();
- OCCViewer_ClipPlane& operator =(const OCCViewer_ClipPlane& other);
-
- public:
- OrientedPlane RelativeMode;
- Standard_Real X;
- Standard_Real Y;
- Standard_Real Z;
- Standard_Real Dx;
- Standard_Real Dy;
- Standard_Real Dz;
- Standard_Integer Orientation;
- bool IsInvert;
+ OCCViewer_ClipPlane& operator =( const OCCViewer_ClipPlane& theOther );
+
+// Parameters
+public:
+
+ // Plane definition mode
+ PlaneMode Mode;
+
+ // Is active
bool IsOn;
- ClipPlaneMode PlaneMode;
+ // Plane position
+ double X;
+ double Y;
+ double Z;
+
+ // Orientation type
+ int OrientationType;
+
+ // Plane orientation (depends on mode)
+ union
+ {
+ struct
+ {
+ bool IsInvert;
+ double Dx;
+ double Dy;
+ double Dz;
+ } AbsoluteOrientation;
+
+ struct
+ {
+ double Rotation1;
+ double Rotation2;
+ } RelativeOrientation;
+ };
+
+// Tools
+public:
+
+ // Converts defined orientation to direction.
+ void OrientationToXYZ( double& theDx, double& theDy, double& theDz ) const;
+
+ // Converts absoulte orientation to relative equivalent.
+ static void DXYZToRelative( const double theDx,
+ const double theDy,
+ const double theDz,
+ const int theRelativeType,
+ double& theRotation1,
+ double& theRotation2 );
+
+ // Converts relative orientation to absolute equivalent.
+ static void RelativeToDXYZ( const int theRelativeType,
+ const double theRotation1,
+ const double theRotation2,
+ double& theDx,
+ double& theDy,
+ double& theDz );
};
typedef std::vector<OCCViewer_ClipPlane> ClipPlanesList;
--- /dev/null
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
+//
+// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#include "OCCViewer_ClipPlaneInteractor.h"
+#include "OCCViewer_ViewPort3d.h"
+#include "OCCViewer_ViewModel.h"
+
+#include <AIS_InteractiveContext.hxx>
+#include <SelectMgr_EntityOwner.hxx>
+#include <V3d_View.hxx>
+#include <Geom_Line.hxx>
+#include <Geom_Plane.hxx>
+#include <GeomAPI_IntCS.hxx>
+#include <gce_MakeDir.hxx>
+
+#include <QMouseEvent>
+#include <QKeyEvent>
+
+/*!
+ \brief Constructor.
+ \param theVM [in] the view manager.
+ \param theParent [in] the parent object.
+*/
+OCCViewer_ClipPlaneInteractor::OCCViewer_ClipPlaneInteractor( OCCViewer_ViewManager* theVM,
+ QObject* theParent )
+: OCCViewer_ViewportInputFilter( theVM, theParent ),
+ myPerformingOp( DragOperation_Undef ),
+ myRotationCenter( gp::Origin() ),
+ myIsDraggable( false ),
+ myIsClickable( false )
+{
+}
+
+/*!
+ \brief Get sequence of planes to interact with.
+ \return the sequence of accepted planes.
+*/
+const OCCViewer_ClipPlaneInteractor::SeqOfPlanes& OCCViewer_ClipPlaneInteractor::planes() const
+{
+ return myPlanes;
+}
+
+/*!
+ \brief Sets sequence of planes allowed for interaction.
+ \param thePlanes [in] the sequence of accepted planes.
+*/
+void OCCViewer_ClipPlaneInteractor::setPlanes( const SeqOfPlanes& thePlanes )
+{
+ myPlanes = thePlanes;
+}
+
+/*!
+ \brief Sets center of rotation for the scene.
+ \param theCenter [in] the center of rotation.
+*/
+void OCCViewer_ClipPlaneInteractor::setRotationCenter( const gp_Pnt& theCenter )
+{
+ myRotationCenter = theCenter;
+}
+
+/*!
+ \brief Sets minimum and maximum bounding of the scene.
+ The sliding movements are limited to minimum
+ and maximum bounds.
+ \param theMinMax [in] the minimum and maximum bounds.
+*/
+void OCCViewer_ClipPlaneInteractor::setMinMax( const Bnd_Box& theMinMax )
+{
+ myMinMax = theMinMax;
+}
+
+/*!
+ \brief Enables or disables event processing within the viewer.
+*/
+void OCCViewer_ClipPlaneInteractor::setEnabled( const bool theIsEnabled )
+{
+ if ( !theIsEnabled )
+ {
+ }
+
+ myMouseDragPln = gp_Pln();
+ myPerformingOp = DragOperation_Undef;
+ myPickPos = QPoint();
+ myDragPos = QPoint();
+ myInteractedPlane = NULL;
+ myIsDraggable = false;
+ myIsClickable = false;
+
+ OCCViewer_ViewportInputFilter::setEnabled( theIsEnabled );
+}
+
+/*!
+ \brief Checks whether the interactive operation is in progress.
+ \return TRUE if the interaction is performed on IO object meaning
+ that no other operations in viewer should be processed.
+*/
+bool OCCViewer_ClipPlaneInteractor::isPerforming() const
+{
+ return !myInteractedPlane.IsNull();
+}
+
+/*!
+ \brief Checks whether the interactive plane can be clicked.
+ \return TRUE if the click interaction is supported for the plane.
+*/
+bool OCCViewer_ClipPlaneInteractor::isClickable( const Handle(AIS_Plane)& thePlane )
+{
+ bool isFound = Standard_False;
+ for ( int aPlaneIt = 0; aPlaneIt < myPlanes.size(); ++aPlaneIt )
+ {
+ if ( myPlanes[aPlaneIt] == thePlane )
+ {
+ isFound = true;
+ break;
+ }
+ }
+
+ if ( !isFound )
+ {
+ return false;
+ }
+
+ Handle(AIS_InteractiveContext) anAISContext = myViewer->getAISContext();
+
+ if ( anAISContext->IsSelected( thePlane ) )
+ {
+ return false;
+ }
+
+ return true;
+}
+
+/*!
+ \brief Checks whether the interactive plane can be dragged.
+ \return TRUE if the dragging interaction is supported for the plane.
+*/
+bool OCCViewer_ClipPlaneInteractor::isDraggable( const Handle(AIS_Plane)& thePlane )
+{
+ bool isFound = Standard_False;
+ for ( int aPlaneIt = 0; aPlaneIt < myPlanes.size(); ++aPlaneIt )
+ {
+ if ( myPlanes[aPlaneIt] == thePlane )
+ {
+ isFound = true;
+ break;
+ }
+ }
+
+ if ( !isFound )
+ {
+ return false;
+ }
+
+ Handle(AIS_InteractiveContext) anAISContext = myViewer->getAISContext();
+
+ if ( !anAISContext->IsSelected( thePlane ) )
+ {
+ return false;
+ }
+
+ return true;
+}
+
+/*!
+ \brief Checks whether it is possible to start interaction with plane.
+ \param thePickPos [in] the position of mouse picking.
+ \param theDragPos [in] the position of initial mouse dragging.
+ \param theDragOp [in] the drag operation to start.
+ \param thePlane [in] the detected plane.
+ \param theView [in] the view.
+*/
+bool OCCViewer_ClipPlaneInteractor::startDragging( const QPoint& thePickPos,
+ const QPoint& theDragPos,
+ const DragOperation theDragOp,
+ const Handle(AIS_Plane)& thePlane,
+ const Handle(V3d_View)& theView )
+{
+ // get point of view plane intersection with the plane
+ Standard_Real P[3], D[3];
+ theView->ConvertWithProj( thePickPos.x(), thePickPos.y(), P[0], P[1], P[2], D[0], D[1], D[2] );
+ gp_Lin aPickProj = gp_Lin( gp_Pnt( P[0], P[1], P[2] ), gp_Dir( D[0], D[1], D[2] ) );
+ gp_Pln aPlanePln = thePlane->Component()->Pln();
+
+ Handle(Geom_Line) aPickLine = new Geom_Line( aPickProj );
+ Handle(Geom_Plane) aCrossPlane = new Geom_Plane( aPlanePln );
+
+ GeomAPI_IntCS aFindPick( aPickLine, aCrossPlane );
+ if ( !aFindPick.IsDone() || aFindPick.NbPoints() == 0 )
+ {
+ return false;
+ }
+
+ // check plane geometry
+ Standard_Real aSizeX = 0.0;
+ Standard_Real aSizeY = 0.0;
+ thePlane->Size(aSizeX, aSizeY);
+ if ( aSizeX < Precision::Confusion() || aSizeY < Precision::Confusion() )
+ {
+ return false;
+ }
+
+ gp_Pnt aPickPoint = aFindPick.Point( 1 );
+
+ const gp_Dir& aPlaneN = aPlanePln.Axis().Direction();
+ const gp_Dir& aPlaneX = aPlanePln.XAxis().Direction();
+ const gp_Dir& aPlaneY = aPlanePln.YAxis().Direction();
+ const gp_Pnt& aPlaneCenter = aPlanePln.Location();
+
+ switch ( theDragOp )
+ {
+ // sliding operation is started
+ case DragOperation_Slide :
+ {
+ if ( aPlaneN.IsParallel( aPickProj.Direction(), M_PI / 180.0 ) )
+ {
+ return false;
+ }
+
+ gp_Dir aMousePlnDir = ( aPickProj.Direction() ^ aPlaneN ) ^ aPlaneN;
+
+ myMouseDragPln = gp_Pln( aPickPoint, aMousePlnDir );
+ myPlaneReferenceCS = gp_Ax3( aPlaneCenter, aPlaneN, aPlaneX );
+
+ return true;
+ }
+
+ // rotation operation is requested
+ case DragOperation_Rotate :
+ {
+ theView->ConvertWithProj( theDragPos.x(), theDragPos.y(), P[0], P[1], P[2], D[0], D[1], D[2] );
+ gp_Lin aDragProj = gp_Lin( gp_Pnt( P[0], P[1], P[2] ), gp_Dir( D[0], D[1], D[2] ) );
+
+ if ( aPickPoint.Distance( aDragProj.Location() ) < Precision::Confusion() )
+ {
+ return false;
+ }
+
+ // to determine whether we rotate around first or second axis, we
+ // construct a virtual "arm" as vector of from center of rotation
+ // to the picked point. Then we calculate dragging directions for both axes
+ // depending on the difference of picking and dragging mouse coordinates.
+ // The direction which is physically more easy to turn the "arm" is choosen
+ // and the corresponding plane for dragging is selected.
+
+ gp_Vec anArm = gp_Vec( myRotationCenter, aPickPoint );
+ Standard_Real anArmLength = anArm.Magnitude();
+ if ( anArmLength < Precision::Confusion() )
+ {
+ return false;
+ }
+
+ Handle(Geom_Line) aDragLine = new Geom_Line( aDragProj );
+ Standard_Real aMomentArm1 = 0.0;
+ Standard_Real aMomentArm2 = 0.0;
+ Standard_Real anArmLength1 = Abs( anArm * gp_Vec( aPlaneN ^ aPlaneX ) );
+ Standard_Real anArmLength2 = Abs( anArm * gp_Vec( aPlaneN ^ aPlaneY ) );
+
+ // check virtual "arm" dragging moment for first axis of rotation
+ if ( !aPlaneX.IsNormal( aDragProj.Direction(), M_PI / 180.0 ) && ( anArmLength1 / anArmLength > 0.3 ) )
+ {
+ Handle(Geom_Plane) aDragPln = new Geom_Plane( aPickPoint, aPlaneX );
+
+ gp_Pnt aDragPnt = aPickPoint;
+ gp_Vec aDragDir = gp_Vec( 0.0, 0.0, 0.0 );
+ GeomAPI_IntCS aFindCross( aDragLine, aDragPln );
+ if ( aFindCross.IsDone() && aFindCross.NbPoints() != 0 )
+ {
+ aDragPnt = aFindCross.Point( 1 );
+ }
+
+ if ( aDragPnt.Distance( aPickPoint ) > Precision::Confusion() )
+ {
+ aDragDir = gp_Vec( aPickPoint, aDragPnt );
+ }
+
+ aMomentArm1 = anArmLength1 * ( 1.0 - Abs( aDragDir.Normalized() * anArm.Normalized() ) );
+ }
+
+ // check virtual "arm" dragging moment for second axis of rotation
+ if ( !aPlaneY.IsNormal( aDragProj.Direction(), M_PI / 180.0 )&& ( anArmLength2 / anArmLength > 0.3 ) )
+ {
+ Handle(Geom_Plane) aDragPln = new Geom_Plane( aPickPoint, aPlaneY );
+
+ gp_Pnt aDragPnt = aPickPoint;
+ gp_Vec aDragDir = gp_Vec( 0.0, 0.0, 0.0 );
+ GeomAPI_IntCS aFindCross( aDragLine, aDragPln );
+ if ( aFindCross.IsDone() && aFindCross.NbPoints() != 0 )
+ {
+ aDragPnt = aFindCross.Point( 1 );
+ }
+
+ if ( aDragPnt.Distance( aPickPoint ) > Precision::Confusion() )
+ {
+ aDragDir = gp_Vec( aPickPoint, aDragPnt );
+ }
+
+ aMomentArm2 = anArmLength2 * ( 1.0 - Abs( aDragDir.Normalized() * anArm.Normalized() ) );
+ }
+
+ // choose the best plane for dragging
+ if ( aMomentArm1 >= aMomentArm2 )
+ {
+ gp_Vec aMousePlnN = gp_Vec( aPlaneX );
+
+ myMouseDragPln = gp_Pln( aPickPoint, aMousePlnN );
+
+ Standard_Real aDistance2Center = myMouseDragPln.Distance( aPlaneCenter );
+ gp_Pnt aCenterOnMousePln = aMousePlnN * gp_Vec( aPickPoint, aPlaneCenter ) < 0.0
+ ? aPlaneCenter.Translated( aMousePlnN * aDistance2Center )
+ : aPlaneCenter.Translated( aMousePlnN * -aDistance2Center );
+
+ myRotationAxis = gp_Ax1( myRotationCenter, aMousePlnN );
+ }
+ else
+ {
+ gp_Vec aMousePlnN = gp_Vec( aPlaneY );
+
+ myMouseDragPln = gp_Pln( aPickPoint, aMousePlnN );
+
+ Standard_Real aDistance2Center = myMouseDragPln.Distance( aPlaneCenter );
+ gp_Pnt aCenterOnMousePln = aMousePlnN * gp_Vec( aPickPoint, aPlaneCenter ) < 0.0
+ ? aPlaneCenter.Translated( aMousePlnN * aDistance2Center )
+ : aPlaneCenter.Translated( aMousePlnN * -aDistance2Center );
+
+ myRotationAxis = gp_Ax1( myRotationCenter, aMousePlnN );
+ }
+
+ myPlaneReferenceCS = gp_Ax3( aPlaneCenter, aPlaneN, aPlaneX );
+
+ return true;
+ }
+ }
+
+ return false;
+}
+
+/*!
+ \brief Performs dragging operation on the passed interactive plane.
+ \param theDragPos [in] the position of mouse dragging.
+ \param theDragOp [in] the drag operation to start.
+ \param thePlane [in] the operated plane.
+ \param theView [in] the view.
+*/
+void OCCViewer_ClipPlaneInteractor::performDragging( const QPoint& theDragPos,
+ const DragOperation theDragOp,
+ const Handle(AIS_Plane)& thePlane,
+ const Handle(V3d_View)& theView )
+{
+ Standard_Real P[3], D[3];
+ theView->ConvertWithProj( theDragPos.x(), theDragPos.y(), P[0], P[1], P[2], D[0], D[1], D[2] );
+ gp_Lin aProjection = gp_Lin( gp_Pnt( P[0], P[1], P[2] ), gp_Dir( D[0], D[1], D[2] ) );
+
+ // get point on the plane
+ Handle(Geom_Line) aCrossLine = new Geom_Line( aProjection );
+ Handle(Geom_Plane) aCrossPlane = new Geom_Plane( myMouseDragPln );
+
+ GeomAPI_IntCS aFindCross( aCrossLine, aCrossPlane );
+ if ( !aFindCross.IsDone() || aFindCross.NbPoints() == 0 )
+ {
+ return;
+ }
+
+ gp_Pnt aDragPoint = aFindCross.Point( 1 );
+ gp_Pnt aPlaneCenter = myPlaneReferenceCS.Location();
+ gp_Vec aPlaneN = myPlaneReferenceCS.Direction();
+ gp_Vec aPlaneX = myPlaneReferenceCS.XDirection();
+ gp_Pln aPlanePln = gp_Pln( aPlaneCenter, aPlaneN );
+
+ switch ( theDragOp )
+ {
+ // sliding the plane along its normal
+ case DragOperation_Slide:
+ {
+ Standard_Real aTranslation =
+ gp_Vec( aPlaneCenter, aDragPoint ) * gp_Vec( aPlaneN ) > 0.0
+ ? aPlanePln.Distance( aDragPoint )
+ : -aPlanePln.Distance( aDragPoint );
+
+ gp_Pnt aNewCenter = aPlaneCenter.Translated( aPlaneN * aTranslation );
+
+ myPlaneReferenceCS = gp_Ax3( aNewCenter, aPlaneN, aPlaneX );
+
+ adjustBounds( myPlaneReferenceCS, myMinMax );
+
+ thePlane->SetComponent( new Geom_Plane( myPlaneReferenceCS ) );
+ thePlane->SetCenter( myPlaneReferenceCS.Location() );
+ thePlane->SetToUpdate();
+ thePlane->UpdateSelection();
+
+ myViewer->getAISContext()->Update( thePlane );
+ }
+ break;
+
+ case DragOperation_Rotate:
+ {
+ // project the dragging point on rotated plane
+ gp_Dir aRotAxis = myRotationAxis.Direction();
+ gp_Pln aDragAtCenterPln = gp_Pln( myRotationCenter, aRotAxis );
+ gp_Pnt aDragAtCenterPnt = gp_Vec( myRotationCenter, aDragPoint ) * gp_Vec( aRotAxis ) < 0.0
+ ? aDragPoint.Translated( gp_Vec( aRotAxis ) * aDragAtCenterPln.Distance( aDragPoint ) )
+ : aDragPoint.Translated( gp_Vec( aRotAxis ) * -aDragAtCenterPln.Distance( aDragPoint ) );
+
+ gp_Pnt aDragOnPlanePnt = gp_Vec( aPlaneCenter, aDragAtCenterPnt ) * gp_Vec( aPlaneN ) < 0.0
+ ? aDragAtCenterPnt.Translated( gp_Vec( aPlaneN ) * aPlanePln.Distance( aDragAtCenterPnt ) )
+ : aDragAtCenterPnt.Translated( gp_Vec( aPlaneN ) * -aPlanePln.Distance( aDragAtCenterPnt ) );
+
+ gp_Vec aDragPointVector( myRotationCenter, aDragAtCenterPnt );
+ gp_Vec aProjPointVector( myRotationCenter, aDragOnPlanePnt );
+
+ // check for rotation tolerance
+ if ( aDragPointVector.Magnitude() < 0.01 || aProjPointVector.Magnitude() < 0.01 )
+ {
+ return;
+ }
+
+ Standard_Real aTurnAngle = aProjPointVector.AngleWithRef( aDragPointVector, myRotationAxis.Direction() );
+
+ gp_Trsf aRotationTrsf;
+ aRotationTrsf.SetRotation( myRotationAxis, aTurnAngle );
+ myPlaneReferenceCS.Transform( aRotationTrsf );
+
+ adjustBounds( myPlaneReferenceCS, myMinMax );
+
+ gp_Ax3 aPlaneCS( myPlaneReferenceCS.Location(), myPlaneReferenceCS.Direction() );
+
+ thePlane->SetComponent( new Geom_Plane( aPlaneCS ) );
+ thePlane->SetCenter( myPlaneReferenceCS.Location() );
+ thePlane->SetToUpdate();
+ thePlane->UpdateSelection();
+
+ myViewer->getAISContext()->Update( thePlane );
+ }
+ break;
+ }
+}
+
+/*!
+ \brief Adjusts min-max bounds of the plane.
+ \param thePlane [in/out] the plane.
+ \param theMinMax [in] the min max bounds
+*/
+void OCCViewer_ClipPlaneInteractor::adjustBounds( gp_Ax3& thePlane, const Bnd_Box& theMinMax )
+{
+ gp_Trsf aRelativeTransform;
+ aRelativeTransform.SetTransformation( gp_Ax3(), thePlane );
+ Bnd_Box aRelativeBounds = theMinMax.Transformed( aRelativeTransform );
+
+ Standard_Real aXmin, aXmax, aYmin, aYmax, aZmin, aZmax;
+ aRelativeBounds.Get( aXmin, aYmin, aZmin, aXmax, aYmax, aZmax );
+
+ if ( aZmax < 0.0 ) // out in positive direction
+ {
+ thePlane.Translate( gp_Vec( thePlane.Direction() ) * aZmax );
+ }
+ else if ( aZmin > 0.0 ) // out in negative direction
+ {
+ thePlane.Translate( gp_Vec( thePlane.Direction() ) * aZmin );
+ }
+}
+
+/*!
+ \brief Handle mouse press events. Starts interaction with detected plane.
+ \param theEvent [in] the user event.
+ \param theViewPort [in] the viewport.
+*/
+bool OCCViewer_ClipPlaneInteractor::mousePress( QMouseEvent* theEvent,
+ OCCViewer_ViewPort3d* theViewPort )
+{
+ if ( theEvent->button() != Qt::LeftButton )
+ {
+ return false;
+ }
+
+ Handle(V3d_View) aView3D = theViewPort->getView();
+
+ Handle(AIS_InteractiveContext) anAISContext = myViewer->getAISContext();
+
+ // check detection of plane
+ anAISContext->MoveTo( theEvent->x(), theEvent->y(), aView3D );
+
+ if ( !anAISContext->HasDetected() )
+ {
+ return false;
+ }
+
+ // check that there is only one detected entity
+ anAISContext->InitDetected();
+
+ Handle(AIS_Plane) aPlane;
+ Handle(SelectMgr_EntityOwner) aDetectedOwner = anAISContext->DetectedOwner();
+ if ( !aDetectedOwner.IsNull() )
+ {
+ aPlane = Handle(AIS_Plane)::DownCast( aDetectedOwner->Selectable() );
+ }
+
+ if ( aPlane.IsNull() )
+ {
+ aPlane = Handle(AIS_Plane)::DownCast( anAISContext->DetectedInteractive() );
+ }
+
+ myIsClickable = isClickable( aPlane );
+
+ // process mouse click on the object
+ if ( myIsClickable );
+ {
+ myViewer->getAISContext()->SetSelected( aPlane );
+ emit planeClicked( aPlane );
+ }
+
+ myIsDraggable = isDraggable( aPlane );
+
+ if ( !myIsClickable && !myIsDraggable )
+ {
+ return false;
+ }
+
+ myPickPos = theEvent->pos();
+ myInteractedPlane = aPlane;
+
+ return true;
+}
+
+/*!
+ \brief Handle mouse move events. Performs dragging if interaction is in progress.
+ \param theEvent [in] the user event.
+ \param theViewPort [in] the viewport.
+*/
+bool OCCViewer_ClipPlaneInteractor::mouseMove( QMouseEvent* theEvent,
+ OCCViewer_ViewPort3d* theViewPort )
+{
+ if ( !isPerforming() )
+ {
+ return false;
+ }
+
+ // no dragging operation can be performed...
+ if ( !myIsDraggable )
+ {
+ return true;
+ }
+
+ Handle(V3d_View) aView3D = theViewPort->getView();
+
+ myDragPos = theEvent->pos();
+
+ // checking whether it is possible to start dragging operation
+ if ( myPerformingOp == DragOperation_Undef )
+ {
+ int aDx = myDragPos.x() - myPickPos.x();
+ int aDy = myDragPos.y() - myPickPos.y();
+ if ( ( aDx * aDx + aDy * aDy ) < 16 )
+ {
+ return true;
+ }
+
+ DragOperation aDragOp =
+ theEvent->modifiers().testFlag(Qt::ControlModifier)
+ ? DragOperation_Rotate
+ : DragOperation_Slide;
+
+ myIsDraggable = startDragging( myPickPos, myDragPos, aDragOp, myInteractedPlane, aView3D );
+
+ if ( !myIsDraggable )
+ {
+ return true;
+ }
+
+ myPerformingOp = aDragOp;
+ }
+
+ // performing dragging operation
+ performDragging( myDragPos, myPerformingOp, myInteractedPlane, aView3D );
+
+ emit planeDragged( myInteractedPlane );
+
+ return true;
+}
+
+/*!
+ \brief Handle mouse release events. Stops interaction.
+ \param theEvent [in] the user event.
+ \param theViewPort [in] the viewport.
+*/
+bool OCCViewer_ClipPlaneInteractor::mouseRelease( QMouseEvent* theEvent,
+ OCCViewer_ViewPort3d* theViewPort )
+{
+ if ( !isPerforming() )
+ {
+ return false;
+ }
+
+ myMouseDragPln = gp_Pln();
+ myPerformingOp = DragOperation_Undef;
+ myPickPos = QPoint();
+ myDragPos = QPoint();
+ myInteractedPlane = NULL;
+ myIsDraggable = false;
+ myIsClickable = false;
+ return true;
+}
+
+/*!
+ \brief Handle mouse double clicking events events. Stops the event propagation if
+ interaction with plane is in progress.
+ \param theEvent [in] the user event.
+ \param theViewPort [in] the viewport.
+*/
+bool OCCViewer_ClipPlaneInteractor::mouseDoubleClick( QMouseEvent* theEvent,
+ OCCViewer_ViewPort3d* theViewPort )
+{
+ return isPerforming();
+}
+
+/*!
+ \brief Handle key pressing events. Stops the event propagation if
+ interaction with plane is in progress.
+ \param theEvent [in] the user event.
+ \param theViewPort [in] the viewport.
+*/
+bool OCCViewer_ClipPlaneInteractor::keyPress( QKeyEvent* theEvent,
+ OCCViewer_ViewPort3d* theViewPort )
+{
+ // react to pressing & releasing ctrl key modifier
+ if ( !isPerforming() )
+ {
+ return false;
+ }
+
+ DragOperation aDragOp =
+ theEvent->modifiers().testFlag(Qt::ControlModifier)
+ ? DragOperation_Rotate
+ : DragOperation_Slide;
+
+ if ( aDragOp != myPerformingOp )
+ {
+ myPerformingOp = DragOperation_Undef;
+ myIsDraggable = isDraggable( myInteractedPlane );
+ myPickPos = theViewPort->mapFromGlobal( QCursor::pos() );
+ }
+
+ return true;
+}
+
+/*!
+ \brief Handle key releasing events. Stops the event propagation if
+ interaction with plane is in progress.
+ \param theEvent [in] the user event.
+ \param theViewPort [in] the viewport.
+*/
+bool OCCViewer_ClipPlaneInteractor::keyRelease( QKeyEvent* theEvent,
+ OCCViewer_ViewPort3d* theViewPort )
+{
+ // react to pressing & releasing ctrl key modifier
+ if ( !isPerforming() )
+ {
+ return false;
+ }
+
+ DragOperation aDragOp =
+ theEvent->modifiers().testFlag(Qt::ControlModifier)
+ ? DragOperation_Rotate
+ : DragOperation_Slide;
+
+ if ( aDragOp != myPerformingOp )
+ {
+ myPerformingOp = DragOperation_Undef;
+ myIsDraggable = isDraggable( myInteractedPlane );
+ myPickPos = theViewPort->mapFromGlobal( QCursor::pos() );
+ }
+
+ return true;
+}
--- /dev/null
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
+//
+// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#ifndef OCCVIEWER_CLIPPLANEINTERACTOR_H
+#define OCCVIEWER_CLIPPLANEINTERACTOR_H
+
+#include "OCCViewer_ViewportInputFilter.h"
+
+#include <AIS_Plane.hxx>
+#include <Bnd_Box.hxx>
+#include <gp_Pln.hxx>
+#include <gp_Ax3.hxx>
+
+#include <QPoint>
+
+#include <vector>
+
+class Handle(V3d_View);
+
+/*!
+ \class OCCViewer_ClipPlaneInteractor.
+ \brief The class provides mouse dragging operations with AIS_Plane:
+ 1) Sliding plane by dragging it with point
+ 2) Rotating plane around one or both of the rotation axes by
+ dragging its point with "ctrl" key pressed.
+*/
+class OCCViewer_ClipPlaneInteractor : public OCCViewer_ViewportInputFilter
+{
+ Q_OBJECT
+
+public:
+ typedef std::vector<Handle(AIS_Plane)> SeqOfPlanes;
+
+ // Performing interactive operation.
+ // - Slide: The picked point on plane is dragged along the normal of the plane.
+ // - Rotate: The picked point on plane is dragged around one of the specified rotation
+ // axes ("x", "y" axes of the plane coordinate system, or two orthogonal arbitrary
+ // specified ones). When starting the rotation a corresponding axis is
+ // choosen depending on the direction of dragging. The axis is selected in
+ // the following way: a virtual "arm" is constructed from center of
+ // rotation to picking point. The dragging directions are constructed for
+ // both of the rotation axes, then the direction which is "easiest to
+ // turn" is selected (e.g. the "arm" projection is largest for that axis,
+ // the direction of dragging is closer to orthogonal one for the axis).
+ enum DragOperation
+ {
+ DragOperation_Undef,
+ DragOperation_Slide,
+ DragOperation_Rotate
+ };
+
+public:
+ OCCViewer_ClipPlaneInteractor( OCCViewer_ViewManager*, QObject* theParent );
+
+ const SeqOfPlanes& planes() const;
+ void setPlanes( const SeqOfPlanes& );
+ void setRotationCenter( const gp_Pnt& );
+ void setMinMax( const Bnd_Box& );
+ virtual void setEnabled( const bool );
+
+signals:
+ void planeClicked( const Handle_AIS_Plane& thePlane );
+ void planeDragged( const Handle_AIS_Plane& thePlane );
+
+protected:
+ bool isClickable( const Handle(AIS_Plane)& thePlane );
+ bool isDraggable( const Handle(AIS_Plane)& thePlane );
+ bool isPerforming() const;
+ bool startDragging( const QPoint& thePickPos,
+ const QPoint& theDragPos,
+ const DragOperation theOperation,
+ const Handle(AIS_Plane)& thePlane,
+ const Handle(V3d_View)& theView );
+ void performDragging( const QPoint& theDragPos,
+ const DragOperation theOperation,
+ const Handle(AIS_Plane)& thePlane,
+ const Handle(V3d_View)& theView );
+ void adjustBounds( gp_Ax3&, const Bnd_Box& );
+
+protected:
+ virtual bool mouseMove( QMouseEvent*, OCCViewer_ViewPort3d* );
+ virtual bool mousePress( QMouseEvent*, OCCViewer_ViewPort3d* );
+ virtual bool mouseRelease( QMouseEvent*, OCCViewer_ViewPort3d* );
+ virtual bool mouseDoubleClick( QMouseEvent*, OCCViewer_ViewPort3d* );
+ virtual bool keyPress( QKeyEvent*, OCCViewer_ViewPort3d* );
+ virtual bool keyRelease( QKeyEvent*, OCCViewer_ViewPort3d* );
+
+protected:
+
+ gp_Ax3 myPlaneReferenceCS;
+ gp_Ax1 myRotationAxis;
+ gp_Pln myMouseDragPln;
+ QPoint myDragPos;
+ QPoint myPickPos;
+ DragOperation myPerformingOp;
+ gp_Pnt myRotationCenter;
+ Bnd_Box myMinMax;
+ Handle(AIS_Plane) myInteractedPlane;
+ SeqOfPlanes myPlanes;
+ bool myIsDraggable;
+ bool myIsClickable;
+};
+
+#endif
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
#include "OCCViewer_ClippingDlg.h"
#include <QtxDoubleSpinBox.h>
+#include <QtxDoubleSpinSlider.h>
+#include <QtxIntSpinSlider.h>
#include <QtxAction.h>
#include "SUIT_Session.h"
#include "OCCViewer_ViewWindow.h"
#include "OCCViewer_ViewPort3d.h"
#include "OCCViewer_ViewModel.h"
+#include "OCCViewer_ViewManager.h"
+#include "OCCViewer_ClipPlaneInteractor.h"
#include <V3d_View.hxx>
#include <Visual3d_View.hxx>
/*!
Compute the point of bounding box and current clipping plane
*/
-void ComputeBoundsParam( double theBounds[6],
- double theDirection[3],
+void ComputeBoundsParam( const double theBounds[6],
+ const double theDirection[3],
double theMinPnt[3],
double& theMaxBoundPrj,
double& theMinBoundPrj )
{
- //Enlarge bounds in order to avoid conflicts of precision
- for(int i = 0; i < 6; i += 2) {
+ double aEnlargeBounds[6];
+
+ // Enlarge bounds in order to avoid conflicts of precision
+ for(int i = 0; i < 6; i += 2)
+ {
static double EPS = 1.0E-3;
double aDelta = (theBounds[i+1] - theBounds[i])*EPS;
- theBounds[i] -= aDelta;
- theBounds[i+1] += aDelta;
+ aEnlargeBounds[i ] = theBounds[i ] - aDelta;
+ aEnlargeBounds[i+1] = theBounds[i+1] + aDelta;
}
- double aBoundPoints[8][3] = { { theBounds[0], theBounds[2], theBounds[4] },
- { theBounds[1], theBounds[2], theBounds[4] },
- { theBounds[0], theBounds[3], theBounds[4] },
- { theBounds[1], theBounds[3], theBounds[4] },
- { theBounds[0], theBounds[2], theBounds[5] },
- { theBounds[1], theBounds[2], theBounds[5] },
- { theBounds[0], theBounds[3], theBounds[5] },
- { theBounds[1], theBounds[3], theBounds[5] } };
+ double aBoundPoints[8][3] = { { aEnlargeBounds[0], aEnlargeBounds[2], aEnlargeBounds[4] },
+ { aEnlargeBounds[1], aEnlargeBounds[2], aEnlargeBounds[4] },
+ { aEnlargeBounds[0], aEnlargeBounds[3], aEnlargeBounds[4] },
+ { aEnlargeBounds[1], aEnlargeBounds[3], aEnlargeBounds[4] },
+ { aEnlargeBounds[0], aEnlargeBounds[2], aEnlargeBounds[5] },
+ { aEnlargeBounds[1], aEnlargeBounds[2], aEnlargeBounds[5] },
+ { aEnlargeBounds[0], aEnlargeBounds[3], aEnlargeBounds[5] },
+ { aEnlargeBounds[1], aEnlargeBounds[3], aEnlargeBounds[5] } };
int aMaxId = 0;
theMaxBoundPrj = theDirection[0] * aBoundPoints[aMaxId][0] + theDirection[1] * aBoundPoints[aMaxId][1]
/*!
Compute the position of current plane by distance
*/
-void DistanceToPosition( double theBounds[6],
- double theDirection[3],
- double theDist,
+void DistanceToPosition( const double theBounds[6],
+ const double theDirection[3],
+ const double theDist,
double thePos[3] )
{
double aMaxBoundPrj, aMinBoundPrj, aMinPnt[3];
- ComputeBoundsParam( theBounds,theDirection,aMinPnt,aMaxBoundPrj,aMinBoundPrj );
- double aLength = (aMaxBoundPrj - aMinBoundPrj)*theDist;
- thePos[0] = aMinPnt[0] - theDirection[0]*aLength;
- thePos[1] = aMinPnt[1] - theDirection[1]*aLength;
- thePos[2] = aMinPnt[2] - theDirection[2]*aLength;
+ ComputeBoundsParam( theBounds, theDirection, aMinPnt, aMaxBoundPrj, aMinBoundPrj );
+ double aLength = (aMaxBoundPrj - aMinBoundPrj) * theDist;
+ thePos[0] = aMinPnt[0] - theDirection[0] * aLength;
+ thePos[1] = aMinPnt[1] - theDirection[1] * aLength;
+ thePos[2] = aMinPnt[2] - theDirection[2] * aLength;
}
/*!
Compute the parameters of clipping plane
*/
-bool ComputeClippingPlaneParameters( double theNormal[3],
- double theDist,
- double theOrigin[3],
- Handle(AIS_InteractiveContext) ic,
- double theDefaultSize)
+bool ComputeClippingPlaneParameters( const Handle(AIS_InteractiveContext)& theIC,
+ const double theDefaultSize,
+ const double theNormal[3],
+ const double theDist,
+ double theOrigin[3] )
{
double aBounds[6] = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 };
- getMinMaxFromContext(ic,theDefaultSize,aBounds[0], aBounds[2], aBounds[4], aBounds[1], aBounds[3], aBounds[5]);
+
+ getMinMaxFromContext( theIC, theDefaultSize, aBounds[0], aBounds[2], aBounds[4], aBounds[1], aBounds[3], aBounds[5] );
DistanceToPosition( aBounds, theNormal, theDist, theOrigin );
return true;
}
/*!
- Cross product of two 3-vectors. Result vector in result[3].
+ \brief Converts relative plane parameters to absolute.
+ \param theIC [in] the interactive context.
+ \param theDefaultSize [in] the default trihedron size.
+ \param theDistance [in] the plane distance relative to minimum corner of model boundaries.
+ \param theDX [in] x component of plane direction.
+ \param theDY [in] y component of plane direction.
+ \param theDZ [in] z component of plane direction.
+ \param theX [out] x coordinate of plane origin.
+ \param theY [out] y coordinate of plane origin.
+ \param theZ [out] z coordinate of plane origin.
*/
-void Cross(const double first[3], const double second[3], double result[3])
+bool DistanceToXYZ ( const Handle(AIS_InteractiveContext)& theIC,
+ const double theDefaultSize,
+ const double theDistance,
+ const double theDX,
+ const double theDY,
+ const double theDZ,
+ double& theX,
+ double& theY,
+ double& theZ )
{
- result[0] = first[1]*second[2] - first[2]*second[1];
- result[1] = first[2]*second[0] - first[0]*second[2];
- result[2] = first[0]*second[1] - first[1]*second[0];
+ double aNormal[3] = { theDX, theDY, theDZ };
+ double anOrigin[3] = { 0.0, 0.0, 0.0 };
+
+ bool anIsOk = ComputeClippingPlaneParameters( theIC, theDefaultSize, aNormal, theDistance, anOrigin );
+
+ if( !anIsOk )
+ {
+ return false;
+ }
+
+ theX = anOrigin[0];
+ theY = anOrigin[1];
+ theZ = anOrigin[2];
+
+ return true;
}
/*!
- Compute relative clipping plane in absolute coordinates
+ \brief Converts absolute position and direction to bounding box distance.
+ \param theIC [in] the interactive context.
+ \param theDefaultSize [in] the default trihedron size.
+ \param theX [in] x coordinate of plane origin.
+ \param theY [in] y coordinate of plane origin.
+ \param theZ [in] z coordinate of plane origin.
+ \param theDX [in] x component of plane direction.
+ \param theDY [in] y component of plane direction.
+ \param theDZ [in] z component of plane direction.
+ \param theDistance [out] the plane distance relative to minimum corner of model boundaries.
*/
-void RelativePlaneToAbsolute (OCCViewer_ClipPlane& thePlane, Handle(AIS_InteractiveContext) ic, double theDefaultSize )
+void XYZToDistance ( const Handle(AIS_InteractiveContext)& theIC,
+ const double theDefaultSize,
+ const double theX,
+ const double theY,
+ const double theZ,
+ const double theDX,
+ const double theDY,
+ const double theDZ,
+ double& theDistance )
{
- double aNormal[3];
- double aDir[2][3] = { { 0, 0, 0 }, { 0, 0, 0 } };
- {
- static double aCoeff = M_PI/180.0;
-
- double anU[2] = { cos( aCoeff * thePlane.RelativeMode.Rotation1 ), cos( aCoeff * thePlane.RelativeMode.Rotation2 ) };
- double aV[2] = { sqrt( 1.0 - anU[0]*anU[0] ), sqrt( 1.0 - anU[1] * anU[1] ) };
- aV[0] = thePlane.RelativeMode.Rotation1 > 0? aV[0]: -aV[0];
- aV[1] = thePlane.RelativeMode.Rotation2 > 0? aV[1]: -aV[1];
-
- switch ( thePlane.RelativeMode.Orientation ) {
- case 0:
- aDir[0][1] = anU[0];
- aDir[0][2] = aV[0];
- aDir[1][0] = anU[1];
- aDir[1][2] = aV[1];
- break;
- case 1:
- aDir[0][2] = anU[0];
- aDir[0][0] = aV[0];
- aDir[1][1] = anU[1];
- aDir[1][0] = aV[1];
- break;
- case 2:
- aDir[0][0] = anU[0];
- aDir[0][1] = aV[0];
- aDir[1][2] = anU[1];
- aDir[1][1] = aV[1];
- break;
- }
+ gp_Pnt aPlaneP( theX, theY, theZ );
+ gp_Dir aPlaneN( theDX, theDY, theDZ );
- Cross( aDir[1], aDir[0], aNormal );
- // Normalize
- double den;
- den = sqrt( aNormal[0] * aNormal[0] + aNormal[1] * aNormal[1] + aNormal[2] * aNormal[2] );
- if ( den != 0.0 ) {
- for (int i=0; i < 3; i++) {
- aNormal[i] /= den;
- }
- }
- Cross( aNormal, aDir[1], aDir[0] );
- }
+ double aXmin, aYmin, aZmin, aXmax, aYmax, aZmax;
- double anOrigin[3];
+ getMinMaxFromContext( theIC, theDefaultSize, aXmin, aYmin, aZmin, aXmax, aYmax, aZmax );
- anOrigin[0] = anOrigin[1] = anOrigin[2] = 0;
- bool anIsOk = true;
+ Bnd_Box aMinMax;
+ aMinMax.Update( aXmin, aYmin, aZmin, aXmax, aYmax, aZmax );
- anIsOk = ComputeClippingPlaneParameters( aNormal,
- thePlane.RelativeMode.Distance,
- anOrigin,
- ic,
- theDefaultSize );
- if( !anIsOk )
- return;
- thePlane.X = anOrigin[0];
- thePlane.Y = anOrigin[1];
- thePlane.Z = anOrigin[2];
- thePlane.Dx = aNormal[0];
- thePlane.Dy = aNormal[1];
- thePlane.Dz = aNormal[2];
+ gp_Trsf aRelativeTransform;
+ aRelativeTransform.SetTransformation( gp_Ax3(), gp_Ax3( aPlaneP, aPlaneN ) );
+ Bnd_Box aRelativeBounds = aMinMax.Transformed( aRelativeTransform );
+
+ aRelativeBounds.Get( aXmin, aYmin, aZmin, aXmax, aYmax, aZmax );
+
+ double aLength = aZmax - aZmin;
+ double aDistance = aZmax;
+
+ double aRelativeDistance = aLength > 0.01 ? aDistance / aLength : 0.0;
+ aRelativeDistance = qMin( aRelativeDistance, aLength );
+ aRelativeDistance = qMax( aRelativeDistance, 0.0 );
+ theDistance = aRelativeDistance;
}
/*!
getMinMaxFromContext(theContext,defaultSize,aXMin, aYMin, aZMin, aXMax, aYMax, aZMax);
double aSize = 50;
-
- gp_Pnt aBasePnt(theClipPlane.X , theClipPlane.Y , theClipPlane.Z);
- gp_Dir aNormal(theClipPlane.Dx, theClipPlane.Dy, theClipPlane.Dz );
+ double aNormalX = 0.0;
+ double aNormalY = 0.0;
+ double aNormalZ = 0.0;
+ theClipPlane.OrientationToXYZ( aNormalX, aNormalY, aNormalZ );
+ gp_Pnt aBasePnt( theClipPlane.X, theClipPlane.Y, theClipPlane.Z );
+ gp_Dir aNormal( aNormalX, aNormalY, aNormalZ );
// compute clipping plane size
gp_Pnt aCenter = gp_Pnt( ( aXMin + aXMax ) / 2, ( aYMin + aYMax ) / 2, ( aZMin + aZMax ) / 2 );
\param parent - parent widget
*/
OCCViewer_ClippingDlg::OCCViewer_ClippingDlg(OCCViewer_ViewWindow* parent , OCCViewer_Viewer* model)
- : QDialog( parent, Qt::WindowTitleHint | Qt::WindowSystemMenuHint ),
- myCurrentClipPlaneMode (Absolute)
+ : QDialog( parent, Qt::WindowTitleHint | Qt::WindowSystemMenuHint )
{
setObjectName( "OCCViewer_ClippingDlg" );
setModal( false );
CBRelativeOrientation->addItem( tr("ALONG_ZX") );
GroupParametersLayout->addWidget( CBRelativeOrientation, 0, 1 );
- TLValueDistance = new QLabel( GroupParameters );
- TLValueDistance->setObjectName( "TLValueDistance" );
- TLValueDistance->setAlignment( Qt::AlignCenter );
- TLValueDistance->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
- QFont fnt = TLValueDistance->font(); fnt.setBold( true ); TLValueDistance->setFont( fnt );
- GroupParametersLayout->addWidget( TLValueDistance, 1, 1 );
-
TextLabelDistance = new QLabel( tr("DISTANCE"), GroupParameters );
TextLabelDistance->setObjectName( "TextLabelDistance" );
- GroupParametersLayout->addWidget( TextLabelDistance, 2, 0 );
-
- SliderDistance = new QSlider( Qt::Horizontal, GroupParameters );
- SliderDistance->setObjectName( "SliderDistance" );
- SliderDistance->setMinimumSize( 300, 0 );
- SliderDistance->setMinimum( 0 );
- SliderDistance->setMaximum( 100 );
- SliderDistance->setSingleStep( 1 );
- SliderDistance->setPageStep( 10 );
- SliderDistance->setTracking( false );
- GroupParametersLayout->addWidget( SliderDistance, 2, 1 );
-
- TLValueRotation1 = new QLabel( GroupParameters );
- TLValueRotation1->setObjectName( "TLValueRotation1" );
- TLValueRotation1->setAlignment( Qt::AlignCenter );
- TLValueRotation1->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
- TLValueRotation1->setFont( fnt );
- GroupParametersLayout->addWidget( TLValueRotation1, 3, 1 );
+ GroupParametersLayout->addWidget( TextLabelDistance, 1, 0 );
+
+ SpinSliderDistance = new QtxDoubleSpinSlider( 0., 1., 0.01, GroupParameters );
+ SpinSliderDistance->setObjectName( "SpinSliderDistance" );
+ SpinSliderDistance->setPrecision( precision );
+ QFont fnt = SpinSliderDistance->font(); fnt.setBold( true ); SpinSliderDistance->setFont( fnt );
+ GroupParametersLayout->addWidget( SpinSliderDistance, 1, 1 );
+
+ QString aUnitRot = "\xB0";
TextLabelRotation1 = new QLabel( tr("ROTATION_AROUND_X_Y2Z"), GroupParameters );
TextLabelRotation1->setObjectName( "TextLabelRotation1" );
- GroupParametersLayout->addWidget( TextLabelRotation1, 4, 0 );
-
- SliderRotation1 = new QSlider( Qt::Horizontal, GroupParameters );
- SliderRotation1->setObjectName( "SliderRotation1" );
- SliderRotation1->setMinimumSize( 300, 0 );
- SliderRotation1->setMinimum( -180 );
- SliderRotation1->setMaximum( 180 );
- SliderRotation1->setSingleStep( 1 );
- SliderRotation1->setPageStep( 10 );
- SliderRotation1->setTracking(false);
- GroupParametersLayout->addWidget( SliderRotation1, 4, 1 );
-
- TLValueRotation2 = new QLabel( GroupParameters );
- TLValueRotation2->setObjectName( "TLValueRotation2" );
- TLValueRotation2->setAlignment( Qt::AlignCenter );
- TLValueRotation2->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
- TLValueRotation2->setFont( fnt );
- GroupParametersLayout->addWidget( TLValueRotation2, 5, 1 );
+ GroupParametersLayout->addWidget( TextLabelRotation1, 2, 0 );
+
+ SpinSliderRotation1 = new QtxIntSpinSlider( -180, 180, 1, GroupParameters );
+ SpinSliderRotation1->setObjectName( "SpinSliderRotation1" );
+ SpinSliderRotation1->setUnit( aUnitRot );
+ SpinSliderRotation1->setFont( fnt );
+ GroupParametersLayout->addWidget( SpinSliderRotation1, 2, 1 );
TextLabelRotation2 = new QLabel(tr("ROTATION_AROUND_Y_X2Z"), GroupParameters);
TextLabelRotation2->setObjectName( "TextLabelRotation2" );
TextLabelRotation2->setObjectName( "TextLabelRotation2" );
- GroupParametersLayout->addWidget( TextLabelRotation2, 6, 0 );
-
- SliderRotation2 = new QSlider( Qt::Horizontal, GroupParameters );
- SliderRotation2->setObjectName( "SliderRotation2" );
- SliderRotation2->setMinimumSize( 300, 0 );
- SliderRotation2->setMinimum( -180 );
- SliderRotation2->setMaximum( 180 );
- SliderRotation2->setSingleStep( 1 );
- SliderRotation2->setPageStep( 10 );
- SliderRotation2->setTracking(false);
- GroupParametersLayout->addWidget( SliderRotation2, 6, 1 );
+ GroupParametersLayout->addWidget( TextLabelRotation2, 3, 0 );
+
+ SpinSliderRotation2 = new QtxIntSpinSlider( -180, 180, 1, GroupParameters );
+ SpinSliderRotation2->setObjectName( "SpinSliderRotation2" );
+ SpinSliderRotation2->setUnit( aUnitRot );
+ SpinSliderRotation2->setFont( fnt );
+ GroupParametersLayout->addWidget( SpinSliderRotation2, 3, 1 );
/***************************************************************/
QGroupBox* CheckBoxWidget = new QGroupBox( this );
connect( CBAbsoluteOrientation, SIGNAL ( activated ( int ) ), this, SLOT( onOrientationAbsoluteChanged( int ) ) ) ;
connect( CBRelativeOrientation, SIGNAL( activated( int ) ), this, SLOT( onOrientationRelativeChanged( int ) ) );
- connect( SliderDistance, SIGNAL( sliderMoved( int ) ), this, SLOT( SliderDistanceHasMoved( int ) ) );
- connect( SliderDistance, SIGNAL( valueChanged( int ) ), this, SLOT( SliderDistanceHasMoved( int ) ) );
- connect( SliderRotation1, SIGNAL( sliderMoved( int ) ), this, SLOT( SliderRotation1HasMoved( int ) ) );
- connect( SliderRotation1, SIGNAL( valueChanged( int ) ), this, SLOT( SliderRotation1HasMoved( int ) ) );
- connect( SliderRotation2, SIGNAL( sliderMoved( int ) ), this, SLOT( SliderRotation2HasMoved( int ) ) );
- connect( SliderRotation2, SIGNAL( valueChanged( int ) ), this, SLOT( SliderRotation2HasMoved( int ) ) );
+ connect( SpinSliderDistance, SIGNAL( valueChanged( double ) ), this, SLOT( onValueChanged() ) );
+ connect( SpinSliderRotation1, SIGNAL( valueChanged( int ) ), this, SLOT( onValueChanged() ) );
+ connect( SpinSliderRotation2, SIGNAL( valueChanged( int ) ), this, SLOT( onValueChanged() ) );
connect( PreviewCheckBox, SIGNAL ( toggled ( bool ) ), this, SLOT( onPreview( bool ) ) ) ;
connect( AutoApplyCheckBox, SIGNAL ( toggled( bool ) ), this, SLOT( onAutoApply( bool ) ) );
myBusy = false;
myIsSelectPlane = false;
myIsPlaneCreation = false;
+ myIsUpdatingControls = false;
myModel = model;
myModel->getViewer3d()->InitActiveViews();
+ OCCViewer_ViewManager* aViewMgr = (OCCViewer_ViewManager*) myModel->getViewManager();
+ myInteractor = new OCCViewer_ClipPlaneInteractor( aViewMgr, this );
+ connect( myInteractor, SIGNAL( planeClicked( const Handle_AIS_Plane& ) ), SLOT( onPlaneClicked( const Handle_AIS_Plane& ) ) );
+ connect( myInteractor, SIGNAL( planeDragged( const Handle_AIS_Plane& ) ), SLOT( onPlaneDragged( const Handle_AIS_Plane& ) ) );
+
myLocalPlanes = myModel->getClipPlanes();
synchronize();
}
CBAbsoluteOrientation->setCurrentIndex(0);
- TLValueDistance->setText( "0.5" );
- TLValueRotation1->setText( "0\xB0" );
- TLValueRotation2->setText( "0\xB0" );
+ SpinSliderDistance->setValue( 0.5 );
+ SpinSliderRotation1->setValue( 0 );
+ SpinSliderRotation2->setValue( 0 );
CBRelativeOrientation->setCurrentIndex( 0 );
- SliderDistance->setValue( 50 );
- SliderRotation1->setValue( 0 );
- SliderRotation2->setValue( 0 );
+
+ isActivePlane->setChecked( true );
+}
+
+/*!
+ Set plane parameters from widgets.
+*/
+void OCCViewer_ClippingDlg::setPlaneParam( OCCViewer_ClipPlane& thePlane )
+{
+ OCCViewer_ClipPlane::PlaneMode aMode = currentPlaneMode();
+
+ thePlane.Mode = aMode;
+
+ if ( aMode == OCCViewer_ClipPlane::Absolute )
+ {
+ if( qFuzzyIsNull( SpinBox_Dx->value() ) &&
+ qFuzzyIsNull( SpinBox_Dy->value() ) &&
+ qFuzzyIsNull( SpinBox_Dz->value() ) ) {
+ return;
+ }
+ }
+
+ thePlane.OrientationType = (aMode == OCCViewer_ClipPlane::Absolute)
+ ? CBAbsoluteOrientation->currentIndex()
+ : CBRelativeOrientation->currentIndex();
+
+ // Get XYZ, DXYZ
+ if ( aMode == OCCViewer_ClipPlane::Absolute )
+ {
+ if ( thePlane.OrientationType == OCCViewer_ClipPlane::AbsoluteCustom )
+ {
+ thePlane.AbsoluteOrientation.Dx = SpinBox_Dx->value();
+ thePlane.AbsoluteOrientation.Dy = SpinBox_Dy->value();
+ thePlane.AbsoluteOrientation.Dz = SpinBox_Dz->value();
+ }
+ else
+ {
+ thePlane.AbsoluteOrientation.IsInvert = SpinBox_Dx->value() < 0.0
+ || SpinBox_Dy->value() < 0.0
+ || SpinBox_Dz->value() < 0.0;
+ }
+
+ thePlane.X = SpinBox_X->value();
+ thePlane.Y = SpinBox_Y->value();
+ thePlane.Z = SpinBox_Z->value();
+ }
+ else
+ {
+ thePlane.RelativeOrientation.Rotation1 = SpinSliderRotation1->value();
+ thePlane.RelativeOrientation.Rotation2 = SpinSliderRotation2->value();
+
+ double aPlaneDx = 0.0;
+ double aPlaneDy = 0.0;
+ double aPlaneDz = 0.0;
+ double aX = 0.0;
+ double aY = 0.0;
+ double aZ = 0.0;
+
+ OCCViewer_ClipPlane::RelativeToDXYZ( thePlane.OrientationType,
+ thePlane.RelativeOrientation.Rotation1,
+ thePlane.RelativeOrientation.Rotation2,
+ aPlaneDx, aPlaneDy, aPlaneDz );
+
+ DistanceToXYZ( myModel->getAISContext(),
+ myModel->trihedronSize(),
+ SpinSliderDistance->value(),
+ aPlaneDx, aPlaneDy, aPlaneDz,
+ aX, aY, aZ );
+
+ thePlane.X = aX;
+ thePlane.Y = aY;
+ thePlane.Z = aZ;
+ }
+
+ thePlane.IsOn = isActivePlane->isChecked();
}
/*!
ComboBoxPlanes->addItem( tr( "NO_PLANES" ) );
initParam();
}
- if ( myCurrentClipPlaneMode == Absolute ) {
+ if ( currentPlaneMode() == OCCViewer_ClipPlane::Absolute )
+ {
SpinBox_X->setEnabled( anIsControlsEnable );
SpinBox_Y->setEnabled( anIsControlsEnable );
SpinBox_Z->setEnabled( anIsControlsEnable );
invertButton->setEnabled( anIsControlsEnable );
resetButton->setEnabled( anIsControlsEnable );
}
- else if( myCurrentClipPlaneMode == Relative ) {
+ else if ( currentPlaneMode() == OCCViewer_ClipPlane::Relative )
+ {
CBRelativeOrientation->setEnabled( anIsControlsEnable );
- SliderDistance->setEnabled( anIsControlsEnable );
- SliderRotation1->setEnabled( anIsControlsEnable );
- SliderRotation2->setEnabled( anIsControlsEnable );
+ SpinSliderDistance->setEnabled( anIsControlsEnable );
+ SpinSliderRotation1->setEnabled( anIsControlsEnable );
+ SpinSliderRotation2->setEnabled( anIsControlsEnable );
isActivePlane->setEnabled( anIsControlsEnable );
}
isActivePlane->setEnabled( anIsControlsEnable );
int aCurPlaneIndex = ComboBoxPlanes->currentIndex();
for ( int i=0; i < clipPlanesCount(); i++ ) {
- OCCViewer_ClipPlane& aClipPlane = getClipPlane(i);
+ OCCViewer_ClipPlane& aClipPlane = getClipPlane(i);
if ( aClipPlane.IsOn ) {
Handle(AIS_Plane) myPreviewPlane;
double aSize;
gp_Pnt aBasePnt;
gp_Dir aNormal;
clipPlaneParams(aClipPlane, ic, aSize, aBasePnt, aNormal, myModel->trihedronSize());
- myPreviewPlane = new AIS_Plane( new Geom_Plane( aBasePnt, aNormal ) );
+ myPreviewPlane = new AIS_Plane( new Geom_Plane( aBasePnt, aNormal ), aBasePnt );
+ myPreviewPlane->SetTypeOfSensitivity( Select3D_TOS_INTERIOR );
myPreviewPlane->SetSize( aSize, aSize );
- ic->Display( myPreviewPlane, 1, -1, false );
ic->SetWidth( myPreviewPlane, 10, false );
ic->SetMaterial( myPreviewPlane, Graphic3d_NOM_PLASTIC, false );
ic->SetTransparency( myPreviewPlane, 0.5, false );
Quantity_Color c = (aCurPlaneIndex == i) ? Quantity_Color( 255. / 255., 70. / 255., 0. / 255., Quantity_TOC_RGB ) : Quantity_Color( 85 / 255., 85 / 255., 255 / 255., Quantity_TOC_RGB );
ic->SetColor( myPreviewPlane, c , false );
+ ic->Display( myPreviewPlane, 1, 0, false );
myPreviewPlaneVector.push_back( myPreviewPlane );
}
}
myModel->update();
+
+ double aXmin, aYmin, aZmin, aXmax, aYmax, aZmax;
+ getMinMaxFromContext( ic, myModel->trihedronSize(), aXmin, aYmin, aZmin, aXmax, aYmax, aZmax);
+ gp_Pnt aRotationCenter( (aXmax + aXmin) * 0.5,
+ (aYmax + aYmin) * 0.5,
+ (aZmax + aZmin) * 0.5 );
+ Bnd_Box aMinMax;
+ aMinMax.Update( aXmin, aYmin, aZmin, aXmax, aYmax, aZmax );
+
+ myInteractor->setPlanes( myPreviewPlaneVector );
+ myInteractor->setRotationCenter( aRotationCenter );
+ myInteractor->setMinMax( aMinMax );
+ myInteractor->setEnabled( true );
}
void OCCViewer_ClippingDlg::updatePreview() {
}
myPreviewPlane = myPreviewPlaneVector[aCurPlaneIndex];
if(myPreviewPlane.IsNull()) {
- //Plane was not created
- myPreviewPlane = new AIS_Plane( new Geom_Plane( aBasePnt, aNormal ) );
+ //Plane was not created
+ myPreviewPlane = new AIS_Plane( new Geom_Plane( aBasePnt, aNormal ), aBasePnt );
+ myPreviewPlane->SetTypeOfSensitivity( Select3D_TOS_INTERIOR );
myPreviewPlane->SetSize( aSize, aSize );
- ic->Display( myPreviewPlane, 1, -1, false );
+ ic->Display( myPreviewPlane, 1, 0, false );
ic->SetWidth( myPreviewPlane, 10, false );
ic->SetMaterial( myPreviewPlane, Graphic3d_NOM_PLASTIC, false );
ic->SetTransparency( myPreviewPlane, 0.5, false );
myPreviewPlaneVector[aCurPlaneIndex] = myPreviewPlane;
} else {
- myPreviewPlane->SetComponent(new Geom_Plane( aBasePnt, aNormal ));
+ myPreviewPlane->SetComponent( new Geom_Plane( aBasePnt, aNormal ) );
+ myPreviewPlane->SetCenter( aBasePnt );
myPreviewPlane->SetSize( aSize, aSize );
}
ic->SetColor( myPreviewPlane, Quantity_Color( 255. / 255., 70. / 255., 0. / 255., Quantity_TOC_RGB ), false );
+ ic->Update( myPreviewPlane, Standard_False );
} else {
if(myPreviewPlaneVector.size() > aCurPlaneIndex ) {
myPreviewPlane = myPreviewPlaneVector[aCurPlaneIndex];
for(int i = 0; i < myPreviewPlaneVector.size(); i++) {
if( i == aCurPlaneIndex ) continue;
if(!myPreviewPlaneVector[i].IsNull())
- ic->SetColor( myPreviewPlaneVector[i], Quantity_Color( 85 / 255., 85 / 255., 255 / 255., Quantity_TOC_RGB ), false );
+ ic->SetColor( myPreviewPlaneVector[i], Quantity_Color( 85 / 255., 85 / 255., 255 / 255., Quantity_TOC_RGB ), false );
}
myModel->update();
+
+ double aXmin, aYmin, aZmin, aXmax, aYmax, aZmax;
+ getMinMaxFromContext( ic, myModel->trihedronSize(), aXmin, aYmin, aZmin, aXmax, aYmax, aZmax);
+ gp_Pnt aRotationCenter( (aXmax + aXmin) * 0.5,
+ (aYmax + aYmin) * 0.5,
+ (aZmax + aZmin) * 0.5 );
+ Bnd_Box aMinMax;
+ aMinMax.Update( aXmin, aYmin, aZmin, aXmax, aYmax, aZmax );
+
+ myInteractor->setPlanes( myPreviewPlaneVector );
+ myInteractor->setRotationCenter( aRotationCenter );
+ myInteractor->setMinMax( aMinMax );
}
/*!
}
myPreviewPlaneVector.clear();
myModel->update();
+ myInteractor->setEnabled( false );
}
/*!
}
}
+/*!
+ Updates state of user controls.
+*/
+void OCCViewer_ClippingDlg::updateControls()
+{
+ if ( clipPlanesCount() == 0 )
+ {
+ initParam();
+ return;
+ }
+
+ int aPlaneIdx = ComboBoxPlanes->currentIndex();
+
+ OCCViewer_ClipPlane& aPlane = getClipPlane( aPlaneIdx );
+
+ double aPlaneDx = 0.0;
+ double aPlaneDy = 0.0;
+ double aPlaneDz = 0.0;
+ double aDistance = 0.0;
+ aPlane.OrientationToXYZ( aPlaneDx, aPlaneDy, aPlaneDz );
+
+ if ( aPlane.Mode == OCCViewer_ClipPlane::Absolute )
+ {
+ ModeStackedLayout->setCurrentIndex( 0 );
+
+ // Set plane parameters in the dialog
+ SpinBox_X->setValue( aPlane.X );
+ SpinBox_Y->setValue( aPlane.Y );
+ SpinBox_Z->setValue( aPlane.Z );
+ SpinBox_Dx->setValue( aPlaneDx );
+ SpinBox_Dy->setValue( aPlaneDy );
+ SpinBox_Dz->setValue( aPlaneDz );
+ CBAbsoluteOrientation->setCurrentIndex( aPlane.OrientationType );
+ onOrientationAbsoluteChanged( aPlane.OrientationType );
+ }
+ else if( aPlane.Mode == OCCViewer_ClipPlane::Relative )
+ {
+ ModeStackedLayout->setCurrentIndex( 1 );
+
+ // Set plane parameters in the dialog
+ SpinSliderRotation1->setValue( int( aPlane.RelativeOrientation.Rotation1 ) );
+ SpinSliderRotation2->setValue( int( aPlane.RelativeOrientation.Rotation2 ) );
+
+ XYZToDistance( myModel->getAISContext(),
+ myModel->trihedronSize(),
+ aPlane.X, aPlane.Y, aPlane.Z,
+ aPlaneDx, aPlaneDy, aPlaneDz,
+ aDistance );
+
+ SpinSliderDistance->setValue( aDistance );
+
+ CBRelativeOrientation->setCurrentIndex( aPlane.OrientationType );
+ onOrientationRelativeChanged( aPlane.OrientationType );
+ }
+
+ isActivePlane->setChecked( aPlane.IsOn );
+}
+
/*!
SLOT on new button click: create a new clipping plane
*/
void OCCViewer_ClippingDlg::ClickOnNew()
{
+ OCCViewer_ClipPlane aClipPlane;
+
+ // init controls state
+ myIsUpdatingControls = true;
+ initParam();
+ myIsUpdatingControls = false;
- OCCViewer_ClipPlane aPlane;
- aPlane.PlaneMode = (ClipPlaneMode )myCurrentClipPlaneMode;
- myLocalPlanes.push_back(aPlane);
+ // init plane according to the state of controls
+ setPlaneParam( aClipPlane );
+
+ // add plane
+ myLocalPlanes.push_back( aClipPlane );
synchronize();
}
{
myIsPlaneCreation = true;
ModeStackedLayout->setCurrentIndex(0);
- myCurrentClipPlaneMode = Absolute;
ClickOnNew();
myIsPlaneCreation = false;
updateClipping();
{
myIsPlaneCreation = true;
ModeStackedLayout->setCurrentIndex(1);
- myCurrentClipPlaneMode = Relative;
ClickOnNew();
myIsPlaneCreation = false;
SetCurrentPlaneParam();
*/
void OCCViewer_ClippingDlg::onValueChanged()
{
+ if ( myIsUpdatingControls )
+ {
+ return;
+ }
+
SetCurrentPlaneParam();
+
if ( myIsSelectPlane )
+ {
return;
+ }
+
updateClipping();
}
void OCCViewer_ClippingDlg::onSelectPlane ( int theIndex )
{
if ( clipPlanesCount() == 0 )
+ {
return;
+ }
- OCCViewer_ClipPlane& aClipPlane = getClipPlane (theIndex);
+ OCCViewer_ClipPlane& aClipPlane = getClipPlane( theIndex );
myIsSelectPlane = true;
- if ( aClipPlane.PlaneMode == Absolute ) {
- ModeStackedLayout->setCurrentIndex( 0 );
- myCurrentClipPlaneMode = Absolute;
- int anOrientation = aClipPlane.Orientation;
- // Set plane parameters in the dialog
- SpinBox_X->setValue( aClipPlane.X );
- SpinBox_Y->setValue( aClipPlane.Y );
- SpinBox_Z->setValue( aClipPlane.Z );
- SpinBox_Dx->setValue( aClipPlane.Dx );
- SpinBox_Dy->setValue( aClipPlane.Dy );
- SpinBox_Dz->setValue( aClipPlane.Dz );
- CBAbsoluteOrientation->setCurrentIndex( anOrientation );
- onOrientationAbsoluteChanged( anOrientation );
- }
- else if( aClipPlane.PlaneMode == Relative ) {
- ModeStackedLayout->setCurrentIndex( 1 );
- myCurrentClipPlaneMode = Relative;
- int anOrientation = aClipPlane.RelativeMode.Orientation;
- // Set plane parameters in the dialog
- SliderDistance->setValue( aClipPlane.RelativeMode.Distance*100 );
- TLValueDistance->setText( QString::number(aClipPlane.RelativeMode.Distance ) );
- SliderRotation1->setValue( aClipPlane.RelativeMode.Rotation1 );
- TLValueRotation1->setText( QString( "%1\xB0" ).arg( aClipPlane.RelativeMode.Rotation1 ) );
- SliderRotation2->setValue( aClipPlane.RelativeMode.Rotation2 );
- TLValueRotation2->setText( QString( "%1\xB0" ).arg( aClipPlane.RelativeMode.Rotation2 ) );
- CBRelativeOrientation->setCurrentIndex( anOrientation );
- onOrientationRelativeChanged( anOrientation );
- }
-
- isActivePlane->setChecked( aClipPlane.IsOn );
+ updateControls();
ComboBoxPlanes->setCurrentIndex( theIndex );
myIsSelectPlane = false;
}
*/
void OCCViewer_ClippingDlg::SetCurrentPlaneParam()
{
- if ( clipPlanesCount() == 0 || myIsSelectPlane )
+ if ( clipPlanesCount() == 0 || myIsSelectPlane || myBusy )
+ {
return;
+ }
int aCurPlaneIndex = ComboBoxPlanes->currentIndex();
- OCCViewer_ClipPlane& aPlane = getClipPlane (aCurPlaneIndex);
+ OCCViewer_ClipPlane& aPlane = getClipPlane( aCurPlaneIndex );
- if ( aPlane.PlaneMode == Absolute ) {
- aPlane.Orientation = CBAbsoluteOrientation->currentIndex();
- aPlane.X = SpinBox_X->value();
- aPlane.Y = SpinBox_Y->value();
- aPlane.Z = SpinBox_Z->value();
- aPlane.Dx = SpinBox_Dx->value();
- aPlane.Dy = SpinBox_Dy->value();
- aPlane.Dz = SpinBox_Dz->value();
- }
- else if( aPlane.PlaneMode == Relative ) {
- aPlane.RelativeMode.Orientation = CBRelativeOrientation->currentIndex();
- aPlane.RelativeMode.Distance = TLValueDistance->text().toDouble();
- aPlane.RelativeMode.Rotation1 = TLValueRotation1->text().remove("\xB0").toInt();
- aPlane.RelativeMode.Rotation2 = TLValueRotation2->text().remove("\xB0").toInt();
- RelativePlaneToAbsolute (aPlane, myModel->getAISContext(),myModel->trihedronSize() );
- }
- aPlane.IsOn = isActivePlane->isChecked();
+ setPlaneParam( aPlane );
}
/*!
SpinBox_Dz->setValue( -Dz );
myBusy = false;
- if ( clipPlanesCount() != 0 ) {
+ if ( clipPlanesCount() != 0 )
+ {
int aCurPlaneIndex = ComboBoxPlanes->currentIndex();
- OCCViewer_ClipPlane& aPlane = getClipPlane (aCurPlaneIndex);
- aPlane.IsInvert = !aPlane.IsInvert;
+ OCCViewer_ClipPlane& aPlane = getClipPlane( aCurPlaneIndex );
+ aPlane.AbsoluteOrientation.IsInvert = !aPlane.AbsoluteOrientation.IsInvert;
}
updateClipping();
}
double aDx = 0, aDy = 0, aDz = 0;
if ( mode == 1 )
- {
- aDz = 1;
- TextLabelZ->setEnabled( true );
- SpinBox_Z->setEnabled( true );
- SpinBox_Z->setFocus();
- }
+ {
+ aDz = 1;
+ TextLabelZ->setEnabled( true );
+ SpinBox_Z->setEnabled( true );
+ SpinBox_Z->setFocus();
+ }
else if ( mode == 2 )
- {
- aDx = 1;
- TextLabelX->setEnabled( true );
- SpinBox_X->setEnabled( true );
- SpinBox_X->setFocus();
- }
+ {
+ aDx = 1;
+ TextLabelX->setEnabled( true );
+ SpinBox_X->setEnabled( true );
+ SpinBox_X->setFocus();
+ }
else if ( mode == 3 )
- {
- aDy = 1;
- TextLabelY->setEnabled( true );
- SpinBox_Y->setEnabled( true );
- SpinBox_Y->setFocus();
- }
+ {
+ aDy = 1;
+ TextLabelY->setEnabled( true );
+ SpinBox_Y->setEnabled( true );
+ SpinBox_Y->setFocus();
+ }
int aCurPlaneIndex = ComboBoxPlanes->currentIndex();
- OCCViewer_ClipPlane& aPlane = getClipPlane (aCurPlaneIndex);
- if ( aPlane.IsInvert == true ) {
- aDx = -aDx; aDy = -aDy; aDz = -aDz;
+ OCCViewer_ClipPlane& aPlane = getClipPlane( aCurPlaneIndex );
+ if ( aPlane.AbsoluteOrientation.IsInvert == true )
+ {
+ aDx = -aDx;
+ aDy = -aDy;
+ aDz = -aDz;
}
myBusy = true;
SpinBox_Dz->setValue( aDz );
myBusy = false;
}
- SetCurrentPlaneParam();
- updateClipping();
+
+ if ( !myIsUpdatingControls )
+ {
+ SetCurrentPlaneParam();
+ updateClipping();
+ }
}
/*!
TextLabelRotation2->setText( tr( "ROTATION_AROUND_X_Z2Y" ) );
}
- if( (QComboBox*)sender() == CBRelativeOrientation )
- SetCurrentPlaneParam();
- updateClipping();
+ if ( !myIsUpdatingControls )
+ {
+ if( (QComboBox*)sender() == CBRelativeOrientation )
+ {
+ SetCurrentPlaneParam();
+ }
+
+ updateClipping();
+ }
}
/*!
}
/*!
- SLOT: Called when value of slider distance change
+ SLOT: Called when clip plane is clicked in viewer.
*/
-void OCCViewer_ClippingDlg::SliderDistanceHasMoved( int value )
+void OCCViewer_ClippingDlg::onPlaneClicked( const Handle(AIS_Plane)& thePlane )
{
- double new_value = value/100.;
- TLValueDistance->setText( QString("%1").arg( new_value ) );
- onValueChanged();
+ for ( int aPlaneIt = 0; aPlaneIt < myPreviewPlaneVector.size(); aPlaneIt++ )
+ {
+ Handle(AIS_Plane)& aPlane = myPreviewPlaneVector.at( aPlaneIt );
+ if ( aPlane != thePlane )
+ {
+ continue;
+ }
+
+ ComboBoxPlanes->setCurrentIndex( aPlaneIt );
+
+ break;
+ }
}
/*!
- SLOT: Called when value of slider rotation1 change
+ SLOT: Called when clip plane is changed by dragging in viewer.
*/
-void OCCViewer_ClippingDlg::SliderRotation1HasMoved( int value )
+void OCCViewer_ClippingDlg::onPlaneDragged( const Handle(AIS_Plane)& thePlane )
{
- TLValueRotation1->setText( QString("%1\xB0").arg( value ) );
- onValueChanged();
+ for ( int aPlaneIt = 0; aPlaneIt < myPreviewPlaneVector.size(); aPlaneIt++ )
+ {
+ Handle(AIS_Plane)& aPlane = myPreviewPlaneVector.at( aPlaneIt );
+ if ( aPlane != thePlane )
+ {
+ continue;
+ }
+
+ OCCViewer_ClipPlane& aClipPlane = getClipPlane( aPlaneIt );
+
+ gp_Pln aPln = thePlane->Component()->Pln();
+ const gp_Pnt& aPlaneP = aPln.Location();
+ const gp_Dir& aPlaneN = aPln.Axis().Direction();
+
+ aClipPlane.X = aPlaneP.X();
+ aClipPlane.Y = aPlaneP.Y();
+ aClipPlane.Z = aPlaneP.Z();
+
+ if ( aClipPlane.Mode == OCCViewer_ClipPlane::Absolute )
+ {
+ if ( aClipPlane.OrientationType == OCCViewer_ClipPlane::AbsoluteCustom )
+ {
+ aClipPlane.AbsoluteOrientation.Dx = aPlaneN.X();
+ aClipPlane.AbsoluteOrientation.Dy = aPlaneN.Y();
+ aClipPlane.AbsoluteOrientation.Dz = aPlaneN.Z();
+ }
+ }
+ else
+ {
+ OCCViewer_ClipPlane::DXYZToRelative( aPlaneN.X(), aPlaneN.Y(), aPlaneN.Z(),
+ aClipPlane.OrientationType,
+ aClipPlane.RelativeOrientation.Rotation1,
+ aClipPlane.RelativeOrientation.Rotation2 );
+ }
+
+ myIsUpdatingControls = true;
+ updateControls();
+ myIsUpdatingControls = false;
+
+ if ( AutoApplyCheckBox->isChecked() )
+ {
+ onApply();
+ }
+
+ break;
+ }
}
-/*!
- SLOT: Called when value of slider rotation2 change
-*/
-void OCCViewer_ClippingDlg::SliderRotation2HasMoved( int value )
+OCCViewer_ClipPlane& OCCViewer_ClippingDlg::getClipPlane( int theIdx )
{
- TLValueRotation2->setText( QString("%1\xB0").arg( value ) );
- onValueChanged();
+ return myLocalPlanes[theIdx];
}
-OCCViewer_ClipPlane& OCCViewer_ClippingDlg::getClipPlane (int theIndex) {
- return myLocalPlanes[theIndex];
+int OCCViewer_ClippingDlg::clipPlanesCount()
+{
+ return myLocalPlanes.size();
}
-int OCCViewer_ClippingDlg::clipPlanesCount() {
- return myLocalPlanes.size();
+OCCViewer_ClipPlane::PlaneMode OCCViewer_ClippingDlg::currentPlaneMode() const
+{
+ return ModeStackedLayout->currentIndex() == 0
+ ? OCCViewer_ClipPlane::Absolute
+ : OCCViewer_ClipPlane::Relative;
}
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
class QComboBox;
class QCheckBox;
class QtxDoubleSpinBox;
+class QtxDoubleSpinSlider;
+class QtxIntSpinSlider;
class QStackedLayout;
class QSlider;
class QMenu;
class OCCViewer_Viewer;
class OCCViewer_ViewWindow;
+class OCCViewer_ClipPlaneInteractor;
/*!
\class OCCViewer_ClippingDlg
virtual void showEvent ( QShowEvent * );
virtual void hideEvent ( QHideEvent * );
void initParam();
+ void setPlaneParam( OCCViewer_ClipPlane& thePlane );
void displayPreview();
void erasePreview();
void updatePreview();
bool isValid();
void updateClipping();
+ void updateControls();
- OCCViewer_ClipPlane& getClipPlane (int theIndex);
+ OCCViewer_ClipPlane& getClipPlane( int );
int clipPlanesCount();
+ OCCViewer_ClipPlane::PlaneMode currentPlaneMode() const;
+
+private:
+
QComboBox* ComboBoxPlanes;
QCheckBox* isActivePlane;
QPushButton* buttonNew;
QLabel* TextLabelDistance;
QLabel* TextLabelRotation1;
QLabel* TextLabelRotation2;
- QLabel* TLValueDistance;
- QLabel* TLValueRotation1;
- QLabel* TLValueRotation2;
- QSlider* SliderDistance;
- QSlider* SliderRotation1;
- QSlider* SliderRotation2;
+ QtxDoubleSpinSlider* SpinSliderDistance;
+ QtxIntSpinSlider* SpinSliderRotation1;
+ QtxIntSpinSlider* SpinSliderRotation2;
QComboBox* CBRelativeOrientation;
QCheckBox* PreviewCheckBox;
OCCViewer_Viewer* myModel;
Handle(V3d_View) myView3d;
- Standard_Integer myCurrentClipPlaneMode;
std::vector<Handle(AIS_Plane)> myPreviewPlaneVector;
bool myIsSelectPlane;
+ bool myIsUpdatingControls;
bool myBusy;
bool myIsPlaneCreation;
ClipPlanesList myLocalPlanes;
-
+
+ OCCViewer_ClipPlaneInteractor* myInteractor;
+
public slots:
void onApply();
void onReset();
void onInvert();
void onOrientationAbsoluteChanged( int );
- void onOrientationRelativeChanged (int);
+ void onOrientationRelativeChanged( int );
void onPreview( bool on );
void onAutoApply(bool);
- void SliderDistanceHasMoved(int);
- void SliderRotation1HasMoved(int);
- void SliderRotation2HasMoved(int);
+ void onPlaneClicked( const Handle_AIS_Plane& thePlane );
+ void onPlaneDragged( const Handle_AIS_Plane& thePlane );
};
#endif // OCCVIEWER_CLIPPINGDLG_H
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
Standard_Boolean prev = aView3d->SetImmediateUpdate( Standard_False );
aView3d->SetScale( myCurrentItem.scale );
+#if OCC_VERSION_LARGE <= 0x06070100
aView3d->SetCenter( myCurrentItem.centerX, myCurrentItem.centerY );
+#endif
aView3d->SetProj( myCurrentItem.projX, myCurrentItem.projY, myCurrentItem.projZ );
aView3d->SetTwist( myCurrentItem.twist );
aView3d->SetAt( myCurrentItem.atX, myCurrentItem.atY, myCurrentItem.atZ );
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
#include <QGroupBox>
#include <QLabel>
#include <QPushButton>
+#include <QMenu>
#include <QGridLayout>
#include <QDoubleValidator>
#include <QCheckBox>
vbox->addWidget(myToOrigin);
connect(myToOrigin, SIGNAL(clicked()), this, SLOT(onToOrigin()));
- // Create "Select Point from View" button
+ // Create "Gravity Center of Select Object" button
mySelectPoint = new QPushButton(tr("LBL_SELECTPOINT"));
mySelectPoint->setCheckable(true);
+
+ QMenu* menuType = new QMenu( this );
+ mySelectActions[ menuType->addAction( tr("LBL_POINT") ) ] = TopAbs_VERTEX;
+ mySelectActions[ menuType->addAction( tr("LBL_EDGE") ) ] = TopAbs_EDGE;
+ mySelectActions[ menuType->addAction( tr("LBL_FACE") ) ] = TopAbs_FACE;
+ mySelectActions[ menuType->addAction( tr("LBL_SOLID") ) ] = TopAbs_SOLID;
+ connect( menuType, SIGNAL( triggered( QAction* ) ), this, SLOT( onSelectMenu( QAction* ) ) );
+
+ mySelectPoint->setMenu( menuType );
+
vbox->addWidget(mySelectPoint);
- connect(mySelectPoint, SIGNAL(clicked()), this, SLOT(onSelectPoint()));
myGroupBoxSel->setLayout(vbox);
OCCViewer_SetRotationPointDlg
::onToOrigin()
{
- if ( mySelectPoint->isChecked() )
- mySelectPoint->toggle();
+ mySelectPoint->setChecked( false );
setCoords();
myView->activateSetRotationSelected(myX->text().toDouble(),
myY->text().toDouble(),
void
OCCViewer_SetRotationPointDlg
-::onSelectPoint()
+::onSelectMenu( QAction* theAction )
{
- if ( mySelectPoint->isChecked() )
- myView->activateStartPointSelection();
- else
- mySelectPoint->toggle();
+ mySelectPoint->setChecked( true );
+ myView->activateStartPointSelection( mySelectActions[theAction] );
}
void
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
#include "OCCViewer.h"
#include <QDialog>
+#include <QMap>
+
+#include <TopAbs_ShapeEnum.hxx>
class QtxAction;
class QPushButton;
class QGroupBox;
class QCheckBox;
+class QAction;
class OCCViewer_ViewWindow;
protected:
OCCViewer_ViewWindow* myView;
QtxAction* myAction;
+ QMap<QAction*, TopAbs_ShapeEnum> mySelectActions;
QCheckBox* myIsBBCenter;
void onBBCenterChecked();
void onToOrigin();
- void onSelectPoint();
+ void onSelectMenu( QAction* );
void onCoordChanged();
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
#include "OCCViewer_ViewWindow.h"
#include <gp_Pln.hxx>
+#include <TopAbs_ShapeEnum.hxx>
class SUIT_Desktop;
class OCCViewer_Viewer;
virtual void activateSetRotationGravity() {}
virtual void activateSetRotationSelected( double theX, double theY, double theZ ) {}
- virtual void activateStartPointSelection() {}
+ virtual void activateStartPointSelection( TopAbs_ShapeEnum ) {}
virtual void updateGravityCoords() {}
void onMaximizedView( OCCViewer_ViewWindow*, bool );
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
win->enableSelection( isEnabled );
}
}
+
+
+ //clear current selection in the viewer
+ if(!isEnabled) {
+ myAISContext->ClearSelected( Standard_True );
+ }
+
}
/*!
{
myPreselectionEnabled = isPreselectionEnabled;
mySelectionEnabled = isSelectionEnabled;
+ //clear current selection in the viewer
+
+ if(!mySelectionEnabled) {
+ myAISContext->ClearSelected( Standard_True );
+ }
}
// 2. Create new clipping planes
ClipPlanesList::iterator inIt = theList.begin();
- for (;inIt != theList.end(); inIt++ ) {
- OCCViewer_ClipPlane plane;
- plane = (*inIt);
- myClipPlanes.push_back(plane);
- gp_Pln aPln (gp_Pnt (plane.X, plane.Y, plane.Z),
- gp_Dir (plane.Dx, plane.Dy, plane.Dz));
- Handle(Graphic3d_ClipPlane) aGraphic3dPlane = new Graphic3d_ClipPlane();
- aGraphic3dPlane->SetEquation (aPln);
- aGraphic3dPlane->SetOn(plane.IsOn);
- myInternalClipPlanes.Append(aGraphic3dPlane);
+ for (;inIt != theList.end(); inIt++ )
+ {
+ OCCViewer_ClipPlane aPlane = *inIt;
+
+ double aDx = 0.0, aDy = 0.0, aDz = 0.0;
+ aPlane.OrientationToXYZ( aDx, aDy, aDz );
+
+ gp_Pnt anOrigin( aPlane.X, aPlane.Y, aPlane.Z );
+ gp_Dir aDirection( aDx, aDy, aDz );
+
+ Handle(Graphic3d_ClipPlane) aGraphic3dPlane = new Graphic3d_ClipPlane( gp_Pln( anOrigin, aDirection ) );
+ aGraphic3dPlane->SetOn( aPlane.IsOn );
+
+ myInternalClipPlanes.Append( aGraphic3dPlane );
+ myClipPlanes.push_back( aPlane );
}
// 3. Apply clipping planes
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
#include "OCCViewer_ViewWindow.h"
#include "OCCViewer_ViewModel.h"
-#include <Basics_OCCTVersion.hxx>
-
#include <SUIT_ViewManager.h>
#include <SUIT_ViewModel.h>
#include <Visual3d_View.hxx>
#include <V3d_Viewer.hxx>
+
+#if OCC_VERSION_LARGE > 0x06070100
+#include <V3d_View.hxx>
+#else
#include <V3d_PerspectiveView.hxx>
#include <V3d_OrthographicView.hxx>
+#endif
#include "utilities.h"
// VSR: 01/07/2010 commented to avoid SIGSEGV at SALOME exit
//selectVisualId();
+#if OCC_VERSION_LARGE > 0x06070100
+ myActiveView = new V3d_View( viewer, type );
+#else
if ( type == V3d_ORTHOGRAPHIC ) {
myOrthoView = new V3d_OrthographicView( viewer );
myActiveView = myOrthoView;
myPerspView = new V3d_PerspectiveView( viewer );
myActiveView = myPerspView;
}
+#endif
+
setBackground( Qtx::BackgroundData( Qt::black ) ); // set default background
}
refView->Up( x, y, z ); tgtView->SetUp( x, y, z );
refView->Eye( x, y, z ); tgtView->SetEye( x, y, z );
refView->Proj( x, y, z ); tgtView->SetProj( x, y, z );
+#if OCC_VERSION_LARGE <= 0x06070100
refView->Center( x, y ); tgtView->SetCenter( x, y );
+#endif
tgtView->SetScale( refView->Scale() );
tgtView->SetTwist( refView->Twist() );
/* update */
tgtView->Update();
tgtView->SetImmediateUpdate( Standard_True );
+ tgtView->ZFitAll();
return true;
}
void OCCViewer_ViewPort3d::endRotation()
{
if ( !activeView().IsNull() ) {
- activeView()->ZFitAll(1.);
- activeView()->SetZSize(0.);
+ activeView()->ZFitAll( 1.0 );
+#if OCC_VERSION_LARGE <= 0x06070100
+ activeView()->SetZSize( 0.0 );
+#endif
activeView()->Update();
emit vpTransformed( this );
}
myScale = activeView()->Scale();
Standard_Real margin = 0.01;
+
+#if OCC_VERSION_LARGE > 0x06070100
+ activeView()->FitAll( margin, upd );
+ if(withZ)
+ activeView()->ZFitAll();
+#else
activeView()->FitAll( margin, withZ, upd );
+#endif
activeView()->SetZSize(0.);
emit vpTransformed( this );
}
Handle(V3d_View) aView3d = getView();
Handle(V3d_View) aRefView3d = vp3d->getView();
aView3d->SetImmediateUpdate( Standard_False );
+#if OCC_VERSION_LARGE > 0x06070100
+ aView3d->Camera()->Copy( aRefView3d->Camera() );
+#else
aView3d->SetViewMapping( aRefView3d->ViewMapping() );
aView3d->SetViewOrientation( aRefView3d->ViewOrientation() );
+#endif
aView3d->ZFitAll();
aView3d->SetImmediateUpdate( Standard_True );
aView3d->Update();
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
#ifndef OCCVIEWER_VIEWPORT3D_H
#define OCCVIEWER_VIEWPORT3D_H
+#include <Basics_OCCTVersion.hxx>
+
#include "OCCViewer_ViewPort.h"
#include "Qtx.h"
void updateBackground();
private:
+ Handle(V3d_View) myActiveView;
+#if OCC_VERSION_LARGE <= 0x06070100
Handle(V3d_View) myOrthoView;
Handle(V3d_View) myPerspView;
- Handle(V3d_View) myActiveView;
+#endif
bool myBusy;
double myScale;
bool myIsAdvancedZoomingEnabled;
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-
-// File : OCCViewer_ViewWindow.cxx
-// Author :
-
-#include "OCCViewer_ViewWindow.h"
-#include "OCCViewer_ViewModel.h"
-#include "OCCViewer_ViewPort3d.h"
-#include "OCCViewer_ViewManager.h"
-#include "OCCViewer_ViewSketcher.h"
-#include "OCCViewer_CreateRestoreViewDlg.h"
-#include "OCCViewer_ClipPlane.h"
-#include "OCCViewer_SetRotationPointDlg.h"
-#include "OCCViewer_AxialScaleDlg.h"
-#include "OCCViewer_CubeAxesDlg.h"
-#include "OCCViewer_ClippingDlg.h"
-
-#include <Basics_OCCTVersion.hxx>
-
-#include <SUIT_Desktop.h>
-#include <SUIT_Session.h>
-#include <SUIT_ViewManager.h>
-#include <SUIT_Tools.h>
-#include <SUIT_ResourceMgr.h>
-#include <SUIT_MessageBox.h>
-#include <SUIT_Application.h>
-
-#include <QtxActionToolMgr.h>
-#include <QtxMultiAction.h>
-#include <QtxRubberBand.h>
-
-#include <OpenGLUtils_FrameBuffer.h>
-
-#include <QPainter>
-#include <QTime>
-#include <QImage>
-#include <QKeyEvent>
-#include <QMouseEvent>
-#include <QApplication>
-#include <QMenu>
-
-#include <AIS_ListOfInteractive.hxx>
-#include <AIS_ListIteratorOfListOfInteractive.hxx>
-#include <AIS_Shape.hxx>
-
-#include <BRep_Tool.hxx>
-#include <BRepBndLib.hxx>
-#include <TopoDS.hxx>
-
-#include <Graphic3d_MapIteratorOfMapOfStructure.hxx>
-#include <Graphic3d_MapOfStructure.hxx>
-#include <Graphic3d_Structure.hxx>
-#include <Graphic3d_ExportFormat.hxx>
-
-#include <Visual3d_View.hxx>
-#include <V3d_Plane.hxx>
-#include <V3d_Light.hxx>
-
-#include <gp_Dir.hxx>
-#include <gp_Pln.hxx>
-#include <TColgp_Array1OfPnt2d.hxx>
-
-#if OCC_VERSION_LARGE > 0x06060000
-#include <Graphic3d_SequenceOfHClipPlane.hxx>
-#include <Graphic3d_ClipPlane.hxx>
-
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE\r
+//\r
+// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,\r
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS\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
+// File : OCCViewer_ViewWindow.cxx\r
+// Author :\r
+\r
+#include "OCCViewer_ViewWindow.h"\r
+#include "OCCViewer_ViewModel.h"\r
+#include "OCCViewer_ViewPort3d.h"\r
+#include "OCCViewer_ViewManager.h"\r
+#include "OCCViewer_ViewSketcher.h"\r
+#include "OCCViewer_CreateRestoreViewDlg.h"\r
+#include "OCCViewer_ClipPlane.h"\r
+#include "OCCViewer_SetRotationPointDlg.h"\r
+#include "OCCViewer_AxialScaleDlg.h"\r
+#include "OCCViewer_CubeAxesDlg.h"\r
+#include "OCCViewer_ClippingDlg.h"\r
+\r
+#include <Basics_OCCTVersion.hxx>\r
+\r
+#include <SUIT_Desktop.h>\r
+#include <SUIT_Session.h>\r
+#include <SUIT_ViewManager.h>\r
+#include <SUIT_Tools.h>\r
+#include <SUIT_ResourceMgr.h>\r
+#include <SUIT_MessageBox.h>\r
+#include <SUIT_Application.h>\r
+\r
+#include <QtxActionToolMgr.h>\r
+#include <QtxMultiAction.h>\r
+#include <QtxRubberBand.h>\r
+\r
+#include <OpenGLUtils_FrameBuffer.h>\r
+\r
+#include <QPainter>\r
+#include <QTime>\r
+#include <QImage>\r
+#include <QKeyEvent>\r
+#include <QMouseEvent>\r
+#include <QApplication>\r
+#include <QMenu>\r
+\r
+#include <AIS_ListOfInteractive.hxx>\r
+#include <AIS_ListIteratorOfListOfInteractive.hxx>\r
+#include <AIS_Shape.hxx>\r
+\r
+#include <BRep_Tool.hxx>\r
+#include <BRepBndLib.hxx>\r
+#include <BRepGProp.hxx>\r
+#include <GProp_GProps.hxx>\r
+#include <TopoDS.hxx>\r
+\r
+#include <Graphic3d_MapIteratorOfMapOfStructure.hxx>\r
+#include <Graphic3d_MapOfStructure.hxx>\r
+#include <Graphic3d_Structure.hxx>\r
+#include <Graphic3d_ExportFormat.hxx>\r
+\r
+#include <Visual3d_View.hxx>\r
+#include <V3d_Plane.hxx>\r
+#include <V3d_Light.hxx>\r
+\r
+#include <gp_Dir.hxx>\r
+#include <gp_Pln.hxx>\r
+#include <gp_GTrsf.hxx>\r
+#include <TColgp_Array1OfPnt2d.hxx>\r
+\r
+#if OCC_VERSION_LARGE > 0x06060000 \r
+#include <Graphic3d_SequenceOfHClipPlane.hxx>\r
+#include <Graphic3d_ClipPlane.hxx>\r
+\r
+#endif\r
+\r
+#include <Standard_Version.hxx>\r
+\r
+#include "utilities.h"\r
+\r
+// // OpenCV includes\r
+// #include <cv.h>\r
+// #include <highgui.h>\r
+\r
+static QEvent* l_mbPressEvent = 0;\r
+\r
+#ifdef WIN32\r
+# include <QWindowsStyle>\r
+#endif\r
+\r
+#include <GL/gl.h>\r
+\r
+const char* imageZoomCursor[] = {\r
+"32 32 3 1",\r
+". c None",\r
+"a c #000000",\r
+"# c #ffffff",\r
+"................................",\r
+"................................",\r
+".#######........................",\r
+"..aaaaaaa.......................",\r
+"................................",\r
+".............#####..............",\r
+"...........##.aaaa##............",\r
+"..........#.aa.....a#...........",\r
+".........#.a.........#..........",\r
+".........#a..........#a.........",\r
+"........#.a...........#.........",\r
+"........#a............#a........",\r
+"........#a............#a........",\r
+"........#a............#a........",\r
+"........#a............#a........",\r
+".........#...........#.a........",\r
+".........#a..........#a.........",\r
+".........##.........#.a.........",\r
+"........#####.....##.a..........",\r
+".......###aaa#####.aa...........",\r
+"......###aa...aaaaa.......#.....",\r
+".....###aa................#a....",\r
+"....###aa.................#a....",\r
+"...###aa...............#######..",\r
+"....#aa.................aa#aaaa.",\r
+".....a....................#a....",\r
+"..........................#a....",\r
+"...........................a....",\r
+"................................",\r
+"................................",\r
+"................................",\r
+"................................"};\r
+\r
+const char* imageRotateCursor[] = {\r
+"32 32 3 1",\r
+". c None",\r
+"a c #000000",\r
+"# c #ffffff",\r
+"................................",\r
+"................................",\r
+"................................",\r
+"................................",\r
+"........#.......................",\r
+".......#.a......................",\r
+"......#######...................",\r
+".......#aaaaa#####..............",\r
+"........#..##.a#aa##........##..",\r
+".........a#.aa..#..a#.....##.aa.",\r
+".........#.a.....#...#..##.aa...",\r
+".........#a.......#..###.aa.....",\r
+"........#.a.......#a..#aa.......",\r
+"........#a.........#..#a........",\r
+"........#a.........#a.#a........",\r
+"........#a.........#a.#a........",\r
+"........#a.........#a.#a........",\r
+".........#.........#a#.a........",\r
+"........##a........#a#a.........",\r
+"......##.a#.......#.#.a.........",\r
+"....##.aa..##.....##.a..........",\r
+"..##.aa.....a#####.aa...........",\r
+"...aa.........aaa#a.............",\r
+"................#.a.............",\r
+"...............#.a..............",\r
+"..............#.a...............",\r
+"...............a................",\r
+"................................",\r
+"................................",\r
+"................................",\r
+"................................",\r
+"................................"};\r
+\r
+const char* imageCrossCursor[] = {\r
+ "32 32 3 1",\r
+ ". c None",\r
+ "a c #000000",\r
+ "# c #ffffff",\r
+ "................................",\r
+ "................................",\r
+ "................................",\r
+ "................................",\r
+ "................................",\r
+ "................................",\r
+ "................................",\r
+ "...............#................",\r
+ "...............#a...............",\r
+ "...............#a...............",\r
+ "...............#a...............",\r
+ "...............#a...............",\r
+ "...............#a...............",\r
+ "...............#a...............",\r
+ "...............#a...............",\r
+ ".......#################........",\r
+ "........aaaaaaa#aaaaaaaaa.......",\r
+ "...............#a...............",\r
+ "...............#a...............",\r
+ "...............#a...............",\r
+ "...............#a...............",\r
+ "...............#a...............",\r
+ "...............#a...............",\r
+ "...............#a...............",\r
+ "................a...............",\r
+ "................................",\r
+ "................................",\r
+ "................................",\r
+ "................................",\r
+ "................................",\r
+ "................................",\r
+ "................................"};\r
+\r
+\r
+/*!\r
+ \brief Constructor\r
+ \param theDesktop main window of application\r
+ \param theModel OCC 3D viewer\r
+*/\r
+OCCViewer_ViewWindow::OCCViewer_ViewWindow( SUIT_Desktop* theDesktop,\r
+ OCCViewer_Viewer* theModel )\r
+: SUIT_ViewWindow( theDesktop )\r
+{\r
+ myModel = theModel;\r
+ myRestoreFlag = 0;\r
+ myEnableDrawMode = false;\r
+ myDrawRect=false;\r
+ updateEnabledDrawMode();\r
+ myScalingDlg = 0;\r
+ mySetRotationPointDlg = 0;\r
+ myRectBand = 0;\r
+ \r
+ IsSketcherStyle = false;\r
+ myIsKeyFree = false;\r
+\r
+ mypSketcher = 0;\r
+ myCurSketch = -1;\r
+ my2dMode = No2dMode;\r
+\r
+ myInteractionStyle = SUIT_ViewModel::STANDARD;\r
+ myPreselectionEnabled = true;\r
+ mySelectionEnabled = true;\r
+\r
+\r
+ clearViewAspects();\r
+ \r
+}\r
+\r
+/*!\r
+ \brief Destructor.\r
+*/\r
+OCCViewer_ViewWindow::~OCCViewer_ViewWindow()\r
+{\r
+ endDrawRect();\r
+ qDeleteAll( mySketchers );\r
+}\r
+\r
+/*!\r
+ \brief Internal initialization.\r
+*/\r
+void OCCViewer_ViewWindow::initLayout()\r
+{\r
+ myViewPort = new OCCViewer_ViewPort3d( this, myModel->getViewer3d(), V3d_ORTHOGRAPHIC );\r
+ myViewPort->installEventFilter(this);\r
+ setCentralWidget(myViewPort);\r
+ myOperation = NOTHING;\r
+\r
+ myCurrPointType = GRAVITY;\r
+ myPrevPointType = GRAVITY;\r
+ mySelectedPoint = gp_Pnt(0.,0.,0.);\r
+ myRotationPointSelection = false;\r
+\r
+ setTransformRequested ( NOTHING );\r
+ setTransformInProcess ( false );\r
+\r
+ createActions();\r
+ createToolBar();\r
+\r
+ switch (my2dMode) {\r
+ case XYPlane:\r
+ onTopView();\r
+ break;\r
+ case XZPlane:\r
+ onLeftView();\r
+ break;\r
+ case YZPlane:\r
+ onFrontView();\r
+ break;\r
+ }\r
+\r
+ // Graduated axes dialog\r
+ QtxAction* anAction = dynamic_cast<QtxAction*>( toolMgr()->action( GraduatedAxesId ) );\r
+ myCubeAxesDlg = new OCCViewer_CubeAxesDlg( anAction, this, "OCCViewer_CubeAxesDlg" );\r
+ myCubeAxesDlg->initialize();\r
+ \r
+ connect( myViewPort, SIGNAL( vpTransformed( OCCViewer_ViewPort* ) ), this, SLOT( emitViewModified() ) );\r
+}\r
+\r
+OCCViewer_ViewWindow* OCCViewer_ViewWindow::getView( const int mode ) const\r
+{\r
+ return mode == get2dMode() ? const_cast<OCCViewer_ViewWindow*>( this ) : 0;\r
+}\r
+\r
+/*!\r
+ \brief Detect viewer operation according the the mouse button pressed\r
+ and key modifiers used.\r
+ \param theEvent mouse event\r
+ \return type of the operation\r
+*/\r
+OCCViewer_ViewWindow::OperationType\r
+OCCViewer_ViewWindow::getButtonState( QMouseEvent* theEvent, int theInteractionStyle )\r
+{\r
+ OperationType aOp = NOTHING;\r
+ SUIT_ViewModel::InteractionStyle aStyle = (SUIT_ViewModel::InteractionStyle)theInteractionStyle;\r
+ if( (theEvent->modifiers() == SUIT_ViewModel::myStateMap[aStyle][SUIT_ViewModel::ZOOM]) &&\r
+ (theEvent->buttons() == SUIT_ViewModel::myButtonMap[aStyle][SUIT_ViewModel::ZOOM]) )\r
+ aOp = ZOOMVIEW;\r
+ else if( (theEvent->modifiers() == SUIT_ViewModel::myStateMap[aStyle][SUIT_ViewModel::PAN]) &&\r
+ (theEvent->buttons() == SUIT_ViewModel::myButtonMap[aStyle][SUIT_ViewModel::PAN]) )\r
+ aOp = PANVIEW;\r
+ else if( (theEvent->modifiers() == SUIT_ViewModel::myStateMap[aStyle][SUIT_ViewModel::ROTATE]) &&\r
+ (theEvent->buttons() == SUIT_ViewModel::myButtonMap[aStyle][SUIT_ViewModel::ROTATE]) &&\r
+ (my2dMode == No2dMode))\r
+ aOp = ROTATE;\r
+\r
+ return aOp;\r
+}\r
+\r
+/*!\r
+ \brief Customize event handling\r
+ \param watched event receiver object\r
+ \param e event\r
+ \return \c true if the event processing should be stopped\r
+*/\r
+bool OCCViewer_ViewWindow::eventFilter( QObject* watched, QEvent* e )\r
+{\r
+ if ( watched == myViewPort ) {\r
+ int aType = e->type();\r
+ switch(aType) {\r
+ case QEvent::MouseButtonPress:\r
+ vpMousePressEvent((QMouseEvent*) e);\r
+ return true;\r
+\r
+ case QEvent::MouseButtonRelease:\r
+ vpMouseReleaseEvent((QMouseEvent*) e);\r
+ return true;\r
+\r
+ case QEvent::MouseMove:\r
+ vpMouseMoveEvent((QMouseEvent*) e);\r
+ return true;\r
+\r
+ case QEvent::MouseButtonDblClick:\r
+ emit mouseDoubleClicked(this, (QMouseEvent*)e);\r
+ return true;\r
+\r
+ case QEvent::Wheel:\r
+ {\r
+ QWheelEvent* aEvent = (QWheelEvent*) e;\r
+ myViewPort->startZoomAtPoint( aEvent->x(), aEvent->y() );\r
+ double delta = (double)( aEvent->delta() ) / ( 15 * 8 );\r
+ int x = aEvent->x();\r
+ int y = aEvent->y();\r
+ int x1 = (int)( aEvent->x() + width()*delta/100 );\r
+ int y1 = (int)( aEvent->y() + height()*delta/100 );\r
+ myViewPort->zoom( x, y, x1, y1 );\r
+ }\r
+ return true;\r
+\r
+ case QEvent::ContextMenu:\r
+ {\r
+ QContextMenuEvent * aEvent = (QContextMenuEvent*)e;\r
+ if ( aEvent->reason() != QContextMenuEvent::Mouse )\r
+ emit contextMenuRequested( aEvent );\r
+ }\r
+ return true;\r
+\r
+ case QEvent::KeyPress:\r
+ emit keyPressed(this, (QKeyEvent*) e);\r
+ return true;\r
+\r
+ default:\r
+ break;\r
+ }\r
+ }\r
+ return SUIT_ViewWindow::eventFilter(watched, e);\r
+}\r
+\r
+/*!\r
+ \brief Update state of enable draw mode state.\r
+*/\r
+void OCCViewer_ViewWindow::updateEnabledDrawMode()\r
+{\r
+ if ( myModel )\r
+ myEnableDrawMode = myModel->isSelectionEnabled() && myModel->isMultiSelectionEnabled();\r
+}\r
+\r
+/*!\r
+ \brief Handle mouse press event\r
+ \param theEvent mouse event\r
+*/\r
+void OCCViewer_ViewWindow::vpMousePressEvent( QMouseEvent* theEvent )\r
+{\r
+ myStartX = theEvent->x();\r
+ myStartY = theEvent->y();\r
+ int anInteractionStyle = interactionStyle();\r
+\r
+ // in "key free" interaction style zoom operation is activated by two buttons (simultaneously pressed),\r
+ // which are assigned for pan and rotate - these operations are activated immediately after pressing \r
+ // of the first button, so it is necessary to switch to zoom when the second button is pressed\r
+ bool aSwitchToZoom = false;\r
+ if ( anInteractionStyle == SUIT_ViewModel::KEY_FREE && \r
+ ( myOperation == PANVIEW || myOperation == ROTATE ) ) {\r
+ aSwitchToZoom = getButtonState( theEvent, anInteractionStyle ) == ZOOMVIEW;\r
+ }\r
+\r
+ switch ( myOperation ) {\r
+ case WINDOWFIT:\r
+ if ( theEvent->button() == Qt::LeftButton )\r
+ emit vpTransformationStarted ( WINDOWFIT );\r
+ break;\r
+\r
+ case PANGLOBAL:\r
+ if ( theEvent->button() == Qt::LeftButton )\r
+ emit vpTransformationStarted ( PANGLOBAL );\r
+ break;\r
+\r
+ case ZOOMVIEW:\r
+ if ( theEvent->button() == Qt::LeftButton ) {\r
+ myViewPort->startZoomAtPoint( myStartX, myStartY );\r
+ emit vpTransformationStarted ( ZOOMVIEW );\r
+ }\r
+ break;\r
+\r
+ case PANVIEW:\r
+ if ( aSwitchToZoom ) {\r
+ myViewPort->startZoomAtPoint( myStartX, myStartY );\r
+ activateZoom();\r
+ }\r
+ else if ( theEvent->button() == Qt::LeftButton )\r
+ emit vpTransformationStarted ( PANVIEW );\r
+ break;\r
+\r
+ case ROTATE:\r
+ if ( aSwitchToZoom ) {\r
+ myViewPort->startZoomAtPoint( myStartX, myStartY );\r
+ activateZoom();\r
+ }\r
+ else if ( theEvent->button() == Qt::LeftButton ) {\r
+ myViewPort->startRotation(myStartX, myStartY, myCurrPointType, mySelectedPoint);\r
+ emit vpTransformationStarted ( ROTATE );\r
+ }\r
+ break;\r
+\r
+ default:\r
+ /* Try to activate a transformation */\r
+ OperationType aState;\r
+ if ( interactionStyle() == SUIT_ViewModel::STANDARD )\r
+ aState = getButtonState(theEvent, anInteractionStyle);\r
+ else {\r
+ aState = OCCViewer_ViewWindow::NOTHING;\r
+ myIsKeyFree = true;\r
+ }\r
+ switch ( aState ) {\r
+ case ZOOMVIEW:\r
+ myViewPort->startZoomAtPoint( myStartX, myStartY );\r
+ activateZoom();\r
+ break;\r
+ case PANVIEW:\r
+ activatePanning();\r
+ break;\r
+ case ROTATE:\r
+ activateRotation();\r
+ myViewPort->startRotation(myStartX, myStartY, myCurrPointType, mySelectedPoint);\r
+ break;\r
+ default:\r
+ if ( myRotationPointSelection )\r
+ {\r
+ if ( theEvent->button() == Qt::LeftButton )\r
+ {\r
+ Handle(AIS_InteractiveContext) ic = myModel->getAISContext();\r
+ ic->Select();\r
+ for ( ic->InitSelected(); ic->MoreSelected(); ic->NextSelected() )\r
+ {\r
+ TopoDS_Shape aShape = ic->SelectedShape();\r
+ GProp_GProps aSystem;\r
+ gp_Pnt aPnt;\r
+ if ( !aShape.IsNull() && aShape.ShapeType() == TopAbs_VERTEX )\r
+ {\r
+ aPnt = BRep_Tool::Pnt( TopoDS::Vertex( aShape ) );\r
+ }\r
+ else if ( !aShape.IsNull() && aShape.ShapeType() == TopAbs_EDGE )\r
+ {\r
+ BRepGProp::LinearProperties( aShape, aSystem );\r
+ aPnt = aSystem.CentreOfMass();\r
+ }\r
+ else if ( !aShape.IsNull() && aShape.ShapeType() == TopAbs_FACE )\r
+ {\r
+ BRepGProp::SurfaceProperties( aShape, aSystem );\r
+ aPnt = aSystem.CentreOfMass();\r
+ }\r
+ else if ( !aShape.IsNull() && aShape.ShapeType() == TopAbs_SOLID )\r
+ {\r
+ BRepGProp::VolumeProperties( aShape, aSystem );\r
+ aPnt = aSystem.CentreOfMass();\r
+ }\r
+ else\r
+ {\r
+ myCurrPointType = myPrevPointType;\r
+ break;\r
+ }\r
+\r
+ if ( mySetRotationPointDlg )\r
+ {\r
+ myRotationPointSelection = false;\r
+ mySetRotationPointDlg->setCoords(aPnt.X(), aPnt.Y(), aPnt.Z());\r
+ }\r
+ }\r
+ if ( ic->NbSelected() == 0 ) myCurrPointType = myPrevPointType;\r
+ if ( mySetRotationPointDlg ) mySetRotationPointDlg->toggleChange();\r
+ ic->CloseAllContexts();\r
+ myOperation = NOTHING;\r
+ myViewPort->setCursor( myCursor );\r
+ myCursorIsHand = false;\r
+ myRotationPointSelection = false;\r
+ }\r
+ }\r
+ else\r
+ emit mousePressed(this, theEvent);\r
+ break;\r
+ }\r
+ /* notify that we start a transformation */\r
+ if ( transformRequested() )\r
+ emit vpTransformationStarted ( myOperation );\r
+ }\r
+ if ( transformRequested() )\r
+ setTransformInProcess( true );\r
+\r
+ /* we may need it for sketching... */\r
+ if ( l_mbPressEvent )\r
+ delete l_mbPressEvent;\r
+ l_mbPressEvent = new QMouseEvent( *theEvent );\r
+}\r
+\r
+\r
+/*!\r
+ \brief Start zooming operation.\r
+\r
+ Sets the corresponding cursor for the widget.\r
+*/\r
+void OCCViewer_ViewWindow::activateZoom()\r
+{\r
+ if ( !transformRequested() && !myCursorIsHand )\r
+ myCursor = cursor(); /* save old cursor */\r
+\r
+ if ( myOperation != ZOOMVIEW ) {\r
+ QPixmap zoomPixmap (imageZoomCursor);\r
+ QCursor zoomCursor (zoomPixmap);\r
+ if( setTransformRequested ( ZOOMVIEW ) )\r
+ myViewPort->setCursor( zoomCursor );\r
+ }\r
+}\r
+\r
+\r
+/*!\r
+ \brief Start panning operation.\r
+\r
+ Sets the corresponding cursor for the widget.\r
+*/\r
+void OCCViewer_ViewWindow::activatePanning()\r
+{\r
+ if ( !transformRequested() && !myCursorIsHand )\r
+ myCursor = cursor(); // save old cursor\r
+\r
+ if ( myOperation != PANVIEW ) {\r
+ QCursor panCursor (Qt::SizeAllCursor);\r
+ if( setTransformRequested ( PANVIEW ) )\r
+ myViewPort->setCursor( panCursor );\r
+ }\r
+}\r
+\r
+/*!\r
+ \brief Start rotation operation\r
+\r
+ Sets the corresponding cursor for the widget.\r
+*/\r
+void OCCViewer_ViewWindow::activateRotation()\r
+{\r
+ if ( !transformRequested() && !myCursorIsHand )\r
+ myCursor = cursor(); // save old cursor\r
+\r
+ if ( myOperation != ROTATE ) {\r
+ QPixmap rotatePixmap (imageRotateCursor);\r
+ QCursor rotCursor (rotatePixmap);\r
+ if( setTransformRequested ( ROTATE ) )\r
+ myViewPort->setCursor( rotCursor );\r
+ }\r
+}\r
+\r
+/*!\r
+ \brief Compute the gravity center.\r
+ \param theX used to return X coordinate of the gravity center\r
+ \param theY used to return Y coordinate of the gravity center\r
+ \param theZ used to return Z coordinate of the gravity center\r
+ \return \c true if the gravity center is computed\r
+*/\r
+bool OCCViewer_ViewWindow::computeGravityCenter( double& theX, double& theY, double& theZ )\r
+{\r
+ Handle(V3d_View) aView3d = myViewPort->getView();\r
+\r
+ // Project boundaries points and add to avergae gravity\r
+ // the ones which lie within the screen limits\r
+ Standard_Real aScreenLimits[4] = { 0.0, 0.0, 0.0, 0.0 };\r
+\r
+#if OCC_VERSION_LARGE > 0x06070100\r
+ // NDC space screen limits\r
+ aScreenLimits[0] = -1.0;\r
+ aScreenLimits[1] = 1.0;\r
+ aScreenLimits[2] = -1.0;\r
+ aScreenLimits[3] = 1.0;\r
+#else\r
+ aView3d->View()->ViewMapping().WindowLimit( aScreenLimits[0],\r
+ aScreenLimits[1],\r
+ aScreenLimits[2],\r
+ aScreenLimits[3] );\r
+#endif\r
+\r
+ Standard_Integer aPointsNb = 0;\r
+\r
+ Standard_Real aXmin = 0.0;\r
+ Standard_Real aYmin = 0.0;\r
+ Standard_Real aZmin = 0.0;\r
+ Standard_Real aXmax = 0.0;\r
+ Standard_Real aYmax = 0.0;\r
+ Standard_Real aZmax = 0.0;\r
+\r
+ Graphic3d_MapOfStructure aSetOfStructures;\r
+ aView3d->View()->DisplayedStructures( aSetOfStructures );\r
+ Graphic3d_MapIteratorOfMapOfStructure aStructureIt( aSetOfStructures );\r
+\r
+ for( ; aStructureIt.More(); aStructureIt.Next() ) {\r
+ const Handle(Graphic3d_Structure)& aStructure = aStructureIt.Key();\r
+ if ( aStructure->IsEmpty() ) {\r
+ continue;\r
+ }\r
+\r
+ aStructure->MinMaxValues( aXmin, aYmin, aZmin, aXmax, aYmax, aZmax );\r
+\r
+ // Infinite structures are skipped\r
+ Standard_Real aLIM = ShortRealLast() - 1.0;\r
+ if ( Abs( aXmin ) > aLIM || Abs( aYmin ) > aLIM || Abs( aZmin ) > aLIM\r
+ || Abs( aXmax ) > aLIM || Abs( aYmax ) > aLIM || Abs( aZmax ) > aLIM ) {\r
+ continue;\r
+ }\r
+\r
+ gp_Pnt aPoints[8] = {
+ gp_Pnt( aXmin, aYmin, aZmin ), gp_Pnt( aXmin, aYmin, aZmax ),
+ gp_Pnt( aXmin, aYmax, aZmin ), gp_Pnt( aXmin, aYmax, aZmax ),
+ gp_Pnt( aXmax, aYmin, aZmin ), gp_Pnt( aXmax, aYmin, aZmax ),
+ gp_Pnt( aXmax, aYmax, aZmin ), gp_Pnt( aXmax, aYmax, aZmax )
+ };
+\r
+ for ( Standard_Integer aPointIt = 0; aPointIt < 8; ++aPointIt ) {\r
+ const gp_Pnt& aBBPoint = aPoints[aPointIt];
+
+#if OCC_VERSION_LARGE > 0x06070100
+ gp_Pnt aProjected = aView3d->Camera()->Project( aBBPoint );
+ const Standard_Real& U = aProjected.X();
+ const Standard_Real& V = aProjected.Y();
+#else
+ Standard_Real U = 0.0;
+ Standard_Real V = 0.0;
+ Standard_Real W = 0.0;
+ aView3d->View()->Projects( aBBPoint.X(), aBBPoint.Y(), aBBPoint.Z(), U, V, W );
#endif
-#include <Standard_Version.hxx>
-
-#include "utilities.h"
-
-// // OpenCV includes
-// #include <cv.h>
-// #include <highgui.h>
-
-static QEvent* l_mbPressEvent = 0;
-
-#ifdef WIN32
-# include <QWindowsStyle>
-#endif
-
-#include <GL/gl.h>
-
-const char* imageZoomCursor[] = {
-"32 32 3 1",
-". c None",
-"a c #000000",
-"# c #ffffff",
-"................................",
-"................................",
-".#######........................",
-"..aaaaaaa.......................",
-"................................",
-".............#####..............",
-"...........##.aaaa##............",
-"..........#.aa.....a#...........",
-".........#.a.........#..........",
-".........#a..........#a.........",
-"........#.a...........#.........",
-"........#a............#a........",
-"........#a............#a........",
-"........#a............#a........",
-"........#a............#a........",
-".........#...........#.a........",
-".........#a..........#a.........",
-".........##.........#.a.........",
-"........#####.....##.a..........",
-".......###aaa#####.aa...........",
-"......###aa...aaaaa.......#.....",
-".....###aa................#a....",
-"....###aa.................#a....",
-"...###aa...............#######..",
-"....#aa.................aa#aaaa.",
-".....a....................#a....",
-"..........................#a....",
-"...........................a....",
-"................................",
-"................................",
-"................................",
-"................................"};
-
-const char* imageRotateCursor[] = {
-"32 32 3 1",
-". c None",
-"a c #000000",
-"# c #ffffff",
-"................................",
-"................................",
-"................................",
-"................................",
-"........#.......................",
-".......#.a......................",
-"......#######...................",
-".......#aaaaa#####..............",
-"........#..##.a#aa##........##..",
-".........a#.aa..#..a#.....##.aa.",
-".........#.a.....#...#..##.aa...",
-".........#a.......#..###.aa.....",
-"........#.a.......#a..#aa.......",
-"........#a.........#..#a........",
-"........#a.........#a.#a........",
-"........#a.........#a.#a........",
-"........#a.........#a.#a........",
-".........#.........#a#.a........",
-"........##a........#a#a.........",
-"......##.a#.......#.#.a.........",
-"....##.aa..##.....##.a..........",
-"..##.aa.....a#####.aa...........",
-"...aa.........aaa#a.............",
-"................#.a.............",
-"...............#.a..............",
-"..............#.a...............",
-"...............a................",
-"................................",
-"................................",
-"................................",
-"................................",
-"................................"};
-
-const char* imageCrossCursor[] = {
- "32 32 3 1",
- ". c None",
- "a c #000000",
- "# c #ffffff",
- "................................",
- "................................",
- "................................",
- "................................",
- "................................",
- "................................",
- "................................",
- "...............#................",
- "...............#a...............",
- "...............#a...............",
- "...............#a...............",
- "...............#a...............",
- "...............#a...............",
- "...............#a...............",
- "...............#a...............",
- ".......#################........",
- "........aaaaaaa#aaaaaaaaa.......",
- "...............#a...............",
- "...............#a...............",
- "...............#a...............",
- "...............#a...............",
- "...............#a...............",
- "...............#a...............",
- "...............#a...............",
- "................a...............",
- "................................",
- "................................",
- "................................",
- "................................",
- "................................",
- "................................",
- "................................"};
-
-
-/*!
- \brief Constructor
- \param theDesktop main window of application
- \param theModel OCC 3D viewer
-*/
-OCCViewer_ViewWindow::OCCViewer_ViewWindow( SUIT_Desktop* theDesktop,
- OCCViewer_Viewer* theModel )
-: SUIT_ViewWindow( theDesktop )
-{
- myModel = theModel;
- myRestoreFlag = 0;
- myEnableDrawMode = false;
- myDrawRect=false;
- updateEnabledDrawMode();
- myScalingDlg = 0;
- mySetRotationPointDlg = 0;
- myRectBand = 0;
-
- IsSketcherStyle = false;
- myIsKeyFree = false;
-
- mypSketcher = 0;
- myCurSketch = -1;
- my2dMode = No2dMode;
-
- myInteractionStyle = SUIT_ViewModel::STANDARD;
- myPreselectionEnabled = true;
- mySelectionEnabled = true;
-
-
- clearViewAspects();
-
-}
-
-/*!
- \brief Destructor.
-*/
-OCCViewer_ViewWindow::~OCCViewer_ViewWindow()
-{
- endDrawRect();
- qDeleteAll( mySketchers );
-}
-
-/*!
- \brief Internal initialization.
-*/
-void OCCViewer_ViewWindow::initLayout()
-{
- myViewPort = new OCCViewer_ViewPort3d( this, myModel->getViewer3d(), V3d_ORTHOGRAPHIC );
- myViewPort->installEventFilter(this);
- setCentralWidget(myViewPort);
- myOperation = NOTHING;
-
- myCurrPointType = GRAVITY;
- myPrevPointType = GRAVITY;
- mySelectedPoint = gp_Pnt(0.,0.,0.);
- myRotationPointSelection = false;
-
- setTransformRequested ( NOTHING );
- setTransformInProcess ( false );
-
- createActions();
- createToolBar();
-
- switch (my2dMode) {
- case XYPlane:
- onTopView();
- break;
- case XZPlane:
- onLeftView();
- break;
- case YZPlane:
- onFrontView();
- break;
- }
-
- // Graduated axes dialog
- QtxAction* anAction = dynamic_cast<QtxAction*>( toolMgr()->action( GraduatedAxesId ) );
- myCubeAxesDlg = new OCCViewer_CubeAxesDlg( anAction, this, "OCCViewer_CubeAxesDlg" );
- myCubeAxesDlg->initialize();
-
- connect( myViewPort, SIGNAL( vpTransformed( OCCViewer_ViewPort* ) ), this, SLOT( emitViewModified() ) );
-}
-
-OCCViewer_ViewWindow* OCCViewer_ViewWindow::getView( const int mode ) const
-{
- return mode == get2dMode() ? const_cast<OCCViewer_ViewWindow*>( this ) : 0;
-}
-
-/*!
- \brief Detect viewer operation according the the mouse button pressed
- and key modifiers used.
- \param theEvent mouse event
- \return type of the operation
-*/
-OCCViewer_ViewWindow::OperationType
-OCCViewer_ViewWindow::getButtonState( QMouseEvent* theEvent, int theInteractionStyle )
-{
- OperationType aOp = NOTHING;
- SUIT_ViewModel::InteractionStyle aStyle = (SUIT_ViewModel::InteractionStyle)theInteractionStyle;
- if( (theEvent->modifiers() == SUIT_ViewModel::myStateMap[aStyle][SUIT_ViewModel::ZOOM]) &&
- (theEvent->buttons() == SUIT_ViewModel::myButtonMap[aStyle][SUIT_ViewModel::ZOOM]) )
- aOp = ZOOMVIEW;
- else if( (theEvent->modifiers() == SUIT_ViewModel::myStateMap[aStyle][SUIT_ViewModel::PAN]) &&
- (theEvent->buttons() == SUIT_ViewModel::myButtonMap[aStyle][SUIT_ViewModel::PAN]) )
- aOp = PANVIEW;
- else if( (theEvent->modifiers() == SUIT_ViewModel::myStateMap[aStyle][SUIT_ViewModel::ROTATE]) &&
- (theEvent->buttons() == SUIT_ViewModel::myButtonMap[aStyle][SUIT_ViewModel::ROTATE]) &&
- (my2dMode == No2dMode))
- aOp = ROTATE;
-
- return aOp;
-}
-
-/*!
- \brief Customize event handling
- \param watched event receiver object
- \param e event
- \return \c true if the event processing should be stopped
-*/
-bool OCCViewer_ViewWindow::eventFilter( QObject* watched, QEvent* e )
-{
- if ( watched == myViewPort ) {
- int aType = e->type();
- switch(aType) {
- case QEvent::MouseButtonPress:
- vpMousePressEvent((QMouseEvent*) e);
- return true;
-
- case QEvent::MouseButtonRelease:
- vpMouseReleaseEvent((QMouseEvent*) e);
- return true;
-
- case QEvent::MouseMove:
- vpMouseMoveEvent((QMouseEvent*) e);
- return true;
-
- case QEvent::MouseButtonDblClick:
- emit mouseDoubleClicked(this, (QMouseEvent*)e);
- return true;
-
- case QEvent::Wheel:
- {
- QWheelEvent* aEvent = (QWheelEvent*) e;
- myViewPort->startZoomAtPoint( aEvent->x(), aEvent->y() );
- double delta = (double)( aEvent->delta() ) / ( 15 * 8 );
- int x = aEvent->x();
- int y = aEvent->y();
- int x1 = (int)( aEvent->x() + width()*delta/100 );
- int y1 = (int)( aEvent->y() + height()*delta/100 );
- myViewPort->zoom( x, y, x1, y1 );
- }
- return true;
-
- case QEvent::ContextMenu:
+ if (U >= aScreenLimits[0]
+ && U <= aScreenLimits[1]
+ && V >= aScreenLimits[2]
+ && V <= aScreenLimits[3])
{
- QContextMenuEvent * aEvent = (QContextMenuEvent*)e;
- if ( aEvent->reason() != QContextMenuEvent::Mouse )
- emit contextMenuRequested( aEvent );
- }
- return true;
-
- case QEvent::KeyPress:
- emit keyPressed(this, (QKeyEvent*) e);
- return true;
-
- default:
- break;
- }
- }
- return SUIT_ViewWindow::eventFilter(watched, e);
-}
-
-/*!
- \brief Update state of enable draw mode state.
-*/
-void OCCViewer_ViewWindow::updateEnabledDrawMode()
-{
- if ( myModel )
- myEnableDrawMode = myModel->isSelectionEnabled() && myModel->isMultiSelectionEnabled();
-}
-
-/*!
- \brief Handle mouse press event
- \param theEvent mouse event
-*/
-void OCCViewer_ViewWindow::vpMousePressEvent( QMouseEvent* theEvent )
-{
- myStartX = theEvent->x();
- myStartY = theEvent->y();
- int anInteractionStyle = interactionStyle();
-
- // in "key free" interaction style zoom operation is activated by two buttons (simultaneously pressed),
- // which are assigned for pan and rotate - these operations are activated immediately after pressing
- // of the first button, so it is necessary to switch to zoom when the second button is pressed
- bool aSwitchToZoom = false;
- if ( anInteractionStyle == SUIT_ViewModel::KEY_FREE &&
- ( myOperation == PANVIEW || myOperation == ROTATE ) ) {
- aSwitchToZoom = getButtonState( theEvent, anInteractionStyle ) == ZOOMVIEW;
- }
-
- switch ( myOperation ) {
- case WINDOWFIT:
- if ( theEvent->button() == Qt::LeftButton )
- emit vpTransformationStarted ( WINDOWFIT );
- break;
-
- case PANGLOBAL:
- if ( theEvent->button() == Qt::LeftButton )
- emit vpTransformationStarted ( PANGLOBAL );
- break;
-
- case ZOOMVIEW:
- if ( theEvent->button() == Qt::LeftButton ) {
- myViewPort->startZoomAtPoint( myStartX, myStartY );
- emit vpTransformationStarted ( ZOOMVIEW );
- }
- break;
-
- case PANVIEW:
- if ( aSwitchToZoom ) {
- myViewPort->startZoomAtPoint( myStartX, myStartY );
- activateZoom();
- }
- else if ( theEvent->button() == Qt::LeftButton )
- emit vpTransformationStarted ( PANVIEW );
- break;
-
- case ROTATE:
- if ( aSwitchToZoom ) {
- myViewPort->startZoomAtPoint( myStartX, myStartY );
- activateZoom();
- }
- else if ( theEvent->button() == Qt::LeftButton ) {
- myViewPort->startRotation(myStartX, myStartY, myCurrPointType, mySelectedPoint);
- emit vpTransformationStarted ( ROTATE );
- }
- break;
-
- default:
- /* Try to activate a transformation */
- OperationType aState;
- if ( interactionStyle() == SUIT_ViewModel::STANDARD )
- aState = getButtonState(theEvent, anInteractionStyle);
- else {
- aState = OCCViewer_ViewWindow::NOTHING;
- myIsKeyFree = true;
- }
- switch ( aState ) {
- case ZOOMVIEW:
- myViewPort->startZoomAtPoint( myStartX, myStartY );
- activateZoom();
- break;
- case PANVIEW:
- activatePanning();
- break;
- case ROTATE:
- activateRotation();
- myViewPort->startRotation(myStartX, myStartY, myCurrPointType, mySelectedPoint);
- break;
- default:
- if ( myRotationPointSelection )
- {
- if ( theEvent->button() == Qt::LeftButton )
- {
- Handle(AIS_InteractiveContext) ic = myModel->getAISContext();
- ic->Select();
- for ( ic->InitSelected(); ic->MoreSelected(); ic->NextSelected() )
- {
- TopoDS_Shape aShape = ic->SelectedShape();
- if ( !aShape.IsNull() && aShape.ShapeType() == TopAbs_VERTEX )
- {
- gp_Pnt aPnt = BRep_Tool::Pnt( TopoDS::Vertex( ic->SelectedShape() ) );
- if ( mySetRotationPointDlg )
- {
- myRotationPointSelection = false;
- mySetRotationPointDlg->setCoords(aPnt.X(), aPnt.Y(), aPnt.Z());
- }
- }
- else
- {
- myCurrPointType = myPrevPointType;
- break;
- }
- }
- if ( ic->NbSelected() == 0 ) myCurrPointType = myPrevPointType;
- if ( mySetRotationPointDlg ) mySetRotationPointDlg->toggleChange();
- ic->CloseAllContexts();
- myOperation = NOTHING;
- myViewPort->setCursor( myCursor );
- myCursorIsHand = false;
- myRotationPointSelection = false;
- }
- }
- else
- emit mousePressed(this, theEvent);
- break;
- }
- /* notify that we start a transformation */
- if ( transformRequested() )
- emit vpTransformationStarted ( myOperation );
- }
- if ( transformRequested() )
- setTransformInProcess( true );
-
- /* we may need it for sketching... */
- if ( l_mbPressEvent )
- delete l_mbPressEvent;
- l_mbPressEvent = new QMouseEvent( *theEvent );
-}
-
-
-/*!
- \brief Start zooming operation.
-
- Sets the corresponding cursor for the widget.
-*/
-void OCCViewer_ViewWindow::activateZoom()
-{
- if ( !transformRequested() && !myCursorIsHand )
- myCursor = cursor(); /* save old cursor */
-
- if ( myOperation != ZOOMVIEW ) {
- QPixmap zoomPixmap (imageZoomCursor);
- QCursor zoomCursor (zoomPixmap);
- if( setTransformRequested ( ZOOMVIEW ) )
- myViewPort->setCursor( zoomCursor );
- }
-}
-
-
-/*!
- \brief Start panning operation.
-
- Sets the corresponding cursor for the widget.
-*/
-void OCCViewer_ViewWindow::activatePanning()
-{
- if ( !transformRequested() && !myCursorIsHand )
- myCursor = cursor(); // save old cursor
-
- if ( myOperation != PANVIEW ) {
- QCursor panCursor (Qt::SizeAllCursor);
- if( setTransformRequested ( PANVIEW ) )
- myViewPort->setCursor( panCursor );
- }
-}
-
-/*!
- \brief Start rotation operation
-
- Sets the corresponding cursor for the widget.
-*/
-void OCCViewer_ViewWindow::activateRotation()
-{
- if ( !transformRequested() && !myCursorIsHand )
- myCursor = cursor(); // save old cursor
-
- if ( myOperation != ROTATE ) {
- QPixmap rotatePixmap (imageRotateCursor);
- QCursor rotCursor (rotatePixmap);
- if( setTransformRequested ( ROTATE ) )
- myViewPort->setCursor( rotCursor );
- }
-}
-
-/*!
- \brief Compute the gravity center.
- \param theX used to return X coordinate of the gravity center
- \param theY used to return Y coordinate of the gravity center
- \param theZ used to return Z coordinate of the gravity center
- \return \c true if the gravity center is computed
-*/
-bool OCCViewer_ViewWindow::computeGravityCenter( double& theX, double& theY, double& theZ )
-{
- Handle(Visual3d_View) aView = myViewPort->getView()->View();
-
- Standard_Real Xmin,Ymin,Zmin,Xmax,Ymax,Zmax,U,V,W ;
- Standard_Real Umin,Vmin,Umax,Vmax ;
- Standard_Integer Nstruct,Npoint ;
- Graphic3d_MapOfStructure MySetOfStructures;
-
- aView->DisplayedStructures (MySetOfStructures);
- Nstruct = MySetOfStructures.Extent() ;
-
- Graphic3d_MapIteratorOfMapOfStructure MyIterator(MySetOfStructures) ;
- aView->ViewMapping().WindowLimit(Umin,Vmin,Umax,Vmax) ;
- Npoint = 0 ; theX = theY = theZ = 0. ;
- for( ; MyIterator.More(); MyIterator.Next()) {
- if (!(MyIterator.Key())->IsEmpty()) {
- (MyIterator.Key())->MinMaxValues(Xmin,Ymin,Zmin,
- Xmax,Ymax,Zmax) ;
-
- Standard_Real LIM = ShortRealLast() -1.;
- if (! (fabs(Xmin) > LIM || fabs(Ymin) > LIM || fabs(Zmin) > LIM
- || fabs(Xmax) > LIM || fabs(Ymax) > LIM || fabs(Zmax) > LIM )) {
-
- aView->Projects(Xmin,Ymin,Zmin,U,V,W) ;
- if( U >= Umin && U <= Umax && V >= Vmin && V <= Vmax ) {
- Npoint++ ; theX += Xmin ; theY += Ymin ; theZ += Zmin ;
- }
- aView->Projects(Xmax,Ymin,Zmin,U,V,W) ;
- if( U >= Umin && U <= Umax && V >= Vmin && V <= Vmax ) {
- Npoint++ ; theX += Xmax ; theY += Ymin ; theZ += Zmin ;
- }
- aView->Projects(Xmin,Ymax,Zmin,U,V,W) ;
- if( U >= Umin && U <= Umax && V >= Vmin && V <= Vmax ) {
- Npoint++ ; theX += Xmin ; theY += Ymax ; theZ += Zmin ;
- }
- aView->Projects(Xmax,Ymax,Zmin,U,V,W) ;
- if( U >= Umin && U <= Umax && V >= Vmin && V <= Vmax ) {
- Npoint++ ; theX += Xmax ; theY += Ymax ; theZ += Zmin ;
- }
- aView->Projects(Xmin,Ymin,Zmax,U,V,W) ;
- if( U >= Umin && U <= Umax && V >= Vmin && V <= Vmax ) {
- Npoint++ ; theX += Xmin ; theY += Ymin ; theZ += Zmax ;
- }
- aView->Projects(Xmax,Ymin,Zmax,U,V,W) ;
- if( U >= Umin && U <= Umax && V >= Vmin && V <= Vmax ) {
- Npoint++ ; theX += Xmax ; theY += Ymin ; theZ += Zmax ;
- }
- aView->Projects(Xmin,Ymax,Zmax,U,V,W) ;
- if( U >= Umin && U <= Umax && V >= Vmin && V <= Vmax ) {
- Npoint++ ; theX += Xmin ; theY += Ymax ; theZ += Zmax ;
- }
- aView->Projects(Xmax,Ymax,Zmax,U,V,W) ;
- if( U >= Umin && U <= Umax && V >= Vmin && V <= Vmax ) {
- Npoint++ ; theX += Xmax ; theY += Ymax ; theZ += Zmax ;
- }
- }
- }
- }
- if( Npoint > 0 ) {
- theX /= Npoint ; theY /= Npoint ; theZ /= Npoint ;
- }
- return true;
-}
-
-/*!
- \brief Set the gravity center as a rotation point.
-*/
-void OCCViewer_ViewWindow::activateSetRotationGravity()
-{
- if ( myRotationPointSelection )
- {
- Handle(AIS_InteractiveContext) ic = myModel->getAISContext();
- ic->CloseAllContexts();
- myOperation = NOTHING;
- myViewPort->setCursor( myCursor );
- myCursorIsHand = false;
- myRotationPointSelection = false;
- }
-
- myPrevPointType = myCurrPointType;
- myCurrPointType = GRAVITY;
-
- Standard_Real Xcenter, Ycenter, Zcenter;
- if ( computeGravityCenter( Xcenter, Ycenter, Zcenter ) )
- mySetRotationPointDlg->setCoords( Xcenter, Ycenter, Zcenter );
-}
-
-/*!
- \brief Update gravity center in the "Set Rotation Point" dialog box.
- \sa OCCViewer_SetRotationPointDlg class
-*/
-void OCCViewer_ViewWindow::updateGravityCoords()
-{
- if ( mySetRotationPointDlg && mySetRotationPointDlg->isVisible() && myCurrPointType == GRAVITY )
- {
- Standard_Real Xcenter, Ycenter, Zcenter;
- if ( computeGravityCenter( Xcenter, Ycenter, Zcenter ) )
- mySetRotationPointDlg->setCoords( Xcenter, Ycenter, Zcenter );
- }
-}
-
-/*!
- \brief Set the point selected by the user as a rotation point.
- \param theX X coordinate of the rotation point
- \param theY Y coordinate of the rotation point
- \param theZ Z coordinate of the rotation point
-*/
-void OCCViewer_ViewWindow::activateSetRotationSelected( double theX, double theY, double theZ )
-{
- if ( myRotationPointSelection )
- {
- Handle(AIS_InteractiveContext) ic = myModel->getAISContext();
- ic->CloseAllContexts();
- myOperation = NOTHING;
- myViewPort->setCursor( myCursor );
- myCursorIsHand = false;
- myRotationPointSelection = false;
- }
-
- myPrevPointType = myCurrPointType;
- myCurrPointType = SELECTED;
- mySelectedPoint.SetCoord(theX,theY,theZ);
-}
-
-/*!
- \brief Start the point selection process.
-*/
-void OCCViewer_ViewWindow::activateStartPointSelection()
-{
- myPrevPointType = myCurrPointType;
- myCurrPointType = SELECTED;
-
- // activate selection ------>
- Handle(AIS_InteractiveContext) ic = myModel->getAISContext();
-
- ic->OpenLocalContext();
-
- AIS_ListOfInteractive aList;
- ic->DisplayedObjects( aList );
- for ( AIS_ListIteratorOfListOfInteractive it( aList ); it.More(); it.Next() )
- {
- Handle(AIS_InteractiveObject) anObj = it.Value();
- if ( !anObj.IsNull() && anObj->HasPresentation() &&
- anObj->IsKind( STANDARD_TYPE(AIS_Shape) ) )
- {
- ic->Load(anObj,-1);
- ic->Activate(anObj,AIS_Shape::SelectionMode(TopAbs_VERTEX));
- }
- }
- // activate selection <------
-
- if ( !myCursorIsHand )
- {
- QCursor handCursor (Qt::PointingHandCursor);
- myCursorIsHand = true;
- myCursor = cursor();
- myViewPort->setCursor( handCursor );
- }
- myRotationPointSelection = true;
-}
-
-/*!
- \brief Start global panning operation
-
- Sets the corresponding cursor for the widget.
-*/
-void OCCViewer_ViewWindow::activateGlobalPanning()
-{
- Handle(V3d_View) aView3d = myViewPort->getView();
- if ( !aView3d.IsNull() ) {
- QPixmap globalPanPixmap (imageCrossCursor);
- QCursor glPanCursor (globalPanPixmap);
- myCurScale = aView3d->Scale();
- aView3d->FitAll(0.01, false);
- myCursor = cursor(); // save old cursor
- myViewPort->fitAll(); // fits view before selecting a new scene center
- if( setTransformRequested( PANGLOBAL ) )
- myViewPort->setCursor( glPanCursor );
- }
-}
-
-/*!
- \brief Starts fit operation.
-
- Sets the corresponding cursor for the widget.
-*/
-void OCCViewer_ViewWindow::activateWindowFit()
-{
- if ( !transformRequested() && !myCursorIsHand )
- myCursor = cursor(); /* save old cursor */
-
- if ( myOperation != WINDOWFIT ) {
- QCursor handCursor (Qt::PointingHandCursor);
- if( setTransformRequested ( WINDOWFIT ) )
- {
- myViewPort->setCursor ( handCursor );
- myCursorIsHand = true;
- }
- }
-}
-
-/*!
- \brief Start delayed viewer operation.
-*/
-bool OCCViewer_ViewWindow::setTransformRequested( OperationType op )
-{
- bool ok = transformEnabled( op );
- myOperation = ok ? op : NOTHING;
- myViewPort->setMouseTracking( myOperation == NOTHING );
- return ok;
-}
-
-/*!
- \brief Handle mouse move event.
- \param theEvent mouse event
-*/
-void OCCViewer_ViewWindow::vpMouseMoveEvent( QMouseEvent* theEvent )
-{
- if ( myIsKeyFree && interactionStyle() == SUIT_ViewModel::KEY_FREE ) {
- myIsKeyFree = false;
- switch ( getButtonState( theEvent, interactionStyle() ) ) {
- case ZOOMVIEW:
- myViewPort->startZoomAtPoint( myStartX, myStartY );
- activateZoom();
- break;
- case PANVIEW:
- activatePanning();
- break;
- case ROTATE:
- activateRotation();
- myViewPort->startRotation(myStartX, myStartY, myCurrPointType, mySelectedPoint);
- break;
- default:
- break;
- }
- }
-
- myCurrX = theEvent->x();
- myCurrY = theEvent->y();
- switch (myOperation) {
- case ROTATE:
- myViewPort->rotate(myCurrX, myCurrY, myCurrPointType, mySelectedPoint);
- break;
-
- case ZOOMVIEW:
- myViewPort->zoom(myStartX, myStartY, myCurrX, myCurrY);
- myStartX = myCurrX;
- myStartY = myCurrY;
- break;
-
- case PANVIEW:
- myViewPort->pan(myCurrX - myStartX, myStartY - myCurrY);
- myStartX = myCurrX;
- myStartY = myCurrY;
- break;
-
-/* case WINDOWFIT:
- myDrawRect = true;
- repaint();
- break;
-*/
- case PANGLOBAL:
- break;
-
- default:
- if ( myRotationPointSelection || isSketcherStyle() )
- {
- emit mouseMoving( this, theEvent );
- }
- else
- {
- int aState = theEvent->modifiers();
- int aButton = theEvent->buttons();
- int anInteractionStyle = interactionStyle();
- if ( ( anInteractionStyle == SUIT_ViewModel::STANDARD &&
- aButton == Qt::LeftButton && ( aState == Qt::NoModifier || Qt::ShiftModifier ) ) ||
- ( anInteractionStyle == SUIT_ViewModel::KEY_FREE &&
- aButton == Qt::LeftButton && ( aState == Qt::ControlModifier || aState == ( Qt::ControlModifier|Qt::ShiftModifier ) ) ) ) {
- myDrawRect = myEnableDrawMode;
- if ( myDrawRect ) {
- drawRect();
- if ( !myCursorIsHand ) { // we are going to sketch a rectangle
- QCursor handCursor (Qt::PointingHandCursor);
- myCursorIsHand = true;
- myCursor = cursor();
- myViewPort->setCursor( handCursor );
- }
- }
- emit mouseMoving( this, theEvent );
- }
- else if ( ( anInteractionStyle == SUIT_ViewModel::STANDARD &&
- aButton == Qt::RightButton && ( aState == Qt::NoModifier || Qt::ShiftModifier ) ) ||
- ( anInteractionStyle == SUIT_ViewModel::KEY_FREE &&
- aButton == Qt::RightButton && ( aState == Qt::ControlModifier || aState == ( Qt::ControlModifier|Qt::ShiftModifier ) ) ) ) {
- OCCViewer_ViewSketcher* sketcher = 0;
- QList<OCCViewer_ViewSketcher*>::Iterator it;
- for ( it = mySketchers.begin(); it != mySketchers.end() && !sketcher; ++it )
- {
- OCCViewer_ViewSketcher* sk = (*it);
- if( sk->isDefault() && sk->sketchButton() == aButton )
- sketcher = sk;
- }
- if ( sketcher && myCurSketch == -1 )
- {
- activateSketching( sketcher->type() );
- if ( mypSketcher )
- {
- myCurSketch = mypSketcher->sketchButton();
-
- if ( l_mbPressEvent )
- {
- QApplication::sendEvent( getViewPort(), l_mbPressEvent );
- delete l_mbPressEvent;
- l_mbPressEvent = 0;
- }
- QApplication::sendEvent( getViewPort(), theEvent );
- }
- }
- }
- else
- emit mouseMoving( this, theEvent );
- }
- }
-}
-
-/*!
- \brief Handle mouse release event.
- \param theEvent mouse event
-*/
-void OCCViewer_ViewWindow::vpMouseReleaseEvent(QMouseEvent* theEvent)
-{
- switch ( myOperation ) {
- case NOTHING:
- {
- int prevState = myCurSketch;
- if(theEvent->button() == Qt::RightButton)
- {
- QList<OCCViewer_ViewSketcher*>::Iterator it;
- for ( it = mySketchers.begin(); it != mySketchers.end() && myCurSketch != -1; ++it )
- {
- OCCViewer_ViewSketcher* sk = (*it);
- if( ( sk->sketchButton() & theEvent->button() ) && sk->sketchButton() == myCurSketch )
- myCurSketch = -1;
- }
- }
-
- emit mouseReleased(this, theEvent);
- if(theEvent->button() == Qt::RightButton && prevState == -1)
- {
- QContextMenuEvent aEvent( QContextMenuEvent::Mouse,
- theEvent->pos(), theEvent->globalPos() );
- emit contextMenuRequested( &aEvent );
- }
- }
- break;
- case ROTATE:
- myViewPort->endRotation();
- resetState();
- break;
-
- case PANVIEW:
- case ZOOMVIEW:
- resetState();
- break;
-
- case PANGLOBAL:
- if ( theEvent->button() == Qt::LeftButton ) {
- myViewPort->setCenter( theEvent->x(), theEvent->y() );
- myViewPort->getView()->SetScale(myCurScale);
- resetState();
- }
- break;
-
- case WINDOWFIT:
- if ( theEvent->button() == Qt::LeftButton ) {
- myCurrX = theEvent->x();
- myCurrY = theEvent->y();
- drawRect();
- QRect rect = SUIT_Tools::makeRect(myStartX, myStartY, myCurrX, myCurrY);
- if ( !rect.isEmpty() ) myViewPort->fitRect(rect);
- endDrawRect();
- resetState();
- }
- break;
- }
-
- // NOTE: viewer 3D detects a rectangle of selection using this event
- // so we must emit it BEFORE resetting the selection rectangle
-
- if ( theEvent->button() == Qt::LeftButton && myDrawRect ) {
- drawRect();
- endDrawRect();
- resetState();
- myViewPort->update();
- }
-
- if ( l_mbPressEvent )
- {
- delete l_mbPressEvent;
- l_mbPressEvent = 0;
- }
-}
-
-/*!
- \brief Reset the viewport to its initial state
- ( no transformations in process etc. )
-*/
-void OCCViewer_ViewWindow::resetState()
-{
- myDrawRect = false;
-
- if ( myRotationPointSelection )
- {
- QCursor handCursor (Qt::PointingHandCursor);
- myViewPort->setCursor( handCursor );
- }
- else
- {
- if ( transformRequested() || myCursorIsHand )
- myViewPort->setCursor( myCursor );
- myCursorIsHand = false;
- }
-
- if ( transformRequested() )
- emit vpTransformationFinished (myOperation);
-
- setTransformInProcess( false );
- setTransformRequested( NOTHING );
-}
-
-
-/*!
- \brief Draw rubber band rectangle.
-*/
-void OCCViewer_ViewWindow::drawRect()
-{
- if ( !myRectBand ) {
- myRectBand = new QtxRectRubberBand( myViewPort );
- //QPalette palette;
- //palette.setColor(myRectBand->foregroundRole(), Qt::white);
- //myRectBand->setPalette(palette);
- }
- //myRectBand->hide();
-
- myRectBand->setUpdatesEnabled ( false );
- QRect aRect = SUIT_Tools::makeRect(myStartX, myStartY, myCurrX, myCurrY);
- myRectBand->initGeometry( aRect );
-
- if ( !myRectBand->isVisible() )
- myRectBand->show();
-
- myRectBand->setUpdatesEnabled ( true );
- //myRectBand->repaint();
-
- //myRectBand->setVisible( aRect.isValid() );
- //if ( myRectBand->isVisible() )
- // myRectBand->repaint();
- //else
- // myRectBand->show();
- //myRectBand->repaint();
-}
-
-/*!
- \brief Clear rubber band rectangle on the end on the dragging operation.
-*/
-void OCCViewer_ViewWindow::endDrawRect()
-{
- //delete myRectBand;
- //myRectBand = 0;
- if ( myRectBand )
- {
- myRectBand->clearGeometry();
- myRectBand->hide();
- }
-}
-
-/*!
- \brief Create actions.
-*/
-void OCCViewer_ViewWindow::createActions()
-{
- if( !toolMgr()->isEmpty() )
- return;
-
- SUIT_ResourceMgr* aResMgr = SUIT_Session::session()->resourceMgr();
-
- QtxAction* aAction;
-
- // Dump view
- aAction = new QtxAction(tr("MNU_DUMP_VIEW"), aResMgr->loadPixmap( "OCCViewer", tr( "ICON_OCCVIEWER_VIEW_DUMP" ) ),
- tr( "MNU_DUMP_VIEW" ), 0, this);
- aAction->setStatusTip(tr("DSC_DUMP_VIEW"));
- connect(aAction, SIGNAL(triggered()), this, SLOT(onDumpView()));
- toolMgr()->registerAction( aAction, DumpId );
-
- // FitAll
- aAction = new QtxAction(tr("MNU_FITALL"), aResMgr->loadPixmap( "OCCViewer", tr( "ICON_OCCVIEWER_VIEW_FITALL" ) ),
- tr( "MNU_FITALL" ), 0, this);
- aAction->setStatusTip(tr("DSC_FITALL"));
- connect(aAction, SIGNAL(triggered()), this, SLOT(onFitAll()));
- toolMgr()->registerAction( aAction, FitAllId );
-
- // FitRect
- aAction = new QtxAction(tr("MNU_FITRECT"), aResMgr->loadPixmap( "OCCViewer", tr( "ICON_OCCVIEWER_VIEW_FITAREA" ) ),
- tr( "MNU_FITRECT" ), 0, this);
- aAction->setStatusTip(tr("DSC_FITRECT"));
- connect(aAction, SIGNAL(triggered()), this, SLOT(activateWindowFit()));
- toolMgr()->registerAction( aAction, FitRectId );
-
- // Zoom
- aAction = new QtxAction(tr("MNU_ZOOM_VIEW"), aResMgr->loadPixmap( "OCCViewer", tr( "ICON_OCCVIEWER_VIEW_ZOOM" ) ),
- tr( "MNU_ZOOM_VIEW" ), 0, this);
- aAction->setStatusTip(tr("DSC_ZOOM_VIEW"));
- connect(aAction, SIGNAL(triggered()), this, SLOT(activateZoom()));
- toolMgr()->registerAction( aAction, ZoomId );
-
- // Panning
- aAction = new QtxAction(tr("MNU_PAN_VIEW"), aResMgr->loadPixmap( "OCCViewer", tr( "ICON_OCCVIEWER_VIEW_PAN" ) ),
- tr( "MNU_PAN_VIEW" ), 0, this);
- aAction->setStatusTip(tr("DSC_PAN_VIEW"));
- connect(aAction, SIGNAL(triggered()), this, SLOT(activatePanning()));
- toolMgr()->registerAction( aAction, PanId );
-
- // Global Panning
- aAction = new QtxAction(tr("MNU_GLOBALPAN_VIEW"), aResMgr->loadPixmap( "OCCViewer", tr( "ICON_OCCVIEWER_VIEW_GLOBALPAN" ) ),
- tr( "MNU_GLOBALPAN_VIEW" ), 0, this);
- aAction->setStatusTip(tr("DSC_GLOBALPAN_VIEW"));
- connect(aAction, SIGNAL(triggered()), this, SLOT(activateGlobalPanning()));
- toolMgr()->registerAction( aAction, GlobalPanId );
-
- // Rotation Point
- mySetRotationPointAction = new QtxAction(tr("MNU_CHANGINGROTATIONPOINT_VIEW"), aResMgr->loadPixmap( "OCCViewer", tr( "ICON_OCCVIEWER_VIEW_ROTATION_POINT" ) ),
- tr( "MNU_CHANGINGROTATIONPOINT_VIEW" ), 0, this);
- mySetRotationPointAction->setStatusTip(tr("DSC_CHANGINGROTATIONPOINT_VIEW"));
- mySetRotationPointAction->setCheckable( true );
- connect(mySetRotationPointAction, SIGNAL(toggled( bool )), this, SLOT(onSetRotationPoint( bool )));
- toolMgr()->registerAction( mySetRotationPointAction, ChangeRotationPointId );
-
- // Rotation
- aAction = new QtxAction(tr("MNU_ROTATE_VIEW"), aResMgr->loadPixmap( "OCCViewer", tr( "ICON_OCCVIEWER_VIEW_ROTATE" ) ),
- tr( "MNU_ROTATE_VIEW" ), 0, this);
- aAction->setStatusTip(tr("DSC_ROTATE_VIEW"));
- connect(aAction, SIGNAL(triggered()), this, SLOT(activateRotation()));
- toolMgr()->registerAction( aAction, RotationId );
-
- // Projections
- aAction = new QtxAction(tr("MNU_FRONT_VIEW"), aResMgr->loadPixmap( "OCCViewer", tr( "ICON_OCCVIEWER_VIEW_FRONT" ) ),
- tr( "MNU_FRONT_VIEW" ), 0, this, false, "Viewers:Front view");
- aAction->setStatusTip(tr("DSC_FRONT_VIEW"));
- connect(aAction, SIGNAL(triggered()), this, SLOT(onFrontView()));
- this->addAction(aAction);
- toolMgr()->registerAction( aAction, FrontId );
-
- aAction = new QtxAction(tr("MNU_BACK_VIEW"), aResMgr->loadPixmap( "OCCViewer", tr( "ICON_OCCVIEWER_VIEW_BACK" ) ),
- tr( "MNU_BACK_VIEW" ), 0, this, false, "Viewers:Back view");
- aAction->setStatusTip(tr("DSC_BACK_VIEW"));
- connect(aAction, SIGNAL(triggered()), this, SLOT(onBackView()));
- this->addAction(aAction);
- toolMgr()->registerAction( aAction, BackId );
-
- aAction = new QtxAction(tr("MNU_TOP_VIEW"), aResMgr->loadPixmap( "OCCViewer", tr( "ICON_OCCVIEWER_VIEW_TOP" ) ),
- tr( "MNU_TOP_VIEW" ), 0, this, false, "Viewers:Top view");
- aAction->setStatusTip(tr("DSC_TOP_VIEW"));
- connect(aAction, SIGNAL(triggered()), this, SLOT(onTopView()));
- this->addAction(aAction);
- toolMgr()->registerAction( aAction, TopId );
-
- aAction = new QtxAction(tr("MNU_BOTTOM_VIEW"), aResMgr->loadPixmap( "OCCViewer", tr( "ICON_OCCVIEWER_VIEW_BOTTOM" ) ),
- tr( "MNU_BOTTOM_VIEW" ), 0, this, false, "Viewers:Bottom view");
- aAction->setStatusTip(tr("DSC_BOTTOM_VIEW"));
- connect(aAction, SIGNAL(triggered()), this, SLOT(onBottomView()));
- this->addAction(aAction);
- toolMgr()->registerAction( aAction, BottomId );
-
- aAction = new QtxAction(tr("MNU_LEFT_VIEW"), aResMgr->loadPixmap( "OCCViewer", tr( "ICON_OCCVIEWER_VIEW_LEFT" ) ),
- tr( "MNU_LEFT_VIEW" ), 0, this, false, "Viewers:Left view");
- aAction->setStatusTip(tr("DSC_LEFT_VIEW"));
- connect(aAction, SIGNAL(triggered()), this, SLOT(onLeftView()));
- this->addAction(aAction);
- toolMgr()->registerAction( aAction, LeftId );
-
- aAction = new QtxAction(tr("MNU_RIGHT_VIEW"), aResMgr->loadPixmap( "OCCViewer", tr( "ICON_OCCVIEWER_VIEW_RIGHT" ) ),
- tr( "MNU_RIGHT_VIEW" ), 0, this, false, "Viewers:Right view");
- aAction->setStatusTip(tr("DSC_RIGHT_VIEW"));
- connect(aAction, SIGNAL(triggered()), this, SLOT(onRightView()));
- this->addAction(aAction);
- toolMgr()->registerAction( aAction, RightId );
-
- // rotate anticlockwise
- aAction = new QtxAction(tr("MNU_ANTICLOCKWISE_VIEW"), aResMgr->loadPixmap( "OCCViewer", tr( "ICON_OCCVIEWER_VIEW_ANTICLOCKWISE" ) ),
- tr( "MNU_ANTICLOCKWISE_VIEW" ), 0, this, false, "Viewers:Rotate anticlockwise");
- aAction->setStatusTip(tr("DSC_ANTICLOCKWISE_VIEW"));
- connect(aAction, SIGNAL(triggered()), this, SLOT(onAntiClockWiseView()));
- this->addAction(aAction);
- toolMgr()->registerAction( aAction, AntiClockWiseId );
-
- // rotate clockwise
- aAction = new QtxAction(tr("MNU_CLOCKWISE_VIEW"), aResMgr->loadPixmap( "OCCViewer", tr( "ICON_OCCVIEWER_VIEW_CLOCKWISE" ) ),
- tr( "MNU_CLOCKWISE_VIEW" ), 0, this, false, "Viewers:Rotate clockwise");
- aAction->setStatusTip(tr("DSC_CLOCKWISE_VIEW"));
- connect(aAction, SIGNAL(triggered()), this, SLOT(onClockWiseView()));
- this->addAction(aAction);
- toolMgr()->registerAction( aAction, ClockWiseId );
-
- // Reset
- aAction = new QtxAction(tr("MNU_RESET_VIEW"), aResMgr->loadPixmap( "OCCViewer", tr( "ICON_OCCVIEWER_VIEW_RESET" ) ),
- tr( "MNU_RESET_VIEW" ), 0, this, false, "Viewers:Reset view");
- aAction->setStatusTip(tr("DSC_RESET_VIEW"));
- connect(aAction, SIGNAL(triggered()), this, SLOT(onResetView()));
- this->addAction(aAction);
- toolMgr()->registerAction( aAction, ResetId );
-
- // Clone
- aAction = new QtxAction(tr("MNU_CLONE_VIEW"),
- aResMgr->loadPixmap("OCCViewer", tr("ICON_OCCVIEWER_CLONE_VIEW")),
- tr("MNU_CLONE_VIEW"), 0, this);
- aAction->setStatusTip(tr("DSC_CLONE_VIEW"));
- connect(aAction, SIGNAL(triggered()), this, SLOT(onCloneView()));
- toolMgr()->registerAction( aAction, CloneId );
-
- aAction = new QtxAction (tr ("MNU_CLIPPING"), aResMgr->loadPixmap ("OCCViewer", tr ("ICON_OCCVIEWER_CLIPPING")),
- tr ("MNU_CLIPPING"), 0, this);
- aAction->setStatusTip (tr ("DSC_CLIPPING"));
- aAction->setCheckable (true);
- connect (aAction, SIGNAL (toggled (bool)), this, SLOT (onClipping (bool)));
- toolMgr()->registerAction (aAction, ClippingId);
-
- aAction = new QtxAction(tr("MNU_SHOOT_VIEW"), aResMgr->loadPixmap( "OCCViewer", tr( "ICON_OCCVIEWER_SHOOT_VIEW" ) ),
- tr( "MNU_SHOOT_VIEW" ), 0, this);
- aAction->setStatusTip(tr("DSC_SHOOT_VIEW"));
- connect(aAction, SIGNAL(triggered()), this, SLOT(onMemorizeView()));
- toolMgr()->registerAction( aAction, MemId );
-
- aAction = new QtxAction(tr("MNU_PRESETS_VIEW"), aResMgr->loadPixmap( "OCCViewer", tr( "ICON_OCCVIEWER_PRESETS_VIEW" ) ),
- tr( "MNU_PRESETS_VIEW" ), 0, this);
- aAction->setStatusTip(tr("DSC_PRESETS_VIEW"));
- connect(aAction, SIGNAL(triggered()), this, SLOT(onRestoreView()));
- toolMgr()->registerAction( aAction, RestoreId );
-
- if (myModel->trihedronActivated()) {
- aAction = new QtxAction(tr("MNU_SHOW_TRIHEDRE"), aResMgr->loadPixmap( "OCCViewer", tr( "ICON_OCCVIEWER_VIEW_TRIHEDRON" ) ),
- tr( "MNU_SHOW_TRIHEDRE" ), 0, this);
- aAction->setStatusTip(tr("DSC_SHOW_TRIHEDRE"));
- connect(aAction, SIGNAL(triggered()), this, SLOT(onTrihedronShow()));
- toolMgr()->registerAction( aAction, TrihedronShowId );
- }
-
- // Scale
- aAction = new QtxAction(tr("MNU_SCALING"), aResMgr->loadPixmap( "OCCViewer", tr( "ICON_OCCVIEWER_SCALING" ) ),
- tr( "MNU_SCALING" ), 0, this);
- aAction->setStatusTip(tr("DSC_SCALING"));
- connect(aAction, SIGNAL(triggered()), this, SLOT(onAxialScale()));
- toolMgr()->registerAction( aAction, AxialScaleId );
-
- // Enable/disable preselection
- aAction = new QtxAction(tr("MNU_ENABLE_PRESELECTION"), aResMgr->loadPixmap( "OCCViewer", tr( "ICON_OCCVIEWER_PRESELECTION" ) ),
- tr( "MNU_ENABLE_PRESELECTION" ), 0, this);
- aAction->setStatusTip(tr("DSC_ENABLE_PRESELECTION"));
- aAction->setCheckable(true);
- connect(aAction, SIGNAL(toggled(bool)), this, SLOT(onSwitchPreselection(bool)));
- toolMgr()->registerAction( aAction, SwitchPreselectionId );
-
- // Enable/disable selection
- aAction = new QtxAction(tr("MNU_ENABLE_SELECTION"), aResMgr->loadPixmap( "OCCViewer", tr( "ICON_OCCVIEWER_SELECTION" ) ),
- tr( "MNU_ENABLE_SELECTION" ), 0, this);
- aAction->setStatusTip(tr("DSC_ENABLE_SELECTION"));
- aAction->setCheckable(true);
- connect(aAction, SIGNAL(toggled(bool)), this, SLOT(onSwitchSelection(bool)));
- toolMgr()->registerAction( aAction, SwitchSelectionId );
-
- // Graduated axes
- aAction = new QtxAction(tr("MNU_GRADUATED_AXES"), aResMgr->loadPixmap( "OCCViewer", tr( "ICON_OCCVIEWER_GRADUATED_AXES" ) ),
- tr( "MNU_GRADUATED_AXES" ), 0, this);
- aAction->setStatusTip(tr("DSC_GRADUATED_AXES"));
- connect(aAction, SIGNAL(triggered()), this, SLOT(onGraduatedAxes()));
- toolMgr()->registerAction( aAction, GraduatedAxesId );
-
- // Active only ambient light or not
- aAction = new QtxAction(tr("MNU_AMBIENT"), aResMgr->loadPixmap( "OCCViewer", tr( "ICON_OCCVIEWER_AMBIENT" ) ),
- tr( "MNU_AMBIENT" ), 0, this);
- aAction->setStatusTip(tr("DSC_AMBIENT"));
- connect(aAction, SIGNAL(triggered()), this, SLOT(onAmbientToogle()));
- toolMgr()->registerAction( aAction, AmbientId );
-
- // Switch between interaction styles
- aAction = new QtxAction(tr("MNU_STYLE_SWITCH"), aResMgr->loadPixmap( "OCCViewer", tr( "ICON_OCCVIEWER_STYLE_SWITCH" ) ),
- tr( "MNU_STYLE_SWITCH" ), 0, this);
- aAction->setStatusTip(tr("DSC_STYLE_SWITCH"));
- aAction->setCheckable(true);
- connect(aAction, SIGNAL(toggled(bool)), this, SLOT(onSwitchInteractionStyle(bool)));
- toolMgr()->registerAction( aAction, SwitchInteractionStyleId );
-
- // Switch between zooming styles
- aAction = new QtxAction(tr("MNU_ZOOMING_STYLE_SWITCH"), aResMgr->loadPixmap( "OCCViewer", tr( "ICON_OCCVIEWER_ZOOMING_STYLE_SWITCH" ) ),
- tr( "MNU_ZOOMING_STYLE_SWITCH" ), 0, this);
- aAction->setStatusTip(tr("DSC_ZOOMING_STYLE_SWITCH"));
- aAction->setCheckable(true);
- connect(aAction, SIGNAL(toggled(bool)), this, SLOT(onSwitchZoomingStyle(bool)));
- toolMgr()->registerAction( aAction, SwitchZoomingStyleId );
-
- // Maximized view
- aAction = new QtxAction(tr("MNU_MINIMIZE_VIEW"), aResMgr->loadPixmap( "OCCViewer", tr( "ICON_OCCVIEWER_MINIMIZE" ) ),
- tr( "MNU_MINIMIZE_VIEW" ), 0, this );
- aAction->setStatusTip(tr("DSC_MINIMIZE_VIEW"));
- connect(aAction, SIGNAL(triggered()), this, SLOT(onMaximizedView()));
- toolMgr()->registerAction( aAction, MaximizedId );
-
- // Return to 3d view
- if (my2dMode!=No2dMode){
- aAction = new QtxAction(tr("MNU_RETURN_3D_VIEW"), aResMgr->loadPixmap( "OCCViewer", tr( "ICON_OCCVIEWER_RETURN_3D_VIEW" ) ),
- tr( "MNU_RETURN_3D_VIEW" ), 0, this );
- aAction->setStatusTip(tr("DSC_RETURN_3D_VIEW"));
- connect(aAction, SIGNAL(triggered()), this, SLOT(returnTo3dView()));
- toolMgr()->registerAction( aAction, ReturnTo3dViewId );
- }
-
- // Synchronize View
- toolMgr()->registerAction( synchronizeAction(), SynchronizeId );
-}
-
-/*!
- \brief Create toolbar.
-*/
-void OCCViewer_ViewWindow::createToolBar()
-{
- QString aToolbarName;
- switch (my2dMode) {
- case XYPlane:
- aToolbarName = tr( "LBL_XYTOOLBAR_LABEL" );
- break;
- case XZPlane:
- aToolbarName = tr( "LBL_XZTOOLBAR_LABEL" );
- break;
- case YZPlane:
- aToolbarName = tr( "LBL_YZTOOLBAR_LABEL" );
- break;
- default:
- aToolbarName = tr( "LBL_3DTOOLBAR_LABEL" );
- }
-
- int tid = toolMgr()->createToolBar( aToolbarName, false );
- if ( my2dMode != No2dMode ){
- toolMgr()->append( ReturnTo3dViewId, tid );
- toolMgr()->append( toolMgr()->separator(), tid );
- }
- toolMgr()->append( DumpId, tid );
- toolMgr()->append( SwitchInteractionStyleId, tid );
-#if OCC_VERSION_LARGE > 0x0603000A // available only with OCC-6.3-sp11 and higher version
- toolMgr()->append( SwitchZoomingStyleId, tid );
-#endif
- toolMgr()->append( SwitchPreselectionId, tid );
- toolMgr()->append( SwitchSelectionId, tid );
- if( myModel->trihedronActivated() )
- toolMgr()->append( TrihedronShowId, tid );
-
- QtxMultiAction* aScaleAction = new QtxMultiAction( this );
- aScaleAction->insertAction( toolMgr()->action( FitAllId ) );
- aScaleAction->insertAction( toolMgr()->action( FitRectId ) );
- aScaleAction->insertAction( toolMgr()->action( ZoomId ) );
- toolMgr()->append( aScaleAction, tid );
-
- QtxMultiAction* aPanningAction = new QtxMultiAction( this );
- aPanningAction->insertAction( toolMgr()->action( PanId ) );
- aPanningAction->insertAction( toolMgr()->action( GlobalPanId ) );
- toolMgr()->append( aPanningAction, tid );
-
- if (my2dMode == No2dMode) {
- toolMgr()->append( ChangeRotationPointId, tid );
- toolMgr()->append( RotationId, tid );
-
- QtxMultiAction* aViewsAction = new QtxMultiAction( this );
- aViewsAction->insertAction( toolMgr()->action( FrontId ) );
- aViewsAction->insertAction( toolMgr()->action( BackId ) );
- aViewsAction->insertAction( toolMgr()->action( TopId ) );
- aViewsAction->insertAction( toolMgr()->action( BottomId ) );
- aViewsAction->insertAction( toolMgr()->action( LeftId ) );
- aViewsAction->insertAction( toolMgr()->action( RightId ) );
- toolMgr()->append( aViewsAction, tid );
-
- toolMgr()->append( AntiClockWiseId, tid );
- toolMgr()->append( ClockWiseId, tid );
-
- toolMgr()->append( ResetId, tid );
- }
-
- QtxMultiAction* aMemAction = new QtxMultiAction( this );
- aMemAction->insertAction( toolMgr()->action( MemId ) );
- aMemAction->insertAction( toolMgr()->action( RestoreId ) );
- toolMgr()->append( aMemAction, tid );
-
- toolMgr()->append( toolMgr()->separator(), tid );
- toolMgr()->append( CloneId, tid );
-
- toolMgr()->append( toolMgr()->separator(), tid );
- toolMgr()->append( ClippingId, tid );
- toolMgr()->append( AxialScaleId, tid );
-#if OCC_VERSION_LARGE > 0x06030009 // available only with OCC-6.3-sp10 and higher version
- toolMgr()->append( GraduatedAxesId, tid );
-#endif
- toolMgr()->append( AmbientId, tid );
-
- toolMgr()->append( MaximizedId, tid );
- toolMgr()->append( SynchronizeId, tid );
-}
-
-/*!
- \brief Perform 'fit all' operation.
-*/
-void OCCViewer_ViewWindow::onViewFitAll()
-{
- myViewPort->fitAll();
-}
-
-/*!
- \brief Perform "front view" transformation.
-*/
-void OCCViewer_ViewWindow::onFrontView()
-{
- emit vpTransformationStarted ( FRONTVIEW );
- Handle(V3d_View) aView3d = myViewPort->getView();
- if ( !aView3d.IsNull() ) aView3d->SetProj (V3d_Xpos);
- onViewFitAll();
- emit vpTransformationFinished ( FRONTVIEW );
-}
-
-/*!
- \brief Perform "back view" transformation.
-*/
-void OCCViewer_ViewWindow::onBackView()
-{
- emit vpTransformationStarted ( BACKVIEW );
- Handle(V3d_View) aView3d = myViewPort->getView();
- if ( !aView3d.IsNull() ) aView3d->SetProj (V3d_Xneg);
- onViewFitAll();
- emit vpTransformationFinished ( BACKVIEW );
-}
-
-/*!
- \brief Perform "top view" transformation.
-*/
-void OCCViewer_ViewWindow::onTopView()
-{
- emit vpTransformationStarted ( TOPVIEW );
- Handle(V3d_View) aView3d = myViewPort->getView();
- if ( !aView3d.IsNull() ) aView3d->SetProj (V3d_Zpos);
- onViewFitAll();
- emit vpTransformationFinished ( TOPVIEW );
-}
-
-/*!
- \brief Perform "bottom view" transformation.
-*/
-void OCCViewer_ViewWindow::onBottomView()
-{
- emit vpTransformationStarted ( BOTTOMVIEW );
- Handle(V3d_View) aView3d = myViewPort->getView();
- if ( !aView3d.IsNull() ) aView3d->SetProj (V3d_Zneg);
- onViewFitAll();
- emit vpTransformationFinished ( BOTTOMVIEW );
-}
-
-/*!
- \brief Perform "left view" transformation.
-*/
-void OCCViewer_ViewWindow::onLeftView()
-{
- emit vpTransformationStarted ( LEFTVIEW );
- Handle(V3d_View) aView3d = myViewPort->getView();
- if ( !aView3d.IsNull() ) aView3d->SetProj (V3d_Yneg);
- onViewFitAll();
- emit vpTransformationFinished ( LEFTVIEW );
-}
-
-/*!
- \brief Perform "right view" transformation.
-*/
-void OCCViewer_ViewWindow::onRightView()
-{
- emit vpTransformationStarted ( RIGHTVIEW );
- Handle(V3d_View) aView3d = myViewPort->getView();
- if ( !aView3d.IsNull() ) aView3d->SetProj (V3d_Ypos);
- onViewFitAll();
- emit vpTransformationFinished ( RIGHTVIEW );
-}
-
-/*!
- \brief Rotate view 90 degrees clockwise
-*/
-void OCCViewer_ViewWindow::onClockWiseView()
-{
- emit vpTransformationStarted ( CLOCKWISEVIEW );
- myViewPort->rotateXY( 90. );
- emit vpTransformationFinished ( CLOCKWISEVIEW );
-}
-
-/*!
- \brief Rotate view 90 degrees conterclockwise
-*/
-void OCCViewer_ViewWindow::onAntiClockWiseView()
-{
- emit vpTransformationStarted ( ANTICLOCKWISEVIEW );
- myViewPort->rotateXY( -90. );
- emit vpTransformationFinished ( ANTICLOCKWISEVIEW );
-}
-
-/*!
- \brief Perform "reset view" transformation.
-
- Sets default orientation of the viewport camera.
-*/
-void OCCViewer_ViewWindow::onResetView()
-{
- emit vpTransformationStarted( RESETVIEW );
- bool upd = myViewPort->getView()->SetImmediateUpdate( false );
- myViewPort->getView()->Reset( false );
- myViewPort->fitAll( false, true, false );
- myViewPort->getView()->SetImmediateUpdate( upd );
- myViewPort->getView()->Update();
- emit vpTransformationFinished( RESETVIEW );
-}
-
-/*!
- \brief Perform "fit all" transformation.
-*/
-void OCCViewer_ViewWindow::onFitAll()
-{
- emit vpTransformationStarted( FITALLVIEW );
- myViewPort->fitAll();
- emit vpTransformationFinished( FITALLVIEW );
-}
-
-/*!
- \brief Called if 'change rotation point' operation is activated.
- \param on action state
-*/
-void OCCViewer_ViewWindow::onSetRotationPoint( bool on )
-{
- if (on)
- {
- if (!mySetRotationPointDlg)
- {
- mySetRotationPointDlg = new OCCViewer_SetRotationPointDlg (this);
- mySetRotationPointDlg->SetAction(mySetRotationPointAction);
- }
-
- if (!mySetRotationPointDlg->isVisible())
- {
- //if (mySetRotationPointDlg->IsFirstShown())
- if (myCurrPointType == GRAVITY)
- {
- Standard_Real Xcenter, Ycenter, Zcenter;
- if (computeGravityCenter(Xcenter, Ycenter, Zcenter))
- mySetRotationPointDlg->setCoords(Xcenter, Ycenter, Zcenter);
- }
- mySetRotationPointDlg->show();
- }
- }
- else
- {
- if (mySetRotationPointDlg->isVisible())
- mySetRotationPointDlg->hide();
- }
-}
-
-/*!
- \brief Create one more window with same content.
-*/
-void OCCViewer_ViewWindow::onCloneView()
-{
- SUIT_ViewWindow* vw = myManager->createViewWindow();
- //vw->show();
- emit viewCloned( vw );
-}
-
-/*!
- Creates one more window with same content
-*/
-void OCCViewer_ViewWindow::onAxialScale()
-{
- if ( !myScalingDlg )
- myScalingDlg = new OCCViewer_AxialScaleDlg( this );
-
- if ( !myScalingDlg->isVisible() )
- {
- myScalingDlg->Update();
- myScalingDlg->show();
- }
-}
-
-/*!
- Shows Graduated Axes dialog
-*/
-void OCCViewer_ViewWindow::onGraduatedAxes()
-{
- myCubeAxesDlg->Update();
- myCubeAxesDlg->show();
-}
-
-void OCCViewer_ViewWindow::onAmbientToogle()
-{
- Handle(V3d_Viewer) viewer = myViewPort->getViewer();
- viewer->InitDefinedLights();
- while(viewer->MoreDefinedLights())
- {
- Handle(V3d_Light) light = viewer->DefinedLight();
- if(light->Type() != V3d_AMBIENT)
- {
- Handle(V3d_View) aView3d = myViewPort->getView();
- if( aView3d->IsActiveLight(light) ) viewer->SetLightOff(light);
- else viewer->SetLightOn(light);
- }
- viewer->NextDefinedLights();
- }
- viewer->Update();
-}
-
-/*!
- \brief Store view parameters.
-*/
-void OCCViewer_ViewWindow::onMemorizeView()
-{
- appendViewAspect( getViewParams() );
-}
-
-/*!
- \brief Restore view parameters.
-*/
-void OCCViewer_ViewWindow::onRestoreView()
-{
- OCCViewer_CreateRestoreViewDlg* aDlg = new OCCViewer_CreateRestoreViewDlg( centralWidget(), this );
- connect( aDlg, SIGNAL( dlgOk() ), this, SLOT( setRestoreFlag() ) );
- aDlg->exec();
- updateViewAspects( aDlg->parameters() );
- if( myRestoreFlag && aDlg->parameters().count() )
- performRestoring( aDlg->currentItem() );
-}
-
-/*!
- \brief Restore view parameters.
- \param anItem view parameters
-*/
-void OCCViewer_ViewWindow::performRestoring( const viewAspect& anItem, bool baseParamsOnly )
-{
- Handle(V3d_View) aView3d = myViewPort->getView();
-
- Standard_Boolean prev = aView3d->SetImmediateUpdate( Standard_False );
- aView3d->SetScale( anItem.scale );
- aView3d->SetCenter( anItem.centerX, anItem.centerY );
- aView3d->SetTwist( anItem.twist );
- aView3d->SetAt( anItem.atX, anItem.atY, anItem.atZ );
- aView3d->SetImmediateUpdate( prev );
- aView3d->SetEye( anItem.eyeX, anItem.eyeY, anItem.eyeZ );
- aView3d->SetProj( anItem.projX, anItem.projY, anItem.projZ );
- aView3d->SetAxialScale( anItem.scaleX, anItem.scaleY, anItem.scaleZ );
-
- if ( !baseParamsOnly ) {
-
- myModel->setTrihedronShown( anItem.isVisible );
- myModel->setTrihedronSize( anItem.size );
-
-#if OCC_VERSION_LARGE > 0x06030009 // available only with OCC-6.3-sp10 and higher version
- // graduated trihedron
- bool anIsVisible = anItem.gtIsVisible;
- OCCViewer_AxisWidget::AxisData anAxisData[3];
- anAxisData[0].DrawName = anItem.gtDrawNameX;
- anAxisData[1].DrawName = anItem.gtDrawNameZ;
- anAxisData[2].DrawName = anItem.gtDrawNameZ;
- anAxisData[0].Name = anItem.gtNameX;
- anAxisData[1].Name = anItem.gtNameZ;
- anAxisData[2].Name = anItem.gtNameZ;
- anAxisData[0].NameColor = QColor( anItem.gtNameColorRX,
- anItem.gtNameColorGX,
- anItem.gtNameColorBX );
- anAxisData[1].NameColor = QColor( anItem.gtNameColorRY,
- anItem.gtNameColorGY,
- anItem.gtNameColorBY );
- anAxisData[2].NameColor = QColor( anItem.gtNameColorRZ,
- anItem.gtNameColorGZ,
- anItem.gtNameColorBZ );
- anAxisData[0].DrawValues = anItem.gtDrawValuesX;
- anAxisData[1].DrawValues = anItem.gtDrawValuesY;
- anAxisData[2].DrawValues = anItem.gtDrawValuesZ;
- anAxisData[0].NbValues = anItem.gtNbValuesX;
- anAxisData[1].NbValues = anItem.gtNbValuesY;
- anAxisData[2].NbValues = anItem.gtNbValuesZ;
- anAxisData[0].Offset = anItem.gtOffsetX;
- anAxisData[1].Offset = anItem.gtOffsetY;
- anAxisData[2].Offset = anItem.gtOffsetZ;
- anAxisData[0].Color = QColor( anItem.gtColorRX,
- anItem.gtColorGX,
- anItem.gtColorBX );
- anAxisData[1].Color = QColor( anItem.gtColorRY,
- anItem.gtColorGY,
- anItem.gtColorBY );
- anAxisData[2].Color = QColor( anItem.gtColorRZ,
- anItem.gtColorGZ,
- anItem.gtColorBZ );
- anAxisData[0].DrawTickmarks = anItem.gtDrawTickmarksX;
- anAxisData[1].DrawTickmarks = anItem.gtDrawTickmarksY;
- anAxisData[2].DrawTickmarks = anItem.gtDrawTickmarksZ;
- anAxisData[0].TickmarkLength = anItem.gtTickmarkLengthX;
- anAxisData[1].TickmarkLength = anItem.gtTickmarkLengthY;
- anAxisData[2].TickmarkLength = anItem.gtTickmarkLengthZ;
-
- myCubeAxesDlg->SetData( anIsVisible, anAxisData );
- myCubeAxesDlg->ApplyData( aView3d );
-#endif
-
- } // if ( !baseParamsOnly )
-
- myRestoreFlag = 0;
-}
-
-/*!
- \brief Set restore flag.
-*/
-void OCCViewer_ViewWindow::setRestoreFlag()
-{
- myRestoreFlag = 1;
-}
-
-/*!
- \brief Called when action "show/hide trihedron" is activated.
-*/
-void OCCViewer_ViewWindow::onTrihedronShow()
-{
- myModel->toggleTrihedron();
-}
-
-/*!
- \brief Toggles preselection (highlighting) on/off
-*/
-void OCCViewer_ViewWindow::onSwitchPreselection( bool on )
-{
- myPreselectionEnabled = on;
- myModel->setSelectionOptions( isPreselectionEnabled(), myModel->isSelectionEnabled() );
-
- // unhighlight all highlighted objects
- /*if ( !on ) {
- myModel->unHighlightAll( true, false );
- }*/
-
- // update action state if method is called outside
- QtxAction* a = dynamic_cast<QtxAction*>( toolMgr()->action( SwitchPreselectionId ) );
- if ( a && a->isChecked() != on ) {
- a->setChecked( on );
- }
-}
-
-/*!
- \brief Toggles selection on/off
-*/
-void OCCViewer_ViewWindow::onSwitchSelection( bool on )
-{
- mySelectionEnabled = on;
- myModel->setSelectionOptions( myModel->isPreselectionEnabled(), isSelectionEnabled() );
-
- // update action state if method is called outside
-
- // preselection
- QtxAction* a = dynamic_cast<QtxAction*>( toolMgr()->action( SwitchPreselectionId ) );
- if ( a ) {
- a->setEnabled( on );
- }
-
- // selection
- a = dynamic_cast<QtxAction*>( toolMgr()->action( SwitchSelectionId ) );
- if ( a && a->isChecked() != on ) {
- a->setChecked( on );
- }
-}
-
-/*!
- \brief Switches "keyboard free" interaction style on/off
-*/
-void OCCViewer_ViewWindow::onSwitchInteractionStyle( bool on )
-{
- myInteractionStyle = on ? (int)SUIT_ViewModel::KEY_FREE : (int)SUIT_ViewModel::STANDARD;
-
- // update action state if method is called outside
- QtxAction* a = dynamic_cast<QtxAction*>( toolMgr()->action( SwitchInteractionStyleId ) );
- if ( a->isChecked() != on )
- a->setChecked( on );
-}
-
-/*!
- \brief Toogles advanced zooming style (relatively to the cursor position) on/off
-*/
-void OCCViewer_ViewWindow::onSwitchZoomingStyle( bool on )
-{
- myViewPort->setAdvancedZoomingEnabled( on );
-
- // update action state if method is called outside
- QtxAction* a = dynamic_cast<QtxAction*>( toolMgr()->action( SwitchZoomingStyleId ) );
- if ( a->isChecked() != on )
- a->setChecked( on );
-}
-
-/*!
- \brief Get current interaction style
- \return interaction style
-*/
-int OCCViewer_ViewWindow::interactionStyle() const
-{
- return myInteractionStyle;
-}
-
-/*!
- \brief Set current interaction style
- \param theStyle interaction style
-*/
-void OCCViewer_ViewWindow::setInteractionStyle( const int theStyle )
-{
- onSwitchInteractionStyle( theStyle == (int)SUIT_ViewModel::KEY_FREE );
-}
-
-/*!
- \brief Get current zooming style
- \return zooming style
-*/
-int OCCViewer_ViewWindow::zoomingStyle() const
-{
- return myViewPort->isAdvancedZoomingEnabled() ? 1 : 0;
-}
-
-/*!
- \brief Set current zooming style
- \param theStyle zooming style
-*/
-void OCCViewer_ViewWindow::setZoomingStyle( const int theStyle )
-{
- onSwitchZoomingStyle( theStyle == 1 );
-}
-
-/*!
- \brief Dump view window contents to the pixmap.
- \return pixmap containing all scene rendered in the window
-*/
-QImage OCCViewer_ViewWindow::dumpView()
-{
- Handle(V3d_View) view = myViewPort->getView();
- if ( view.IsNull() )
- return QImage();
-
- int aWidth = myViewPort->width();
- int aHeight = myViewPort->height();
- QApplication::syncX();
- view->Redraw(); // In order to reactivate GL context
- //view->Update();
-
- OpenGLUtils_FrameBuffer aFrameBuffer;
- if( aFrameBuffer.init( aWidth, aHeight ) )
- {
- QImage anImage( aWidth, aHeight, QImage::Format_RGB32 );
-
- glPushAttrib( GL_VIEWPORT_BIT );
- glViewport( 0, 0, aWidth, aHeight );
- aFrameBuffer.bind();
-
- // draw scene
- view->Redraw();
-
- aFrameBuffer.unbind();
- glPopAttrib();
-
- aFrameBuffer.bind();
- glReadPixels( 0, 0, aWidth, aHeight, GL_RGBA, GL_UNSIGNED_BYTE, anImage.bits() );
- aFrameBuffer.unbind();
-
- anImage = anImage.rgbSwapped();
- anImage = anImage.mirrored();
- return anImage;
- }
- // if frame buffers are unsupported, use old functionality
- //view->Redraw();
-
- unsigned char* data = new unsigned char[ aWidth*aHeight*4 ];
-
- QPoint p = myViewPort->mapFromParent(myViewPort->geometry().topLeft());
-
- glReadPixels( p.x(), p.y(), aWidth, aHeight, GL_RGBA, GL_UNSIGNED_BYTE,
- data);
-
- QImage anImage( data, aWidth, aHeight, QImage::Format_ARGB32 );
- anImage = anImage.mirrored();
- anImage = anImage.rgbSwapped();
- return anImage;
-}
-
-bool OCCViewer_ViewWindow::dumpViewToFormat( const QImage& img,
- const QString& fileName,
- const QString& format )
-{
- if ( format != "PS" && format != "EPS")
- return SUIT_ViewWindow::dumpViewToFormat( img, fileName, format );
-
- Handle(Visual3d_View) a3dView = myViewPort->getView()->View();
-
- if (format == "PS")
- a3dView->Export(strdup(qPrintable(fileName)), Graphic3d_EF_PostScript);
- else if (format == "EPS")
- a3dView->Export(strdup(qPrintable(fileName)), Graphic3d_EF_EnhPostScript);
-
- return true;
-}
-
-
-QString OCCViewer_ViewWindow::filter() const
-{
- return tr( "OCC_IMAGE_FILES" );
-}
-
-
-/*!
- \brief Set parameters of the cutting plane
- \param on if \c true, cutting plane is enabled
- \param x X position of plane point
- \param y Y position of plane point
- \param z Z position of plane point
- \param dx X coordinate of plane normal
- \param dy Y coordinate of plane normal
- \param dz Z coordinate of plane normal
-*/
-void OCCViewer_ViewWindow::setCuttingPlane( bool on, const double x, const double y, const double z,
- const double dx, const double dy, const double dz )
-{
- Handle(V3d_View) view = myViewPort->getView();
- if ( view.IsNull() )
- return;
-
- if ( on ) {
- Handle(V3d_Viewer) viewer = myViewPort->getViewer();
-
- // try to use already existing plane or create a new one
- Handle(V3d_Plane) clipPlane;
-
- // calculate new a,b,c,d values for the plane
- gp_Pln pln (gp_Pnt(x, y, z), gp_Dir(dx, dy, dz));
- double a, b, c, d;
- pln.Coefficients(a, b, c, d);
-
- Graphic3d_SequenceOfHClipPlane aPlanes = view->GetClipPlanes();
- Handle(Graphic3d_ClipPlane) aClipPlane;
- if(aPlanes.Size() > 0 ) {
- Graphic3d_SequenceOfHClipPlane::Iterator anIter (aPlanes);
- aClipPlane = anIter.Value();
- aClipPlane->SetEquation(pln);
- aClipPlane->SetOn(Standard_True);
- } else {
- aClipPlane = new Graphic3d_ClipPlane(pln);
- view->AddClipPlane(aClipPlane);
- aClipPlane->SetOn(Standard_True);
- }
- }
- else {
- Graphic3d_SequenceOfHClipPlane aPlanes = view->GetClipPlanes();
- Graphic3d_SequenceOfHClipPlane::Iterator anIter (aPlanes);
- for( ;anIter.More();anIter.Next() ){
- Handle(Graphic3d_ClipPlane) aClipPlane = anIter.Value();
- aClipPlane->SetOn(Standard_False);
- }
- }
-
- view->Update();
- view->Redraw();
-}
-
-void OCCViewer_ViewWindow::setCuttingPlane( bool on, const gp_Pln pln )
-{
- gp_Dir aDir = pln.Axis().Direction();
- gp_Pnt aPnt = pln.Location();
- setCuttingPlane(on, aPnt.X(), aPnt.Y(), aPnt.Z(), aDir.X(), aDir.Y(), aDir.Z());
-}
-
-
-/*!
- \brief Check if any cutting plane is enabled
- \return \c true if at least one cutting plane is enabled
-*/
-bool OCCViewer_ViewWindow::isCuttingPlane()
-{
- Handle(V3d_View) view = myViewPort->getView();
- bool res = false;
- Graphic3d_SequenceOfHClipPlane aPlanes = view->GetClipPlanes();
- Graphic3d_SequenceOfHClipPlane::Iterator anIter (aPlanes);
- for( ;anIter.More();anIter.Next() ) {
- Handle(Graphic3d_ClipPlane) aClipPlane = anIter.Value();
- if(aClipPlane->IsOn()) {
- res = true;
- break;
- }
- }
- return res;
-}
-
-/*!
- \brief Get the visual parameters of the view window.
- \return visual parameters of view window
-*/
-viewAspect OCCViewer_ViewWindow::getViewParams() const
-{
- double centerX, centerY, projX, projY, projZ, twist;
- double atX, atY, atZ, eyeX, eyeY, eyeZ;
- double aScaleX, aScaleY, aScaleZ;
-
- Handle(V3d_View) aView3d = myViewPort->getView();
-
- aView3d->Center( centerX, centerY );
- aView3d->Proj( projX, projY, projZ );
- aView3d->At( atX, atY, atZ );
- aView3d->Eye( eyeX, eyeY, eyeZ );
- twist = aView3d->Twist();
-
- aView3d->AxialScale(aScaleX,aScaleY,aScaleZ);
-
- bool isShown = myModel->isTrihedronVisible();
- double size = myModel->trihedronSize();
-
- QString aName = QTime::currentTime().toString() + QString::fromLatin1( " h:m:s" );
-
- viewAspect params;
- params.scale = aView3d->Scale();
- params.centerX = centerX;
- params.centerY = centerY;
- params.projX = projX;
- params.projY = projY;
- params.projZ = projZ;
- params.twist = twist;
- params.atX = atX;
- params.atY = atY;
- params.atZ = atZ;
- params.eyeX = eyeX;
- params.eyeY = eyeY;
- params.eyeZ = eyeZ;
- params.scaleX = aScaleX;
- params.scaleY = aScaleY;
- params.scaleZ = aScaleZ;
- params.name = aName;
- params.isVisible= isShown;
- params.size = size;
-
-#if OCC_VERSION_LARGE > 0x06030009 // available only with OCC-6.3-sp10 and higher version
- // graduated trihedron
- bool anIsVisible = false;
- OCCViewer_AxisWidget::AxisData anAxisData[3];
- myCubeAxesDlg->GetData( anIsVisible, anAxisData );
-
- params.gtIsVisible = anIsVisible;
- params.gtDrawNameX = anAxisData[0].DrawName;
- params.gtDrawNameY = anAxisData[1].DrawName;
- params.gtDrawNameZ = anAxisData[2].DrawName;
- params.gtNameX = anAxisData[0].Name;
- params.gtNameY = anAxisData[1].Name;
- params.gtNameZ = anAxisData[2].Name;
- params.gtNameColorRX = anAxisData[0].NameColor.red();
- params.gtNameColorGX = anAxisData[0].NameColor.green();
- params.gtNameColorBX = anAxisData[0].NameColor.blue();
- params.gtNameColorRY = anAxisData[1].NameColor.red();
- params.gtNameColorGY = anAxisData[1].NameColor.green();
- params.gtNameColorBY = anAxisData[1].NameColor.blue();
- params.gtNameColorRZ = anAxisData[2].NameColor.red();
- params.gtNameColorGZ = anAxisData[2].NameColor.green();
- params.gtNameColorBZ = anAxisData[2].NameColor.blue();
- params.gtDrawValuesX = anAxisData[0].DrawValues;
- params.gtDrawValuesY = anAxisData[1].DrawValues;
- params.gtDrawValuesZ = anAxisData[2].DrawValues;
- params.gtNbValuesX = anAxisData[0].NbValues;
- params.gtNbValuesY = anAxisData[1].NbValues;
- params.gtNbValuesZ = anAxisData[2].NbValues;
- params.gtOffsetX = anAxisData[0].Offset;
- params.gtOffsetY = anAxisData[1].Offset;
- params.gtOffsetZ = anAxisData[2].Offset;
- params.gtColorRX = anAxisData[0].Color.red();
- params.gtColorGX = anAxisData[0].Color.green();
- params.gtColorBX = anAxisData[0].Color.blue();
- params.gtColorRY = anAxisData[1].Color.red();
- params.gtColorGY = anAxisData[1].Color.green();
- params.gtColorBY = anAxisData[1].Color.blue();
- params.gtColorRZ = anAxisData[2].Color.red();
- params.gtColorGZ = anAxisData[2].Color.green();
- params.gtColorBZ = anAxisData[2].Color.blue();
- params.gtDrawTickmarksX = anAxisData[0].DrawTickmarks;
- params.gtDrawTickmarksY = anAxisData[1].DrawTickmarks;
- params.gtDrawTickmarksZ = anAxisData[2].DrawTickmarks;
- params.gtTickmarkLengthX = anAxisData[0].TickmarkLength;
- params.gtTickmarkLengthY = anAxisData[1].TickmarkLength;
- params.gtTickmarkLengthZ = anAxisData[2].TickmarkLength;
-#endif
-
- return params;
-}
-
-/*!
- \brief Get visual parameters of this view window.
- \return visual parameters of view window
-*/
-QString OCCViewer_ViewWindow::getVisualParameters()
-{
- viewAspect params = getViewParams();
-
- QStringList data;
-
- data << QString( "scale=%1" ) .arg( params.scale, 0, 'e', 12 );
- data << QString( "centerX=%1" ) .arg( params.centerX, 0, 'e', 12 );
- data << QString( "centerY=%1" ) .arg( params.centerY, 0, 'e', 12 );
- data << QString( "projX=%1" ) .arg( params.projX, 0, 'e', 12 );
- data << QString( "projY=%1" ) .arg( params.projY, 0, 'e', 12 );
- data << QString( "projZ=%1" ) .arg( params.projZ, 0, 'e', 12 );
- data << QString( "twist=%1" ) .arg( params.twist, 0, 'e', 12 );
- data << QString( "atX=%1" ) .arg( params.atX, 0, 'e', 12 );
- data << QString( "atY=%1" ) .arg( params.atY, 0, 'e', 12 );
- data << QString( "atZ=%1" ) .arg( params.atZ, 0, 'e', 12 );
- data << QString( "eyeX=%1" ) .arg( params.eyeX, 0, 'e', 12 );
- data << QString( "eyeY=%1" ) .arg( params.eyeY, 0, 'e', 12 );
- data << QString( "eyeZ=%1" ) .arg( params.eyeZ, 0, 'e', 12 );
- data << QString( "scaleX=%1" ) .arg( params.scaleX, 0, 'e', 12 );
- data << QString( "scaleY=%1" ) .arg( params.scaleY, 0, 'e', 12 );
- data << QString( "scaleZ=%1" ) .arg( params.scaleZ, 0, 'e', 12 );
- data << QString( "isVisible=%1" ).arg( params.isVisible );
- data << QString( "size=%1" ) .arg( params.size, 0, 'f', 2 );
-
- ClipPlanesList aPlanes = myModel->getClipPlanes();
- for ( int i=0; i < aPlanes.size(); i++ ) {
- OCCViewer_ClipPlane& aPlane = aPlanes[i];
- QString ClippingPlane = QString( "ClippingPlane%1=").arg( i+1 );
- ClippingPlane += QString( "Mode~%1;").arg( (int)aPlane.PlaneMode );
- ClippingPlane += QString( "IsActive~%1;").arg( aPlane.IsOn );
- ClippingPlane += QString( "AbsoluteOrientation~%1;" ).arg( aPlane.Orientation );
- ClippingPlane += QString( "IsInvert~%1;" ).arg( aPlane.IsInvert );
- ClippingPlane += QString( "X~%1;" ).arg( aPlane.X );
- ClippingPlane += QString( "Y~%1;" ).arg( aPlane.Y );
- ClippingPlane += QString( "Z~%1;" ).arg( aPlane.Z );
- ClippingPlane += QString( "Dx~%1;" ).arg( aPlane.Dx );
- ClippingPlane += QString( "Dy~%1;" ).arg( aPlane.Dy );;
- ClippingPlane += QString( "Dz~%1;" ).arg( aPlane.Dz );
- ClippingPlane += QString( "RelativeOrientation~%1;" ).arg( aPlane.RelativeMode.Orientation );
- ClippingPlane += QString( "Distance~%1;" ).arg( aPlane.RelativeMode.Distance );
- ClippingPlane += QString( "Rotation1~%1;" ).arg( aPlane.RelativeMode.Rotation1 );
- ClippingPlane += QString( "Rotation2~%1" ).arg( aPlane.RelativeMode.Rotation2 );
- data << ClippingPlane;
- }
-
-
-#if OCC_VERSION_LARGE > 0x06030009 // available only with OCC-6.3-sp10 or newer version
- // graduated trihedron
- data << QString( "gtIsVisible=%1" ) .arg( params.gtIsVisible );
- data << QString( "gtDrawNameX=%1" ) .arg( params.gtDrawNameX );
- data << QString( "gtDrawNameY=%1" ) .arg( params.gtDrawNameY );
- data << QString( "gtDrawNameZ=%1" ) .arg( params.gtDrawNameZ );
- data << QString( "gtNameX=%1" ) .arg( params.gtNameX );
- data << QString( "gtNameY=%1" ) .arg( params.gtNameY );
- data << QString( "gtNameZ=%1" ) .arg( params.gtNameZ );
- data << QString( "gtNameColorRX=%1" ) .arg( params.gtNameColorRX );
- data << QString( "gtNameColorGX=%1" ) .arg( params.gtNameColorGX );
- data << QString( "gtNameColorBX=%1" ) .arg( params.gtNameColorBX );
- data << QString( "gtNameColorRY=%1" ) .arg( params.gtNameColorRY );
- data << QString( "gtNameColorGY=%1" ) .arg( params.gtNameColorGY );
- data << QString( "gtNameColorBY=%1" ) .arg( params.gtNameColorBY );
- data << QString( "gtNameColorRZ=%1" ) .arg( params.gtNameColorRZ );
- data << QString( "gtNameColorGZ=%1" ) .arg( params.gtNameColorGZ );
- data << QString( "gtNameColorBZ=%1" ) .arg( params.gtNameColorBZ );
- data << QString( "gtDrawValuesX=%1" ) .arg( params.gtDrawValuesX );
- data << QString( "gtDrawValuesY=%1" ) .arg( params.gtDrawValuesY );
- data << QString( "gtDrawValuesZ=%1" ) .arg( params.gtDrawValuesZ );
- data << QString( "gtNbValuesX=%1" ) .arg( params.gtNbValuesX );
- data << QString( "gtNbValuesY=%1" ) .arg( params.gtNbValuesY );
- data << QString( "gtNbValuesZ=%1" ) .arg( params.gtNbValuesZ );
- data << QString( "gtOffsetX=%1" ) .arg( params.gtOffsetX );
- data << QString( "gtOffsetY=%1" ) .arg( params.gtOffsetY );
- data << QString( "gtOffsetZ=%1" ) .arg( params.gtOffsetZ );
- data << QString( "gtColorRX=%1" ) .arg( params.gtColorRX );
- data << QString( "gtColorGX=%1" ) .arg( params.gtColorGX );
- data << QString( "gtColorBX=%1" ) .arg( params.gtColorBX );
- data << QString( "gtColorRY=%1" ) .arg( params.gtColorRY );
- data << QString( "gtColorGY=%1" ) .arg( params.gtColorGY );
- data << QString( "gtColorBY=%1" ) .arg( params.gtColorBY );
- data << QString( "gtColorRZ=%1" ) .arg( params.gtColorRZ );
- data << QString( "gtColorGZ=%1" ) .arg( params.gtColorGZ );
- data << QString( "gtColorBZ=%1" ) .arg( params.gtColorBZ );
- data << QString( "gtDrawTickmarksX=%1" ) .arg( params.gtDrawTickmarksX );
- data << QString( "gtDrawTickmarksY=%1" ) .arg( params.gtDrawTickmarksY );
- data << QString( "gtDrawTickmarksZ=%1" ) .arg( params.gtDrawTickmarksZ );
- data << QString( "gtTickmarkLengthX=%1" ).arg( params.gtTickmarkLengthX );
- data << QString( "gtTickmarkLengthY=%1" ).arg( params.gtTickmarkLengthY );
- data << QString( "gtTickmarkLengthZ=%1" ).arg( params.gtTickmarkLengthZ );
-#endif
- QString bg = Qtx::backgroundToString( background() ).replace( "=", "$" );
- data << QString( "background=%1" ).arg( bg );
-
- return data.join("*");
-}
-
-/*!
- \brief Restore visual parameters of the view window.
- \param parameters visual parameters of view window
-*/
-void OCCViewer_ViewWindow::setVisualParameters( const QString& parameters )
-{
- viewAspect params;
- ClipPlanesList aClipPlanes;
- QStringList data = parameters.split( '*' );
- Qtx::BackgroundData bgData;
- if ( parameters.contains( '=' ) ) // new format - "scale=1.000e+00*centerX=0.000e+00..."
- {
- foreach( QString param, data ) {
- QString paramName = param.section( '=', 0, 0 ).trimmed();
- QString paramValue = param.section( '=', 1, 1 ).trimmed();
- if ( paramName == "scale" ) params.scale = paramValue.toDouble();
- else if ( paramName == "centerX" ) params.centerX = paramValue.toDouble();
- else if ( paramName == "centerY" ) params.centerY = paramValue.toDouble();
- else if ( paramName == "projX" ) params.projX = paramValue.toDouble();
- else if ( paramName == "projY" ) params.projY = paramValue.toDouble();
- else if ( paramName == "projZ" ) params.projZ = paramValue.toDouble();
- else if ( paramName == "twist" ) params.twist = paramValue.toDouble();
- else if ( paramName == "atX" ) params.atX = paramValue.toDouble();
- else if ( paramName == "atY" ) params.atY = paramValue.toDouble();
- else if ( paramName == "atZ" ) params.atZ = paramValue.toDouble();
- else if ( paramName == "eyeX" ) params.eyeX = paramValue.toDouble();
- else if ( paramName == "eyeY" ) params.eyeY = paramValue.toDouble();
- else if ( paramName == "eyeZ" ) params.eyeZ = paramValue.toDouble();
- else if ( paramName == "scaleX" ) params.scaleX = paramValue.toDouble();
- else if ( paramName == "scaleY" ) params.scaleY = paramValue.toDouble();
- else if ( paramName == "scaleZ" ) params.scaleZ = paramValue.toDouble();
- else if ( paramName == "isVisible" ) params.isVisible = paramValue.toInt();
- else if ( paramName == "size" ) params.size = paramValue.toDouble();
- else if ( paramName.contains( "ClippingPlane" ) ) {
- QStringList ClipPlaneData = paramValue.split( ';' );
- OCCViewer_ClipPlane aPlane;
- foreach( QString ClipPlaneParam, ClipPlaneData ) {
- QString ClipPlane_paramName = ClipPlaneParam.section( '~', 0, 0 ).trimmed();
- QString ClipPlane_paramValue = ClipPlaneParam.section( '~', 1, 1 ).trimmed();
- if ( ClipPlane_paramName == "Mode" ) aPlane.PlaneMode = ( ClipPlaneMode )ClipPlane_paramValue.toInt();
- else if ( ClipPlane_paramName == "IsActive" ) aPlane.IsOn = ClipPlane_paramValue.toInt();
- else if ( ClipPlane_paramName == "AbsoluteOrientation" ) aPlane.Orientation = ClipPlane_paramValue.toInt();
- else if ( ClipPlane_paramName == "IsInvert" ) aPlane.IsInvert = ClipPlane_paramValue.toInt();
- else if ( ClipPlane_paramName == "X" ) aPlane.X = ClipPlane_paramValue.toDouble();
- else if ( ClipPlane_paramName == "Y" ) aPlane.Y = ClipPlane_paramValue.toDouble();
- else if ( ClipPlane_paramName == "Z" ) aPlane.Z = ClipPlane_paramValue.toDouble();
- else if ( ClipPlane_paramName == "Dx" ) aPlane.Dx = ClipPlane_paramValue.toDouble();
- else if ( ClipPlane_paramName == "Dy" ) aPlane.Dy = ClipPlane_paramValue.toDouble();
- else if ( ClipPlane_paramName == "Dz" ) aPlane.Dz = ClipPlane_paramValue.toDouble();
- else if ( ClipPlane_paramName == "RelativeOrientation" ) aPlane.RelativeMode.Orientation = ClipPlane_paramValue.toInt();
- else if ( ClipPlane_paramName == "Distance" ) aPlane.RelativeMode.Distance = ClipPlane_paramValue.toDouble();
- else if ( ClipPlane_paramName == "Rotation1" ) aPlane.RelativeMode.Rotation1 = ClipPlane_paramValue.toDouble();
- else if ( ClipPlane_paramName == "Rotation2" ) aPlane.RelativeMode.Rotation2 = ClipPlane_paramValue.toDouble();
- }
- aClipPlanes.push_back(aPlane);
- }
- // graduated trihedron
- else if ( paramName == "gtIsVisible" ) params.gtIsVisible = paramValue.toInt();
- else if ( paramName == "gtDrawNameX" ) params.gtDrawNameX = paramValue.toInt();
- else if ( paramName == "gtDrawNameY" ) params.gtDrawNameY = paramValue.toInt();
- else if ( paramName == "gtDrawNameZ" ) params.gtDrawNameZ = paramValue.toInt();
- else if ( paramName == "gtNameX" ) params.gtNameX = paramValue;
- else if ( paramName == "gtNameY" ) params.gtNameY = paramValue;
- else if ( paramName == "gtNameZ" ) params.gtNameZ = paramValue;
- else if ( paramName == "gtNameColorRX" ) params.gtNameColorRX = paramValue.toInt();
- else if ( paramName == "gtNameColorGX" ) params.gtNameColorGX = paramValue.toInt();
- else if ( paramName == "gtNameColorBX" ) params.gtNameColorBX = paramValue.toInt();
- else if ( paramName == "gtNameColorRY" ) params.gtNameColorRY = paramValue.toInt();
- else if ( paramName == "gtNameColorGY" ) params.gtNameColorGY = paramValue.toInt();
- else if ( paramName == "gtNameColorBY" ) params.gtNameColorBY = paramValue.toInt();
- else if ( paramName == "gtNameColorRZ" ) params.gtNameColorRZ = paramValue.toInt();
- else if ( paramName == "gtNameColorGZ" ) params.gtNameColorGZ = paramValue.toInt();
- else if ( paramName == "gtNameColorBZ" ) params.gtNameColorBZ = paramValue.toInt();
- else if ( paramName == "gtDrawValuesX" ) params.gtDrawValuesX = paramValue.toInt();
- else if ( paramName == "gtDrawValuesY" ) params.gtDrawValuesY = paramValue.toInt();
- else if ( paramName == "gtDrawValuesZ" ) params.gtDrawValuesZ = paramValue.toInt();
- else if ( paramName == "gtNbValuesX" ) params.gtNbValuesX = paramValue.toInt();
- else if ( paramName == "gtNbValuesY" ) params.gtNbValuesY = paramValue.toInt();
- else if ( paramName == "gtNbValuesZ" ) params.gtNbValuesZ = paramValue.toInt();
- else if ( paramName == "gtOffsetX" ) params.gtOffsetX = paramValue.toInt();
- else if ( paramName == "gtOffsetY" ) params.gtOffsetY = paramValue.toInt();
- else if ( paramName == "gtOffsetZ" ) params.gtOffsetZ = paramValue.toInt();
- else if ( paramName == "gtColorRX" ) params.gtColorRX = paramValue.toInt();
- else if ( paramName == "gtColorGX" ) params.gtColorGX = paramValue.toInt();
- else if ( paramName == "gtColorBX" ) params.gtColorBX = paramValue.toInt();
- else if ( paramName == "gtColorRY" ) params.gtColorRY = paramValue.toInt();
- else if ( paramName == "gtColorGY" ) params.gtColorGY = paramValue.toInt();
- else if ( paramName == "gtColorBY" ) params.gtColorBY = paramValue.toInt();
- else if ( paramName == "gtColorRZ" ) params.gtColorRZ = paramValue.toInt();
- else if ( paramName == "gtColorGZ" ) params.gtColorGZ = paramValue.toInt();
- else if ( paramName == "gtColorBZ" ) params.gtColorBZ = paramValue.toInt();
- else if ( paramName == "gtDrawTickmarksX" ) params.gtDrawTickmarksX = paramValue.toInt();
- else if ( paramName == "gtDrawTickmarksY" ) params.gtDrawTickmarksY = paramValue.toInt();
- else if ( paramName == "gtDrawTickmarksZ" ) params.gtDrawTickmarksZ = paramValue.toInt();
- else if ( paramName == "gtTickmarkLengthX" ) params.gtTickmarkLengthX = paramValue.toInt();
- else if ( paramName == "gtTickmarkLengthY" ) params.gtTickmarkLengthY = paramValue.toInt();
- else if ( paramName == "gtTickmarkLengthZ" ) params.gtTickmarkLengthZ = paramValue.toInt();
- else if ( paramName == "background" ) {
- QString bg = paramValue.replace( "$", "=" );
- bgData = Qtx::stringToBackground( bg );
- }
- }
- }
- else // old format - "1.000e+00*0.000e+00..."
- {
- int idx = 0;
- params.scale = data.count() > idx ? data[idx++].toDouble() : 1.0;
- params.centerX = data.count() > idx ? data[idx++].toDouble() : 0.0;
- params.centerY = data.count() > idx ? data[idx++].toDouble() : 0.0;
- params.projX = data.count() > idx ? data[idx++].toDouble() : sqrt(1./3);
- params.projY = data.count() > idx ? data[idx++].toDouble() : -sqrt(1./3);
- params.projZ = data.count() > idx ? data[idx++].toDouble() : sqrt(1./3);
- params.twist = data.count() > idx ? data[idx++].toDouble() : 0.0;
- params.atX = data.count() > idx ? data[idx++].toDouble() : 0.0;
- params.atY = data.count() > idx ? data[idx++].toDouble() : 0.0;
- params.atZ = data.count() > idx ? data[idx++].toDouble() : 0.0;
- params.eyeX = data.count() > idx ? data[idx++].toDouble() : sqrt(250000./3);
- params.eyeY = data.count() > idx ? data[idx++].toDouble() : -sqrt(250000./3);
- params.eyeZ = data.count() > idx ? data[idx++].toDouble() : sqrt(250000./3);
- params.scaleX = data.count() > idx ? data[idx++].toDouble() : 1.0;
- params.scaleY = data.count() > idx ? data[idx++].toDouble() : 1.0;
- params.scaleZ = data.count() > idx ? data[idx++].toDouble() : 1.0;
- params.isVisible = data.count() > idx ? data[idx++].toInt() : 1;
- params.size = data.count() > idx ? data[idx++].toDouble() : 100.0;
- }
- performRestoring( params );
- setBackground( bgData );
- myModel->setClipPlanes(aClipPlanes);
-}
-
-/*!
- \brief Handle show event.
-
- Emits Show() signal.
-
- \param theEvent show event
-*/
-void OCCViewer_ViewWindow::showEvent( QShowEvent* theEvent )
-{
- emit Show( theEvent );
-}
-
-/*!
- \brief Handle hide event.
-
- Emits Hide() signal.
-
- \param theEvent hide event
-*/
-void OCCViewer_ViewWindow::hideEvent( QHideEvent* theEvent )
-{
- emit Hide( theEvent );
-}
-
-
-/*!
- Creates default sketcher. [ virtual protected ]
-*/
-OCCViewer_ViewSketcher* OCCViewer_ViewWindow::createSketcher( int type )
-{
- if ( type == Rect )
- return new OCCViewer_RectSketcher( this, type );
- if ( type == Polygon )
- return new OCCViewer_PolygonSketcher( this, type );
- return 0;
-}
-
-void OCCViewer_ViewWindow::initSketchers()
-{
- if ( mySketchers.isEmpty() )
- {
- mySketchers.append( createSketcher( Rect ) );
- mySketchers.append( createSketcher( Polygon ) );
- }
-}
-
-OCCViewer_ViewSketcher* OCCViewer_ViewWindow::getSketcher( const int typ )
-{
- OCCViewer_ViewSketcher* sketcher = 0;
- QList<OCCViewer_ViewSketcher*>::Iterator it;
- for ( it = mySketchers.begin(); it != mySketchers.end() && !sketcher; ++it )
- {
- OCCViewer_ViewSketcher* sk = (*it);
- if ( sk->type() == typ )
- sketcher = sk;
- }
- return sketcher;
-}
-
-/*!
- Handles requests for sketching in the active view. [ virtual public ]
-*/
-void OCCViewer_ViewWindow::activateSketching( int type )
-{
- OCCViewer_ViewPort3d* vp = getViewPort();
- if ( !vp )
- return;
-
- if ( !vp->isSketchingEnabled() )
- return;
-
- /* Finish current sketching */
- if ( type == NoSketching )
- {
- if ( mypSketcher )
- {
- onSketchingFinished();
- mypSketcher->deactivate();
- mypSketcher = 0;
- }
- }
- /* Activate new sketching */
- else
- {
- activateSketching( NoSketching ); /* concurrency not suported */
- mypSketcher = getSketcher( type );
- if ( mypSketcher )
- {
- mypSketcher->activate();
- onSketchingStarted();
- }
- }
-}
-
-/*!
- Unhilights detected entities. [ virtual protected ]
-*/
-void OCCViewer_ViewWindow::onSketchingStarted()
-{
-}
-
-/*!
- Selection by rectangle or polygon. [ virtual protected ]
-*/
-void OCCViewer_ViewWindow::onSketchingFinished()
-{
- MESSAGE("OCCViewer_ViewWindow::onSketchingFinished()")
- if ( mypSketcher && mypSketcher->result() == OCCViewer_ViewSketcher::Accept )
- {
- Handle(AIS_InteractiveContext) ic = myModel->getAISContext();
- bool append = bool( mypSketcher->buttonState() && mypSketcher->isHasShift() );
- switch( mypSketcher->type() )
- {
- case Rect:
- {
- QRect* aRect = (QRect*)mypSketcher->data();
- if( aRect )
- {
- int aLeft = aRect->left();
- int aRight = aRect->right();
- int aTop = aRect->top();
- int aBottom = aRect->bottom();
-// myRect = aRect;
-
- if( append )
- ic->ShiftSelect( aLeft, aBottom, aRight, aTop, getViewPort()->getView(), Standard_False );
- else
- ic->Select( aLeft, aBottom, aRight, aTop, getViewPort()->getView(), Standard_False );
- }
- }
- break;
- case Polygon:
- {
- QPolygon* aPolygon = (QPolygon*)mypSketcher->data();
- if( aPolygon )
- {
- int size = aPolygon->size();
- TColgp_Array1OfPnt2d anArray( 1, size );
-
- QPolygon::Iterator it = aPolygon->begin();
- QPolygon::Iterator itEnd = aPolygon->end();
- for( int index = 1; it != itEnd; ++it, index++ )
- {
- QPoint aPoint = *it;
- anArray.SetValue( index, gp_Pnt2d( aPoint.x(), aPoint.y() ) );
- }
-
- if( append )
- ic->ShiftSelect( anArray, getViewPort()->getView(), Standard_False );
- else
- ic->Select( anArray, getViewPort()->getView(), Standard_False );
- }
- }
- break;
- default:
- break;
- }
-
- OCCViewer_ViewManager* aViewMgr = ( OCCViewer_ViewManager* )getViewManager();
- aViewMgr->getOCCViewer()->performSelectionChanged();
- }
-}
-
-OCCViewer_ViewPort3d* OCCViewer_ViewWindow::getViewPort()
-{
- return myViewPort;
-}
-
-bool OCCViewer_ViewWindow::transformRequested() const
-{
- return ( myOperation != NOTHING );
-}
-
-bool OCCViewer_ViewWindow::transformInProcess() const
-{
- return myEventStarted;
-}
-
-void OCCViewer_ViewWindow::setTransformInProcess( bool bOn )
-{
- myEventStarted = bOn;
-}
-
-/*!
- Set enabled state of transformation (rotate, zoom, etc)
-*/
-void OCCViewer_ViewWindow::setTransformEnabled( const OperationType id, const bool on )
-{
- if ( id != NOTHING ) myStatus.insert( id, on );
-}
-
-/*!
- \return enabled state of transformation (rotate, zoom, etc)
-*/
-bool OCCViewer_ViewWindow::transformEnabled( const OperationType id ) const
-{
- return myStatus.contains( id ) ? myStatus[ id ] : true;
-}
-
-void OCCViewer_ViewWindow::onMaximizedView()
-{
- setMaximized(!isMaximized());
-}
-
-void OCCViewer_ViewWindow::returnTo3dView()
-{
- setReturnedTo3dView( true );
-}
-
-void OCCViewer_ViewWindow::setReturnedTo3dView(bool isVisible3dView)
-{
- if ( !toolMgr()->action( ReturnTo3dViewId ) ||
- toolMgr()->isShown(ReturnTo3dViewId) != isVisible3dView ) return;
- if ( !isVisible3dView )
- toolMgr()->show( ReturnTo3dViewId );
- else
- toolMgr()->hide( ReturnTo3dViewId );
- if ( isVisible3dView ) emit returnedTo3d( );
-}
-
-
-void OCCViewer_ViewWindow::setMaximized(bool toMaximize, bool toSendSignal)
-{
- QAction* anAction = toolMgr()->action( MaximizedId );
- QAction* anAction2 = toolMgr()->action( ReturnTo3dViewId );
- SUIT_ResourceMgr* aResMgr = SUIT_Session::session()->resourceMgr();
- if ( toMaximize ) {
- anAction->setText( tr( "MNU_MINIMIZE_VIEW" ) );
- anAction->setToolTip( tr( "MNU_MINIMIZE_VIEW" ) );
- anAction->setIcon( aResMgr->loadPixmap( "OCCViewer", tr( "ICON_OCCVIEWER_MINIMIZE" ) ) );
- anAction->setStatusTip( tr( "DSC_MINIMIZE_VIEW" ) );
- if ( anAction2 && my2dMode != No2dMode ) toolMgr()->show( ReturnTo3dViewId );
- if (toSendSignal) {
- emit maximized( this, true );
- }
- }
- else {
- anAction->setText( tr( "MNU_MAXIMIZE_VIEW" ) );
- anAction->setToolTip( tr( "MNU_MAXIMIZE_VIEW" ) );
- anAction->setIcon( aResMgr->loadPixmap( "OCCViewer", tr( "ICON_OCCVIEWER_MAXIMIZE" ) ) );
- anAction->setStatusTip( tr( "DSC_MAXIMIZE_VIEW" ) );
- if ( anAction2 && my2dMode != No2dMode ) toolMgr()->hide( ReturnTo3dViewId );
- if (toSendSignal) {
- emit maximized( this, false );
- }
- }
-}
-
-bool OCCViewer_ViewWindow::isMaximized() const
-{
- return !(toolMgr()->action( MaximizedId )->text() == tr( "MNU_MAXIMIZE_VIEW" ));
-}
-
-void OCCViewer_ViewWindow::setSketcherStyle( bool enable )
-{
- IsSketcherStyle = enable;
-}
-
-bool OCCViewer_ViewWindow::isSketcherStyle() const
-{
- return IsSketcherStyle;
-}
-
-
-void OCCViewer_ViewWindow::set2dMode(Mode2dType theType)
-{
- my2dMode = theType;
-}
-
-// obsolete
-QColor OCCViewer_ViewWindow::backgroundColor() const
-{
- return myViewPort ? myViewPort->backgroundColor() : Qt::black;
-}
-
-// obsolete
-void OCCViewer_ViewWindow::setBackgroundColor( const QColor& theColor )
-{
- if ( myViewPort ) myViewPort->setBackgroundColor( theColor );
-}
-
-Qtx::BackgroundData OCCViewer_ViewWindow::background() const
-{
- return myViewPort ? myViewPort->background() : Qtx::BackgroundData();
-}
-
-void OCCViewer_ViewWindow::setBackground( const Qtx::BackgroundData& theBackground )
-{
- if ( myViewPort ) myViewPort->setBackground( theBackground );
-}
-
-/*!
- Clears view aspects
-*/
-void OCCViewer_ViewWindow::clearViewAspects()
-{
- myViewAspects.clear();
-}
-
-/*!
- \return const reference to list of view aspects
-*/
-const viewAspectList& OCCViewer_ViewWindow::getViewAspects()
-{
- return myViewAspects;
-}
-
-/*!
- Appends new view aspect
- \param aParams - new view aspects
-*/
-void OCCViewer_ViewWindow::appendViewAspect( const viewAspect& aParams )
-{
- myViewAspects.append( aParams );
-}
-
-/*!
- Replaces old view aspects by new ones
- \param aViewList - list of new view aspects
-*/
-void OCCViewer_ViewWindow::updateViewAspects( const viewAspectList& aViewList )
-{
- myViewAspects = aViewList;
-}
-
-/*!
- Get camera properties for the OCC view window.
- \return shared pointer on camera properties.
-*/
-SUIT_CameraProperties OCCViewer_ViewWindow::cameraProperties()
-{
- SUIT_CameraProperties aProps;
-
- Handle(V3d_View) aSourceView = getViewPort()->getView();
- if ( aSourceView.IsNull() )
- return aProps;
-
- if ( get2dMode() == No2dMode ) {
- aProps.setDimension( SUIT_CameraProperties::Dim3D );
- }
- else {
- aProps.setDimension( SUIT_CameraProperties::Dim2D );
- aProps.setViewSide( (SUIT_CameraProperties::ViewSide)(int)get2dMode() );
- }
-
- // read common properites of the view
- Standard_Real anUpDir[3];
- Standard_Real aPrjDir[3];
- Standard_Real aMapScale[2];
- Standard_Real aTranslation[3];
- Standard_Real anAxialScale[3];
-
- aSourceView->Up(anUpDir[0], anUpDir[1], anUpDir[2]);
- aSourceView->Proj(aPrjDir[0], aPrjDir[1], aPrjDir[2]);
- aSourceView->At(aTranslation[0], aTranslation[1], aTranslation[2]);
- aSourceView->Size(aMapScale[0], aMapScale[1]);
-
- getViewPort()->getAxialScale(anAxialScale[0], anAxialScale[1], anAxialScale[2]);
-
- // we use similar depth to the one used in perspective projection
- // to proivde a convinience synchronization with other camera views that
- // can switch between orthogonal & perspective projection. otherwise,
- // the camera will get to close when switching from orthogonal to perspective.
- Standard_Real aCameraDepth = aSourceView->Depth() + aSourceView->ZSize() * 0.5;
-
- // store common props
- aProps.setViewUp(anUpDir[0], anUpDir[1], anUpDir[2]);
- aProps.setMappingScale(aMapScale[1] / 2.0);
- aProps.setAxialScale(anAxialScale[0], anAxialScale[1], anAxialScale[2]);
-
- // generate view orientation matrix for transforming OCC projection reference point
- // into a camera (eye) position.
- gp_Dir aLeftDir = gp_Dir(anUpDir[0], anUpDir[1], anUpDir[2]).Crossed(
- gp_Dir(aPrjDir[0], aPrjDir[1], aPrjDir[2]));
-
- gp_Trsf aTrsf;
- aTrsf.SetValues( aLeftDir.X(), anUpDir[0], aPrjDir[0], aTranslation[0],
- aLeftDir.Y(), anUpDir[1], aPrjDir[1], aTranslation[1],
- aLeftDir.Z(), anUpDir[2], aPrjDir[2], aTranslation[2],
- Precision::Confusion(),
- Precision::Confusion() );
-
- // get projection reference point in view coordinates
- Graphic3d_Vertex aProjRef = aSourceView->ViewMapping().ProjectionReferencePoint();
-
- // transform to world-space coordinate system
- gp_Pnt aPosition = gp_Pnt(aProjRef.X(), aProjRef.Y(), aCameraDepth).Transformed(aTrsf);
-
- // compute focal point
- double aFocalPoint[3];
-
- aFocalPoint[0] = aPosition.X() - aPrjDir[0] * aCameraDepth;
- aFocalPoint[1] = aPosition.Y() - aPrjDir[1] * aCameraDepth;
- aFocalPoint[2] = aPosition.Z() - aPrjDir[2] * aCameraDepth;
-
- aProps.setFocalPoint(aFocalPoint[0], aFocalPoint[1], aFocalPoint[2]);
- aProps.setPosition(aPosition.X(), aPosition.Y(), aPosition.Z());
-
- return aProps;
-}
-
-/*!
- Synchronize views.
- This implementation synchronizes OCC view's camera propreties.
-*/
-void OCCViewer_ViewWindow::synchronize( SUIT_ViewWindow* theView )
-{
- bool blocked = blockSignals( true );
-
- SUIT_CameraProperties aProps = theView->cameraProperties();
- if ( !cameraProperties().isCompatible( aProps ) ) {
- // other view, this one is being currently synchronized to, seems has become incompatible
- // we have to break synchronization
- updateSyncViews();
- return;
- }
-
- Handle(V3d_View) aDestView = getViewPort()->getView();
-
- aDestView->SetImmediateUpdate( Standard_False );
-
- double anUpDir[3];
- double aPosition[3];
- double aFocalPoint[3];
- double aMapScaling;
- double anAxialScale[3];
-
- // get common properties
- aProps.getFocalPoint(aFocalPoint[0], aFocalPoint[1], aFocalPoint[2]);
- aProps.getPosition(aPosition[0], aPosition[1], aPosition[2]);
- aProps.getViewUp(anUpDir[0], anUpDir[1], anUpDir[2]);
- aProps.getAxialScale(anAxialScale[0], anAxialScale[1], anAxialScale[2]);
- aMapScaling = aProps.getMappingScale() * 2.0;
-
- gp_Dir aProjDir(aPosition[0] - aFocalPoint[0],
- aPosition[1] - aFocalPoint[1],
- aPosition[2] - aFocalPoint[2]);
-
- // get custom view translation
- Standard_Real aTranslation[3];
- aDestView->At(aTranslation[0], aTranslation[1], aTranslation[2]);
-
- gp_Dir aLeftDir = gp_Dir(anUpDir[0], anUpDir[1], anUpDir[2]).Crossed(
- gp_Dir(aProjDir.X(), aProjDir.Y(), aProjDir.Z()));
-
- // convert camera position into a view reference point
- gp_Trsf aTrsf;
- aTrsf.SetValues( aLeftDir.X(), anUpDir[0], aProjDir.X(), aTranslation[0],
- aLeftDir.Y(), anUpDir[1], aProjDir.Y(), aTranslation[1],
- aLeftDir.Z(), anUpDir[2], aProjDir.Z(), aTranslation[2],
- Precision::Confusion(),
- Precision::Confusion() );
- aTrsf.Invert();
-
- // transform to view-space coordinate system
- gp_Pnt aProjRef(aPosition[0], aPosition[1], aPosition[2]);
- aProjRef.Transform(aTrsf);
-
- // set view camera properties using low-level approach. this is done
- // in order to avoid interference with static variables in v3d view used
- // when rotation is in process in another view.
- Visual3d_ViewMapping aMapping = aDestView->View()->ViewMapping();
- Visual3d_ViewOrientation anOrientation = aDestView->View()->ViewOrientation();
-
- Graphic3d_Vector aMappingProj(aProjDir.X(), aProjDir.Y(), aProjDir.Z());
- Graphic3d_Vector aMappingUp(anUpDir[0], anUpDir[1], anUpDir[2]);
-
- aMappingProj.Normalize();
- aMappingUp.Normalize();
-
- anOrientation.SetViewReferencePlane(aMappingProj);
- anOrientation.SetViewReferenceUp(aMappingUp);
-
- aDestView->SetViewMapping(aMapping);
- aDestView->SetViewOrientation(anOrientation);
-
- // set panning
- aDestView->SetCenter(aProjRef.X(), aProjRef.Y());
-
- // set mapping scale
- Standard_Real aWidth, aHeight;
- aDestView->Size(aWidth, aHeight);
-
- if ( aWidth > aHeight )
- aDestView->SetSize (aMapScaling * (aWidth / aHeight));
- else
- aDestView->SetSize (aMapScaling);
-
- getViewPort()->setAxialScale(anAxialScale[0], anAxialScale[1], anAxialScale[2]);
-
- aDestView->ZFitAll();
- aDestView->SetImmediateUpdate( Standard_True );
- aDestView->Redraw();
-
- blockSignals( blocked );
-}
-
-/*!
- \brief Indicates whether preselection is enabled
- \return true if preselection is enabled
-*/
-bool OCCViewer_ViewWindow::isPreselectionEnabled() const
-{
- return myPreselectionEnabled;
-}
-
-/*!
- \brief Enables/disables preselection
- \param theIsToEnable if true - preselection will be enabled
-*/
-void OCCViewer_ViewWindow::enablePreselection( bool theIsToEnable )
-{
- onSwitchPreselection( theIsToEnable );
-}
-
-/*!
- \brief Indicates whether selection is enabled
- \return true if selection is enabled
-*/
-bool OCCViewer_ViewWindow::isSelectionEnabled() const
-{
- return mySelectionEnabled;
-}
-
-/*!
- \brief Enables/disables selection
- \param theIsToEnable if true - selection will be enabled
-*/
-void OCCViewer_ViewWindow::enableSelection( bool theIsToEnable )
-{
- onSwitchSelection( theIsToEnable );
-}
-
-
-/*!
- \brief called if clipping operation is activated / deactivated.
-
- Enables/disables clipping plane displaying.
-
- \parma on action state
-*/
-void OCCViewer_ViewWindow::onClipping (bool theIsOn)
-{
- if(!myModel) return;
- OCCViewer_ClippingDlg* aClippingDlg = myModel->getClippingDlg();
-
- if (theIsOn) {
- if (!aClippingDlg) {
- aClippingDlg = new OCCViewer_ClippingDlg (this, myModel);
- myModel->setClippingDlg(aClippingDlg);
- }
- if (!aClippingDlg->isVisible())
- aClippingDlg->show();
- } else {
- if ( aClippingDlg ) {
- aClippingDlg->close();
- myModel->setClippingDlg(0);
- }
- }
-
- SUIT_ViewManager* mgr = getViewManager();
- if( mgr ) {
- QVector<SUIT_ViewWindow*> aViews = mgr->getViews();
- for(int i = 0, iEnd = aViews.size(); i < iEnd; i++) {
- if(SUIT_ViewWindow* aViewWindow = aViews.at(i)) {
- QtxActionToolMgr* mgr = aViewWindow->toolMgr();
- if(!mgr) continue;
- QAction* a = toolMgr()->action( ClippingId );
- if(!a) continue;
- if(theIsOn != a->isChecked()){
- disconnect (a, SIGNAL (toggled (bool)), aViewWindow, SLOT (onClipping (bool)));
- a->setChecked(theIsOn);
- connect (a, SIGNAL (toggled (bool)), aViewWindow, SLOT (onClipping (bool)));
- }
- }
- }
- }
-}
+ aPointsNb++;
+ theX += aBBPoint.X();
+ theY += aBBPoint.Y();
+ theZ += aBBPoint.Z();
+ }\r
+ }\r
+ }\r
+\r
+ if ( aPointsNb > 0 )\r
+ {\r
+ theX /= aPointsNb;\r
+ theY /= aPointsNb;\r
+ theZ /= aPointsNb;\r
+ }\r
+ return true;\r
+}\r
+\r
+/*!\r
+ \brief Set the gravity center as a rotation point.\r
+*/\r
+void OCCViewer_ViewWindow::activateSetRotationGravity()\r
+{\r
+ if ( myRotationPointSelection )\r
+ {\r
+ Handle(AIS_InteractiveContext) ic = myModel->getAISContext();\r
+ ic->CloseAllContexts();\r
+ myOperation = NOTHING;\r
+ myViewPort->setCursor( myCursor );\r
+ myCursorIsHand = false;\r
+ myRotationPointSelection = false;\r
+ }\r
+\r
+ myPrevPointType = myCurrPointType;\r
+ myCurrPointType = GRAVITY;\r
+\r
+ Standard_Real Xcenter, Ycenter, Zcenter;\r
+ if ( computeGravityCenter( Xcenter, Ycenter, Zcenter ) )\r
+ mySetRotationPointDlg->setCoords( Xcenter, Ycenter, Zcenter );\r
+}\r
+\r
+/*!\r
+ \brief Update gravity center in the "Set Rotation Point" dialog box.\r
+ \sa OCCViewer_SetRotationPointDlg class\r
+*/\r
+void OCCViewer_ViewWindow::updateGravityCoords()\r
+{\r
+ if ( mySetRotationPointDlg && mySetRotationPointDlg->isVisible() && myCurrPointType == GRAVITY )\r
+ {\r
+ Standard_Real Xcenter, Ycenter, Zcenter;\r
+ if ( computeGravityCenter( Xcenter, Ycenter, Zcenter ) )\r
+ mySetRotationPointDlg->setCoords( Xcenter, Ycenter, Zcenter );\r
+ }\r
+}\r
+\r
+/*!\r
+ \brief Set the point selected by the user as a rotation point.\r
+ \param theX X coordinate of the rotation point\r
+ \param theY Y coordinate of the rotation point\r
+ \param theZ Z coordinate of the rotation point\r
+*/\r
+void OCCViewer_ViewWindow::activateSetRotationSelected( double theX, double theY, double theZ )\r
+{\r
+ if ( myRotationPointSelection )\r
+ {\r
+ Handle(AIS_InteractiveContext) ic = myModel->getAISContext();\r
+ ic->CloseAllContexts();\r
+ myOperation = NOTHING;\r
+ myViewPort->setCursor( myCursor );\r
+ myCursorIsHand = false;\r
+ myRotationPointSelection = false;\r
+ }\r
+\r
+ myPrevPointType = myCurrPointType;\r
+ myCurrPointType = SELECTED;\r
+ mySelectedPoint.SetCoord(theX,theY,theZ);\r
+}\r
+\r
+/*!\r
+ \brief Start the shape selection process.\r
+*/\r
+void OCCViewer_ViewWindow::activateStartPointSelection( TopAbs_ShapeEnum theShapeType )\r
+{\r
+ myPrevPointType = myCurrPointType;\r
+ myCurrPointType = SELECTED;\r
+\r
+ // activate selection ------>\r
+ Handle(AIS_InteractiveContext) ic = myModel->getAISContext();\r
+\r
+ ic->OpenLocalContext();\r
+\r
+ AIS_ListOfInteractive aList;\r
+ ic->DisplayedObjects( aList );\r
+ for ( AIS_ListIteratorOfListOfInteractive it( aList ); it.More(); it.Next() )\r
+ {\r
+ Handle(AIS_InteractiveObject) anObj = it.Value();\r
+ if ( !anObj.IsNull() && anObj->HasPresentation() &&\r
+ anObj->IsKind( STANDARD_TYPE(AIS_Shape) ) )\r
+ {\r
+ ic->Load(anObj,-1);\r
+ ic->Activate(anObj,AIS_Shape::SelectionMode(theShapeType));\r
+ }\r
+ }\r
+ // activate selection <------\r
+\r
+ if ( !myCursorIsHand )\r
+ {\r
+ QCursor handCursor (Qt::PointingHandCursor);\r
+ myCursorIsHand = true;\r
+ myCursor = cursor();\r
+ myViewPort->setCursor( handCursor );\r
+ }\r
+ myRotationPointSelection = true;\r
+}\r
+\r
+/*!\r
+ \brief Start global panning operation\r
+\r
+ Sets the corresponding cursor for the widget.\r
+*/\r
+void OCCViewer_ViewWindow::activateGlobalPanning()\r
+{\r
+ Handle(V3d_View) aView3d = myViewPort->getView();\r
+ if ( !aView3d.IsNull() ) {\r
+ QPixmap globalPanPixmap (imageCrossCursor);\r
+ QCursor glPanCursor (globalPanPixmap);\r
+ myCurScale = aView3d->Scale();\r
+ aView3d->FitAll(0.01, false);\r
+ myCursor = cursor(); // save old cursor\r
+ myViewPort->fitAll(); // fits view before selecting a new scene center\r
+ if( setTransformRequested( PANGLOBAL ) )\r
+ myViewPort->setCursor( glPanCursor );\r
+ }\r
+}\r
+\r
+/*!\r
+ \brief Starts fit operation.\r
+\r
+ Sets the corresponding cursor for the widget.\r
+*/\r
+void OCCViewer_ViewWindow::activateWindowFit()\r
+{\r
+ if ( !transformRequested() && !myCursorIsHand )\r
+ myCursor = cursor(); /* save old cursor */\r
+\r
+ if ( myOperation != WINDOWFIT ) {\r
+ QCursor handCursor (Qt::PointingHandCursor);\r
+ if( setTransformRequested ( WINDOWFIT ) )\r
+ {\r
+ myViewPort->setCursor ( handCursor );\r
+ myCursorIsHand = true;\r
+ }\r
+ }\r
+}\r
+\r
+/*!\r
+ \brief Start delayed viewer operation.\r
+*/\r
+bool OCCViewer_ViewWindow::setTransformRequested( OperationType op )\r
+{\r
+ bool ok = transformEnabled( op );\r
+ myOperation = ok ? op : NOTHING;\r
+ myViewPort->setMouseTracking( myOperation == NOTHING ); \r
+ return ok;\r
+}\r
+\r
+/*!\r
+ \brief Handle mouse move event.\r
+ \param theEvent mouse event\r
+*/\r
+void OCCViewer_ViewWindow::vpMouseMoveEvent( QMouseEvent* theEvent )\r
+{\r
+ if ( myIsKeyFree && interactionStyle() == SUIT_ViewModel::KEY_FREE ) {\r
+ myIsKeyFree = false;\r
+ switch ( getButtonState( theEvent, interactionStyle() ) ) {\r
+ case ZOOMVIEW:\r
+ myViewPort->startZoomAtPoint( myStartX, myStartY );\r
+ activateZoom();\r
+ break;\r
+ case PANVIEW:\r
+ activatePanning();\r
+ break;\r
+ case ROTATE:\r
+ activateRotation();\r
+ myViewPort->startRotation(myStartX, myStartY, myCurrPointType, mySelectedPoint);\r
+ break;\r
+ default:\r
+ break;\r
+ }\r
+ }\r
+\r
+ myCurrX = theEvent->x();\r
+ myCurrY = theEvent->y();\r
+ switch (myOperation) {\r
+ case ROTATE:\r
+ myViewPort->rotate(myCurrX, myCurrY, myCurrPointType, mySelectedPoint);\r
+ break;\r
+\r
+ case ZOOMVIEW:\r
+ myViewPort->zoom(myStartX, myStartY, myCurrX, myCurrY);\r
+ myStartX = myCurrX;\r
+ myStartY = myCurrY;\r
+ break;\r
+\r
+ case PANVIEW:\r
+ myViewPort->pan(myCurrX - myStartX, myStartY - myCurrY);\r
+ myStartX = myCurrX;\r
+ myStartY = myCurrY;\r
+ break;\r
+\r
+/* case WINDOWFIT:\r
+ myDrawRect = true;\r
+ repaint();\r
+ break;\r
+*/\r
+ case PANGLOBAL:\r
+ break;\r
+\r
+ default:\r
+ if ( myRotationPointSelection || isSketcherStyle() )\r
+ {\r
+ emit mouseMoving( this, theEvent );\r
+ }\r
+ else\r
+ {\r
+ int aState = theEvent->modifiers();\r
+ int aButton = theEvent->buttons();\r
+ int anInteractionStyle = interactionStyle();\r
+ if ( ( anInteractionStyle == SUIT_ViewModel::STANDARD &&\r
+ aButton == Qt::LeftButton && ( aState == Qt::NoModifier || Qt::ShiftModifier ) ) ||\r
+ ( anInteractionStyle == SUIT_ViewModel::KEY_FREE &&\r
+ aButton == Qt::LeftButton && ( aState == Qt::ControlModifier || aState == ( Qt::ControlModifier|Qt::ShiftModifier ) ) ) ) {\r
+ myDrawRect = myEnableDrawMode;\r
+ if ( myDrawRect ) {\r
+ drawRect();\r
+ if ( !myCursorIsHand ) { // we are going to sketch a rectangle\r
+ QCursor handCursor (Qt::PointingHandCursor);\r
+ myCursorIsHand = true;\r
+ myCursor = cursor();\r
+ myViewPort->setCursor( handCursor );\r
+ }\r
+ }\r
+ emit mouseMoving( this, theEvent );\r
+ }\r
+ else if ( ( anInteractionStyle == SUIT_ViewModel::STANDARD &&\r
+ aButton == Qt::RightButton && ( aState == Qt::NoModifier || Qt::ShiftModifier ) ) ||\r
+ ( anInteractionStyle == SUIT_ViewModel::KEY_FREE &&\r
+ aButton == Qt::RightButton && ( aState == Qt::ControlModifier || aState == ( Qt::ControlModifier|Qt::ShiftModifier ) ) ) ) {\r
+ OCCViewer_ViewSketcher* sketcher = 0;\r
+ QList<OCCViewer_ViewSketcher*>::Iterator it;\r
+ for ( it = mySketchers.begin(); it != mySketchers.end() && !sketcher; ++it )\r
+ {\r
+ OCCViewer_ViewSketcher* sk = (*it);\r
+ if( sk->isDefault() && sk->sketchButton() == aButton )\r
+ sketcher = sk;\r
+ }\r
+ if ( sketcher && myCurSketch == -1 )\r
+ {\r
+ activateSketching( sketcher->type() );\r
+ if ( mypSketcher )\r
+ {\r
+ myCurSketch = mypSketcher->sketchButton();\r
+\r
+ if ( l_mbPressEvent )\r
+ {\r
+ QApplication::sendEvent( getViewPort(), l_mbPressEvent );\r
+ delete l_mbPressEvent;\r
+ l_mbPressEvent = 0;\r
+ }\r
+ QApplication::sendEvent( getViewPort(), theEvent );\r
+ }\r
+ }\r
+ }\r
+ else\r
+ emit mouseMoving( this, theEvent );\r
+ }\r
+ }\r
+}\r
+\r
+/*!\r
+ \brief Handle mouse release event.\r
+ \param theEvent mouse event\r
+*/\r
+void OCCViewer_ViewWindow::vpMouseReleaseEvent(QMouseEvent* theEvent)\r
+{\r
+ switch ( myOperation ) {\r
+ case NOTHING:\r
+ {\r
+ int prevState = myCurSketch;\r
+ if(theEvent->button() == Qt::RightButton)\r
+ {\r
+ QList<OCCViewer_ViewSketcher*>::Iterator it;\r
+ for ( it = mySketchers.begin(); it != mySketchers.end() && myCurSketch != -1; ++it )\r
+ {\r
+ OCCViewer_ViewSketcher* sk = (*it);\r
+ if( ( sk->sketchButton() & theEvent->button() ) && sk->sketchButton() == myCurSketch )\r
+ myCurSketch = -1;\r
+ }\r
+ }\r
+\r
+ emit mouseReleased(this, theEvent);\r
+ if(theEvent->button() == Qt::RightButton && prevState == -1)\r
+ {\r
+ QContextMenuEvent aEvent( QContextMenuEvent::Mouse,\r
+ theEvent->pos(), theEvent->globalPos() );\r
+ emit contextMenuRequested( &aEvent );\r
+ }\r
+ }\r
+ break;\r
+ case ROTATE:\r
+ myViewPort->endRotation();\r
+ resetState();\r
+ break;\r
+\r
+ case PANVIEW:\r
+ case ZOOMVIEW:\r
+ resetState();\r
+ break;\r
+\r
+ case PANGLOBAL:\r
+ if ( theEvent->button() == Qt::LeftButton ) {\r
+ myViewPort->setCenter( theEvent->x(), theEvent->y() );\r
+ myViewPort->getView()->SetScale(myCurScale);\r
+ resetState();\r
+ }\r
+ break;\r
+\r
+ case WINDOWFIT:\r
+ if ( theEvent->button() == Qt::LeftButton ) {\r
+ myCurrX = theEvent->x();\r
+ myCurrY = theEvent->y();\r
+ drawRect();\r
+ QRect rect = SUIT_Tools::makeRect(myStartX, myStartY, myCurrX, myCurrY);\r
+ if ( !rect.isEmpty() ) myViewPort->fitRect(rect);\r
+ endDrawRect();\r
+ resetState();\r
+ }\r
+ break;\r
+ }\r
+\r
+ // NOTE: viewer 3D detects a rectangle of selection using this event\r
+ // so we must emit it BEFORE resetting the selection rectangle\r
+\r
+ if ( theEvent->button() == Qt::LeftButton && myDrawRect ) {\r
+ drawRect();\r
+ endDrawRect();\r
+ resetState();\r
+ myViewPort->update();\r
+ }\r
+\r
+ if ( l_mbPressEvent )\r
+ {\r
+ delete l_mbPressEvent;\r
+ l_mbPressEvent = 0;\r
+ }\r
+}\r
+\r
+/*!\r
+ \brief Reset the viewport to its initial state\r
+ ( no transformations in process etc. )\r
+*/\r
+void OCCViewer_ViewWindow::resetState()\r
+{\r
+ myDrawRect = false;\r
+\r
+ if ( myRotationPointSelection )\r
+ {\r
+ QCursor handCursor (Qt::PointingHandCursor);\r
+ myViewPort->setCursor( handCursor );\r
+ }\r
+ else\r
+ {\r
+ if ( transformRequested() || myCursorIsHand )\r
+ myViewPort->setCursor( myCursor );\r
+ myCursorIsHand = false;\r
+ }\r
+\r
+ if ( transformRequested() )\r
+ emit vpTransformationFinished (myOperation);\r
+\r
+ setTransformInProcess( false );\r
+ setTransformRequested( NOTHING );\r
+}\r
+\r
+\r
+/*!\r
+ \brief Draw rubber band rectangle.\r
+*/\r
+void OCCViewer_ViewWindow::drawRect()\r
+{\r
+ if ( !myRectBand ) {\r
+ myRectBand = new QtxRectRubberBand( myViewPort );\r
+ //QPalette palette;\r
+ //palette.setColor(myRectBand->foregroundRole(), Qt::white);\r
+ //myRectBand->setPalette(palette);\r
+ }\r
+ //myRectBand->hide();\r
+ \r
+ myRectBand->setUpdatesEnabled ( false );\r
+ QRect aRect = SUIT_Tools::makeRect(myStartX, myStartY, myCurrX, myCurrY);\r
+ myRectBand->initGeometry( aRect );\r
+\r
+ if ( !myRectBand->isVisible() )\r
+ myRectBand->show();\r
+\r
+ myRectBand->setUpdatesEnabled ( true );\r
+ //myRectBand->repaint();\r
+\r
+ //myRectBand->setVisible( aRect.isValid() );\r
+ //if ( myRectBand->isVisible() )\r
+ // myRectBand->repaint();\r
+ //else\r
+ // myRectBand->show();\r
+ //myRectBand->repaint();\r
+}\r
+\r
+/*!\r
+ \brief Clear rubber band rectangle on the end on the dragging operation.\r
+*/\r
+void OCCViewer_ViewWindow::endDrawRect()\r
+{\r
+ //delete myRectBand;\r
+ //myRectBand = 0;\r
+ if ( myRectBand )\r
+ {\r
+ myRectBand->clearGeometry();\r
+ myRectBand->hide();\r
+ }\r
+}\r
+\r
+/*!\r
+ \brief Create actions.\r
+*/\r
+void OCCViewer_ViewWindow::createActions()\r
+{\r
+ if( !toolMgr()->isEmpty() )\r
+ return;\r
+ \r
+ SUIT_ResourceMgr* aResMgr = SUIT_Session::session()->resourceMgr();\r
+\r
+ QtxAction* aAction;\r
+\r
+ // Dump view\r
+ aAction = new QtxAction(tr("MNU_DUMP_VIEW"), aResMgr->loadPixmap( "OCCViewer", tr( "ICON_OCCVIEWER_VIEW_DUMP" ) ),\r
+ tr( "MNU_DUMP_VIEW" ), 0, this);\r
+ aAction->setStatusTip(tr("DSC_DUMP_VIEW"));\r
+ connect(aAction, SIGNAL(triggered()), this, SLOT(onDumpView()));\r
+ toolMgr()->registerAction( aAction, DumpId );\r
+\r
+ // FitAll\r
+ aAction = new QtxAction(tr("MNU_FITALL"), aResMgr->loadPixmap( "OCCViewer", tr( "ICON_OCCVIEWER_VIEW_FITALL" ) ),\r
+ tr( "MNU_FITALL" ), 0, this);\r
+ aAction->setStatusTip(tr("DSC_FITALL"));\r
+ connect(aAction, SIGNAL(triggered()), this, SLOT(onFitAll()));\r
+ toolMgr()->registerAction( aAction, FitAllId );\r
+\r
+ // FitRect\r
+ aAction = new QtxAction(tr("MNU_FITRECT"), aResMgr->loadPixmap( "OCCViewer", tr( "ICON_OCCVIEWER_VIEW_FITAREA" ) ),\r
+ tr( "MNU_FITRECT" ), 0, this);\r
+ aAction->setStatusTip(tr("DSC_FITRECT"));\r
+ connect(aAction, SIGNAL(triggered()), this, SLOT(activateWindowFit()));\r
+ toolMgr()->registerAction( aAction, FitRectId );\r
+ \r
+ // Zoom\r
+ aAction = new QtxAction(tr("MNU_ZOOM_VIEW"), aResMgr->loadPixmap( "OCCViewer", tr( "ICON_OCCVIEWER_VIEW_ZOOM" ) ),\r
+ tr( "MNU_ZOOM_VIEW" ), 0, this);\r
+ aAction->setStatusTip(tr("DSC_ZOOM_VIEW"));\r
+ connect(aAction, SIGNAL(triggered()), this, SLOT(activateZoom()));\r
+ toolMgr()->registerAction( aAction, ZoomId );\r
+\r
+ // Panning\r
+ aAction = new QtxAction(tr("MNU_PAN_VIEW"), aResMgr->loadPixmap( "OCCViewer", tr( "ICON_OCCVIEWER_VIEW_PAN" ) ),\r
+ tr( "MNU_PAN_VIEW" ), 0, this);\r
+ aAction->setStatusTip(tr("DSC_PAN_VIEW"));\r
+ connect(aAction, SIGNAL(triggered()), this, SLOT(activatePanning()));\r
+ toolMgr()->registerAction( aAction, PanId );\r
+\r
+ // Global Panning\r
+ aAction = new QtxAction(tr("MNU_GLOBALPAN_VIEW"), aResMgr->loadPixmap( "OCCViewer", tr( "ICON_OCCVIEWER_VIEW_GLOBALPAN" ) ),\r
+ tr( "MNU_GLOBALPAN_VIEW" ), 0, this);\r
+ aAction->setStatusTip(tr("DSC_GLOBALPAN_VIEW"));\r
+ connect(aAction, SIGNAL(triggered()), this, SLOT(activateGlobalPanning()));\r
+ toolMgr()->registerAction( aAction, GlobalPanId );\r
+\r
+ // Rotation Point\r
+ mySetRotationPointAction = new QtxAction(tr("MNU_CHANGINGROTATIONPOINT_VIEW"), aResMgr->loadPixmap( "OCCViewer", tr( "ICON_OCCVIEWER_VIEW_ROTATION_POINT" ) ),\r
+ tr( "MNU_CHANGINGROTATIONPOINT_VIEW" ), 0, this);\r
+ mySetRotationPointAction->setStatusTip(tr("DSC_CHANGINGROTATIONPOINT_VIEW"));\r
+ mySetRotationPointAction->setCheckable( true );\r
+ connect(mySetRotationPointAction, SIGNAL(toggled( bool )), this, SLOT(onSetRotationPoint( bool )));\r
+ toolMgr()->registerAction( mySetRotationPointAction, ChangeRotationPointId );\r
+\r
+ // Rotation\r
+ aAction = new QtxAction(tr("MNU_ROTATE_VIEW"), aResMgr->loadPixmap( "OCCViewer", tr( "ICON_OCCVIEWER_VIEW_ROTATE" ) ),\r
+ tr( "MNU_ROTATE_VIEW" ), 0, this);\r
+ aAction->setStatusTip(tr("DSC_ROTATE_VIEW"));\r
+ connect(aAction, SIGNAL(triggered()), this, SLOT(activateRotation()));\r
+ toolMgr()->registerAction( aAction, RotationId );\r
+\r
+ // Projections\r
+ aAction = new QtxAction(tr("MNU_FRONT_VIEW"), aResMgr->loadPixmap( "OCCViewer", tr( "ICON_OCCVIEWER_VIEW_FRONT" ) ),\r
+ tr( "MNU_FRONT_VIEW" ), 0, this, false, "Viewers:Front view");\r
+ aAction->setStatusTip(tr("DSC_FRONT_VIEW"));\r
+ connect(aAction, SIGNAL(triggered()), this, SLOT(onFrontView()));\r
+ this->addAction(aAction);\r
+ toolMgr()->registerAction( aAction, FrontId );\r
+\r
+ aAction = new QtxAction(tr("MNU_BACK_VIEW"), aResMgr->loadPixmap( "OCCViewer", tr( "ICON_OCCVIEWER_VIEW_BACK" ) ),\r
+ tr( "MNU_BACK_VIEW" ), 0, this, false, "Viewers:Back view");\r
+ aAction->setStatusTip(tr("DSC_BACK_VIEW"));\r
+ connect(aAction, SIGNAL(triggered()), this, SLOT(onBackView()));\r
+ this->addAction(aAction);\r
+ toolMgr()->registerAction( aAction, BackId );\r
+\r
+ aAction = new QtxAction(tr("MNU_TOP_VIEW"), aResMgr->loadPixmap( "OCCViewer", tr( "ICON_OCCVIEWER_VIEW_TOP" ) ),\r
+ tr( "MNU_TOP_VIEW" ), 0, this, false, "Viewers:Top view");\r
+ aAction->setStatusTip(tr("DSC_TOP_VIEW"));\r
+ connect(aAction, SIGNAL(triggered()), this, SLOT(onTopView()));\r
+ this->addAction(aAction);\r
+ toolMgr()->registerAction( aAction, TopId );\r
+\r
+ aAction = new QtxAction(tr("MNU_BOTTOM_VIEW"), aResMgr->loadPixmap( "OCCViewer", tr( "ICON_OCCVIEWER_VIEW_BOTTOM" ) ),\r
+ tr( "MNU_BOTTOM_VIEW" ), 0, this, false, "Viewers:Bottom view");\r
+ aAction->setStatusTip(tr("DSC_BOTTOM_VIEW"));\r
+ connect(aAction, SIGNAL(triggered()), this, SLOT(onBottomView()));\r
+ this->addAction(aAction);\r
+ toolMgr()->registerAction( aAction, BottomId );\r
+ \r
+ aAction = new QtxAction(tr("MNU_LEFT_VIEW"), aResMgr->loadPixmap( "OCCViewer", tr( "ICON_OCCVIEWER_VIEW_LEFT" ) ),\r
+ tr( "MNU_LEFT_VIEW" ), 0, this, false, "Viewers:Left view");\r
+ aAction->setStatusTip(tr("DSC_LEFT_VIEW"));\r
+ connect(aAction, SIGNAL(triggered()), this, SLOT(onLeftView()));\r
+ this->addAction(aAction);\r
+ toolMgr()->registerAction( aAction, LeftId );\r
+\r
+ aAction = new QtxAction(tr("MNU_RIGHT_VIEW"), aResMgr->loadPixmap( "OCCViewer", tr( "ICON_OCCVIEWER_VIEW_RIGHT" ) ),\r
+ tr( "MNU_RIGHT_VIEW" ), 0, this, false, "Viewers:Right view");\r
+ aAction->setStatusTip(tr("DSC_RIGHT_VIEW"));\r
+ connect(aAction, SIGNAL(triggered()), this, SLOT(onRightView()));\r
+ this->addAction(aAction);\r
+ toolMgr()->registerAction( aAction, RightId );\r
+\r
+ // rotate anticlockwise\r
+ aAction = new QtxAction(tr("MNU_ANTICLOCKWISE_VIEW"), aResMgr->loadPixmap( "OCCViewer", tr( "ICON_OCCVIEWER_VIEW_ANTICLOCKWISE" ) ),\r
+ tr( "MNU_ANTICLOCKWISE_VIEW" ), 0, this, false, "Viewers:Rotate anticlockwise");\r
+ aAction->setStatusTip(tr("DSC_ANTICLOCKWISE_VIEW"));\r
+ connect(aAction, SIGNAL(triggered()), this, SLOT(onAntiClockWiseView()));\r
+ this->addAction(aAction);\r
+ toolMgr()->registerAction( aAction, AntiClockWiseId );\r
+\r
+ // rotate clockwise\r
+ aAction = new QtxAction(tr("MNU_CLOCKWISE_VIEW"), aResMgr->loadPixmap( "OCCViewer", tr( "ICON_OCCVIEWER_VIEW_CLOCKWISE" ) ),\r
+ tr( "MNU_CLOCKWISE_VIEW" ), 0, this, false, "Viewers:Rotate clockwise");\r
+ aAction->setStatusTip(tr("DSC_CLOCKWISE_VIEW"));\r
+ connect(aAction, SIGNAL(triggered()), this, SLOT(onClockWiseView()));\r
+ this->addAction(aAction);\r
+ toolMgr()->registerAction( aAction, ClockWiseId );\r
+\r
+ // Reset\r
+ aAction = new QtxAction(tr("MNU_RESET_VIEW"), aResMgr->loadPixmap( "OCCViewer", tr( "ICON_OCCVIEWER_VIEW_RESET" ) ),\r
+ tr( "MNU_RESET_VIEW" ), 0, this, false, "Viewers:Reset view");\r
+ aAction->setStatusTip(tr("DSC_RESET_VIEW"));\r
+ connect(aAction, SIGNAL(triggered()), this, SLOT(onResetView()));\r
+ this->addAction(aAction);\r
+ toolMgr()->registerAction( aAction, ResetId );\r
+\r
+ // Clone\r
+ aAction = new QtxAction(tr("MNU_CLONE_VIEW"),\r
+ aResMgr->loadPixmap("OCCViewer", tr("ICON_OCCVIEWER_CLONE_VIEW")),\r
+ tr("MNU_CLONE_VIEW"), 0, this);\r
+ aAction->setStatusTip(tr("DSC_CLONE_VIEW"));\r
+ connect(aAction, SIGNAL(triggered()), this, SLOT(onCloneView()));\r
+ toolMgr()->registerAction( aAction, CloneId );\r
+\r
+ aAction = new QtxAction (tr ("MNU_CLIPPING"), aResMgr->loadPixmap ("OCCViewer", tr ("ICON_OCCVIEWER_CLIPPING")),\r
+ tr ("MNU_CLIPPING"), 0, this);\r
+ aAction->setStatusTip (tr ("DSC_CLIPPING"));\r
+ aAction->setCheckable (true);\r
+ connect (aAction, SIGNAL (toggled (bool)), this, SLOT (onClipping (bool)));\r
+ toolMgr()->registerAction (aAction, ClippingId);\r
+\r
+ aAction = new QtxAction(tr("MNU_SHOOT_VIEW"), aResMgr->loadPixmap( "OCCViewer", tr( "ICON_OCCVIEWER_SHOOT_VIEW" ) ),\r
+ tr( "MNU_SHOOT_VIEW" ), 0, this);\r
+ aAction->setStatusTip(tr("DSC_SHOOT_VIEW"));\r
+ connect(aAction, SIGNAL(triggered()), this, SLOT(onMemorizeView()));\r
+ toolMgr()->registerAction( aAction, MemId );\r
+\r
+ aAction = new QtxAction(tr("MNU_PRESETS_VIEW"), aResMgr->loadPixmap( "OCCViewer", tr( "ICON_OCCVIEWER_PRESETS_VIEW" ) ),\r
+ tr( "MNU_PRESETS_VIEW" ), 0, this);\r
+ aAction->setStatusTip(tr("DSC_PRESETS_VIEW"));\r
+ connect(aAction, SIGNAL(triggered()), this, SLOT(onRestoreView()));\r
+ toolMgr()->registerAction( aAction, RestoreId );\r
+\r
+ if (myModel->trihedronActivated()) {\r
+ aAction = new QtxAction(tr("MNU_SHOW_TRIHEDRE"), aResMgr->loadPixmap( "OCCViewer", tr( "ICON_OCCVIEWER_VIEW_TRIHEDRON" ) ),\r
+ tr( "MNU_SHOW_TRIHEDRE" ), 0, this);\r
+ aAction->setStatusTip(tr("DSC_SHOW_TRIHEDRE"));\r
+ connect(aAction, SIGNAL(triggered()), this, SLOT(onTrihedronShow()));\r
+ toolMgr()->registerAction( aAction, TrihedronShowId );\r
+ }\r
+\r
+ // Scale\r
+ aAction = new QtxAction(tr("MNU_SCALING"), aResMgr->loadPixmap( "OCCViewer", tr( "ICON_OCCVIEWER_SCALING" ) ),\r
+ tr( "MNU_SCALING" ), 0, this);\r
+ aAction->setStatusTip(tr("DSC_SCALING"));\r
+ connect(aAction, SIGNAL(triggered()), this, SLOT(onAxialScale()));\r
+ toolMgr()->registerAction( aAction, AxialScaleId );\r
+\r
+ // Enable/disable preselection\r
+ aAction = new QtxAction(tr("MNU_ENABLE_PRESELECTION"), aResMgr->loadPixmap( "OCCViewer", tr( "ICON_OCCVIEWER_PRESELECTION" ) ),\r
+ tr( "MNU_ENABLE_PRESELECTION" ), 0, this);\r
+ aAction->setStatusTip(tr("DSC_ENABLE_PRESELECTION"));\r
+ aAction->setCheckable(true);\r
+ connect(aAction, SIGNAL(toggled(bool)), this, SLOT(onSwitchPreselection(bool)));\r
+ toolMgr()->registerAction( aAction, SwitchPreselectionId );\r
+\r
+ // Enable/disable selection\r
+ aAction = new QtxAction(tr("MNU_ENABLE_SELECTION"), aResMgr->loadPixmap( "OCCViewer", tr( "ICON_OCCVIEWER_SELECTION" ) ),\r
+ tr( "MNU_ENABLE_SELECTION" ), 0, this);\r
+ aAction->setStatusTip(tr("DSC_ENABLE_SELECTION"));\r
+ aAction->setCheckable(true);\r
+ connect(aAction, SIGNAL(toggled(bool)), this, SLOT(onSwitchSelection(bool)));\r
+ toolMgr()->registerAction( aAction, SwitchSelectionId );\r
+\r
+ // Graduated axes \r
+ aAction = new QtxAction(tr("MNU_GRADUATED_AXES"), aResMgr->loadPixmap( "OCCViewer", tr( "ICON_OCCVIEWER_GRADUATED_AXES" ) ),\r
+ tr( "MNU_GRADUATED_AXES" ), 0, this);\r
+ aAction->setStatusTip(tr("DSC_GRADUATED_AXES"));\r
+ connect(aAction, SIGNAL(triggered()), this, SLOT(onGraduatedAxes()));\r
+ toolMgr()->registerAction( aAction, GraduatedAxesId );\r
+\r
+ // Active only ambient light or not\r
+ aAction = new QtxAction(tr("MNU_AMBIENT"), aResMgr->loadPixmap( "OCCViewer", tr( "ICON_OCCVIEWER_AMBIENT" ) ),\r
+ tr( "MNU_AMBIENT" ), 0, this);\r
+ aAction->setStatusTip(tr("DSC_AMBIENT"));\r
+ connect(aAction, SIGNAL(triggered()), this, SLOT(onAmbientToogle()));\r
+ toolMgr()->registerAction( aAction, AmbientId );\r
+\r
+ // Switch between interaction styles\r
+ aAction = new QtxAction(tr("MNU_STYLE_SWITCH"), aResMgr->loadPixmap( "OCCViewer", tr( "ICON_OCCVIEWER_STYLE_SWITCH" ) ),\r
+ tr( "MNU_STYLE_SWITCH" ), 0, this);\r
+ aAction->setStatusTip(tr("DSC_STYLE_SWITCH"));\r
+ aAction->setCheckable(true);\r
+ connect(aAction, SIGNAL(toggled(bool)), this, SLOT(onSwitchInteractionStyle(bool)));\r
+ toolMgr()->registerAction( aAction, SwitchInteractionStyleId );\r
+\r
+ // Switch between zooming styles\r
+ aAction = new QtxAction(tr("MNU_ZOOMING_STYLE_SWITCH"), aResMgr->loadPixmap( "OCCViewer", tr( "ICON_OCCVIEWER_ZOOMING_STYLE_SWITCH" ) ),\r
+ tr( "MNU_ZOOMING_STYLE_SWITCH" ), 0, this);\r
+ aAction->setStatusTip(tr("DSC_ZOOMING_STYLE_SWITCH"));\r
+ aAction->setCheckable(true);\r
+ connect(aAction, SIGNAL(toggled(bool)), this, SLOT(onSwitchZoomingStyle(bool)));\r
+ toolMgr()->registerAction( aAction, SwitchZoomingStyleId );\r
+\r
+ // Maximized view\r
+ aAction = new QtxAction(tr("MNU_MINIMIZE_VIEW"), aResMgr->loadPixmap( "OCCViewer", tr( "ICON_OCCVIEWER_MINIMIZE" ) ),\r
+ tr( "MNU_MINIMIZE_VIEW" ), 0, this );\r
+ aAction->setStatusTip(tr("DSC_MINIMIZE_VIEW"));\r
+ connect(aAction, SIGNAL(triggered()), this, SLOT(onMaximizedView()));\r
+ toolMgr()->registerAction( aAction, MaximizedId );\r
+\r
+ // Return to 3d view\r
+ if (my2dMode!=No2dMode){\r
+ aAction = new QtxAction(tr("MNU_RETURN_3D_VIEW"), aResMgr->loadPixmap( "OCCViewer", tr( "ICON_OCCVIEWER_RETURN_3D_VIEW" ) ),\r
+ tr( "MNU_RETURN_3D_VIEW" ), 0, this );\r
+ aAction->setStatusTip(tr("DSC_RETURN_3D_VIEW"));\r
+ connect(aAction, SIGNAL(triggered()), this, SLOT(returnTo3dView()));\r
+ toolMgr()->registerAction( aAction, ReturnTo3dViewId );\r
+ }\r
+\r
+ // Synchronize View \r
+ toolMgr()->registerAction( synchronizeAction(), SynchronizeId );\r
+}\r
+\r
+/*!\r
+ \brief Create toolbar.\r
+*/\r
+void OCCViewer_ViewWindow::createToolBar()\r
+{\r
+ QString aToolbarName;\r
+ switch (my2dMode) {\r
+ case XYPlane:\r
+ aToolbarName = tr( "LBL_XYTOOLBAR_LABEL" );\r
+ break;\r
+ case XZPlane:\r
+ aToolbarName = tr( "LBL_XZTOOLBAR_LABEL" );\r
+ break;\r
+ case YZPlane:\r
+ aToolbarName = tr( "LBL_YZTOOLBAR_LABEL" );\r
+ break;\r
+ default:\r
+ aToolbarName = tr( "LBL_3DTOOLBAR_LABEL" );\r
+ }\r
+ \r
+ int tid = toolMgr()->createToolBar( aToolbarName, false );\r
+ if ( my2dMode != No2dMode ){\r
+ toolMgr()->append( ReturnTo3dViewId, tid );\r
+ toolMgr()->append( toolMgr()->separator(), tid );\r
+ }\r
+ toolMgr()->append( DumpId, tid );\r
+ toolMgr()->append( SwitchInteractionStyleId, tid );\r
+#if OCC_VERSION_LARGE > 0x0603000A // available only with OCC-6.3-sp11 and higher version\r
+ toolMgr()->append( SwitchZoomingStyleId, tid );\r
+#endif\r
+ toolMgr()->append( SwitchPreselectionId, tid );\r
+ toolMgr()->append( SwitchSelectionId, tid );\r
+ if( myModel->trihedronActivated() )\r
+ toolMgr()->append( TrihedronShowId, tid );\r
+\r
+ QtxMultiAction* aScaleAction = new QtxMultiAction( this );\r
+ aScaleAction->insertAction( toolMgr()->action( FitAllId ) );\r
+ aScaleAction->insertAction( toolMgr()->action( FitRectId ) );\r
+ aScaleAction->insertAction( toolMgr()->action( ZoomId ) );\r
+ toolMgr()->append( aScaleAction, tid );\r
+\r
+ QtxMultiAction* aPanningAction = new QtxMultiAction( this );\r
+ aPanningAction->insertAction( toolMgr()->action( PanId ) );\r
+ aPanningAction->insertAction( toolMgr()->action( GlobalPanId ) );\r
+ toolMgr()->append( aPanningAction, tid );\r
+\r
+ if (my2dMode == No2dMode) {\r
+ toolMgr()->append( ChangeRotationPointId, tid );\r
+ toolMgr()->append( RotationId, tid );\r
+\r
+ QtxMultiAction* aViewsAction = new QtxMultiAction( this );\r
+ aViewsAction->insertAction( toolMgr()->action( FrontId ) );\r
+ aViewsAction->insertAction( toolMgr()->action( BackId ) );\r
+ aViewsAction->insertAction( toolMgr()->action( TopId ) );\r
+ aViewsAction->insertAction( toolMgr()->action( BottomId ) );\r
+ aViewsAction->insertAction( toolMgr()->action( LeftId ) );\r
+ aViewsAction->insertAction( toolMgr()->action( RightId ) );\r
+ toolMgr()->append( aViewsAction, tid );\r
+\r
+ toolMgr()->append( AntiClockWiseId, tid );\r
+ toolMgr()->append( ClockWiseId, tid );\r
+\r
+ toolMgr()->append( ResetId, tid );\r
+ }\r
+\r
+ QtxMultiAction* aMemAction = new QtxMultiAction( this );\r
+ aMemAction->insertAction( toolMgr()->action( MemId ) );\r
+ aMemAction->insertAction( toolMgr()->action( RestoreId ) );\r
+ toolMgr()->append( aMemAction, tid );\r
+\r
+ toolMgr()->append( toolMgr()->separator(), tid );\r
+ toolMgr()->append( CloneId, tid );\r
+ \r
+ toolMgr()->append( toolMgr()->separator(), tid );\r
+ toolMgr()->append( ClippingId, tid );\r
+ toolMgr()->append( AxialScaleId, tid );\r
+#if OCC_VERSION_LARGE > 0x06030009 // available only with OCC-6.3-sp10 and higher version\r
+ toolMgr()->append( GraduatedAxesId, tid );\r
+#endif\r
+ toolMgr()->append( AmbientId, tid );\r
+\r
+ toolMgr()->append( MaximizedId, tid );\r
+ toolMgr()->append( SynchronizeId, tid );\r
+}\r
+\r
+/*!\r
+ \brief Perform 'fit all' operation.\r
+*/\r
+void OCCViewer_ViewWindow::onViewFitAll()\r
+{\r
+ myViewPort->fitAll();\r
+}\r
+\r
+/*!\r
+ \brief Perform "front view" transformation.\r
+*/\r
+void OCCViewer_ViewWindow::onFrontView()\r
+{\r
+ emit vpTransformationStarted ( FRONTVIEW );\r
+ Handle(V3d_View) aView3d = myViewPort->getView();\r
+ if ( !aView3d.IsNull() ) aView3d->SetProj (V3d_Xpos);\r
+ onViewFitAll();\r
+ emit vpTransformationFinished ( FRONTVIEW );\r
+}\r
+\r
+/*!\r
+ \brief Perform "back view" transformation.\r
+*/\r
+void OCCViewer_ViewWindow::onBackView()\r
+{\r
+ emit vpTransformationStarted ( BACKVIEW );\r
+ Handle(V3d_View) aView3d = myViewPort->getView();\r
+ if ( !aView3d.IsNull() ) aView3d->SetProj (V3d_Xneg);\r
+ onViewFitAll();\r
+ emit vpTransformationFinished ( BACKVIEW );\r
+}\r
+\r
+/*!\r
+ \brief Perform "top view" transformation.\r
+*/\r
+void OCCViewer_ViewWindow::onTopView()\r
+{\r
+ emit vpTransformationStarted ( TOPVIEW );\r
+ Handle(V3d_View) aView3d = myViewPort->getView();\r
+ if ( !aView3d.IsNull() ) aView3d->SetProj (V3d_Zpos);\r
+ onViewFitAll();\r
+ emit vpTransformationFinished ( TOPVIEW );\r
+}\r
+\r
+/*!\r
+ \brief Perform "bottom view" transformation.\r
+*/\r
+void OCCViewer_ViewWindow::onBottomView()\r
+{\r
+ emit vpTransformationStarted ( BOTTOMVIEW );\r
+ Handle(V3d_View) aView3d = myViewPort->getView();\r
+ if ( !aView3d.IsNull() ) aView3d->SetProj (V3d_Zneg);\r
+ onViewFitAll();\r
+ emit vpTransformationFinished ( BOTTOMVIEW );\r
+}\r
+\r
+/*!\r
+ \brief Perform "left view" transformation.\r
+*/\r
+void OCCViewer_ViewWindow::onLeftView()\r
+{\r
+ emit vpTransformationStarted ( LEFTVIEW );\r
+ Handle(V3d_View) aView3d = myViewPort->getView();\r
+ if ( !aView3d.IsNull() ) aView3d->SetProj (V3d_Yneg);\r
+ onViewFitAll();\r
+ emit vpTransformationFinished ( LEFTVIEW );\r
+}\r
+\r
+/*!\r
+ \brief Perform "right view" transformation.\r
+*/\r
+void OCCViewer_ViewWindow::onRightView()\r
+{\r
+ emit vpTransformationStarted ( RIGHTVIEW );\r
+ Handle(V3d_View) aView3d = myViewPort->getView();\r
+ if ( !aView3d.IsNull() ) aView3d->SetProj (V3d_Ypos);\r
+ onViewFitAll();\r
+ emit vpTransformationFinished ( RIGHTVIEW );\r
+}\r
+\r
+/*!\r
+ \brief Rotate view 90 degrees clockwise\r
+*/\r
+void OCCViewer_ViewWindow::onClockWiseView()\r
+{\r
+ emit vpTransformationStarted ( CLOCKWISEVIEW );\r
+ myViewPort->rotateXY( 90. );\r
+ emit vpTransformationFinished ( CLOCKWISEVIEW );\r
+}\r
+\r
+/*!\r
+ \brief Rotate view 90 degrees conterclockwise\r
+*/\r
+void OCCViewer_ViewWindow::onAntiClockWiseView()\r
+{\r
+ emit vpTransformationStarted ( ANTICLOCKWISEVIEW );\r
+ myViewPort->rotateXY( -90. );\r
+ emit vpTransformationFinished ( ANTICLOCKWISEVIEW );\r
+}\r
+\r
+/*!\r
+ \brief Perform "reset view" transformation.\r
+\r
+ Sets default orientation of the viewport camera.\r
+*/\r
+void OCCViewer_ViewWindow::onResetView()\r
+{\r
+ emit vpTransformationStarted( RESETVIEW );\r
+ bool upd = myViewPort->getView()->SetImmediateUpdate( false );\r
+ myViewPort->getView()->Reset( false );\r
+ myViewPort->fitAll( false, true, false );\r
+ myViewPort->getView()->SetImmediateUpdate( upd );\r
+ myViewPort->getView()->Update();\r
+ emit vpTransformationFinished( RESETVIEW );\r
+}\r
+\r
+/*!\r
+ \brief Perform "fit all" transformation.\r
+*/\r
+void OCCViewer_ViewWindow::onFitAll()\r
+{\r
+ emit vpTransformationStarted( FITALLVIEW );\r
+ myViewPort->fitAll();\r
+ emit vpTransformationFinished( FITALLVIEW );\r
+}\r
+\r
+/*!\r
+ \brief Called if 'change rotation point' operation is activated.\r
+ \param on action state\r
+*/\r
+void OCCViewer_ViewWindow::onSetRotationPoint( bool on )\r
+{\r
+ if (on)\r
+ {\r
+ if (!mySetRotationPointDlg)\r
+ {\r
+ mySetRotationPointDlg = new OCCViewer_SetRotationPointDlg (this);\r
+ mySetRotationPointDlg->SetAction(mySetRotationPointAction);\r
+ }\r
+\r
+ if (!mySetRotationPointDlg->isVisible())\r
+ {\r
+ //if (mySetRotationPointDlg->IsFirstShown())\r
+ if (myCurrPointType == GRAVITY)\r
+ {\r
+ Standard_Real Xcenter, Ycenter, Zcenter;\r
+ if (computeGravityCenter(Xcenter, Ycenter, Zcenter))\r
+ mySetRotationPointDlg->setCoords(Xcenter, Ycenter, Zcenter);\r
+ }\r
+ mySetRotationPointDlg->show();\r
+ }\r
+ }\r
+ else\r
+ {\r
+ if (mySetRotationPointDlg->isVisible())\r
+ mySetRotationPointDlg->hide();\r
+ }\r
+}\r
+\r
+/*!\r
+ \brief Create one more window with same content.\r
+*/\r
+void OCCViewer_ViewWindow::onCloneView()\r
+{\r
+ SUIT_ViewWindow* vw = myManager->createViewWindow();\r
+ //vw->show();\r
+ emit viewCloned( vw );\r
+}\r
+\r
+/*!\r
+ Creates one more window with same content\r
+*/\r
+void OCCViewer_ViewWindow::onAxialScale()\r
+{\r
+ if ( !myScalingDlg )\r
+ myScalingDlg = new OCCViewer_AxialScaleDlg( this );\r
+ \r
+ if ( !myScalingDlg->isVisible() )\r
+ {\r
+ myScalingDlg->Update();\r
+ myScalingDlg->show();\r
+ }\r
+}\r
+\r
+/*!\r
+ Shows Graduated Axes dialog\r
+*/\r
+void OCCViewer_ViewWindow::onGraduatedAxes()\r
+{\r
+ myCubeAxesDlg->Update();\r
+ myCubeAxesDlg->show();\r
+}\r
+\r
+void OCCViewer_ViewWindow::onAmbientToogle()\r
+{\r
+ Handle(V3d_Viewer) viewer = myViewPort->getViewer();\r
+ viewer->InitDefinedLights();\r
+ while(viewer->MoreDefinedLights())\r
+ {\r
+ Handle(V3d_Light) light = viewer->DefinedLight();\r
+ if(light->Type() != V3d_AMBIENT)\r
+ {\r
+ Handle(V3d_View) aView3d = myViewPort->getView();\r
+ if( aView3d->IsActiveLight(light) ) viewer->SetLightOff(light);\r
+ else viewer->SetLightOn(light);\r
+ }\r
+ viewer->NextDefinedLights();\r
+ }\r
+ viewer->Update();\r
+}\r
+\r
+/*!\r
+ \brief Store view parameters.\r
+*/\r
+void OCCViewer_ViewWindow::onMemorizeView()\r
+{\r
+ appendViewAspect( getViewParams() );\r
+}\r
+\r
+/*!\r
+ \brief Restore view parameters.\r
+*/\r
+void OCCViewer_ViewWindow::onRestoreView()\r
+{\r
+ OCCViewer_CreateRestoreViewDlg* aDlg = new OCCViewer_CreateRestoreViewDlg( centralWidget(), this );\r
+ connect( aDlg, SIGNAL( dlgOk() ), this, SLOT( setRestoreFlag() ) );\r
+ aDlg->exec();\r
+ updateViewAspects( aDlg->parameters() );\r
+ if( myRestoreFlag && aDlg->parameters().count() )\r
+ performRestoring( aDlg->currentItem() );\r
+}\r
+\r
+/*!\r
+ \brief Restore view parameters.\r
+ \param anItem view parameters\r
+*/\r
+void OCCViewer_ViewWindow::performRestoring( const viewAspect& anItem, bool baseParamsOnly )\r
+{\r
+ Handle(V3d_View) aView3d = myViewPort->getView();\r
+\r
+ Standard_Boolean prev = aView3d->SetImmediateUpdate( Standard_False );\r
+ aView3d->SetScale( anItem.scale );\r
+ aView3d->SetTwist( anItem.twist );\r
+ aView3d->SetAt( anItem.atX, anItem.atY, anItem.atZ );\r
+ aView3d->SetImmediateUpdate( prev );\r
+ aView3d->SetEye( anItem.eyeX, anItem.eyeY, anItem.eyeZ );\r
+ aView3d->SetProj( anItem.projX, anItem.projY, anItem.projZ );\r
+ aView3d->SetAxialScale( anItem.scaleX, anItem.scaleY, anItem.scaleZ );\r
+\r
+#if OCC_VERSION_LARGE > 0x06070100\r
+ if ( anItem.centerX != 0.0 || anItem.centerY != 0.0 )\r
+ {\r
+ double anUpX = 0.0, anUpY = 0.0, anUpZ = 0.0;\r
+\r
+ // "eye" and "at" require conversion to represent center panning\r
+ // up direction is only available after setting angle of twist and\r
+ // other view parameters\r
+ aView3d->Up( anUpX, anUpY, anUpZ );\r
+\r
+ gp_Dir aProj( -anItem.projX, -anItem.projY, -anItem.projZ );\r
+ gp_Dir anUp( anUpX, anUpY, anUpZ );\r
+ gp_Pnt anAt( anItem.atX, anItem.atY, anItem.atZ );\r
+ gp_Pnt anEye( anItem.eyeX, anItem.eyeY, anItem.eyeZ );\r
+ gp_Dir aSide = aProj ^ anUp;\r
+\r
+ anAt.Translate( gp_Vec( aSide ) * anItem.centerX );\r
+ anAt.Translate( gp_Vec( anUp ) * anItem.centerY );\r
+\r
+ aView3d->SetAt( anAt.X(), anAt.Y(), anAt.Z() );\r
+ aView3d->SetProj( anItem.projX, anItem.projY, anItem.projZ );\r
+ }\r
+#else\r
+ aView3d->SetCenter( anItem.centerX, anItem.centerY );\r
+#endif\r
+\r
+ if ( !baseParamsOnly ) {\r
+\r
+ myModel->setTrihedronShown( anItem.isVisible );\r
+ myModel->setTrihedronSize( anItem.size );\r
+ \r
+#if OCC_VERSION_LARGE > 0x06030009 // available only with OCC-6.3-sp10 and higher version\r
+ // graduated trihedron\r
+ bool anIsVisible = anItem.gtIsVisible;\r
+ OCCViewer_AxisWidget::AxisData anAxisData[3];\r
+ anAxisData[0].DrawName = anItem.gtDrawNameX;\r
+ anAxisData[1].DrawName = anItem.gtDrawNameZ;\r
+ anAxisData[2].DrawName = anItem.gtDrawNameZ;\r
+ anAxisData[0].Name = anItem.gtNameX;\r
+ anAxisData[1].Name = anItem.gtNameZ;\r
+ anAxisData[2].Name = anItem.gtNameZ;\r
+ anAxisData[0].NameColor = QColor( anItem.gtNameColorRX,\r
+ anItem.gtNameColorGX,\r
+ anItem.gtNameColorBX );\r
+ anAxisData[1].NameColor = QColor( anItem.gtNameColorRY,\r
+ anItem.gtNameColorGY,\r
+ anItem.gtNameColorBY );\r
+ anAxisData[2].NameColor = QColor( anItem.gtNameColorRZ,\r
+ anItem.gtNameColorGZ,\r
+ anItem.gtNameColorBZ );\r
+ anAxisData[0].DrawValues = anItem.gtDrawValuesX;\r
+ anAxisData[1].DrawValues = anItem.gtDrawValuesY;\r
+ anAxisData[2].DrawValues = anItem.gtDrawValuesZ;\r
+ anAxisData[0].NbValues = anItem.gtNbValuesX;\r
+ anAxisData[1].NbValues = anItem.gtNbValuesY;\r
+ anAxisData[2].NbValues = anItem.gtNbValuesZ;\r
+ anAxisData[0].Offset = anItem.gtOffsetX;\r
+ anAxisData[1].Offset = anItem.gtOffsetY;\r
+ anAxisData[2].Offset = anItem.gtOffsetZ;\r
+ anAxisData[0].Color = QColor( anItem.gtColorRX,\r
+ anItem.gtColorGX,\r
+ anItem.gtColorBX );\r
+ anAxisData[1].Color = QColor( anItem.gtColorRY,\r
+ anItem.gtColorGY,\r
+ anItem.gtColorBY );\r
+ anAxisData[2].Color = QColor( anItem.gtColorRZ,\r
+ anItem.gtColorGZ,\r
+ anItem.gtColorBZ );\r
+ anAxisData[0].DrawTickmarks = anItem.gtDrawTickmarksX;\r
+ anAxisData[1].DrawTickmarks = anItem.gtDrawTickmarksY;\r
+ anAxisData[2].DrawTickmarks = anItem.gtDrawTickmarksZ;\r
+ anAxisData[0].TickmarkLength = anItem.gtTickmarkLengthX;\r
+ anAxisData[1].TickmarkLength = anItem.gtTickmarkLengthY;\r
+ anAxisData[2].TickmarkLength = anItem.gtTickmarkLengthZ;\r
+\r
+ myCubeAxesDlg->SetData( anIsVisible, anAxisData );\r
+ myCubeAxesDlg->ApplyData( aView3d );\r
+#endif\r
+\r
+ } // if ( !baseParamsOnly )\r
+\r
+ myRestoreFlag = 0;\r
+}\r
+\r
+/*!\r
+ \brief Set restore flag.\r
+*/\r
+void OCCViewer_ViewWindow::setRestoreFlag()\r
+{\r
+ myRestoreFlag = 1;\r
+}\r
+\r
+/*!\r
+ \brief Called when action "show/hide trihedron" is activated.\r
+*/\r
+void OCCViewer_ViewWindow::onTrihedronShow()\r
+{\r
+ myModel->toggleTrihedron();\r
+}\r
+\r
+/*!\r
+ \brief Toggles preselection (highlighting) on/off\r
+*/\r
+void OCCViewer_ViewWindow::onSwitchPreselection( bool on )\r
+{\r
+ myPreselectionEnabled = on;\r
+ myModel->setSelectionOptions( isPreselectionEnabled(), myModel->isSelectionEnabled() );\r
+\r
+ // unhighlight all highlighted objects\r
+ /*if ( !on ) {\r
+ myModel->unHighlightAll( true, false );\r
+ }*/\r
+\r
+ // update action state if method is called outside\r
+ QtxAction* a = dynamic_cast<QtxAction*>( toolMgr()->action( SwitchPreselectionId ) );\r
+ if ( a && a->isChecked() != on ) {\r
+ a->setChecked( on );\r
+ }\r
+}\r
+\r
+/*!\r
+ \brief Toggles selection on/off\r
+*/\r
+void OCCViewer_ViewWindow::onSwitchSelection( bool on )\r
+{\r
+ mySelectionEnabled = on;\r
+ myModel->setSelectionOptions( myModel->isPreselectionEnabled(), isSelectionEnabled() );\r
+ \r
+ // update action state if method is called outside\r
+\r
+ // preselection\r
+ QtxAction* a = dynamic_cast<QtxAction*>( toolMgr()->action( SwitchPreselectionId ) );\r
+ if ( a ) {\r
+ a->setEnabled( on );\r
+ }\r
+\r
+ // selection\r
+ a = dynamic_cast<QtxAction*>( toolMgr()->action( SwitchSelectionId ) );\r
+ if ( a && a->isChecked() != on ) {\r
+ a->setChecked( on );\r
+ }\r
+}\r
+\r
+/*!\r
+ \brief Switches "keyboard free" interaction style on/off\r
+*/\r
+void OCCViewer_ViewWindow::onSwitchInteractionStyle( bool on )\r
+{\r
+ myInteractionStyle = on ? (int)SUIT_ViewModel::KEY_FREE : (int)SUIT_ViewModel::STANDARD;\r
+\r
+ // update action state if method is called outside\r
+ QtxAction* a = dynamic_cast<QtxAction*>( toolMgr()->action( SwitchInteractionStyleId ) );\r
+ if ( a->isChecked() != on )\r
+ a->setChecked( on );\r
+}\r
+\r
+/*!\r
+ \brief Toogles advanced zooming style (relatively to the cursor position) on/off\r
+*/\r
+void OCCViewer_ViewWindow::onSwitchZoomingStyle( bool on )\r
+{\r
+ myViewPort->setAdvancedZoomingEnabled( on );\r
+\r
+ // update action state if method is called outside\r
+ QtxAction* a = dynamic_cast<QtxAction*>( toolMgr()->action( SwitchZoomingStyleId ) );\r
+ if ( a->isChecked() != on )\r
+ a->setChecked( on );\r
+}\r
+\r
+/*!\r
+ \brief Get current interaction style\r
+ \return interaction style\r
+*/\r
+int OCCViewer_ViewWindow::interactionStyle() const\r
+{\r
+ return myInteractionStyle;\r
+}\r
+\r
+/*!\r
+ \brief Set current interaction style\r
+ \param theStyle interaction style\r
+*/\r
+void OCCViewer_ViewWindow::setInteractionStyle( const int theStyle )\r
+{\r
+ onSwitchInteractionStyle( theStyle == (int)SUIT_ViewModel::KEY_FREE );\r
+}\r
+\r
+/*!\r
+ \brief Get current zooming style\r
+ \return zooming style\r
+*/\r
+int OCCViewer_ViewWindow::zoomingStyle() const\r
+{\r
+ return myViewPort->isAdvancedZoomingEnabled() ? 1 : 0;\r
+}\r
+\r
+/*!\r
+ \brief Set current zooming style\r
+ \param theStyle zooming style\r
+*/\r
+void OCCViewer_ViewWindow::setZoomingStyle( const int theStyle )\r
+{\r
+ onSwitchZoomingStyle( theStyle == 1 );\r
+}\r
+\r
+/*!\r
+ \brief Dump view window contents to the pixmap.\r
+ \return pixmap containing all scene rendered in the window\r
+*/\r
+QImage OCCViewer_ViewWindow::dumpView()\r
+{\r
+ Handle(V3d_View) view = myViewPort->getView();\r
+ if ( view.IsNull() )\r
+ return QImage();\r
+ \r
+ int aWidth = myViewPort->width();\r
+ int aHeight = myViewPort->height();\r
+ QApplication::syncX();\r
+ view->Redraw(); // In order to reactivate GL context\r
+ //view->Update();\r
+\r
+ OpenGLUtils_FrameBuffer aFrameBuffer;\r
+ if( aFrameBuffer.init( aWidth, aHeight ) )\r
+ {\r
+ QImage anImage( aWidth, aHeight, QImage::Format_RGB32 );\r
+ \r
+ glPushAttrib( GL_VIEWPORT_BIT );\r
+ glViewport( 0, 0, aWidth, aHeight );\r
+ aFrameBuffer.bind();\r
+\r
+ // draw scene\r
+ view->Redraw();\r
+\r
+ aFrameBuffer.unbind();\r
+ glPopAttrib();\r
+\r
+ aFrameBuffer.bind();\r
+ glReadPixels( 0, 0, aWidth, aHeight, GL_RGBA, GL_UNSIGNED_BYTE, anImage.bits() );\r
+ aFrameBuffer.unbind();\r
+\r
+ anImage = anImage.rgbSwapped();\r
+ anImage = anImage.mirrored();\r
+ return anImage;\r
+ }\r
+ // if frame buffers are unsupported, use old functionality\r
+ //view->Redraw();\r
+\r
+ unsigned char* data = new unsigned char[ aWidth*aHeight*4 ];\r
+\r
+ QPoint p = myViewPort->mapFromParent(myViewPort->geometry().topLeft());\r
+\r
+ glReadPixels( p.x(), p.y(), aWidth, aHeight, GL_RGBA, GL_UNSIGNED_BYTE,\r
+ data);\r
+\r
+ QImage anImage( data, aWidth, aHeight, QImage::Format_ARGB32 );\r
+ anImage = anImage.mirrored();\r
+ anImage = anImage.rgbSwapped();\r
+ return anImage;\r
+}\r
+\r
+bool OCCViewer_ViewWindow::dumpViewToFormat( const QImage& img, \r
+ const QString& fileName, \r
+ const QString& format )\r
+{\r
+ if ( format != "PS" && format != "EPS")\r
+ return SUIT_ViewWindow::dumpViewToFormat( img, fileName, format );\r
+\r
+ Handle(Visual3d_View) a3dView = myViewPort->getView()->View();\r
+\r
+ if (format == "PS")\r
+ a3dView->Export(strdup(qPrintable(fileName)), Graphic3d_EF_PostScript);\r
+ else if (format == "EPS")\r
+ a3dView->Export(strdup(qPrintable(fileName)), Graphic3d_EF_EnhPostScript);\r
+\r
+ return true;\r
+}\r
+\r
+\r
+QString OCCViewer_ViewWindow::filter() const\r
+{\r
+ return tr( "OCC_IMAGE_FILES" );\r
+}\r
+\r
+\r
+/*!\r
+ \brief Set parameters of the cutting plane\r
+ \param on if \c true, cutting plane is enabled\r
+ \param x X position of plane point\r
+ \param y Y position of plane point\r
+ \param z Z position of plane point\r
+ \param dx X coordinate of plane normal\r
+ \param dy Y coordinate of plane normal\r
+ \param dz Z coordinate of plane normal\r
+*/\r
+void OCCViewer_ViewWindow::setCuttingPlane( bool on, const double x, const double y, const double z,\r
+ const double dx, const double dy, const double dz )\r
+{\r
+ Handle(V3d_View) view = myViewPort->getView();\r
+ if ( view.IsNull() )\r
+ return;\r
+\r
+ if ( on ) {\r
+ Handle(V3d_Viewer) viewer = myViewPort->getViewer();\r
+\r
+ // try to use already existing plane or create a new one\r
+ Handle(V3d_Plane) clipPlane;\r
+\r
+ // calculate new a,b,c,d values for the plane\r
+ gp_Pln pln (gp_Pnt(x, y, z), gp_Dir(dx, dy, dz));\r
+ double a, b, c, d;\r
+ pln.Coefficients(a, b, c, d);\r
+ \r
+ Graphic3d_SequenceOfHClipPlane aPlanes = view->GetClipPlanes();\r
+ Handle(Graphic3d_ClipPlane) aClipPlane;\r
+ if(aPlanes.Size() > 0 ) {\r
+ Graphic3d_SequenceOfHClipPlane::Iterator anIter (aPlanes);\r
+ aClipPlane = anIter.Value();\r
+ aClipPlane->SetEquation(pln);\r
+ aClipPlane->SetOn(Standard_True);\r
+ } else {\r
+ aClipPlane = new Graphic3d_ClipPlane(pln);\r
+ view->AddClipPlane(aClipPlane);\r
+ aClipPlane->SetOn(Standard_True);\r
+ }\r
+ }\r
+ else {\r
+ Graphic3d_SequenceOfHClipPlane aPlanes = view->GetClipPlanes();\r
+ Graphic3d_SequenceOfHClipPlane::Iterator anIter (aPlanes);\r
+ for( ;anIter.More();anIter.Next() ){\r
+ Handle(Graphic3d_ClipPlane) aClipPlane = anIter.Value();\r
+ aClipPlane->SetOn(Standard_False);\r
+ }\r
+ }\r
+\r
+ view->Update();\r
+ view->Redraw();\r
+}\r
+\r
+void OCCViewer_ViewWindow::setCuttingPlane( bool on, const gp_Pln pln )\r
+{\r
+ gp_Dir aDir = pln.Axis().Direction();\r
+ gp_Pnt aPnt = pln.Location();\r
+ setCuttingPlane(on, aPnt.X(), aPnt.Y(), aPnt.Z(), aDir.X(), aDir.Y(), aDir.Z());\r
+}\r
+\r
+\r
+/*!\r
+ \brief Check if any cutting plane is enabled\r
+ \return \c true if at least one cutting plane is enabled\r
+*/\r
+bool OCCViewer_ViewWindow::isCuttingPlane()\r
+{\r
+ Handle(V3d_View) view = myViewPort->getView();\r
+ bool res = false;\r
+ Graphic3d_SequenceOfHClipPlane aPlanes = view->GetClipPlanes();\r
+ Graphic3d_SequenceOfHClipPlane::Iterator anIter (aPlanes);\r
+ for( ;anIter.More();anIter.Next() ) {\r
+ Handle(Graphic3d_ClipPlane) aClipPlane = anIter.Value();\r
+ if(aClipPlane->IsOn()) {\r
+ res = true;\r
+ break;\r
+ }\r
+ }\r
+ return res;\r
+}\r
+\r
+/*!\r
+ \brief Get the visual parameters of the view window.\r
+ \return visual parameters of view window\r
+*/\r
+viewAspect OCCViewer_ViewWindow::getViewParams() const\r
+{\r
+ double projX, projY, projZ, twist;\r
+ double atX, atY, atZ, eyeX, eyeY, eyeZ;\r
+ double aScaleX, aScaleY, aScaleZ;\r
+\r
+ Handle(V3d_View) aView3d = myViewPort->getView();\r
+\r
+ aView3d->Proj( projX, projY, projZ );\r
+ aView3d->At( atX, atY, atZ );\r
+ aView3d->Eye( eyeX, eyeY, eyeZ );\r
+ twist = aView3d->Twist();\r
+\r
+ aView3d->AxialScale(aScaleX,aScaleY,aScaleZ);\r
+\r
+ bool isShown = myModel->isTrihedronVisible();\r
+ double size = myModel->trihedronSize();\r
+\r
+ QString aName = QTime::currentTime().toString() + QString::fromLatin1( " h:m:s" );\r
+\r
+ viewAspect params;\r
+ params.scale = aView3d->Scale();\r
+ params.projX = projX;\r
+ params.projY = projY;\r
+ params.projZ = projZ;\r
+ params.twist = twist;\r
+ params.atX = atX;\r
+ params.atY = atY;\r
+ params.atZ = atZ;\r
+ params.eyeX = eyeX;\r
+ params.eyeY = eyeY;\r
+ params.eyeZ = eyeZ;\r
+ params.scaleX = aScaleX;\r
+ params.scaleY = aScaleY;\r
+ params.scaleZ = aScaleZ;\r
+ params.name = aName;\r
+ params.isVisible= isShown;\r
+ params.size = size;\r
+\r
+#if OCC_VERSION_LARGE <= 0x06070100 // the property is deprecated after OCCT 6.7.1\r
+ aView3d->Center( params.centerX, params.centerY );\r
+#endif\r
+\r
+#if OCC_VERSION_LARGE > 0x06030009 // available only with OCC-6.3-sp10 and higher version\r
+ // graduated trihedron\r
+ bool anIsVisible = false;\r
+ OCCViewer_AxisWidget::AxisData anAxisData[3];\r
+ myCubeAxesDlg->GetData( anIsVisible, anAxisData );\r
+\r
+ params.gtIsVisible = anIsVisible;\r
+ params.gtDrawNameX = anAxisData[0].DrawName;\r
+ params.gtDrawNameY = anAxisData[1].DrawName;\r
+ params.gtDrawNameZ = anAxisData[2].DrawName;\r
+ params.gtNameX = anAxisData[0].Name;\r
+ params.gtNameY = anAxisData[1].Name;\r
+ params.gtNameZ = anAxisData[2].Name;\r
+ params.gtNameColorRX = anAxisData[0].NameColor.red();\r
+ params.gtNameColorGX = anAxisData[0].NameColor.green();\r
+ params.gtNameColorBX = anAxisData[0].NameColor.blue();\r
+ params.gtNameColorRY = anAxisData[1].NameColor.red();\r
+ params.gtNameColorGY = anAxisData[1].NameColor.green();\r
+ params.gtNameColorBY = anAxisData[1].NameColor.blue();\r
+ params.gtNameColorRZ = anAxisData[2].NameColor.red();\r
+ params.gtNameColorGZ = anAxisData[2].NameColor.green();\r
+ params.gtNameColorBZ = anAxisData[2].NameColor.blue();\r
+ params.gtDrawValuesX = anAxisData[0].DrawValues;\r
+ params.gtDrawValuesY = anAxisData[1].DrawValues;\r
+ params.gtDrawValuesZ = anAxisData[2].DrawValues;\r
+ params.gtNbValuesX = anAxisData[0].NbValues;\r
+ params.gtNbValuesY = anAxisData[1].NbValues;\r
+ params.gtNbValuesZ = anAxisData[2].NbValues;\r
+ params.gtOffsetX = anAxisData[0].Offset;\r
+ params.gtOffsetY = anAxisData[1].Offset;\r
+ params.gtOffsetZ = anAxisData[2].Offset;\r
+ params.gtColorRX = anAxisData[0].Color.red();\r
+ params.gtColorGX = anAxisData[0].Color.green();\r
+ params.gtColorBX = anAxisData[0].Color.blue();\r
+ params.gtColorRY = anAxisData[1].Color.red();\r
+ params.gtColorGY = anAxisData[1].Color.green();\r
+ params.gtColorBY = anAxisData[1].Color.blue();\r
+ params.gtColorRZ = anAxisData[2].Color.red();\r
+ params.gtColorGZ = anAxisData[2].Color.green();\r
+ params.gtColorBZ = anAxisData[2].Color.blue();\r
+ params.gtDrawTickmarksX = anAxisData[0].DrawTickmarks;\r
+ params.gtDrawTickmarksY = anAxisData[1].DrawTickmarks;\r
+ params.gtDrawTickmarksZ = anAxisData[2].DrawTickmarks;\r
+ params.gtTickmarkLengthX = anAxisData[0].TickmarkLength;\r
+ params.gtTickmarkLengthY = anAxisData[1].TickmarkLength;\r
+ params.gtTickmarkLengthZ = anAxisData[2].TickmarkLength;\r
+#endif\r
+\r
+ return params;\r
+}\r
+\r
+/*!\r
+ \brief Get visual parameters of this view window.\r
+ \return visual parameters of view window\r
+*/\r
+QString OCCViewer_ViewWindow::getVisualParameters()\r
+{\r
+ viewAspect params = getViewParams();\r
+\r
+ QStringList data;\r
+\r
+ data << QString( "scale=%1" ) .arg( params.scale, 0, 'e', 12 );\r
+#if OCC_VERSION_LARGE <= 0x06070100 // the property is deprecated after OCCT 6.7.1\r
+ data << QString( "centerX=%1" ) .arg( params.centerX, 0, 'e', 12 );\r
+ data << QString( "centerY=%1" ) .arg( params.centerY, 0, 'e', 12 );\r
+#endif\r
+ data << QString( "projX=%1" ) .arg( params.projX, 0, 'e', 12 );\r
+ data << QString( "projY=%1" ) .arg( params.projY, 0, 'e', 12 );\r
+ data << QString( "projZ=%1" ) .arg( params.projZ, 0, 'e', 12 );\r
+ data << QString( "twist=%1" ) .arg( params.twist, 0, 'e', 12 );\r
+ data << QString( "atX=%1" ) .arg( params.atX, 0, 'e', 12 );\r
+ data << QString( "atY=%1" ) .arg( params.atY, 0, 'e', 12 );\r
+ data << QString( "atZ=%1" ) .arg( params.atZ, 0, 'e', 12 );\r
+ data << QString( "eyeX=%1" ) .arg( params.eyeX, 0, 'e', 12 );\r
+ data << QString( "eyeY=%1" ) .arg( params.eyeY, 0, 'e', 12 );\r
+ data << QString( "eyeZ=%1" ) .arg( params.eyeZ, 0, 'e', 12 );\r
+ data << QString( "scaleX=%1" ) .arg( params.scaleX, 0, 'e', 12 );\r
+ data << QString( "scaleY=%1" ) .arg( params.scaleY, 0, 'e', 12 );\r
+ data << QString( "scaleZ=%1" ) .arg( params.scaleZ, 0, 'e', 12 );\r
+ data << QString( "isVisible=%1" ).arg( params.isVisible );\r
+ data << QString( "size=%1" ) .arg( params.size, 0, 'f', 2 );\r
+\r
+ ClipPlanesList aPlanes = myModel->getClipPlanes();\r
+ for ( int i=0; i < aPlanes.size(); i++ )\r
+ {\r
+ OCCViewer_ClipPlane& aPlane = aPlanes[i];\r
+ QString ClippingPlane = QString( "ClippingPlane%1=").arg( i+1 );\r
+ ClippingPlane += QString( "Mode~%1;").arg( (int)aPlane.Mode );\r
+ ClippingPlane += QString( "IsActive~%1;").arg( aPlane.IsOn );\r
+ switch ( aPlane.Mode )\r
+ {\r
+ case OCCViewer_ClipPlane::Absolute :\r
+ {\r
+ ClippingPlane += QString( "AbsoluteOrientation~%1;" ).arg( aPlane.OrientationType );\r
+\r
+ if ( aPlane.OrientationType == OCCViewer_ClipPlane::AbsoluteCustom )\r
+ {\r
+ ClippingPlane += QString( "Dx~%1;" ).arg( aPlane.AbsoluteOrientation.Dx );\r
+ ClippingPlane += QString( "Dy~%1;" ).arg( aPlane.AbsoluteOrientation.Dy );\r
+ ClippingPlane += QString( "Dz~%1;" ).arg( aPlane.AbsoluteOrientation.Dz );\r
+ }\r
+ else\r
+ {\r
+ ClippingPlane += QString( "IsInvert~%1;" ).arg( aPlane.AbsoluteOrientation.IsInvert );\r
+ }\r
+ }\r
+ break;\r
+\r
+ case OCCViewer_ClipPlane::Relative :\r
+ {\r
+ ClippingPlane += QString( "RelativeOrientation~%1;" ).arg( aPlane.OrientationType );\r
+ ClippingPlane += QString( "Rotation1~%1;" ).arg( aPlane.RelativeOrientation.Rotation1 );\r
+ ClippingPlane += QString( "Rotation2~%1" ).arg( aPlane.RelativeOrientation.Rotation2 );\r
+ }\r
+ break;\r
+ }\r
+\r
+ ClippingPlane += QString( "X~%1;" ).arg( aPlane.X );\r
+ ClippingPlane += QString( "Y~%1;" ).arg( aPlane.Y );\r
+ ClippingPlane += QString( "Z~%1;" ).arg( aPlane.Z );\r
+ data << ClippingPlane;\r
+ }\r
+\r
+\r
+#if OCC_VERSION_LARGE > 0x06030009 // available only with OCC-6.3-sp10 or newer version\r
+ // graduated trihedron\r
+ data << QString( "gtIsVisible=%1" ) .arg( params.gtIsVisible );\r
+ data << QString( "gtDrawNameX=%1" ) .arg( params.gtDrawNameX );\r
+ data << QString( "gtDrawNameY=%1" ) .arg( params.gtDrawNameY );\r
+ data << QString( "gtDrawNameZ=%1" ) .arg( params.gtDrawNameZ );\r
+ data << QString( "gtNameX=%1" ) .arg( params.gtNameX );\r
+ data << QString( "gtNameY=%1" ) .arg( params.gtNameY );\r
+ data << QString( "gtNameZ=%1" ) .arg( params.gtNameZ );\r
+ data << QString( "gtNameColorRX=%1" ) .arg( params.gtNameColorRX );\r
+ data << QString( "gtNameColorGX=%1" ) .arg( params.gtNameColorGX );\r
+ data << QString( "gtNameColorBX=%1" ) .arg( params.gtNameColorBX );\r
+ data << QString( "gtNameColorRY=%1" ) .arg( params.gtNameColorRY );\r
+ data << QString( "gtNameColorGY=%1" ) .arg( params.gtNameColorGY );\r
+ data << QString( "gtNameColorBY=%1" ) .arg( params.gtNameColorBY );\r
+ data << QString( "gtNameColorRZ=%1" ) .arg( params.gtNameColorRZ );\r
+ data << QString( "gtNameColorGZ=%1" ) .arg( params.gtNameColorGZ );\r
+ data << QString( "gtNameColorBZ=%1" ) .arg( params.gtNameColorBZ );\r
+ data << QString( "gtDrawValuesX=%1" ) .arg( params.gtDrawValuesX );\r
+ data << QString( "gtDrawValuesY=%1" ) .arg( params.gtDrawValuesY );\r
+ data << QString( "gtDrawValuesZ=%1" ) .arg( params.gtDrawValuesZ );\r
+ data << QString( "gtNbValuesX=%1" ) .arg( params.gtNbValuesX );\r
+ data << QString( "gtNbValuesY=%1" ) .arg( params.gtNbValuesY );\r
+ data << QString( "gtNbValuesZ=%1" ) .arg( params.gtNbValuesZ );\r
+ data << QString( "gtOffsetX=%1" ) .arg( params.gtOffsetX );\r
+ data << QString( "gtOffsetY=%1" ) .arg( params.gtOffsetY );\r
+ data << QString( "gtOffsetZ=%1" ) .arg( params.gtOffsetZ );\r
+ data << QString( "gtColorRX=%1" ) .arg( params.gtColorRX );\r
+ data << QString( "gtColorGX=%1" ) .arg( params.gtColorGX );\r
+ data << QString( "gtColorBX=%1" ) .arg( params.gtColorBX );\r
+ data << QString( "gtColorRY=%1" ) .arg( params.gtColorRY );\r
+ data << QString( "gtColorGY=%1" ) .arg( params.gtColorGY );\r
+ data << QString( "gtColorBY=%1" ) .arg( params.gtColorBY );\r
+ data << QString( "gtColorRZ=%1" ) .arg( params.gtColorRZ );\r
+ data << QString( "gtColorGZ=%1" ) .arg( params.gtColorGZ );\r
+ data << QString( "gtColorBZ=%1" ) .arg( params.gtColorBZ );\r
+ data << QString( "gtDrawTickmarksX=%1" ) .arg( params.gtDrawTickmarksX );\r
+ data << QString( "gtDrawTickmarksY=%1" ) .arg( params.gtDrawTickmarksY );\r
+ data << QString( "gtDrawTickmarksZ=%1" ) .arg( params.gtDrawTickmarksZ );\r
+ data << QString( "gtTickmarkLengthX=%1" ).arg( params.gtTickmarkLengthX );\r
+ data << QString( "gtTickmarkLengthY=%1" ).arg( params.gtTickmarkLengthY );\r
+ data << QString( "gtTickmarkLengthZ=%1" ).arg( params.gtTickmarkLengthZ );\r
+#endif\r
+ QString bg = Qtx::backgroundToString( background() ).replace( "=", "$" );\r
+ data << QString( "background=%1" ).arg( bg );\r
+\r
+ return data.join("*");\r
+}\r
+\r
+/*!\r
+ \brief Restore visual parameters of the view window.\r
+ \param parameters visual parameters of view window\r
+*/\r
+void OCCViewer_ViewWindow::setVisualParameters( const QString& parameters )\r
+{\r
+ viewAspect params;\r
+ ClipPlanesList aClipPlanes;\r
+ QStringList data = parameters.split( '*' );\r
+ Qtx::BackgroundData bgData;\r
+ if ( parameters.contains( '=' ) ) // new format - "scale=1.000e+00*centerX=0.000e+00..."\r
+ {\r
+ foreach( QString param, data ) {\r
+ QString paramName = param.section( '=', 0, 0 ).trimmed();\r
+ QString paramValue = param.section( '=', 1, 1 ).trimmed();\r
+ if ( paramName == "scale" ) params.scale = paramValue.toDouble();\r
+ else if ( paramName == "centerX" ) params.centerX = paramValue.toDouble();\r
+ else if ( paramName == "centerY" ) params.centerY = paramValue.toDouble();\r
+ else if ( paramName == "projX" ) params.projX = paramValue.toDouble();\r
+ else if ( paramName == "projY" ) params.projY = paramValue.toDouble();\r
+ else if ( paramName == "projZ" ) params.projZ = paramValue.toDouble();\r
+ else if ( paramName == "twist" ) params.twist = paramValue.toDouble();\r
+ else if ( paramName == "atX" ) params.atX = paramValue.toDouble();\r
+ else if ( paramName == "atY" ) params.atY = paramValue.toDouble();\r
+ else if ( paramName == "atZ" ) params.atZ = paramValue.toDouble();\r
+ else if ( paramName == "eyeX" ) params.eyeX = paramValue.toDouble();\r
+ else if ( paramName == "eyeY" ) params.eyeY = paramValue.toDouble();\r
+ else if ( paramName == "eyeZ" ) params.eyeZ = paramValue.toDouble();\r
+ else if ( paramName == "scaleX" ) params.scaleX = paramValue.toDouble();\r
+ else if ( paramName == "scaleY" ) params.scaleY = paramValue.toDouble();\r
+ else if ( paramName == "scaleZ" ) params.scaleZ = paramValue.toDouble();\r
+ else if ( paramName == "isVisible" ) params.isVisible = paramValue.toInt();\r
+ else if ( paramName == "size" ) params.size = paramValue.toDouble();\r
+ else if ( paramName.contains( "ClippingPlane" ) )\r
+ {\r
+ QStringList ClipPlaneData = paramValue.split( ';' );\r
+ OCCViewer_ClipPlane aPlane;\r
+ foreach( QString ClipPlaneParam, ClipPlaneData )\r
+ {\r
+ QString ClipPlane_paramName = ClipPlaneParam.section( '~', 0, 0 ).trimmed();\r
+ QString ClipPlane_paramValue = ClipPlaneParam.section( '~', 1, 1 ).trimmed();\r
+ if ( ClipPlane_paramName == "Mode" )\r
+ {\r
+ aPlane.Mode = ( OCCViewer_ClipPlane::PlaneMode ) ClipPlane_paramValue.toInt();\r
+ }\r
+ else if ( ClipPlane_paramName == "IsActive" ) aPlane.IsOn = ClipPlane_paramValue.toInt();\r
+ else if ( ClipPlane_paramName == "X" ) aPlane.X = ClipPlane_paramValue.toDouble();\r
+ else if ( ClipPlane_paramName == "Y" ) aPlane.Y = ClipPlane_paramValue.toDouble();\r
+ else if ( ClipPlane_paramName == "Z" ) aPlane.Z = ClipPlane_paramValue.toDouble();\r
+ else\r
+ {\r
+ switch ( aPlane.Mode )\r
+ {\r
+ case OCCViewer_ClipPlane::Absolute :\r
+ if ( ClipPlane_paramName == "Dx" ) aPlane.AbsoluteOrientation.Dx = ClipPlane_paramValue.toDouble();\r
+ else if ( ClipPlane_paramName == "Dy" ) aPlane.AbsoluteOrientation.Dy = ClipPlane_paramValue.toDouble();\r
+ else if ( ClipPlane_paramName == "Dz" ) aPlane.AbsoluteOrientation.Dz = ClipPlane_paramValue.toDouble();\r
+ else if ( ClipPlane_paramName == "IsInvert" ) aPlane.AbsoluteOrientation.IsInvert = ClipPlane_paramValue.toInt();\r
+ else if ( ClipPlane_paramName == "AbsoluteOrientation" ) aPlane.OrientationType = ClipPlane_paramValue.toInt();\r
+ break;\r
+\r
+ case OCCViewer_ClipPlane::Relative :\r
+ if ( ClipPlane_paramName == "RelativeOrientation" ) aPlane.OrientationType = ClipPlane_paramValue.toInt();\r
+ else if ( ClipPlane_paramName == "Rotation1" ) aPlane.RelativeOrientation.Rotation1 = ClipPlane_paramValue.toDouble();\r
+ else if ( ClipPlane_paramName == "Rotation2" ) aPlane.RelativeOrientation.Rotation2 = ClipPlane_paramValue.toDouble();\r
+ break;\r
+ }\r
+ }\r
+ }\r
+ aClipPlanes.push_back(aPlane);\r
+ }\r
+ // graduated trihedron\r
+ else if ( paramName == "gtIsVisible" ) params.gtIsVisible = paramValue.toInt();\r
+ else if ( paramName == "gtDrawNameX" ) params.gtDrawNameX = paramValue.toInt();\r
+ else if ( paramName == "gtDrawNameY" ) params.gtDrawNameY = paramValue.toInt();\r
+ else if ( paramName == "gtDrawNameZ" ) params.gtDrawNameZ = paramValue.toInt();\r
+ else if ( paramName == "gtNameX" ) params.gtNameX = paramValue;\r
+ else if ( paramName == "gtNameY" ) params.gtNameY = paramValue;\r
+ else if ( paramName == "gtNameZ" ) params.gtNameZ = paramValue;\r
+ else if ( paramName == "gtNameColorRX" ) params.gtNameColorRX = paramValue.toInt();\r
+ else if ( paramName == "gtNameColorGX" ) params.gtNameColorGX = paramValue.toInt();\r
+ else if ( paramName == "gtNameColorBX" ) params.gtNameColorBX = paramValue.toInt();\r
+ else if ( paramName == "gtNameColorRY" ) params.gtNameColorRY = paramValue.toInt();\r
+ else if ( paramName == "gtNameColorGY" ) params.gtNameColorGY = paramValue.toInt();\r
+ else if ( paramName == "gtNameColorBY" ) params.gtNameColorBY = paramValue.toInt();\r
+ else if ( paramName == "gtNameColorRZ" ) params.gtNameColorRZ = paramValue.toInt();\r
+ else if ( paramName == "gtNameColorGZ" ) params.gtNameColorGZ = paramValue.toInt();\r
+ else if ( paramName == "gtNameColorBZ" ) params.gtNameColorBZ = paramValue.toInt();\r
+ else if ( paramName == "gtDrawValuesX" ) params.gtDrawValuesX = paramValue.toInt();\r
+ else if ( paramName == "gtDrawValuesY" ) params.gtDrawValuesY = paramValue.toInt();\r
+ else if ( paramName == "gtDrawValuesZ" ) params.gtDrawValuesZ = paramValue.toInt();\r
+ else if ( paramName == "gtNbValuesX" ) params.gtNbValuesX = paramValue.toInt();\r
+ else if ( paramName == "gtNbValuesY" ) params.gtNbValuesY = paramValue.toInt();\r
+ else if ( paramName == "gtNbValuesZ" ) params.gtNbValuesZ = paramValue.toInt();\r
+ else if ( paramName == "gtOffsetX" ) params.gtOffsetX = paramValue.toInt();\r
+ else if ( paramName == "gtOffsetY" ) params.gtOffsetY = paramValue.toInt();\r
+ else if ( paramName == "gtOffsetZ" ) params.gtOffsetZ = paramValue.toInt();\r
+ else if ( paramName == "gtColorRX" ) params.gtColorRX = paramValue.toInt();\r
+ else if ( paramName == "gtColorGX" ) params.gtColorGX = paramValue.toInt();\r
+ else if ( paramName == "gtColorBX" ) params.gtColorBX = paramValue.toInt();\r
+ else if ( paramName == "gtColorRY" ) params.gtColorRY = paramValue.toInt();\r
+ else if ( paramName == "gtColorGY" ) params.gtColorGY = paramValue.toInt();\r
+ else if ( paramName == "gtColorBY" ) params.gtColorBY = paramValue.toInt();\r
+ else if ( paramName == "gtColorRZ" ) params.gtColorRZ = paramValue.toInt();\r
+ else if ( paramName == "gtColorGZ" ) params.gtColorGZ = paramValue.toInt();\r
+ else if ( paramName == "gtColorBZ" ) params.gtColorBZ = paramValue.toInt();\r
+ else if ( paramName == "gtDrawTickmarksX" ) params.gtDrawTickmarksX = paramValue.toInt();\r
+ else if ( paramName == "gtDrawTickmarksY" ) params.gtDrawTickmarksY = paramValue.toInt();\r
+ else if ( paramName == "gtDrawTickmarksZ" ) params.gtDrawTickmarksZ = paramValue.toInt();\r
+ else if ( paramName == "gtTickmarkLengthX" ) params.gtTickmarkLengthX = paramValue.toInt();\r
+ else if ( paramName == "gtTickmarkLengthY" ) params.gtTickmarkLengthY = paramValue.toInt();\r
+ else if ( paramName == "gtTickmarkLengthZ" ) params.gtTickmarkLengthZ = paramValue.toInt();\r
+ else if ( paramName == "background" ) {\r
+ QString bg = paramValue.replace( "$", "=" );\r
+ bgData = Qtx::stringToBackground( bg );\r
+ }\r
+ }\r
+ }\r
+ else // old format - "1.000e+00*0.000e+00..."\r
+ {\r
+ int idx = 0;\r
+ params.scale = data.count() > idx ? data[idx++].toDouble() : 1.0;\r
+ params.centerX = data.count() > idx ? data[idx++].toDouble() : 0.0;\r
+ params.centerY = data.count() > idx ? data[idx++].toDouble() : 0.0;\r
+ params.projX = data.count() > idx ? data[idx++].toDouble() : sqrt(1./3);\r
+ params.projY = data.count() > idx ? data[idx++].toDouble() : -sqrt(1./3);\r
+ params.projZ = data.count() > idx ? data[idx++].toDouble() : sqrt(1./3);\r
+ params.twist = data.count() > idx ? data[idx++].toDouble() : 0.0;\r
+ params.atX = data.count() > idx ? data[idx++].toDouble() : 0.0;\r
+ params.atY = data.count() > idx ? data[idx++].toDouble() : 0.0;\r
+ params.atZ = data.count() > idx ? data[idx++].toDouble() : 0.0;\r
+ params.eyeX = data.count() > idx ? data[idx++].toDouble() : sqrt(250000./3);\r
+ params.eyeY = data.count() > idx ? data[idx++].toDouble() : -sqrt(250000./3);\r
+ params.eyeZ = data.count() > idx ? data[idx++].toDouble() : sqrt(250000./3);\r
+ params.scaleX = data.count() > idx ? data[idx++].toDouble() : 1.0;\r
+ params.scaleY = data.count() > idx ? data[idx++].toDouble() : 1.0;\r
+ params.scaleZ = data.count() > idx ? data[idx++].toDouble() : 1.0;\r
+ params.isVisible = data.count() > idx ? data[idx++].toInt() : 1;\r
+ params.size = data.count() > idx ? data[idx++].toDouble() : 100.0;\r
+ }\r
+ performRestoring( params ); \r
+ setBackground( bgData );\r
+ myModel->setClipPlanes(aClipPlanes);\r
+}\r
+\r
+/*!\r
+ \brief Handle show event.\r
+\r
+ Emits Show() signal.\r
+\r
+ \param theEvent show event\r
+*/\r
+void OCCViewer_ViewWindow::showEvent( QShowEvent* theEvent )\r
+{\r
+ emit Show( theEvent );\r
+}\r
+\r
+/*!\r
+ \brief Handle hide event.\r
+\r
+ Emits Hide() signal.\r
+\r
+ \param theEvent hide event\r
+*/\r
+void OCCViewer_ViewWindow::hideEvent( QHideEvent* theEvent )\r
+{\r
+ emit Hide( theEvent );\r
+}\r
+\r
+\r
+/*!\r
+ Creates default sketcher. [ virtual protected ]\r
+*/\r
+OCCViewer_ViewSketcher* OCCViewer_ViewWindow::createSketcher( int type )\r
+{\r
+ if ( type == Rect )\r
+ return new OCCViewer_RectSketcher( this, type );\r
+ if ( type == Polygon )\r
+ return new OCCViewer_PolygonSketcher( this, type );\r
+ return 0;\r
+}\r
+\r
+void OCCViewer_ViewWindow::initSketchers()\r
+{\r
+ if ( mySketchers.isEmpty() )\r
+ {\r
+ mySketchers.append( createSketcher( Rect ) );\r
+ mySketchers.append( createSketcher( Polygon ) );\r
+ }\r
+}\r
+\r
+OCCViewer_ViewSketcher* OCCViewer_ViewWindow::getSketcher( const int typ )\r
+{\r
+ OCCViewer_ViewSketcher* sketcher = 0;\r
+ QList<OCCViewer_ViewSketcher*>::Iterator it;\r
+ for ( it = mySketchers.begin(); it != mySketchers.end() && !sketcher; ++it )\r
+ {\r
+ OCCViewer_ViewSketcher* sk = (*it);\r
+ if ( sk->type() == typ )\r
+ sketcher = sk;\r
+ }\r
+ return sketcher;\r
+}\r
+\r
+/*!\r
+ Handles requests for sketching in the active view. [ virtual public ]\r
+*/\r
+void OCCViewer_ViewWindow::activateSketching( int type )\r
+{\r
+ OCCViewer_ViewPort3d* vp = getViewPort();\r
+ if ( !vp )\r
+ return;\r
+\r
+ if ( !vp->isSketchingEnabled() )\r
+ return;\r
+\r
+ /* Finish current sketching */\r
+ if ( type == NoSketching )\r
+ {\r
+ if ( mypSketcher )\r
+ {\r
+ onSketchingFinished();\r
+ mypSketcher->deactivate();\r
+ mypSketcher = 0;\r
+ }\r
+ }\r
+ /* Activate new sketching */\r
+ else\r
+ {\r
+ activateSketching( NoSketching ); /* concurrency not suported */\r
+ mypSketcher = getSketcher( type );\r
+ if ( mypSketcher )\r
+ {\r
+ mypSketcher->activate();\r
+ onSketchingStarted();\r
+ }\r
+ }\r
+}\r
+\r
+/*!\r
+ Unhilights detected entities. [ virtual protected ]\r
+*/\r
+void OCCViewer_ViewWindow::onSketchingStarted()\r
+{\r
+}\r
+\r
+/*!\r
+ Selection by rectangle or polygon. [ virtual protected ]\r
+*/\r
+void OCCViewer_ViewWindow::onSketchingFinished()\r
+{\r
+ MESSAGE("OCCViewer_ViewWindow::onSketchingFinished()")\r
+ if ( mypSketcher && mypSketcher->result() == OCCViewer_ViewSketcher::Accept )\r
+ {\r
+ Handle(AIS_InteractiveContext) ic = myModel->getAISContext();\r
+ bool append = bool( mypSketcher->buttonState() && mypSketcher->isHasShift() );\r
+ switch( mypSketcher->type() )\r
+ {\r
+ case Rect:\r
+ {\r
+ QRect* aRect = (QRect*)mypSketcher->data();\r
+ if( aRect )\r
+ {\r
+ int aLeft = aRect->left();\r
+ int aRight = aRect->right();\r
+ int aTop = aRect->top();\r
+ int aBottom = aRect->bottom();\r
+// myRect = aRect;\r
+\r
+ if( append )\r
+ ic->ShiftSelect( aLeft, aBottom, aRight, aTop, getViewPort()->getView(), Standard_False );\r
+ else\r
+ ic->Select( aLeft, aBottom, aRight, aTop, getViewPort()->getView(), Standard_False );\r
+ }\r
+ }\r
+ break;\r
+ case Polygon:\r
+ {\r
+ QPolygon* aPolygon = (QPolygon*)mypSketcher->data();\r
+ if( aPolygon )\r
+ {\r
+ int size = aPolygon->size();\r
+ TColgp_Array1OfPnt2d anArray( 1, size );\r
+\r
+ QPolygon::Iterator it = aPolygon->begin();\r
+ QPolygon::Iterator itEnd = aPolygon->end();\r
+ for( int index = 1; it != itEnd; ++it, index++ )\r
+ {\r
+ QPoint aPoint = *it;\r
+ anArray.SetValue( index, gp_Pnt2d( aPoint.x(), aPoint.y() ) );\r
+ }\r
+\r
+ if( append )\r
+ ic->ShiftSelect( anArray, getViewPort()->getView(), Standard_False );\r
+ else\r
+ ic->Select( anArray, getViewPort()->getView(), Standard_False );\r
+ }\r
+ }\r
+ break;\r
+ default:\r
+ break;\r
+ }\r
+\r
+ OCCViewer_ViewManager* aViewMgr = ( OCCViewer_ViewManager* )getViewManager();\r
+ aViewMgr->getOCCViewer()->performSelectionChanged();\r
+ }\r
+}\r
+\r
+OCCViewer_ViewPort3d* OCCViewer_ViewWindow::getViewPort()\r
+{\r
+ return myViewPort;\r
+}\r
+\r
+bool OCCViewer_ViewWindow::transformRequested() const\r
+{\r
+ return ( myOperation != NOTHING );\r
+}\r
+\r
+bool OCCViewer_ViewWindow::transformInProcess() const\r
+{\r
+ return myEventStarted;\r
+}\r
+\r
+void OCCViewer_ViewWindow::setTransformInProcess( bool bOn )\r
+{\r
+ myEventStarted = bOn;\r
+}\r
+\r
+/*!\r
+ Set enabled state of transformation (rotate, zoom, etc)\r
+*/\r
+void OCCViewer_ViewWindow::setTransformEnabled( const OperationType id, const bool on )\r
+{\r
+ if ( id != NOTHING ) myStatus.insert( id, on );\r
+}\r
+\r
+/*!\r
+ \return enabled state of transformation (rotate, zoom, etc)\r
+*/\r
+bool OCCViewer_ViewWindow::transformEnabled( const OperationType id ) const\r
+{\r
+ return myStatus.contains( id ) ? myStatus[ id ] : true;\r
+}\r
+\r
+void OCCViewer_ViewWindow::onMaximizedView()\r
+{\r
+ setMaximized(!isMaximized());\r
+}\r
+\r
+void OCCViewer_ViewWindow::returnTo3dView()\r
+{\r
+ setReturnedTo3dView( true );\r
+}\r
+\r
+void OCCViewer_ViewWindow::setReturnedTo3dView(bool isVisible3dView)\r
+{\r
+ if ( !toolMgr()->action( ReturnTo3dViewId ) ||\r
+ toolMgr()->isShown(ReturnTo3dViewId) != isVisible3dView ) return;\r
+ if ( !isVisible3dView )\r
+ toolMgr()->show( ReturnTo3dViewId );\r
+ else\r
+ toolMgr()->hide( ReturnTo3dViewId );\r
+ if ( isVisible3dView ) emit returnedTo3d( );\r
+}\r
+\r
+\r
+void OCCViewer_ViewWindow::setMaximized(bool toMaximize, bool toSendSignal)\r
+{\r
+ QAction* anAction = toolMgr()->action( MaximizedId );\r
+ QAction* anAction2 = toolMgr()->action( ReturnTo3dViewId );\r
+ SUIT_ResourceMgr* aResMgr = SUIT_Session::session()->resourceMgr();\r
+ if ( toMaximize ) {\r
+ anAction->setText( tr( "MNU_MINIMIZE_VIEW" ) ); \r
+ anAction->setToolTip( tr( "MNU_MINIMIZE_VIEW" ) ); \r
+ anAction->setIcon( aResMgr->loadPixmap( "OCCViewer", tr( "ICON_OCCVIEWER_MINIMIZE" ) ) );\r
+ anAction->setStatusTip( tr( "DSC_MINIMIZE_VIEW" ) );\r
+ if ( anAction2 && my2dMode != No2dMode ) toolMgr()->show( ReturnTo3dViewId );\r
+ if (toSendSignal) {\r
+ emit maximized( this, true );\r
+ }\r
+ }\r
+ else {\r
+ anAction->setText( tr( "MNU_MAXIMIZE_VIEW" ) ); \r
+ anAction->setToolTip( tr( "MNU_MAXIMIZE_VIEW" ) ); \r
+ anAction->setIcon( aResMgr->loadPixmap( "OCCViewer", tr( "ICON_OCCVIEWER_MAXIMIZE" ) ) );\r
+ anAction->setStatusTip( tr( "DSC_MAXIMIZE_VIEW" ) );\r
+ if ( anAction2 && my2dMode != No2dMode ) toolMgr()->hide( ReturnTo3dViewId );\r
+ if (toSendSignal) {\r
+ emit maximized( this, false );\r
+ }\r
+ }\r
+}\r
+\r
+bool OCCViewer_ViewWindow::isMaximized() const\r
+{\r
+ return !(toolMgr()->action( MaximizedId )->text() == tr( "MNU_MAXIMIZE_VIEW" ));\r
+}\r
+\r
+void OCCViewer_ViewWindow::setSketcherStyle( bool enable )\r
+{ \r
+ IsSketcherStyle = enable; \r
+}\r
+\r
+bool OCCViewer_ViewWindow::isSketcherStyle() const \r
+{ \r
+ return IsSketcherStyle; \r
+}\r
+\r
+\r
+void OCCViewer_ViewWindow::set2dMode(Mode2dType theType)\r
+{\r
+ my2dMode = theType;\r
+}\r
+\r
+// obsolete \r
+QColor OCCViewer_ViewWindow::backgroundColor() const\r
+{\r
+ return myViewPort ? myViewPort->backgroundColor() : Qt::black;\r
+}\r
+ \r
+// obsolete\r
+void OCCViewer_ViewWindow::setBackgroundColor( const QColor& theColor )\r
+{\r
+ if ( myViewPort ) myViewPort->setBackgroundColor( theColor );\r
+}\r
+\r
+Qtx::BackgroundData OCCViewer_ViewWindow::background() const\r
+{\r
+ return myViewPort ? myViewPort->background() : Qtx::BackgroundData();\r
+}\r
+ \r
+void OCCViewer_ViewWindow::setBackground( const Qtx::BackgroundData& theBackground )\r
+{\r
+ if ( myViewPort ) myViewPort->setBackground( theBackground );\r
+}\r
+\r
+/*!\r
+ Clears view aspects\r
+*/\r
+void OCCViewer_ViewWindow::clearViewAspects()\r
+{\r
+ myViewAspects.clear();\r
+}\r
+\r
+/*!\r
+ \return const reference to list of view aspects\r
+*/\r
+const viewAspectList& OCCViewer_ViewWindow::getViewAspects()\r
+{\r
+ return myViewAspects;\r
+}\r
+\r
+/*!\r
+ Appends new view aspect\r
+ \param aParams - new view aspects\r
+*/\r
+void OCCViewer_ViewWindow::appendViewAspect( const viewAspect& aParams )\r
+{\r
+ myViewAspects.append( aParams );\r
+}\r
+\r
+/*!\r
+ Replaces old view aspects by new ones\r
+ \param aViewList - list of new view aspects\r
+*/\r
+void OCCViewer_ViewWindow::updateViewAspects( const viewAspectList& aViewList )\r
+{\r
+ myViewAspects = aViewList;\r
+}\r
+\r
+/*!\r
+ Get camera properties for the OCC view window.\r
+ \return shared pointer on camera properties.\r
+*/\r
+SUIT_CameraProperties OCCViewer_ViewWindow::cameraProperties()\r
+{\r
+ SUIT_CameraProperties aProps;\r
+\r
+ Handle(V3d_View) aSourceView = getViewPort()->getView();\r
+ if ( aSourceView.IsNull() )\r
+ return aProps;\r
+\r
+ if ( get2dMode() == No2dMode ) {\r
+ aProps.setDimension( SUIT_CameraProperties::Dim3D );\r
+ }\r
+ else {\r
+ aProps.setDimension( SUIT_CameraProperties::Dim2D );\r
+ aProps.setViewSide( (SUIT_CameraProperties::ViewSide)(int)get2dMode() );\r
+ }\r
+\r
+ // read common properites of the view\r
+ Standard_Real anUp[3];\r
+ Standard_Real anAt[3];\r
+ Standard_Real anEye[3];\r
+ Standard_Real aProj[3];\r
+ Standard_Real anAxialScale[3];\r
+\r
+ aSourceView->Up( anUp[0], anUp[1], anUp[2] );\r
+ aSourceView->At( anAt[0], anAt[1], anAt[2] );\r
+ aSourceView->Proj( aProj[0], aProj[1], aProj[2] );\r
+ getViewPort()->getAxialScale( anAxialScale[0], anAxialScale[1], anAxialScale[2] );\r
+\r
+ aProps.setAxialScale( anAxialScale[0], anAxialScale[1], anAxialScale[2] );\r
+ aProps.setViewUp( anUp[0], anUp[1], anUp[2] );\r
+\r
+#if OCC_VERSION_LARGE > 0x06070100\r
+ aSourceView->Eye( anEye[0], anEye[1], anEye[2] );\r
+\r
+ // store camera properties "as is": it is up to synchronized\r
+ // view classes to provide necessary property conversion.\r
+ aProps.setPosition( anEye[0], anEye[1], anEye[2] );\r
+ aProps.setFocalPoint( anAt[0], anAt[1], anAt[2] );\r
+\r
+ if ( aSourceView->Camera()->IsOrthographic() )\r
+ {\r
+ aProps.setProjection( SUIT_CameraProperties::PrjOrthogonal );\r
+ aProps.setViewAngle( 0.0 );\r
+ }\r
+ else\r
+ {\r
+ aProps.setProjection( SUIT_CameraProperties::PrjPerspective );\r
+ aProps.setViewAngle( aSourceView->Camera()->FOVy() );\r
+ }\r
+ aProps.setMappingScale( aSourceView->Camera()->Scale() );\r
+#else\r
+ Standard_Real aCameraDepth = aSourceView->Depth() + aSourceView->ZSize() * 0.5;\r
+\r
+ // generate view orientation matrix for transforming OCC projection reference point\r
+ // into a camera (eye) position.\r
+ gp_Dir aLeftDir = gp_Dir( anUp[0], anUp[1], anUp[2] ) ^ gp_Dir( aProj[0], aProj[1], aProj[2] );\r
+\r
+ gp_GTrsf aTrsf;\r
+ aTrsf.SetValue( 1, 1, aLeftDir.X() );\r
+ aTrsf.SetValue( 2, 1, aLeftDir.Y() );\r
+ aTrsf.SetValue( 3, 1, aLeftDir.Z() );\r
+\r
+ aTrsf.SetValue( 1, 2, anUp[0] );\r
+ aTrsf.SetValue( 2, 2, anUp[1] );\r
+ aTrsf.SetValue( 3, 2, anUp[2] );\r
+\r
+ aTrsf.SetValue( 1, 3, aProj[0] );\r
+ aTrsf.SetValue( 2, 3, aProj[1] );\r
+ aTrsf.SetValue( 3, 3, aProj[2] );\r
+\r
+ aTrsf.SetValue( 1, 4, anAt[0] );\r
+ aTrsf.SetValue( 2, 4, anAt[1] );\r
+ aTrsf.SetValue( 3, 4, anAt[2] );\r
+\r
+ Graphic3d_Vertex aProjRef = aSourceView->ViewMapping().ProjectionReferencePoint();\r
+\r
+ // transform to world-space coordinate system\r
+ gp_XYZ aPosition( aProjRef.X(), aProjRef.Y(), aCameraDepth );\r
+ aTrsf.Transforms( aPosition );\r
+\r
+ // compute focal point\r
+ double aFocalPoint[3];\r
+\r
+ aFocalPoint[0] = aPosition.X() - aProj[0] * aCameraDepth;\r
+ aFocalPoint[1] = aPosition.Y() - aProj[1] * aCameraDepth;\r
+ aFocalPoint[2] = aPosition.Z() - aProj[2] * aCameraDepth;\r
+\r
+ aProps.setFocalPoint( aFocalPoint[0], aFocalPoint[1], aFocalPoint[2] );\r
+ aProps.setPosition( aPosition.X(), aPosition.Y(), aPosition.Z() );\r
+\r
+ Standard_Real aViewScale[2];\r
+ aSourceView->Size( aViewScale[0], aViewScale[1] );\r
+ aProps.setMappingScale( aViewScale[1] );\r
+#endif\r
+\r
+ return aProps;\r
+}\r
+\r
+/*!\r
+ Synchronize views.\r
+ This implementation synchronizes OCC view's camera propreties.\r
+*/\r
+void OCCViewer_ViewWindow::synchronize( SUIT_ViewWindow* theView )\r
+{\r
+ bool blocked = blockSignals( true );\r
+\r
+ SUIT_CameraProperties aProps = theView->cameraProperties();\r
+ if ( !cameraProperties().isCompatible( aProps ) ) {\r
+ // other view, this one is being currently synchronized to, seems has become incompatible\r
+ // we have to break synchronization\r
+ updateSyncViews();\r
+ return;\r
+ }\r
+\r
+ Handle(V3d_View) aDestView = getViewPort()->getView();\r
+\r
+ aDestView->SetImmediateUpdate( Standard_False );\r
+\r
+ double anUpDir[3];\r
+ double aPosition[3];\r
+ double aFocalPoint[3];\r
+ double anAxialScale[3];\r
+\r
+ // get common properties\r
+ aProps.getFocalPoint( aFocalPoint[0], aFocalPoint[1], aFocalPoint[2] );\r
+ aProps.getPosition( aPosition[0], aPosition[1], aPosition[2] );\r
+ aProps.getViewUp( anUpDir[0], anUpDir[1], anUpDir[2] );\r
+ aProps.getAxialScale( anAxialScale[0], anAxialScale[1], anAxialScale[2] );\r
+\r
+#if OCC_VERSION_LARGE > 0x06070100\r
+ aDestView->SetAt( aFocalPoint[0], aFocalPoint[1], aFocalPoint[2] );\r
+ aDestView->SetEye( aPosition[0], aPosition[1], aPosition[2] );\r
+ aDestView->SetUp( anUpDir[0], anUpDir[1], anUpDir[2] );\r
+ aDestView->Camera()->SetScale( aProps.getMappingScale() );\r
+#else\r
+ gp_Dir aProjDir( aPosition[0] - aFocalPoint[0],\r
+ aPosition[1] - aFocalPoint[1],\r
+ aPosition[2] - aFocalPoint[2] );\r
+\r
+ // get custom view translation\r
+ Standard_Real aTranslation[3];\r
+ aDestView->At( aTranslation[0], aTranslation[1], aTranslation[2] );\r
+\r
+ gp_Dir aLeftDir = gp_Dir( anUpDir[0], anUpDir[1], anUpDir[2] )\r
+ ^ gp_Dir( aProjDir.X(), aProjDir.Y(), aProjDir.Z() );\r
+\r
+ gp_GTrsf aTrsf;\r
+ aTrsf.SetValue( 1, 1, aLeftDir.X() );\r
+ aTrsf.SetValue( 2, 1, aLeftDir.Y() );\r
+ aTrsf.SetValue( 3, 1, aLeftDir.Z() );\r
+\r
+ aTrsf.SetValue( 1, 2, anUpDir[0] );\r
+ aTrsf.SetValue( 2, 2, anUpDir[1] );\r
+ aTrsf.SetValue( 3, 2, anUpDir[2] );\r
+\r
+ aTrsf.SetValue( 1, 3, aProjDir.X() );\r
+ aTrsf.SetValue( 2, 3, aProjDir.Y() );\r
+ aTrsf.SetValue( 3, 3, aProjDir.Z() );\r
+\r
+ aTrsf.SetValue( 1, 4, aTranslation[0] );\r
+ aTrsf.SetValue( 2, 4, aTranslation[1] );\r
+ aTrsf.SetValue( 3, 4, aTranslation[2] );\r
+ aTrsf.Invert();\r
+\r
+ // transform to view-space coordinate system\r
+ gp_XYZ aProjRef( aPosition[0], aPosition[1], aPosition[2] );\r
+ aTrsf.Transforms( aProjRef );\r
+\r
+ // set view camera properties using low-level approach. this is done\r
+ // in order to avoid interference with static variables in v3d view used\r
+ // when rotation is in process in another view.\r
+ Visual3d_ViewMapping aMapping = aDestView->View()->ViewMapping();\r
+ Visual3d_ViewOrientation anOrientation = aDestView->View()->ViewOrientation();\r
+\r
+ Graphic3d_Vector aMappingProj( aProjDir.X(), aProjDir.Y(), aProjDir.Z() );\r
+ Graphic3d_Vector aMappingUp( anUpDir[0], anUpDir[1], anUpDir[2] );\r
+\r
+ aMappingProj.Normalize();\r
+ aMappingUp.Normalize();\r
+\r
+ anOrientation.SetViewReferencePlane( aMappingProj );\r
+ anOrientation.SetViewReferenceUp( aMappingUp );\r
+\r
+ aDestView->SetViewMapping( aMapping );\r
+ aDestView->SetViewOrientation( anOrientation );\r
+\r
+ // set panning\r
+ aDestView->SetCenter( aProjRef.X(), aProjRef.Y() );\r
+\r
+ // set mapping scale\r
+ double aMapScaling = aProps.getMappingScale();\r
+ Standard_Real aWidth, aHeight;\r
+ aDestView->Size( aWidth, aHeight );\r
+ aDestView->SetSize ( aWidth > aHeight ? aMapScaling * (aWidth / aHeight) : aMapScaling );\r
+#endif\r
+\r
+ getViewPort()->setAxialScale( anAxialScale[0], anAxialScale[1], anAxialScale[2] );\r
+\r
+ aDestView->ZFitAll();\r
+ aDestView->SetImmediateUpdate( Standard_True );\r
+ aDestView->Redraw();\r
+\r
+ blockSignals( blocked );\r
+}\r
+\r
+/*!\r
+ \brief Indicates whether preselection is enabled\r
+ \return true if preselection is enabled\r
+*/\r
+bool OCCViewer_ViewWindow::isPreselectionEnabled() const\r
+{\r
+ return myPreselectionEnabled;\r
+}\r
+\r
+/*!\r
+ \brief Enables/disables preselection\r
+ \param theIsToEnable if true - preselection will be enabled\r
+*/\r
+void OCCViewer_ViewWindow::enablePreselection( bool theIsToEnable )\r
+{\r
+ onSwitchPreselection( theIsToEnable );\r
+}\r
+\r
+/*!\r
+ \brief Indicates whether selection is enabled\r
+ \return true if selection is enabled\r
+*/\r
+bool OCCViewer_ViewWindow::isSelectionEnabled() const\r
+{\r
+ return mySelectionEnabled;\r
+}\r
+\r
+/*!\r
+ \brief Enables/disables selection\r
+ \param theIsToEnable if true - selection will be enabled\r
+*/\r
+void OCCViewer_ViewWindow::enableSelection( bool theIsToEnable )\r
+{\r
+ onSwitchSelection( theIsToEnable );\r
+}\r
+\r
+\r
+/*!\r
+ \brief called if clipping operation is activated / deactivated.\r
+\r
+ Enables/disables clipping plane displaying.\r
+\r
+ \parma on action state\r
+*/\r
+void OCCViewer_ViewWindow::onClipping (bool theIsOn)\r
+{\r
+ if(!myModel) return;\r
+ OCCViewer_ClippingDlg* aClippingDlg = myModel->getClippingDlg();\r
+ \r
+ if (theIsOn) {\r
+ if (!aClippingDlg) {\r
+ aClippingDlg = new OCCViewer_ClippingDlg (this, myModel);\r
+ myModel->setClippingDlg(aClippingDlg);\r
+ }\r
+ if (!aClippingDlg->isVisible())\r
+ aClippingDlg->show();\r
+ } else {\r
+ if ( aClippingDlg ) {\r
+ aClippingDlg->close();\r
+ myModel->setClippingDlg(0);\r
+ }\r
+ }\r
+\r
+ SUIT_ViewManager* mgr = getViewManager();\r
+ if( mgr ) {\r
+ QVector<SUIT_ViewWindow*> aViews = mgr->getViews();\r
+ for(int i = 0, iEnd = aViews.size(); i < iEnd; i++) {\r
+ if(SUIT_ViewWindow* aViewWindow = aViews.at(i)) {\r
+ QtxActionToolMgr* mgr = aViewWindow->toolMgr();\r
+ if(!mgr) continue;\r
+ QAction* a = toolMgr()->action( ClippingId );\r
+ if(!a) continue;\r
+ if(theIsOn != a->isChecked()){\r
+ disconnect (a, SIGNAL (toggled (bool)), aViewWindow, SLOT (onClipping (bool)));\r
+ a->setChecked(theIsOn);\r
+ connect (a, SIGNAL (toggled (bool)), aViewWindow, SLOT (onClipping (bool)));\r
+ }\r
+ }\r
+ }\r
+ }\r
+}\r
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
#include "SUIT_ViewWindow.h"
#include <gp_Pnt.hxx>
#include <V3d_Plane.hxx>
+#include <TopAbs_ShapeEnum.hxx>
class QtxRectRubberBand;
class SUIT_Desktop;
struct viewAspect
{
public:
- double scale;
- double centerX;
- double centerY;
- double projX;
- double projY;
- double projZ;
- double twist;
- double atX;
- double atY;
- double atZ;
- double eyeX;
- double eyeY;
- double eyeZ;
- double scaleX;
- double scaleY;
- double scaleZ;
- QString name;
- bool isVisible;
- double size;
- // graduated trihedron
- bool gtIsVisible;
- bool gtDrawNameX;
- bool gtDrawNameY;
- bool gtDrawNameZ;
- QString gtNameX;
- QString gtNameY;
- QString gtNameZ;
- int gtNameColorRX;
- int gtNameColorGX;
- int gtNameColorBX;
- int gtNameColorRY;
- int gtNameColorGY;
- int gtNameColorBY;
- int gtNameColorRZ;
- int gtNameColorGZ;
- int gtNameColorBZ;
- bool gtDrawValuesX;
- bool gtDrawValuesY;
- bool gtDrawValuesZ;
- int gtNbValuesX;
- int gtNbValuesY;
- int gtNbValuesZ;
- int gtOffsetX;
- int gtOffsetY;
- int gtOffsetZ;
- int gtColorRX;
- int gtColorGX;
- int gtColorBX;
- int gtColorRY;
- int gtColorGY;
- int gtColorBY;
- int gtColorRZ;
- int gtColorGZ;
- int gtColorBZ;
- bool gtDrawTickmarksX;
- bool gtDrawTickmarksY;
- bool gtDrawTickmarksZ;
- int gtTickmarkLengthX;
- int gtTickmarkLengthY;
- int gtTickmarkLengthZ;
+ double scale;
+ double centerX; // deprecated since OCCT 6.7.1
+ double centerY; // deprecated since OCCT 6.7.1
+ double projX;
+ double projY;
+ double projZ;
+ double twist;
+ double atX;
+ double atY;
+ double atZ;
+ double eyeX;
+ double eyeY;
+ double eyeZ;
+ double scaleX;
+ double scaleY;
+ double scaleZ;
+ QString name;
+ bool isVisible;
+ double size;
+ // graduated trihedron
+ bool gtIsVisible;
+ bool gtDrawNameX;
+ bool gtDrawNameY;
+ bool gtDrawNameZ;
+ QString gtNameX;
+ QString gtNameY;
+ QString gtNameZ;
+ int gtNameColorRX;
+ int gtNameColorGX;
+ int gtNameColorBX;
+ int gtNameColorRY;
+ int gtNameColorGY;
+ int gtNameColorBY;
+ int gtNameColorRZ;
+ int gtNameColorGZ;
+ int gtNameColorBZ;
+ bool gtDrawValuesX;
+ bool gtDrawValuesY;
+ bool gtDrawValuesZ;
+ int gtNbValuesX;
+ int gtNbValuesY;
+ int gtNbValuesZ;
+ int gtOffsetX;
+ int gtOffsetY;
+ int gtOffsetZ;
+ int gtColorRX;
+ int gtColorGX;
+ int gtColorBX;
+ int gtColorRY;
+ int gtColorGY;
+ int gtColorBY;
+ int gtColorRZ;
+ int gtColorGZ;
+ int gtColorBZ;
+ bool gtDrawTickmarksX;
+ bool gtDrawTickmarksY;
+ bool gtDrawTickmarksZ;
+ int gtTickmarkLengthX;
+ int gtTickmarkLengthY;
+ int gtTickmarkLengthZ;
+
+public:
+ viewAspect()
+ : scale( 0.0 ),
+ centerX( 0.0 ), centerY( 0.0 ),
+ projX( 0.0 ), projY( 0.0 ), projZ( 0.0 ),
+ twist( 0.0 ),
+ atX( 0.0 ), atY( 0.0 ), atZ( 0.0 ),
+ eyeX( 0.0 ), eyeY( 0.0 ), eyeZ( 0.0 ),
+ scaleX( 0.0 ), scaleY( 0.0 ), scaleZ( 0.0 ),
+ name(),
+ isVisible( false ),
+ size( 0.0 ),
+ gtIsVisible( false ),
+ gtDrawNameX( false ), gtDrawNameY( false ), gtDrawNameZ( false ),
+ gtNameX(), gtNameY(), gtNameZ(),
+ gtNameColorRX( 0 ), gtNameColorGX( 0 ), gtNameColorBX( 0 ),
+ gtNameColorRY( 0 ), gtNameColorGY( 0 ), gtNameColorBY( 0 ),
+ gtNameColorRZ( 0 ), gtNameColorGZ( 0 ), gtNameColorBZ( 0 ),
+ gtDrawValuesX( false ), gtDrawValuesY( false ), gtDrawValuesZ( false ),
+ gtNbValuesX( 0 ), gtNbValuesY( 0 ), gtNbValuesZ( 0 ),
+ gtOffsetX( 0 ), gtOffsetY( 0 ), gtOffsetZ( 0 ),
+ gtColorRX( 0 ), gtColorGX( 0 ), gtColorBX( 0 ),
+ gtColorRY( 0 ), gtColorGY( 0 ), gtColorBY( 0 ),
+ gtColorRZ( 0 ), gtColorGZ( 0 ), gtColorBZ( 0 ),
+ gtDrawTickmarksX( false ), gtDrawTickmarksY( false ), gtDrawTickmarksZ( false ),
+ gtTickmarkLengthX( 0 ), gtTickmarkLengthY( 0 ), gtTickmarkLengthZ( 0 ) {}
};
typedef QList<viewAspect> viewAspectList;
virtual void activateSetRotationGravity();
virtual void activateSetRotationSelected( double theX, double theY, double theZ );
- virtual void activateStartPointSelection();
+ virtual void activateStartPointSelection( TopAbs_ShapeEnum );
virtual void updateGravityCoords();
virtual void showEvent( QShowEvent * );
--- /dev/null
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
+//
+// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#include "OCCViewer_ViewportInputFilter.h"
+#include "OCCViewer_ViewManager.h"
+#include "OCCViewer_ViewModel.h"
+#include "OCCViewer_ViewWindow.h"
+#include "OCCViewer_ViewPort3d.h"
+
+#include <QMouseEvent>
+#include <QKeyEvent>
+
+/*!
+ \brief Constructor.
+ \param theVM [in] the view manager to embed the filter into.
+ \param theParent [in] the parent object.
+*/
+OCCViewer_ViewportInputFilter::OCCViewer_ViewportInputFilter( OCCViewer_ViewManager* theVM,
+ QObject* theParent )
+: QObject( theParent ),
+ myVM( theVM )
+{
+}
+
+/*!
+ \brief Destructor.
+*/
+OCCViewer_ViewportInputFilter::~OCCViewer_ViewportInputFilter()
+{
+ setEnabled( false );
+}
+
+/*!
+ \brief Enables or disables event processing within the viewer.
+*/
+void OCCViewer_ViewportInputFilter::setEnabled(const bool theIsEnabled)
+{
+ if ( theIsEnabled == myIsEnabled )
+ {
+ return;
+ }
+
+ if ( theIsEnabled )
+ {
+ // install event filtering on viewer windows
+ myViewer = (OCCViewer_Viewer*) myVM->getViewModel();
+ if ( !myVM || !myViewer )
+ {
+ return;
+ }
+
+ connect( myVM, SIGNAL( viewCreated( SUIT_ViewWindow* ) ), SLOT( onViewCreated( SUIT_ViewWindow* ) ) );
+ connect( myVM, SIGNAL( deleteView ( SUIT_ViewWindow* ) ), SLOT( onViewRemoved( SUIT_ViewWindow* ) ) );
+
+ QVector<SUIT_ViewWindow*> aViews = myVM->getViews();
+ QVector<SUIT_ViewWindow*>::iterator aViewIt = aViews.begin();
+ for ( ; aViewIt != aViews.end(); ++aViewIt )
+ {
+ connectView( *aViewIt );
+ }
+ }
+ else
+ {
+ // remove event filtering from viewer windows
+ QVector<SUIT_ViewWindow*> aViews = myVM->getViews();
+ QVector<SUIT_ViewWindow*>::iterator aViewIt = aViews.begin();
+ for ( ; aViewIt != aViews.end(); ++aViewIt )
+ {
+ disconnectView( *aViewIt );
+ }
+ }
+
+ myIsEnabled = theIsEnabled;
+}
+
+/*!
+ \brief Base-level implementation of event filtering.
+ Routes user input events to associated implementation methods.
+ \param theObject [in] the filtered object.
+ \param theEvent [in] the incoming event.
+*/
+bool OCCViewer_ViewportInputFilter::eventFilter( QObject* theObject, QEvent* theEvent )
+{
+ OCCViewer_ViewPort3d* aViewPort = (OCCViewer_ViewPort3d*) theObject;
+
+ if ( !aViewPort )
+ {
+ return false;
+ }
+
+ switch ( theEvent->type() )
+ {
+ case QEvent::MouseMove : return mouseMove( (QMouseEvent*)theEvent, aViewPort );
+ case QEvent::MouseButtonPress : return mousePress( (QMouseEvent*)theEvent, aViewPort );
+ case QEvent::MouseButtonRelease : return mouseRelease( (QMouseEvent*)theEvent, aViewPort );
+ case QEvent::MouseButtonDblClick : return mouseDoubleClick( (QMouseEvent*)theEvent, aViewPort );
+ case QEvent::KeyPress : return keyPress( (QKeyEvent*)theEvent, aViewPort );
+ case QEvent::KeyRelease : return keyRelease( (QKeyEvent*)theEvent, aViewPort );
+ default :
+ return false;
+ }
+}
+
+/*!
+ \brief Connects view to event processing.
+ \param theView [in] the view to connect.
+*/
+void OCCViewer_ViewportInputFilter::connectView( SUIT_ViewWindow* theView )
+{
+ ( (OCCViewer_ViewWindow*) theView )->getViewPort()->installEventFilter( this );
+}
+
+/*!
+ \brief Disconnects view to event processing.
+ \param theView [in] the view to disconnect.
+*/
+void OCCViewer_ViewportInputFilter::disconnectView( SUIT_ViewWindow* theView )
+{
+ ( (OCCViewer_ViewWindow*) theView )->getViewPort()->removeEventFilter( this );
+}
+
+/*!
+ \brief Connects newly created within viewer to event processing.
+ \param theView [in] the view to connect.
+*/
+void OCCViewer_ViewportInputFilter::onViewCreated( SUIT_ViewWindow* theView )
+{
+ connectView( theView );
+}
+
+/*!
+ \brief Disconnects view being removed from viewer.
+ \param theView [in] the view to disconnect.
+*/
+void OCCViewer_ViewportInputFilter::onViewRemoved( SUIT_ViewWindow* theView )
+{
+ disconnectView( theView );
+}
--- /dev/null
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
+//
+// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#ifndef OCCVIEWER_VIEWPORTINPUTFILTER_H
+#define OCCVIEWER_VIEWPORTINPUTFILTER_H
+
+#include <QObject>
+
+class OCCViewer_ViewManager;
+class OCCViewer_ViewPort3d;
+class OCCViewer_Viewer;
+class SUIT_ViewWindow;
+class QMouseEvent;
+class QKeyEvent;
+
+/*!
+ \class OCCViewer_ViewportInputFilter.
+ \brief The user input filter of OCC viewports. The class can be used
+ to introduce custom interactive operations in OCC viewer,
+ e.g. manipulating IO. The filter receives events in priority
+ to the viewport itself and can bypass some events if it provides
+ custom handling.
+
+ This class is abstract and required implementation of custom reaction
+ on hooked viewport events. The role of the code behind this class
+ is to properly embed the event filter into OCC viewer's structure.
+*/
+class OCCViewer_ViewportInputFilter : public QObject
+{
+ Q_OBJECT
+
+public:
+ OCCViewer_ViewportInputFilter( OCCViewer_ViewManager*, QObject* );
+ ~OCCViewer_ViewportInputFilter();
+
+public:
+ virtual void setEnabled( const bool );
+
+protected:
+ virtual bool mouseMove( QMouseEvent*, OCCViewer_ViewPort3d* ) = 0;
+ virtual bool mousePress( QMouseEvent*, OCCViewer_ViewPort3d* ) = 0;
+ virtual bool mouseRelease( QMouseEvent*, OCCViewer_ViewPort3d* ) = 0;
+ virtual bool mouseDoubleClick( QMouseEvent*, OCCViewer_ViewPort3d* ) = 0;
+ virtual bool keyPress( QKeyEvent*, OCCViewer_ViewPort3d* ) = 0;
+ virtual bool keyRelease( QKeyEvent*, OCCViewer_ViewPort3d* ) = 0;
+
+protected:
+ void connectView( SUIT_ViewWindow* );
+ void disconnectView( SUIT_ViewWindow* );
+
+protected:
+ bool eventFilter( QObject*, QEvent* );
+
+protected slots:
+ void onViewCreated( SUIT_ViewWindow* );
+ void onViewRemoved( SUIT_ViewWindow* );
+
+protected:
+ OCCViewer_ViewManager* myVM;
+ OCCViewer_Viewer* myViewer;
+ bool myIsEnabled;
+};
+
+#endif
</message>
<message>
<source>LBL_SELECTPOINT</source>
- <translation>Select Point from View</translation>
+ <translation>Gravity Center of Select Object</translation>
+ </message>
+ <message>
+ <source>LBL_POINT</source>
+ <translation>Point</translation>
+ </message>
+ <message>
+ <source>LBL_EDGE</source>
+ <translation>Edge</translation>
+ </message>
+ <message>
+ <source>LBL_FACE</source>
+ <translation>Face</translation>
+ </message>
+ <message>
+ <source>LBL_SOLID</source>
+ <translation>Solid</translation>
</message>
</context>
<context>
</message>
<message>
<source>LBL_SELECTPOINT</source>
- <translation>Choisir le point dans la vue</translation>
+ <translation>Сentre de gravité des objets sélectionnés</translation>
+ </message>
+ <message>
+ <source>LBL_POINT</source>
+ <translation>Point</translation>
+ </message>
+ <message>
+ <source>LBL_EDGE</source>
+ <translation>Arête</translation>
+ </message>
+ <message>
+ <source>LBL_FACE</source>
+ <translation>Face</translation>
+ </message>
+ <message>
+ <source>LBL_SOLID</source>
+ <translation>Solide</translation>
</message>
</context>
<context>
-# Copyright (C) 2012-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2012-2014 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.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-# Copyright (C) 2012-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2012-2014 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.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-# Copyright (C) 2012-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2012-2014 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.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
INCLUDE_DIRECTORIES(
${QT_INCLUDES}
${QWT_INCLUDE_DIR}
+ ${PYTHON_INCLUDE_DIRS}
${PROJECT_SOURCE_DIR}/src/Qtx
${PROJECT_SOURCE_DIR}/src/SUIT
)
-IF(SALOME_USE_PYCONSOLE)
- INCLUDE_DIRECTORIES(${PYTHON_INCLUDE_DIRS})
-ENDIF()
# additional preprocessor / compiler flags
ADD_DEFINITIONS(${QT_DEFINITIONS} ${QWT_DEFINITIONS} ${PYTHON_DEFINITIONS})
-IF(SALOME_USE_PYCONSOLE)
- ADD_DEFINITIONS(${PYTHON_DEFINITIONS})
-ENDIF()
# libraries to link to
-SET(_link_LIBRARIES ${QT_LIBRARIES} ${QWT_LIBRARY} qtx suit)
-IF(SALOME_USE_PYCONSOLE)
- LIST(APPEND _link_LIBRARIES ${PYTHON_LIBRARIES})
-ENDIF()
+SET(_link_LIBRARIES ${QT_LIBRARIES} ${QWT_LIBRARY} ${PYTHON_LIBRARIES} qtx suit)
# --- headers ---
Plot2d_ViewManager.h
Plot2d_ViewModel.h
Plot2d_ViewWindow.h
-)
-IF(SALOME_USE_PYCONSOLE)
- LIST(APPEND _moc_HEADERS
- Plot2d_AnalyticalCurveDlg.h
+ Plot2d_AnalyticalCurveDlg.h
)
-ENDIF()
# header files / no moc processing
SET(_other_HEADERS
Plot2d_Object.h
Plot2d_PlotItems.h
Plot2d_Prs.h
-)
-IF(SALOME_USE_PYCONSOLE)
- LIST(APPEND _other_HEADERS
- Plot2d_AnalyticalCurve.h
- Plot2d_AnalyticalParser.h
+ Plot2d_AnalyticalCurve.h
+ Plot2d_AnalyticalParser.h
)
-ENDIF()
# header files / to install
SET(Plot2d_HEADERS ${_moc_HEADERS} ${_other_HEADERS})
Plot2d_ViewManager.cxx
Plot2d_ViewModel.cxx
Plot2d_ViewWindow.cxx
-)
-IF(SALOME_USE_PYCONSOLE)
- LIST(APPEND _other_SOURCES
- Plot2d_AnalyticalCurve.cxx
- Plot2d_AnalyticalCurveDlg.cxx
- Plot2d_AnalyticalParser.cxx
+ Plot2d_AnalyticalCurve.cxx
+ Plot2d_AnalyticalCurveDlg.cxx
+ Plot2d_AnalyticalParser.cxx
)
-ENDIF()
# sources / to compile
SET(Plot2d_SOURCES ${_other_SOURCES} ${_moc_SOURCES})
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
*/
void Plot2d_ViewFrame::onAnalyticalCurve()
{
-#ifndef DISABLE_PYCONSOLE
Plot2d_AnalyticalCurveDlg dlg( this, this );
dlg.exec();
updateAnalyticalCurves();
-#endif
}
void Plot2d_ViewFrame::addAnalyticalCurve( Plot2d_AnalyticalCurve* theCurve)
{
-#ifndef DISABLE_PYCONSOLE
- myAnalyticalCurves.append(theCurve);
-#endif
+ myAnalyticalCurves.append(theCurve);
}
void Plot2d_ViewFrame::removeAnalyticalCurve( Plot2d_AnalyticalCurve* theCurve)
{
-#ifndef DISABLE_PYCONSOLE
- theCurve->setAction(Plot2d_AnalyticalCurve::ActRemoveFromView);
-#endif
+ theCurve->setAction(Plot2d_AnalyticalCurve::ActRemoveFromView);
}
/*
*/
void Plot2d_ViewFrame::updateAnalyticalCurve(Plot2d_AnalyticalCurve* c, bool updateView)
{
-#ifndef DISABLE_PYCONSOLE
if(!c) return;
QwtScaleDiv div = myPlot->axisScaleDiv(QwtPlot::xBottom);
c->setRangeBegin(div.lowerBound());
if(updateView)
myPlot->replot();
-#endif
}
/*
*/
void Plot2d_ViewFrame::updateAnalyticalCurves()
{
-#ifndef DISABLE_PYCONSOLE
AnalyticalCurveList::iterator it = myAnalyticalCurves.begin();
for( ; it != myAnalyticalCurves.end(); it++) {
updateAnalyticalCurve(*it);
}
myPlot->replot();
-#endif
}
/*!
Get analytical curve by plot item.
*/
Plot2d_AnalyticalCurve* Plot2d_ViewFrame::getAnalyticalCurve(QwtPlotItem * theItem) {
-#ifndef DISABLE_PYCONSOLE
AnalyticalCurveList::iterator it = myAnalyticalCurves.begin();
for( ; it != myAnalyticalCurves.end(); it++) {
if((*it)->plotItem() == theItem);
return (*it);
}
return 0;
-#endif
}
#endif
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
mgr->registerAction( aAction, CurvSettingsId );
// 9. Analytical curves
-#ifndef DISABLE_PYCONSOLE
aAction = new QtxAction( tr( "TOT_PLOT2D_ANALYTICAL_CURVES" ),
aResMgr->loadPixmap( "Plot2d", tr( "ICON_PLOT2D_ANALYTICAL_CURVES" ) ),
tr( "MEN_PLOT2D_ANALYTICAL_CURVES" ),
aAction->setStatusTip( tr( "PRP_PLOT2D_ANALYTICAL_CURVES" ) );
connect( aAction, SIGNAL( triggered( bool ) ), myViewFrame, SLOT( onAnalyticalCurve() ) );
mgr->registerAction( aAction, AnalyticalCurveId );
-#endif
// 10. Clone
aAction = new QtxAction( tr( "MNU_CLONE_VIEW" ),
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-# Copyright (C) 2012-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2012-2014 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.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-# Copyright (C) 2012-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2012-2014 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.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-# Copyright (C) 2012-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2012-2014 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.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-# Copyright (C) 2012-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2012-2014 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.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-# Copyright (C) 2012-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2012-2014 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.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
QtxDockAction.h
QtxDockWidget.h
QtxDoubleSpinBox.h
+ QtxDoubleSpinSlider.h
QtxFontEdit.h
QtxGridBox.h
QtxGroupBox.h
QtxIntSpinBox.h
+ QtxIntSpinSlider.h
QtxListAction.h
QtxLogoMgr.h
QtxMRUAction.h
QtxRubberBand.h
QtxSearchTool.h
QtxShortcutEdit.h
+ QtxSlider.h
QtxSplash.h
QtxToolBar.h
QtxToolTip.h
QtxDockAction.cxx
QtxDockWidget.cxx
QtxDoubleSpinBox.cxx
+ QtxDoubleSpinSlider.cxx
QtxEvalExpr.cxx
QtxFontEdit.cxx
QtxGridBox.cxx
QtxGroupBox.cxx
QtxIntSpinBox.cxx
+ QtxIntSpinSlider.cxx
QtxListAction.cxx
QtxLogoMgr.cxx
QtxMRUAction.cxx
QtxRubberBand.cxx
QtxSearchTool.cxx
QtxShortcutEdit.cxx
+ QtxSlider.cxx
QtxSplash.cxx
QtxToolBar.cxx
QtxToolTip.cxx
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
--- /dev/null
+// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+//
+// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+// File : QtxDoubleSpinSlider.cxx
+// Author : Maxim GLIBIN, OpenCASCADE S.A.S. (maxim.glibin@opencascade.com)
+
+#include "QtxDoubleSpinSlider.h"
+
+/*!
+ * CONSTRUCTOR of double spin box
+ */
+QtxDoubleSpinSlider::QtxDoubleSpinSlider( QWidget* theParent ) : QtxSlider( theParent )
+{
+ // Get default value of slider
+ double aMin = mySlider->minimum() / 100.;
+ double aMax = mySlider->maximum() / 100.;
+ double aStep = mySlider->singleStep() / 100.;
+
+ // Create double spin box
+ myDoubleSpinBox = new QtxDoubleSpinBox( aMin, aMax, aStep, theParent );
+ myDoubleSpinBox->setFixedWidth( 100 );
+
+ // Add widget in main layout
+ mainLayout->addWidget( myDoubleSpinBox );
+
+ // Signals and slots connections
+ connect( myDoubleSpinBox, SIGNAL(valueChanged( double )), this, SLOT(DoubleSpinHasChanged( double )) );
+ connect( this, SIGNAL(valueUpdated( int )), this, SLOT(setValue( int )) );
+}
+
+QtxDoubleSpinSlider::QtxDoubleSpinSlider( double theMin, double theMax, double theStep, QWidget* theParent ) : QtxSlider( theParent )
+{
+ // Set value of slider
+ mySlider->setRange( int(theMin*100), int(theMax*100) );
+ mySlider->setSingleStep( int(theStep*100) );
+
+ // Create double spin box
+ myDoubleSpinBox = new QtxDoubleSpinBox( theMin, theMax, theStep, theParent );
+ myDoubleSpinBox->setFixedWidth( 100 );
+
+ // Add widget in main layout
+ mainLayout->addWidget( myDoubleSpinBox );
+
+ // Signals and slots connections
+ connect( myDoubleSpinBox, SIGNAL(valueChanged( double )), this, SLOT(DoubleSpinHasChanged( double )) );
+ connect( this, SIGNAL(valueUpdated( int )), this, SLOT(setValue( int )) );
+}
+
+/*!
+ * DESTRUCTOR of double spin box
+ */
+QtxDoubleSpinSlider::~QtxDoubleSpinSlider()
+{
+ // Empty
+}
+
+/*!
+ SLOT: Called when the value of double spin box
+*/
+void QtxDoubleSpinSlider::DoubleSpinHasChanged( double theValue )
+{
+
+ int aNewValue = int( theValue * 100 );
+ mySlider->blockSignals( true );
+ mySlider->setValue( aNewValue );
+ mySlider->blockSignals( false );
+ emit valueChanged( theValue );
+}
+
+/*!
+ * Get font currently set for the double spin box
+*/
+QFont QtxDoubleSpinSlider::font()
+{
+ return myDoubleSpinBox->font();
+}
+
+/*!
+ * Set font currently set for the double spin box
+*/
+void QtxDoubleSpinSlider::setFont( QFont& theFont )
+{
+ myDoubleSpinBox->setFont( theFont );
+}
+
+/*!
+ * Get value in double spin box
+*/
+double QtxDoubleSpinSlider::value()
+{
+ return myDoubleSpinBox->value();
+}
+
+/*!
+ * Set value in double spin box
+*/
+void QtxDoubleSpinSlider::setValue( double theValue )
+{
+ myDoubleSpinBox->setValue( theValue );
+}
+
+/*!
+ * Set value in double spin box
+*/
+void QtxDoubleSpinSlider::setValue( int theValue )
+{
+ double aNewValue = theValue / 100.;
+ this->setValue( aNewValue );
+}
+
+/*!
+ * Set precision of double spin box
+*/
+void QtxDoubleSpinSlider::setPrecision( int thePrecision )
+{
+ myDoubleSpinBox->setPrecision( thePrecision );
+}
+
+/*!
+ * Get precision of double spin box
+*/
+int QtxDoubleSpinSlider::precision()
+{
+ return myDoubleSpinBox->getPrecision();
+}
+
+void QtxDoubleSpinSlider::setUnit( QString& theUnit )
+{
+ myDoubleSpinBox->setSuffix( theUnit );
+}
--- /dev/null
+// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+//
+// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+// File : QtxDoubleSpinSlider.h
+// Author : Maxim GLIBIN, OpenCASCADE S.A.S. (maxim.glibin@opencascade.com)
+
+
+#ifndef QTXDOUBLESPINSLIDER_H
+#define QTXDOUBLESPINSLIDER_H
+
+#include "Qtx.h"
+#include "QtxDoubleSpinBox.h"
+#include "QtxSlider.h"
+
+
+class QTX_EXPORT QtxDoubleSpinSlider : public QtxSlider
+{
+ Q_OBJECT
+public:
+ QtxDoubleSpinSlider( QWidget* = 0 );
+ QtxDoubleSpinSlider( double, double, double, QWidget* = 0 );
+ virtual ~QtxDoubleSpinSlider();
+
+ QFont font();
+ void setFont( QFont& );
+
+ double value();
+ void setValue( double );
+
+ void setPrecision( int );
+ int precision();
+
+ void setUnit( QString& );
+
+public slots:
+ void setValue( int );
+
+private slots:
+ void DoubleSpinHasChanged( double );
+
+signals:
+ void valueChanged( double );
+
+private:
+ QtxDoubleSpinBox* myDoubleSpinBox;
+};
+
+#endif /* QTXDOUBLESPINSLIDER_H */
+
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
--- /dev/null
+// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+//
+// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+// File : QtxIntSpinSlider.cxx
+// Author : Maxim GLIBIN, OpenCASCADE S.A.S. (maxim.glibin@opencascade.com)
+
+#include "QtxIntSpinSlider.h"
+
+/*!
+ * CONSTRUCTOR of spin box
+ */
+QtxIntSpinSlider::QtxIntSpinSlider( QWidget* theParent ) : QtxSlider( theParent )
+{
+ // Get default value of slider
+ int aMin = mySlider->minimum();
+ int aMax = mySlider->maximum();
+ int aStep = mySlider->singleStep();
+
+ // Create spin box
+ myIntSpinBox = new QtxIntSpinBox( aMin, aMax, aStep, theParent );
+ myIntSpinBox->setFixedWidth( 100 );
+
+ // Add widget in main layout
+ mainLayout->addWidget( myIntSpinBox );
+
+ // Signals and slots connections
+ connect( myIntSpinBox, SIGNAL(valueChanged( int )), this, SLOT(IntSpinHasChanged( int )) );
+ connect( this, SIGNAL(valueUpdated( int )), this, SLOT(setValue( int )) );
+}
+
+QtxIntSpinSlider::QtxIntSpinSlider( int theMin, int theMax, int theStep, QWidget* theParent )
+{
+ // Set value of slider
+ mySlider->setRange( theMin, theMax );
+ mySlider->setSingleStep( theStep );
+
+ // Create spin box
+ myIntSpinBox = new QtxIntSpinBox( theMin, theMax, theStep, theParent );
+ myIntSpinBox->setFixedWidth( 100 );
+
+ // Add widgets in main layout
+ mainLayout->addWidget( myIntSpinBox );
+
+ // Signals and slots connections
+ connect( myIntSpinBox, SIGNAL(valueChanged( int )), this, SLOT(IntSpinHasChanged( int )) );
+ connect( this, SIGNAL(valueUpdated( int )), this, SLOT(setValue( int )) );
+}
+
+/*!
+ * DESTRUCTOR of spin box
+ */
+QtxIntSpinSlider::~QtxIntSpinSlider()
+{
+ // Empty
+}
+
+/*!
+ SLOT: Called when the value of spin box change
+*/
+void QtxIntSpinSlider::IntSpinHasChanged( int theValue )
+{
+ mySlider->blockSignals( true );
+ mySlider->setValue( theValue );
+ mySlider->blockSignals( false );
+ emit valueChanged( theValue );
+}
+
+/*!
+ * Get font of spin box
+*/
+QFont QtxIntSpinSlider::font()
+{
+ return myIntSpinBox->font();
+}
+
+/*!
+ * Set font of spin box
+*/
+void QtxIntSpinSlider::setFont( QFont& theFont )
+{
+ myIntSpinBox->setFont( theFont );
+}
+
+/*!
+ * Get value of spin box
+*/
+int QtxIntSpinSlider::value()
+{
+ return myIntSpinBox->value();
+}
+
+/*!
+ * Set value of spin box
+*/
+void QtxIntSpinSlider::setValue( int theValue )
+{
+ myIntSpinBox->setValue( theValue );
+}
+
+void QtxIntSpinSlider::setUnit( QString& theUnit )
+{
+ myIntSpinBox->setSuffix( theUnit );
+}
--- /dev/null
+// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+//
+// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+// File : QtxIntSpinSlider.h
+// Author : Maxim GLIBIN, OpenCASCADE S.A.S. (maxim.glibin@opencascade.com)
+
+
+#ifndef QTXINTSPINSLIDER_H
+#define QTXINTSPINSLIDER_H
+
+#include "Qtx.h"
+#include "QtxIntSpinBox.h"
+#include "QtxSlider.h"
+
+
+class QTX_EXPORT QtxIntSpinSlider : public QtxSlider
+{
+ Q_OBJECT
+public:
+ QtxIntSpinSlider( QWidget* = 0 );
+ QtxIntSpinSlider( int, int, int, QWidget* = 0 );
+ virtual ~QtxIntSpinSlider();
+
+ QFont font();
+ void setFont( QFont& );
+
+ int value();
+
+ void setUnit( QString& );
+
+public slots:
+ void setValue( int );
+
+signals:
+ void valueChanged( int );
+
+private slots:
+ void IntSpinHasChanged( int );
+
+private:
+ QtxIntSpinBox* myIntSpinBox;
+};
+
+#endif /* QTXINTSPINSLIDER_H */
+
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
--- /dev/null
+// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+//
+// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+// File : QtxSlider.cxx
+// Author : Maxim GLIBIN, OpenCASCADE S.A.S. (maxim.glibin@opencascade.com)
+
+#include "QtxSlider.h"
+
+/*!
+ * CONSTRUCTOR of slider
+ */
+QtxSlider::QtxSlider( QWidget* theParent ) : QWidget( theParent )
+{
+ // Create slider
+ mySlider = new QSlider( Qt::Horizontal, theParent );
+ mySlider->setFocusPolicy( Qt::NoFocus );
+ mySlider->setMinimumSize( 250, 0 );
+ mySlider->setTracking( false );
+
+ // Add widgets in main layout
+ mainLayout = new QHBoxLayout();
+ mainLayout->addWidget( mySlider );
+ mainLayout->setContentsMargins( 0, 0, 0, 0 );
+ this->setLayout( mainLayout );
+
+ // Signals and slots connections
+ connect( mySlider, SIGNAL(sliderMoved( int )), this, SLOT(SliderHasMoved( int )) );
+ connect( mySlider, SIGNAL(valueChanged( int )), this, SLOT(SliderHasMoved( int )) );
+}
+
+QtxSlider::QtxSlider( int theMin, int theMax, int theStep, QWidget* theParent ) : QWidget( theParent )
+{
+ // Create slider
+ mySlider = new QSlider( Qt::Horizontal, theParent );
+ mySlider->setFocusPolicy( Qt::NoFocus );
+ mySlider->setMinimumSize( 200, 0 );
+ mySlider->setRange( theMin, theMax );
+ mySlider->setSingleStep( theStep );
+ mySlider->setPageStep( 10 );
+ mySlider->setTracking( false );
+
+ // Add widgets in main layout
+ mainLayout = new QHBoxLayout();
+ mainLayout->addWidget( mySlider );
+ mainLayout->setContentsMargins( 0, 0, 0, 0 );
+ this->setLayout( mainLayout );
+
+ // Signals and slots connections
+ connect( mySlider, SIGNAL(sliderMoved( int )), this, SLOT(SliderHasMoved( int )) );
+ connect( mySlider, SIGNAL(valueChanged( int )), this, SLOT(SliderHasMoved( int )) );
+}
+
+/*!
+ * DESTRUCTOR of slider
+ */
+QtxSlider::~QtxSlider()
+{
+ // Empty
+}
+
+/*!
+ SLOT: Called when the value of slider change
+*/
+void QtxSlider::SliderHasMoved( int theValue )
+{
+ emit valueUpdated( theValue );
+}
+
+/*!
+ * Get value of slider
+*/
+int QtxSlider::value()
+{
+ return mySlider->value();
+}
+
+/*!
+ * Set value of slider
+*/
+void QtxSlider::setValue( int theValue )
+{
+ mySlider->setValue( theValue );
+}
+
+/*!
+ * Set range of slider
+*/
+void QtxSlider::setRange( int theMin, int theMax )
+{
+ mySlider->setRange( theMin, theMax );
+}
+
+/*!
+ * Set single step of slider
+*/
+void QtxSlider::setSingleStep( int theStep )
+{
+ mySlider->setSingleStep( theStep );
+}
--- /dev/null
+// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+//
+// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+// File : QtxSlider.h
+// Author : Maxim GLIBIN, OpenCASCADE S.A.S. (maxim.glibin@opencascade.com)
+
+
+#ifndef QTXSLIDER_H
+#define QTXSLIDER_H
+
+#include <QWidget>
+#include <QHBoxLayout>
+#include <QSlider>
+
+#include "Qtx.h"
+
+
+class QTX_EXPORT QtxSlider : public QWidget
+{
+ Q_OBJECT
+public:
+ QtxSlider( QWidget* = 0 );
+ QtxSlider( int, int, int, QWidget* = 0 );
+ virtual ~QtxSlider();
+
+ void setValue( int );
+ int value();
+
+ void setRange( int, int );
+
+ void setSingleStep( int );
+
+private slots:
+ void SliderHasMoved( int );
+
+signals:
+ void valueUpdated( int );
+
+protected:
+ QHBoxLayout* mainLayout;
+ QSlider* mySlider;
+};
+
+#endif /* QTXSLIDER_H */
+
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-# Copyright (C) 2012-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2012-2014 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.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-# Copyright (C) 2012-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2012-2014 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.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-# Copyright (C) 2012-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2012-2014 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.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-# Copyright (C) 2012-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2012-2014 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.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
#
ADD_SUBDIRECTORY(SALOME_PYQT_GUILight)
-ADD_SUBDIRECTORY(SalomePyQt)
+IF(SALOME_USE_PLOT2DVIEWER)
+ ADD_SUBDIRECTORY(SalomePyQt)
+ENDIF()
IF(NOT SALOME_LIGHT_ONLY)
ADD_SUBDIRECTORY(SALOME_PYQT_GUI)
ENDIF(NOT SALOME_LIGHT_ONLY)
-# Copyright (C) 2012-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2012-2014 CEA/DEN, EDF R&D, OPEN CASCADE
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
-
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-INCLUDE(${VTK_USE_FILE})
+IF(SALOME_USE_VTKVIEWER)
+ INCLUDE(${VTK_USE_FILE})
+ENDIF()
# --- options ---
# additional preprocessor / compiler flags
ADD_DEFINITIONS(
- "-DCALL_OLD_METHODS"
${QT_DEFINITIONS}
${CAS_DEFINITIONS}
${PYTHON_DEFINITIONS}
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-# Copyright (C) 2012-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2012-2014 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.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
#
INCLUDE(UsePyQt4)
-INCLUDE(${VTK_USE_FILE})
+IF(SALOME_USE_VTKVIEWER)
+ INCLUDE(${VTK_USE_FILE})
+ENDIF()
# --- options ---
${PROJECT_SOURCE_DIR}/src/STD
${PROJECT_SOURCE_DIR}/src/SUIT
${PROJECT_SOURCE_DIR}/src/SUITApp
+ ${PROJECT_SOURCE_DIR}/src/ObjBrowser
)
# additional preprocessor / compiler flags
ADD_DEFINITIONS(
- "-DCALL_OLD_METHODS"
${QT_DEFINITIONS}
${CAS_DEFINITIONS}
${PYTHON_DEFINITIONS}
)
-IF(SALOME_LIGHT_ONLY)
- ADD_DEFINITIONS("-DGUI_DISABLE_CORBA")
-ENDIF()
# libraries to link to
SET(_link_LIBRARIES
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
#include "CAM_Application.h"
#include "SUITApp_init_python.hxx"
#include "SUIT_DataObjectIterator.h"
-
+#include "LightApp_Application.h"
+#include "SUIT_DataBrowser.h"
#include "sipAPISalomePyQtGUILight.h"
#ifndef GUI_DISABLE_CORBA
// ... then call helper
myHelper->initialize( app );
+ SUIT_DataBrowser* ob = getApp()->objectBrowser();
+ if (ob && ob->model()) {
+ connect( ob->model(), SIGNAL( clicked( SUIT_DataObject*, int ) ),
+ myHelper, SLOT( onObjectBrowserClicked( SUIT_DataObject*, int ) ), Qt::UniqueConnection );
+ }
}
/*!
return color;
}
+void SALOME_PYQT_ModuleLight::setObjectPosition( const QString& theEntry, int thePos )
+{
+ SALOME_PYQT_DataObjectLight* dataObj = findObject( theEntry );
+ if ( dataObj )
+ dataObj->setPosition(thePos);
+}
+
+int SALOME_PYQT_ModuleLight::getObjectPosition( const QString& theEntry )
+{
+ SALOME_PYQT_DataObjectLight* dataObj = findObject( theEntry );
+ if ( dataObj )
+ return dataObj->position();
+ return -1;
+}
+
+
/*!
\brief Set reference to another data object
\param entry data object entry
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
void removeObject( const QString& );
void removeChildren( const QString& );
+ void setObjectPosition( const QString&, int );
+ int getObjectPosition( const QString& );
+
QStringList getChildren( const QString&, const bool = false ) const;
protected:
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
etc. is blocked.
CALL_OLD_METHODS macro can be defined, for example, by adding
- -DCALL_OLD_METHODS compilation option to the Makefile.
+ -DCALL_OLD_METHODS compilation option to the CMakeLists.txt.
*/
#ifdef CALL_OLD_METHODS
const bool IsCallOldMethods = true;
Qt::UniqueConnection );
}
}
+
+
+
+void PyModuleHelper::internalOBClickedPython( const QString& theObj, int theColumn)
+{
+ FuncMsg fmsg( "--- PyModuleHelper::internalOBClickedPython()" );
+
+ // Python interpreter should be initialized and Python module should be
+ // import first
+ if ( !myInterp || !myPyModule )
+ return; // Error
+
+ if ( PyObject_HasAttrString( myPyModule, (char*)"onObjectBrowserClicked" ) ) {
+ PyObjWrapper res( PyObject_CallMethod( myPyModule, (char*)"onObjectBrowserClicked", (char*)"si", theObj.toLatin1().constData(), theColumn ) );
+ if( !res ) {
+ PyErr_Print();
+ }
+ }
+}
+
+
+
+void PyModuleHelper::onObjectBrowserClicked(SUIT_DataObject* theObj, int theColumn)
+{
+ FuncMsg fmsg( "PyModuleHelper::onObjectBrowserClicked()" );
+
+ // temporary set myInitModule because dumpPython() method
+ // might be called by the framework when this module is inactive,
+ // but still it should be possible to access this module's data
+ // from Python
+ InitLocker lock( myModule );
+
+ class PythonReq: public PyInterp_LockRequest
+ {
+ public:
+ PythonReq( PyInterp_Interp* _py_interp,
+ PyModuleHelper* _helper,
+ const QString& _entry,
+ int _column )
+ : PyInterp_LockRequest( _py_interp, 0, true ), // this request should be processed synchronously (sync == true)
+ myHelper( _helper ) ,
+ myEntry( _entry ),
+ myColumn( _column )
+ {}
+ protected:
+ virtual void execute()
+ {
+ myHelper->internalOBClickedPython( myEntry, myColumn );
+ }
+ private:
+ PyModuleHelper* myHelper;
+ int myColumn;
+ QString myEntry;
+ };
+
+ // Posting the request only if dispatcher is not busy!
+ // Executing the request synchronously
+ const LightApp_DataObject* data_object = dynamic_cast<const LightApp_DataObject*>( theObj );
+ if ( (!PyInterp_Dispatcher::Get()->IsBusy()) && data_object )
+ PyInterp_Dispatcher::Get()->Exec( new PythonReq( myInterp, this, data_object->entry(), theColumn ) );
+}
+
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
const int, Qt::DropAction );
QString engineIOR() const;
+ void onObjectBrowserClicked(SUIT_DataObject*, int);
+
private:
void initInterp( int );
void importModule();
void internalDropObjects( const DataObjectList&, SUIT_DataObject*,
const int, Qt::DropAction );
QString internalEngineIOR() const;
+ void internalOBClickedPython( const QString&, int );
void connectView( SUIT_ViewWindow* );
};
-# Copyright (C) 2012-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2012-2014 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.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
#
INCLUDE(UsePyQt4)
-INCLUDE(${VTK_USE_FILE})
+IF(SALOME_USE_VTKVIEWER)
+ INCLUDE(${VTK_USE_FILE})
+ENDIF()
# --- options ---
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
{
ProcessVoidEvent( new TPlot2dFitRange(id, XMin, XMax, YMin, YMax) );
}
+
+
+void SalomePyQt::setVisibilityState( const QString& theEntry, VisibilityState theState)
+{
+ class TEvent: public SALOME_Event
+ {
+ QString myEntry;
+ int myState;
+ public:
+ TEvent( const QString& theEntry, int theState):
+ myEntry(theEntry), myState(theState) {}
+ virtual void Execute()
+ {
+ LightApp_Study* aStudy = getActiveStudy();
+ if ( !aStudy )
+ return;
+ aStudy->setVisibilityState(myEntry, (Qtx::VisibilityState)myState);
+ }
+ };
+ ProcessVoidEvent( new TEvent(theEntry, theState ) );
+}
+
+class TGetVisibilityStateEvent: public SALOME_Event
+{
+public:
+ typedef int TResult;
+ TResult myResult;
+ QString myEntry;
+ TGetVisibilityStateEvent(const QString& theEntry) : myResult( 0 ), myEntry(theEntry) {}
+ virtual void Execute()
+ {
+ LightApp_Study* aStudy = getActiveStudy();
+ if ( aStudy )
+ myResult = aStudy->visibilityState(myEntry);
+ }
+};
+
+VisibilityState SalomePyQt::getVisibilityState( const QString& theEntry )
+{
+ return (VisibilityState) ProcessEvent( new TGetVisibilityStateEvent(theEntry) );
+}
+
+
+void SalomePyQt::setObjectPosition( const QString& theEntry, int thePos )
+{
+ class TEvent: public SALOME_Event
+ {
+ QString myEntry;
+ int myPos;
+ public:
+ TEvent( const QString& theEntry, int thePos):
+ myEntry(theEntry), myPos(thePos) {}
+ virtual void Execute()
+ {
+ SALOME_PYQT_ModuleLight* module = dynamic_cast<SALOME_PYQT_ModuleLight*>( getActiveModule() );
+ if ( module )
+ module->setObjectPosition(myEntry, myPos );
+ }
+ };
+ ProcessVoidEvent( new TEvent(theEntry, thePos ) );
+}
+
+
+
+class TGetObjectPositionEvent: public SALOME_Event
+{
+public:
+ typedef int TResult;
+ TResult myResult;
+ QString myEntry;
+ TGetObjectPositionEvent(const QString& theEntry) : myResult( 0 ), myEntry(theEntry) {}
+ virtual void Execute()
+ {
+ SALOME_PYQT_ModuleLight* module = dynamic_cast<SALOME_PYQT_ModuleLight*>( getActiveModule() );
+ if ( module )
+ myResult = module->getObjectPosition(myEntry);
+ }
+};
+
+int SalomePyQt::getObjectPosition( const QString& theEntry )
+{
+ return ProcessEvent( new TGetObjectPositionEvent(theEntry) );
+}
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
Y2Axis = Plot2d_ViewFrame::Y2Axis
};
+enum VisibilityState
+{
+ ShownState, //!< Object is shown in viewer
+ HiddenState, //!< Object is hidden in viewer
+ UnpresentableState //!< Unpresentable object
+};
+
+enum Axis {
+ yLeft = QwtPlot::yLeft,
+ yRight = QwtPlot::yRight,
+ xBottom = QwtPlot::xBottom,
+ xTop = QwtPlot::xTop,
+};
+
class SalomePyQt
{
public:
static QString getName( const QString& );
static QString getToolTip( const QString& );
+ static void setVisibilityState( const QString&, VisibilityState );
+ static VisibilityState getVisibilityState( const QString& );
+
+ static void setObjectPosition( const QString&, int );
+ static int getObjectPosition( const QString& );
+
+
static void setColor( const QString&, const QColor& );
static QColor getColor( const QString& );
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
SplitAt = 2
};
+enum Axis {
+ yLeft,
+ yRight,
+ xBottom,
+ xTop,
+};
+
class QtxAction : QWidgetAction
{
%TypeHeaderCode
int ny = PyList_Size(a1);
if( nx != ny ) {
- PyErr_Format(PyExc_TypeError,"The dimention of x and y should be the same. It is %d and %d currently.", nx, ny);
+ PyErr_Format(PyExc_TypeError,"The dimension of x and y should be the same. It is %d and %d currently.", nx, ny);
}
int i;
void insertPoint( int, double, double );
void deletePoint( int );
void clearAllPoints();
+ void setXAxis( Axis );
+%MethodCode
+ int ax = int(a0);
+ sipCpp->setXAxis(QwtPlot::Axis(ax));
+%End
+ Axis getXAxis() const;
+%MethodCode
+ sipRes = Axis(sipCpp->getXAxis());
+%End
+ void setYAxis( Axis );
+%MethodCode
+ int ay = int(a0);
+ sipCpp->setYAxis(QwtPlot::Axis(ay));
+%End
+ Axis getYAxis() const;
+%MethodCode
+ sipRes = Axis(sipCpp->getYAxis());
+%End
};
+enum VisibilityState
+{
+ ShownState,
+ HiddenState,
+ UnpresentableState
+};
+
+
class SalomePyQt
{
%TypeHeaderCode
%End
public:
+/* KeepReference is necessary on method getDesktop with SIP >= 4.15.5 to avoid garbage collection of
+ the Python objects added to the desktop. This causes a small memory leak (the wrapper around desktop
+ object is never garbage collected) but since this object contains only references this is not
+ considered a big problem. With versions < 4.15, it seems that this reference was kept implicitly.
+ No proper solution was found for versions between 4.15 and 4.15.4 (included), so those versions
+ should not be used to compile GUI module.
+*/
+%If (SIP_4_15_5 - )
+ static QWidget* getDesktop() /ReleaseGIL,KeepReference/ ;
+%End
+%If ( - SIP_4_15_5)
static QWidget* getDesktop() /ReleaseGIL/ ;
+%End
+
static QWidget* getMainFrame() /ReleaseGIL/ ;
static QMenuBar* getMainMenuBar() /ReleaseGIL/ ;
static QMenu* getPopupMenu( const MenuName ) /ReleaseGIL/ ;
static QString getName(const QString& ) /ReleaseGIL/ ;
static QString getToolTip(const QString& ) /ReleaseGIL/ ;
+ static void setVisibilityState( const QString&, VisibilityState );
+ static VisibilityState getVisibilityState( const QString& );
+
+ static void setObjectPosition( const QString&, int );
+ static int getObjectPosition( const QString& );
+
static void setColor( const QString&, const QColor& ) /ReleaseGIL/ ;
static QColor getColor( const QString& ) /ReleaseGIL/ ;
-# Copyright (C) 2012-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2012-2014 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.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
#
INCLUDE(${SWIG_USE_FILE})
-INCLUDE(${VTK_USE_FILE})
+IF(SALOME_USE_VTKVIEWER)
+ INCLUDE(${VTK_USE_FILE})
+ENDIF()
# --- options ---
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
#include <LightApp_SelectionMgr.h>
#include <LightApp_DataOwner.h>
#include <SALOME_Prs.h>
-#include <SOCC_ViewModel.h>
-#include <SVTK_ViewModel.h>
-#include <SVTK_ViewWindow.h>
-#include <SOCC_ViewWindow.h>
-#include <SPlot2d_ViewWindow.h>
-
#include <SALOME_Event.h>
-#include <SALOME_ListIO.hxx>
-#include <SALOME_InteractiveObject.hxx>
-#include <SALOME_ListIteratorOfListIO.hxx>
+
+#ifndef DISABLE_SALOMEOBJECT
+ #include <SALOME_ListIO.hxx>
+ #include <SALOME_InteractiveObject.hxx>
+ #include <SALOME_ListIteratorOfListIO.hxx>
+#ifndef DISABLE_OCCVIEWER
+ #include <SOCC_ViewModel.h>
+ #include <SOCC_ViewWindow.h>
+#endif
+#ifndef DISABLE_VTKVIEWER
+ #include <SVTK_ViewModel.h>
+ #include <SVTK_ViewWindow.h>
+#endif
+#ifndef DISABLE_PLOT2DVIEWER
+ #include <SPlot2d_ViewWindow.h>
+#endif
+#endif
+
/*!
\class SALOMEGUI_Swig
if ( LightApp_Application* anApp = getApplication() ) {
SUIT_ViewWindow* window = anApp->desktop()->activeWindow();
if ( window ) {
- SALOME_View* view = dynamic_cast<SALOME_View*>( window->getViewManager()->getViewModel() );
+ SALOME_View* view = dynamic_cast<SALOME_View*>( window->getViewManager()->getActiveView() );
if ( view ) {
SALOME_Prs* aPrs = view->CreatePrs( myEntry.toLatin1() );
myResult = !aPrs->IsNull();
if ( LightApp_Application* anApp = getApplication() ) {
SUIT_ViewWindow* window = anApp->desktop()->activeWindow();
if ( window ) {
- SALOME_View* view = dynamic_cast<SALOME_View*>( window->getViewManager()->getViewModel() );
+ SALOME_View* view = dynamic_cast<SALOME_View*>( window->getViewManager()->getActiveView() );
if ( view )
view->Repaint();
}
if ( LightApp_Application* anApp = getApplication() ) {
SUIT_ViewWindow* window = anApp->desktop()->activeWindow();
if ( window ) {
+#ifndef DISABLE_SALOMEOBJECT
+#ifndef DISABLE_VTKVIEWER
if ( dynamic_cast<SVTK_ViewWindow*>( window ) )
( dynamic_cast<SVTK_ViewWindow*>( window ) )->onFitAll();
- else if ( dynamic_cast<OCCViewer_ViewWindow*>( window ) )
- ( dynamic_cast<OCCViewer_ViewWindow*>( window ) )->onFitAll();
- else if ( dynamic_cast<SPlot2d_ViewWindow*>( window ) )
+#endif
+#ifndef DISABLE_PLOT2DVIEWER
+ if ( dynamic_cast<SPlot2d_ViewWindow*>( window ) )
( dynamic_cast<SPlot2d_ViewWindow*>( window ) )->onFitAll();
+#endif
+#endif
+#ifndef DISABLE_OCCVIEWER
+ if ( dynamic_cast<OCCViewer_ViewWindow*>( window ) )
+ ( dynamic_cast<OCCViewer_ViewWindow*>( window ) )->onFitAll();
+#endif
}
}
}
if ( LightApp_Application* anApp = getApplication() ) {
SUIT_ViewWindow* window = anApp->desktop()->activeWindow();
if ( window ) {
+#ifndef DISABLE_SALOMEOBJECT
+#ifndef DISABLE_VTKVIEWER
if ( dynamic_cast<SVTK_ViewWindow*>( window ) )
(dynamic_cast<SVTK_ViewWindow*>( window ))->onResetView();
- else if ( dynamic_cast<OCCViewer_ViewWindow*>( window ) )
- (dynamic_cast<OCCViewer_ViewWindow*>( window ))->onResetView();
- else if ( dynamic_cast<SPlot2d_ViewWindow*>( window ) )
+#endif
+#ifndef DISABLE_PLOT2DVIEWER
+ if ( dynamic_cast<SPlot2d_ViewWindow*>( window ) )
(dynamic_cast<SPlot2d_ViewWindow*>( window ))->onFitAll();
// VSR: there is no 'ResetView' functionality for Plot2d viewer,
// so we use 'FitAll' instead.
+#endif
+#endif
+#ifndef DISABLE_OCCVIEWER
+ if ( dynamic_cast<OCCViewer_ViewWindow*>( window ) )
+ (dynamic_cast<OCCViewer_ViewWindow*>( window ))->onResetView();
+#endif
}
}
}
if ( LightApp_Application* anApp = getApplication() ) {
SUIT_ViewWindow* window = anApp->desktop()->activeWindow();
if ( window ) {
+#ifndef DISABLE_SALOMEOBJECT
+#ifndef DISABLE_VTKVIEWER
if ( dynamic_cast<SVTK_ViewWindow*>( window ) ) {
switch( myView ) {
case __ViewTop:
break;
}
}
- else if ( dynamic_cast<OCCViewer_ViewWindow*>( window ) ) {
+#endif
+#endif
+#ifndef DISABLE_OCCVIEWER
+ if ( dynamic_cast<OCCViewer_ViewWindow*>( window ) ) {
switch( myView ) {
case __ViewTop:
(dynamic_cast<OCCViewer_ViewWindow*>( window ))->onTopView(); break;
break;
}
}
+#endif
}
}
}
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
# -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
#
# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
-# version 2.1 of the License.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
# -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
#
# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
-# version 2.1 of the License.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
#
# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
-# version 2.1 of the License.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
#
# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
-# version 2.1 of the License.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
#
# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
-# version 2.1 of the License.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# Copyright (C) 2012-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2012-2014 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.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-# Copyright (C) 2012-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2012-2014 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.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-# Copyright (C) 2012-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2012-2014 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.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-# Copyright (C) 2012-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2012-2014 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.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
return myChildren.indexOf( (SUIT_DataObject*)obj );
}
+/*!
+ \brief Moves the child position from current to new one.
+ \param theObj child object
+ \param theNewPos child objectnew position in the children list
+
+*/
+void SUIT_DataObject::moveChildPos( SUIT_DataObject* theObj, int theNewPos)
+{
+ if (myChildren.size() <= 1) return;
+
+ int aNewPos = theNewPos;
+ if (aNewPos < 0) aNewPos = 0;
+ if (aNewPos > (myChildren.size() - 1)) aNewPos = myChildren.size() - 1;
+
+ if (myChildren.removeOne(theObj))
+ myChildren.insert(aNewPos, theObj);
+}
+
+
/*!
\brief Get child object by the specified index.
\param idx child object index
return myParent ? myParent->childPos( this ) : 0;
}
+/*!
+ \brief Sets new position of the object in parent's list
+*/
+void SUIT_DataObject::setPosition(int theNewPos)
+{
+ if (theNewPos == position()) return;
+ if (!myParent) return;
+ myParent->moveChildPos(this, theNewPos);
+}
+
/*!
\brief Get the next sibling data object in the children list.
\return child object or 0 if there is no next sibling
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
int childCount() const;
int childPos( const SUIT_DataObject* ) const;
+ void moveChildPos( SUIT_DataObject*, int );
SUIT_DataObject* childObject( const int ) const;
int level() const;
int position() const;
+ void setPosition(int);
SUIT_DataObject* nextBrother() const;
SUIT_DataObject* prevBrother() const;
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-# Copyright (C) 2012-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2012-2014 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.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# additional preprocessor / compiler flags
ADD_DEFINITIONS(${QT_DEFINITIONS} ${PYTHON_DEFINITIONS})
-IF(SALOME_USE_PYCONSOLE)
- ADD_DEFINITIONS("-DSUIT_ENABLE_PYTHON")
-ENDIF()
IF(ENABLE_TESTRECORDER)
ADD_DEFINITIONS("-DENABLE_TESTRECORDER ${TESTRECORDER_DEFINITIONS}")
ENDIF()
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-//#if defined WIN32
-//#ifdef SUIT_ENABLE_PYTHON
-//#undef SUIT_ENABLE_PYTHON
+//#ifdefined WIN32
+//#ifndef DISABLE_PYCONSOLE
+//#define DISABLE_PYCONSOLE
//#endif
//#else //#if defined WIN32
-//#ifndef SUIT_ENABLE_PYTHON
+//#ifdef DISABLE_PYCONSOLE
// NOTE: DO NOT DELETE THIS DEFINITION ON LINUX
// or make sure Python is initialized in main() in any case
// Otherwise, application based on light SALOME and using Python
// are unlikely to work properly.
-//#define SUIT_ENABLE_PYTHON
+//#undef DISABLE_PYCONSOLE
//#include <Python.h>
//#endif
//
-#ifdef SUIT_ENABLE_PYTHON
+#ifndef DISABLE_PYCONSOLE
#include "SUITApp_init_python.hxx"
#endif
int main( int argc, char* argv[] )
{
- //#ifdef SUIT_ENABLE_PYTHON
+ //#ifndef DISABLE_PYCONSOLE
// // First of all initialize Python, as in complex multi-component applications
// // someone else might initialize it some way unsuitable for light SALOME!
// Py_SetProgramName( argv[0] );
}
}
-#ifdef SUIT_ENABLE_PYTHON
+#ifndef DISABLE_PYCONSOLE
//...Initialize python
int _argc = 1;
char* _argv[] = {(char*)""};
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-# Copyright (C) 2012-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2012-2014 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.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
myCellAreaPicker = theAreaPicker;
}
+/*!
+ To find a gravity center of object
+ \param theObjId - identification of object
+*/
+double*
+SALOME_Actor
+::GetGravityCenter( int theObjId )
+{
+ double* result = new double[3];
+ for( int i = 0; i < 3; i++ )
+ result[i]= 0.0;
+
+ vtkPoints* points = GetElemCell( theObjId )->GetPoints();
+ int nbPoints = points->GetNumberOfPoints();
+
+ if( nbPoints <= 0 )
+ return NULL;
+
+ for( int i = 0; i < nbPoints; i++ )
+ {
+ double* aPoint = points->GetPoint(i);
+ result[0] += aPoint[0];
+ result[1] += aPoint[1];
+ result[2] += aPoint[2];
+ }
+ result[0] = result[0] / nbPoints;
+ result[1] = result[1] / nbPoints;
+ result[2] = result[2] / nbPoints;
+
+ return result;
+}
+
/*!
To set up a prehighlight property (initialized by SVTK_Renderer::AddActor)
*/
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
void
SetCellAreaPicker(SVTK_AreaPicker* theAreaPicker);
+ //----------------------------------------------------------------------------
+ //! To find a gravity center of object
+ double* GetGravityCenter( int );
+
//----------------------------------------------------------------------------
//! To set up a prehighlight property (initialized by #SVTK_Renderer::AddActor)
void
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
#include <vtkCamera.h>
#include <vtkRenderer.h>
#include <vtkPointPicker.h>
+#include <vtkCellPicker.h>
#include <vtkRenderWindow.h>
#include <vtkRenderWindowInteractor.h>
#include <vtkCallbackCommand.h>
{
if( SALOME_Actor* anActor = SALOME_Actor::SafeDownCast( aVTKActor ) )
{
- SVTK::TPickLimiter aPickLimiter( myPointPicker, anActor );
- myPointPicker->Pick( aSelectionEvent->myX,
- aSelectionEvent->myY,
- 0.0,
+ Selection_Mode aSelectionMode = GetSelector()->SelectionMode();
+ double* aCoords;
+ int aVtkId;
+ bool isTrueType = false;
+
+ if( myCurrFocalPointType == SVTK::StartFocalPointSelection ||
+ ( myCurrRotationPointType == SVTK::StartPointSelection && aSelectionMode == NodeSelection ) )
+ {
+ SVTK::TPickLimiter aPickLimiter( myPointPicker, anActor );
+ myPointPicker->Pick( aSelectionEvent->myX,
+ aSelectionEvent->myY,
+ 0.0,
+ GetCurrentRenderer() );
+ aVtkId = myPointPicker->GetPointId();
+ if ( aVtkId >= 0 )
+ {
+ int anObjId = anActor->GetNodeObjId( aVtkId );
+ aCoords = anActor->GetNodeCoord(anObjId);
+ isTrueType = true;
+ }
+ }
+
+ if( aSelectionMode == EdgeSelection || aSelectionMode == FaceSelection || aSelectionMode == VolumeSelection )
+ {
+ vtkSmartPointer<vtkCellPicker> aCellPicker = vtkCellPicker::New();
+ aCellPicker->SetTolerance( 0.005 );
+ SVTK::TPickLimiter aPickLimiter( aCellPicker, anActor );
+ aCellPicker->Pick( aSelectionEvent->myX,
+ aSelectionEvent->myY,
+ 0.0,
GetCurrentRenderer() );
- int aVtkId = myPointPicker->GetPointId();
- if ( aVtkId >= 0 )
- {
- int anObjId = anActor->GetNodeObjId( aVtkId );
- double* aCoords = anActor->GetNodeCoord(anObjId);
-
+ aVtkId = aCellPicker->GetCellId();
+ int aCellId = anActor->GetElemObjId( aVtkId );
+
+ if( aSelectionMode == EdgeSelection )
+ isTrueType = anActor->GetObjDimension( aCellId ) == 1;
+ else if( aSelectionMode == FaceSelection )
+ isTrueType = anActor->GetObjDimension( aCellId ) == 2;
+ else if( aSelectionMode == VolumeSelection )
+ isTrueType = anActor->GetObjDimension( aCellId ) == 3;
+
+ if ( aVtkId >= 0 && isTrueType )
+ aCoords = anActor->GetGravityCenter( aCellId );
+ }
+
+ if( aVtkId >= 0 )
+ {
if (myCurrRotationPointType == SVTK::StartPointSelection) {
myCurrRotationPointType = SVTK::SetRotateSelected;
-
// invoke event for update coordinates in SVTK_SetRotationPointDlg
- InvokeEvent(SVTK::RotationPointChanged,(void*)aCoords);
+ if( isTrueType )
+ InvokeEvent(SVTK::RotationPointChanged,(void*)aCoords);
+ else
+ InvokeEvent(SVTK::RotationPointChanged);
+ GetSelector()->SetSelectionMode(ActorSelection);
}
else if (myCurrFocalPointType == SVTK::StartFocalPointSelection) {
myCurrFocalPointType = SVTK::SetFocalPointSelected;
// invoke event with no data (for SVTK_SetRotationPointDlg)
InvokeEvent(SVTK::RotationPointChanged,0);
myCurrRotationPointType = myPrevRotationPointType;
+ GetSelector()->SetSelectionMode(ActorSelection);
}
else if (myCurrFocalPointType == SVTK::StartFocalPointSelection) {
// invoke event with no data (for SVTK_ViewParameterDlg)
SALOME_Actor* aPreHighlightedActor = NULL;
vtkActorCollection* anActorCollection = GetSelector()->Pick(aSelectionEvent, GetCurrentRenderer());
- if ( myCurrRotationPointType == SVTK::StartPointSelection ||
- myCurrFocalPointType == SVTK::StartFocalPointSelection )
+ if ( myCurrFocalPointType == SVTK::StartFocalPointSelection )
{
myHighlightSelectionPointActor->SetVisibility( false );
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
static bool GENERATE_SUIT_EVENTS = true;
static bool FOCUS_UNDER_MOUSE = false;
+// workaround about the bug in vtkImplicitPlaneWidget class
+// that eats mouse button release event
+// causing clipping plane preview in SMESH sticking up
+#define Fix_Of_vtkImplicitPlaneWidget_bug
/*!
Constructor
else if( event->button() & Qt::MidButton )
GetDevice()->MiddleButtonReleaseEvent();
else if( event->button() & Qt::RightButton ) {
- #ifndef Fix_Of_vtkImplicitPlaneWidget_bug
+#if defined(Fix_Of_vtkImplicitPlaneWidget_bug)
GetDevice()->SetEventInformationFlipY( -99999, -99999,
event->modifiers() & Qt::ControlModifier,
event->modifiers() & Qt::ShiftModifier);
+ bool blocked = blockSignals( true );
GetDevice()->LeftButtonPressEvent();
GetDevice()->LeftButtonReleaseEvent();
+ blockSignals( blocked );
GetDevice()->SetEventInformationFlipY(event->x(),
event->y(),
event->modifiers() & Qt::ControlModifier,
event->modifiers() & Qt::ShiftModifier);
- #endif
+#endif
GetDevice()->RightButtonReleaseEvent();
}
}
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
#include <QGroupBox>
#include <QLabel>
#include <QPushButton>
+#include <QMenu>
#include <QGridLayout>
#include <QDoubleValidator>
#include <QCheckBox>
#include <vtkCallbackCommand.h>
+#include <vtkInteractorStyle.h>
/*!
Constructor
vbox->addWidget(myToOrigin);
connect(myToOrigin, SIGNAL(clicked()), this, SLOT(onToOrigin()));
- // Create "Select Point from View" button
- mySelectPoint = new QPushButton(myGroupBoxSel);
- mySelectPoint->setText(tr("LBL_SELECTPOINT"));
+ // Create "Gravity Center of Select Object" button
+ mySelectPoint = new QPushButton(tr("LBL_SELECTPOINT"));
mySelectPoint->setCheckable(true);
+
+ QMenu* menuType = new QMenu( this );
+ mySelectActions[ menuType->addAction( tr("LBL_POINT") ) ] = NodeSelection;
+ mySelectActions[ menuType->addAction( tr("LBL_EDGE") ) ] = EdgeSelection;
+ mySelectActions[ menuType->addAction( tr("LBL_FACE") ) ] = FaceSelection;
+ mySelectActions[ menuType->addAction( tr("LBL_VOLUME") ) ] = VolumeSelection;
+ connect( menuType, SIGNAL( triggered( QAction* ) ), this, SLOT( onSelectMenu( QAction* ) ) );
+
+ mySelectPoint->setMenu( menuType );
vbox->addWidget(mySelectPoint);
- connect(mySelectPoint, SIGNAL(clicked()), this, SLOT(onSelectPoint()));
// Create croup box with grid layout
myGroupBoxCoord = new QGroupBox(this);
myEventCallbackCommand->Delete();
myEventCallbackCommand->SetClientData(this);
myEventCallbackCommand->SetCallback(SVTK_SetRotationPointDlg::ProcessEvents);
- myIsObserverAdded = false;
}
/*
SVTK_SetRotationPointDlg
::addObserver()
{
- if ( !myIsObserverAdded ) {
- vtkInteractorStyle* aIStyle = myRWInteractor->GetInteractorStyle();
+ vtkInteractorStyle* aIStyle = myRWInteractor->GetInteractorStyle();
+ if( !IsObserverAdded( aIStyle ) ) {
aIStyle->AddObserver(SVTK::BBCenterChanged, myEventCallbackCommand.GetPointer(), myPriority);
aIStyle->AddObserver(SVTK::RotationPointChanged, myEventCallbackCommand.GetPointer(), myPriority);
- myIsObserverAdded = true;
}
}
}
}
+bool
+SVTK_SetRotationPointDlg
+::IsObserverAdded( vtkInteractorStyle* theInteractorStyle )
+{
+ bool isAdded = false;
+ for( int i = 0; i < myInteractorStyleList.count(); i++ )
+ if( myInteractorStyleList.at(i) == theInteractorStyle )
+ isAdded = true;
+
+ if( !isAdded )
+ myInteractorStyleList.append( theInteractorStyle );
+
+ return isAdded;
+}
+
void
SVTK_SetRotationPointDlg
::setEnabled(QGroupBox* theGrp, const bool theState)
SVTK_SetRotationPointDlg
::onToOrigin()
{
- if ( mySelectPoint->isChecked() )
- mySelectPoint->toggle();
+ mySelectPoint->setChecked( false );
myX->setText(QString::number(0.0));
myY->setText(QString::number(0.0));
myZ->setText(QString::number(0.0));
void
SVTK_SetRotationPointDlg
-::onSelectPoint()
+::onSelectMenu( QAction* theAction )
{
- if ( mySelectPoint->isChecked() )
- myMainWindow->activateStartPointSelection();
- else
- mySelectPoint->toggle();
+ mySelectPoint->setChecked( true );
+ myMainWindow->activateStartPointSelection( mySelectActions[theAction] );
}
void
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
#define SVTK_SETROTATIONPOINTDLG_H
#include "SVTK.h"
+#include "SVTK_Selection.h"
#include <ViewerTools_DialogBase.h>
#include <vtkSmartPointer.h>
+#include <QMap>
+#include <QList>
+
class SVTK_ViewWindow;
class SVTK_RenderWindowInteractor;
class QPushButton;
class QGroupBox;
class QCheckBox;
+class QAction;
class vtkCallbackCommand;
+class vtkInteractorStyle;
class vtkObject;
class SVTK_EXPORT SVTK_SetRotationPointDlg : public ViewerTools_DialogBase
protected:
SVTK_ViewWindow *myMainWindow;
SVTK_RenderWindowInteractor* myRWInteractor;
- bool myIsObserverAdded;
+ QList<vtkInteractorStyle*> myInteractorStyleList;
+ QMap<QAction*, Selection_Mode> mySelectActions;
+
QCheckBox* myIsBBCenter;
QGroupBox * myGroupBoxSel;
QLineEdit* myZ;
void setEnabled(QGroupBox* theGrp, const bool theState);
+ bool IsObserverAdded( vtkInteractorStyle* );
//----------------------------------------------------------------------------
// Priority at which events are processed
void onBBCenterChecked();
void onToOrigin();
- void onSelectPoint();
+ void onSelectMenu( QAction* );
void onCoordChanged();
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
aView->SetSelectionEnabled( isEnabled );
}
}
+
+ if(!isEnabled) {
+ //clear current selection in the viewer
+ bool blocked = blockSignals( true );
+ if ( SUIT_ViewManager* aViewMgr = getViewManager() ) {
+ if( SVTK_ViewWindow* aViewWindow = dynamic_cast<SVTK_ViewWindow*>( aViewMgr->getActiveView() ) ){
+ if( SVTK_Selector* aSelector = aViewWindow->GetSelector() ) {
+ if(SVTK_View* aView = aViewWindow->getView()){
+ aSelector->ClearIObjects();
+ aView->onSelectionChanged();
+ }
+ }
+ }
+ }
+ blockSignals( blocked );
+ }
+
}
/*!
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
}
/*!
- Set the point selected by user as a rotation point
+ Set the gravity center of element selected by user as a rotation point
*/
-void SVTK_ViewWindow::activateStartPointSelection()
+void SVTK_ViewWindow::activateStartPointSelection( Selection_Mode theSelectionMode )
{
+ SetSelectionMode( theSelectionMode );
myEventDispatcher->InvokeEvent(SVTK::StartPointSelection,0);
}
double anAxialScale[3];
aCamera->OrthogonalizeViewUp();
- aCamera->GetFocalPoint(aFocalPoint);
- aCamera->GetPosition(aPosition);
- aCamera->GetViewUp(aViewUp);
+ aCamera->GetFocalPoint( aFocalPoint );
+ aCamera->GetPosition( aPosition );
+ aCamera->GetViewUp( aViewUp );
- aProps.setFocalPoint(aFocalPoint[0], aFocalPoint[1], aFocalPoint[2]);
- aProps.setPosition(aPosition[0], aPosition[1], aPosition[2]);
- aProps.setViewUp(aViewUp[0], aViewUp[1], aViewUp[2]);
- aProps.setMappingScale(aCamera->GetParallelScale());
+ aProps.setFocalPoint( aFocalPoint[0], aFocalPoint[1], aFocalPoint[2] );
+ aProps.setPosition( aPosition[0], aPosition[1], aPosition[2] );
+ aProps.setViewUp( aViewUp[0], aViewUp[1], aViewUp[2] );
+ aProps.setMappingScale( aCamera->GetParallelScale() * 2.0 );
- if (aProps.getProjection() == SUIT_CameraProperties::PrjPerspective)
+ if ( aProps.getProjection() == SUIT_CameraProperties::PrjPerspective )
{
- aProps.setViewAngle(aCamera->GetViewAngle());
+ aProps.setViewAngle( aCamera->GetViewAngle() );
}
- GetRenderer()->GetScale(anAxialScale);
- aProps.setAxialScale(anAxialScale[0], anAxialScale[1], anAxialScale[2]);
+ GetRenderer()->GetScale( anAxialScale );
+ aProps.setAxialScale( anAxialScale[0], anAxialScale[1], anAxialScale[2] );
return aProps;
}
double anAxialScale[3];
// get common properties
- aProps.getViewUp(aViewUp[0], aViewUp[1], aViewUp[2]);
- aProps.getPosition(aPosition[0], aPosition[1], aPosition[2]);
- aProps.getFocalPoint(aFocalPoint[0], aFocalPoint[1], aFocalPoint[2]);
- aProps.getAxialScale(anAxialScale[0], anAxialScale[1], anAxialScale[2]);
+ aProps.getViewUp( aViewUp[0], aViewUp[1], aViewUp[2] );
+ aProps.getPosition( aPosition[0], aPosition[1], aPosition[2] );
+ aProps.getFocalPoint( aFocalPoint[0], aFocalPoint[1], aFocalPoint[2] );
+ aProps.getAxialScale( anAxialScale[0], anAxialScale[1], anAxialScale[2] );
// restore properties to the camera
- aCamera->SetViewUp(aViewUp);
- aCamera->SetPosition(aPosition);
- aCamera->SetFocalPoint(aFocalPoint);
- aCamera->SetParallelScale(aProps.getMappingScale());
+ aCamera->SetViewUp( aViewUp );
+ aCamera->SetPosition( aPosition );
+ aCamera->SetFocalPoint( aFocalPoint );
+ aCamera->SetParallelScale( aProps.getMappingScale() / 2.0 );
- if (aProps.getProjection() == SUIT_CameraProperties::PrjPerspective)
+ if ( aProps.getProjection() == SUIT_CameraProperties::PrjPerspective )
{
- aCamera->SetViewAngle(aProps.getViewAngle());
+ aCamera->SetViewAngle( aProps.getViewAngle() );
}
- GetRenderer()->SetScale(anAxialScale);
+ GetRenderer()->SetScale( anAxialScale );
getRenderer()->ResetCameraClippingRange();
- Repaint(false);
+ Repaint( false );
blockSignals( blocked );
}
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
void activateSetRotationGravity();
void activateSetRotationSelected(void* theData);
- void activateStartPointSelection();
+ void activateStartPointSelection( Selection_Mode );
void onUpdateRate(bool theIsActivate);
void onNonIsometric(bool theIsActivate);
</message>
<message>
<source>LBL_SELECTPOINT</source>
- <translation>Select Point from View</translation>
+ <translation>Gravity Center of Select Object</translation>
+ </message>
+ <message>
+ <source>LBL_POINT</source>
+ <translation>Point</translation>
+ </message>
+ <message>
+ <source>LBL_EDGE</source>
+ <translation>Edge</translation>
+ </message>
+ <message>
+ <source>LBL_FACE</source>
+ <translation>Face</translation>
+ </message>
+ <message>
+ <source>LBL_VOLUME</source>
+ <translation>Volume</translation>
</message>
<message>
<source>DLG_TITLE</source>
</message>
<message>
<source>LBL_SELECTPOINT</source>
- <translation>Choisir un point dans la vue</translation>
+ <translation>Сentre de gravité des objets sélectionnés</translation>
+ </message>
+ <message>
+ <source>LBL_POINT</source>
+ <translation>Point</translation>
+ </message>
+ <message>
+ <source>LBL_EDGE</source>
+ <translation>Arête</translation>
+ </message>
+ <message>
+ <source>LBL_FACE</source>
+ <translation>Face</translation>
+ </message>
+ <message>
+ <source>LBL_VOLUME</source>
+ <translation>Volume</translation>
</message>
<message>
<source>DLG_TITLE</source>
-# Copyright (C) 2012-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2012-2014 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.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
ENDIF()
INCLUDE(UseQt4Ext)
-INCLUDE(${VTK_USE_FILE})
+IF(SALOME_USE_VTKVIEWER)
+ INCLUDE(${VTK_USE_FILE})
+ENDIF()
# --- options ---
${QT_INCLUDES}
${QWT_INCLUDE_DIR}
${Boost_INCLUDE_DIRS}
- ${PYTHON_INCLUDE_DIRS}
${PTHREAD_INCLUDE_DIR}
${OMNIORB_INCLUDE_DIR}
${PROJECT_BINARY_DIR}/idl
${PROJECT_SOURCE_DIR}/src/OBJECT
${PROJECT_SOURCE_DIR}/src/ObjBrowser
${PROJECT_SOURCE_DIR}/src/Prs
- ${PROJECT_SOURCE_DIR}/src/PyConsole
- ${PROJECT_SOURCE_DIR}/src/PyInterp
${PROJECT_SOURCE_DIR}/src/Qtx
${PROJECT_SOURCE_DIR}/src/STD
${PROJECT_SOURCE_DIR}/src/SUIT
${PROJECT_SOURCE_DIR}/src/SVTK
- ${PROJECT_SOURCE_DIR}/src/Session
${PROJECT_SOURCE_DIR}/src/TOOLSGUI
${PROJECT_SOURCE_DIR}/src/VTKViewer
)
+IF(SALOME_USE_PYCONSOLE)
+ INCLUDE_DIRECTORIES(
+ ${PYTHON_INCLUDE_DIRS}
+ ${PROJECT_SOURCE_DIR}/src/PyConsole
+ ${PROJECT_SOURCE_DIR}/src/PyInterp
+ )
+ENDIF()
+
# additional preprocessor / compiler flags
ADD_DEFINITIONS(
${QT_DEFINITIONS}
${QWT_DEFINITIONS}
${CAS_DEFINITIONS}
${BOOST_DEFINITIONS}
- ${PYTHON_DEFINITIONS}
)
+IF(SALOME_USE_PYCONSOLE)
+ ADD_DEFINITIONS(${PYTHON_DEFINITIONS})
+ENDIF()
+
# libraries to link to
SET(_link_LIBRARIES
${CAS_KERNEL}
${QT_LIBRARIES}
${PYTHON_LIBRARIES}
${KERNEL_OpUtil} ${KERNEL_SALOMELocalTrace} ${KERNEL_SalomeDSClient} ${KERNEL_TOOLSDS}
- CASCatch suit std CAM ObjBrowser SalomePrs PyInterp PyConsole Event
- GLViewer Plot2d OCCViewer VTKViewer SalomeObject SPlot2d SOCC SVTK
- LogWindow LightApp SalomePrs ToolsGUI SalomeSession
+ CASCatch suit std CAM ObjBrowser SalomePrs Event
+ LogWindow LightApp SalomePrs ToolsGUI
)
+IF(SALOME_USE_VTKVIEWER)
+ LIST(APPEND _link_LIBRARIES VTKViewer SVTK)
+ENDIF()
+
+IF(SALOME_USE_PYCONSOLE)
+ LIST(APPEND _link_LIBRARIES PyInterp PyConsole)
+ENDIF()
+
+IF(SALOME_USE_GLVIEWER)
+ LIST(APPEND _link_LIBRARIES GLViewer)
+ENDIF()
+
+IF(SALOME_USE_PLOT2DVIEWER)
+ LIST(APPEND _link_LIBRARIES Plot2d)
+ IF(SALOME_USE_SALOMEOBJECT)
+ LIST(APPEND _link_LIBRARIES SPlot2d)
+ ENDIF(SALOME_USE_SALOMEOBJECT)
+ENDIF(SALOME_USE_PLOT2DVIEWER)
+
+IF(SALOME_USE_OCCVIEWER)
+ LIST(APPEND _link_LIBRARIES OCCViewer)
+ IF(SALOME_USE_SALOMEOBJECT)
+ LIST(APPEND _link_LIBRARIES SOCC)
+ ENDIF(SALOME_USE_SALOMEOBJECT)
+ENDIF()
+
+IF(SALOME_USE_SALOMEOBJECT)
+ LIST(APPEND _link_LIBRARIES SalomeObject)
+ENDIF()
+
+IF(NOT SALOME_LIGHT_ONLY)
+ LIST(APPEND _link_LIBRARIES SalomeIDLGUI)
+ LIST(APPEND _link_LIBRARIES ${KERNEL_SalomeContainer})
+ LIST(APPEND _link_LIBRARIES ${KERNEL_SalomeLifeCycleCORBA})
+ENDIF()
+
# --- headers ---
# header files / to be processed by moc
SalomeApp_ListView.h
SalomeApp_LoadStudiesDlg.h
SalomeApp_Module.h
- SalomeApp_NoteBook.h
SalomeApp_Study.h
SalomeApp_StudyPropertiesDlg.h
)
+IF(SALOME_USE_PYCONSOLE)
+ LIST(APPEND _moc_HEADERS SalomeApp_NoteBook.h)
+ENDIF()
+
# header files / no moc processing
SET(_other_HEADERS
SalomeApp.h
SalomeApp_ExceptionHandler.h
SalomeApp_Filter.h
SalomeApp_ImportOperation.h
- SalomeApp_PyInterp.h
SalomeApp_Tools.h
SalomeApp_TypeFilter.h
SalomeApp_VisualState.h
)
+IF(SALOME_USE_PYCONSOLE)
+ LIST(APPEND _other_HEADERS SalomeApp_PyInterp.h)
+ENDIF()
+
# header files / to install
SET(SalomeApp_HEADERS ${_moc_HEADERS} ${_other_HEADERS})
SalomeApp_ListView.cxx
SalomeApp_LoadStudiesDlg.cxx
SalomeApp_Module.cxx
- SalomeApp_NoteBook.cxx
- SalomeApp_PyInterp.cxx
SalomeApp_Study.cxx
SalomeApp_StudyPropertiesDlg.cxx
SalomeApp_Tools.cxx
SalomeApp_VisualState.cxx
)
+IF(SALOME_USE_PYCONSOLE)
+ LIST(APPEND _other_SOURCES SalomeApp_PyInterp.cxx SalomeApp_NoteBook.cxx)
+ENDIF()
+
# sources / to compile
SET(SalomeApp_SOURCES ${_other_SOURCES} ${_moc_SOURCES})
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// Author: Sergey LITONIN
#ifdef WIN32
-// E.A. : On windows with python 2.6, there is a conflict
-// E.A. : between pymath.h and Standard_math.h which define
-// E.A. : some same symbols : acosh, asinh, ...
-#include <Standard_math.hxx>
-#include <pymath.h>
+ // E.A. : On windows with python 2.6, there is a conflict
+ // E.A. : between pymath.h and Standard_math.h which define
+ // E.A. : some same symbols : acosh, asinh, ...
+ #include <Standard_math.hxx>
+ #ifndef DISABLE_PYCONSOLE
+ #include <pymath.h>
+ #endif
#endif
-#include "SalomeApp_PyInterp.h" // WARNING! This include must be the first!
+#ifndef DISABLE_PYCONSOLE
+ #include "SalomeApp_PyInterp.h" // WARNING! This include must be the first!
+ #include <PyConsole_Console.h>
+ #include "SalomeApp_NoteBook.h"
+#endif
#include "SalomeApp_Application.h"
#include "SalomeApp_Study.h"
#include "SalomeApp_DataModel.h"
#include "SalomeApp_VisualState.h"
#include "SalomeApp_StudyPropertiesDlg.h"
#include "SalomeApp_LoadStudiesDlg.h"
-#include "SalomeApp_NoteBook.h"
-
#include "SalomeApp_ExitDlg.h"
#include <LightApp_Application.h>
// temporary commented
//#include <OB_ListItem.h>
-#include <PyConsole_Console.h>
#include <Utils_ORB_INIT.hxx>
#include <Utils_SINGLETON.hxx>
updateObjectBrowser(true);
}
+#ifndef DISABLE_PYCONSOLE
// import/execute python scripts
if ( pyfiles.count() > 0 && activeStudy() ) {
SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>( activeStudy() );
}
}
}
+#endif
} else {
LightApp_Application::start();
SALOME_EventFilter::Init();
createExtraActions();
+#ifndef DISABLE_PYCONSOLE
+#ifndef DISABLE_SALOMEOBJECT
// import Python module that manages SALOME plugins
{
PyLockWrapper lck; // acquire GIL
PyErr_Print();
}
// end of SALOME plugins loading
+#endif
+#endif
}
QString command = QString("execfile(r\"%1\")").arg(aFile);
+#ifndef DISABLE_PYCONSOLE
PyConsole_Console* pyConsole = pythonConsole();
if ( pyConsole )
pyConsole->exec( command );
+#endif
}
}
connect( aStudy, SIGNAL( saved ( SUIT_Study* ) ), this, SLOT( onStudySaved ( SUIT_Study* ) ) );
connect( aStudy, SIGNAL( closed ( SUIT_Study* ) ), this, SLOT( onStudyClosed ( SUIT_Study* ) ) );
+#ifndef DISABLE_PYCONSOLE
//to receive signal in application that NoteBook's variable was modified
connect( aStudy, SIGNAL(notebookVarUpdated(QString)),
this, SIGNAL(notebookVarUpdated(QString)) );
+#endif
return aStudy;
}
{
QString command = QString("execfile(r\"%1\")").arg(aFile);
+#ifndef DISABLE_PYCONSOLE
PyConsole_Console* pyConsole = pythonConsole();
if ( pyConsole )
pyConsole->exec( command );
+#endif
}
}
QWidget* SalomeApp_Application::createWindow( const int flag )
{
QWidget* wid = 0;
+#ifndef DISABLE_PYCONSOLE
if ( flag != WT_PyConsole ) wid = LightApp_Application::createWindow(flag);
+#else
+ wid = LightApp_Application::createWindow(flag);
+#endif
SUIT_ResourceMgr* resMgr = resourceMgr();
*/
}
}
+#ifndef DISABLE_PYCONSOLE
else if ( flag == WT_PyConsole )
{
PyConsole_Console* pyCons = new PyConsole_EnhConsole( desktop(), new SalomeApp_PyInterp() );
}
wid = getNoteBook();
}
+#endif
return wid;
}
}
-/*!Global utility funciton, returns selected GUI Save point object's ID */
+/*!Global utility function, returns selected GUI Save point object's ID */
int getSelectedSavePoint( const LightApp_SelectionMgr* selMgr )
{
SALOME_ListIO aList;
{
LightApp_Application::onStudyCreated( study );
+#ifndef DISABLE_PYCONSOLE
desktop()->tabifyDockWidget( windowDock( getWindow( WT_NoteBook ) ),
windowDock( getWindow( WT_ObjectBrowser ) ) );
+#endif
loadDockWindowsState();
{
LightApp_Application::onStudyOpened( study );
+#ifndef DISABLE_PYCONSOLE
desktop()->tabifyDockWidget( windowDock( getWindow( WT_NoteBook ) ),
windowDock( getWindow( WT_ObjectBrowser ) ) );
+#endif
loadDockWindowsState();
}
}
+#ifndef DISABLE_PYCONSOLE
/*! Set SalomeApp_NoteBook pointer */
void SalomeApp_Application::setNoteBook( SalomeApp_NoteBook* theNoteBook )
{
{
return myNoteBook;
}
+#endif
/*!
* Define extra actions defined in module definition XML file.
SALOME_View* aView = dynamic_cast<SALOME_View*>( theViewModel );
- if (theList.isEmpty() || !aView || !aStudy)
+ if (theList.isEmpty() || !aStudy)
return;
for ( DataObjectList::iterator itr = theList.begin(); itr != theList.end(); ++itr ) {
LightApp_Displayer* aDisplayer = anObjModule->displayer();
if(aDisplayer) {
if( aDisplayer->canBeDisplayed(obj->entry(), theViewModel->getType()) ) {
- if(aDisplayer->IsDisplayed(obj->entry(),aView))
+ if(aView && aDisplayer->IsDisplayed(obj->entry(),aView))
anObjState = Qtx::ShownState;
else
anObjState = Qtx::HiddenState;
}
+ aStudy->setVisibilityState( obj->entry(), anObjState );
}
- aStudy->setVisibilityState( obj->entry(), anObjState );
}
}
}
void SalomeApp_Application::defaultWindows( QMap<int, int>& aMap ) const
{
LightApp_Application::defaultWindows(aMap);
+#ifndef DISABLE_PYCONSOLE
if ( !aMap.contains( WT_NoteBook ) ) {
if ( !myNoteBook ) {
aMap.insert( WT_NoteBook, Qt::LeftDockWidgetArea );
}
}
+#endif
}
/*!
void SalomeApp_Application::currentWindows(QMap<int, int>& aMap) const
{
LightApp_Application::currentWindows( aMap );
+#ifndef DISABLE_PYCONSOLE
if ( !aMap.contains( WT_NoteBook) && myNoteBook )
aMap.insert( WT_NoteBook, Qt::LeftDockWidgetArea );
+#endif
}
+#ifndef DISABLE_PYCONSOLE
//============================================================================
/*! Function : onUpdateStudy
* Purpose : Slot to update the study.
return ok;
}
+#endif
//============================================================================
/*! Function : onRestoreStudy
// load study from the temporary directory
QString command = QString( "execfile(r\"%1\")" ).arg( theDumpScript );
+#ifndef DISABLE_PYCONSOLE
PyConsole_Console* pyConsole = app->pythonConsole();
if ( pyConsole )
pyConsole->execAndWait( command );
+#endif
// remove temporary directory
QFileInfo aScriptInfo = QFileInfo( theDumpScript );
if( SalomeApp_Study* newStudy = dynamic_cast<SalomeApp_Study*>( app->activeStudy() ) )
{
+#ifndef DISABLE_PYCONSOLE
_PTR(Study) aStudyDS = newStudy->studyDS();
app->getNoteBook()->Init( aStudyDS );
newStudy->updateFromNotebook(theStudyName, theIsStudySaved);
newStudy->Modified();
updateDesktopTitle();
updateActions();
+#endif
}
else
ok = false;
*/
void SalomeApp_Application::afterCloseDoc()
{
+#ifndef DISABLE_PYCONSOLE
// emit signal to restore study from Python script
if ( myNoteBook ) {
emit dumpedStudyClosed( myNoteBook->getDumpedStudyScript(),
myNoteBook->getDumpedStudyName(),
myNoteBook->isDumpedStudySaved() );
}
+#endif
LightApp_Application::afterCloseDoc();
}
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
class LightApp_Preferences;
class SalomeApp_Study;
-class SalomeApp_NoteBook;
+#ifndef DISABLE_PYCONSOLE
+ class SalomeApp_NoteBook;
+#endif
class SUIT_Desktop;
class SUIT_ViewModel;
virtual bool useStudy( const QString& );
virtual void updateDesktopTitle();
virtual void currentWindows( QMap<int, int>& ) const;
-
+
+#ifndef DISABLE_PYCONSOLE
virtual void setNoteBook(SalomeApp_NoteBook* theNoteBook);
virtual SalomeApp_NoteBook* getNoteBook() const;
+#endif
//! update visibility state of objects
void updateVisibilityState( DataObjectList& theList,
virtual void onCopy();
virtual void onPaste();
void onSaveGUIState();// called from VISU
+#ifndef DISABLE_PYCONSOLE
void onUpdateStudy(); // called from NoteBook
+#endif
bool onRestoreStudy( const QString& theDumpScript,
const QString& theStudyName,
bool theIsStudySaved );
void objectBrowserColumnsVisibility();
+#ifndef DISABLE_PYCONSOLE
bool updateStudy();
+#endif
virtual void afterCloseDoc();
void createExtraActions();
private:
+#ifndef DISABLE_PYCONSOLE
QPointer<SalomeApp_NoteBook> myNoteBook;
+#endif
QMap<QString, QAction*> myExtActions; // Map <AttributeUserID, QAction>
bool myIsSiman; // application corresponds to the siman study flag
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
}
/*!
-Constructor
+ Constructor
*/
-SalomeApp_CheckFileDlg::SalomeApp_CheckFileDlg( QWidget* parent, bool open, const QStringList& theCheckBoxNames, bool showQuickDir, bool modal) :
-SUIT_FileDlg( parent, open, showQuickDir, modal )
+SalomeApp_CheckFileDlg::SalomeApp_CheckFileDlg( QWidget* parent,
+ bool open,
+ const QStringList& theCheckBoxNames,
+ bool showQuickDir,
+ bool modal,
+ const QList< QWidget* >& wdgList,
+ const bool wdgAfter) :
+ SUIT_FileDlg( parent, open, showQuickDir, modal )
{
- if ( theCheckBoxNames.count() > 0 )
+ if ( theCheckBoxNames.count() > 0 || wdgList.count() > 0 )
{
-
QGridLayout* grid = ::qobject_cast<QGridLayout*>( layout() );
if ( grid )
{
+ if ( !wdgAfter )
+ for ( int i = 0; i < wdgList.count(); ++i )
+ {
+ if ( wdgList[i] )
+ {
+ int row = grid->rowCount();
+ grid->addWidget( wdgList[i], row, 1 );
+ }
+ }
+
for ( int i = 0; i < theCheckBoxNames.count(); ++i )
{
QCheckBox* myCheckBox = new QCheckBox( theCheckBoxNames.at(i), this );
myCheckBoxes.append( myCheckBox );
-
+
int row = grid->rowCount();
grid->addWidget( myCheckBox, row, 1 );
}
+
+ if ( wdgAfter )
+ for ( int i = 0; i < wdgList.count(); ++i )
+ {
+ if ( wdgList[i] )
+ {
+ int row = grid->rowCount();
+ grid->addWidget( wdgList[i], row, 1 );
+ }
+ }
}
}
}
/*!
-Destructor
+ Destructor
*/
SalomeApp_CheckFileDlg::~SalomeApp_CheckFileDlg()
{
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
public:
SalomeApp_CheckFileDlg( QWidget*, bool open, const QString& theCheckBoxName, bool showQuickDir = true, bool modal = true );
- SalomeApp_CheckFileDlg( QWidget*, bool open, const QStringList& theCheckBoxNames, bool showQuickDir = true, bool modal = true );
+ SalomeApp_CheckFileDlg( QWidget*, bool open, const QStringList& theCheckBoxNames, bool showQuickDir = true, bool modal = true, const QList< QWidget* >& = QList< QWidget* >(), const bool wdgAfter = false );
virtual ~SalomeApp_CheckFileDlg();
public:
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// File: SalomeApp_DoubleSpinBox.cxx
// Author: Oleg UVAROV
//
-#include <PyConsole_Interp.h> // this include must be first (see PyInterp_base.h)!
-#include <PyConsole_Console.h>
+
+#ifndef DISABLE_PYCONSOLE
+ #include <PyConsole_Interp.h> // this include must be first (see PyInterp_base.h)!
+ #include <PyConsole_Console.h>
+#endif
#include "SalomeApp_DoubleSpinBox.h"
#include "SalomeApp_Application.h"
{
if( studyDS->IsString( aName ) )
{
+#ifndef DISABLE_PYCONSOLE
PyConsole_Console* pyConsole = app->pythonConsole();
PyConsole_Interp* pyInterp = pyConsole->getInterp();
PyLockWrapper aLock; // Acquire GIL
{
return IncorrectType;
}
+#endif
}
value = studyDS->GetReal( aName );
return Found;
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
\param theComponentName - synthetic "component data type" used to identify a given light module
\return Object reference to the CORBA engine
*/
-CORBA::Object_ptr SalomeApp_Engine_i::engineForComponent( const char* theComponentName,
+CORBA::Object_ptr SalomeApp_Engine_i::EngineForComponent( const char* theComponentName,
bool toCreate )
{
CORBA::Object_var anEngine;
bool toCreate )
{
std::string anIOR( "" );
- CORBA::Object_var anEngine = engineForComponent( theComponentName, toCreate );
+ CORBA::Object_var anEngine = EngineForComponent( theComponentName, toCreate );
if ( !CORBA::is_nil( anEngine ) )
{
CORBA::String_var objStr = orb()->object_to_string( anEngine.in() );
bool toCreate )
{
SalomeApp_Engine_i* aServant = 0;
- CORBA::Object_var anEngine = engineForComponent( theComponentName, toCreate );
+ CORBA::Object_var anEngine = EngineForComponent( theComponentName, toCreate );
if ( !CORBA::is_nil( anEngine ) )
{
PortableServer::Servant aServantBase = poa()->reference_to_servant( anEngine.in() );
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
static SalomeApp_Engine_i* GetInstance ( const char* theComponentName,
bool toCreate );
+ static CORBA::Object_ptr EngineForComponent( const char* theComponentName,
+ bool toCreate );
+
public:
// methods from SALOMEDS::Driver without implementation. Must be redefined because
// there is no default implementation of SALOMEDS::Driver interface
static CORBA::ORB_var orb();
static PortableServer::POA_var poa();
static SALOME_NamingService* namingService();
- static CORBA::Object_ptr engineForComponent( const char* theComponentName,
- bool toCreate );
-
private:
typedef std::map<int, ListOfFiles> MapOfListOfFiles;
MapOfListOfFiles myMap;
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// File: SalomeApp_IntSpinBox.cxx
// Author: Oleg UVAROV
//
-#include <PyConsole_Interp.h> //this include must be first (see PyInterp_base.h)!
-#include <PyConsole_Console.h>
+
+#ifndef DISABLE_PYCONSOLE
+ #include <PyConsole_Interp.h> //this include must be first (see PyInterp_base.h)!
+ #include <PyConsole_Console.h>
+#endif
#include "SalomeApp_IntSpinBox.h"
#include "SalomeApp_Application.h"
{
if( studyDS->IsString( aName ) )
{
+#ifndef DISABLE_PYCONSOLE
PyConsole_Console* pyConsole = app->pythonConsole();
PyConsole_Interp* pyInterp = pyConsole->getInterp();
PyLockWrapper aLock; // Acquire GIL
{
return IncorrectType;
}
+#endif
}
value = studyDS->GetInteger( aName );
return Found;
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
/* Define visibility state */
bool isComponent = dynamic_cast<SalomeApp_ModuleObject*>( suit_obj ) != 0;
- if ( suit_obj && !isComponent ) {
+ if ( suit_obj && !isComponent && myStudy->visibilityState( theID.c_str() ) == Qtx::UnpresentableState ) {
QString moduleTitle = ((CAM_Application*)myStudy->application())->moduleTitle(suit_obj->componentDataType());
if (!moduleTitle.isEmpty()) {
LightApp_Displayer* aDisplayer = LightApp_Displayer::FindDisplayer(moduleTitle,false);
if (aDisplayer) {
if(aDisplayer->canBeDisplayed(theID.c_str())) {
- myStudy->setVisibilityState( theID.c_str(), Qtx::HiddenState );
+ myStudy->setVisibilityState( theID.c_str(), Qtx::HiddenState ); //hide the just added object
//MESSAGE("Object with entry : "<< theID <<" CAN be displayed !!!");
}
else
}
break;
}
+#ifndef DISABLE_PYCONSOLE
case 6: //NoteBook variables were modified
{
myStudy->onNoteBookVarUpdate( QString( theID.c_str() ) );
break;
}
+#endif
default:MESSAGE("Unknown event: " << event);break;
} //switch
} //notifyObserverID_real
}
}
+#ifndef DISABLE_PYCONSOLE
void SalomeApp_Study::onNoteBookVarUpdate( QString theVarName)
{
emit notebookVarUpdated( theVarName );
}
+#endif
/*!
Gets study id.
_PTR(Study) studyPtr = studyDS();
if ( studyPtr )
{
- if(permanently) {
+ if ( myObserver )
+ myStudyDS->detach( myObserver->_this() );
+ if ( permanently ) {
SalomeApp_Application::studyMgr()->Close( studyPtr );
}
SALOMEDSClient_Study* aStudy = 0;
}
}
+#ifndef DISABLE_PYCONSOLE
/*!
Mark the study as saved in the file
\param theFileName - the name of file
studyDS()->Name(theFileName.toStdString());
setIsSaved( isSaved );
}
+#endif
LightApp_DataObject* SalomeApp_Study::findObjectByEntry( const QString& theEntry )
{
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
void setNameOfSavePoint(int savePoint, const QString& nameOfSavePoint);
virtual void restoreState(int savePoint);
+#ifndef DISABLE_PYCONSOLE
void updateFromNotebook(const QString&, bool);
+#endif
virtual LightApp_DataObject* findObjectByEntry( const QString& theEntry );
SUIT_DataObject* theParent ) const;
protected slots:
virtual void updateModelRoot( const CAM_DataModel* );
+#ifndef DISABLE_PYCONSOLE
void onNoteBookVarUpdate( QString theVarName );
+#endif
private:
QString newStudyName() const;
_PTR(Study) myStudyDS;
Observer_i* myObserver;
+#ifndef DISABLE_PYCONSOLE
signals:
void notebookVarUpdated( QString theVarName );
+#endif
};
#ifdef WIN32
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-# Copyright (C) 2012-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2012-2014 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.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
# -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
#
# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
-# version 2.1 of the License.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014 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.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# Copyright (C) 2012-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2012-2014 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.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# -*- coding: utf-8 -*-
-# Copyright (C) 2012-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2012-2014 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.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# -*- coding: utf-8 -*-
-# Copyright (C) 2010-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2010-2014 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.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# -*- coding: iso-8859-1 -*-
-# Copyright (C) 2010-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2010-2014 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.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# -*- coding: utf-8 -*-
#!/usr/bin/env python
-# Copyright (C) 2010-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2010-2014 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.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# -*- coding: iso-8859-1 -*-
-# Copyright (C) 2010-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2010-2014 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.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# -*- coding: iso-8859-1 -*-
-# Copyright (C) 2010-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2010-2014 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.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# Copyright (C) 2010-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2010-2014 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.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# -*- coding: iso-8859-1 -*-
-# Copyright (C) 2010-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2010-2014 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.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# -*- coding: iso-8859-1 -*-
-# Copyright (C) 2010-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2010-2014 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.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
#
# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
-# version 2.1 of the License.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
<!--
- Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+ Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
- version 2.1 of the License.
+ version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
<parameter name="multi_file_dump" value="false" />
<parameter name="pydump_save_gui" value="false" />
</section>
+ <section name="windows_geometry">
+ <parameter value="#00 #00 #00 #FF #00 #00 #00 #00 #FD #00 #00 #00 #02 #00 #00 #00 #00 #00 #00 #01 #00 #00 #00 #02 #88 #FC #02 #00 #00 #00 #01 #FC #00 #00 #00 #37 #00 #00 #02 #88 #00 #00 #00 #97 #01 #00 #00 #14 #FA #00 #00 #00 #00 #01 #00 #00 #00 #02 #FB #00 #00 #00 #10 #00 #77 #00 #69 #00 #6E #00 #64 #00 #6F #00 #77 #00 #5F #00 #30 #01 #00 #00 #00 #00 #FF #FF #FF #FF #00 #00 #00 #46 #00 #FF #FF #FF #FB #00 #00 #00 #10 #00 #77 #00 #69 #00 #6E #00 #64 #00 #6F #00 #77 #00 #5F #00 #33 #01 #00 #00 #00 #00 #00 #00 #01 #00 #00 #00 #00 #C0 #00 #FF #FF #FF #00 #00 #00 #03 #00 #00 #05 #40 #00 #00 #00 #53 #FC #01 #00 #00 #00 #01 #FB #00 #00 #00 #10 #00 #77 #00 #69 #00 #6E #00 #64 #00 #6F #00 #77 #00 #5F #00 #31 #01 #00 #00 #00 #00 #00 #00 #05 #40 #00 #00 #00 #46 #00 #FF #FF #FF #00 #00 #04 #38 #00 #00 #02 #88 #00 #00 #00 #04 #00 #00 #00 #04 #00 #00 #00 #08 #00 #00 #00 #08 #FC #00 #00 #00 #01 #00 #00 #00 #02 #00 #00 #00 #02 #00 #00 #00 #10 #00 #53 #00 #74 #00 #61 #00 #6E #00 #64 #00 #61 #00 #72 #00 #64 #01 #00 #00 #00 #00 #FF #FF #FF #FF #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #0E #00 #4D #00 #6F #00 #64 #00 #75 #00 #6C #00 #65 #00 #73 #01 #00 #00 #00 #CE #FF #FF #FF #FF #00 #00 #00 #00 #00 #00 #00 #00" name=""/>
+ </section>
+ <section name="windows_visibility">
+ <parameter value="#00 #00 #00 #00 #02 #00 #00 #00 #0E #00 #4D #00 #6F #00 #64 #00 #75 #00 #6C #00 #65 #00 #73 #01 #00 #00 #00 #10 #00 #53 #00 #74 #00 #61 #00 #6E #00 #64 #00 #61 #00 #72 #00 #64 #01 #01 #00 #00 #00 #03 #00 #00 #00 #10 #00 #77 #00 #69 #00 #6E #00 #64 #00 #6F #00 #77 #00 #5F #00 #30 #01 #00 #00 #00 #10 #00 #77 #00 #69 #00 #6E #00 #64 #00 #6F #00 #77 #00 #5F #00 #31 #01 #00 #00 #00 #10 #00 #77 #00 #69 #00 #6E #00 #64 #00 #6F #00 #77 #00 #5F #00 #33 #01" name=""/>
+ </section>
</document>
-# Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014 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.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# Copyright (C) 2012-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2012-2014 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.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
${OMNIORB_INCLUDE_DIR}
${PTHREAD_INCLUDE_DIR}
${PROJECT_BINARY_DIR}
+ ${PROJECT_BINARY_DIR}/idl
${PROJECT_SOURCE_DIR}/src/Qtx
${PROJECT_SOURCE_DIR}/src/SUIT
${PROJECT_SOURCE_DIR}/src/Event
${PROJECT_SOURCE_DIR}/src/Style
+ ${PROJECT_SOURCE_DIR}/src/SalomeApp
)
# additional preprocessor / compiler flags
${KERNEL_SalomeLauncher}
${KERNEL_Registry}
${KERNEL_SALOMEBasics}
- qtx suit Event SalomeStyle SalomeIDLGUI
+ qtx suit Event SalomeStyle SalomeApp SalomeIDLGUI
)
IF(ENABLE_TESTRECORDER)
LIST(APPEND _link_LIBRARIES ${TESTRECORDER_LIBS})
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
#include "SALOME_NamingService.hxx"
#include "SALOME_Event.h"
-
+#include "SalomeApp_Engine_i.h"
#include "SUIT_Session.h"
#include "SUIT_Desktop.h"
#include "SUIT_Study.h"
typedef Engines::EngineComponent_ptr TGetImpl(CORBA::ORB_ptr,
PortableServer::POA_ptr,
SALOME_NamingService*,QMutex*);
- OSD_SharedLibrary aSharedLibrary(const_cast<char*>(theLibraryName));
- if(aSharedLibrary.DlOpen(OSD_RTLD_LAZY))
- if(OSD_Function anOSDFun = aSharedLibrary.DlSymb("GetImpl"))
+ OSD_SharedLibrary aSharedLibrary(const_cast<char*>(theLibraryName));
+ if (aSharedLibrary.DlOpen(OSD_RTLD_LAZY)) {
+ if (OSD_Function anOSDFun = aSharedLibrary.DlSymb("GetImpl"))
return ((TGetImpl (*)) anOSDFun)(_orb,_poa,_NS,_GUIMutex);
+ }
+ CORBA::Object_var obj = SalomeApp_Engine_i::EngineForComponent(theLibraryName, true);
+ if (!CORBA::is_nil(obj)){
+ Engines::EngineComponent_var anEngine = Engines::EngineComponent::_narrow(obj);
+ return anEngine._retn();
+ }
return Engines::EngineComponent::_nil();
}
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-# Copyright (C) 2012-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2012-2014 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.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
<!--
- Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+ Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
- version 2.1 of the License.
+ version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
-# Copyright (C) 2012-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2012-2014 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.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-# Copyright (C) 2012-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2012-2014 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.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-# Copyright (C) 2012-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2012-2014 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.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-# Copyright (C) 2012-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2012-2014 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.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
bool InitializeBufferExtensions()
{
-
vglShaderSourceARB = (PFNGLSHADERSOURCEARBPROC)GL_GetProcAddress( "glShaderSourceARB" );
if( !vglShaderSourceARB )
return false;
this->MarkerScale = VTK::MS_NONE;
this->MarkerId = 0;
this->BallEnabled = false;
+ this->BallScale = 1.0;
+ this->VertexProgram = 0;
}
//-----------------------------------------------------------------------------
this->Modified();
}
+//-----------------------------------------------------------------------------
+double VTKViewer_PolyDataMapper::GetBallScale()
+{
+ return this->BallScale;
+}
+//-----------------------------------------------------------------------------
+void VTKViewer_PolyDataMapper::SetBallScale( double theBallScale )
+{
+ if( this->BallScale == theBallScale )
+ return;
+ this->BallScale = theBallScale;
+}
+
//-----------------------------------------------------------------------------
void VTKViewer_PolyDataMapper::SetMarkerStd( VTK::MarkerType theMarkerType, VTK::MarkerScale theMarkerScale )
{
this->InitTextures();
}
- if(!this->BallEnabled) {
+ if(!this->BallEnabled || this->ExtensionsInitialized != ES_Ok) {
MAPPER_SUPERCLASS::RenderPiece( ren, act );
if( isUsePointSprites )
this->CleanupPointSprites();
TVertex* theVertexArr,
vtkIdType &theCellId,
vtkIdType &theVertexId,
- TBall* theBallArr,
- vtkDataArray* theDiamArray)
+ TBall* theBallArr,
+ vtkDataArray* theDiamArray,
+ double theBallScale )
{
vtkIdType* ptIds = theCells->GetPointer();
vtkIdType* endPtIds = ptIds + theCells->GetNumberOfConnectivityEntries();
}
if(mapBalls){
- theBallArr[theCellId] = (TBall)theDiamArray->GetTuple(theCellId)[0];
+ theBallArr[theCellId] = (TBall)theDiamArray->GetTuple(theCellId)[0]*theBallScale;
}
++theCellId;
vtkPoints* thePoints,
TColorFunctorBase* theColorFunctor,
TVertex* theVertexArr,
- TBall* theBallArr)
+ TBall* theBallArr,
+ double theBallScale )
{
vtkIdType aCellId = 0, aVertexId = 0;
vtkDataArray* aDiams = theInput->GetCellData() ? theInput->GetCellData()->GetScalars() : 0;
if ( vtkCellArray* aCellArray = theInput->GetVerts() ) {
- DrawPoints( aStartPoints, aCellArray, theColorFunctor, theVertexArr, aCellId, aVertexId, theBallArr, aDiams);
+ DrawPoints( aStartPoints, aCellArray, theColorFunctor, theVertexArr, aCellId, aVertexId, theBallArr, aDiams, theBallScale );
}
if ( vtkCellArray* aCellArray = theInput->GetLines() )
- DrawPoints( aStartPoints, aCellArray, theColorFunctor, theVertexArr, aCellId, aVertexId, theBallArr, aDiams);
+ DrawPoints( aStartPoints, aCellArray, theColorFunctor, theVertexArr, aCellId, aVertexId, theBallArr, aDiams, theBallScale );
if ( vtkCellArray* aCellArray = theInput->GetPolys() )
- DrawPoints( aStartPoints, aCellArray, theColorFunctor, theVertexArr, aCellId, aVertexId, theBallArr, aDiams);
+ DrawPoints( aStartPoints, aCellArray, theColorFunctor, theVertexArr, aCellId, aVertexId, theBallArr, aDiams, theBallScale );
if ( vtkCellArray* aCellArray = theInput->GetStrips() )
- DrawPoints( aStartPoints, aCellArray, theColorFunctor, theVertexArr, aCellId, aVertexId, theBallArr, aDiams);
+ DrawPoints( aStartPoints, aCellArray, theColorFunctor, theVertexArr, aCellId, aVertexId, theBallArr, aDiams, theBallScale );
}
} // namespace VTK
aColorFunctor = new VTK::TPropertyColor( prop );
}
if ( points->GetDataType() == VTK_FLOAT )
- VTK::DrawCellsPoints< float >( input, points, aColorFunctor, aVertexArr, aBallArray );
+ VTK::DrawCellsPoints< float >( input, points, aColorFunctor, aVertexArr, aBallArray, GetBallScale() );
else
- VTK::DrawCellsPoints< double >( input, points, aColorFunctor, aVertexArr, aBallArray );
+ VTK::DrawCellsPoints< double >( input, points, aColorFunctor, aVertexArr, aBallArray, GetBallScale() );
delete aColorFunctor;
}
vglDeleteBuffersARB( 2, &aDiamsID );
}
- } else { // there are no extensions
+ } else { // there are no extensions
glColorPointer( 4, GL_FLOAT, sizeof(VTK::TVertex), aVertexArr );
glVertexPointer( 3, GL_FLOAT, sizeof(VTK::TVertex),
(void*)((GLfloat*)((void*)(aVertexArr)) + 4));
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
bool GetBallEnabled( );
+ //! Set ball scale factor
+ void SetBallScale( double );
+
+ double GetBallScale( );
+
//! Set standard point marker
void SetMarkerStd( VTK::MarkerType, VTK::MarkerScale );
GLhandleARB VertexProgram;
bool MarkerEnabled;
- bool BallEnabled;
+ bool BallEnabled;
+ double BallScale;
VTK::MarkerType MarkerType;
VTK::MarkerScale MarkerScale;
int MarkerId;
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
return !isAny;
}
+/*!
+ Check that the given bounding box is valid, i.e each min bound < each max bound
+*/
+
+bool isBoundValid(double* theBounds) {
+ if(theBounds[0] > theBounds[1] ||
+ theBounds[2] > theBounds[3] ||
+ theBounds[4] > theBounds[5])
+ return false;
+ else
+ return true;
+}
+
bool ComputeBBCenter(vtkRenderer* theRenderer, double theCenter[3])
{
theCenter[0] = theCenter[1] = theCenter[2] = 0.0;
if(anActor->GetVisibility() && !anActor->IsInfinitive())
{
double *aBounds = anActor->GetBounds();
+
+ //Ignore invalid bounds
+ if(!isBoundValid(aBounds)) continue;
+
if(aBounds[0] > -VTK_LARGE_FLOAT && aBounds[1] < VTK_LARGE_FLOAT &&
aBounds[2] > -VTK_LARGE_FLOAT && aBounds[3] < VTK_LARGE_FLOAT &&
aBounds[4] > -VTK_LARGE_FLOAT && aBounds[5] < VTK_LARGE_FLOAT)
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
extern
bool ComputeBBCenter(vtkRenderer* theRenderer,
double theCenter[3]);
+VTKVIEWER_EXPORT
+extern
+bool isBoundValid(double* theBounds);
#endif
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-# Copyright (C) 2012-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2012-2014 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.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-# Copyright (C) 2012-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2012-2014 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.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-# Copyright (C) 2012-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2012-2014 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.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-SET(SUBDIRS
- vtkEDFOverloads
- dlgfactory
-)
-FOREACH(dir ${SUBDIRS})
- ADD_SUBDIRECTORY(${dir})
-ENDFOREACH(dir ${SUBDIRS})
-
+ADD_SUBDIRECTORY(dlgfactory)
+
+IF(SALOME_USE_VTKVIEWER)
+ ADD_SUBDIRECTORY(vtkEDFOverloads)
+ENDIF()
-# Copyright (C) 2012-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2012-2014 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.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
+// Copyright (C) 2011-2014 CEA/DEN, EDF R&D, OPEN CASCADE
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
#include "GenericDialog.h"
GenericDialog::GenericDialog(QDialog *parent) : QDialog(parent)
+// Copyright (C) 2011-2014 CEA/DEN, EDF R&D, OPEN CASCADE
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
#ifndef _GenericDialog_HXX
#define _GenericDialog_HXX
+# Copyright (C) 2010-2014 CEA/DEN, EDF R&D, OPEN CASCADE
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
This package provides a simple tool to generates the bootstrap files
of a standard Qt dialog. Nothing original neither very smart, but just
help to initiate all this stuff the good way.
#!/usr/bin/env python
-# Copyright (C) 2010-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2010-2014 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.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
#!/bin/sh
-# Copyright (C) 2010-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2010-2014 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.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2010-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2010-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2010-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2010-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-# Copyright (C) 2012-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2012-2014 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.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2010-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2010-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2010-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2010-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2010-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2010-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2010-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2010-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// Copyright (C) 2010-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2010-2014 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.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of