-# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2009-2012 OPEN CASCADE
#
-# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+# This library is free software; you can redistribute it and/or
+# modify it 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 free software; you can redistribute it and/or
-# modify it 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.
#
-# 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
#
-# 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
#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
# Author : Roman NIKOLAEV Open CASCADE S.A.S. (roman.nikolaev@opencascade.com)
# Date : 13/04/2009
-
+#
include $(top_srcdir)/adm_local/unix/make_common_starter.am
ACLOCAL_AMFLAGS = -I adm_local/unix/config_files \
SUBDIRS = adm_local resources src bin
-DISTCLEANFILES = a.out aclocal.m4 configure
+DISTCLEANFILES = a.out aclocal.m4 configure local-install.sh hack_libtool
EXTRA_DIST += \
build_configure \
-# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2009-2012 OPEN CASCADE
#
-# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+# This library is free software; you can redistribute it and/or
+# modify it 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 free software; you can redistribute it and/or
-# modify it 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.
#
-# 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
#
-# 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
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
include $(top_srcdir)/adm_local/unix/make_common_starter.am
SUBDIRS = unix
-# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2009-2012 OPEN CASCADE
#
-# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+# This library is free software; you can redistribute it and/or
+# modify it 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 free software; you can redistribute it and/or
-# modify it 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.
#
-# 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
#
-# 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
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
include $(top_srcdir)/adm_local/unix/make_common_starter.am
SUBDIRS = config_files
-# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2009-2012 OPEN CASCADE
#
-# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+# This library is free software; you can redistribute it and/or
+# modify it 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 free software; you can redistribute it and/or
-# modify it 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.
#
-# 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
#
-# 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
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
include $(top_srcdir)/adm_local/unix/make_common_starter.am
dist_admlocalm4_DATA = \
-# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2009-2012 OPEN CASCADE
#
-# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+# This library is free software; you can redistribute it and/or
+# modify it 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 free software; you can redistribute it and/or
-# modify it 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.
#
-# 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
#
-# 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
#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
# Author : Roman NIKOLAEV Open CASCADE S.A.S. (roman.nikolaev@opencascade.com)
# Date : 13/04/2009
-# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2009-2012 OPEN CASCADE
#
-# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+# This library is free software; you can redistribute it and/or
+# modify it 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 free software; you can redistribute it and/or
-# modify it 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.
#
-# 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
#
-# 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
#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+
+# ============================================================
+# The following is to avoid PACKAGE_... env variable
+# redefinition compilation warnings
+# ============================================================
#
+AM_CXXFLAGS = @KERNEL_CXXFLAGS@ -include SALOMEconfig.h
+AM_CPPFLAGS = @KERNEL_CXXFLAGS@ -include SALOMEconfig.h
+
# ============================================================
# This file defines the common definitions used in several
# Makefile. This file must be included, if needed, by the file
-# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2009-2012 OPEN CASCADE
#
-# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+# This library is free software; you can redistribute it and/or
+# modify it 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 free software; you can redistribute it and/or
-# modify it 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.
#
-# 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
#
-# 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
#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
# Author : Roman NIKOLAEV Open CASCADE S.A.S. (roman.nikolaev@opencascade.com)
# Date : 13/04/2009
-
+#
include $(top_srcdir)/adm_local/unix/make_common_starter.am
nodist_salomescript_DATA = \
-THIS IS SALOME - PYLIGHT VERSION: @VERSION@
+[SALOME PYLIGHT] : @VERSION@
+[DEVELOPMENT] : @VERSION_DEV@
+[DESCRIPTION] : Sample Python SALOME module
-# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+#!/bin/bash
+# Copyright (C) 2009-2012 OPEN CASCADE
#
-# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+# This library is free software; you can redistribute it and/or
+# modify it 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 free software; you can redistribute it and/or
-# modify it 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.
#
-# 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
#
-# 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
#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
# Author : Roman NIKOLAEV Open CASCADE S.A.S. (roman.nikolaev@opencascade.com)
# Date : 13/04/2009
-
+#
ORIG_DIR=`pwd`
CONF_DIR=`echo $0 | sed -e "s,[^/]*$,,;s,/$,,;s,^$,.,"`
cd ${CONF_DIR}
ABS_CONF_DIR=`pwd`
-
-mkdir -p salome_adm/unix/config_files
-cp -f ${KERNEL_ROOT_DIR}/salome_adm/unix/SALOMEconfig.h.in salome_adm/unix
+########################################################################
# ____________________________________________________________________
# aclocal creates the aclocal.m4 file from the standard macro and the
-# custom macro embedded in the directory salome_adm/unix/config_files
+# custom macro embedded in the directory adm_local/unix/config_files
# and KERNEL config_files directory.
# output:
# aclocal.m4
# autom4te.cache (directory)
-echo "====================================================== aclocal"
+echo "======================================================= aclocal"
aclocal -I adm_local/unix/config_files \
-I ${KERNEL_ROOT_DIR}/salome_adm/unix/config_files \
# version. The files are created in the directory specified with the
# AC_CONFIG_AUX_DIR(<mydir>) tag (see configure.ac).
# output:
-# salome_adm/unix/config_files/config.guess
-# salome_adm/unix/config_files/config.sub
-# salome_adm/unix/config_files/ltmain.sh
-#echo "====================================================== libtoolize"
+# adm_local/unix/config_files/config.guess
+# adm_local/unix/config_files/config.sub
+# adm_local/unix/config_files/ltmain.sh
+echo "==================================================== libtoolize"
libtoolize --force --copy --automake || exit 1
# AC_CONFIG_AUX_DIR(<mydir>) tag (see configure.ac). This step also
# creates the Makefile.in files from the Makefile.am files.
# output:
-# salome_adm/unix/config_files/compile
-# salome_adm/unix/config_files/depcomp
-# salome_adm/unix/config_files/install-sh
-# salome_adm/unix/config_files/missing
-# salome_adm/unix/config_files/py-compile
+# adm_local/unix/config_files/compile
+# adm_local/unix/config_files/depcomp
+# adm_local/unix/config_files/install-sh
+# adm_local/unix/config_files/missing
+# adm_local/unix/config_files/py-compile
# Makefile.in (from Makefile.am)
echo "====================================================== automake"
#!/bin/sh
-# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2009-2012 OPEN CASCADE
#
-# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+# This library is free software; you can redistribute it and/or
+# modify it 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 free software; you can redistribute it and/or
-# modify it 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.
#
-# 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
#
-# 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
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
rm -rf autom4te.cache aclocal.m4 configure make_config
find . -name "*~" -print -exec rm {} \;
find . -name "*.pyc" -print -exec rm {} \;
-#exit
-# ==================== ON SORT AVANT
-
-find bin -name Makefile.in | xargs rm -f
-find resources -name Makefile.in | xargs rm -f
-find salome_adm -name Makefile.in | xargs rm -f
-find src -name Makefile.in | xargs rm -f
-rm -f Makefile.in
+find . -name Makefile.in | xargs rm -f
+( cd adm_local/unix/config_files && rm -f config.* depcomp install-sh l*.m4 ltmain.sh missing py-compile )
-# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2009-2012 OPEN CASCADE
#
-# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+# This library is free software; you can redistribute it and/or
+# modify it 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 free software; you can redistribute it and/or
-# modify it 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.
#
-# 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
#
-# 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
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# PLEASE DO NOT MODIFY configure.in FILE
# ALL CHANGES WILL BE DISCARDED BY THE NEXT
# build_configure COMMAND
# CHANGES MUST BE MADE IN configure.ac file
-
# Author : Roman NIKOLAEV Open CASCADE S.A.S. (roman.nikolaev@opencascade.com)
# Date : 13/04/2009
-
-
-AC_INIT([Salome2 Project PYLIGHT module], [5.1.1], [webmaster.salome@opencascade.com], [SalomePYLIGHT])
-AC_CONFIG_AUX_DIR(salome_adm/unix/config_files)
+#
+AC_INIT([Salome2 Project PYLIGHT module], [6.5.0], [webmaster.salome@opencascade.com], [SalomePYLIGHT])
+AC_CONFIG_AUX_DIR(adm_local/unix/config_files)
AC_CANONICAL_HOST
AC_CANONICAL_TARGET
-AM_INIT_AUTOMAKE
+AM_INIT_AUTOMAKE([-Wno-portability])
XVERSION=`echo $VERSION | awk -F. '{printf("0x%02x%02x%02x",$1,$2,$3)}'`
AC_SUBST(XVERSION)
# set up MODULE_NAME variable for dynamic construction of directories (resources, etc.)
MODULE_NAME=pylight
AC_SUBST(MODULE_NAME)
+VERSION_DEV=1
+AC_SUBST(VERSION_DEV)
dnl
dnl Initialize source and build root directories
AC_PROG_MAKE_SET
AC_PROG_INSTALL
+AC_LOCAL_INSTALL
dnl
dnl libtool macro check for CC, LD, NM, LN_S, RANLIB, STRIP + for shared libraries
dnl full-path to the binary instead.
case "$INSTALL" in
*install-sh*)
- INSTALL='\${KERNEL_ROOT_DIR}'/salome_adm/unix/config_files/install-sh
+ INSTALL='\${KERNEL_ROOT_DIR}'/adm_local/unix/config_files/install-sh
;;
esac
chmod +x ./bin/*; \
])
+AC_HACK_LIBTOOL
+AC_CONFIG_COMMANDS([hack_libtool],[
+sed -i "s%^CC=\"\(.*\)\"%hack_libtool (){ \n\
+ $(pwd)/hack_libtool \1 \"\$[@]\" \n\
+}\n\
+CC=\"hack_libtool\"%g" libtool
+sed -i "s%\(\s*\)for searchdir in \$newlib_search_path \$lib_search_path \$sys_lib_search_path \$shlib_search_path; do%\1searchdirs=\"\$newlib_search_path \$lib_search_path \$sys_lib_search_path \$shlib_search_path\"\n\1for searchdir in \$searchdirs; do%g" libtool
+sed -i "s%\(\s*\)searchdirs=\"\$newlib_search_path \$lib_search_path \(.*\)\"%\1searchdirs=\"\$newlib_search_path \$lib_search_path\"\n\1sss_beg=\"\"\n\1sss_end=\"\2\"%g" libtool
+sed -i "s%\(\s*\)\(for searchdir in \$searchdirs; do\)%\1for sss in \$searchdirs; do\n\1 if ! test -d \$sss; then continue; fi\n\1 ssss=\$(cd \$sss; pwd)\n\1 if test \"\$ssss\" != \"\" \&\& test -d \$ssss; then\n\1 case \$ssss in\n\1 /usr/lib | /usr/lib64 ) ;;\n\1 * ) sss_beg=\"\$sss_beg \$ssss\" ;;\n\1 esac\n\1 fi\n\1done\n\1searchdirs=\"\$sss_beg \$sss_end\"\n\1\2%g" libtool
+],[])
+
# This list is initiated using autoscan and must be updated manually
# when adding a new file <filename>.in to manage. When you execute
# autoscan, the Makefile list is generated in the output file configure.scan.
# This could be helpfull to update de configuration.
AC_OUTPUT([ \
- ./salome_adm/unix/SALOMEconfig.h \
- ./adm_local/Makefile \
- ./adm_local/unix/Makefile \
- ./adm_local/unix/config_files/Makefile \
- ./bin/VERSION \
- ./bin/Makefile \
- ./src/Makefile \
- ./src/PYLIGHTGUI/Makefile \
- ./resources/Makefile \
+ adm_local/Makefile \
+ adm_local/unix/Makefile \
+ adm_local/unix/config_files/Makefile \
+ bin/VERSION \
+ bin/Makefile \
+ src/Makefile \
+ src/PYLIGHTGUI/Makefile \
+ resources/Makefile \
+ resources/SalomeApp.xml \
Makefile \
])
+<!--
+ Copyright (C) 2009-2012 OPEN CASCADE
+
+ This library is free software; you can redistribute it and/or
+ modify it 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
+
+-->
<document>
<section name="PYLIGHT">
<!-- Major module parameters -->
-# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2009-2012 OPEN CASCADE
#
-# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+# This library is free software; you can redistribute it and/or
+# modify it 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 free software; you can redistribute it and/or
-# modify it 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.
#
-# 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
#
-# 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
#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
# Author : Roman NIKOLAEV Open CASCADE S.A.S. (roman.nikolaev@opencascade.com)
# Date : 13/04/2009
-
+#
include $(top_srcdir)/adm_local/unix/make_common_starter.am
dist_salomeres_DATA = \
PYLIGHT_line_icon.png \
PYLIGHT_paragraph_icon.png \
queen.txt \
- LightApp.xml \
- SalomeApp.xml
-
\ No newline at end of file
+ LightApp.xml
+
+nodist_salomeres_SCRIPTS = SalomeApp.xml
\ No newline at end of file
<?xml version='1.0' encoding='us-ascii'?>
+<!--
+ Copyright (C) 2009-2012 OPEN CASCADE
+
+ This library is free software; you can redistribute it and/or
+ modify it 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
+
+-->
<!DOCTYPE application PUBLIC "" "desktop.dtd">
<application title="PYHELLO component" date="9/12/2001" author="C Caremoli" appId="PYHELLO" >
<desktop>
+++ /dev/null
-<document>
- <section name="PYLIGHT">
- <!-- Major module parameters -->
- <parameter name="name" value="PyLight"/>
- <parameter name="icon" value="PYLIGHT.png"/>
- <parameter name="library" value="SalomePyQtGUILight"/>
- </section>
-
- <section name="resources">
- <!-- Module resources -->
- <parameter name="PYLIGHT" value="${PYLIGHT_ROOT_DIR}/share/salome/resources/pylight"/>
- </section>
-
-</document>
--- /dev/null
+<!--
+ Copyright (C) 2009-2012 OPEN CASCADE
+
+ This library is free software; you can redistribute it and/or
+ modify it 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
+
+-->
+<document>
+ <section name="PYLIGHT">
+ <!-- Major module parameters -->
+ <parameter name="name" value="PyLight"/>
+ <parameter name="icon" value="PYLIGHT.png"/>
+ <parameter name="version" value="@VERSION@"/>
+ <parameter name="library" value="SalomePyQtGUILight"/>
+ </section>
+
+ <section name="resources">
+ <!-- Module resources -->
+ <parameter name="PYLIGHT" value="%PYLIGHT_ROOT_DIR%/share/salome/resources/pylight"/>
+ </section>
+
+</document>
-# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2009-2012 OPEN CASCADE
#
-# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+# This library is free software; you can redistribute it and/or
+# modify it 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 free software; you can redistribute it and/or
-# modify it 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.
#
-# 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
#
-# 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
#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
# Author : Roman NIKOLAEV Open CASCADE S.A.S. (roman.nikolaev@opencascade.com)
# Date : 13/04/2009
-
+#
include $(top_srcdir)/adm_local/unix/make_common_starter.am
SUBDIRS = PYLIGHTGUI
-# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2009-2012 OPEN CASCADE
#
-# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+# This library is free software; you can redistribute it and/or
+# modify it 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 free software; you can redistribute it and/or
-# modify it 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.
#
-# 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
#
-# 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
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# SuperVisionTest AddComponent : example of component that adds two numbers
# File : Makefile.in
# Author : , CEA
# resources files
nodist_salomeres_DATA = \
PYLIGHT_msg_en.qm \
+ PYLIGHT_msg_fr.qm \
PYLIGHT_icons.qm
-# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2009-2012 OPEN CASCADE
#
-# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+# This library is free software; you can redistribute it and/or
+# modify it 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 free software; you can redistribute it and/or
-# modify it 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.
#
-# 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
#
-# 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
#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-# Author : Roman NIKOLAEV Open CASCADE S.A.S. (roman.nikolaev@opencascade.com)
+# Author : Roman NIKOLAEV, Open CASCADE S.A.S. (roman.nikolaev@opencascade.com)
# Date : 13/04/2009
-
+#
import traceback
from SalomePyQt import *
import PYLIGHT_DataModel
import vtk
# Get SALOME PyQt interface
-sgPyQt=SalomePyQt()
+sgPyQt = SalomePyQt()
# Get SALOME Swig interface
sg = libSALOME_Swig.SALOMEGUI_Swig()
-# Create DataModel
-DM = PYLIGHT_DataModel.PYLIGHT_DataModel()
+################################################
+# GUI context class
+# Used to store actions, menus, toolbars, etc...
+################################################
+
+class GUIcontext:
+
+ # constructor
+ def __init__( self ):
+ # Load File action
+ sgPyQt.createAction(dict_actions["loadfile"], "Load text File", "Load text file")
+ # Save File action
+ sgPyQt.createAction(dict_actions["savefile"], "Save text File", "Save text file")
+ # Insert Line action
+ sgPyQt.createAction(dict_actions["insertLine"], "Insert Line", "Insert new text line")
+ # Insert new line action
+ sgPyQt.createAction(dict_actions["insertLine"], "Insert Line", "Insert new line")
+ # Edit selected line action
+ sgPyQt.createAction(dict_actions["editLine"], "Edit Line", "Edit selected line")
+ # Remove selected line action
+ sgPyQt.createAction(dict_actions["removeLine"], "Remove Lines", "Remove selected lines")
+ # Clear all paragraphs
+ sgPyQt.createAction(dict_actions["clearAll"], "Clear All", "Clear all paragraphs")
+ # Display line
+ sgPyQt.createAction(dict_actions["displayLine"], "Display Line", "Display selected line")
+ # Erase line
+ sgPyQt.createAction(dict_actions["eraseLine"], "Erase Line", "Erase selected line")
+ # Separator
+ separator = sgPyQt.createSeparator()
+
+ # Get Menu 'File'
+ menuFile = sgPyQt.createMenu( "File", -1, -1 )
+ # Add actions in the menu 'File'
+ sgPyQt.createMenu( separator, menuFile, -1, 10)
+ sgPyQt.createMenu( dict_actions["loadfile"], menuFile, 10 );
+ sgPyQt.createMenu( dict_actions["savefile"], menuFile, 10 );
+ sgPyQt.createMenu( separator, menuFile, -1, 10)
+ # Create 'PyLight' menu
+ menuPyLight = sgPyQt.createMenu( "PyLight", -1, -1, 50)
+ # Add actions in the menu 'PyLight'
+ sgPyQt.createMenu( dict_actions["insertLine"], menuPyLight, 10 );
+ sgPyQt.createMenu( dict_actions["editLine"], menuPyLight, 10 );
+ sgPyQt.createMenu( dict_actions["removeLine"], menuPyLight, 10 );
+ sgPyQt.createMenu( separator, menuPyLight, -1, 10);
+ sgPyQt.createMenu( dict_actions["clearAll"], menuPyLight, 10 );
+ sgPyQt.createMenu( separator, menuPyLight, -1, 10);
+ sgPyQt.createMenu( dict_actions["displayLine"], menuPyLight, 10 );
+ sgPyQt.createMenu( dict_actions["eraseLine"], menuPyLight, 10 );
+
+ # Create DataModel
+ self.DM = PYLIGHT_DataModel.PYLIGHT_DataModel()
+
+ pass # def __init__( self )
+
+ pass # class GUIcontext
+
+################################################
+# Global variables and functions
+################################################
+
+###
+# get active study ID
+###
+def _getStudyId():
+ return sgPyQt.getStudyId()
+
+# verbosity level
+__verbose__ = None
+
+###
+# Get verbose level
+###
+def verbose():
+ global __verbose__
+ if __verbose__ is None:
+ try:
+ __verbose__ = int( os.getenv( 'SALOME_VERBOSE', 0 ) )
+ except:
+ __verbose__ = 0
+ pass
+ pass
+ return __verbose__
+
+# study-to-context map
+__study2context__ = {}
+# current context
+__current_context__ = None
+
+###
+# get current GUI context
+###
+def _getContext():
+ global __current_context__
+ return __current_context__
+
+###
+# set and return current GUI context
+# study ID is passed as parameter
+###
+def _setContext( studyID ):
+ global __study2context__, __current_context__
+ if not __study2context__.has_key(studyID):
+ __study2context__[studyID] = GUIcontext()
+ pass
+ __current_context__ = __study2context__[studyID]
+ return __current_context__
+
+################################################
# Create actions and menus
def initialize():
-
- print "PYLIGHTGUI::initialize()"
- # Load File action
- sgPyQt.createAction(dict_actions["loadfile"], "Load text File", "Load text file")
- # Save File action
- sgPyQt.createAction(dict_actions["savefile"], "Save text File", "Save text file")
- # Insert Line action
- sgPyQt.createAction(dict_actions["insertLine"], "Insert Line", "Insert new text line")
- # Separator
- separator = sgPyQt.createSeparator()
- # Get Menu 'File'
- menuFile = sgPyQt.createMenu( "File", -1, -1 )
- # Add actions in the menu 'File'
- sgPyQt.createMenu( separator ,menuFile, -1, 10)
- sgPyQt.createMenu( dict_actions["loadfile"], menuFile, 10 );
- sgPyQt.createMenu( dict_actions["savefile"], menuFile, 10 );
- sgPyQt.createMenu( separator ,menuFile, -1, 10)
-
- # Insert new line action
- sgPyQt.createAction(dict_actions["insertLine"], "Insert Line", "Insert new line")
- # Edit selected line action
- sgPyQt.createAction(dict_actions["editLine"], "Edit Line", "Edit selected line")
- # Remove selected line action
- sgPyQt.createAction(dict_actions["removeLine"], "Remove Lines", "Remove selected lines")
- # Clear all paragraphs
- sgPyQt.createAction(dict_actions["clearAll"], "Clear All", "Clear all paragraphs")
- # Display line
- sgPyQt.createAction(dict_actions["displayLine"], "Display Line", "Display selected line")
- # Erase line
- sgPyQt.createAction(dict_actions["eraseLine"], "Erase Line", "Erase selected line")
-
- # Create 'PyLight' menu
- menuPyLight = sgPyQt.createMenu( "PyLight",-1,-1,50)
- # Add actions in the menu 'PyLight'
- sgPyQt.createMenu( dict_actions["insertLine"], menuPyLight, 10 );
- sgPyQt.createMenu( dict_actions["editLine"], menuPyLight, 10 );
- sgPyQt.createMenu( dict_actions["removeLine"], menuPyLight, 10 );
- sgPyQt.createMenu( separator, menuPyLight, -1, 10);
- sgPyQt.createMenu( dict_actions["clearAll"], menuPyLight, 10 );
- sgPyQt.createMenu( separator, menuPyLight, -1, 10);
- sgPyQt.createMenu( dict_actions["displayLine"], menuPyLight, 10 );
- sgPyQt.createMenu( dict_actions["eraseLine"], menuPyLight, 10 );
-
+ if verbose(): print "PYLIGHTGUI::initialize()"
return
+# called when module is activated
+# returns True if activating is successfull and False otherwise
+def activate():
+ if verbose() : print "PYLIGHTGUI.activate() : study : %d" % _getStudyId()
+ ctx = _setContext( _getStudyId() )
+ return True
+
+# called when module is deactivated
+def deactivate():
+ if verbose() : print "PYLIGHTGUI.deactivate() : study : %d" % _getStudyId()
+ pass
+
+# called when active study is changed
+# active study ID is passed as parameter
+def activeStudyChanged( studyID ):
+ if verbose() : print "PYLIGHTGUI.activeStudyChanged(): study : %d" % studyID
+ ctx = _setContext( _getStudyId() )
+ pass
# Process GUI action
def OnGUIEvent(commandID):
- print "PYLIGHTGUI::OnGUIEvent : commandID =",commandID
+ if verbose() : print "PYLIGHTGUI::OnGUIEvent : commandID = %d" % commandID
if dict_command.has_key( commandID ):
try:
dict_command[commandID]()
except:
traceback.print_exc()
else:
- print "The command is not implemented: ",commandID
+ if verbose() : print "The command is not implemented: %d" % commandID
pass
# Customize popup menu
def createPopupMenu(popup, context):
+ if verbose() : print "PYLIGHTGUI.createPopupMenu(): context = %s" % context
-
-
if context != 'ObjectBrowser':
return
+ studyId = _getStudyId()
+ ctx = _setContext( studyId )
selcount = sg.SelectedCount()
if selcount == 1:
entry = sg.getSelected( 0 )
- obj = DM.getObject(entry)
+ obj = ctx.DM.getObject(entry)
if obj is not None:
if obj.getText() != "\n":
- #Line is selected
+ # Line is selected
popup.addAction(sgPyQt.action(dict_actions["editLine"]))
popup.addAction(sgPyQt.action(dict_actions["removeLine"]))
popup.addSeparator()
popup.addAction(sgPyQt.action(dict_actions["displayLine"]))
popup.addAction(sgPyQt.action(dict_actions["displayLine"]))
popup.addAction(sgPyQt.action(dict_actions["eraseLine"]))
-
-
+ pass
else:
- #Paragraph is selected
+ # Paragraph is selected
popup.addAction(sgPyQt.action(dict_actions["insertLine"]))
popup.addAction(sgPyQt.action(dict_actions["clearParagraph"]))
+ pass
+ pass
else:
- onlyLines = True
+ onlyLines = True
+ pass
+ pass # if selcount == 1
pass
# For saving data in the study
def saveFiles(prefix):
- print "PYLIGHTGUI::saveFile()"
+ if verbose(): print "PYLIGHTGUI::saveFile()"
+ ctx = _setContext( _getStudyId() )
postfix = "PYLIGHT.txt"
filename = prefix+postfix
- DM.saveFile(QString(filename))
+ ctx.DM.saveFile(QString(filename))
return postfix
# For restore data from the study
def openFiles(filelist):
- print "PYLIGHTGUI::openFile()"
+ if verbose(): print "PYLIGHTGUI::openFile()"
+ ctx = _setContext( _getStudyId() )
filename = filelist[0]
filename.append(filelist[1])
- DM.loadFile(filename)
+ ctx.DM.loadFile(filename)
return True
# Loading a text file
def loadfile():
+ ctx = _setContext( _getStudyId() )
aFilter = "Text files (*.txt)"
filename = QFileDialog.getOpenFileName(sgPyQt.getDesktop(), "Open text file", "", aFilter, "Choose a text file to open")
if filename.isEmpty():
return
if os.access(str(filename),os.R_OK):
- DM.loadFile(filename)
+ ctx.DM.loadFile(filename)
else:
QMessageBox.warning(sgPyQt.getDesktop(),
"Error!",
# Saving a text file
def savefile():
+ ctx = _setContext( _getStudyId() )
aFilter = "Text files (*.txt)"
filename = QFileDialog.getSaveFileName(sgPyQt.getDesktop(),"Save text file", "", aFilter, "Choose a text file to save")
if filename.contains(".txt") == 0:
filename.append(".txt")
pass
fn = filename
- print filename
# Get directory name and check access
if os.access(str(fn.left(fn.lastIndexOf("/"))), os.W_OK):
- DM.saveFile(filename)
+ ctx.DM.saveFile(filename)
else:
QMessageBox.warning(sgPyQt.getDesktop(),
"Error!",
'''
Insert new line in the selected paragraph.
'''
+ ctx = _setContext( _getStudyId() )
#Get result
res = QInputDialog.getText(sgPyQt.getDesktop(),
"Add new line",
# Nb selected objects
selcount = sg.SelectedCount()
# Nb object in the Data Model
- paragrCount = len(DM.getParagraphs())
+ paragrCount = len(ctx.DM.getParagraphs())
# Create first paragraph
if paragrCount == 0:
- DM.createObject()
+ ctx.DM.createObject()
# If line not empty create first line
if text != "\n":
- DM.createObject(text,DM.getParagraphs()[0])
+ ctx.DM.createObject(text,ctx.DM.getParagraphs()[0])
sg.updateObjBrowser(True)
return
# Create paragraph
if text == "\n":
- DM.createObject()
+ ctx.DM.createObject()
sg.updateObjBrowser(True)
return
else:
return
if selcount == 1:
entry = sg.getSelected( 0 )
- obj = DM.getObject(entry)
+ obj = ctx.DM.getObject(entry)
if obj is not None:
# Create line
if(obj.getText() == "\n"):
- DM.createObject(text,entry)
+ ctx.DM.createObject(text,entry)
sg.updateObjBrowser(True);
return
else:
# Edit selected line
def editLine():
+ ctx = _setContext( _getStudyId() )
if sg.SelectedCount() == 1:
entry = sg.getSelected( 0 )
- obj = DM.getObject(entry)
+ obj = ctx.DM.getObject(entry)
if(obj.getText() != "\n"):
#Get text line
res = QInputDialog.getText(sgPyQt.getDesktop(),
# Remove selected lines
def removeLine():
+ ctx = _setContext( _getStudyId() )
selcount = sg.SelectedCount()
onlyLines = True
lines = []
while selcount != 0:
entry = sg.getSelected( selcount - 1)
#Check what only lines selected
- if DM.getObject(entry).getText() == "\n":
+ if ctx.DM.getObject(entry).getText() == "\n":
onlyLines = False
break
lines.append(entry)
renderer.RemoveActor(actor)
pass
pass
- DM.removeObjects(lines)
+ ctx.DM.removeObjects(lines)
sg.updateObjBrowser(True)
pass
pass
# Remove all lines from all paragraphs
def clearAll():
- paragraphs = DM.getParagraphs()
+ ctx = _setContext( _getStudyId() )
+ paragraphs = ctx.DM.getParagraphs()
for paragr in paragraphs:
lines = sgPyQt.getChildren(paragr)
- DM.removeObjects(lines)
+ ctx.DM.removeObjects(lines)
renderer=libSalomePy.getRenderer()
for l in lines:
actor = getActor(l)
# Display the selected line
def displayLine():
+ ctx = _setContext( _getStudyId() )
if sg.SelectedCount() != 1:
return
entry = sg.getSelected(0)
- text = DM.getObject(entry).getText()
+ text = ctx.DM.getObject(entry).getText()
if text == "\n":
return
renderer=libSalomePy.getRenderer()
# Clear remove all lines under selected paragraph
def clearParagraph():
+ ctx = _setContext( _getStudyId() )
lines = sgPyQt.getChildren(sg.getSelected(0))
- DM.removeObjects(lines)
+ ctx.DM.removeObjects(lines)
sg.updateObjBrowser(True)
pass
# Erase the selected line
def eraseLine():
+ ctx = _setContext( _getStudyId() )
if sg.SelectedCount() != 1:
return
entry = sg.getSelected(0)
- text = DM.getObject(entry).getText()
+ text = ctx.DM.getObject(entry).getText()
if text == "\n":
return
renderer=libSalomePy.getRenderer()
-# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2009-2012 OPEN CASCADE
#
-# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+# This library is free software; you can redistribute it and/or
+# modify it 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 free software; you can redistribute it and/or
-# modify it 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.
#
-# 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
#
-# 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
#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
# Author : Roman NIKOLAEV Open CASCADE S.A.S. (roman.nikolaev@opencascade.com)
# Date : 13/04/2009
-
+#
import SalomePyQt
from PyQt4.QtCore import *
-<!DOCTYPE TS><TS>
-<!--
- Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-
- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-
- This library is free software; you can redistribute it and/or
- modify it 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
-
--->
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0" language="en_US">
<context>
<name>@default</name>
<message>
+<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
-<!--
- Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-
- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-
- This library is free software; you can redistribute it and/or
- modify it 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
-
--->
-<TS version="1.1" />
+<TS version="2.0" language="en_US">
+<context>
+ <name>@default</name>
+ <message>
+ <source></source>
+ <translation></translation>
+ </message>
+</context>
+</TS>
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0" language="fr_FR">
+<context>
+ <name>@default</name>
+ <message>
+ <source></source>
+ <translation></translation>
+ </message>
+</context>
+</TS>