Salome HOME
Merge from V6_main_20120808 08Aug12
authorvsr <vsr@opencascade.com>
Thu, 9 Aug 2012 12:12:49 +0000 (12:12 +0000)
committervsr <vsr@opencascade.com>
Thu, 9 Aug 2012 12:12:49 +0000 (12:12 +0000)
42 files changed:
Makefile.am
README
adm_local/Makefile.am
adm_local/unix/Makefile.am
adm_local/unix/config_files/Makefile.am
adm_local/unix/config_files/check_PYHELLO.m4
adm_local/unix/make_common_starter.am
bin/Makefile.am
bin/VERSION.in
bin/myrunSalome.py
bin/runAppli.in
build_cmake [new file with mode: 0755]
build_cmake.bat [new file with mode: 0644]
build_configure
clean_configure
configure.ac
doc/Makefile.am
doc/dev_guide.pdf [deleted file]
doc/dev_guide.txt [deleted file]
doc/doxyfile.in [new file with mode: 0755]
doc/images/head.png [new file with mode: 0755]
doc/index.doc [new file with mode: 0644]
doc/static/doxygen.css [new file with mode: 0755]
doc/static/footer.html [new file with mode: 0755]
doc/static/header.html.in [new file with mode: 0755]
idl/Makefile.am
idl/PYHELLO_Gen.idl
resources/Makefile.am
resources/PYHELLOCatalog.xml.in
resources/SalomeApp.xml [deleted file]
resources/SalomeApp.xml.in [new file with mode: 0644]
resources/handshake.png [new file with mode: 0644]
resources/stop.png [new file with mode: 0644]
src/Makefile.am
src/PYHELLO/Makefile.am
src/PYHELLO/PYHELLO.py
src/PYHELLO/PYHELLO_utils.py [new file with mode: 0644]
src/PYHELLOGUI/Makefile.am
src/PYHELLOGUI/PYHELLOGUI.py
src/PYHELLOGUI/PYHELLO_icons.ts
src/PYHELLOGUI/PYHELLO_msg_en.ts
src/PYHELLOGUI/PYHELLO_msg_fr.ts [new file with mode: 0755]

index 4766f402c74ffbc3bbf0b5875c4a93a8e88417c3..2fdac46bbb1fdf8e08fc26dc62c285da73bd5045 100644 (file)
@@ -1,24 +1,22 @@
-#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
 #
-#  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-#  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+# This library is free software; you can redistribute it and/or
+# modify it 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
 #
+
 # -* Makefile *-
 # Author : Patrick GOLDBRONN (CEA)
 # Date : 28/06/2001
@@ -33,7 +31,7 @@ ACLOCAL_AMFLAGS = -I adm_local/unix/config_files \
 
 SUBDIRS = idl adm_local resources src bin doc
 
-DISTCLEANFILES = a.out aclocal.m4 configure
+DISTCLEANFILES = a.out aclocal.m4 configure local-install.sh hack_libtool
 
 EXTRA_DIST +=          \
        build_configure \
@@ -41,3 +39,13 @@ EXTRA_DIST +=                \
 
 dist-hook:
        rm -rf `find $(distdir) -name CVS`
+
+usr_docs:
+       (cd doc && $(MAKE) $(AM_MAKEFLAGS) usr_docs)
+
+docs: usr_docs
+
+dev_docs:
+       (cd doc && $(MAKE) $(AM_MAKEFLAGS) dev_docs)
+
+
diff --git a/README b/README
index 14cc2718ce83bc0199e876774d5d5585b6124098..d13fa47d2a13ec38718167852a52c7c477c6534c 100644 (file)
--- a/README
+++ b/README
@@ -1,4 +1,4 @@
-This module is a Salome example of a module that is interfaced with MED library.
+This module is a Salome example of a module implemented in Python with PyQt GUI
 
 Installation and compilation is like every Salome modules :
  src_dir/build_configure
@@ -9,10 +9,4 @@ Installation and compilation is like every Salome modules :
  make
  make install
 
-To check Calculator component, you can use CALCULATOR_TEST.py script, 
-or SUPERVISION graph src_dir/CALCULATOR/graphe1.py
-
-
-Documentation can be found in /doc directory. It was written in sxw format (openoffice) and was converted in pdf.
-
-Implementation is in /src/CALCULATOR directory. It was tested on redhat8 - using gcc 3.2
+Documentation can be found in /doc directory.
index f35273fac7de52921e587cdc5f9641c7f3116fc3..9863d295024770439bf76fa8f9f4bec8bea2bc46 100644 (file)
@@ -1,24 +1,22 @@
-#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
 #
-#  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-#  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+# This library is free software; you can redistribute it and/or
+# modify it 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
index 5f6d5f7536c72fc43090c511c2a26518cb92af5d..0d5ee76b8ee459c88d1404514f27bade7d926b59 100644 (file)
@@ -1,24 +1,22 @@
-#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
 #
-#  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-#  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+# This library is free software; you can redistribute it and/or
+# modify it 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
index 54b4bc1cbc63adbb92fa2f498a45456b770dd469..098cd062044334b35cf6ea10f108030bf9ddd9b4 100644 (file)
@@ -1,24 +1,22 @@
-#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
 #
-#  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-#  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+# This library is free software; you can redistribute it and/or
+# modify it 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 = \
index 5da66c63ccf2754f65f711b0b6e2a98d10bad3d5..c608d553940b36ba2e5d211e535dcb27dda4edf2 100755 (executable)
@@ -1,24 +1,25 @@
-dnl  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+dnl Copyright (C) 2007-2012  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 Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
 dnl
-dnl  This library is free software; you can redistribute it and/or
-dnl  modify it under the terms of the GNU Lesser General Public
-dnl  License as published by the Free Software Foundation; either
-dnl  version 2.1 of the License.
+dnl This library is free software; you can redistribute it and/or
+dnl modify it under the terms of the GNU Lesser General Public
+dnl License as published by the Free Software Foundation; either
+dnl version 2.1 of the License.
 dnl
-dnl  This library is distributed in the hope that it will be useful,
-dnl  but WITHOUT ANY WARRANTY; without even the implied warranty of
-dnl  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-dnl  Lesser General Public License for more details.
+dnl This library is distributed in the hope that it will be useful,
+dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+dnl Lesser General Public License for more details.
 dnl
-dnl  You should have received a copy of the GNU Lesser General Public
-dnl  License along with this library; if not, write to the Free Software
-dnl  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+dnl You should have received a copy of the GNU Lesser General Public
+dnl License along with this library; if not, write to the Free Software
+dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 dnl
-dnl  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 dnl
+
 #  Check availability of PYHELLO binary distribution
 #
 #  Author : Marc Tajchman (CEA, 2002)
index 36ad8c3a7c7e37c3da0591452c8cc09f24250858..4f70a7077a6ba24a12fb78f8200de1078912de4f 100644 (file)
@@ -1,24 +1,30 @@
-#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
 #
-#  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-#  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+# This library is free software; you can redistribute it and/or
+# modify it 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
index f9eb701d030cfe8616e253e6114c3358b9c84593..18078216292c1d92d67d2af14af562e717dd723b 100644 (file)
@@ -1,24 +1,22 @@
-#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
 #
-#  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-#  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+# This library is free software; you can redistribute it and/or
+# modify it 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
 #
+
 # -* Makefile *- 
 # Author : Guillaume Boulant (CSSI)
 # Module : COMPONENT
index f5741c60d996a5b584c7a4c962117bdaddad1224..011a48b51b74b4446544550527cf09cf09e77314 100755 (executable)
@@ -1 +1,3 @@
-THIS IS SALOME - PYHELLO VERSION: @VERSION@
+[SALOME PYHELLO] : @VERSION@
+[DEVELOPMENT]    : @VERSION_DEV@
+[DESCRIPTION]    : Sample Python SALOME module
index bf4edf141dd86c5f1753f493e32fb1e886ef84b7..35e0e83f4215865c5c961fc9c580bb66847c5ccc 100755 (executable)
@@ -1,26 +1,26 @@
-#  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
+#!/usr/bin/env python
+# Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
 #
-#  This library is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU Lesser General Public
-#  License as published by the Free Software Foundation; either
-#  version 2.1 of the License.
+# 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
 #
-#!/usr/bin/env python
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+
 def test(clt):
    """
         Test function that creates an instance of PYHELLO component
index 514750a56d92c415c0d0e32e9a48e610cf66c3df..d6c6205bb1ccaca99520966f406bbe79de7274e6 100755 (executable)
@@ -1,24 +1,24 @@
 #!/bin/sh
-#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2012  CEA/DEN, EDF R&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) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
 #
-#  This library is free software; you can redistribute it and/or
-#  modify it 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
 #
 
 if [ -z "${KERNEL_ROOT_DIR}" ] ; then 
diff --git a/build_cmake b/build_cmake
new file mode 100755 (executable)
index 0000000..e6d7a0b
--- /dev/null
@@ -0,0 +1,27 @@
+#!/bin/sh
+# Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
+#
+# This library is free software; you can redistribute it and/or
+# modify it 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
+#
+
+CURRENT_DIR=`pwd`
+CONF_DIR=`echo $0 | sed -e "s,[^/]*$,,;s,/$,,;s,^$,.,"`
+cd ${CONF_DIR}
+python $KERNEL_ROOT_DIR/salome_adm/cmake_files/am2cmake.py --pyhello
+status=$?
+cd ${CURRENT_DIR}
+exit $status
diff --git a/build_cmake.bat b/build_cmake.bat
new file mode 100644 (file)
index 0000000..4cc9970
--- /dev/null
@@ -0,0 +1,20 @@
+@REM Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
+@REM
+@REM This library is free software; you can redistribute it and/or
+@REM modify it under the terms of the GNU Lesser General Public
+@REM License as published by the Free Software Foundation; either
+@REM version 2.1 of the License.
+@REM
+@REM This library is distributed in the hope that it will be useful,
+@REM but WITHOUT ANY WARRANTY; without even the implied warranty of
+@REM MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+@REM Lesser General Public License for more details.
+@REM
+@REM You should have received a copy of the GNU Lesser General Public
+@REM License along with this library; if not, write to the Free Software
+@REM Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+@REM
+@REM See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+@REM
+
+%PYTHONBIN% %KERNEL_ROOT_DIR%\salome_adm\cmake_files\am2cmake.py --pyhello\r
index 4f365ace5641a4c5b0adb41b7b709698bc087708..04717ef9c1b589e1a4332734af703577e55a3198 100755 (executable)
@@ -1,25 +1,26 @@
 #!/bin/bash
-#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2012  CEA/DEN, EDF R&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) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
 #
-#  This library is free software; you can redistribute it and/or
-#  modify it 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
 #
+
 # Tool for updating list of .in file for the SALOME project 
 # and regenerating configure script
 # Author : 
@@ -49,31 +50,16 @@ fi
 cd ${CONF_DIR}
 ABS_CONF_DIR=`pwd`
 
-mkdir -p salome_adm/unix/config_files
-#cp -f ${KERNEL_ROOT_DIR}/salome_adm/unix/config_files/* salome_adm/unix/config_files
-#cp -f ${KERNEL_ROOT_DIR}/salome_adm/unix/pythonbe.py salome_adm/unix
-
-cp -f ${KERNEL_ROOT_DIR}/salome_adm/unix/SALOMEconfig.h.in salome_adm/unix
-
-#cp -f ${GUI_ROOT_DIR}/adm_local/unix/config_files/* salome_adm/unix/config_files
-
-# remove KERNEL deprecated configure files
-#for deprecated in ac_cc_warnings.m4 ac_cxx_partial_specialization.m4 \
-#  check_mico.m4 config.guess ltmain.sh ac_cxx_bool.m4 ltconfig ac_cxx_typename.m4 \
-#    check_pthreads.m4 config.sub libtool.m4 ac_cxx_mutable.m4 missing
-#    do
-#      rm -f salome_adm/unix/config_files/${deprecated}
-#      done
-
+########################################################################
 
 # ____________________________________________________________________
 # 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 \
@@ -85,10 +71,10 @@ aclocal -I adm_local/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
 
@@ -108,11 +94,11 @@ autoconf
 # 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"
 
index f57f7b3bf98d03cab5f0acc1a75b80d039d61886..1f4c3ce9f40e451c2b7a77f2b9ca7158376eb6e6 100755 (executable)
@@ -1,35 +1,28 @@
 #!/bin/sh
-#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
 #
-#  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-#  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+# This library is free software; you can redistribute it and/or
+# modify it 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 doc -name Makefile.in | xargs rm -f
-find idl -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 ltmain.sh missing py-compile )
index 315142424deb123f564d6910cd0eebc9eea4967a..023ed7fc1eb9972c6279c25a9af100728b753a48 100644 (file)
@@ -1,24 +1,22 @@
-#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
 #
-#  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-#  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+# This library is free software; you can redistribute it and/or
+# modify it 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
 # Modified by : Marc Tajchman (CEA)
 # Created from configure.in.base
 #
-AC_INIT([Salome2 Project PYHELLO module], [5.1.0], [webmaster.salome@opencascade.com], [SalomePYHELLO])
-AC_CONFIG_AUX_DIR(salome_adm/unix/config_files)
+AC_INIT([Salome2 Project PYHELLO module], [6.5.0], [webmaster.salome@opencascade.com], [SalomePYHELLO])
+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)
+VERSION_DEV=1
+AC_SUBST(VERSION_DEV)
 
 # set up MODULE_NAME variable for dynamic construction of directories (resources, etc.)
 MODULE_NAME=pyhello
@@ -81,6 +81,7 @@ echo
 
 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
 
@@ -102,7 +103,7 @@ dnl Fix up the INSTALL macro if it s a relative path. We want the
 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
 
@@ -145,6 +146,14 @@ echo
 
 CHECK_QT
 
+echo
+echo ---------------------------------------------
+echo Testing html generators
+echo ---------------------------------------------
+echo
+
+CHECK_HTML_GENERATORS
+
 echo
 echo ---------------------------------------------
 echo Testing Kernel
@@ -168,13 +177,12 @@ echo ---------------------------------------------
 echo
 
 CHECK_CORBA_IN_GUI
+
 if test "x${CORBA_IN_GUI}" != "xyes"; then
-  echo "failed : For configure PYHELLO1 module necessary full GUI !"
+  echo "failed : For configure PYHELLO module necessary full GUI !"
   exit
 fi
 
-
-
 echo
 echo ---------------------------------------------
 echo Summary
@@ -182,7 +190,7 @@ echo ---------------------------------------------
 echo
 
 echo Configure
-variables="python_ok omniORB_ok qt_ok Kernel_ok"
+variables="python_ok omniORB_ok qt_ok doxygen_ok Kernel_ok"
 
 for var in $variables
 do
@@ -211,24 +219,37 @@ AC_OUTPUT_COMMANDS([ \
       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/runAppli \
-  ./bin/Makefile \
-  ./doc/Makefile \
-  ./src/Makefile \
-  ./src/PYHELLO/Makefile \
-  ./src/PYHELLOGUI/Makefile \
-  ./resources/Makefile \
-  ./resources/PYHELLOCatalog.xml \
-  ./idl/Makefile \
+  adm_local/Makefile \
+  adm_local/unix/Makefile \
+  adm_local/unix/config_files/Makefile \
+  bin/VERSION \
+  bin/runAppli \
+  bin/Makefile \
+  doc/Makefile \
+  doc/doxyfile \
+  doc/static/header.html \
+  src/Makefile \
+  src/PYHELLO/Makefile \
+  src/PYHELLOGUI/Makefile \
+  resources/Makefile \
+  resources/SalomeApp.xml \
+  resources/PYHELLOCatalog.xml \
+  idl/Makefile \
   Makefile \
 ])
index 6e3f6dab9aee57d96f004fdc14344a5652ec9b26..f30e7bbaa8c7c7af8e9081ac085c2ff99656fe35 100755 (executable)
@@ -1,26 +1,54 @@
-#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
 #
-#  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-#  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+# This library is free software; you can redistribute it and/or
+# modify it 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_doc_DATA = dev_guide.pdf
+EXTRA_DIST += images static/footer.html static/doxygen.css
+
+guidocdir = $(docdir)/gui/PYHELLO
+guidoc_DATA = images/head.png
+
+usr_docs: doxyfile
+       $(DOXYGEN) doxyfile
+       
+docs: usr_docs
+
+dev_docs:
+
+clean-local:
+       @for filen in `find . -maxdepth 1` ; do                 \
+         case $${filen} in                                     \
+           ./Makefile | ./doxyfile ) ;;                        \
+           . | .. | ./static ) ;;                              \
+           *) echo "Removing $${filen}" ; rm -rf $${filen} ;;  \
+         esac ;                                                \
+       done ;
+
+install-data-local: usr_docs
+       $(INSTALL) -d $(DESTDIR)$(docdir)/gui/PYHELLO
+       @for filen in `find . -maxdepth 1` ; do                 \
+         case $${filen} in                                     \
+           ./Makefile | ./doxyfile | ./doxyfile.bak ) ;;       \
+           . | .. | ./static ) ;;                              \
+           *) echo "Installing $${filen}" ; cp -rp $${filen} $(DESTDIR)$(docdir)/gui/PYHELLO ;;\
+         esac ;                                                                                \
+       done ;
 
-EXTRA_DIST   += dev_guide.txt
+uninstall-local:
+       rm -rf $(DESTDIR)$(docdir)/gui/PYHELLO
diff --git a/doc/dev_guide.pdf b/doc/dev_guide.pdf
deleted file mode 100644 (file)
index 8c36392..0000000
Binary files a/doc/dev_guide.pdf and /dev/null differ
diff --git a/doc/dev_guide.txt b/doc/dev_guide.txt
deleted file mode 100644 (file)
index c7e9b54..0000000
+++ /dev/null
@@ -1,432 +0,0 @@
-================================================================
-Guide pour le développement d'un module SALOME 2 en Python
-================================================================
-
-:Auteur: Caremoli C.
-
-.. contents::
-.. sectnum::
-
-Présentation
-=========================
-Ce document a pour objectif de décrire les différentes Ã©tapes
-du développement d'un module SALOME 2 en Python.
-Il commence par un bref rappel des principes de SALOME 2. Puis, il décrit 
-les Ã©tapes successives qui seront suivies pour arriver Ã  une configuration
-de module complète.
-
-Rappels sur les modules et composants SALOME 2
-==================================================
-Dans son principe, la plate-forme SALOME 2 est décomposée en une plate-forme
-de base nommée module KERNEL et une collection de modules divers.
-
-Un module est un produit compilable et installable qui se concrétise par une arborescence source qui doit
-respecter les règles générales SALOME2 et qui comprend une procédure de construction, installation qui
-respecte Ã©galement les règles SALOME2.
-Chaque module est géré en configuration dans un module CVS
-indépendant. Chaque module peut livrer des versions Ã  son rythme dans le respect des règles de
-cohérence de SALOME2. A chaque module est associée une base de tests de non régression.
-
-Un module a des dépendances avec les autres modules (utilise, est utilisé).
-Le module KERNEL constitue la base de la plate-forme SALOME2. 
-Tous les autres modules dépendent du module KERNEL.
-
-===================================== ========= ============= ==================================
-Sous projets                           Modules    Utilise          Est utilisé par
-===================================== ========= ============= ==================================
-SP1 - Environnement de production
-SP2 - Architecture                     KERNEL                  MED, GEOM, SMESH, VISU,SUPERV
-SP2 - Architecture                     MED       KERNEL         SMESH, VISU
-SP3 - Géométrie                        GEOM      KERNEL         SMESH
-SP5 - Maillage                         SMESH     KERNEL, MED
-SP6 - Superviseur                      SUPERV    KERNEL
-SP7 - Visualisation                    VISU      KERNEL, MED
-===================================== ========= ============= ==================================
-
-Un module contient un ou plusieurs composants SALOME. Un composant SALOME est un objet CORBA qui
-respecte les règles SALOME et qui est déclaré Ã  SALOME au moyen d'un catalogue. Un composant SALOME
-peut Ãªtre doté d'une interface utilisateur graphique (GUI) qui doit elle-même respecter les règles
-SALOME.
-
-Les Ã©tapes de construction du module exemple
-====================================================
-Le module exemple choisi pour illustrer le processus de construction d'un
-module est extrèmement simple. Il contiendra un seul composant et ce composant
-aura un seul service nommé getBanner qui acceptera une chaine de caractères
-comme unique argument et qui retournera une chaine de caractères obtenue
-par concaténation de "Hello " et de la chaine d'entrée. Ce composant sera
-complété par un GUI graphique Ã©crit en PyQt.
-
-Les différentes Ã©tapes du développement seront les suivantes :
-
-  - créer une arborescence de module
-  - créer un composant SALOME 2 chargeable par un container Python
-  - configurer le module pour que le composant soit connu de SALOME
-  - ajouter un GUI graphique
-  - rendre le composant utilisable dans le superviseur
-
-Création de l'arborescence du module
-=======================================
-Dans un premier temps, on se contentera de mettre dans le module exemple un composant
-SALOME Ã©crit en Python qui sera chargeable par un container Python.
-Il suffit donc d'une interface idl et d'une implantation Python du composant.
-Pour mettre en oeuvre ceci dans un module SALOME 2, il faut l'arborescence de
-fichier suivante::
-
-  + PYHELLO1_SRC
-    + build_configure
-    + configure.in.base
-    + Makefile.in
-    + adm_local
-      + unix
-        + make_commence.in
-        + make_omniorb.in
-        + config_files
-    + bin
-      + VERSION
-      + runAppli.in
-      + runSalome.py
-    + idl
-      + Makefile.in
-      + PYHELLO_Gen.idl
-    + src
-      + Makefile.in
-      + PYHELLO
-        + Makefile.in
-        + PYHELLO.py 
-    + doc
-
-Le module a pour nom PYHELLO1_SRC et le composant PYHELLO.
-Tous les fichiers sont indispensables Ã  l'exception de VERSION, runAppli et runSalome.py.
-VERSION sert pour documenter le module, il doit donner sa version et ses compatibilités ou 
-incompatibilités avec les autres modules. Il est donc fortement recommandé mais pas indispensable 
-au fonctionnement.
-Les fichiers runAppli et runSalome.py ne sont pas indispensables mais facilitent la mise en
-oeuvre de l'exemple.
-
-Mise en garde : il ne faut pas copier les fichiers de la plate-forme de base (KERNEL) pour
-initialiser une arborescence de module. Il est, en général, préférable de copier les fichiers
-d'un autre module comme GEOM ou MED.
-
-Mise en oeuvre d'autoconf, configure
---------------------------------------
-SALOME utilise autoconf pour construire le script configure qui sert Ã  l'installation pour
-tester la configuration du système et pour préconfigurer les fichiers Makefile de contruction
-du module.
-Le fichier build_configure contient une procédure qui Ã  partir de configure.in.base et au moyen 
-d'autoconf construit le script configure.
-Tous les fichiers dont l'extension est in sont des squelettes qui seront transformés par le 
-processus de configure.
-
-Presque tous les fichiers utilisés pour ce processus sont localisés dans la plate-forme de
-base qui est référencée par la variable d'environnement KERNEL_ROOT_DIR. Cependant quelques
-fichiers doivent Ãªtre modifiés en fonction du module cible. C'est le cas bien sur de build_configure
-et de configure.in.base qui doivent en général adaptés. 
-
-Les fichiers de base pour le configure du module KERNEL et des autres modules sont rassemblés
-dans le répertoire salome_adm du module KERNEL. Il faut cependant, pour pouvoir utiliser les objets
-CORBA du module KERNEL surcharger les fichiers make_commence.in et make_omniorb.in du répertoire
-salome_adm. Cette surcharge est réalisée en mettant les fichiers make_commence.in et make_omniorb.in 
-modifiés dans le répertoire adm_local du module exemple.
-
-config_files est un répertoire dans lequel on peut mettre les fichiers m4 qui servent Ã  tester
-la configuration du système dans le processus de configure. Si les fichiers de salome_adm ne sont pas
-suffisants, on peut en ajouter dans adm_local.
-
-Répertoire idl
-------------------
-Dans le répertoire idl, il faut un Makefile qui doit mettre en oeuvre la compilation
-du fichier idl PYHELLO_Gen.idl et installer tous ces fichiers dans les bons répertoires 
-de l'installation du module. Il suffit de modifier la cible IDL_FILES pour obtenir
-un fichier adapté.
-
-Concernant le fichier idl lui-même, il doit définir un module CORBA dont le nom
-doit Ãªtre différent du nom du module pour Ã©viter les conflits de nom et définir une
-interface CORBA qui dérive Ã  minima de l'interface Component du module Engines.
-Le nom du module CORBA sera PYHELLO_ORB et le nom de l'interface PYHELLO_Gen.
-
-Répertoire src
-------------------
-Le répertoire src contiendra tous les composants et GUI graphiques du module. Chacune 
-de ces entités doit avoir son propre répertoire.
-
-Le module ne contiendra pour le moment qu'un seul répertoire pour le moteur du 
-composant PYHELLO et son nom sera PYHELLO.
-
-Le Makefile se contente de déclencher le parcours des sous répertoires qui sont
-décrits par la cible SUBDIRS.
-
-Répertoire PYHELLO
-'''''''''''''''''''''''
-Le répertoire contient le module Python qui représente le composant et donc contient la classe PYHELLO
-et un fichier Makefile dont le rôle est simplement d'exporter le module PYHELLO.py
-dans le répertoire d'installation du module SALOME.
-
-Le module PYHELLO.py contient la classe PYHELLO qui dérive de l'interface PYHELLO_Gen du
-module CORBA PYHELLO_ORB__POA et de la classe SALOME_ComponentPy_i du module SALOME_ComponentPy.
-
-Répertoire doc
-------------------
-Il ne contient rien pour le moment. Il pourrait contenir ce document.
-
-Répertoire bin
-------------------
-VERSION sert pour documenter le module, il doit donner sa version et ses compatibilités ou
-incompatibilités avec les autres modules. Il est donc fortement recommandé mais pas indispensable
-au fonctionnement.
-
-Le fichier runAppli.in est l'équivalent du runSalome du module KERNEL configuré pour mettre
-en oeuvre le module KERNEL et ce module PYHELLO.
-
-Le fichier runSalome.py est le fichier du module KERNEL avec une correction de bug pour
-tourner seulement avec un container Python, une modification de la fonction test qui crée
-le composant PYHELLO au lieu d'un composant MED et un développement pour disposer de
-la complétion automatique en Python.
-
-Création d'un composant chargeable par un container
-======================================================
-Les fichiers présentés ci-dessus suffisent pour construire et installer le module PYHELLO1_SRC,
-lancer la plate-forme SALOME constituée  des modules KERNEL et PYHELLO1 et demander au container 
-Python le chargement d'un composant PYHELLO.
-
-Toutes les Ã©tapes suivantes supposent que les logiciels prérequis de SALOME sont accessibles dans l'environnement
-du développeur de modules.
-
-Construction, installation
----------------------------------
-Dans PYHELLO1_SRC, faire::
-
-     export KERNEL_ROOT_DIR=<chemin d'installation du module KERNEL>
-     ./build_configure
-
-Aller dans ../PYHELLO1_BUILD et faire::
-
-     ../PYHELLO1_SRC/configure --prefix=<chemin d'installation du module PYHELLO1>
-     make
-     make install
-
-Lancement de la plate-forme
--------------------------------
-Aller dans <chemin d'installation du module PYHELLO1> et faire::
-    ./bin/salome/runAppli
-
-Cette commande lance SALOME configurée pour KERNEL et le module PYHELLO1. A la fin de ce
-lancement l'utilisateur est devant un interpréteur Python configuré pour SALOME et qui
-donne accès aux objets CORBA de SALOME.
-
-runAppli est un shell qui exécute un script Python en lui passant des arguments en ligne de
-commande::
-
-    python -i $PYHELLO_ROOT_DIR/bin/salome/runSalome.py --modules=PYHELLO --xterm --containers=cpp,python --killall
-
-Ces arguments indiquent que l'on prendra le script runSalome.py situé dans le module PYHELLO, que l'on
-activera le composant PYHELLO, les impressions seront redirigées dans une fenêtre xterm, on lancera un 
-container Python et tous les processus SALOME existant avant le lancement seront tués.
-
-Pour que cette commande fonctionne, il faut préalablement avoir positionné les variables d'environnement
-suivantes::
-
-   export KERNEL_ROOT_DIR=<chemin d'installation du module KERNEL>
-   export PYHELLO_ROOT_DIR=<chemin d'installation du module PYHELLO>
-
-Cette méthode d'activation des modules et composants de SALOME 2 tend Ã  confondre module et composant.
-Dans ce cas (1 composant par module), il n'y a pas de difficulté Ã  paramétrer le lancement. Il suffit d'indiquer derrière 
-l'option --modules la liste des composants demandés (KERNEL est inutile) et de fournir autant de variables
-d'environnement qu'il y a de composants. Le nom de ces variables doit Ãªtre <Composant>_ROOT_DIR et doit donner le chemin
-du module contenant le composant. Dans le cas où on a plusieurs composants par module, c'est un peu plus 
-compliqué. Ce sera présenté ultérieurement.
-
-Mise en garde: il est possible que le lancement de SALOME 2 n'aille pas jusqu'au bout. En effet
-dans certaines circonstances, le temps de lancement des serveurs CORBA peut Ãªtre long et dépasser
-le timeout fixé Ã  21 secondes. Si la raison en est le temps de chargement important des 
-bibliothèques dynamiques, il est possible qu'un deuxième lancement dans la foulée aille
-jusqu'au bout.
-
-Chargement du composant exemple
-------------------------------------
-Pour avoir accès aux méthodes du composant, il faut importer le module PYHELLO_ORB avant
-de demander le chargement du composant au container Python. Ce container Python
-a Ã©té rendu accessible dans runSalome.py au moyen de la variable container::
-
-    import PYHELLO_ORB
-    c=container.load_impl("PYHELLO","PYHELLO")
-    c.makeBanner("Christian")
-
-La dernière instruction doit retourner 'Hello Christian'.
-Pour voir les objets CORBA créés par ces actions, faire::
-
-    clt.showNS()
-
-On peut voir que le composant a Ã©té créé et enregistré dans un contexte de nommage qui peut
-être incorrect en raison d'un bug identifié dans la version 1.2.1 du module KERNEL.
-
-
-Composant SALOME déclaré 
-==============================
-Pour le moment, le composant PYHELLO a Ã©té chargé en faisant une requête directe au container
-Python. Ce n'est pas la méthode standard pour charger un composant. La voie normale passe
-par le service LifeCycle qui utilise les services du catalogue pour identifier le composant 
-et ses propriétés puis appelle le container demandé pour charger le composant.
-
-Pour pouvoir utiliser cette méthode, il faut déclarer le composant dans un catalogue au format XML dont le 
-nom doit  Ãªtre <Composant>Catalog.xml. Dans notre cas ce sera PYHELLOCatalog.xml. Ce catalogue sera rangé
-dans le répertoire resources. Arborescence actualisée::
-
-  + PYHELLO1_SRC
-    + build_configure
-    + configure.in.base
-    + Makefile.in
-    + adm_local
-    + bin
-    + idl
-    + src
-    + doc
-    + resources
-      + PYHELLOCatalog.xml
-
-En dehors de l'ajout du répertoire resources et du fichier PYHELLOCatalog.xml, le reste des fichiers
-est identique. Il faut cependant modifier le Makefile.in de tête pour que le catalogue soit bien installé
-dans le répertoire d'installation. Il suffit de le spécifier dans la cible RESOURCES_FILES.
-
-Construction, installation
----------------------------------
-Il n'est pas nécessaire de refaire un configure pour prendre en compte cette modification. Il
-suffit d'aller dans PYHELLO1_BUILD et de faire::
-   
-    ./config.status
-    make 
-    make install
-
-Lancement de la plate-forme
--------------------------------
-Le lancement de la plate-forme se passe de la même manière que précédemment. Aller dans PYHELLO1_INSTALL et faire::
-
-    ./bin/salome/runAppli
-
-Chargement du composant exemple
-------------------------------------
-La méthode de chargement du composant n'est pas très différente de la fois précédente. On
-utiilise maintenant les services du module LifeCycle au lieu d'appeler directement le container.
-La séquence d'appel est contenue dans la fonction test de runSalome.Py. ::
-
-    c=test(clt)
-    c.makeBanner("Christian")
-
-La fonction test crée le LifeCycle. Puis elle demande le chargement du composant PYHELLO
-dans le container FactoryServerPy::
-
-  def test(clt):
-       """
-        Test function that creates an instance of PYHELLO component
-        usage : pyhello=test(clt)
-       """
-       import LifeCycleCORBA
-       lcc = LifeCycleCORBA.LifeCycleCORBA(clt.orb)
-       import PYHELLO_ORB
-       pyhello = lcc.FindOrLoadComponent("FactoryServerPy", "PYHELLO")
-       return pyhello
-
-Chargement depuis l'interface applicative (IAPP)
-----------------------------------------------------------
-Pour pouvoir charger dynamiquement un composant en utilisant la barre Ã  composants
-de l'IAPP, il faut déclarer l'icone représentative du composant dans le catalogue.
-Pour la déclarer il suffit d'ajouter une ligne pour l'icone au catalogue du composant::
-
-      <component-icone>PYHELLO.png</component-icone>
-
-et de mettre le fichier correspondant dans le répertoire resources du module.
-
-Pour tester la bonne configuration de la barre Ã  composants, lancer SALOME 2 comme
-précédemment puis Ã  partir de l'interpréteur Python lancer l'IAPP par::
-
-      startGUI()
-
-et charger le composant en cliquant sur l'icone de PYHELLO après avoir ouvert une Ã©tude. L'IAPP doit 
-signaler que le GUI du composant n'est pas correctement configuré mais le composant sera quand
-même créé après un temps d'attente. On peut le constater en tapant::
-
-     clt.showNS()
-
-Ajout d'un GUI graphique
-===========================
-L'étape suivante pour compléter le module consiste Ã  ajouter au composant PYHELLO
-une interface graphique qui sera Ã©crite en Python en utilisant la bibliothèque de
-widgets Qt. Cette interface graphique doit s'intégrer dans l'interface applicative
-de SALOME (IAPP) et doit donc respecter certaines contraintes que nous allons voir.
-
-Tout d'abord, précisons le contour du GUI d'un composant.
-Le comportement du GUI est 
-donné par un module Python dont le nom est normalisé <Composant>GUI.py. Il doit 
-proposer des points d'entrée conventionnels qui seront utilisés par l'IAPP pour activer 
-ce GUI ou l'informer de certains Ã©vènements.
-L'activation des commandes du GUI est réalisée au moyen d'une barre de menu et d'une barre 
-à boutons qui s'intègrent dans la barre Ã  menus et dans la barre Ã  boutons de l'IAPP.
-
-
-Module Python implantant le comportement du GUI
------------------------------------------------------
-Le comportement du GUI du composant PYHELLO est implanté dans le module Python PYHELLOGUI.py
-du sous-répertoire PYHELLOGUI.
-Le Makefile.in localisé dans le répertoire src doit Ãªtre actualisé pour parcourir le sous-répertoire PYHELLOGUI. 
-Un Makefile.in doit Ãªtre ajouté dans le sous-répertoire PYHELLOGUI. Les cibles
-importantes sont PO_FILES et EXPORT_PYSCRIPTS.
-
-La cible EXPORT_PYSCRIPTS doit Ãªtre mise Ã  jour avec le nom des modules Python Ã  rendre visible
-dans Salome, c'est Ã  dire principalement pour qu'ils soient importables (commande import de Python).
-
-La cible PO_FILES doit Ãªtre mise Ã  jour avec les noms des fichiers qui sont utilisés pour le multi-linguisme.
-Pour le moment le fichier PYHELLO_msg_en.po (traduction pour langue anglaise) est vide car le multi-linguisme
-n'est pas mis en oeuvre dans cet exemple.
-
-Barre Ã  menus et barre Ã  boutons
-----------------------------------
-Les barres Ã  menus et Ã  boutons du composant PYHELLO sont décrites dans un fichier au format XML
-pour permettre leur chargement dynamique dans l'IAPP. Ce fichier est localisé dans le répertoire resources
-du module et a un nom standardisé <Composant>_en.xml pour la langue anglaise. Pour la langue française, il 
-faut Ã©galement un fichier de nom <Composant>_fr.xml.
-Pour le composant PYHELLO, le fichier PYHELLO_en.xml contient un menu avec un item et un bouton.
-L'icone du bouton est fournie par le fichier ExecPYHELLO.png localisé dans le répertoire resources du module.
-
-Etapes ultérieures restant Ã  décrire
-==========================================
-
-     - lien avec l'étude
-     - lien avec la sélection
-     - ajout d'un popup contextuel
-     - comment rendre le composant supervisable
-     - ajout de la persistance
-     - avoir plusieurs composants dans le même module
-
-Rapides rappels sur l'architecture SALOME 2
-==================================================
-Les containers
---------------------
-Dans SALOME, les composants sont dynamiquement chargeables. Cette propriété est obtenu
-en utilisant un mécanisme de container. 
-
-Dans ses grandes lignes, un container est un serveur CORBA dont l'interface dispose 
-des méthodes nécessaires pour effectuer le chargement déchargement de l'implantation
-d'un composant SALOME. Pour effectuer le chargement d'un composant, on appellera la méthode
-load_impl du container. 
-
-La mécanique de base du chargement d'un composant est dépendante du langage d'implantation choisi.
-
-En C++, la plate-forme utilise le chargement dynamique de bibliothèque (dlopen) et un mécanisme de fonction 
-factory dont le nom doit Ãªtre <Module>Engine_factory (par exemple GEOMEngine_factory, pour GEOM).
-Cette fonction doit retourner l'objet CORBA effectif qui est le composant SALOME.
-
-En Python, la plate-forme utilise le mécanisme d'import de Python (import <Module>) et instancie 
-le composant SALOME Python en utilisant une classe (ou une factory) de même nom (<Module>) pour
-ce faire.
-
-Le multi-linguisme
------------------------
-A compléter
-
-Les logiciels prérequis 
----------------------------
-A compléter
-
-
-
diff --git a/doc/doxyfile.in b/doc/doxyfile.in
new file mode 100755 (executable)
index 0000000..08d4b5d
--- /dev/null
@@ -0,0 +1,81 @@
+# Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
+#
+# Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+#
+# This library is free software; you can redistribute it and/or
+# modify it 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
+#
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME      = "PYHELLO sample module reference manual v.@VERSION@"
+OUTPUT_DIRECTORY  = .
+CREATE_SUBDIRS   = NO
+OUTPUT_LANGUAGE   = English
+TAB_SIZE          = 5
+
+#---------------------------------------------------------------------------
+# configuration options related to warning and progress messages
+#---------------------------------------------------------------------------
+QUIET             = NO
+WARNINGS          = YES
+
+#---------------------------------------------------------------------------
+#Input related options
+#---------------------------------------------------------------------------
+INPUT             = @srcdir@
+FILE_PATTERNS     = *.doc
+EXCLUDE           = 
+IMAGE_PATH        = @srcdir@/images
+EXAMPLE_PATH      = 
+
+#---------------------------------------------------------------------------
+#HTML related options
+#---------------------------------------------------------------------------
+GENERATE_HTML     = YES
+HTML_OUTPUT       = .
+HTML_HEADER       = @builddir@/static/header.html
+HTML_FOOTER       = @srcdir@/static/footer.html
+HTML_STYLESHEET   = @srcdir@/static/doxygen.css
+TOC_EXPAND        = YES
+DISABLE_INDEX     = NO
+GENERATE_TREEVIEW = YES
+TREEVIEW_WIDTH    = 300
+
+#---------------------------------------------------------------------------
+#SORT related options
+#---------------------------------------------------------------------------
+SORT_GROUP_NAMES = NO
+
+
+#---------------------------------------------------------------------------
+#LaTeX related option
+#---------------------------------------------------------------------------
+GENERATE_LATEX    = NO
+
+#---------------------------------------------------------------------------
+#RTF related options
+#---------------------------------------------------------------------------
+GENERATE_RTF      = NO
+
+#---------------------------------------------------------------------------
+#External reference options
+#---------------------------------------------------------------------------
+TAGFILES          = 
+ALLEXTERNALS      = NO
+SEARCHENGINE      = NO
diff --git a/doc/images/head.png b/doc/images/head.png
new file mode 100755 (executable)
index 0000000..307d9ef
Binary files /dev/null and b/doc/images/head.png differ
diff --git a/doc/index.doc b/doc/index.doc
new file mode 100644 (file)
index 0000000..0556276
--- /dev/null
@@ -0,0 +1,678 @@
+/*!
+
+\mainpage Introduction to PYHELLO sample module
+
+The purpose of the \b PYHELLO module is to describe briefly the different
+steps in the development of a SALOME module in Python.
+
+Contents:
+- \subpage dev_steps
+- \subpage tree_structure
+- \subpage build_proc_files
+- \subpage idl_dir
+- \subpage src_dir
+- \subpage bin_dir
+- \subpage doc_dir
+- \subpage build_procedure
+- \subpage run_procedure
+- \subpage load_module
+- \subpage catalog_def
+- \subpage load_lcc
+- \subpage load_iapp
+
+\ref dev_steps ">> Next"
+
+\page dev_steps Steps in construction of the example module
+
+The example module chosen to illustrate the process of SALOME module
+development is extremely simple. The module contains a single
+component and this component provides a single service called \b
+makeBanner that accepts a character string as the sole argument and
+that returns a character string obtained by the concatenation of a
+'Hello' and the input string. The component also provides a simple
+GUI.
+
+The steps in the development are as follows:
+- create a module tree structure
+- create a SALOME component that can be loaded by a Python SALOME container
+- configure the module so that the component is known to SALOME
+- add a graphic GUI
+
+\ref main "<< Previous"<br>\ref tree_structure ">> Next"
+
+\page tree_structure Create the module tree structure
+
+The first step in the development process is the creation of the
+module tree file structure. The typical SALOME module usually includes
+some set of the configuration files (used in the build procedure of a
+module), Makefiles, IDL file that provides a definition of a CORBA
+services implemented in a module and a set of source Python files
+which implement the module CORBA engine and (optionally) its GUI.
+
+The following file structure is typical for the SALOME module:
+
+<pre>
++ PYHELLO1_SRC
+   + build_configure
+   + configure.ac
+   + Makefile.am
+   + adm_local
+     + Makefile.am
+     + unix
+       + Makefile.am
+       + make_common_starter.am
+       + config_files
+         + Makefile.am
+         + check_PYHELLO.m4
+   + bin
+     + Makefile.am
+     + VERSION.in
+     + runAppli.in
+     + myrunSalome.py
+   + idl
+     + Makefile.am
+     + PYHELLO_Gen.idl
+   + src
+     + Makefile.am
+     + PYHELLO
+       + Makefile.am
+       + PYHELLO.py
+       + PYHELLO_utils.py
+     + PYHELLOGUI
+       + Makefile.am
+       + PYHELLOGUI.py
+       + PYHELLO_msg_en.ts
+       + PYHELLO_icons.ts
+   + resources
+     + Makefile.am
+     + PYHELLO.png
+     + PYHELLO_small.png
+     + ExecPYHELLO.png
+     + handshake.png
+     + stop.png
+     + PYHELLOCatalog.xml.in
+     + SalomeApp.xml.in
+   + doc
+     + Makefile.am
+     + doxyfile.in
+     + index.doc
+</pre>
+
+Note that other files can be optionally present. For example, in some
+SALOME modules sources tree you can find such files as AUTHORS,
+INSTALL, ChangeLog, COPYING, NEWS, README, etc. Some files are
+specific only for this PYHELLO sample module, for example PNG images
+in the resources directory which are used in the GUI dialog boxes etc.
+
+The usual way of the sources directory tree structure initial creation
+is to copy it from the existing SALOME module.
+
+\warning The files of the platform base module (KERNEL) must not be
+copied to initialise a module tree structure. It is usually preferable
+to copy files from another module such as GEOM or MED.
+
+The module name is PYHELLO, the component name is PYHELLO and all the
+files are put in a directory named PYHELLO1_SRC.
+Below is a short description of these files. Note, that files with .in
+suffix are the autoconf templates from which the actual files are
+generated during the build procedure.
+
+- build_configure, configure.ac, Makefile.am, make_common_starter.am
+
+These files are a part of the build system based on GNU
+automake/autoconf auto-tools. These files define the build procedure,
+namely, compilation and installation rules like compiler and linker
+options, installation destination folder, package version etc.
+
+- adm_local/unix/config_files/check_PYHELLO.m4
+
+The files in this directory are also a part of the GNU auto-tools
+-based build procedure. The scripts written in m4 language are usually
+used to test an availability of some 3rd-party pre-requisite product,
+compiler feature, different configuration options. 
+
+- bin/VERSION.in
+
+This file is used to document the module, it must give its version (at
+least) and (optionally) compatibilities or incompatibilities with
+other modules. This file is strongly recommended but is not essential
+for operation of the module.
+
+- bin/runAppli.in
+- bin/myrunSalome.py
+
+These files are not essential but make the example easier to
+use. These are scripts that can be used to run SALOME session with
+PYHELLO module.
+
+- idl/PYHELLO_Gen.idl
+
+This is the CORBA IDL definition of the services implemented by SALOME
+PYHELLO module.
+
+- src/PYHELLO/PYHELLO.py
+- src/PYHELLO/PYHELLO_utils.py
+
+These files provide the implementation of a CORBA engine of the
+PYHELLO module. In particular, this is an implementation of the 
+services defined in the PYHELLO_Gen.idl file.
+
+- src/PYHELLOGUI/PYHELLOGUI.py
+
+The src/PYHELLOGUI is an optional directory that provides an
+implementation of PYHELLO module's GUI. Strictly speaking, the
+GUI is optional for each SALOME module. In some cases it's
+enough to implement CORBA engine only. Then, the services of the
+module will be avaiable in a CORBA environment. The module can be
+loaded to the SALOME container and its services can be used in the
+Supervisor computation schemas, in Python scripts or/and refer to it
+in other modules. A GUI is necessary in the cases if it is planned to
+access to the module functionality from the SALOME GUI session via
+menu actions, dialog boxes and so on.
+
+- src/PYHELLOGUI/PYHELLO_msg_en.ts
+- src/PYHELLOGUI/PYHELLO_icons.ts
+
+These files provide a description (internationalization) of GUI
+resources of the PYHELLO module. PYHELLO_msg_en.ts provides an English
+translation of the string resources used in a module. PYHELLO_icons.ts
+defines images and icons resources used within the GUI of the
+PYHELLO module. Please refer to Qt linguist documentation for more
+details.
+
+- resources/PYHELLO.png
+- resources/PYHELLO_small.png
+- resources/ExecPYHELLO.png
+- resources/handshake.png
+- resources/stop.png
+
+The resources folder usually includes different resource files used
+within the SALOME module. For example, PYHELLO.png file provides an icon
+of PYHELLO module to be shown in the SALOME GUI desktop. ExecPYHELLO.png is
+an icon for the makeBanner() function used in the menu and
+toolbar. The icons handshake.png and stop.png are used in the dialog
+boxes and PYHELLO_small.png icon is used to display in the Object
+browser for root PYHELLO entity.
+
+- resources/PYHELLOCatalog.xml.in
+
+The XML description of the CORBA services provided by the PYHELLO
+module. This file is parsed by Supervisor and YACS module to generate
+the list of service nodes to be used in the calculation schemas. The
+simplest way to create this file is to use Catalog Generator utility
+provided by the SALOME KERNEL module, that can automatically generate
+XML description file from the IDL file.
+
+- resources/SalomeApp.xml.in
+
+This file is essential for the module. It provides some parameters of
+the module which define module behavior in SALOME. In particular it
+should provide a section with the name corresponding to the name of a
+module ("PYHELLO" in this case) with the following parameters:
+\code
+  <section name="PYHELLO">
+    <parameter name="name" value="PyHello"/>
+    <parameter name="icon" value="PYHELLO.png"/>
+    <parameter name="library" value="SalomePyQtGUI"/>
+    <parameter name="version" value="@VERSION@"/>
+  </section>
+\endcode
+
+The "name" parameter defines GUI name of a module. The "icon"
+parameter defines a GUI icon of a module. The parameter "library"
+specifies the name of the C++ library representing the front-end of
+the module in the SALOME GUI desktop. The Python modules which do not
+implement its own C++ front-end GUI library should specify
+"SalomePyQtGUI" value in this parameter. The "version" parameter 
+defines the version of the module.
+
+The section "resources" also specifies the directory that contains
+resources of a module (icons, translation files, etc).
+
+\code
+  <section name="resources">
+    <parameter name="PYHELLO" value="${PYHELLO_ROOT_DIR}/share/salome/resources/pyhello"/>
+  </section>
+\endcode
+
+The section [module_name]_help provides information on the location of 
+the help page and the eventual sub-menu in the Help menu.
+
+\code
+  <section name="pyhello_help" >
+    <parameter name="sub_menu"        value="Samples"/>
+    <parameter name="%1 User's Guide" value="%PYHELLO_ROOT_DIR%/share/doc/salome/gui/PYHELLO/index.html"/>
+  </section>
+\endcode
+
+- doc/doxyfile.in
+
+The Doxygen configuration file. The Doxygen is used to build this
+documentation. The file doxyfile.in provides a rules for the
+generation of module documentation.
+
+- doc/index.doc
+
+An input file for the Doxygen, which provides a source of this documentation.
+
+\ref dev_steps "<< Previous"<br>\ref build_proc_files ">> Next"
+
+\page build_proc_files Build procedure input files
+
+SALOME uses autoconf and automake GNU auto-tools to build the
+modules. The configure script is used for the build procedure to test
+the system configuration and to pre-configure the module construction
+Makefile files. 
+
+The \b build_configure script provides a procedure that uses \b
+configure.ac and set of \b Makefile.am files as input and uses autoconf
+to generate the configure script and automake to generate Makefile.in
+files. 
+
+The files with an .in extension are the skeletons that are the input
+of the configure script (to be more precise, these files should be
+listed in the end of the configure.ac file in the AC_OUTPUT()
+autoconf macro) and are transformed by the configure process.
+
+Almost all files used for this process are located in the platform
+base module KERNEL that is referenced by the KERNEL_ROOT_DIR
+environment variable, namely in its salome_adm sub-folder.
+Similarly, the GUI_ROOT_DIR environment variable is used for the
+graphical user interface (GUI), that also provides a set of
+configuration utilities (m4 files) in its adm_local folder. However,
+some files must be modified as a function of the target module. This
+is the case for build_configure and configure.ac files which usually
+need to be adapted to the module needs. 
+
+The file \b make_common_starter.am file in the adm_local directory of
+the example module provides basic build rules to be used in other
+Makefile.am files. To refer to this file in the Makefile.am it is
+necessary to use "include" clause:
+
+\code
+include $(top_srcdir)/adm_local/unix/make_common_starter.am
+\endcode
+
+The adm_local/unix/config_files is a directory in which the m4 files
+that are used to test the configuration of the system in the configure
+process can be placed. If the salome_adm files are not sufficient,
+additional configuration files can be put to the adm_local directory.
+
+\ref tree_structure "<< Previous"<br>\ref idl_dir ">> Next"
+
+\page idl_dir The idl directory
+
+The idl directory requires a Makefile.am that must make the
+compilation of the idl PYHELLO_Gen.idl file and install all the
+generated files into the correct module installation directories.  The
+BASEIDL_FILES target has to be modified to reach this goal.
+
+The idl file itself must define a CORBA module for which the name must
+be different from the module name to avoid name conflicts and define a
+CORBA interface that is derived at least from the EngineComponent interface  
+of the Engines module. The name of the CORBA module will be
+\b PYHELLO_ORB and the name of the interface will be \b PYHELLO_Gen. 
+
+\ref build_proc_files "<< Previous"<br>\ref src_dir ">> Next"
+
+\page src_dir The src directory
+
+The src contains all source files required to build and install CORBA
+engine and (optionally) GUI of the module. Each of these entities usually
+has (but this is not actually obligatory) its own directory.
+
+The Makefile.am simply triggers the path of sub-directories described
+by the SUBDIRS target.
+
+- The src/PYHELLO directory
+
+This directory contains the Python files that implement the engine
+of the module. The Makefile.am defines the rules used to install these
+files to the destination folder. The name of the module
+engine Python file is predefined and should be set as <MODULE>.py
+where <MODULE> is a name of the module. In the case of the PYHELLO
+module, the name of the engine Python script should be PYHELLO.so.
+
+The PYHELLO.py Python script implements PYHELLO class that is derived
+from the PYHELLO_Gen interface of the PYHELLO_ORB__POA CORBA module,
+the SALOME_ComponentPy_i class (base implementation of SALOME
+Python module engine exported by the KERNEL module) and
+SALOME_DriverPy_i class that provides base implementation of
+persistence mechanism.
+
+In particular, PYHELLO class implements makeBanner() function that is
+defined in the IDL interface PYHELLO_ORB::PYHELLO_Gen. 
+
+\code
+def makeBanner( self, name ):
+    banner = "Hello %s!" % name
+    return banner
+\endcode
+
+Other services
+defined in PYHELLO_Gen CORBA interface also should be implemented by
+this class.
+
+- The src/PYHELLOGUI directory
+
+This directory contains the Python files that implement the GUI
+of PYHELLO module. The name of the module GUI Python script is
+predefined and should be set as <MODULE>GUI.py where <MODULE> is a
+name of the module. In the case of the PYHELLO module, the name of the
+GUI Python script should be PYHELLOGUI.py.
+
+The implementation of GUI of the PYHELLO module should be done
+according to the architecture and rules specified by the SALOME GUI
+module. The PYHELLO.py script should implement a set of the functions
+which define the module behavior in GUI, for example, create menus,
+toolbars, define context popup menus, objects selection behavior,
+implement dialog boxes etc.
+Here below is a short description of these methods. For more details
+please refer to the SALOME GUI module documentation.
+
+- initialize() - module first initialization; usually used to create
+  GUI actions, menus, toolbars and so on;
+- activate() - module activation; perform actions which should
+  be done when the module is activated by the user;
+- deactivate() - module deactivation; perform actions which should
+  be done when the module is deactivated by the user;
+- windows() - get a list and a position of the windows to be
+  associated with the module; these windows will be automatically
+  opened and positioned according to the setting defined by the value
+  returned by this function;
+- views() - get a list of the compatible viewers; these viewers
+  will be automatically opened/raised on the module activation;
+- createPopupMenu() - create and return context popup menu according
+  to the current selection;
+- createPreferences() - initialize module's preferences;
+- preferenceChanged() - callback function that is called when some
+  module's preference is changed by the user; allows to perform the
+  corresponding actions;
+- engineIOR() - to get the reference to the module CORBA engine
+
+Note, that some of these methods are optional and need not be
+obligatory implemented because SalomePyQtGUI_Module class provides a
+base implementation of these functions. It's sometimes enough to
+implement only some of them, depending on the module needs.
+
+In the case of PYHELLO module, some of these functions are
+implemented to provide a sample for the development:
+
+- engineIOR() that initializes PYHELLO module's eggine:
+
+\code
+def engineIOR():
+    IOR = ""
+    if getORB() and getEngine():
+        IOR = getORB().object_to_string( getEngine() )
+        pass
+    return IOR
+\endcode
+
+- initialize() that sets default module preferences
+
+\code
+def initialize():
+    if not sgPyQt.hasSetting( "PYHELLO", "def_obj_name"):
+        sgPyQt.addSetting( "PYHELLO", "def_obj_name", GUIcontext.DEFAULT_NAME )
+    if not sgPyQt.hasSetting( "PYHELLO", "creation_mode"):
+        sgPyQt.addSetting( "PYHELLO", "creation_mode", 0 )
+\endcode
+
+- createPreferences() that initializes module preferences for the
+ application's Preferences dialog box
+
+\code
+def createPreferences():
+    if verbose() : print "PYHELLOGUI.createPreferences() : study : %d" % _getStudyId()
+    gid = sgPyQt.addPreference( "General" )
+    gid = sgPyQt.addPreference( "Object creation", gid )
+    pid = sgPyQt.addPreference( "Default name",  gid, SalomePyQt.PT_String,   "PYHELLO", "def_obj_name" )
+    pid = sgPyQt.addPreference( "Default creation mode", gid, SalomePyQt.PT_Selector, "PYHELLO", "creation_mode" )
+    strings = QStringList()
+    strings.append( "Default name" )
+    strings.append( "Generate name" )
+    strings.append( "Ask name" )
+    indexes = []
+    indexes.append( QVariant(0) )
+    indexes.append( QVariant(1) )
+    indexes.append( QVariant(2) )
+    sgPyQt.setPreferenceProperty( pid, "strings", QVariant( strings ) )
+    sgPyQt.setPreferenceProperty( pid, "indexes", QVariant( indexes ) )
+    pass
+\endcode
+
+- windows() that defines dockable windows layout
+
+\code
+def windows():
+    if verbose() : print "PYHELLOGUI.windows() : study : %d" % _getStudyId()
+    wm = {}
+    wm[SalomePyQt.WT_ObjectBrowser] = Qt.LeftDockWidgetArea
+    wm[SalomePyQt.WT_PyConsole]     = Qt.BottomDockWidgetArea
+    return wm
+\endcode
+
+Please refer to PYHELLOGUI.py script for more details about
+implementation of other callback functions.
+
+An implemention of the ShowHello() function is quite simple. It shows
+the small dialog box allowing user to enter the name, and then uses
+reference to the module CORBA engine to invoke its makeBanner()
+service.
+
+Note, that GUI elements of the Python module are implemented with help
+of PyQt toolkit which provides a Python wrappings of the Qt library.
+
+\ref idl_dir "<< Previous"<br>\ref bin_dir ">> Next"
+
+\page bin_dir The bin directory
+
+The file VERSION.in is used to document the module, it must define its
+version and (optionally) its compatibilities or incompatibilities with
+other modules. Therefore, it is strongly recommended but is not
+essential for correct operation of the module.
+
+The runAppli.in file is the equivalent of the runSalome script
+distributed by the KERNEL module but configured to start SALOME
+session with PYHELLO module only.
+
+The myrunSalome.py file reuses part of functionality provided by the
+KERNEL's runSalome.py script. It is used to run SALOME session and
+start PYHELLO module in this session. 
+
+\ref src_dir "<< Previous"<br>\ref doc_dir ">> Next"
+
+\page doc_dir The doc directory
+
+This directory provides documentation files of the module. The
+documentation of the module can be implemented in the arbitrary
+way. But if you want your documentation to appear in the SALOME GUI
+desktop's Help menu, some specific actions should be done as follows.
+
+The documentation should be generated in the HTML format. For example,
+the documentation of the PYHELLO module is generated using Doxygen
+tool. It allows to generate structured set of HTML pages from the set
+of input plain text files. Input source files should include Doxygen
+tags and optionally direct HTML tags. For more details please refer to
+the Doxygen documentation.
+
+The resulting documentation of a module should include at least one
+file index.html. All the HTML and image files should be exported by
+the build procedure to the following directory:
+<module_installation_dir>/share/doc/salome/gui/<MODULE>
+where <module_installation_dir> is a module installation folder and
+MODULE is its name. For example, for PYHELLO module, at least one file
+should exist:
+<PYHELLO_module_installation_dir>/share/doc/salome/gui/PYHELLO/index.html. 
+
+The SALOME GUI automatically searches for the index.html file in the
+mentioned module directory. If the file is found, the corresponding
+menu command is automatically added to the Help menu of the SALOME GUI
+desktop.
+
+\ref bin_dir "<< Previous"<br>\ref build_procedure ">> Next"
+
+\page build_procedure Construction, installation
+
+Before building PYHELLO module, please ensure that SALOME environment is
+set properly. Assume that SALOME environment is set in env_products.sh
+script. In order to build and install PYHELLO module, you have to
+perform several steps:
+
+<pre>
+[bash% ] source env_products.sh
+[bash% ] mkdir PYHELLO_BUILD
+[bash% ] cd PYHELLO_BUILD
+[bash% ] ../PYHELLO1_SRC/build_configure
+[bash% ] ../PYHELLO1_SRC/configure --prefix=<PYHELLO_module_installation_dir>
+[bash% ] make
+[bash% ] make install
+</pre>
+
+The first command creates a build directory for the PYHELLO module. Then
+next step is to cd to this build directory. From this directory you
+sequentially invoke build_configure, configure, make and make install
+commands. On each step, you have to ensure that the operation is
+finished correctly (no errors raised).
+
+The <PYHELLO_module_installation_dir> variable above defines the
+destination directory to which the PYHELLO module should be
+installed. After the last step is finished, the PYHELLO module is built
+and installed to the <PYHELLO_module_installation_dir> directory.
+
+\ref doc_dir "<< Previous"<br>\ref run_procedure ">> Next"
+
+\page run_procedure Running SALOME
+
+Go to the the <PYHELLO_module_installation_dir> directory and type:
+
+<pre>
+[bash% ] ./bin/salome/runAppli
+</pre>
+
+This command runs SALOME session configured for KERNEL and the PYHELLO
+module. At the end of running, the user will be prompted by the
+Python interpreter command line configured for SALOME that provides
+access to SALOME Python API (including CORBA interfaces).
+
+The runAppli file is a shell script that executes a Python commands
+running SALOME session by passing arguments to it in a command line:
+       
+<pre>
+${KERNEL_ROOT_DIR}/bin/salome/envSalome.py python -i $PYHELLO_ROOT_DIR/bin/salome/myrunSalome.py --modules=PYHELLO --killall
+</pre>
+
+These arguments state that the myrunSalome.py script located in the
+PYHELLO module will be used, that the PYHELLO component will be
+activated and all previously running SALOME sessions should be
+shutdowned.
+
+This command will not function unless the following environment
+variables have previously been set:
+
+<pre>
+export KERNEL_ROOT_DIR=<KERNEL_module_installation_dir>
+export PYHELLO_ROOT_DIR=<PYHELLO_module_installation_dir>
+</pre>
+
+\warning It is possible that the SALOME run will not reach the end.
+In some circumstances, the time to start CORBA servers may be long and
+could exceed the timeout. If the reasons is that the time to
+load dynamic libraries is long, it is possible that a second run
+immediately afterwards will be successful.
+\ref build_procedure "<< Previous"<br>\ref load_module ">> Next"
+
+\page load_module Loading PYHELLO component
+
+The PYHELLO_ORB module has to be imported before making a request to
+load the component into the container, to obtain access to methods of
+the component.  This container is made accessible in the myrunSalome.py
+by means of the \b container variable:
+
+<pre>
+>> import PYHELLO_ORB
+>> c=container.load_impl("PYHELLO","PYHELLO")
+>> c.makeBanner("Christian")
+</pre>
+
+The last instruction returns a string "Hello Christian". Proceed as
+follows to see the CORBA objects created by these actions:
+
+<pre>
+>> clt.showNS()
+</pre>
+
+\ref run_procedure "<< Previous"<br>\ref catalog_def ">> Next"
+
+\page catalog_def PYHELLO module catalog definition
+
+In the example from the previous chapter, the PYHELLO component was
+loaded by making a direct request to the SALOME container. This is not
+the standard method for loading of a component. The normal way uses
+the SALOME LifeCycle service that invokes SALOME Module Catalog
+services to identify the component and its properties and then calls
+the requested container to load the component. 
+
+Before this method can be used, the component must be declared in a
+catalog in the XML format, for which the name must be
+<Module>Catalog.xml. In our case, it will be PYHELLOCatalog.xml.
+Usually this catalog is put to the resources sub-directory of the
+directory tree. The simplest way to create this file is to use Catalog
+Generator utility provided by the SALOME KERNEL module, that can
+automatically generate XML description file from the IDL file.
+
+\ref load_module "<< Previous"<br>\ref load_lcc ">> Next"
+
+\page load_lcc Loading PYHELLO component via LifeCycle service
+
+The method of loading the component is not very different from that
+is described above. The services of the LifeCycle module are used in
+this case instead of calling the container directly. The call sequence
+is contained in the myrunSalome.py \b test() function.
+
+<pre>
+    c=test(clt)
+    c.makeBanner("Christian")
+</pre>
+
+The test function creates the LifeCycle object. It then asks for the
+PYHELLO component to be loaded in the FactoryServer container:
+
+\code
+def test(clt):
+    """
+    Test function that creates an instance of PYHELLO component
+    usage : hello=test(clt)
+    """
+    import LifeCycleCORBA
+    lcc = LifeCycleCORBA.LifeCycleCORBA(clt.orb)
+    import PYHELLO_ORB
+    pyhello = lcc.FindOrLoadComponent("FactoryServePy", "PYHELLO")
+    return pyhello
+\endcode
+
+\ref catalog_def "<< Previous"<br>\ref load_iapp ">> Next"
+
+\page load_iapp Loading from the GUI (IAPP)
+
+In order to activate PYHELLO module in the SALOME GUI desktop, the user
+should press the PYHELLO module's button on the "Modules" toolbar or
+select the name of the module in the combo box on this toolbar.
+
+The image file to be used as an icon of a module should be exported by
+the module build procedure. The icon file name is defined in the
+corresponding SalomeApp.xml configuration file:
+\code
+  <section name="PYHELLO">
+    <parameter name="name" value="Hello"/>
+    <parameter name="icon" value="PYHELLO.png"/>
+    <parameter name="library" value="SalomePyQtGUI"/>
+  </section>
+\endcode
+
+\ref load_lcc "<< Previous"
+
+*/
diff --git a/doc/static/doxygen.css b/doc/static/doxygen.css
new file mode 100755 (executable)
index 0000000..7a2dcbd
--- /dev/null
@@ -0,0 +1,836 @@
+/* The standard CSS for doxygen */
+
+body, table, div, p, dl {
+       font-family: Lucida Grande, Verdana, Geneva, Arial, sans-serif;
+       font-size: 12px;
+}
+
+/* @group Heading Levels */
+
+h1 {
+       font-size: 150%;
+}
+
+h2 {
+       font-size: 120%;
+}
+
+h3 {
+       font-size: 100%;
+}
+
+dt {
+       font-weight: bold;
+}
+
+div.multicol {
+       -moz-column-gap: 1em;
+       -webkit-column-gap: 1em;
+       -moz-column-count: 3;
+       -webkit-column-count: 3;
+}
+
+p.startli, p.startdd, p.starttd {
+       margin-top: 2px;
+}
+
+p.endli {
+       margin-bottom: 0px;
+}
+
+p.enddd {
+       margin-bottom: 4px;
+}
+
+p.endtd {
+       margin-bottom: 2px;
+}
+
+/* @end */
+
+caption {
+       font-weight: bold;
+}
+
+span.legend {
+        font-size: 70%;
+        text-align: center;
+}
+
+h3.version {
+        font-size: 90%;
+        text-align: center;
+}
+
+div.qindex, div.navtab{
+       background-color: #EBEFF6;
+       border: 1px solid #A3B4D7;
+       text-align: center;
+       margin: 2px;
+       padding: 2px;
+}
+
+div.qindex, div.navpath {
+       width: 100%;
+       line-height: 140%;
+}
+
+div.navtab {
+       margin-right: 15px;
+}
+
+/* @group Link Styling */
+
+a {
+       color: #3D578C;
+       font-weight: normal;
+       text-decoration: none;
+}
+
+.contents a:visited {
+       color: #4665A2;
+}
+
+a:hover {
+       text-decoration: underline;
+}
+
+a.qindex {
+       font-weight: bold;
+}
+
+a.qindexHL {
+       font-weight: bold;
+       background-color: #9CAFD4;
+       color: #ffffff;
+       border: 1px double #869DCA;
+}
+
+.contents a.qindexHL:visited {
+        color: #ffffff;
+}
+
+a.el {
+       font-weight: bold;
+}
+
+a.elRef {
+}
+
+a.code {
+       color: #4665A2;
+}
+
+a.codeRef {
+       color: #4665A2;
+}
+
+/* @end */
+
+dl.el {
+       margin-left: -1cm;
+}
+
+.fragment {
+       font-family: monospace, fixed;
+       font-size: 105%;
+}
+
+pre.fragment {
+       border: 1px solid #C4CFE5;
+       background-color: #FBFCFD;
+       padding: 4px 6px;
+       margin: 4px 8px 4px 2px;
+       overflow: auto;
+       word-wrap: break-word;
+       font-size:  9pt;
+       line-height: 125%;
+}
+
+div.ah {
+       background-color: black;
+       font-weight: bold;
+       color: #ffffff;
+       margin-bottom: 3px;
+       margin-top: 3px;
+       padding: 0.2em;
+       border: solid thin #333;
+       border-radius: 0.5em;
+       -webkit-border-radius: .5em;
+       -moz-border-radius: .5em;
+       box-shadow: 2px 2px 3px #999;
+       -webkit-box-shadow: 2px 2px 3px #999;
+       -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px;
+       background-image: -webkit-gradient(linear, left top, left bottom, from(#eee), to(#000),color-stop(0.3, #444));
+       background-image: -moz-linear-gradient(center top, #eee 0%, #444 40%, #000);
+}
+
+div.groupHeader {
+       margin-left: 16px;
+       margin-top: 12px;
+       font-weight: bold;
+}
+
+div.version {
+       border:1px solid #0000FF;
+        color: #CCCCCC;
+       font-family: Arial, Helvetica, sans-serif;
+       font-size: 9pt;
+       text-align: center;
+       width:100px;
+       -moz-border-radius: 8px;
+       margin: 5px;
+}
+                    
+div.footer1 {
+    background-color: #DFE5F1;
+    border: 1px solid #AAAAAA;
+    font-family: Arial, Helvetica, sans-serif;
+    font-size: 11px;
+    padding: 10px;
+    margin-top: 15px;
+}
+           
+
+div.groupText {
+       margin-left: 16px;
+       font-style: italic;
+}
+
+body {
+       background: white;
+       color: black;
+        margin: 0;
+}
+
+div.contents {
+       margin-top: 10px;
+       margin-left: 10px;
+       margin-right: 10px;
+}
+
+td.indexkey {
+       background-color: #EBEFF6;
+       font-weight: bold;
+       border: 1px solid #C4CFE5;
+       margin: 2px 0px 2px 0;
+       padding: 2px 10px;
+}
+
+td.indexvalue {
+       background-color: #EBEFF6;
+       border: 1px solid #C4CFE5;
+       padding: 2px 10px;
+       margin: 2px 0px;
+}
+
+tr.memlist {
+       background-color: #EEF1F7;
+}
+
+p.formulaDsp {
+       text-align: center;
+}
+
+img.formulaDsp {
+       
+}
+
+img.formulaInl {
+       vertical-align: middle;
+}
+
+div.center {
+       text-align: center;
+        margin-top: 0px;
+        margin-bottom: 0px;
+        padding: 0px;
+}
+
+div.center img {
+       border: 0px;
+}
+
+address.footer {
+       text-align: right;
+       padding-right: 12px;
+}
+
+img.footer {
+       border: 0px;
+       vertical-align: middle;
+}
+
+/* @group Code Colorization */
+
+span.keyword {
+       color: #008000
+}
+
+span.keywordtype {
+       color: #604020
+}
+
+span.keywordflow {
+       color: #e08000
+}
+
+span.comment {
+       color: #800000
+}
+
+span.preprocessor {
+       color: #806020
+}
+
+span.stringliteral {
+       color: #002080
+}
+
+span.charliteral {
+       color: #008080
+}
+
+span.vhdldigit { 
+       color: #ff00ff 
+}
+
+span.vhdlchar { 
+       color: #000000 
+}
+
+span.vhdlkeyword { 
+       color: #700070 
+}
+
+span.vhdllogic { 
+       color: #ff0000 
+}
+
+/* @end */
+
+/*
+.search {
+       color: #003399;
+       font-weight: bold;
+}
+
+form.search {
+       margin-bottom: 0px;
+       margin-top: 0px;
+}
+
+input.search {
+       font-size: 75%;
+       color: #000080;
+       font-weight: normal;
+       background-color: #e8eef2;
+}
+*/
+
+td.tiny {
+       font-size: 75%;
+}
+
+.dirtab {
+       padding: 4px;
+       border-collapse: collapse;
+       border: 1px solid #A3B4D7;
+}
+
+th.dirtab {
+       background: #EBEFF6;
+       font-weight: bold;
+}
+
+hr {
+       height: 0px;
+       border: none;
+       border-top: 1px solid #4A6AAA;
+}
+
+hr.footer {
+       height: 1px;
+}
+
+/* @group Member Descriptions */
+
+table.memberdecls {
+       border-spacing: 0px;
+       padding: 0px;
+}
+
+.mdescLeft, .mdescRight,
+.memItemLeft, .memItemRight,
+.memTemplItemLeft, .memTemplItemRight, .memTemplParams {
+       background-color: #F9FAFC;
+       border: none;
+       margin: 4px;
+       padding: 1px 0 0 8px;
+}
+
+.mdescLeft, .mdescRight {
+       padding: 0px 8px 4px 8px;
+       color: #555;
+}
+
+.memItemLeft, .memItemRight, .memTemplParams {
+       border-top: 1px solid #C4CFE5;
+}
+
+.memItemLeft, .memTemplItemLeft {
+        white-space: nowrap;
+}
+
+.memTemplParams {
+       color: #4665A2;
+        white-space: nowrap;
+}
+
+/* @end */
+
+/* @group Member Details */
+
+/* Styles for detailed member documentation */
+
+.memtemplate {
+       font-size: 80%;
+       color: #4665A2;
+       font-weight: normal;
+       margin-left: 9px;
+}
+
+.memnav {
+       background-color: #EBEFF6;
+       border: 1px solid #A3B4D7;
+       text-align: center;
+       margin: 2px;
+       margin-right: 15px;
+       padding: 2px;
+}
+
+.memitem {
+       padding: 0;
+       margin-bottom: 10px;
+}
+
+.memname {
+        white-space: nowrap;
+        font-weight: bold;
+        margin-left: 6px;
+}
+
+.memproto {
+        border-top: 1px solid #A8B8D9;
+        border-left: 1px solid #A8B8D9;
+        border-right: 1px solid #A8B8D9;
+        padding: 6px 0px 6px 0px;
+        color: #253555;
+        font-weight: bold;
+        text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9);
+        /* opera specific markup */
+        box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
+        border-top-right-radius: 8px;
+        border-top-left-radius: 8px;
+        /* firefox specific markup */
+        -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px;
+        -moz-border-radius-topright: 8px;
+        -moz-border-radius-topleft: 8px;
+        /* webkit specific markup */
+        -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
+        -webkit-border-top-right-radius: 8px;
+        -webkit-border-top-left-radius: 8px;
+        background-image:url('nav_f.png');
+        background-repeat:repeat-x;
+        background-color: #E2E8F2;
+
+}
+
+.memdoc {
+        border-bottom: 1px solid #A8B8D9;      
+        border-left: 1px solid #A8B8D9;      
+        border-right: 1px solid #A8B8D9; 
+        padding: 2px 5px;
+        background-color: #FBFCFD;
+        border-top-width: 0;
+        /* opera specific markup */
+        border-bottom-left-radius: 8px;
+        border-bottom-right-radius: 8px;
+        box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
+        /* firefox specific markup */
+        -moz-border-radius-bottomleft: 8px;
+        -moz-border-radius-bottomright: 8px;
+        -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px;
+        background-image: -moz-linear-gradient(center top, #FFFFFF 0%, #FFFFFF 60%, #F7F8FB 95%, #EEF1F7);
+        /* webkit specific markup */
+        -webkit-border-bottom-left-radius: 8px;
+        -webkit-border-bottom-right-radius: 8px;
+        -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
+        background-image: -webkit-gradient(linear,center top,center bottom,from(#FFFFFF), color-stop(0.6,#FFFFFF), color-stop(0.60,#FFFFFF), color-stop(0.95,#F7F8FB), to(#EEF1F7));
+}
+
+.paramkey {
+       text-align: right;
+}
+
+.paramtype {
+       white-space: nowrap;
+}
+
+.paramname {
+       color: #602020;
+       white-space: nowrap;
+}
+.paramname em {
+       font-style: normal;
+}
+
+.params, .retval, .exception, .tparams {
+        border-spacing: 6px 2px;
+}       
+
+.params .paramname, .retval .paramname {
+        font-weight: bold;
+        vertical-align: top;
+}
+        
+.params .paramtype {
+        font-style: italic;
+        vertical-align: top;
+}       
+        
+.params .paramdir {
+        font-family: "courier new",courier,monospace;
+        vertical-align: top;
+}
+
+
+
+
+/* @end */
+
+/* @group Directory (tree) */
+
+/* for the tree view */
+
+.ftvtree {
+       font-family: sans-serif;
+       margin: 0px;
+}
+
+/* these are for tree view when used as main index */
+
+.directory {
+       font-size: 9pt;
+       font-weight: bold;
+       margin: 5px;
+}
+
+.directory h3 {
+       margin: 0px;
+       margin-top: 1em;
+       font-size: 11pt;
+}
+
+/*
+The following two styles can be used to replace the root node title
+with an image of your choice.  Simply uncomment the next two styles,
+specify the name of your image and be sure to set 'height' to the
+proper pixel height of your image.
+*/
+
+/*
+.directory h3.swap {
+       height: 61px;
+       background-repeat: no-repeat;
+       background-image: url("yourimage.gif");
+}
+.directory h3.swap span {
+       display: none;
+}
+*/
+
+.directory > h3 {
+       margin-top: 0;
+}
+
+.directory p {
+       margin: 0px;
+       white-space: nowrap;
+}
+
+.directory div {
+       display: none;
+       margin: 0px;
+}
+
+.directory img {
+       vertical-align: -30%;
+}
+
+/* these are for tree view when not used as main index */
+
+.directory-alt {
+       font-size: 100%;
+       font-weight: bold;
+}
+
+.directory-alt h3 {
+       margin: 0px;
+       margin-top: 1em;
+       font-size: 11pt;
+}
+
+.directory-alt > h3 {
+       margin-top: 0;
+}
+
+.directory-alt p {
+       margin: 0px;
+       white-space: nowrap;
+}
+
+.directory-alt div {
+       display: none;
+       margin: 0px;
+}
+
+.directory-alt img {
+       vertical-align: -30%;
+}
+
+/* @end */
+
+div.dynheader {
+        margin-top: 8px;
+}
+
+address {
+       font-style: normal;
+       color: #2A3D61;
+}
+
+table.doxtable {
+       border-collapse:collapse;
+}
+
+table.doxtable td, table.doxtable th {
+       border: 1px solid #2D4068;
+       padding: 3px 7px 2px;
+}
+
+table.doxtable th {
+       background-color: #374F7F;
+       color: #FFFFFF;
+       font-size: 110%;
+       padding-bottom: 4px;
+       padding-top: 5px;
+       text-align:left;
+}
+
+.tabsearch {
+       top: 0px;
+       left: 10px;
+       height: 36px;
+       background-image: url('tab_b.png');
+       z-index: 101;
+       overflow: hidden;
+       font-size: 13px;
+}
+
+.navpath ul
+{
+       font-size: 11px;
+       background-image:url('tab_b.png');
+       background-repeat:repeat-x;
+       height:30px;
+       line-height:30px;
+       color:#8AA0CC;
+       border:solid 1px #C2CDE4;
+       overflow:hidden;
+       margin:0px;
+       padding:0px;
+}
+
+.navpath li
+{
+       list-style-type:none;
+       float:left;
+       padding-left:10px;
+       padding-right:15px;
+       background-image:url('bc_s.png');
+       background-repeat:no-repeat;
+       background-position:right;
+       color:#364D7C;
+}
+
+.navpath li.navelem a
+{
+       height:32px;
+       display:block;
+       text-decoration: none;
+       outline: none;
+}
+
+.navpath li.navelem a:hover
+{
+       color:#6884BD;
+}
+
+.navpath li.footer
+{
+        list-style-type:none;
+        float:right;
+        padding-left:10px;
+        padding-right:15px;
+        background-image:none;
+        background-repeat:no-repeat;
+        background-position:right;
+        color:#364D7C;
+        font-size: 8pt;
+}
+
+
+div.summary
+{
+       float: right;
+       font-size: 8pt;
+       padding-right: 5px;
+       width: 50%;
+       text-align: right;
+}       
+
+div.summary a
+{
+       white-space: nowrap;
+}
+
+div.ingroups
+{
+       font-size: 8pt;
+       padding-left: 5px;
+       width: 50%;
+       text-align: left;
+}
+
+div.ingroups a
+{
+       white-space: nowrap;
+}
+
+div.header
+{
+        background-image:url('nav_h.png');
+        background-repeat:repeat-x;
+       background-color: #F9FAFC;
+       margin:  0px;
+       border-bottom: 1px solid #C4CFE5;
+}
+
+div.headertitle
+{
+       padding: 5px 5px 5px 10px;
+}
+
+.title {
+        font-size: 150%;
+        font-weight: bold;
+        margin: 10px 2px;
+}
+
+dl
+{
+        padding: 0 0 0 10px;
+}
+
+dl.note, dl.warning, dl.attention, dl.pre, dl.post, dl.invariant, dl.deprecated, dl.todo, dl.test, dl.bug
+{
+        border-left:4px solid;
+        padding: 0 0 0 6px;
+}
+
+dl.note
+{
+        border-color: #D0D000;
+}
+
+dl.warning, dl.attention
+{
+        border-color: #FF0000;
+}
+
+dl.pre, dl.post, dl.invariant
+{
+        border-color: #00D000;
+}
+
+dl.deprecated
+{
+        border-color: #505050;
+}
+
+dl.todo
+{
+        border-color: #00C0E0;
+}
+
+dl.test
+{
+        border-color: #3030E0;
+}
+
+dl.bug
+{
+        border-color: #C08050;
+}
+
+#projectlogo
+{
+       text-align: center;
+       vertical-align: bottom;
+       border-collapse: separate;
+}
+#projectlogo img
+{ 
+       border: 0px none;
+}
+#projectname
+{
+        background-color: #175783;
+        border: 1px solid;
+        height: 80px;
+       background-repeat: no-repeat;
+/*     font: 300% arial,sans-serif;*/
+       margin: 0px;
+       padding: 0px;
+}
+    
+#projectbrief
+{
+       font: 120% arial,sans-serif;
+       margin: 0px;
+       padding: 0px;
+}
+
+#projectnumber
+{
+       font: 50% arial,sans-serif;
+       margin: 0px;
+       padding: 0px;
+}
+
+#titlearea
+{
+        background: url("head.png");
+        background-color: #175783;
+        border: 1px solid;
+        height: 80px;
+        background-repeat: no-repeat;
+       padding: 0px;
+       margin: 0px;
+       width: 100%;
+       border-bottom: 1px solid #5373B4;
+}
+
diff --git a/doc/static/footer.html b/doc/static/footer.html
new file mode 100755 (executable)
index 0000000..4c89a2b
--- /dev/null
@@ -0,0 +1,12 @@
+    <li class="footer"></li>
+   </ul>
+ </div>
+ <div class="footer1">
+ <div style="text-align: center;">
+ Copyright &copy; 2007-2012  CEA/DEN, EDF R&amp;D, OPEN CASCADE<br>
+ Copyright &copy; 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&amp;D, LEG, PRINCIPIA R&amp;D, BUREAU VERITAS<br>
+ </div>
+ </div>
+</body>
+</html>
+               
\ No newline at end of file
diff --git a/doc/static/header.html.in b/doc/static/header.html.in
new file mode 100755 (executable)
index 0000000..4571b43
--- /dev/null
@@ -0,0 +1,20 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<title>$title</title>
+<link href="$relpath$tabs.css" rel="stylesheet" type="text/css"/>
+$treeview
+$search
+$mathjax
+<script type="text/javascript">
+$(document).ready(initResizable);
+</script>
+<link href="$relpath$doxygen.css" rel="stylesheet" type="text/css"/>
+</head>
+<body onload='searchBox.OnSelectItem(0);'>
+<div id="top"><!-- do not remove this div! -->
+<div id="titlearea"><div align="right"><div class="version">Version: @VERSION@</div></div></div>
+
+</div>
index 7035f6110bb2b6bcc520bfeb77e8bb6d0c954a3b..62f3146db0736606d0dd2a6099d58c0062b46563 100644 (file)
@@ -1,24 +1,22 @@
-#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
 #
-#  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-#  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+# This library is free software; you can redistribute it and/or
+# modify it 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
 #
+
 # This Makefile is responsible of generating the client and server
 # implementation of IDL interfaces for both C++ and python usage.
 # The building process of the C++ files is in charge of each source
@@ -28,6 +26,8 @@ include $(top_srcdir)/adm_local/unix/make_common_starter.am
 
 BASEIDL_FILES = PYHELLO_Gen.idl
 
+BASEIDL_FILES_PY=$(BASEIDL_FILES:%.idl=%_idl.py)
+
 # This variable defines the files to be installed
 dist_salomeidl_DATA = $(BASEIDL_FILES)
 
@@ -43,8 +43,7 @@ IDLCXXFLAGS = \
        -bcxx \
        @IDLCXXFLAGS@ \
        -I$(top_builddir)/idl/salome \
-       -I$(KERNEL_ROOT_DIR)/idl/salome \
-       -I$(top_builddir)/salome_adm/unix
+       -I$(KERNEL_ROOT_DIR)/idl/salome
 IDLPYFLAGS  = \
        @IDLPYFLAGS@ \
        -I$(KERNEL_ROOT_DIR)/idl/salome
@@ -57,9 +56,15 @@ install-exec-local: $(BASEIDL_FILES:%=$(top_srcdir)/idl/%)
           fi ; \
         done ;
 
-# uninstall-local removes too much, but it works in distcheck
+# we want to remove only staff generated for IDL files and nothing more
 uninstall-local:
-       rm -rf $(DESTDIR)$(salomepythondir)/*
+       @for modulen in PYHELLO_ORB ; do \
+         test -d $(DESTDIR)$(salomepythondir)/$${modulen} && echo "Removing $(DESTDIR)$(salomepythondir)/$${modulen}" && rm -rf $(DESTDIR)$(salomepythondir)/$${modulen} ; \
+         test -d $(DESTDIR)$(salomepythondir)/$${modulen}__POA && echo "Removing $(DESTDIR)$(salomepythondir)/$${modulen}__POA" && rm -rf $(DESTDIR)$(salomepythondir)/$${modulen}__POA ; \
+       done ; \
+       for filen in $(BASEIDL_FILES_PY) ; do \
+         echo "Removing $(DESTDIR)$(salomepythondir)/$${filen}" && rm -f $(DESTDIR)$(salomepythondir)/$${filen}* ; \
+       done
 
 mostlyclean-local:
        -rm -f *.py
index 87cbfcc57efa606b274bd0228771d3149e470e99..8e852d32b390d7160b4ec64a08abb145b82a392e 100644 (file)
@@ -1,23 +1,29 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2012  CEA/DEN, EDF R&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) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
 //
-//  This library is free software; you can redistribute it and/or
-//  modify it 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
+//
+
+// ---
+// File   : PYHELLOGUI.py
+// Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com)
+// ---
 //
 #ifndef __PYHELLO_GEN__
 #define __PYHELLO_GEN__
 
 module PYHELLO_ORB
 {
-  interface PYHELLO_Gen : Engines::Component, SALOMEDS::Driver
+  interface PYHELLO_Gen : Engines::EngineComponent, SALOMEDS::Driver
   {
-     string makeBanner(in string name)
-         raises (SALOME::SALOME_Exception);
+    string makeBanner(in string name)
+      raises (SALOME::SALOME_Exception);
+    
+    void createObject(in SALOMEDS::Study theStudy,
+                     in string name)
+      raises (SALOME::SALOME_Exception);
   };
 };
 
index 45755dc0e999d5f9b2edbd80c05305bdecf932a1..f420c40eda688be776b8faddc2c4602564b13408 100644 (file)
@@ -1,24 +1,22 @@
-#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
 #
-#  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-#  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+# This library is free software; you can redistribute it and/or
+# modify it 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
 #
+
 # -* Makefile *- 
 # Author : Patrick GOLDBRONN (CEA)
 # Date : 28/06/2001
@@ -30,7 +28,8 @@ dist_salomeres_DATA = \
        PYHELLO.png \
        PYHELLO_small.png \
        ExecPYHELLO.png \
-       SalomeApp.xml
+       handshake.png \
+       stop.png
 
 # VSR: little trick to avoid putting if PYHELLOCatalog.xml to the distribution archive
-nodist_salomeres_SCRIPTS = PYHELLOCatalog.xml
+nodist_salomeres_SCRIPTS = PYHELLOCatalog.xml SalomeApp.xml
index f99af068dc9c81cc628a71fff21968e1724fb18f..7f81d2a52f15d3aa265e80daee468d5de80b622a 100644 (file)
@@ -1,6 +1,6 @@
 <?xml version='1.0' encoding='us-ascii' ?>
 <!--
-  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+  Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
 
   Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
   CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
diff --git a/resources/SalomeApp.xml b/resources/SalomeApp.xml
deleted file mode 100644 (file)
index 532ddce..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-<!--
-  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
-
--->
-<document>
-  <section name="PYHELLO">
-    <!-- Major module parameters -->
-    <parameter name="name"    value="PyHello"/>
-    <parameter name="icon"    value="PYHELLO.png"/>
-    <parameter name="library" value="SalomePyQtGUI"/>
-  </section>
-  <section name="resources">
-    <!-- Module resources -->
-    <parameter name="PYHELLO" value="${PYHELLO_ROOT_DIR}/share/salome/resources/pyhello"/>
-  </section>
-</document>
diff --git a/resources/SalomeApp.xml.in b/resources/SalomeApp.xml.in
new file mode 100644 (file)
index 0000000..c04ca60
--- /dev/null
@@ -0,0 +1,41 @@
+<!--
+  Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
+
+  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+
+  This library is free software; you can redistribute it and/or
+  modify it 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="PYHELLO">
+    <!-- Major module parameters -->
+    <parameter name="name"            value="PyHello"/>
+    <parameter name="icon"            value="PYHELLO.png"/>
+    <parameter name="library"         value="SalomePyQtGUI"/>
+    <parameter name="documentation"   value="pyhello_help"/>
+    <parameter name="version"         value="@VERSION@"/>
+  </section>
+  <section name="resources">
+    <!-- Module resources -->
+    <parameter name="PYHELLO"         value="%PYHELLO_ROOT_DIR%/share/salome/resources/pyhello"/>
+  </section>
+  <section name="pyhello_help" >
+    <parameter name="sub_menu"        value="Samples"/>
+    <parameter name="%1 User's Guide" value="%PYHELLO_ROOT_DIR%/share/doc/salome/gui/PYHELLO/index.html"/>
+  </section>
+</document>
diff --git a/resources/handshake.png b/resources/handshake.png
new file mode 100644 (file)
index 0000000..e840a02
Binary files /dev/null and b/resources/handshake.png differ
diff --git a/resources/stop.png b/resources/stop.png
new file mode 100644 (file)
index 0000000..e896855
Binary files /dev/null and b/resources/stop.png differ
index d374535f697fa85eb6dd8a7f5c6767136bdfa091..26cb25f488f7739a8fab59477596a7fbf1782a62 100755 (executable)
@@ -1,24 +1,22 @@
-#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
 #
-#  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-#  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+# This library is free software; you can redistribute it and/or
+# modify it 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
 #
+
 #  File   : Makefile.in
 #  Author : (CEA)
 #  Modified by : Alexander BORODIN (OCN) - autotools usage
index bfde71ae74a00dbb5205d7991a97bda84012e4b9..1f65521e8976a5ffe7feda3176e642653102a2a8 100755 (executable)
@@ -1,24 +1,22 @@
-#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
 #
-#  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-#  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+# This library is free software; you can redistribute it and/or
+# modify it 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
@@ -28,4 +26,5 @@ include $(top_srcdir)/adm_local/unix/make_common_starter.am
 
 # Scripts to be installed
 dist_salomescript_SCRIPTS = \
-       PYHELLO.py
+       PYHELLO.py \
+       PYHELLO_utils.py
index 98108fe174061574a1b22badfd3a96180341ccbc..07d16ca8f53fd50510c02eee9b8eddf31f92a76f 100644 (file)
-#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2012  CEA/DEN, EDF R&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) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
 #
-#  This library is free software; you can redistribute it and/or
-#  modify it 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
+#
+
+# ---
+# File   : PYHELLOGUI.py
+# Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com)
+# ---
 #
 import PYHELLO_ORB__POA
 import SALOME_ComponentPy
 import SALOME_DriverPy
 
+from PYHELLO_utils import *
+
 class PYHELLO(PYHELLO_ORB__POA.PYHELLO_Gen,
               SALOME_ComponentPy.SALOME_ComponentPy_i,
               SALOME_DriverPy.SALOME_DriverPy_i):
     """
-        Pour etre un composant SALOME cette classe Python
-        doit avoir le nom du composant et heriter de la
-        classe PYHELLO_Gen issue de la compilation de l'idl
-        par omniidl et de la classe SALOME_ComponentPy_i
-        qui porte les services generaux d'un composant SALOME
+    Construct an instance of PYHELLO module engine.
+    The class PYHELLO implements CORBA interface PYHELLO_Gen (see PYHELLO_Gen.idl).
+    It is inherited from the classes SALOME_ComponentPy_i (implementation of
+    Engines::EngineComponent CORBA interface - SALOME component) and SALOME_DriverPy_i
+    (implementation of SALOMEDS::Driver CORBA interface - SALOME module's engine).
     """
     def __init__ ( self, orb, poa, contID, containerName, instanceName, 
                    interfaceName ):
-        print "PYHELLO.__init__: ", containerName, ';', instanceName
         SALOME_ComponentPy.SALOME_ComponentPy_i.__init__(self, orb, poa,
                     contID, containerName, instanceName, interfaceName, 0)
         SALOME_DriverPy.SALOME_DriverPy_i.__init__(self, interfaceName)
-        # On stocke dans l'attribut _naming_service, une reference sur
-        # le Naming Service CORBA
+        #
         self._naming_service = SALOME_ComponentPy.SALOME_NamingServicePy_i( self._orb )
+        #
+        pass
 
+    """
+    Generate hello banner.
+    """
     def makeBanner( self, name ):
         banner = "Hello %s!" % name
         return banner
+
+    """
+    Create object.
+    """
+    def createObject( self, study, name ):
+        builder = study.NewBuilder()
+        father  = findOrCreateComponent( study )
+        object  = builder.NewObject( father )
+        attr    = builder.FindOrCreateAttribute( object, "AttributeName" )
+        attr.SetValue( name )
+        attr    = builder.FindOrCreateAttribute( object, "AttributeLocalID" )
+        attr.SetValue( objectID() )
+        pass
+
+    """
+    Dump module data to the Python script.
+    """
+    def DumpPython( self, study, isPublished ):
+        abuffer = []
+        abuffer.append( "def RebuildData( theStudy ):" )
+        names = []
+        father = study.FindComponent( moduleName() )
+        if father:
+            iter = study.NewChildIterator( father )
+            while iter.More():
+                name = iter.Value().GetName()
+                if name: names.append( name )
+                iter.Next()
+                pass
+            pass
+        if names:
+            abuffer += [ "  from batchmode_salome import lcc" ]
+            abuffer += [ "  import PYHELLO_ORB" ]
+            abuffer += [ "  " ]
+            abuffer += [ "  pyhello = lcc.FindOrLoadComponent( 'FactoryServerPy', '%s' )" % moduleName() ]
+            abuffer += [ "  " ]
+            abuffer += [ "  pyhello.createObject( theStudy, '%s' )" % name for name in names ]
+            pass
+        abuffer += [ "  " ]
+        abuffer.append( "  pass" )
+        abuffer.append( "\0" )
+        return ("\n".join( abuffer ), 1)
diff --git a/src/PYHELLO/PYHELLO_utils.py b/src/PYHELLO/PYHELLO_utils.py
new file mode 100644 (file)
index 0000000..c90954a
--- /dev/null
@@ -0,0 +1,199 @@
+# Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
+#
+# This library is free software; you can redistribute it and/or
+# modify it 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   : PYHELLO_utils.py
+# Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com)
+# ---
+#
+__all__ = [
+    "moduleID",
+    "objectID",
+    "unknownID",
+    "moduleName",
+    "modulePixmap",
+    "verbose",
+    "getORB",
+    "getNS",
+    "getLCC",
+    "getStudyManager",
+    "getEngine",
+    "getEngineIOR",
+    "findOrCreateComponent",
+    "getObjectID",
+    ]
+
+from omniORB import CORBA
+from SALOME_NamingServicePy import SALOME_NamingServicePy_i
+from LifeCycleCORBA import LifeCycleCORBA
+import SALOMEDS
+import SALOMEDS_Attributes_idl
+import PYHELLO_ORB
+import os
+
+###
+# Get PYHELLO module's ID
+###
+def moduleID():
+    MODULE_ID = 1000
+    return MODULE_ID
+
+###
+# Get PYHELLO object's ID
+###
+def objectID():
+    OBJECT_ID = 1010
+    return OBJECT_ID
+
+###
+# Get unknown ID
+###
+def unknownID():
+    FOREIGN_ID = -1
+    return FOREIGN_ID
+
+###
+# Get PYHELLO module's name
+###
+def moduleName():
+    return "PYHELLO"
+
+###
+# Get module's pixmap name
+###
+def modulePixmap():
+    return "PYHELLO_small.png"
+
+###
+# Get verbose level
+### 
+__verbose__ = None
+def verbose():
+    global __verbose__
+    if __verbose__ is None:
+        try:
+            __verbose__ = int( os.getenv( 'SALOME_VERBOSE', 0 ) )
+        except:
+            __verbose__ = 0
+            pass
+        pass
+    return __verbose__
+
+###
+# Get ORB reference
+###
+__orb__ = None
+def getORB():
+    global __orb__
+    if __orb__ is None:
+        __orb__ = CORBA.ORB_init( [''], CORBA.ORB_ID )
+        pass
+    return __orb__
+
+###
+# Get naming service instance
+###
+__naming_service__ = None
+def getNS():
+    global __naming_service__
+    if __naming_service__ is None:
+        __naming_service__ = SALOME_NamingServicePy_i( getORB() )
+        pass
+    return __naming_service__
+
+##
+# Get life cycle CORBA instance
+##
+__lcc__ = None
+def getLCC():
+    global __lcc__
+    if __lcc__ is None:
+        __lcc__ = LifeCycleCORBA( getORB() )
+        pass
+    return __lcc__
+
+##
+# Get study manager
+###
+__study_manager__ = None
+def getStudyManager():
+    global __study_manager__
+    if __study_manager__ is None:
+        obj = getNS().Resolve( '/myStudyManager' )
+        __study_manager__ = obj._narrow( SALOMEDS.StudyManager )
+        pass
+    return __study_manager__
+
+###
+# Get PYHELLO engine
+###
+__engine__ = None
+def getEngine():
+    global __engine__
+    if __engine__ is None:
+        __engine__ = getLCC().FindOrLoadComponent( "FactoryServerPy", moduleName() )
+        pass
+    return __engine__
+
+###
+# Get PYHELLO engine IOR
+###
+def getEngineIOR():
+    IOR = ""
+    if getORB() and getEngine():
+        IOR = getORB().object_to_string( getEngine() )
+        pass
+    return IOR
+
+###
+# Find or create PYHELLO component object in a study
+###
+def findOrCreateComponent( study ):
+    father = study.FindComponent( moduleName() )
+    if father is None:
+        builder = study.NewBuilder()
+        father = builder.NewComponent( moduleName() )
+        attr = builder.FindOrCreateAttribute( father, "AttributeName" )
+        attr.SetValue( moduleName() )
+        attr = builder.FindOrCreateAttribute( father, "AttributePixMap" )
+        attr.SetPixMap( modulePixmap() )
+        attr = builder.FindOrCreateAttribute( father, "AttributeLocalID" )
+        attr.SetValue( moduleID() )
+        try:
+            builder.DefineComponentInstance( father, getEngine() )
+            pass
+        except:
+            pass
+        pass
+    return father
+
+###
+# Get object's ID
+###
+def getObjectID( study, entry ):
+    ID = unknownID()
+    if study and entry:
+        sobj = study.FindObjectID( entry )
+        if sobj is not None:
+            test, anAttr = sobj.FindAttribute( "AttributeLocalID" )
+            if test: ID = anAttr._narrow( SALOMEDS.AttributeLocalID ).Value()
+            pass
+        pass
+    return ID
+    
index c6b2f87a301960c9c51935ddfb456a05c314d264..f857d5ea28b245e4933343722090bf37482d722d 100755 (executable)
@@ -1,24 +1,22 @@
-#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
 #
-#  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-#  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+# This library is free software; you can redistribute it and/or
+# modify it 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
@@ -33,4 +31,5 @@ dist_salomescript_SCRIPTS = \
 # resources files
 nodist_salomeres_DATA = \
        PYHELLO_msg_en.qm \
+       PYHELLO_msg_fr.qm \
        PYHELLO_icons.qm
index 297eb4b317129a92d2a49e56a7a5040254bb86a7..ab552dc0b4f16d4ada7526a53315bf1a77b7d8e3 100644 (file)
@@ -1,24 +1,25 @@
-#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2012  CEA/DEN, EDF R&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) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
 #
-#  This library is free software; you can redistribute it and/or
-#  modify it 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
 #
+
 # ---
 # File   : PYHELLOGUI.py
 # Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com)
@@ -29,13 +30,7 @@ import os
 from PyQt4.QtGui import *
 from PyQt4.QtCore import *
 
-from omniORB import CORBA
-from SALOME_NamingServicePy import *
-from LifeCycleCORBA import *
-import SALOMEDS
-import SALOMEDS_Attributes_idl
-
-import PYHELLO_ORB
+from PYHELLO_utils import *
 
 ################################################
 # GUI context class
@@ -43,14 +38,6 @@ import PYHELLO_ORB
 ################################################
 
 class GUIcontext:
-    # module name
-    MODULE_NAME      = "PYHELLO"
-    # module icon
-    MODULE_PIXMAP    = "PYHELLO_small.png"
-    # data objects IDs
-    MODULE_ID        = 1000
-    OBJECT_ID        = 1010
-    FOREIGN_ID       = -1
     # menus/toolbars/actions IDs
     PYHELLO_MENU_ID  = 90
     HELLO_ID         = 941
@@ -59,6 +46,7 @@ class GUIcontext:
     OPTION_1_ID      = 944
     OPTION_2_ID      = 945
     OPTION_3_ID      = 946
+    PASSWORD_ID      = 947
     PYHELLO_TB_ID    = 90
     DELETE_ALL_ID    = 951
     SHOW_ME_ID       = 952
@@ -66,6 +54,8 @@ class GUIcontext:
     RENAME_ME_ID     = 954
     # default object name
     DEFAULT_NAME     = "Object"
+    # default password
+    DEFAULT_PASSWD   = "Passwd"
 
     # constructor
     def __init__( self ):
@@ -102,6 +92,10 @@ class GUIcontext:
             sgPyQt.action( GUIcontext.OPTION_1_ID + default_mode ).setChecked( True )
         except:
             pass
+        a = sgPyQt.createSeparator()
+        a = sgPyQt.createAction( GUIcontext.PASSWORD_ID, "Display password", "Display password", "Display password" )
+        sgPyQt.createMenu( a, mid )
+        
         # the following action are used in context popup
         a = sgPyQt.createAction( GUIcontext.DELETE_ALL_ID, "Delete all", "Delete all", "Delete all objects" )
         a = sgPyQt.createAction( GUIcontext.SHOW_ME_ID,    "Show",       "Show",       "Show object name" )
@@ -119,7 +113,7 @@ __study2context__   = {}
 # current context
 __current_context__ = None
 # object counter
-__id__ = 0
+__objectid__ = 0
 
 ################################################
        
@@ -133,45 +127,10 @@ sg = libSALOME_Swig.SALOMEGUI_Swig()
 
 ################################################
 
-# init ORB
-orb = CORBA.ORB_init( [''], CORBA.ORB_ID )
-
-# create naming service instance
-naming_service = SALOME_NamingServicePy_i( orb )
-
-# create life cycle CORBA instance
-lcc = LifeCycleCORBA( orb )
-
-# get study manager
-obj = naming_service.Resolve( '/myStudyManager' )
-studyManager = obj._narrow( SALOMEDS.StudyManager )
-
 ################################################
 # Internal methods
 ################################################
 
-###
-# Check verbose mode
-### 
-__verbose__ = None
-def verbose():
-    global __verbose__
-    if __verbose__ is None:
-        try:
-            __verbose__ = int( os.getenv('SALOME_VERBOSE', 0) )
-        except:
-            __verbose__ = 0
-            pass
-        pass
-    return __verbose__
-
-###
-# get PYHELLO engine
-###
-def _getEngine():
-    engine = lcc.FindOrLoadComponent( "FactoryServerPy", GUIcontext.MODULE_NAME )
-    return engine
-
 ###
 # get active study ID
 ###
@@ -183,7 +142,7 @@ def _getStudyId():
 ###
 def _getStudy():
     studyId = _getStudyId()
-    study = studyManager.GetStudyByID( studyId )
+    study = getStudyManager().GetStudyByID( studyId )
     return study
 
 ###
@@ -202,29 +161,6 @@ def _hasChildren( sobj ):
         pass
     return False
 
-###
-# finds or creates component object
-###
-def _findOrCreateComponent():
-    study = _getStudy()
-    father = study.FindComponent( GUIcontext.MODULE_NAME )
-    if father is None:
-        builder = study.NewBuilder()
-        father = builder.NewComponent( GUIcontext.MODULE_NAME )
-        attr = builder.FindOrCreateAttribute( father, "AttributeName" )
-        attr.SetValue( GUIcontext.MODULE_NAME )
-        attr = builder.FindOrCreateAttribute( father, "AttributePixMap" )
-        attr.SetPixMap( GUIcontext.MODULE_PIXMAP )
-        attr = builder.FindOrCreateAttribute( father, "AttributeLocalID" )
-        attr.SetValue( GUIcontext.MODULE_ID )
-        try:
-            builder.DefineComponentInstance( father, _getEngine() )
-            pass
-        except:
-            pass
-        pass
-    return father
-
 ###
 # get current GUI context
 ###
@@ -258,22 +194,8 @@ def _incObjToMap( m, id ):
 def _getSelection():
     selcount = sg.SelectedCount()
     seltypes = {}
-    study = _getStudy()
     for i in range( selcount ):
-        entry = sg.getSelected( i )
-        if entry:
-            sobj = study.FindObjectID( entry )
-            if sobj is not None:
-                test, anAttr = sobj.FindAttribute( "AttributeLocalID" )
-                if test:
-                    ID = anAttr._narrow( SALOMEDS.AttributeLocalID ).Value()
-                    if ID >= 0:
-                        _incObjToMap( seltypes, ID )
-                        continue
-                    pass
-                pass
-            pass
-        _incObjToMap( seltypes, GUIcontext.FOREIGN_ID )
+        _incObjToMap( seltypes, getObjectID( _getStudy(), sg.getSelected( i ) ) )
         pass
     return selcount, seltypes
 
@@ -290,6 +212,8 @@ def initialize():
         sgPyQt.addSetting( "PYHELLO", "def_obj_name", GUIcontext.DEFAULT_NAME )
     if not sgPyQt.hasSetting( "PYHELLO", "creation_mode"):
         sgPyQt.addSetting( "PYHELLO", "creation_mode", 0 )
+    if not sgPyQt.hasSetting( "PYHELLO", "Password"):
+        sgPyQt.addSetting( "PYHELLO", "Password", GUIcontext.DEFAULT_PASSWD )
     pass
 
 # called when module is initialized
@@ -325,6 +249,8 @@ def createPreferences():
     indexes.append( QVariant(2) )
     sgPyQt.setPreferenceProperty( pid, "strings", QVariant( strings ) )
     sgPyQt.setPreferenceProperty( pid, "indexes", QVariant( indexes ) )
+    pid = sgPyQt.addPreference( "Password",  gid, SalomePyQt.PT_String,   "PYHELLO", "Password" )
+    sgPyQt.setPreferenceProperty( pid, "echo", QVariant( 2 ) )
     pass
 
 # called when module is activated
@@ -353,13 +279,13 @@ def createPopupMenu( popup, context ):
     ctx = _setContext( _getStudyId() )
     study = _getStudy()
     selcount, selected = _getSelection()
-    print selcount, selected
+    if verbose() : print selcount, selected
     if selcount == 1:
         # one object is selected
-        if GUIcontext.MODULE_ID in selected:
+        if moduleID() in selected:
             # menu for component
             popup.addAction( sgPyQt.action( GUIcontext.DELETE_ALL_ID ) )
-        elif GUIcontext.OBJECT_ID in selected:
+        elif objectID() in selected:
             # menu for object
             popup.addAction( sgPyQt.action( GUIcontext.SHOW_ME_ID ) )
             popup.addAction( sgPyQt.action( GUIcontext.RENAME_ME_ID ) )
@@ -370,10 +296,10 @@ def createPopupMenu( popup, context ):
     elif selcount > 1:
         # several objects are selected
         if len( selected ) == 1:
-            if GUIcontext.MODULE_ID in selected:
+            if moduleID() in selected:
                 # menu for component
                 popup.addAction( sgPyQt.action( GUIcontext.DELETE_ALL_ID ) )
-            elif GUIcontext.OBJECT_ID in selected:
+            elif objectID() in selected:
                 # menu for list of objects
                 popup.addAction( sgPyQt.action( GUIcontext.DELETE_ME_ID ) )
                 pass
@@ -418,6 +344,45 @@ def viewClosed( viewID ):
     if verbose() : print "PYHELLOGUI.viewClosed(): %d" % viewID
     pass
 
+# called when study is opened
+# returns engine IOR
+def engineIOR():
+    if verbose() : print "PYHELLOGUI.engineIOR()"
+    return getEngineIOR()
+
+# called to check if object can be dragged
+# returns True if drag operation is allowed for this object
+def isDraggable(what):
+    if verbose() : print "PYHELLOGUI.isDraggable()"
+    # return True if object is draggable
+    return False
+
+# called to check if object allows dropping on it
+# returns True if drop operation is allowed for this object
+def isDropAccepted(where):
+    if verbose() : print "PYHELLOGUI.isDropAccepted()"
+    # return True if object accept drops
+    return False
+
+# called when drag and drop operation is finished
+# performs corresponding data re-arrangement if allowed
+def dropObjects(what, where, row, action):
+    if verbose() :
+        print "PYHELLOGUI.dropObjects()"
+        # 'what' is a list of entries of objects being dropped
+        for i in what: print "- dropped:", i
+        # 'where' is a parent object's entry
+        print "- dropping on:", where
+        # 'row' is an position in the parent's children list;
+        # -1 if appending to the end of children list is performed
+        print "- dropping position:", row
+        # 'action' is a dropping action being performed:
+        # - 0x01 (Qt::CopyAction) for copy
+        # - 0x02 (Qt::MoveAction) for move
+        print "- drop action:", action
+        pass
+    pass
+
 ################################################
 # GUI actions implementation
 ################################################
@@ -445,12 +410,14 @@ class MyDialog( QDialog ):
         
         hb1 = QHBoxLayout( self )
         bOk = QPushButton( "&OK", self )
+        bOk.setIcon( sgPyQt.loadIcon( 'PYHELLO', 'ICO_HANDSHAKE' ) )
         self.connect( bOk, SIGNAL( 'clicked()' ), self, SLOT( 'accept()' ) )
         hb1.addWidget( bOk )
         
         hb1.addStretch( 10 )
         
         bCancel = QPushButton( "&Cancel", self )
+        bCancel.setIcon( sgPyQt.loadIcon( 'PYHELLO', 'ICO_STOP' ) )
         self.connect( bCancel, SIGNAL( 'clicked()' ), self, SLOT( 'close()' ) )
         hb1.addWidget( bCancel )
         
@@ -461,7 +428,7 @@ class MyDialog( QDialog ):
     def accept( self ):
         name = str( self.entry.text() )
         if name != "":
-            banner = _getEngine().makeBanner( name )
+            banner = getEngine().makeBanner( name )
             QMessageBox.information( self, 'Info', banner )
             self.close()
         else:
@@ -482,6 +449,7 @@ def ShowHELLO():
 # Create new object
 ###
 def CreateObject():
+    global __objectid__
     default_name = str( sgPyQt.stringSetting( "PYHELLO", "def_obj_name", GUIcontext.DEFAULT_NAME ).trimmed() )
     try:
         if sgPyQt.action( GUIcontext.OPTION_3_ID ).isChecked():
@@ -495,28 +463,19 @@ def CreateObject():
             name = str( name.trimmed() )
         elif sgPyQt.action( GUIcontext.OPTION_2_ID ).isChecked():
             # generate object name
-            global __id__
-            __id__  = __id__ + 1
-            name = "%s %d" % ( default_name, __id__ )
+            __objectid__  = __objectid__ + 1
+            name = "%s %d" % ( default_name, __objectid__ )
         else:
             name = default_name
             pass
         pass
     except:
         # generate object name
-        global __id__
-        __id__  = __id__ + 1
-        name = "%s %d" % ( default_name, __id__ )
+        __objectid__  = __objectid__ + 1
+        name = "%s %d" % ( default_name, __objectid__ )
         pass
     if not name: return
-    study   = _getStudy()
-    builder = study.NewBuilder()
-    father  = _findOrCreateComponent()
-    object  = builder.NewObject( father )
-    attr    = builder.FindOrCreateAttribute( object, "AttributeName" )
-    attr.SetValue( name )
-    attr    = builder.FindOrCreateAttribute( object, "AttributeLocalID" )
-    attr.SetValue( GUIcontext.OBJECT_ID )
+    getEngine().createObject( _getStudy(), name )
     sg.updateObjBrowser( True )
     pass
 
@@ -525,7 +484,7 @@ def CreateObject():
 ###
 def DeleteAll():
     study = _getStudy()
-    father = study.FindComponent( GUIcontext.MODULE_NAME )
+    father = study.FindComponent( moduleName() )
     if father:
         iter = study.NewChildIterator( father )
         builder = study.NewBuilder()
@@ -598,6 +557,15 @@ def Rename():
         pass
     pass
 
+###
+# Display password stored in the preferences
+###
+def Password():
+  passwd = str( sgPyQt.stringSetting( "PYHELLO", "Password", GUIcontext.DEFAULT_PASSWD ).trimmed() )
+  QMessageBox.information(sgPyQt.getDesktop(),
+                          "Password",
+                          passwd)
+
 ###
 # Commands dictionary
 ###
@@ -608,4 +576,5 @@ dict_command = {
     GUIcontext.SHOW_ME_ID       : ShowMe,
     GUIcontext.DELETE_ME_ID     : Delete,
     GUIcontext.RENAME_ME_ID     : Rename,
+    GUIcontext.PASSWORD_ID      : Password,
     }
index 8025ecd712c9463d0aa8f92db1db4fcded25d1e4..f3f20a18319ae25991f07480f42f8655ef518bba 100644 (file)
@@ -1,25 +1,15 @@
+<?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>ICO_HANDSHAKE</source>
+        <translation>handshake.png</translation>
+    </message>
+    <message>
+        <source>ICO_STOP</source>
+        <translation>stop.png</translation>
+    </message>
+</context>
+</TS>
index 8025ecd712c9463d0aa8f92db1db4fcded25d1e4..2ee4f7f85e21fe959cc55c87176221952e7450d3 100644 (file)
@@ -1,25 +1,11 @@
+<?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>
diff --git a/src/PYHELLOGUI/PYHELLO_msg_fr.ts b/src/PYHELLOGUI/PYHELLO_msg_fr.ts
new file mode 100755 (executable)
index 0000000..1e4dea3
--- /dev/null
@@ -0,0 +1,11 @@
+<?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>