From: vsr Date: Fri, 15 Jul 2011 10:37:48 +0000 (+0000) Subject: Merge from V6_3_BR 15/07/2011 X-Git-Tag: OpenCV_demo1~18 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=06d7eefaa7ece7bbb752334401f01af1d62d9357;p=modules%2Fgui.git Merge from V6_3_BR 15/07/2011 --- diff --git a/adm_local/cmake_files/FindSIPPYQT.cmake b/adm_local/cmake_files/FindSIPPYQT.cmake index 27dce25d5..a8c397c80 100644 --- a/adm_local/cmake_files/FindSIPPYQT.cmake +++ b/adm_local/cmake_files/FindSIPPYQT.cmake @@ -25,11 +25,7 @@ GET_FILENAME_COMPONENT(SIP_ROOT ${SIP_ROOT} PATH) GET_FILENAME_COMPONENT(SIP_ROOT ${SIP_ROOT} PATH) ENDIF(SIP_ROOT) -IF(WINDOWS) - SET(SIP_INCLUDES -I${SIP_ROOT}/include) -ELSE(WINDOWS) - SET(SIP_INCLUDES -I${SIP_ROOT}/include/python${PYTHON_VERSION}) -ENDIF(WINDOWS) +SET(SIP_INCLUDES -I${SIP_ROOT}/include/python${PYTHON_VERSION}) IF(WINDOWS) FIND_PROGRAM(PYUIC_EXECUTABLE NAMES pyuic4 pyuic4.bat) diff --git a/adm_local/cmake_files/FindVTK.cmake b/adm_local/cmake_files/FindVTK.cmake index 7ff7f07d3..9ab48bdea 100644 --- a/adm_local/cmake_files/FindVTK.cmake +++ b/adm_local/cmake_files/FindVTK.cmake @@ -47,6 +47,8 @@ SET(VTK_LIBS ${VTK_LIBS} ${VTK_WIDGETS}) FIND_LIBRARY(vtkCommonPythonD vtkCommonPythonD ${VTK_LIBRARY_DIRS} NO_DEFAULT_PATH) FIND_LIBRARY(vtkGraphicsPythonD vtkGraphicsPythonD ${VTK_LIBRARY_DIRS} NO_DEFAULT_PATH) FIND_LIBRARY(vtkImagingPythonD vtkImagingPythonD ${VTK_LIBRARY_DIRS} NO_DEFAULT_PATH) +FIND_LIBRARY(vtkPythonCore vtkPythonCore ${VTK_LIBRARY_DIRS} NO_DEFAULT_PATH) + #IF(NOT WINDOWS) # IF(VTK_MAJOR_VERSION STREQUAL 5) diff --git a/bin/runLightSalome.sh b/bin/runLightSalome.sh index fe7dd662b..6695b8483 100755 --- a/bin/runLightSalome.sh +++ b/bin/runLightSalome.sh @@ -1,4 +1,5 @@ #!/bin/bash -f + # Copyright (C) 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE # # Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, @@ -23,128 +24,216 @@ # File : runLightSalome.sh # Author : Vadim SANDLER, Open CASCADE S.A.S, vadim.sandler@opencascade.com + + ### -# set default value for the LightAppConfig variable, which -# is necessary for loading of .ini or .xml resources file +# function show_usage() : print help an exit ### -# -if [ -z "$LightAppConfig" ] ; then - export LightAppConfig=${GUI_ROOT_DIR}/share/salome/resources/gui -else - export LightAppConfig=${LightAppConfig}:${GUI_ROOT_DIR}/share/salome/resources/gui -fi -if [ -z "$LightAppResources" ] ; then - export LightAppResources=${GUI_ROOT_DIR}/share/salome/resources/gui -else - export LightAppResources=${LightAppResources}:${GUI_ROOT_DIR}/share/salome/resources/gui -fi + +show_usage() { + local RET=0 + if [ $# -gt 0 ] ; then RET=$1 ; fi + local MOVE1="echo -en \\033[35G" + local MOVE2="echo -en \\033[22G" + echo + echo "Run standalone SALOME desktop". + echo + echo "Usage: $(basename $0) [options]" + echo + echo "Options:" + echo " * all options have both short and long format;" + echo " * some options require additional parameter (below referenced as )" + echo " which should be separated by = symbol from the option itself." + echo + echo -en " --help" + ${MOVE2} ; echo -en "(-h)" + ${MOVE1} ; echo "Display this information and exit." + echo -en " --version" + ${MOVE2} ; echo -en "(-v)" + ${MOVE1} ; echo "Print SALOME version and exit." + echo -en " --modules=" + ${MOVE2} ; echo -en "(-m)" + ${MOVE1} ; echo "List of modules, separated by comma, to be used within SALOME session." + echo + echo "Example:" + echo " $(basename $0) --modules=LIGHT,PYLIGHT" + echo + exit ${RET} +} ### -# process --modules=... command line option (get list of modules) +# function show_version() : print SALOME version an exit ### -modules="" - -for arg in X $* ; do - if [ "$arg" != "X" ] ; then - case $arg in - --modules=* ) modules=`echo $arg | awk -F= '{ print $2 }' | sed -e "s%,% %g"` ;; - *) ;; - esac +show_version() { + local RET=0 + local DIR=$(dirname $0) + if [ -z "${DIR}" ] ; then DIR=. ; fi + if [ -f ${DIR}/VERSION ] ; then + cat ${DIR}/VERSION + else + echo + echo "Error: can't find VERSION file" > /dev/stderr + echo + RET=1 fi -done - -modules="KERNEL GUI $modules" + exit ${RET} +} ### -# exclude modules duplication +# function option_modules() : process --modules / -m command line option ### -mods="" - -for mod in $modules ; do - echo $mods | grep -E "\<$mod\>" >/dev/null 2>&1 - if [ "$?" == "1" ] ; then - mods="$mods $mod" +option_modules() { + local MODS=`echo $1 | awk -F "=" '{ if(NF>1) print $2 ; else print $1 }'` + if [ "X${MODS}" = "X" ] ; then + echo + echo "Error: Please, specify list of modules" > /dev/stderr + echo + exit 1 fi -done + MODULES=`echo ${MODS} | sed -e "s%,% %g"` + return +} + ### -# set additional environment +# function run_light_salome(): run SALOME ### -python_version=`python -c "import sys; print sys.version[:3]" 2>/dev/null` - -MY_PATH="" -MY_LD_LIBRARY_PATH="" -MY_PYTHONPATH="" - -for mod in $mods ; do - if [ "$arg" != "X" ] ; then - root_dir=`printenv ${mod}_ROOT_DIR` - if [ "$root_dir" != "" ] ; then - mod_lower=`echo $mod | tr "A-Z" "a-z"` - if [ -d ${root_dir}/bin/salome ] ; then - if [ "${MY_PATH}" == "" ] ; then - MY_PATH=${root_dir}/bin/salome - else - MY_PATH=${MY_PATH}:${root_dir}/bin/salome - fi - fi - if [ -d ${root_dir}/lib/salome ] ; then - if [ "${MY_LD_LIBRARY_PATH}" == "" ] ; then - MY_LD_LIBRARY_PATH=${root_dir}/lib/salome - else - MY_LD_LIBRARY_PATH=${MY_LD_LIBRARY_PATH}:${root_dir}/lib/salome - fi +run_light_salome(){ + + local MODULES + + ### + # process command line options + ### + + local OPTION + while getopts ":-:hvm:" OPTION "$@" ; do + if [ "${OPTION}" = "-" ] ; then + case ${OPTARG} in + help ) show_usage ;; + version ) show_version ;; + modules* ) option_modules "${OPTARG}" ;; + * ) echo "!!!Wrong option!!!" ; exit 1 ;; + esac + else + case ${OPTION} in + h ) show_usage ;; + v ) show_version ;; + m* ) option_modules "${OPTARG}" ;; + ? ) echo "!!!Wrong option!!!" ; exit 1 ;; + esac + fi + done + shift $((OPTIND - 1)) + + ### + # by default try to detect all available modules + ### + + if [ -z "${MODULES}" ] ; then + local ENVVAR + local ROOTDIR + for ENVVAR in `env | awk -F= '{print $1}' | grep _ROOT_DIR` ; do + local MOD=`echo $ENVVAR | awk -F_ '{print $1}'` + local LMOD=`echo ${MOD} | tr 'A-Z' 'a-z'` + ROOTDIR=`printenv ${ENVVAR}` + if [ -f ${ROOTDIR}/share/salome/resources/${LMOD}/LightApp.xml ] || [ -f ${ROOTDIR}/share/salome/resources/LightApp.xml ] ; then + MODULES="${MODULES} ${MOD}" fi - if [ "${python_version}" != "" ] ; then - if [ -d ${root_dir}/bin/salome ] ; then - if [ "${MY_PYTHONPATH}" == "" ] ; then - MY_PYTHONPATH=${root_dir}/bin/salome - else - MY_PYTHONPATH=${MY_PYTHONPATH}:${root_dir}/bin/salome - fi - fi - if [ -d ${root_dir}/lib/salome ] ; then - if [ "${MY_PYTHONPATH}" == "" ] ; then - MY_PYTHONPATH=${root_dir}/lib/salome - else - MY_PYTHONPATH=${MY_PYTHONPATH}:${root_dir}/lib/salome - fi - fi - if [ -d ${root_dir}/lib/python${python_version}/site-packages/salome ] ; then - if [ "${MY_PYTHONPATH}" == "" ] ; then - MY_PYTHONPATH=${root_dir}/lib/python${python_version}/site-packages/salome - else - MY_PYTHONPATH=${MY_PYTHONPATH}:${root_dir}/lib/python${python_version}/site-packages/salome - fi - fi + done + fi + + ### + # initial environment + ### + + if [ -z "${LightAppResources}" ] ; then + export LightAppResources=${GUI_ROOT_DIR}/share/salome/resources/gui + else + export LightAppResources=${LightAppResources}:${GUI_ROOT_DIR}/share/salome/resources/gui + fi + + MODULES="KERNEL GUI ${MODULES}" + + ### + # exclude modules duplication + ### + + local MODS="" + local MOD + for MOD in ${MODULES} ; do + echo ${MODS} | grep -E "\<${MOD}\>" >/dev/null 2>&1 + if [ "$?" == "1" ] ; then + MODS="${MODS} ${MOD}" + fi + done + MODULES=${MODS} + + ### + # set additional environment + ### + + local PVERSION=`python -c "import sys; print sys.version[:3]" 2>/dev/null` + + local MY_PATH="" + local MY_LD_LIBRARY_PATH="" + local MY_PYTHONPATH="" + + for MOD in ${MODULES} ; do + local ROOTDIR=`printenv ${MOD}_ROOT_DIR` + if [ -z "${ROOTDIR}" ] ; then continue ; fi + local LMOD=`echo ${MOD} | tr 'A-Z' 'a-z'` + if [ -d ${ROOTDIR}/bin/salome ] ; then + MY_PATH=${MY_PATH}:${ROOTDIR}/bin/salome + fi + if [ -d ${ROOTDIR}/lib/salome ] ; then + MY_LD_LIBRARY_PATH=${MY_LD_LIBRARY_PATH}:${ROOTDIR}/lib/salome + fi + if [ "${PVERSION}" != "" ] ; then + if [ -d ${ROOTDIR}/bin/salome ] ; then + MY_PYTHONPATH=${MY_PYTHONPATH}:${ROOTDIR}/bin/salome fi - if [ "$mod" != "KERNEL" ] && [ "$mod" != "GUI" ] ; then - export LightAppConfig=${LightAppConfig}:${root_dir}/share/salome/resources/${mod_lower} + if [ -d ${ROOTDIR}/lib/salome ] ; then + MY_PYTHONPATH=${MY_PYTHONPATH}:${ROOTDIR}/lib/salome fi - if [ "${SALOMEPATH}" == "" ] ; then - export SALOMEPATH=${root_dir} - else - export SALOMEPATH=${SALOMEPATH}:${root_dir} + if [ -d ${ROOTDIR}/lib/python${PVERSION}/site-packages/salome ] ; then + MY_PYTHONPATH=${MY_PYTHONPATH}:${ROOTDIR}/lib/python${PVERSION}/site-packages/salome fi fi - fi -done - -if [ "${MY_PATH}" != "" ] ; then - export PATH=${MY_PATH}:${PATH} -fi -if [ "${MY_LD_LIBRARY_PATH}" != "" ] ; then - export LD_LIBRARY_PATH=${MY_LD_LIBRARY_PATH}${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} -fi -if [ "${PYTHONPATH}" != "" ] ; then - export PYTHONPATH=${MY_PYTHONPATH}:${PYTHONPATH} -fi + if [ -f ${ROOTDIR}/share/salome/resources/${LMOD}/LightApp.xml ] ; then + export LightAppConfig=${LightAppConfig}:${ROOTDIR}/share/salome/resources/${LMOD} + elif [ -f ${ROOTDIR}/share/salome/resources/LightApp.xml ] ; then + export LightAppConfig=${LightAppConfig}:${ROOTDIR}/share/salome/resources + fi + export SALOMEPATH=${SALOMEPATH}:${ROOTDIR} + done + + PATH=${MY_PATH}:${PATH} + PATH=`echo ${PATH} | sed -e "s,^:,,;s,:$,,;s,::\+,:,g"` + export PATH + LD_LIBRARY_PATH=${MY_LD_LIBRARY_PATH}:${LD_LIBRARY_PATH} + LD_LIBRARY_PATH=`echo ${LD_LIBRARY_PATH} | sed -e "s,^:,,;s,:$,,;s,::\+,:,g"` + export LD_LIBRARY_PATH + PYTHONPATH=${MY_PYTHONPATH}:${PYTHONPATH} + PYTHONPATH=`echo ${PYTHONPATH} | sed -e "s,^:,,;s,:$,,;s,::\+,:,g"` + export PYTHONPATH + LightAppConfig=`echo ${LightAppConfig} | sed -e "s,^:,,;s,:$,,;s,::\+,:,g"` + export LightAppConfig + SALOMEPATH=`echo ${SALOMEPATH} | sed -e "s,^:,,;s,:$,,;s,::\+,:,g"` + export SALOMEPATH + + ### + # start application + ### + + SUITApp LightApp "$*" & +} ### -# start application +# call wrapper function (entry point) ### -SUITApp LightApp $* & +run_light_salome "$@" \ No newline at end of file diff --git a/configure.ac b/configure.ac index 5efad0d95..b475a8b58 100644 --- a/configure.ac +++ b/configure.ac @@ -26,7 +26,7 @@ # Modified by : Marc Tajchman (CEA) # Modified by : Mikhail PONIKAROV (OCN) - autotools usage # -AC_INIT([Salome2 Project GUI module], [6.3.0], [webmaster.salome@opencascade.com], [SalomeGUI]) +AC_INIT([Salome2 Project GUI module], [6.3.1], [webmaster.salome@opencascade.com], [SalomeGUI]) AC_CONFIG_AUX_DIR(adm_local/unix/config_files) AC_CANONICAL_HOST AC_CANONICAL_TARGET diff --git a/doc/salome/gui/input/occ_3d_viewer.doc b/doc/salome/gui/input/occ_3d_viewer.doc index c241e0288..b9260278f 100644 --- a/doc/salome/gui/input/occ_3d_viewer.doc +++ b/doc/salome/gui/input/occ_3d_viewer.doc @@ -173,8 +173,8 @@ light" flag on/off \image html occ_view_minimized.png
\image html occ_view_maximized.png -
Minimize/Maximize - these buttons allow switch -current view area to the minimized / maximized state.
+
Minimize/Maximize - these buttons allow switching +the current view area to the minimized / maximized state.

\note OCC Viewer features a special Polyline Selection diff --git a/doc/salome/gui/input/salome_preferences.doc b/doc/salome/gui/input/salome_preferences.doc index 26370e56f..d37ea6910 100644 --- a/doc/salome/gui/input/salome_preferences.doc +++ b/doc/salome/gui/input/salome_preferences.doc @@ -16,14 +16,13 @@ whole study session. diff --git a/doc/salome/gui/input/themes.doc b/doc/salome/gui/input/themes.doc index 9fff17ae3..4204270b3 100755 --- a/doc/salome/gui/input/themes.doc +++ b/doc/salome/gui/input/themes.doc @@ -2,26 +2,44 @@ \page themes_page Theme -\b Theme dialog is used for customization of the look and feel of -Salome. To open it, select in the Main menu View -> Theme . +The look-n-feel of the SALOME desktop can be customized by the user +via the SALOME theme preferences. + +SALOME style prefereces dialog box is used for customization of +the look and feel of SALOME style. To open it, select in the Main menu +View -> Theme item. + +If SALOME theme is not used (Use SALOME Style check bos is +switched off), the global system settings are applied (for +example, those ones specified by the KDE settings). +In such a way, the application's look-n-feel attributes (such as +palette and/or font) can be customized by using of the Qt utility +qtconfig. + +Alternatively look-n-feel of the application desktop can be customized +using SALOME theme. \image html theme1.png -It is possible to choose a predefined color scheme in the list to the left -or to edit your custom color scheme using the controls to the right. +It is possible to choose a predefined scheme in the list to the left +or create custom scheme using the controls to the right. -\b Quick button allows to apply color change made in one position to all -other positions using this color. +The dialog box contains two pages. + +The first page allows specifying of the color palette. +- \b Quick button allows automatic color palette definition basing on +one main color specified by the user. \image html theme2.png - -*/ \ No newline at end of file +The second page allows specifying different properties of the theme: + +- \b Font group allows to edit the font used in menus, dialog boxes, etc. +- \b Lines group allows to apply dashing to Salome elements. +- Widgets rounding allows to round corners of Salome dialog +boxes and define their parameters. +- \b Handle allows to define parameters of the handle. +- Widget effect allows to apply special effects to Salome +dialog boxes. + +*/ diff --git a/doc/salome/gui/input/vtk_3d_viewer.doc b/doc/salome/gui/input/vtk_3d_viewer.doc index b344eb37e..c0d249d2b 100644 --- a/doc/salome/gui/input/vtk_3d_viewer.doc +++ b/doc/salome/gui/input/vtk_3d_viewer.doc @@ -162,36 +162,36 @@ of the view:
\image html vtk_view_parameters_dlg.png
-- Projection Mode - switch to the Orthogonal / Perspective +- Projection Mode - switchs to the Orthogonal / Perspective projection mode - Focal Point - allows to specify the focal point of the view - - Set to Bounding Box Center - chooses center of the current - scence bounding box as a focal point - - Set to Origin - chooses global coordinates system origin as - a focal point - - Select Point from View - allows specify focal point by the - direct selection of some point in the view window - - X, Y, Z - input coordinates of the focal + - Set to Bounding Box Center - chooses the center of the + bounding box of the current scene as the focal point. + - Set to Origin - chooses the global coordinates system origin as + the focal point + - Select Point from View - allows to specify the focal point by the + direct selection of a point in the view window + - X, Y, Z - allows to input the coordinates of the focal point directly -- Camera Position - allows to specify view camera's position: - - Absolute Coordinates - either in absolute coordinates - - Relative to Focal Point - or as a offset to the focal point - - Projection Direction - allows specify direction of the - projection vector - - Focal Distance - focal distance value - - View Up Direction - direction of the "view up" vector -- Zooming - current zoom factor (available in the Orthogonal +- Camera Position - allows to specify the position of the view camera: + - Absolute Coordinates - either in absolute coordinates, + - Relative to Focal Point - or as a offset to the focal point; + - Projection Direction - allows specify the direction of the + projection vector; + - Focal Distance - the focal distance value; + - View Up Direction - direction of the "view up" vector. +- Zooming - the current zoom factor (available in the Orthogonal mode only) -- View Angle - current view angle (available in the Perspective +- View Angle - the current view angle (available in the Perspective mode only)
\image html vtk_view_parallel.png -
Orthogonal mode - Switch view to the orthogonal mode.
+
Orthogonal mode - Switches the view to the orthogonal mode.

\image html vtk_view_perspective.png -
Perspective mode - Switch view to the perspective mode.
+
Perspective mode - Switches the view to the perspective mode.

\image html vtk_view_recording_start.png @@ -200,9 +200,9 @@ of the view:
\image html vtk_view_recording_stop.png
These buttons allow recording viewing operations as a video file in the AVI format using external software (jpeg2yuv):
-- Start recording - specify parameters and start recording -- Pause recording - suspend recording -- Continue recording - resume recording -- Stop recording - stop recording +- Start recording - specify parameters and start recording; +- Pause recording - suspend recording; +- Continue recording - resume recording; +- Stop recording - stop recording. */ diff --git a/src/CAM/CAM_Application.cxx b/src/CAM/CAM_Application.cxx index 59018337c..d60ce80f7 100755 --- a/src/CAM/CAM_Application.cxx +++ b/src/CAM/CAM_Application.cxx @@ -387,10 +387,15 @@ bool CAM_Application::activateModule( CAM_Module* mod ) if ( myModule ) { + // VSR: 26/06/2011 bug 0021307: temporarily disable desktop's signals to prevent false module activation + bool signalsBlocked = desktop() && desktop()->signalsBlocked(); + if ( desktop() ) desktop()->blockSignals( true ); if ( !myModule->deactivateModule( activeStudy() ) ) { // .... } + // VSR: 26/06/2011 bug 0021307: enable desktop's signals back + if ( desktop() ) desktop()->blockSignals( signalsBlocked ); } myModule = mod; diff --git a/src/LightApp/LightApp_Study.cxx b/src/LightApp/LightApp_Study.cxx index e481427b0..4bbf7a886 100644 --- a/src/LightApp/LightApp_Study.cxx +++ b/src/LightApp/LightApp_Study.cxx @@ -550,9 +550,9 @@ QVariant LightApp_Study::getObjectProperty(int theViewMgrId, QString theEntry, Q QVariant& aResult = theDefValue; ViewMgrMap::ConstIterator v_it = myViewMgrMap.find(theViewMgrId); if(v_it != myViewMgrMap.end()){ - const ObjMap& anOnjectMap = v_it.value(); - ObjMap::ConstIterator o_it = anOnjectMap.find(theEntry); - if(o_it != anOnjectMap.end()) { + const ObjMap& anObjectMap = v_it.value(); + ObjMap::ConstIterator o_it = anObjectMap.find(theEntry); + if(o_it != anObjectMap.end()) { const PropMap& aPropMap = o_it.value(); PropMap::ConstIterator p_it = aPropMap.find(thePropName); if(p_it != aPropMap.end()) { @@ -580,22 +580,24 @@ void LightApp_Study::removeViewMgr( int theViewMgrId ) { */ const PropMap& LightApp_Study::getObjectPropMap(int theViewMgrId, QString theEntry) { ViewMgrMap::Iterator v_it = myViewMgrMap.find(theViewMgrId); - if(v_it != myViewMgrMap.end()){ - ObjMap& anOnjectMap = v_it.value(); - ObjMap::Iterator o_it = anOnjectMap.find(theEntry); - if(o_it != anOnjectMap.end()) { + if (v_it != myViewMgrMap.end()) { + ObjMap& anObjectMap = v_it.value(); + ObjMap::Iterator o_it = anObjectMap.find(theEntry); + if(o_it != anObjectMap.end()) { return o_it.value(); } else { PropMap aPropMap; - anOnjectMap.insert(theEntry, aPropMap); - return anOnjectMap.find(theEntry).value(); + anObjectMap.insert(theEntry, aPropMap); + return anObjectMap.find(theEntry).value(); } } else { PropMap aPropMap; ObjMap anObjMap; anObjMap.insert(theEntry,aPropMap); myViewMgrMap.insert(theViewMgrId, anObjMap); - return anObjMap.find(theEntry).value(); + + ObjMap& anObjectMap = myViewMgrMap.find(theViewMgrId).value(); + return anObjectMap.find(theEntry).value(); } } diff --git a/src/OCCViewer/OCCViewer_ViewFrame.cxx b/src/OCCViewer/OCCViewer_ViewFrame.cxx index 3e7919e65..e8a855f5c 100644 --- a/src/OCCViewer/OCCViewer_ViewFrame.cxx +++ b/src/OCCViewer/OCCViewer_ViewFrame.cxx @@ -263,6 +263,24 @@ QString OCCViewer_ViewFrame::backgroundImageFilename() const return getView(MAIN_VIEW)->backgroundImageFilename(); } +QImage OCCViewer_ViewFrame::dumpView() +{ + foreach (OCCViewer_ViewWindow* aView, myViews) { + if (aView->isVisible()) + return aView->dumpView(); + } + return QImage(); +} + +bool OCCViewer_ViewFrame::dumpViewToFormat( const QImage& image, const QString& fileName, const QString& format ) +{ + foreach (OCCViewer_ViewWindow* aView, myViews) { + if (aView->isVisible()) + return aView->dumpViewToFormat( image, fileName, format ); + } + return false; +} + void OCCViewer_ViewFrame::onContextMenuRequested(QContextMenuEvent*) { myPopupRequestedView = dynamic_cast(sender()); diff --git a/src/OCCViewer/OCCViewer_ViewFrame.h b/src/OCCViewer/OCCViewer_ViewFrame.h index 4297bcdb3..f1396d7a6 100644 --- a/src/OCCViewer/OCCViewer_ViewFrame.h +++ b/src/OCCViewer/OCCViewer_ViewFrame.h @@ -115,6 +115,10 @@ public slots: virtual void onDumpView(); +protected: + virtual QImage dumpView(); + virtual bool dumpViewToFormat( const QImage&, const QString&, const QString& ); + private slots: void onContextMenuRequested(QContextMenuEvent*); diff --git a/src/OCCViewer/OCCViewer_ViewWindow.h b/src/OCCViewer/OCCViewer_ViewWindow.h index 7d6afb508..7eb3f87f8 100755 --- a/src/OCCViewer/OCCViewer_ViewWindow.h +++ b/src/OCCViewer/OCCViewer_ViewWindow.h @@ -238,9 +238,11 @@ signals: void Hide( QHideEvent * ); void maximized( OCCViewer_ViewWindow*, bool ); -protected: +public: virtual QImage dumpView(); virtual bool dumpViewToFormat( const QImage&, const QString& fileName, const QString& format ); + +protected: virtual QString filter() const; /* Transformation selected but not started yet */ diff --git a/src/SALOME_PY/Makefile.am b/src/SALOME_PY/Makefile.am index b7364b6e3..4ad2b0a83 100755 --- a/src/SALOME_PY/Makefile.am +++ b/src/SALOME_PY/Makefile.am @@ -41,4 +41,4 @@ libSalomePy_la_CPPFLAGS = $(QT_INCLUDES) $(PYTHON_INCLUDES) $(VTK_INCLUDES) \ libSalomePy_la_LDFLAGS = $(PYTHON_LIBS) $(QT_MT_LIBS) $(VTK_LIBS) $(OGL_LIBS) \ ../LightApp/libLightApp.la \ - -lvtkCommonPythonD -lvtkGraphicsPythonD -lvtkImagingPythonD + -lvtkCommonPythonD -lvtkGraphicsPythonD -lvtkImagingPythonD -lvtkPythonCore diff --git a/src/SALOME_SWIG/SALOMEGUI_Swig.cxx b/src/SALOME_SWIG/SALOMEGUI_Swig.cxx index e1f45245e..3ad966359 100644 --- a/src/SALOME_SWIG/SALOMEGUI_Swig.cxx +++ b/src/SALOME_SWIG/SALOMEGUI_Swig.cxx @@ -667,8 +667,8 @@ void SALOMEGUI_Swig::FitAll() if ( window ) { if ( dynamic_cast( window ) ) ( dynamic_cast( window ) )->onFitAll(); - else if ( dynamic_cast( window ) ) - ( dynamic_cast( window ) )->onFitAll(); + else if ( dynamic_cast( window ) ) + ( dynamic_cast( window ) )->onFitAll(); else if ( dynamic_cast( window ) ) ( dynamic_cast( window ) )->onFitAll(); } @@ -694,8 +694,8 @@ void SALOMEGUI_Swig::ResetView() if ( window ) { if ( dynamic_cast( window ) ) (dynamic_cast( window ))->onResetView(); - else if ( dynamic_cast( window ) ) - (dynamic_cast( window ))->onResetView(); + else if ( dynamic_cast( window ) ) + (dynamic_cast( window ))->onResetView(); else if ( dynamic_cast( window ) ) (dynamic_cast( window ))->onFitAll(); // VSR: there is no 'ResetView' functionality for Plot2d viewer, @@ -756,20 +756,20 @@ static void setView( int view ) break; } } - else if ( dynamic_cast( window ) ) { + else if ( dynamic_cast( window ) ) { switch( myView ) { case __ViewTop: - (dynamic_cast( window ))->onTopView(); break; + (dynamic_cast( window ))->onTopView(); break; case __ViewBottom: - (dynamic_cast( window ))->onBottomView(); break; + (dynamic_cast( window ))->onBottomView(); break; case __ViewLeft: - (dynamic_cast( window ))->onLeftView(); break; + (dynamic_cast( window ))->onLeftView(); break; case __ViewRight: - (dynamic_cast( window ))->onRightView(); break; + (dynamic_cast( window ))->onRightView(); break; case __ViewFront: - (dynamic_cast( window ))->onFrontView(); break; + (dynamic_cast( window ))->onFrontView(); break; case __ViewBack: - (dynamic_cast( window ))->onBackView(); break; + (dynamic_cast( window ))->onBackView(); break; default: break; } diff --git a/src/SUIT/SUIT_DataObject.cxx b/src/SUIT/SUIT_DataObject.cxx index 88a69c73c..1d1b4ec9e 100755 --- a/src/SUIT/SUIT_DataObject.cxx +++ b/src/SUIT/SUIT_DataObject.cxx @@ -52,7 +52,8 @@ SUIT_DataObject::SUIT_DataObject( SUIT_DataObject* p ) : myParent( 0 ), myOpen( false ), myCheck( false ), - myAutoDel( true ) + myAutoDel( true ), + _modified( false ) { setParent( p ); signal()->emitCreated( this ); diff --git a/src/Session/SALOME_Session_Server.cxx b/src/Session/SALOME_Session_Server.cxx index 155c22524..849113e1c 100755 --- a/src/Session/SALOME_Session_Server.cxx +++ b/src/Session/SALOME_Session_Server.cxx @@ -365,8 +365,8 @@ int main( int argc, char **argv ) // Create Qt application instance; // this should be done the very first! SALOME_QApplication _qappl( argc, argv ); - _qappl.setOrganizationName( "SALOME" ); - _qappl.setApplicationName( "SALOME" ); + _qappl.setOrganizationName( "salome" ); + _qappl.setApplicationName( "salome" ); _qappl.setApplicationVersion( salomeVersion() ); // Add application library path (to search style plugin etc...)