From 97482df035ee6e97dde980312a5b02d356b03702 Mon Sep 17 00:00:00 2001 From: ribes Date: Mon, 9 Nov 2009 09:26:21 +0000 Subject: [PATCH] Initial commit --- AUTHORS | 0 COPYING | 340 ++++++++++++ ChangeLog | 0 Makefile.am | 3 + NEWS | 0 README | 1 + TO_BE_REMOVED | 1 - build_configure | 39 ++ configure.ac | 133 +++++ m4/ac_cxx_option.m4 | 42 ++ m4/ac_linker_options.m4 | 47 ++ m4/check_omniorb.m4 | 257 +++++++++ m4/check_salome.m4 | 164 ++++++ m4/check_sphinx.m4 | 35 ++ m4/i2_check_qt4.m4 | 411 +++++++++++++++ m4/production.m4 | 101 ++++ src/Makefile.am | 20 + src/bases/BL_Exception.cxx | 35 ++ src/bases/BL_Exception.hxx | 38 ++ src/bases/BL_Traces.hxx | 38 ++ src/bases/Makefile.am | 26 + src/bases/make_begin.am | 38 ++ src/engine/BL_Job.cxx | 182 +++++++ src/engine/BL_Job.hxx | 103 ++++ src/engine/BL_JobsManager.cxx | 327 ++++++++++++ src/engine/BL_JobsManager.hxx | 81 +++ src/engine/BL_SALOMEServices.cxx | 214 ++++++++ src/engine/BL_SALOMEServices.hxx | 68 +++ src/genericgui/BL_Buttons.cxx | 120 +++++ src/genericgui/BL_Buttons.hxx | 62 +++ src/genericgui/BL_CreateJobWizard.cxx | 686 +++++++++++++++++++++++++ src/genericgui/BL_CreateJobWizard.hxx | 199 +++++++ src/genericgui/BL_GenericGui.cxx | 313 +++++++++++ src/genericgui/BL_GenericGui.hxx | 98 ++++ src/genericgui/BL_JobTab.cxx | 259 ++++++++++ src/genericgui/BL_JobTab.hxx | 78 +++ src/genericgui/BL_JobsManager_QT.cxx | 330 ++++++++++++ src/genericgui/BL_JobsManager_QT.hxx | 97 ++++ src/genericgui/BL_JobsTable.cxx | 44 ++ src/genericgui/BL_JobsTable.hxx | 42 ++ src/genericgui/BL_MachineCatalog.cxx | 66 +++ src/genericgui/BL_MachineCatalog.hxx | 54 ++ src/genericgui/BL_MainButtons.cxx | 0 src/genericgui/BL_MainButtons.hxx | 0 src/genericgui/BL_QModelManager.cxx | 131 +++++ src/genericgui/BL_QModelManager.hxx | 56 ++ src/genericgui/BL_Summary.cxx | 137 +++++ src/genericgui/BL_Summary.hxx | 59 +++ src/genericgui/Makefile.am | 64 +++ src/salomegui/BL_SalomeGui.cxx | 85 +++ src/salomegui/BL_SalomeGui.hxx | 54 ++ src/salomegui/Makefile.am | 78 +++ src/salomegui/resources/SalomeApp.xml | 31 ++ src/salomegui/resources/jobmanager.png | Bin 0 -> 63360 bytes src/standalone/Makefile.am | 23 + src/standalone/main.cxx | 21 + src/standalone/start_jobmanager.sh.in | 48 ++ src/wrappers/BL_MainWindows_Qt.cxx | 77 +++ src/wrappers/BL_MainWindows_Qt.hxx | 58 +++ src/wrappers/BL_MainWindows_SALOME.cxx | 100 ++++ src/wrappers/BL_MainWindows_SALOME.hxx | 80 +++ src/wrappers/BL_MainWindows_Wrap.hxx | 54 ++ src/wrappers/Makefile.am | 54 ++ 63 files changed, 6401 insertions(+), 1 deletion(-) create mode 100644 AUTHORS create mode 100644 COPYING create mode 100644 ChangeLog create mode 100644 Makefile.am create mode 100644 NEWS create mode 100644 README delete mode 100644 TO_BE_REMOVED create mode 100755 build_configure create mode 100644 configure.ac create mode 100644 m4/ac_cxx_option.m4 create mode 100644 m4/ac_linker_options.m4 create mode 100644 m4/check_omniorb.m4 create mode 100644 m4/check_salome.m4 create mode 100644 m4/check_sphinx.m4 create mode 100644 m4/i2_check_qt4.m4 create mode 100644 m4/production.m4 create mode 100644 src/Makefile.am create mode 100644 src/bases/BL_Exception.cxx create mode 100644 src/bases/BL_Exception.hxx create mode 100644 src/bases/BL_Traces.hxx create mode 100644 src/bases/Makefile.am create mode 100644 src/bases/make_begin.am create mode 100644 src/engine/BL_Job.cxx create mode 100644 src/engine/BL_Job.hxx create mode 100644 src/engine/BL_JobsManager.cxx create mode 100644 src/engine/BL_JobsManager.hxx create mode 100644 src/engine/BL_SALOMEServices.cxx create mode 100644 src/engine/BL_SALOMEServices.hxx create mode 100644 src/genericgui/BL_Buttons.cxx create mode 100644 src/genericgui/BL_Buttons.hxx create mode 100644 src/genericgui/BL_CreateJobWizard.cxx create mode 100644 src/genericgui/BL_CreateJobWizard.hxx create mode 100644 src/genericgui/BL_GenericGui.cxx create mode 100644 src/genericgui/BL_GenericGui.hxx create mode 100644 src/genericgui/BL_JobTab.cxx create mode 100644 src/genericgui/BL_JobTab.hxx create mode 100644 src/genericgui/BL_JobsManager_QT.cxx create mode 100644 src/genericgui/BL_JobsManager_QT.hxx create mode 100644 src/genericgui/BL_JobsTable.cxx create mode 100644 src/genericgui/BL_JobsTable.hxx create mode 100644 src/genericgui/BL_MachineCatalog.cxx create mode 100644 src/genericgui/BL_MachineCatalog.hxx create mode 100644 src/genericgui/BL_MainButtons.cxx create mode 100644 src/genericgui/BL_MainButtons.hxx create mode 100644 src/genericgui/BL_QModelManager.cxx create mode 100644 src/genericgui/BL_QModelManager.hxx create mode 100644 src/genericgui/BL_Summary.cxx create mode 100644 src/genericgui/BL_Summary.hxx create mode 100644 src/genericgui/Makefile.am create mode 100644 src/salomegui/BL_SalomeGui.cxx create mode 100644 src/salomegui/BL_SalomeGui.hxx create mode 100644 src/salomegui/Makefile.am create mode 100644 src/salomegui/resources/SalomeApp.xml create mode 100644 src/salomegui/resources/jobmanager.png create mode 100644 src/standalone/Makefile.am create mode 100644 src/standalone/main.cxx create mode 100644 src/standalone/start_jobmanager.sh.in create mode 100644 src/wrappers/BL_MainWindows_Qt.cxx create mode 100644 src/wrappers/BL_MainWindows_Qt.hxx create mode 100644 src/wrappers/BL_MainWindows_SALOME.cxx create mode 100644 src/wrappers/BL_MainWindows_SALOME.hxx create mode 100644 src/wrappers/BL_MainWindows_Wrap.hxx create mode 100644 src/wrappers/Makefile.am diff --git a/AUTHORS b/AUTHORS new file mode 100644 index 0000000..e69de29 diff --git a/COPYING b/COPYING new file mode 100644 index 0000000..d60c31a --- /dev/null +++ b/COPYING @@ -0,0 +1,340 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program 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 General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. diff --git a/ChangeLog b/ChangeLog new file mode 100644 index 0000000..e69de29 diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 0000000..f8238b2 --- /dev/null +++ b/Makefile.am @@ -0,0 +1,3 @@ +ACLOCAL_AMFLAGS = -I m4 + +SUBDIRS = src diff --git a/NEWS b/NEWS new file mode 100644 index 0000000..e69de29 diff --git a/README b/README new file mode 100644 index 0000000..2833438 --- /dev/null +++ b/README @@ -0,0 +1 @@ +This module is an interface to use SALOME Launcher services. diff --git a/TO_BE_REMOVED b/TO_BE_REMOVED deleted file mode 100644 index 74cd5ce..0000000 --- a/TO_BE_REMOVED +++ /dev/null @@ -1 +0,0 @@ -TEst diff --git a/build_configure b/build_configure new file mode 100755 index 0000000..e3987c4 --- /dev/null +++ b/build_configure @@ -0,0 +1,39 @@ +#! /bin/sh +# Copyright (C) 2009 CEA/DEN, EDF R&D +# +# This library is free software; you can redistribute it and/or +# modify it 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 +# + +ORIG_DIR=`pwd` +run() { + local logfile=$ORIG_DIR/build_configure.log + printf "%-50s" "$1 ... " + eval $1 > $logfile 2>&1 + if test $? != 0 ; then + echo "[FAILED]" + echo "see file build_configure.log ..." + exit 1 + fi + echo "[ OK ]" +} + +run "libtoolize --force --copy --automake" +run "aclocal -I m4" +run "autoheader -I m4" +run "autoconf" +run "automake --add-missing --copy" + diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..da46773 --- /dev/null +++ b/configure.ac @@ -0,0 +1,133 @@ +# Copyright (C) 2009 CEA/DEN, EDF R&D +# +# This library is free software; you can redistribute it and/or +# modify it 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 +# +# -- +# Author : André RIBES (EDF) +# -- +# ----------------------------------------------------------------------------- +# +AC_INIT([JOBMANAGER project], [0.1], [andre.ribes@edf.fr], [JobManager-Module]) +AM_INIT_AUTOMAKE([tar-pax]) +AC_CONFIG_HEADER(jobmanager_config.h) + +# set up MODULE_NAME variable for dynamic construction of directories (resources, etc.) +MODULE_NAME=jobmanager +AC_SUBST(MODULE_NAME) + +XVERSION=0x001 +AC_SUBST(XVERSION) + +RELEASE=$VERSION +AC_SUBST(RELEASE) + +# This function return on stdout the absolute path of the filename in +# argument. Exemple: +# $ filename="../KERNEL_SRC/configure +# $ absfilename=`absolute_path $filename` +function absolute_path { + filename=$1 + here=`pwd` + apath=`dirname $filename` + cd $apath + apath=`pwd` + cd $here + echo $apath +} + +# Build directory, where the configure script is executed. +ROOT_BUILDDIR=`pwd` +# Source directory, where the configure script is located. +ROOT_SRCDIR=`absolute_path $0` + +AC_SUBST(ROOT_SRCDIR) +AC_SUBST(ROOT_BUILDDIR) + +echo +echo Source root directory : $ROOT_SRCDIR +echo Build root directory : $ROOT_BUILDDIR + +# ----------------------------------------------------------------------------- + +AC_ENABLE_DEBUG(yes) +AC_DISABLE_PRODUCTION + +#Linker options +AC_CANONICAL_BUILD +AC_LINKER_OPTIONS + +#Mandatory products +AC_PROG_CXX +AM_PROG_LIBTOOL +AC_CHECK_LIB(dl,dlopen) +I2_CHECK_QT4 +AC_CHECK_OMNIORB + +# Optional products +CHECK_SPHINX + +AC_CHECK_KERNEL +CHECK_GUI(SALOME_Session_Server,SALOME_Session_Server) + +AM_CONDITIONAL([SALOME_KERNEL], [test "x$KERNEL_ROOT_DIR" != "x"]) +AM_CONDITIONAL([HAS_GUI], [test "x$GUI_ROOT_DIR" != "x"]) + +echo +echo +echo +echo "------------------------------------------------------------------------" +echo "$PACKAGE $VERSION" +echo "------------------------------------------------------------------------" +echo +echo "Configuration Options Summary:" +echo +echo "Mandatory products:" +echo " Qt4 (graphic interface) : $qt_ok" +echo " OmniOrb (CORBA) ........ : $omniORB_ok" +echo " SALOME KERNEL .......... : $Kernel_ok" +echo " SALOME GUI ............. : $SalomeGUI_ok" +echo +echo "Optional products:" +echo " Sphinx (user doc) ...... : $sphinx_ok" +echo +echo "------------------------------------------------------------------------" +echo + +if test "x$omniORB_ok" = "xno"; then + AC_MSG_ERROR([OmniOrb is required],1) +fi +if test "x$qt_ok" = "xno"; then + AC_MSG_ERROR([Qt4 is required],1) +fi +if test "x$Kernel_ok" = "xno"; then + AC_MSG_ERROR([SALOME KERNEL is required],1) +fi +if test "x$SalomeGui_ok" = "xno"; then + AC_MSG_ERROR([SALOME GUI is required],1) +fi + +AC_OUTPUT([ \ + Makefile \ + src/Makefile \ + src/bases/Makefile \ + src/engine/Makefile \ + src/genericgui/Makefile \ + src/wrappers/Makefile \ + src/standalone/Makefile \ + src/standalone/start_jobmanager.sh \ + src/salomegui/Makefile \ +]) diff --git a/m4/ac_cxx_option.m4 b/m4/ac_cxx_option.m4 new file mode 100644 index 0000000..6f31513 --- /dev/null +++ b/m4/ac_cxx_option.m4 @@ -0,0 +1,42 @@ +dnl Copyright (C) 2006-2008 CEA/DEN, EDF R&D +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 +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 +dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +dnl +dnl @synopsis AC_CXX_OPTION(-option,variable where we add option if ok,action if ok; action if not ok) +dnl Check options for C++ compiler +dnl @author Bernard Secher - 15/01/2004 +dnl +AC_DEFUN([AC_CXX_OPTION], [ + AC_MSG_CHECKING(wether $CXX accepts $1) + cat > conftest.cxx < conftest.log 2>&1 + rm -f a.out + var=`echo $1 | sed -e "s, .*$,," | sed -e "s,^-,,"` +#CCRT if ! grep -e $var conftest.log > /dev/null 2>&1 ; then + if grep -e $var conftest.log > /dev/null 2>&1 ; then + AC_MSG_RESULT(no) + eval $4 + else + AC_MSG_RESULT(yes) + $2="${$2} $1" + eval $3 + fi +]) + + diff --git a/m4/ac_linker_options.m4 b/m4/ac_linker_options.m4 new file mode 100644 index 0000000..cec98c4 --- /dev/null +++ b/m4/ac_linker_options.m4 @@ -0,0 +1,47 @@ +dnl Copyright (C) 2006-2008 CEA/DEN, EDF R&D +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 +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 +dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +dnl +dnl @synopsis AC_LINKER_OPTIONS +dnl Check warning flags for C++ compiler to control warning messages +dnl +AC_DEFUN([AC_LINKER_OPTIONS],[ + + AC_CHECKING(for LIB_LOCATION_SUFFIX) + LIB_LOCATION_SUFFIX="" + AC_SUBST(LIB_LOCATION_SUFFIX) + AC_MSG_RESULT(LIB_LOCATION_SUFFIX is $LIB_LOCATION_SUFFIX) + + for opt in "-Xlinker -export-dynamic" -transitive_link; do + AC_CXX_OPTION($opt,LDEXPDYNFLAGS,flag=yes,flag=no) + if test "$flag" = "yes"; then + break + fi + done + AC_SUBST(LDEXPDYNFLAGS) + +dnl + case $host_os in + osf*) + STDLIB="-lcxxstd" + ;; + *) + STDLIB="-lstdc++" + ;; + esac + AC_SUBST(STDLIB) +]) diff --git a/m4/check_omniorb.m4 b/m4/check_omniorb.m4 new file mode 100644 index 0000000..f2be9a7 --- /dev/null +++ b/m4/check_omniorb.m4 @@ -0,0 +1,257 @@ +dnl Copyright (C) 2006-2008 CEA/DEN, EDF R&D +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 +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 +dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +dnl +AC_DEFUN([AC_CHECK_OMNIORB],[ +AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([AC_PROG_CXX])dnl +AC_REQUIRE([AC_PROG_CPP])dnl +AC_REQUIRE([AC_PROG_CXXCPP])dnl + +AC_CHECKING(for omniORB) +omniORB_ok=yes + +if test "x$PYTHON" = "x" +then + CHECK_PYTHON +fi + +AC_LANG_SAVE +AC_LANG_CPLUSPLUS + +AC_PATH_PROG(OMNIORB_IDL, omniidl) +if test "x$OMNIORB_IDL" = "x" +then + omniORB_ok=no + AC_MSG_RESULT(omniORB binaries not in PATH variable) +else + omniORB_ok=yes +fi + +if test "x$omniORB_ok" = "xyes" +then + AC_SUBST(OMNIORB_IDL) + + OMNIORB_BIN=`echo ${OMNIORB_IDL} | sed -e "s,[[^/]]*$,,;s,/$,,;s,^$,.,"` + OMNIORB_ROOT=${OMNIORB_BIN} + # one-level up + OMNIORB_ROOT=`echo ${OMNIORB_ROOT} | sed -e "s,[[^/]]*$,,;s,/$,,;s,^$,.,"` + # + # + if test -d $OMNIORB_ROOT/include ; then + # if $OMNIORB_ROOT/include exists, there are a lot of chance that + # this is omniORB4.x installed via configure && make && make install + OMNIORB_LIB=`echo ${OMNIORB_BIN} | sed -e "s,bin\$,lib,"` + OMNIORB_VERSION=4 + else + # omniORB has been installed old way + OMNIORB_LIB=`echo ${OMNIORB_BIN} | sed -e "s,bin/,lib/,"` + # one-level up again + OMNIORB_ROOT=`echo ${OMNIORB_ROOT} | sed -e "s,[[^/]]*$,,;s,/$,,;s,^$,.,"` + if test -d $OMNIORB_ROOT/include/omniORB4 ; then + OMNIORB_VERSION=4 + else + OMNIORB_VERSION=3 + fi + fi + AC_SUBST(OMNIORB_ROOT) + + OMNIORB_INCLUDES="-I$OMNIORB_ROOT/include -I$OMNIORB_ROOT/include/omniORB${OMNIORB_VERSION} -I$OMNIORB_ROOT/include/COS" + AC_SUBST(OMNIORB_INCLUDES) + + # ENABLE_PTHREADS + + OMNIORB_CXXFLAGS="-DOMNIORB_VERSION=$OMNIORB_VERSION" + case $build_cpu in + sparc*) + OMNIORB_CXXFLAGS="$OMNIORB_CXXFLAGS -D__sparc__" + ;; + *86*) + OMNIORB_CXXFLAGS="$OMNIORB_CXXFLAGS -D__x86__" + ;; + esac + case $build_os in + solaris*) + __OSVERSION__=5 + OMNIORB_CXXFLAGS="$OMNIORB_CXXFLAGS -D__sunos__" + ;; + linux*) + __OSVERSION__=2 + OMNIORB_CXXFLAGS="$OMNIORB_CXXFLAGS -D__linux__ -D_REENTRANT" + ;; + esac + AC_SUBST(OMNIORB_CXXFLAGS) + + CPPFLAGS_old=$CPPFLAGS + CPPFLAGS="$CPPFLAGS $OMNIORB_CXXFLAGS $OMNIORB_INCLUDES" + + AC_LANG_CPLUSPLUS + AC_CHECK_HEADER(CORBA.h,omniORB_ok="yes",omniORB_ok="no") + + CPPFLAGS=$CPPFLAGS_old + +fi + +if test "x$omniORB_ok" = "xyes" +then + if test "x$OMNIORB_LIB" = "x/usr/lib" + then + OMNIORB_LDFLAGS="" + OMNIORB_RFLAGS="" + else + OMNIORB_LDFLAGS="-L$OMNIORB_LIB" + OMNIORB_RFLAGS="-R$OMNIORB_LIB" + fi + + LIBS_old=$LIBS + LIBS="$LIBS $OMNIORB_LDFLAGS -lomnithread" + + CXXFLAGS_old=$CXXFLAGS + CXXFLAGS="$CXXFLAGS $OMNIORB_CXXFLAGS $OMNIORB_INCLUDES" + + AC_MSG_CHECKING(whether we can link with omnithreads) + AC_CACHE_VAL(salome_cv_lib_omnithreads,[ + AC_TRY_LINK( +#include +, omni_mutex my_mutex, + eval "salome_cv_lib_omnithreads=yes",eval "salome_cv_lib_omnithreads=no") + ]) + + omniORB_ok="$salome_cv_lib_omnithreads" + if test "x$omniORB_ok" = "xno" + then + AC_MSG_RESULT(omnithreads not found) + else + AC_MSG_RESULT(yes) + fi + + LIBS=$LIBS_old + CXXFLAGS=$CXXFLAGS_old +fi + + +dnl omniORB_ok=yes +if test "x$omniORB_ok" = "xyes" +then + + AC_CHECK_LIB(socket,socket, LIBS="-lsocket $LIBS",,) + AC_CHECK_LIB(nsl,gethostbyname, LIBS="-lnsl $LIBS",,) + + LIBS_old=$LIBS + OMNIORB_LIBS="$OMNIORB_LDFLAGS" + OMNIORB_LIBS="$OMNIORB_LIBS -lomniORB${OMNIORB_VERSION}" + OMNIORB_LIBS="$OMNIORB_LIBS -lomniDynamic${OMNIORB_VERSION}" + OMNIORB_LIBS="$OMNIORB_LIBS -lCOS${OMNIORB_VERSION}" + OMNIORB_LIBS="$OMNIORB_LIBS -lCOSDynamic${OMNIORB_VERSION}" + OMNIORB_LIBS="$OMNIORB_LIBS -lomnithread" + OMNIORB_LIBS="$OMNIORB_LIBS ${OMNIORB_RFLAGS}" + if test $OMNIORB_VERSION = 3 ; then + OMNIORB_LIBS="$OMNIORB_LIBS -ltcpwrapGK" + fi + AC_SUBST(OMNIORB_LIBS) + + LIBS="$OMNIORB_LIBS $LIBS" + CXXFLAGS_old=$CXXFLAGS + CXXFLAGS="$CXXFLAGS $OMNIORB_CXXFLAGS $OMNIORB_INCLUDES" + + AC_MSG_CHECKING(whether we can link with omniORB) + AC_CACHE_VAL(salome_cv_lib_omniorb,[ + AC_TRY_LINK( +#include +, CORBA::ORB_var orb, + eval "salome_cv_lib_omniorb3=yes",eval "salome_cv_lib_omniorb3=no") + ]) + omniORB_ok="$salome_cv_lib_omniorb3" + + omniORB_ok=yes + if test "x$omniORB_ok" = "xno" + then + AC_MSG_RESULT(omniORB library linking failed) + omniORB_ok=no + else + AC_MSG_RESULT(yes) + fi + LIBS="$LIBS_old" + CXXFLAGS=$CXXFLAGS_old +fi + + +if test "x$omniORB_ok" = "xyes" +then + + OMNIORB_IDLCXXFLAGS="-nf -I$OMNIORB_ROOT/idl" + OMNIORB_IDLPYFLAGS="-bpython -I$OMNIORB_ROOT/idl" + AC_SUBST(OMNIORB_IDLCXXFLAGS) + AC_SUBST(OMNIORB_IDLPYFLAGS) + + OMNIORB_IDL_CLN_H=.hh + OMNIORB_IDL_CLN_CXX=SK.cc + OMNIORB_IDL_CLN_OBJ=SK.o + AC_SUBST(OMNIORB_IDL_CLN_H) + AC_SUBST(OMNIORB_IDL_CLN_CXX) + AC_SUBST(OMNIORB_IDL_CLN_OBJ) + + OMNIORB_IDL_SRV_H=.hh + OMNIORB_IDL_SRV_CXX=SK.cc + OMNIORB_IDL_SRV_OBJ=SK.o + AC_SUBST(OMNIORB_IDL_SRV_H) + AC_SUBST(OMNIORB_IDL_SRV_CXX) + AC_SUBST(OMNIORB_IDL_SRV_OBJ) + + OMNIORB_IDL_TIE_H= + OMNIORB_IDL_TIE_CXX= + AC_SUBST(OMNIORB_IDL_TIE_H) + AC_SUBST(OMNIORB_IDL_TIE_CXX) + + AC_DEFINE(OMNIORB,,[Presence de omniORB]) + + CORBA_HAVE_POA=1 + AC_DEFINE(CORBA_HAVE_POA,,[POA presence]) + + CORBA_ORB_INIT_HAVE_3_ARGS=1 + AC_DEFINE(CORBA_ORB_INIT_HAVE_3_ARGS,,[?]) + CORBA_ORB_INIT_THIRD_ARG='"omniORB"' + AC_DEFINE(CORBA_ORB_INIT_THIRD_ARG, "omniORB", [?]) + +fi + +omniORBpy_ok=no +if test "x$omniORB_ok" = "xyes" +then + AC_MSG_CHECKING(omniORBpy) + $PYTHON -c "import omniORB" &> /dev/null + if test $? = 0 ; then + AC_MSG_RESULT(yes) + omniORBpy_ok=yes + else + AC_MSG_RESULT(no, check your installation of omniORBpy) + omniORBpy_ok=no + fi +fi + +dnl AC_LANG_RESTORE + +AC_MSG_RESULT(for omniORBpy: $omniORBpy_ok) +AC_MSG_RESULT(for omniORB: $omniORB_ok) + +IDL=${OMNIORB_IDL} +IDLGENFLAGS="-bcxx " +AC_SUBST(IDL) +AC_SUBST(IDLGENFLAGS) + +])dnl +dnl diff --git a/m4/check_salome.m4 b/m4/check_salome.m4 new file mode 100644 index 0000000..f6bdfa7 --- /dev/null +++ b/m4/check_salome.m4 @@ -0,0 +1,164 @@ +dnl Copyright (C) 2006-2008 CEA/DEN, EDF R&D +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 +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 +dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +dnl +# Check availability of Salome's KERNEL binary distribution +# +# Author : Jerome Roy (CEA, 2003) +# + +AC_DEFUN([AC_CHECK_KERNEL],[ + +AC_CHECKING(for Kernel) + +Kernel_ok=no +dsc_ok=no + +AC_ARG_WITH(kernel, + [ --with-kernel=DIR root directory path of KERNEL build or installation], + KERNEL_DIR="$withval",KERNEL_DIR="") + +if test "x$KERNEL_DIR" = "x" ; then + +# no --with-kernel-dir option used + + if test "x$KERNEL_ROOT_DIR" != "x" ; then + + # KERNEL_ROOT_DIR environment variable defined + KERNEL_DIR=$KERNEL_ROOT_DIR + + else + + # search Kernel binaries in PATH variable + AC_PATH_PROG(TEMP, runSalome) + if test "x$TEMP" != "x" ; then + KERNEL_BIN_DIR=`dirname $TEMP` + KERNEL_DIR=`dirname $KERNEL_BIN_DIR` + fi + + fi +# +fi + + +if test -f ${KERNEL_DIR}/bin/salome/runSalome ; then + Kernel_ok=yes + AC_MSG_RESULT(Using Kernel module distribution in ${KERNEL_DIR}) + AC_DEFINE(SALOME_KERNEL,,[With Salome KERNEL]) + + if test "x$KERNEL_ROOT_DIR" = "x" ; then + KERNEL_ROOT_DIR=${KERNEL_DIR} + fi + if test "x$KERNEL_SITE_DIR" = "x" ; then + KERNEL_SITE_DIR=${KERNEL_ROOT_DIR} + fi + SALOME_ROOT_DIR=`AS_DIRNAME(["$KERNEL_ROOT_DIR"])` + SALOME_VERSION="`echo $KERNEL_ROOT_DIR | sed s@$SALOME_ROOT_DIR/KERNEL@@`" + + if test -f ${KERNEL_DIR}/idl/salome/DSC_Engines.idl ; then + # DSC extension available + dsc_ok=yes + AC_MSG_RESULT(Using DSC Ports module distribution in ${KERNEL_DIR}) + AC_DEFINE(DSC_PORTS,,[With DSC ports]) + else + AC_MSG_WARN("Cannot find DSC Ports module distribution") + fi + + KERNEL_LDFLAGS=-L${KERNEL_ROOT_DIR}/lib/salome + KERNEL_CXXFLAGS=-I${KERNEL_ROOT_DIR}/include/salome + + AC_SUBST(KERNEL_ROOT_DIR) + AC_SUBST(KERNEL_SITE_DIR) + AC_SUBST(SALOME_ROOT_DIR) + AC_SUBST(SALOME_VERSION) + AC_SUBST(KERNEL_LDFLAGS) + AC_SUBST(KERNEL_CXXFLAGS) + +else + AC_MSG_WARN("Cannot find compiled Kernel module distribution") +fi + +AC_MSG_RESULT(for Kernel: $Kernel_ok) + +])dnl + +# ----------------------------------------------------------------------------- +# --- from GUI_SRC 3.2.3 +# Check availability of Salome binary distribution +# +# Author : Marc Tajchman (CEA, 2002) +#------------------------------------------------------------ + +AC_DEFUN([CHECK_GUI],[ +AC_REQUIRE([AC_LINKER_OPTIONS])dnl + +AC_CHECKING(for $2 $1 ) + +SalomeGUI_ok=no + +GUI_LDFLAGS="" +GUI_CXXFLAGS="" + +AC_ARG_WITH(gui, + [ --with-gui=DIR root directory path of SALOME GUI installation], + [SALOME_GUI_DIR="$withval"],[SALOME_GUI_DIR=""]) + +if test "x${SALOME_GUI_DIR}" = "x" ; then + # no --with-gui-dir option used + AC_MSG_RESULT(try \${GUI_ROOT_DIR}: ${GUI_ROOT_DIR}) + if test "x${GUI_ROOT_DIR}" != "x" ; then + # SALOME_ROOT_DIR environment variable defined + SALOME_GUI_DIR=${GUI_ROOT_DIR} + else + # search Salome binaries in PATH variable + AC_PATH_PROG(TEMP, $1) + if test "x${TEMP}" != "x" ; then + AC_MSG_RESULT($1 was found at : ${TEMP}) + SALOME_BIN_DIR=`dirname ${TEMP}` + SALOME_GUI_DIR=`cd ${SALOME_BIN_DIR}/../..; pwd` + fi + fi +fi + +if test -f ${SALOME_GUI_DIR}/bin/salome/$1 ; then + SalomeGUI_ok=yes + AC_MSG_RESULT(Using SALOME GUI distribution in ${SALOME_GUI_DIR}) + + if test "x${GUI_ROOT_DIR}" == "x" ; then + GUI_ROOT_DIR=${SALOME_GUI_DIR} + fi + + AC_SUBST(GUI_ROOT_DIR) + + GUI_LDFLAGS=-L${SALOME_GUI_DIR}/lib/salome + GUI_CXXFLAGS=-I${SALOME_GUI_DIR}/include/salome + + AC_SUBST(GUI_LDFLAGS) + AC_SUBST(GUI_CXXFLAGS) +else + AC_MSG_WARN("Cannot find compiled SALOME GUI distribution") +fi + +AC_MSG_RESULT(for $2: ${SalomeGUI_ok}) + +])dnl + +AC_DEFUN([CHECK_SALOME_GUI],[ + CHECK_GUI([SUITApp], + [SALOME GUI]) +])dnl + diff --git a/m4/check_sphinx.m4 b/m4/check_sphinx.m4 new file mode 100644 index 0000000..eec1495 --- /dev/null +++ b/m4/check_sphinx.m4 @@ -0,0 +1,35 @@ +dnl Copyright (C) 2006-2008 CEA/DEN, EDF R&D +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 +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 +dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +dnl +AC_DEFUN([CHECK_SPHINX],[ + +AC_CHECKING(for sphinx doc generator) + +sphinx_ok=yes +dnl where is sphinx ? +AC_PATH_PROG(SPHINX,sphinx-build) +if test "x$SPHINX" = "x" +then + AC_MSG_WARN(sphinx not found) + sphinx_ok=no +fi + +AM_CONDITIONAL(SPHINX_IS_OK, [test x"$sphinx_ok" = xyes]) + +])dnl +dnl diff --git a/m4/i2_check_qt4.m4 b/m4/i2_check_qt4.m4 new file mode 100644 index 0000000..355c389 --- /dev/null +++ b/m4/i2_check_qt4.m4 @@ -0,0 +1,411 @@ +dnl Copyright (C) 2006-2008 CEA/DEN, EDF R&D +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 +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 +dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +dnl +dnl the following variables are exported: +dnl QT_MOC +dnl QT_UIC +dnl QT_DIR +dnl qt4_cppflags +dnl qt4_ldflags +dnl qt4_libs +dnl WITH_QT4 +dnl qt4 is searched in the following order +dnl path given with --with-qt4 options +dnl presence of QTDIR variable +dnl /usr +dnl usages +dnl ./configure --prefix=/home/prascle/partage/maquettes/install +dnl ./configure --prefix=/home/prascle/partage/maquettes/install --with-qt4 +dnl ./configure --prefix=/home/prascle/partage/maquettes/install --with-qt4=/opt/qt443 +dnl ./configure --prefix=/home/prascle/partage/maquettes/install --with-qt4-includes=/usr/include/qt4 +dnl ./configure --prefix=/home/prascle/partage/maquettes/install --with-qt4-includes=/usr/include/qt4 --with-qt4-libraries=/usr/lib -with-qt4-tools=/usr/bin +dnl ./configure --prefix=/home/prascle/partage/maquettes/install --without-qt4 +dnl +AC_DEFUN([I2_CHECK_QT4], +[ + AC_REQUIRE([AC_PROG_CXX]) + AC_REQUIRE([AC_PROG_CPP]) + + qt_ok=no + + # --- check if qt4 standard install directory is defined (with subdirectories bin lib include) + qt4_install_path="" + AC_ARG_WITH([qt4], + AC_HELP_STRING([--with-qt4@<:@=DIR@:>@], [where the Qt4 package with a standard install is: default @<:@$QTDIR@:>@ or @<:@/usr@:>@]), + [qt4_install_path=$withval], [withval=notset]) + + # --- if qt4 standard install directory is defined but with no path: QTDIR value if defined, or /usr + if test x${withval} = xyes + then + if test -z $QTDIR + then + qt4_install_path="/usr" + else + qt4_install_path=$QTDIR + fi + fi + + # --- if qt4 standard install directory is not defined: QTDIR value if defined, or /usr + if test x${withval} = xnotset + then + if test -z $QTDIR + then + qt4_install_path="/usr" + else + if test $QTDIR = /usr/lib/qt3 ; then + if test -d /usr/lib/qt4 ; then + AC_MSG_RESULT(it is strange for a qt4 installation !) + AC_MSG_RESULT(/usr/lib/qt4 is present) + AC_MSG_RESULT(replacing QTDIR by /usr/lib/qt4) + QTDIR=/usr/lib/qt4 + fi + fi + qt4_install_path=$QTDIR + fi + fi + + # --- if qt4 standard install directory is not wanted: --without-qt4 or --with-qt4=no + if test x${withval} = xno + then + qt4_install_path="" + fi + + QT_DIR=${qt4_install_path} + AC_SUBST(QT_DIR) + + # --- check if qt4 includes directory is defined + qt4_include_path="" + AC_ARG_WITH([qt4-includes], + AC_HELP_STRING([--with-qt4-includes@<:@=DIR@:>@], [where the Qt4 includes are: default @<:@$QTDIR/include@:>@ or @<:@/usr/include@:>@]), + [qt4_include_path=$withval], [withval=no]) + if test x${withval} != xno + then + # --- qt4 includes directory is defined + if test x${qt4_include_path} = xyes + then + qt4_include_path="/usr/include" + fi + else + if test x${qt4_install_path} != x + then + qt4_include_path="${qt4_install_path}/include" + fi + fi + + + # --- check if qt4 libraries directory is defined + qt4_library_path="" + AC_ARG_WITH([qt4-libraries], + AC_HELP_STRING([--with-qt4-libraries@<:@=DIR@:>@], [where the Qt4 libraries are: default @<:@$QTDIR/lib@:>@ or @<:@/usr/lib@:>@]), + [qt4_library_path=$withval], [withval=no]) + if test x${withval} != xno + then + # --- qt4 libraries directory is defined + if test x${qt4_library_path} = xyes + then + qt4_library_path="/usr/lib" + fi + else + if test x${qt4_install_path} != x + then + qt4_library_path="${qt4_install_path}/lib" + fi + fi + + # --- check if qt4 tools directory is defined + qt4_tools_path="" + AC_ARG_WITH([qt4-tools], + AC_HELP_STRING([--with-qt4-tools@<:@=DIR@:>@], [where the Qt4 executable tools are: default @<:@$QTDIR/bin@:>@ or @<:@/usr/bin@:>@]), + [qt4_tools_path=$withval], [withval=no]) + if test x${withval} != xno + then + # --- qt4 tools directory is defined + if test x${qt4_tools_path} = xyes + then + qt4_tools_path="/usr/bin" + fi + else + if test x${qt4_install_path} != x + then + qt4_tools_path="${qt4_install_path}/bin" + fi + fi + + WITH_QT4=0 + + AC_MSG_NOTICE(${qt4_include_path}) + AC_MSG_NOTICE(${qt4_library_path}) + AC_MSG_NOTICE(${qt4_tools_path}) + + # test if qt4 is completely defined + qt4_defined=yes + if test x${qt4_include_path} = x + then + qt4_defined=no + AC_MSG_NOTICE([No Qt4 include path defined]) + fi + if test x${qt4_library_path} = x + then + qt4_defined=no + AC_MSG_NOTICE([No Qt4 library path defined]) + fi + if test x${qt4_tools_path} = x + then + qt4_defined=no + AC_MSG_NOTICE([No Qt4 tools path defined]) + fi + + # saving values for compilation variables + saved_CPPFLAGS=$CPPFLAGS + saved_LDFLAGS=$LDFLAGS + saved_LIBS=$LIBS + + if ! test x${qt4_defined} = xno + then + # ask for qt4 support + AC_MSG_NOTICE([checking whether qt4 tools and headers are present]) + + # --- we test the presence of moc,first under the form moc-qt4, then moc + AC_PATH_PROGS(qt4_moc_found, [moc-qt4 moc], no, ${qt4_tools_path}) + test x${qt4_moc_found} = xno && AC_MSG_ERROR([Qt4 moc command NOT FOUND]) + QT_MOC=$qt4_moc_found + AC_SUBST(QT_MOC) + + # --- we test the presence of uic,first under the form uic-qt4, then uic + AC_PATH_PROGS(qt4_uic_found, [uic-qt4 uic], no, ${qt4_tools_path}) + test x${qt4_uic_found} = xno && AC_MSG_ERROR([Qt4 uic command NOT FOUND]) + QT_UIC=$qt4_uic_found + AC_SUBST(QT_UIC) + + # --- we test the presence of rcc,first under the form rcc-qt4, then rcc + AC_PATH_PROGS(qt4_rcc_found, [rcc-qt4 rcc], no, ${qt4_tools_path}) + test x${qt4_rcc_found} = xno && AC_MSG_ERROR([Qt4 rcc command NOT FOUND]) + QT_RCC=$qt4_rcc_found + AC_SUBST(QT_RCC) + + # --- we test the header file presence and usability + QTINC="" + AC_CHECK_FILE($qt4_include_path/qt4/QtCore/qglobal.h,QTINC="/qt4",QTINC="") + qt4_include_path="$qt4_include_path${QTINC}" + qt4_cppflags="" + qt4_cppflags="${qt4_cppflags} -I$qt4_include_path/QtCore" + qt4_cppflags="${qt4_cppflags} -I$qt4_include_path/QtGui" + qt4_cppflags="${qt4_cppflags} -I$qt4_include_path/Qt" + qt4_cppflags="${qt4_cppflags} -I$qt4_include_path" + CPPFLAGS="${CPPFLAGS} ${qt4_cppflags}" + AC_LANG_PUSH(C++) + AC_CHECK_HEADERS([qapplication.h], + [qt4_header_found=yes], + [qt4_header_found=no], + []) + AC_LANG_POP(C++) + test x${qt4_header_found} = xno && AC_MSG_ERROR([Qt4 include file NOT FOUND]) + AC_SUBST(qt4_cppflags) + + # --- we test the library file presence and usability + if test x${qt4_library_path} = /usr/lib + then + qt4_ldflags="" + else + qt4_ldflags="-L$qt4_library_path" + fi + + AC_MSG_NOTICE([checking whether link with qt4 is working]) + qt4_lib_name=QtGui + qt4_libs="-l$qt4_lib_name" + LDFLAGS="${LDFLAGS} ${qt4_ldflags}" + LIBS="${LIBS} ${qt4_libs}" + AC_LANG_PUSH(C++) + + AC_LINK_IFELSE([AC_LANG_PROGRAM( + [[ #include + #include ]], + [[ QApplication app(0, 0); + QPushButton hello("Hello world!"); + hello.resize(100, 30); + hello.show(); ]] )], + [qt4_lib_found=yes], [qt4_lib_found=no] ) + + test x${qt4_lib_found} = xno && AC_MSG_ERROR([Qt4 library NOT FOUND]) + + AC_LANG_POP(C++) + AC_SUBST(qt4_ldflags) + AC_SUBST(qt4_libs) + + # --- after all tests are successful, we support Qt4 + WITH_QT4=1 + qt_ok=yes + AC_MSG_NOTICE([Qt4 support is OK]) + + else + # --- no Qt4 support + AC_MSG_NOTICE([No Qt4 support]) + fi + + # Propagate test into atlocal + AC_SUBST(WITH_QT4) + + # Propagate test into Makefiles... + AM_CONDITIONAL(WITH_QT4, test $WITH_QT4 = 1) + + # ... and into source files + AC_DEFINE_UNQUOTED(HAS_QT4, $WITH_QT4, [Qt4 library]) + + # restoring saved values + CPPFLAGS=$saved_CPPFLAGS + LDFLAGS=$saved_LDFLAGS + LIBS=$saved_LIBS + +]) + + +AC_DEFUN([I2_CHECK_QSCINTILLA], +[ + AC_REQUIRE([I2_CHECK_QT4]) + + qscintilla_ok=no + WITH_QSCI4=0 + + # --- check if qsci4 includes directory is defined + qsci4_include_path="" + qsci4_cppflags="" + + AC_ARG_WITH([qsci4-includes], + AC_HELP_STRING([--with-qsci4-includes@<:@=DIR@:>@], [where the Qsci4 includes are: default @<:@$QTDIR/include/Qsci@:>@ or @<:@/usr/include/Qsci@:>@]), + [qsci4_include_path=$withval]) + + if test x${qsci4_include_path} = x ; then + # --- "" --- try to use QSCINTILLA_DIR/include/Qsci + if test "x${QSCINTILLA_DIR}" != "x" ; then + qsci4_include_path="${QSCINTILLA_DIR}/include" + else + qsci4_include_path=no + fi + fi + + if test x${qsci4_include_path} = xno ; then + # --- "no" --- no native installation, try to find in Qt + qsci4_include_path="${QT_DIR}/include${QTINC}/Qsci" + qsci4_cppflags=" -I$qsci4_include_path" + # " -I${QT_DIR}/include${QTINC}" is included in qt4_cppflags + else + if test x${qsci4_include_path} = xyes ; then + # --- "yes" --- try to find in /usr/include/Qsci + qsci4_include_path="/usr/include${QTINC}/Qsci" + qsci4_cppflags=" -I$qsci4_include_path" + # " -I/usr/include${QTINC}" is included in qt4_cppflags or by default (if QTINC is empty) + else + # --- "other" --- try to find in given dir + qsci4_cppflags=" -I$qsci4_include_path/Qsci -I$qsci4_include_path" + fi + fi + + AC_MSG_NOTICE($qsci4_cppflags) + + # --- check if qsci4 libraries directory is defined + qsci4_library_path="" + + AC_ARG_WITH([qsci4-libraries], + AC_HELP_STRING([--with-qsci4-libraries@<:@=DIR@:>@], [where the Qsci4 libraries are: default @<:@$QTDIR/lib@:>@ or @<:@/usr/lib@:>@]), + [qsci4_library_path=$withval]) + + if test x${qsci4_library_path} = x ; then + # --- "" --- try to use QSCINTILLA_DIR/lib + if test "x${QSCINTILLA_DIR}" != "x" ; then + qsci4_library_path="${QSCINTILLA_DIR}/lib" + else + qsci4_library_path=no + fi + fi + + if test x${qsci4_library_path} = xno ; then + # --- "no" --- no native installation, try to find in Qt + qsci4_library_path="${QT_DIR}/lib" + else + if test x${qsci4_library_path} = xyes ; then + # --- "yes" --- try to find in /usr/lib + qsci4_library_path="/usr/lib" + fi + fi + + AC_MSG_NOTICE($qsci4_library_path) + + # saving values for compilation variables + saved_CPPFLAGS=$CPPFLAGS + saved_LDFLAGS=$LDFLAGS + saved_LIBS=$LIBS + + # ask for qsci4 support + AC_MSG_NOTICE([checking whether qscintilla for qt4 headers are present]) + + # --- we test the header file presence and usability + CPPFLAGS="${CPPFLAGS} ${qsci4_cppflags} ${qt4_cppflags}" + AC_LANG_PUSH(C++) + AC_CHECK_HEADERS([qsciscintilla.h], + [qsci4_header_found=yes], + [qsci4_header_found=no], + []) + AC_LANG_POP(C++) + if test x${qsci4_header_found} = xyes + then + AC_SUBST(qsci4_cppflags) + + # --- we test the library file presence and usability + if test x${qsci4_library_path} = x/usr/lib/qt4/lib + then + qsci4_library_path=/usr/lib + fi + if test x${qsci4_library_path} = x/usr/lib + then + qsci4_ldflags="" + else + qsci4_ldflags="-L$qsci4_library_path" + fi + + AC_MSG_NOTICE([checking whether qscintilla2 library is present]) + qsci4_libs=-lqscintilla2 + AC_CHECK_FILE([${qsci4_library_path}/libqscintilla2.so], + [qsci4_library_found=yes], + [qsci4_library_found=no]) + if test x${qsci4_library_found} = xyes + then + AC_MSG_NOTICE([qscintilla for qt4 support]) + AC_SUBST(qsci4_ldflags) + AC_SUBST(qsci4_libs) + WITH_QSCI4=1 + qscintilla_ok=yes + # Propagate test into atlocal + AC_SUBST(WITH_QSCI4) + fi + + else + AC_MSG_NOTICE([no support for qscintilla for qt4]) + fi + + # Propagate test into Makefiles... + AM_CONDITIONAL(WITH_QSCI4, test $WITH_QSCI4 = 1) + + # ... and into source files + AC_DEFINE_UNQUOTED(HAS_QSCI4, $WITH_QSCI4, [QsciScintilla library]) + + # restoring saved values + CPPFLAGS=$saved_CPPFLAGS + LDFLAGS=$saved_LDFLAGS + LIBS=$saved_LIBS + +]) diff --git a/m4/production.m4 b/m4/production.m4 new file mode 100644 index 0000000..802d37e --- /dev/null +++ b/m4/production.m4 @@ -0,0 +1,101 @@ +dnl Copyright (C) 2006-2008 CEA/DEN, EDF R&D +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 +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 +dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +dnl +dnl define macros : +dnl AC_ENABLE_PRODUCTION AC_DISABLE_PRODUCTION +dnl AC_ENABLE_DEBUG AC_DISABLE_DEBUG +dnl version $Id$ +dnl author Patrick GOLDBRONN +dnl +# AC_ENABLE_PRODUCTION +AC_DEFUN(AC_ENABLE_PRODUCTION, [dnl +define([AC_ENABLE_PRODUCTION_DEFAULT], ifelse($1, no, no, yes))dnl +AC_ARG_ENABLE(production, +changequote(<<, >>)dnl +<< --enable-production[=PKGS] build without debug information [default=>>AC_ENABLE_PRODUCTION_DEFAULT], +changequote([, ])dnl +[p=${PACKAGE-default} +case "$enableval" in +yes) enable_production=yes ;; +no) enable_production=no ;; +*) + enable_production=no + # Look at the argument we got. We use all the common list separators. + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," + for pkg in $enableval; do + if test "X$pkg" = "X$p"; then + enable_production=yes + fi + done + IFS="$ac_save_ifs" + ;; +esac], +enable_production=AC_ENABLE_PRODUCTION_DEFAULT)dnl +if test "X$enable_production" = "Xyes"; then + FFLAGS="$FFLAGS -O3 " + CFLAGS="$CFLAGS -O3 " + CXXFLAGS="$CXXFLAGS -O3 " +else + FFLAGS="$FFLAGS" + CFLAGS="$CFLAGS" + CXXFLAGS="$CXXFLAGS" +fi +]) + +# AC_DISABLE_PRODUCTION - set the default flag to --disable-production +AC_DEFUN(AC_DISABLE_PRODUCTION, [AC_ENABLE_PRODUCTION(no)]) + +# AC_ENABLE_DEBUG +AC_DEFUN(AC_ENABLE_DEBUG, [dnl +define([AC_ENABLE_DEBUG_DEFAULT], ifelse($1, no, no, yes))dnl +AC_ARG_ENABLE(debug, +changequote(<<, >>)dnl +<< --enable-debug[=PKGS] build without debug information [default=>>AC_ENABLE_DEBUG_DEFAULT], +changequote([, ])dnl +[p=${PACKAGE-default} +case "$enableval" in +yes) enable_debug=yes ;; +no) enable_debug=no ;; +*) + enable_debug=no + # Look at the argument we got. We use all the common list separators. + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," + for pkg in $enableval; do + if test "X$pkg" = "X$p"; then + enable_debug=yes + fi + done + IFS="$ac_save_ifs" + ;; +esac], +enable_debug=AC_ENABLE_DEBUG_DEFAULT)dnl + +if test "X$enable_debug" = "Xyes"; then + FFLAGS="$FFLAGS -g " + CFLAGS="$CFLAGS -g " + CXXFLAGS="$CXXFLAGS -g -D_DEBUG_ " +else + FFLAGS="$FFLAGS" + CFLAGS="$CFLAGS" + CXXFLAGS="$CXXFLAGS" +fi +]) + +# AC_DISABLE_DEBUG - set the default flag to --disable-debug +AC_DEFUN(AC_DISABLE_DEBUG, [AC_ENABLE_DEBUG(no)]) + diff --git a/src/Makefile.am b/src/Makefile.am new file mode 100644 index 0000000..0897ae9 --- /dev/null +++ b/src/Makefile.am @@ -0,0 +1,20 @@ +# Copyright (C) 2009 CEA/DEN, EDF R&D +# +# This library is free software; you can redistribute it and/or +# modify it 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 +# + +SUBDIRS = bases engine genericgui wrappers standalone salomegui diff --git a/src/bases/BL_Exception.cxx b/src/bases/BL_Exception.cxx new file mode 100644 index 0000000..087eeb7 --- /dev/null +++ b/src/bases/BL_Exception.cxx @@ -0,0 +1,35 @@ +// Copyright (C) 2009 CEA/DEN, EDF R&D +// +// This library is free software; you can redistribute it and/or +// modify it 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 +// + +#include "BL_Exception.hxx" + +BL::Exception::Exception(const std::string& what):_what(what) +{ +} + +BL::Exception::~Exception() throw () +{ +} + +const char * +BL::Exception::what( void ) const throw () +{ + return _what.c_str(); +} + diff --git a/src/bases/BL_Exception.hxx b/src/bases/BL_Exception.hxx new file mode 100644 index 0000000..a03a836 --- /dev/null +++ b/src/bases/BL_Exception.hxx @@ -0,0 +1,38 @@ +// Copyright (C) 2009 CEA/DEN, EDF R&D +// +// This library is free software; you can redistribute it and/or +// modify it 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 +// +#ifndef __BL_EXCEPTION_HXX__ +#define __BL_EXCEPTION_HXX__ + +#include +#include + +namespace BL +{ + class Exception : public std::exception + { + protected: + std::string _what; + public: + Exception(const std::string& what); + const char *what( void ) const throw (); + virtual ~Exception() throw (); + }; +} + +#endif diff --git a/src/bases/BL_Traces.hxx b/src/bases/BL_Traces.hxx new file mode 100644 index 0000000..74ea636 --- /dev/null +++ b/src/bases/BL_Traces.hxx @@ -0,0 +1,38 @@ +// Copyright (C) 2009 CEA/DEN, EDF R&D +// +// This library is free software; you can redistribute it and/or +// modify it 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 +// + +#ifndef __BL_TRACES_HXX__ +#define __BL_TRACES_HXX__ + +#include "BL_Exception.hxx" +#include +#include + +#ifdef _DEBUG_ +#define DEBTRACE(msg) {std::cerr< +#include + +namespace BL{ + + class Job + { + public: + Job(); + Job(const std::string & name); + virtual ~Job(); + + void setName(const std::string & name); + std::string getName(); + + enum JobType {YACS_SCHEMA, COMMAND}; + void setType(BL::Job::JobType type); + BL::Job::JobType getType(); + + void setYACSFile(std::string & yacs_file); + std::string & getYACSFile(); + + void setCommand(std::string & command); + std::string & getCommand(); + + struct BatchParam + { + std::string batch_directory; + std::string expected_during_time; + std::string expected_memory; + int nb_proc; + }; + void setBatchParameters(BL::Job::BatchParam & param); + BL::Job::BatchParam & getBatchParameters(); + + struct FilesParam + { + std::string result_directory; + std::list input_files_list; + std::list output_files_list; + }; + void setFilesParameters(BL::Job::FilesParam & param); + BL::Job::FilesParam & getFilesParameters(); + + void setMachine(std::string & machine); + std::string & getMachine(); + + enum State {CREATED, IN_PROCESS, QUEUED, RUNNING, PAUSED, FINISHED, ERROR}; + void setState(BL::Job::State state); + BL::Job::State getState(); + + enum ThreadState {NOTHING, STARTING}; + void setThreadState(BL::Job::ThreadState state); + BL::Job::ThreadState getThreadState(); + + void setSalomeLauncherId(int id); + int getSalomeLauncherId(); + + + private: + BL::Job::State _state; + BL::Job::ThreadState _thread_state; + + std::string _name; + + BL::Job::JobType _type; + std::string _yacs_file; + std::string _command; + + BL::Job::BatchParam _batch_params; + BL::Job::FilesParam _files_params; + std::string _machine_choosed; + + int _salome_launcher_id; + }; + +} + +#endif diff --git a/src/engine/BL_JobsManager.cxx b/src/engine/BL_JobsManager.cxx new file mode 100644 index 0000000..985d280 --- /dev/null +++ b/src/engine/BL_JobsManager.cxx @@ -0,0 +1,327 @@ +// Copyright (C) 2009 CEA/DEN, EDF R&D +// +// This library is free software; you can redistribute it and/or +// modify it 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 +// + +#include "BL_JobsManager.hxx" + +BL::JobsManager::JobsManager(BL::SALOMEServices * salome_services) +{ + DEBTRACE("Creating BL::JobsManager"); + BL_ASSERT(salome_services); + _salome_services = salome_services; + _observer = NULL; +} + +BL::JobsManager::~JobsManager() +{ + DEBTRACE("Destroying BL::JobsManager"); + + // Delete All Jobs ! + _jobs_it = _jobs.begin(); + for(;_jobs_it != _jobs.end();_jobs_it++) + delete _jobs_it->second; +} + +void +BL::JobsManager::setObserver(BL::Observer * observer) +{ + BL_ASSERT(observer); + _observer = observer; +} + +BL::Job * +BL::JobsManager::addNewJob(const std::string & name) +{ + DEBTRACE("addNewJob BL::JobsManager"); + + BL::Job * new_job = NULL; + + _jobs_it = _jobs.find(name); + if (_jobs_it == _jobs.end()) + { + new_job = new BL::Job(name); + + // Ajout dans la liste + _jobs[name] = new_job; + } + else + DEBTRACE("addNewJob Error !!!! Job already exist: " << name); + + return new_job; +} + +void +BL::JobsManager::removeJob(const std::string & name) +{ + DEBTRACE("removeJob BL::JobsManager"); + _jobs_it = _jobs.find(name); + if (_jobs_it != _jobs.end()) + { + std::string result = ""; + if (_jobs_it->second->getSalomeLauncherId() != -1) + result = _salome_services->delete_job(_jobs_it->second); + + delete _jobs_it->second; + _jobs.erase(_jobs_it->first); + + if (_observer) + if (result != "") + _observer->sendEvent("delete_job", "Error", name, result); + else + _observer->sendEvent("delete_job", "Ok", name, ""); + } + else + DEBTRACE("removeJob Error !!!! Job does not exist: " << name); +} + +BL::Job * +BL::JobsManager::getJob(const std::string & name) +{ + DEBTRACE("getJob BL::JobsManager called"); + return _jobs[name]; +} + +std::map & +BL::JobsManager::getJobs() +{ + return _jobs; +} + +bool +BL::JobsManager::job_already_exist(const std::string & name) +{ + _jobs_it = _jobs.find(name); + + if (_jobs_it == _jobs.end()) + return false; + else + return true; + +} + +void +BL::JobsManager::start_job(const std::string & name) +{ + DEBTRACE("BL::JobsManager::start_job called for job: " << name); + + // Check job exits + _jobs_it = _jobs.find(name); + if (_jobs_it == _jobs.end()) + { + DEBTRACE("BL::JobsManager::start_job job unknown: " << name); + return; + } + else + { + _thread_mutex.lock(); + BL::Job * job = _jobs_it->second; + // Check Job Exec State - multithread protection + if (job->getThreadState() == BL::Job::NOTHING) + { + // Prepare Info for thread + BL::JobsManager::thread_info * ti = new thread_info(); + ti->object_ptr = this; + ti->job_name = name; + job->setState(BL::Job::IN_PROCESS); + job->setThreadState(BL::Job::STARTING); + omni_thread::create(BL::JobsManager::starting_job_thread, ti); + } + else + { + DEBTRACE("BL::JobsManager::start_job nothin to do, job already starting, job name: " << name); + } + _thread_mutex.unlock(); + } +} + +void +BL::JobsManager::starting_job_thread(void * object_ptr) +{ + DEBTRACE("starting_job_thread BL::JobsManager called"); + BL::JobsManager::thread_info * ti = reinterpret_cast(object_ptr); + BL::JobsManager * object = ti->object_ptr; + std::string job_name = ti->job_name; + BL::Job * job = object->getJob(job_name); + + std::string result = object->_salome_services->start_job(job); + + object->_thread_mutex.lock(); + // End + if (result == "") + { + if (object->_observer) + object->_observer->sendEvent("start_job", "Ok", job_name, ""); + job->setState(BL::Job::QUEUED); + job->setThreadState(BL::Job::NOTHING); + } + else + { + if (object->_observer) + object->_observer->sendEvent("start_job", "Error", job_name, result); + job->setState(BL::Job::ERROR); + job->setThreadState(BL::Job::NOTHING); + } + object->_thread_mutex.unlock(); +} + +void +BL::JobsManager::refresh_jobs() +{ + DEBTRACE("refresh_jobs BL::JobsManager called"); + + omni_thread::create(BL::JobsManager::refresh_job, this); +} + +void +BL::JobsManager::refresh_job(void * object_ptr) +{ + DEBTRACE("refresh_job BL::JobsManager called"); + BL::JobsManager * object = reinterpret_cast(object_ptr); + + //iterate on all jobs + _jobs_map::iterator jobs_it; + jobs_it = object->_jobs.begin(); + for(;jobs_it != object->_jobs.end();jobs_it++) + { + BL::Job * job = jobs_it->second; + if (job->getSalomeLauncherId() != -1) + { + object->_thread_mutex.lock(); + if (job->getThreadState() == BL::Job::NOTHING) + { + BL::Job::State job_state = job->getState(); + if (job_state != BL::Job::FINISHED or job_state != BL::Job::ERROR) + { + std::string result = object->_salome_services->refresh_job(job); + if (result == "QUEUED") + { + if (job_state != BL::Job::QUEUED) + { + job->setState(BL::Job::QUEUED); + if (object->_observer) + object->_observer->sendEvent("refresh_job", "Ok", job->getName(), "new state"); + } + } + else if (result == "IN_PROCESS") + { + if (job_state != BL::Job::IN_PROCESS) + { + job->setState(BL::Job::IN_PROCESS); + if (object->_observer) + object->_observer->sendEvent("refresh_job", "Ok", job->getName(), "new state"); + } + } + else if (result == "RUNNING") + { + if (job_state != BL::Job::RUNNING) + { + job->setState(BL::Job::RUNNING); + if (object->_observer) + object->_observer->sendEvent("refresh_job", "Ok", job->getName(), "new state"); + } + } + else if (result == "PAUSED") + { + if (job_state != BL::Job::PAUSED) + { + job->setState(BL::Job::PAUSED); + if (object->_observer) + object->_observer->sendEvent("refresh_job", "Ok", job->getName(), "new state"); + } + } + else if (result == "FINISHED") + { + job->setState(BL::Job::FINISHED); + if (object->_observer) + object->_observer->sendEvent("refresh_job", "Ok", job->getName(), "new state"); + } + else if (result == "ERROR") + { + job->setState(BL::Job::ERROR); + if (object->_observer) + object->_observer->sendEvent("refresh_job", "Ok", job->getName(), "new state"); + } + else + { + // Error using launcher... + if (object->_observer) + object->_observer->sendEvent("refresh_job", "Error", job->getName(), result); + } + } + } + object->_thread_mutex.unlock(); + } + } +} + +void +BL::JobsManager::get_results_job(const std::string & name) +{ + DEBTRACE("get_results_job BL::JobsManager called"); + + // Check job exits + _jobs_it = _jobs.find(name); + if (_jobs_it == _jobs.end()) + { + DEBTRACE("BL::JobsManager::get_results_job job unknown: " << name); + return; + } + else + { + BL::Job * job = _jobs_it->second; + if (job->getState() == BL::Job::FINISHED) + { + // Prepare Info for thread + BL::JobsManager::thread_info * ti = new thread_info(); + ti->object_ptr = this; + ti->job_name = name; + omni_thread::create(BL::JobsManager::get_results_job_thread, ti); + } + else + { + DEBTRACE("BL::JobsManager::get_results_job job bad job state !"); + return; + } + } +} + +void +BL::JobsManager::get_results_job_thread(void * object_ptr) +{ + DEBTRACE("get_results_job_thread BL::JobsManager called"); + BL::JobsManager::thread_info * ti = reinterpret_cast(object_ptr); + BL::JobsManager * object = ti->object_ptr; + std::string job_name = ti->job_name; + BL::Job * job = object->getJob(job_name); + + object->_thread_mutex_results.lock(); + std::string result = object->_salome_services->get_results_job(job); + + // End + if (result == "") + { + if (object->_observer) + object->_observer->sendEvent("get_results_job", "Ok", job_name, ""); + } + else + { + if (object->_observer) + object->_observer->sendEvent("get_results_job", "Error", job_name, result); + } + object->_thread_mutex_results.unlock(); +} diff --git a/src/engine/BL_JobsManager.hxx b/src/engine/BL_JobsManager.hxx new file mode 100644 index 0000000..675a5ab --- /dev/null +++ b/src/engine/BL_JobsManager.hxx @@ -0,0 +1,81 @@ +// Copyright (C) 2009 CEA/DEN, EDF R&D +// +// This library is free software; you can redistribute it and/or +// modify it 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 +// + +#ifndef _BL_JOBSMANAGER_HXX_ +#define _BL_JOBSMANAGER_HXX_ + +#include "BL_Job.hxx" +#include "BL_SALOMEServices.hxx" +#include "BL_Traces.hxx" +#include "BL_Observer.hxx" + +#include +#include + +#include + +namespace BL{ + + class JobsManager + { + public: + JobsManager(BL::SALOMEServices * salome_services); + virtual ~JobsManager(); + + void setObserver(BL::Observer * observer); + + BL::Job * addNewJob(const std::string & name); + void removeJob(const std::string & name); + + BL::Job * getJob(const std::string & name); + std::map & getJobs(); + + bool job_already_exist(const std::string & name); + + virtual void start_job(const std::string & name); + virtual void refresh_jobs(); + virtual void get_results_job(const std::string & name); + + static void starting_job_thread(void * object_ptr); + static void get_results_job_thread(void * object_ptr); + static void refresh_job(void * object_ptr); + + struct thread_info + { + BL::JobsManager * object_ptr; + std::string job_name; + }; + + protected: + BL::SALOMEServices * _salome_services; + BL::Observer * _observer; + + private: + typedef std::map _jobs_map; + _jobs_map _jobs; + _jobs_map::iterator _jobs_it; + + omni_mutex _thread_mutex; + omni_mutex _thread_mutex_results; + }; + +} + +#endif + diff --git a/src/engine/BL_SALOMEServices.cxx b/src/engine/BL_SALOMEServices.cxx new file mode 100644 index 0000000..8f6a9d0 --- /dev/null +++ b/src/engine/BL_SALOMEServices.cxx @@ -0,0 +1,214 @@ +// Copyright (C) 2009 CEA/DEN, EDF R&D +// +// This library is free software; you can redistribute it and/or +// modify it 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 +// + +#include "BL_SALOMEServices.hxx" + +BL::SALOMEServices::SALOMEServices() +{ + int nbargs = 0; char **args = 0; + _orb = CORBA::ORB_init (nbargs, args); + _salome_naming_service = NULL; + _lcc = NULL; + _state = false; +} + +BL::SALOMEServices::~SALOMEServices() +{ + if (_salome_naming_service) + delete _salome_naming_service; + if (_lcc) + delete _lcc; +} + +bool +BL::SALOMEServices::initNS() +{ + bool return_value = true; + _salome_naming_service = new SALOME_NamingService(_orb); + _lcc = new SALOME_LifeCycleCORBA(_salome_naming_service); + CORBA::Object_var obj = _salome_naming_service->Resolve("/SalomeLauncher"); + _salome_launcher = Engines::SalomeLauncher::_narrow(obj); + + if (CORBA::is_nil(_salome_launcher)) + { + DEBTRACE("SALOME Launcher is not reachable!") + return_value = false; + } + + obj = _salome_naming_service->Resolve("/ResourcesManager"); + _resources_manager = Engines::ResourcesManager::_narrow(obj); + if (CORBA::is_nil(_resources_manager)) + { + DEBTRACE("SALOME Resource Manager is not reachable !"); + return_value = false; + } + + _state = return_value; + return return_value; +} + +std::list +BL::SALOMEServices::getMachineList() +{ + std::list machine_list; + + if (_state) + { + Engines::MachineParameters params; + _lcc->preSet(params); + Engines::MachineList * machineList = _resources_manager->GetFittingResources(params); + for (int i = 0; i < machineList->length(); i++) + { + const char* aMachine = (*machineList)[i]; + machine_list.push_back(aMachine); + } + } + + return machine_list; +} + +std::string +BL::SALOMEServices::start_job(BL::Job * job) +{ + return start_yacs_job(job); +} + +std::string +BL::SALOMEServices::start_yacs_job(BL::Job * job) +{ + std::string ret = ""; + // Prepare Arguments + const char * fileToExecute = job->getYACSFile().c_str(); + + BL::Job::FilesParam files = job->getFilesParameters(); + Engines::FilesList_var filesToExport = new Engines::FilesList; + filesToExport->length(files.input_files_list.size()); + std::list::iterator it; + int i = 0; + for (it=files.input_files_list.begin() ; it != files.input_files_list.end(); it++) + { + filesToExport[i] = CORBA::string_dup((*it).c_str()); + i++; + } + Engines::FilesList_var filesToImport = new Engines::FilesList; + filesToImport->length(files.output_files_list.size()); + i = 0; + for (it=files.output_files_list.begin() ; it != files.output_files_list.end(); it++) + { + filesToImport[i] = CORBA::string_dup((*it).c_str()); + i++; + } + + BL::Job::BatchParam cpp_batch_params = job->getBatchParameters(); + Engines::BatchParameters_var batch_params = new Engines::BatchParameters; + batch_params->batch_directory = CORBA::string_dup(cpp_batch_params.batch_directory.c_str()); + batch_params->expected_during_time = CORBA::string_dup(cpp_batch_params.expected_during_time.c_str()); + batch_params->mem = CORBA::string_dup(cpp_batch_params.expected_memory.c_str()); + batch_params->nb_proc = cpp_batch_params.nb_proc; + + Engines::MachineParameters_var machine = new Engines::MachineParameters; + machine->hostname = CORBA::string_dup(job->getMachine().c_str()); + + // Start Job ! + try + { + int job_id = _salome_launcher->submitSalomeJob(fileToExecute, filesToExport, + filesToImport, batch_params, machine); + job->setSalomeLauncherId(job_id); + } + catch (const SALOME::SALOME_Exception & ex) + { + DEBTRACE("SALOME Exception in submitSalomeJob !"); + ret = ex.details.text.in(); + } + return ret; +} + +std::string +BL::SALOMEServices::refresh_job(BL::Job * job) +{ + std::string ret = ""; + + Engines::MachineParameters_var machine = new Engines::MachineParameters; + machine->hostname = CORBA::string_dup(job->getMachine().c_str()); + + // Refresh Job ! + try + { + CORBA::String_var result = _salome_launcher->queryJob(job->getSalomeLauncherId(), machine); + std::string res = result.in(); + if (res == "Running") + return "RUNNING"; + else if (res == "Done") + return "FINISHED"; + else + return result.in(); + } + catch (const SALOME::SALOME_Exception & ex) + { + DEBTRACE("SALOME Exception in refresh_job !"); + ret = ex.details.text.in(); + } + return ret; +} + +std::string +BL::SALOMEServices::delete_job(BL::Job * job) +{ + std::string ret = ""; + + Engines::MachineParameters_var machine = new Engines::MachineParameters; + machine->hostname = CORBA::string_dup(job->getMachine().c_str()); + + // Delete Job ! + try + { + _salome_launcher->deleteJob(job->getSalomeLauncherId(), machine); + } + catch (const SALOME::SALOME_Exception & ex) + { + DEBTRACE("SALOME Exception in refresh_job !"); + ret = ex.details.text.in(); + } + return ret; +} + +std::string +BL::SALOMEServices::get_results_job(BL::Job * job) +{ + std::string ret = ""; + + Engines::MachineParameters_var machine = new Engines::MachineParameters; + machine->hostname = CORBA::string_dup(job->getMachine().c_str()); + + BL::Job::FilesParam files = job->getFilesParameters(); + CORBA::String_var directory = CORBA::string_dup(files.result_directory.c_str()); + + // get job results ! + try + { + _salome_launcher->getResultsJob(directory, job->getSalomeLauncherId(), machine); + } + catch (const SALOME::SALOME_Exception & ex) + { + DEBTRACE("SALOME Exception in refresh_job !"); + ret = ex.details.text.in(); + } + return ret; +} diff --git a/src/engine/BL_SALOMEServices.hxx b/src/engine/BL_SALOMEServices.hxx new file mode 100644 index 0000000..f5e597d --- /dev/null +++ b/src/engine/BL_SALOMEServices.hxx @@ -0,0 +1,68 @@ +// Copyright (C) 2009 CEA/DEN, EDF R&D +// +// This library is free software; you can redistribute it and/or +// modify it 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 +// + +#ifndef _BL_SALOMESERVICES_HXX_ +#define _BL_SALOMESERVICES_HXX_ + +#include "BL_Traces.hxx" +#include "BL_Job.hxx" + +#include "SALOME_NamingService.hxx" +#include "SALOME_LifeCycleCORBA.hxx" +#include "SALOME_ContainerManager.hh" + +#include +#include +#include + +namespace BL{ + + class SALOMEServices + { + public: + SALOMEServices(); + virtual ~SALOMEServices(); + + bool initNS(); + + std::list getMachineList(); + + std::string start_job(BL::Job * job); + std::string refresh_job(BL::Job * job); + std::string delete_job(BL::Job * job); + std::string get_results_job(BL::Job * job); + + protected: + std::string start_yacs_job(BL::Job * job); + + private: + CORBA::ORB_var _orb; + SALOME_NamingService * _salome_naming_service; + SALOME_LifeCycleCORBA * _lcc; + Engines::SalomeLauncher_var _salome_launcher; + Engines::ResourcesManager_var _resources_manager; + + bool _state; + }; + +} + +#endif + + diff --git a/src/genericgui/BL_Buttons.cxx b/src/genericgui/BL_Buttons.cxx new file mode 100644 index 0000000..b13f7df --- /dev/null +++ b/src/genericgui/BL_Buttons.cxx @@ -0,0 +1,120 @@ +// Copyright (C) 2009 CEA/DEN, EDF R&D +// +// This library is free software; you can redistribute it and/or +// modify it 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 +// + +#include "BL_Buttons.hxx" + +BL::Buttons::Buttons(QWidget * parent) : QGroupBox(parent) +{ + DEBTRACE("Creating BL::Buttons"); + + setTitle("Actions"); + + _create_button = new QPushButton("Create Job", this); + _start_button = new QPushButton("Start Job", this); + _delete_button = new QPushButton("Delete Job", this); + _get_results_button = new QPushButton("Get Job Results", this); + _refresh_button = new QPushButton("Refresh Jobs", this); + + QHBoxLayout *mainLayout = new QHBoxLayout; + mainLayout->addWidget(_create_button); + mainLayout->addWidget(_start_button); + mainLayout->addWidget(_delete_button); + mainLayout->addWidget(_get_results_button); + mainLayout->addWidget(_refresh_button); + mainLayout->setSpacing(0); // Space between buttons + + setLayout(mainLayout); + + //QSizePolicy poli; + //poli.setControlType(QSizePolicy::PushButton); + //poli.setVerticalPolicy(QSizePolicy::Fixed); + //poli.setHorizontalPolicy(QSizePolicy::Fixed); + //setSizePolicy(poli); +} + +BL::Buttons::~Buttons() +{ + DEBTRACE("Destroying BL::Buttons"); +} + +void +BL::Buttons::setCreateButtonSlot(QObject * receiver, const char * name) +{ + connect(_create_button, SIGNAL(clicked()), receiver, name); +} + +void +BL::Buttons::setStartButtonSlot(QObject * receiver, const char * name) +{ + connect(_start_button, SIGNAL(clicked()), receiver, name); +} + +void +BL::Buttons::setDeleteButtonSlot(QObject * receiver, const char * name) +{ + connect(_delete_button, SIGNAL(clicked()), receiver, name); +} + +void +BL::Buttons::setRefreshButtonSlot(QObject * receiver, const char * name) +{ + connect(_refresh_button, SIGNAL(clicked()), receiver, name); +} + +void +BL::Buttons::setGetResultsButtonSlot(QObject * receiver, const char * name) +{ + connect(_get_results_button, SIGNAL(clicked()), receiver, name); +} + +void +BL::Buttons::enable_start_button() +{ + _start_button->setEnabled(true); +} + +void +BL::Buttons::disable_start_button() +{ + _start_button->setEnabled(false); +} + +void +BL::Buttons::enable_delete_button() +{ + _delete_button->setEnabled(true); +} + +void +BL::Buttons::disable_delete_button() +{ + _delete_button->setEnabled(false); +} + +void +BL::Buttons::enable_get_results_button() +{ + _get_results_button->setEnabled(true); +} + +void +BL::Buttons::disable_get_results_button() +{ + _get_results_button->setEnabled(false); +} diff --git a/src/genericgui/BL_Buttons.hxx b/src/genericgui/BL_Buttons.hxx new file mode 100644 index 0000000..866e96d --- /dev/null +++ b/src/genericgui/BL_Buttons.hxx @@ -0,0 +1,62 @@ +// Copyright (C) 2009 CEA/DEN, EDF R&D +// +// This library is free software; you can redistribute it and/or +// modify it 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 +// + +#ifndef _BL_BUTTONS_HXX_ +#define _BL_BUTTONS_HXX_ + +#include + +#include "BL_Traces.hxx" + +namespace BL +{ + class Buttons: public QGroupBox + { + Q_OBJECT + + public: + Buttons(QWidget * parent); + virtual ~Buttons(); + + void setCreateButtonSlot(QObject * receiver, const char * name); + void setStartButtonSlot(QObject * receiver, const char * name); + void setDeleteButtonSlot(QObject * receiver, const char * name); + void setRefreshButtonSlot(QObject * receiver, const char * name); + void setGetResultsButtonSlot(QObject * receiver, const char * name); + + void enable_start_button(); + void disable_start_button(); + + void enable_delete_button(); + void disable_delete_button(); + + void enable_get_results_button(); + void disable_get_results_button(); + + protected: + QPushButton * _create_button; + QPushButton * _start_button; + QPushButton * _delete_button; + QPushButton * _get_results_button; + QPushButton * _refresh_button; + }; +} + +#endif + diff --git a/src/genericgui/BL_CreateJobWizard.cxx b/src/genericgui/BL_CreateJobWizard.cxx new file mode 100644 index 0000000..99ae4ee --- /dev/null +++ b/src/genericgui/BL_CreateJobWizard.cxx @@ -0,0 +1,686 @@ +// Copyright (C) 2009 CEA/DEN, EDF R&D +// +// This library is free software; you can redistribute it and/or +// modify it 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 +// + +#include "BL_CreateJobWizard.hxx" + +BL::CreateJobWizard::CreateJobWizard(BL::JobsManager_QT * jobs_manager, BL::SALOMEServices * salome_services) +{ + DEBTRACE("Creating BL::CreateJobWizard"); + BL_ASSERT(jobs_manager); + BL_ASSERT(salome_services); + _jobs_manager = jobs_manager; + + job_name = ""; + yacs_file = ""; + command = ""; + batch_directory = ""; + expected_during_time = ""; + expected_memory = ""; + nb_proc = 1; + + result_directory = ""; + + machine_choosed = ""; + + start_job = false; + + setOptions(QWizard::IndependentPages | QWizard::NoBackButtonOnStartPage); + + setPage(Page_JobName, new BL::CreateJobWizard::JobNamePage(this, _jobs_manager)); + setPage(Page_YACSSchema, new BL::YACSSchemaPage(this)); + setPage(Page_BatchParameters, new BL::BatchParametersPage(this)); + setPage(Page_Files, new BL::FilesPage(this)); + setPage(Page_Command_Main_Definitions, new BL::CreateJobWizard::CommandMainPage(this)); + setPage(Page_Machine, new BL::MachinePage(this, salome_services)); + setPage(Page_Conclusion, new BL::CreateJobWizard::ConclusionPage(this)); + + setWindowTitle("Create Job Wizard"); + connect(this, SIGNAL(finished(int)), this, SLOT(end(int))); +} + +BL::CreateJobWizard::~CreateJobWizard() +{ + DEBTRACE("Destroying BL::CreateJobWizard"); +} + +void +BL::CreateJobWizard::setFilesList(QListWidget * input_files_list, QListWidget * output_files_list) +{ + _input_files_list = input_files_list; + _output_files_list = output_files_list; +} + +void +BL::CreateJobWizard::end(int result) +{ + DEBTRACE("End of BL::CreateJobWizard"); + if (result) + { + // Job Name Panel + QString f_job_name = field("job_name").toString(); + job_name = f_job_name.toStdString(); + + // YACS Schema Panel + QString f_yacs_file = field("yacs_file").toString(); + yacs_file = f_yacs_file.toStdString(); + + // Command Panel + QString f_command = field("command").toString(); + command = f_command.toStdString(); + + // Batch Panel + QString f_batch_directory = field("batch_directory").toString(); + batch_directory = f_batch_directory.toStdString(); + + QString time_hour; + QString time_min; + if (field("during_time_hour").toInt() < 10) + time_hour = "0" + field("during_time_hour").toString(); + else + time_hour = field("during_time_hour").toString(); + if (field("during_time_min").toInt() < 10) + time_min = "0" + field("during_time_min").toString(); + else + time_min = field("during_time_min").toString(); + expected_during_time = time_hour.toStdString() + ":" + time_min.toStdString() + ":00"; + + QString mem = field("mem_value").toString(); + int mem_type_i = field("mem_type").toInt(); + QString mem_type("gb"); + if (mem_type_i == 0) + mem_type = "mb"; + expected_memory = mem.toStdString() + mem_type.toStdString(); + + nb_proc = field("proc_value").toInt(); + + // Files Panel + QString f_result_directory = field("result_directory").toString(); + result_directory = f_result_directory.toStdString(); + for (int i = 0; i < _input_files_list->count(); ++i) + { + QListWidgetItem * item = _input_files_list->item(i); + QString item_text = item->text(); + input_files_list.push_back(item_text.toStdString()); + } + for (int i = 0; i < _output_files_list->count(); ++i) + { + QListWidgetItem * item = _output_files_list->item(i); + QString item_text = item->text(); + output_files_list.push_back(item_text.toStdString()); + } + + // Machine list + QString f_machine_choosed = field("machine_choosed").toString(); + machine_choosed = f_machine_choosed.toStdString(); + + start_job = field("start_job").toBool(); + } +} + +// Job Name Page +BL::CreateJobWizard::JobNamePage::JobNamePage(QWidget * parent, BL::JobsManager_QT * jobs_manager) +: QWizardPage(parent) +{ + _jobs_manager = jobs_manager; + setTitle("Create a new job"); + + QLabel *label = new QLabel("Enter Job name, you cannot add two jobs with the same name"); + label->setWordWrap(true); + QLabel * nameLabel = new QLabel("Job Name:"); + QLineEdit * _nameLineEdit = new QLineEdit(this); + registerField("job_name", _nameLineEdit); + + QLabel * label_type = new QLabel("Choose type of batch job:"); + QGroupBox *groupBox = new QGroupBox(); + _yacs_schema_button = new QRadioButton(tr("YACS Schema")); + _yacs_schema_button->setChecked(true); + QRadioButton *radio2 = new QRadioButton(tr("Command")); + QVBoxLayout *vbox = new QVBoxLayout; + vbox->addWidget(_yacs_schema_button); + vbox->addWidget(radio2); + vbox->addStretch(1); + groupBox->setLayout(vbox); + + // Layouts + QVBoxLayout * main_layout = new QVBoxLayout; + main_layout->addWidget(label); + QGridLayout *layout = new QGridLayout; + layout->addWidget(nameLabel, 0, 0); + layout->addWidget(_nameLineEdit, 0, 1); + main_layout->insertLayout(-1, layout); + layout->addWidget(label_type, 2, 0); + layout->addWidget(groupBox, 3, 0, 1, -1); + setLayout(main_layout); +} + +BL::CreateJobWizard::JobNamePage::~JobNamePage() +{} + +bool +BL::CreateJobWizard::JobNamePage::validatePage() +{ + DEBTRACE("Calling validatePage of BL::CreateJobWizard::JobNamePage"); + bool return_value; + QString job_name = field("job_name").toString(); + + // Check if job name is empty + if (job_name == "") + { + QMessageBox::warning(NULL, "Job Name Error", "Job name entered is empty, enter a job name or cancel the wizard"); + return_value = false; + } + + // Check if job name already exists + else { + if (_jobs_manager->job_already_exist(job_name.toStdString()) == false) + { + return_value = true; + } + else + { + QMessageBox::critical(NULL, "Job Name Error", "Job name entered is already used"); + QString value(""); + setField("job_name", value); + return_value = false; + } + } + + return return_value; +} + +int +BL::CreateJobWizard::JobNamePage::nextId() const +{ + if (_yacs_schema_button->isChecked()) + { + return BL::CreateJobWizard::Page_YACSSchema; + } + else + { + return BL::CreateJobWizard::Page_Command_Main_Definitions; + } +} + +BL::YACSSchemaPage::YACSSchemaPage(QWidget * parent) +: QWizardPage(parent) +{ + setTitle("Choose YACS Schema"); + + QLabel *label = new QLabel("In this step you have to choose what YACS Schema you want to execute"); + label->setWordWrap(true); + + _yacs_file_button = new QPushButton(tr("Choose YACS Schema file")); + _yacs_file_button->show(); + connect(_yacs_file_button, SIGNAL(clicked()), this, SLOT(choose_file())); + + _yacs_file_text = new QLineEdit(this); + _yacs_file_text->setText(""); + registerField("yacs_file", _yacs_file_text); + _yacs_file_text->setReadOnly(true); + + QVBoxLayout * main_layout = new QVBoxLayout; + main_layout->addWidget(label); + QGridLayout *layout = new QGridLayout; + layout->addWidget(_yacs_file_button, 0, 0); + layout->addWidget(_yacs_file_text, 0, 1); + main_layout->insertLayout(-1, layout); + setLayout(main_layout); +}; + +BL::YACSSchemaPage::~YACSSchemaPage() +{} + +bool +BL::YACSSchemaPage::validatePage() +{ + bool return_value; + QString yacs_file = field("yacs_file").toString(); + if (yacs_file != "") + { + return_value = true; + } + else + { + QMessageBox::warning(NULL, "YACS File Error", "Please choose a YACS File"); + return_value = false; + } + return return_value; +} + +void +BL::YACSSchemaPage::choose_file() +{ + QString yacs_file = QFileDialog::getOpenFileName(this, + tr("Open YACS files"), "", + tr("XML (*.xml);;All Files (*)")); + _yacs_file_text->setReadOnly(false); + _yacs_file_text->setText(yacs_file); + _yacs_file_text->setReadOnly(true); +} + +int +BL::YACSSchemaPage::nextId() const +{ + return BL::CreateJobWizard::Page_BatchParameters; +} + +BL::CreateJobWizard::CommandMainPage::CommandMainPage(QWidget * parent) +: QWizardPage(parent) +{ + setTitle("Define command job"); + QLabel *label = new QLabel("Enter the command that will be executed into the resource"); + label->setWordWrap(true); + + // command + QLabel * label_command = new QLabel("Command: "); + QLineEdit * line_command = new QLineEdit(this); + registerField("command", line_command); + + QGridLayout *layout = new QGridLayout; + layout->addWidget(label_command, 0, 0); + layout->addWidget(line_command, 0, 1); + + QVBoxLayout * main_layout = new QVBoxLayout; + main_layout->addWidget(label); + main_layout->insertLayout(-1, layout); + setLayout(main_layout); +}; + +BL::CreateJobWizard::CommandMainPage::~CommandMainPage() +{} + +bool +BL::CreateJobWizard::CommandMainPage::validatePage() +{ + QString command = field("command").toString(); + if (command == "") + { + QMessageBox::warning(NULL, "Command Error", "Please enter a command"); + return false; + } + + return true; +} + +int +BL::CreateJobWizard::CommandMainPage::nextId() const +{ + return BL::CreateJobWizard::Page_BatchParameters; +} + +BL::BatchParametersPage::BatchParametersPage(QWidget * parent) +: QWizardPage(parent) +{ + setTitle("Enter Batch Parameters"); + + QLabel *label = new QLabel("In this step you define the parameters of your job"); + label->setWordWrap(true); + QVBoxLayout * main_layout = new QVBoxLayout; + main_layout->addWidget(label); + + // batch_directory + QLabel * label_directory = new QLabel("Batch directory: "); + QLineEdit * line_directory = new QLineEdit(this); + registerField("batch_directory", line_directory); + + // exected during time + QLabel * label_during_time = new QLabel("Expected during time: "); + QSpinBox * spin_during_time_hour = new QSpinBox(this); + QLabel * label_during_time_hour = new QLabel("Hours"); + spin_during_time_hour->setMinimum(0); + spin_during_time_hour->setMaximum(1000000); + registerField("during_time_hour", spin_during_time_hour); + QSpinBox * spin_during_time_min = new QSpinBox(this); + QLabel * label_during_time_min = new QLabel("Minutes"); + spin_during_time_min->setMinimum(0); + spin_during_time_min->setMaximum(59); + registerField("during_time_min", spin_during_time_min); + + // memory + QLabel * label_memory = new QLabel("Memory per nodes expected: "); + QSpinBox * spin_memory = new QSpinBox(this); + spin_memory->setMinimum(0); + spin_memory->setMaximum(1000000); + registerField("mem_value", spin_memory); + QComboBox * combo_memory = new QComboBox(this); + combo_memory->addItem("MB"); + combo_memory->addItem("GB"); + combo_memory->setCurrentIndex(1); + registerField("mem_type", combo_memory); + + // proc + QLabel * label_proc = new QLabel("Number of proc expected: "); + QSpinBox * spin_proc = new QSpinBox(this); + spin_proc->setMinimum(1); + spin_proc->setMaximum(1000000); + registerField("proc_value", spin_proc); + + QGridLayout *layout = new QGridLayout; + layout->addWidget(label_directory, 0, 0); + layout->addWidget(line_directory, 0, 1, 1, -1); + layout->addWidget(label_during_time, 1, 0); + layout->addWidget(spin_during_time_hour, 1, 1); + layout->addWidget(label_during_time_hour, 1, 2); + layout->addWidget(spin_during_time_min, 1, 3); + layout->addWidget(label_during_time_min, 1, 4); + layout->addWidget(label_memory, 2, 0); + layout->addWidget(spin_memory, 2, 1); + layout->addWidget(combo_memory, 2, 2); + layout->addWidget(label_proc, 3, 0); + layout->addWidget(spin_proc, 3, 1); + + main_layout->insertLayout(-1, layout); + + setLayout(main_layout); +}; + +BL::BatchParametersPage::~BatchParametersPage() +{} + +bool +BL::BatchParametersPage::validatePage() +{ + QString batch_directory = field("batch_directory").toString(); + if (batch_directory == "") + { + QMessageBox::warning(NULL, "Batch Directory Error", "Please enter a batch directory"); + return false; + } + + int time_hour = field("during_time_hour").toInt(); + int time_min = field("during_time_min").toInt(); + if (time_hour == 0 and time_min == 0) + { + QMessageBox::warning(NULL, "Time Error", "Please enter an expected during time"); + return false; + } + + int mem = field("mem_value").toInt(); + if (mem == 0) + { + QMessageBox::warning(NULL, "Memory Error", "Please enter an expected memory"); + return false; + } + + return true; +} + +int +BL::BatchParametersPage::nextId() const +{ + return BL::CreateJobWizard::Page_Files; +} + +BL::FilesPage::FilesPage(BL::CreateJobWizard * parent) +: QWizardPage(parent) +{ + setTitle("Enter Input and Output Files"); + + QLabel * main_label = new QLabel("In this step you define input and output files of your job"); + main_label->setWordWrap(true); + + // input_files + QGroupBox * input_group_box = new QGroupBox("Input Files"); + _input_files_button = new QPushButton("Add input files"); + _input_files_button->show(); + connect(_input_files_button, SIGNAL(clicked()), this, SLOT(choose_input_files())); + _remove_input_files_button = new QPushButton("Remove input files"); + _remove_input_files_button->show(); + _remove_input_files_button->setEnabled(false); + connect(_remove_input_files_button, SIGNAL(clicked()), this, SLOT(remove_input_files())); + _input_files_list = new QListWidget(); + _input_files_list->setSelectionMode(QAbstractItemView::MultiSelection); + connect(_input_files_list, SIGNAL(itemSelectionChanged()), this, SLOT(input_itemSelectionChanged())); + + QGridLayout * input_box = new QGridLayout; + input_box->addWidget(_input_files_button, 0, 0); + input_box->addWidget(_remove_input_files_button, 0, 1); + input_box->addWidget(_input_files_list, 1, 0, 1, -1); + input_group_box->setLayout(input_box); + + // output_files + QGroupBox * output_group_box = new QGroupBox("Output Files"); + _output_files_button = new QPushButton("Add output file"); + _output_files_button->show(); + connect(_output_files_button, SIGNAL(clicked()), this, SLOT(add_output_file())); + _remove_output_files_button = new QPushButton("Remove output files"); + _remove_output_files_button->show(); + _remove_output_files_button->setEnabled(false); + connect(_remove_output_files_button, SIGNAL(clicked()), this, SLOT(remove_output_files())); + _output_files_list = new QListWidget(); + _output_files_list->setSelectionMode(QAbstractItemView::MultiSelection); + _output_files_list->setEditTriggers(QAbstractItemView::DoubleClicked); + connect(_output_files_list, SIGNAL(itemSelectionChanged()), this, SLOT(output_itemSelectionChanged())); + + // Results Directory + QLabel * label_result_directory = new QLabel("Result directory: "); + QLineEdit * result_directory = new QLineEdit(this); + registerField("result_directory", result_directory); + + QGridLayout * output_box = new QGridLayout; + output_box->addWidget(_output_files_button, 0, 0); + output_box->addWidget(_remove_output_files_button, 0, 1); + output_box->addWidget(_output_files_list, 1, 0, 1, -1); + output_box->addWidget(label_result_directory, 2, 0); + output_box->addWidget(result_directory, 2, 1, 1, -1); + output_group_box->setLayout(output_box); + + QVBoxLayout * main_layout = new QVBoxLayout; + main_layout->addWidget(main_label); + main_layout->addWidget(input_group_box); + main_layout->addWidget(output_group_box); + setLayout(main_layout); + + parent->setFilesList(_input_files_list, _output_files_list); +}; + +BL::FilesPage::~FilesPage() +{} + +bool +BL::FilesPage::validatePage() +{ + QString result_directory = field("result_directory").toString(); + + for (int i = 0; i < _output_files_list->count(); ++i) + { + QListWidgetItem * item = _output_files_list->item(i); + if (item->text() == "TO EDIT!") + { + QMessageBox::warning(NULL, "Ouput Files Error", "Some output files are not defined !"); + return false; + } + } + + if (result_directory == "" and _output_files_list->count() != 0) + { + QMessageBox::warning(NULL, "Result Directory Error", "Please enter a result directory or remove output files"); + return false; + } + + if (result_directory != "" and _output_files_list->count() == 0) + { + QMessageBox::warning(NULL, "Result Error", "Please add output files or erase result directory"); + return false; + } + + return true; +} + +void +BL::FilesPage::choose_input_files() +{ + QStringList files = QFileDialog::getOpenFileNames(this, + tr("Add input files"), "", + tr("All Files (*)")); + for (int i = 0; i < files.size(); ++i) + { + if (_input_files_list->findItems(files.at(i), Qt::MatchFixedString).size() == 0) + _input_files_list->addItem(files.at(i)); + } +} + +void +BL::FilesPage::remove_input_files() +{ + QList list = _input_files_list->selectedItems(); + for (int i = 0; i < list.size(); ++i) + { + int row = _input_files_list->row( list.at(i) ); + delete _input_files_list->takeItem(row); + } +} + +void +BL::FilesPage::input_itemSelectionChanged() +{ + if (_input_files_list->selectedItems().size() > 0) + _remove_input_files_button->setEnabled(true); + else + _remove_input_files_button->setEnabled(false); +} + +void +BL::FilesPage::add_output_file() +{ + QListWidgetItem * new_item = new QListWidgetItem("TO EDIT!"); + new_item->setFlags(Qt::ItemIsSelectable|Qt::ItemIsEditable|Qt::ItemIsUserCheckable|Qt::ItemIsEnabled); + _output_files_list->addItem(new_item); +} + +void +BL::FilesPage::remove_output_files() +{ + QList list = _output_files_list->selectedItems(); + for (int i = 0; i < list.size(); ++i) + { + int row = _output_files_list->row( list.at(i) ); + delete _output_files_list->takeItem(row); + } +} + +void +BL::FilesPage::output_itemSelectionChanged() +{ + if (_output_files_list->selectedItems().size() > 0) + _remove_output_files_button->setEnabled(true); + else + _remove_output_files_button->setEnabled(false); +} + +int +BL::FilesPage::nextId() const +{ + return BL::CreateJobWizard::Page_Machine; +} + +BL::CreateJobWizard::ConclusionPage::ConclusionPage(QWidget * parent) +: QWizardPage(parent) +{ + setTitle("Job definition is finished"); + QCheckBox * check_box = new QCheckBox("Start job after creation"); + registerField("start_job", check_box); + QVBoxLayout * main_layout = new QVBoxLayout; + main_layout->addWidget(check_box); + setLayout(main_layout); +}; + +BL::CreateJobWizard::ConclusionPage::~ConclusionPage() +{} + +bool +BL::CreateJobWizard::ConclusionPage::validatePage() +{ + return true; +} + +int +BL::CreateJobWizard::ConclusionPage::nextId() const +{ + return -1; +} + +BL::MachinePage::MachinePage(BL::CreateJobWizard * parent, BL::SALOMEServices * salome_services) +: QWizardPage(parent) +{ + _salome_services = salome_services; + setTitle("Select a Machine"); + + QLabel * main_label = new QLabel("In this step you select the machine of your job"); + main_label->setWordWrap(true); + + // input_Machine + QGroupBox * machine_group_box = new QGroupBox("Machine List"); + _machine_list = new QListWidget(); + _machine_list->setSelectionMode(QAbstractItemView::SingleSelection); + std::list machine_list = _salome_services->getMachineList(); + std::list::iterator it; + for (it = machine_list.begin(); it != machine_list.end(); it++) + { + std::string machine = *it; + _machine_list->addItem(QString(machine.c_str())); + } + connect(_machine_list, SIGNAL(itemSelectionChanged()), this, SLOT(machine_itemSelectionChanged())); + QVBoxLayout * machine_list_layout = new QVBoxLayout(); + machine_list_layout->addWidget(_machine_list); + machine_group_box->setLayout(machine_list_layout); + + QLabel * machine_label = new QLabel("Machine selected: "); + _machine_choosed = new QLineEdit(); + _machine_choosed->setText(""); + _machine_choosed->setReadOnly(true); + registerField("machine_choosed", _machine_choosed); + + QGridLayout * main_layout = new QGridLayout; + main_layout->addWidget(machine_group_box, 0, 0, 1, -1); + main_layout->addWidget(machine_label, 1, 0); + main_layout->addWidget(_machine_choosed, 1, 1); + setLayout(main_layout); +}; + +BL::MachinePage::~MachinePage() +{} + +bool +BL::MachinePage::validatePage() +{ + QString machine_choosed = field("machine_choosed").toString(); + if (machine_choosed == "") + { + QMessageBox::warning(NULL, "Machine Error", "Please choose a machine"); + return false; + } + return true; +} + +void +BL::MachinePage::machine_itemSelectionChanged() +{ + _machine_choosed->setReadOnly(false); + QList list = _machine_list->selectedItems(); + QListWidgetItem * item = list.at(0); + _machine_choosed->setText(item->text()); + _machine_choosed->setReadOnly(true); +} + +int +BL::MachinePage::nextId() const +{ + return BL::CreateJobWizard::Page_Conclusion; +} diff --git a/src/genericgui/BL_CreateJobWizard.hxx b/src/genericgui/BL_CreateJobWizard.hxx new file mode 100644 index 0000000..ede4b4b --- /dev/null +++ b/src/genericgui/BL_CreateJobWizard.hxx @@ -0,0 +1,199 @@ +// Copyright (C) 2009 CEA/DEN, EDF R&D +// +// This library is free software; you can redistribute it and/or +// modify it 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 +// + +#ifndef _BL_CREATEJOBWIZARD_HXX_ +#define _BL_CREATEJOBWIZARD_HXX_ + +#include + +#include "BL_Traces.hxx" +#include "BL_JobsManager_QT.hxx" +#include "BL_SALOMEServices.hxx" + +#include +#include + +namespace BL{ + + class JobsManager_QT; + class CreateJobWizard: virtual public QWizard + { + Q_OBJECT + + public: + CreateJobWizard(BL::JobsManager_QT * jobs_manager, BL::SALOMEServices * salome_services); + virtual ~CreateJobWizard(); + + void setFilesList(QListWidget * input_files_list, QListWidget * output_files_list); + + public slots: + void end(int result); + + private: + //Page Name + QLineEdit * _nameLineEdit; + BL::JobsManager_QT * _jobs_manager; + QListWidget * _input_files_list; + QListWidget * _output_files_list; + + public: + // Results + std::string job_name; + + std::string yacs_file; + + std::string command; + + std::string batch_directory; + std::string expected_during_time; + std::string expected_memory; + int nb_proc; + + std::string result_directory; + std::list input_files_list; + std::list output_files_list; + + std::string machine_choosed; + + bool start_job; + + public: + enum {Page_JobName, Page_YACSSchema, Page_BatchParameters, Page_Files, + Page_Command_Main_Definitions, Page_Machine, Page_Conclusion}; + + class JobNamePage: virtual public QWizardPage + { + public: + JobNamePage(QWidget * parent, BL::JobsManager_QT * jobs_manager); + virtual ~JobNamePage(); + + virtual bool validatePage(); + virtual int nextId() const ; + + private: + BL::JobsManager_QT * _jobs_manager; + QRadioButton * _yacs_schema_button; + }; + + + class CommandMainPage: virtual public QWizardPage + { + public: + CommandMainPage(QWidget * parent); + virtual ~CommandMainPage(); + + virtual bool validatePage(); + virtual int nextId() const ; + }; + + class ConclusionPage: virtual public QWizardPage + { + public: + ConclusionPage(QWidget * parent); + virtual ~ConclusionPage(); + + virtual bool validatePage(); + virtual int nextId() const ; + }; + }; + + class YACSSchemaPage: virtual public QWizardPage + { + Q_OBJECT + + public: + YACSSchemaPage(QWidget * parent); + virtual ~YACSSchemaPage(); + + virtual bool validatePage(); + virtual int nextId() const ; + + public slots: + void choose_file(); + + private: + QPushButton * _yacs_file_button; + QLineEdit * _yacs_file_text; + }; + + class BatchParametersPage: virtual public QWizardPage + { + Q_OBJECT + + public: + BatchParametersPage(QWidget * parent); + virtual ~BatchParametersPage(); + + virtual bool validatePage(); + virtual int nextId() const; + }; + + class FilesPage: virtual public QWizardPage + { + Q_OBJECT + + public: + FilesPage(BL::CreateJobWizard * parent); + virtual ~FilesPage(); + + virtual int nextId() const; + virtual bool validatePage(); + + public slots: + void choose_input_files(); + void remove_input_files(); + void input_itemSelectionChanged(); + + void add_output_file(); + void remove_output_files(); + void output_itemSelectionChanged(); + + private: + QPushButton * _input_files_button; + QPushButton * _remove_input_files_button; + QListWidget * _input_files_list; + + QPushButton * _output_files_button; + QPushButton * _remove_output_files_button; + QListWidget * _output_files_list; + }; + + class MachinePage: virtual public QWizardPage + { + Q_OBJECT + + public: + MachinePage(BL::CreateJobWizard * parent, BL::SALOMEServices * salome_services); + virtual ~MachinePage(); + + virtual int nextId() const; + virtual bool validatePage(); + + public slots: + void machine_itemSelectionChanged(); + + private: + QListWidget * _machine_list; + QLineEdit * _machine_choosed; + BL::SALOMEServices * _salome_services; + }; +} + +#endif + diff --git a/src/genericgui/BL_GenericGui.cxx b/src/genericgui/BL_GenericGui.cxx new file mode 100644 index 0000000..49d37af --- /dev/null +++ b/src/genericgui/BL_GenericGui.cxx @@ -0,0 +1,313 @@ +// Copyright (C) 2009 CEA/DEN, EDF R&D +// +// This library is free software; you can redistribute it and/or +// modify it 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 +// + +#include "BL_GenericGui.hxx" + +BL::GenericGui::GenericGui(BL::MainWindows_Wrap * wrapper) : QObject(wrapper->getDockParent()) +{ + DEBTRACE("Creating BL::GenericGui"); + BL_ASSERT(wrapper); + _wrapper = wrapper; + _row_selected = -1; + _job_name_selected = ""; + + _dock_parent = _wrapper->getDockParent(); + _tab_parent = _wrapper->getTabParent(); + + _salome_services = new BL::SALOMEServices(); + if (_salome_services->initNS() == false) + DEBMSG("WARNING !!!!! SALOME IS NOT REACHABLE !!!!"); + _jobs_manager = new BL::JobsManager_QT(_dock_parent, _salome_services); + _model_manager = new BL::QModelManager(this, _jobs_manager); + + _model = _model_manager->getModel(); + + // ---- Adding different GUI parts + + /* Buttons */ + _buttons = new BL::Buttons(_tab_parent); + _buttons->setCreateButtonSlot(this, SLOT(create_job())); + _buttons->setStartButtonSlot(this, SLOT(start_job())); + _buttons->setDeleteButtonSlot(this, SLOT(delete_job())); + _buttons->setRefreshButtonSlot(this, SLOT(refresh_job())); + _buttons->setGetResultsButtonSlot(this, SLOT(get_results_job())); + + /* Jobs Table */ + _jobs_table = new BL::JobsTable(_tab_parent); + _jobs_table->setModel(_model); + + /* Job Tab */ + _job_tab = new BL::JobTab(_tab_parent, _jobs_manager); + _job_tab->setModel(_model); + + /* Tab Central Widget */ + QWidget * central_widget = new QWidget(_tab_parent); + + QSplitter * tab_central_widget = new QSplitter(Qt::Vertical, central_widget); + tab_central_widget->addWidget(_jobs_table); + tab_central_widget->addWidget(_job_tab); + tab_central_widget->setChildrenCollapsible(false); + + QVBoxLayout * central_layout = new QVBoxLayout; + central_layout->addWidget(_buttons); + central_layout->addWidget(tab_central_widget); + central_widget->setLayout(central_layout); + + _tab_parent->setCentralWidget(central_widget); + // Test tab + //QDockWidget * dw_main = new QDockWidget(_tab_parent); + //dw_main->setWidget(central_widget); + //_tab_parent->addDockWidget(Qt::LeftDockWidgetArea, dw_main); + + /* Summary */ + _dw_summary = new QDockWidget(_dock_parent); + _dw_summary->setWindowTitle("Summary"); + _summary = new BL::Summary(_dock_parent, _jobs_manager); + _summary->setModel(_model); + _dw_summary->setWidget(_summary); + + /* MachineCatalog */ + _dw_machine_catalog = new QDockWidget(_dock_parent); + _dw_machine_catalog->setWindowTitle("Machine Catalog"); + _machine_catalog = new BL::MachineCatalog(_dock_parent, _salome_services); + _dw_machine_catalog->setWidget(_machine_catalog); + + /* Main Dock Window */ + _dock_parent->addDockWidget(Qt::RightDockWidgetArea, _jobs_manager); + _dock_parent->addDockWidget(Qt::RightDockWidgetArea, _dw_summary); + _dock_parent->addDockWidget(Qt::RightDockWidgetArea, _dw_machine_catalog); + _dock_parent->splitDockWidget(_jobs_manager, _dw_summary, Qt::Vertical); + _dock_parent->tabifyDockWidget(_dw_summary, _dw_machine_catalog); + + /* Signals and Slots */ + + // JobsManager -> Model + connect(_jobs_manager, SIGNAL(new_job_added(QString)), _model_manager, SLOT(new_job_added(QString))); + connect(_jobs_manager, SIGNAL(job_state_changed(QString)), _model_manager, SLOT(job_state_changed(QString))); + connect(_jobs_manager, SIGNAL(job_state_changed(QString)), this, SLOT(job_state_changed(QString))); + + // Model -> X + connect(_model, SIGNAL(rowsInserted(QModelIndex, int, int)), _summary, SLOT(rowsInserted(QModelIndex, int, int))); + connect(_model, SIGNAL(rowsRemoved(QModelIndex, int, int)), _summary, SLOT(rowsRemoved(QModelIndex, int, int))); + connect(_model, SIGNAL(itemChanged(QStandardItem*)), _summary, SLOT(itemChanged(QStandardItem*))); + connect(_model, SIGNAL(itemChanged(QStandardItem*)), _job_tab, SLOT(itemChanged(QStandardItem*))); + + // TableView -> X + connect(_jobs_table, SIGNAL(clicked(QModelIndex)), _job_tab, SLOT(job_selected(QModelIndex))); + connect(_jobs_table, SIGNAL(clicked(QModelIndex)), this, SLOT(job_selected(QModelIndex))); + connect(_jobs_table, SIGNAL(clicked(QModelIndex)), _model_manager, SLOT(job_selected(QModelIndex))); + + // Delete Job -> X + connect(this, SIGNAL(job_deleted(QString)), _job_tab, SLOT(reset(QString))); +} + +BL::GenericGui::~GenericGui() +{ + DEBTRACE("Destroying BL::GenericGui"); + + delete _salome_services; +} + +void +BL::GenericGui::showDockWidgets(bool isVisible) +{ + DEBTRACE("BL::GenericGui::showDockWidgets " << isVisible); + if (_jobs_manager) _jobs_manager->setVisible(isVisible); + if (_dw_summary) _dw_summary->setVisible(isVisible); + if (_dw_machine_catalog) _dw_machine_catalog->setVisible(isVisible); +} + +void +BL::GenericGui::createActions() +{ + DEBTRACE("CreateActions BL::GenericGui"); + _create_job_action = _wrapper->createAction("Create Job", QIcon(), "Create Job", "Create Job", 0, _dock_parent, false, this, SLOT(create_job())); + _start_job_action = _wrapper->createAction("Start Job", QIcon(), "Start Job", "Start Job", 0, _dock_parent, false, this, SLOT(start_job())); + _delete_job_action = _wrapper->createAction("Delete Job", QIcon(), "Delete Job", "Delete Job", 0, _dock_parent, false, this, SLOT(delete_job())); + _refresh_job_action = _wrapper->createAction("Refresh Job", QIcon(), "Refresh Job", "Refresh Job", 0, _dock_parent, false, this, SLOT(refresh_job())); + _get_results_job_action = _wrapper->createAction("Get Job Results", QIcon(), "Get Job Results", "Get Job Results", 0, _dock_parent, false, this, SLOT(refresh_job())); +} + +void +BL::GenericGui::createMenus() +{ + DEBTRACE("CreateMenus BL::GenericGui"); + int menu_id = _wrapper->createTopMenu("JobManager"); + _wrapper->addActionToMenu(_create_job_action, menu_id); + _wrapper->addActionToMenu(_start_job_action, menu_id); + _wrapper->addActionToMenu(_delete_job_action, menu_id); + _wrapper->addActionToMenu(_get_results_job_action, menu_id); + _wrapper->addActionToMenu(_refresh_job_action, menu_id); +} + +void +BL::GenericGui::create_job() +{ + DEBTRACE("Create Job Slot BL::GenericGui"); + _jobs_manager->create_job_wizard(); +} + +void +BL::GenericGui::start_job() +{ + DEBTRACE("Start Job Slot BL::GenericGui"); + _jobs_manager->start_job(_job_name_selected.toStdString()); + updateButtonsStates(); +} + +void +BL::GenericGui::refresh_job() +{ + DEBTRACE("Refresh Job Slot BL::GenericGui"); + _jobs_manager->refresh_jobs(); +} + +void +BL::GenericGui::get_results_job() +{ + DEBTRACE("Get Results Job Slot BL::GenericGui"); + _jobs_manager->get_results_job(_job_name_selected.toStdString()); +} + +void +BL::GenericGui::delete_job() +{ + DEBTRACE("Delete Job Slot BL::GenericGui"); + int ret = QMessageBox::warning(NULL, "Delete a job", "Do you really want to delete this job ?", + QMessageBox::Ok|QMessageBox::Cancel, + QMessageBox::Ok); + if (ret == QMessageBox::Ok) + { + _jobs_manager->delete_job(_job_name_selected); + _model_manager->deleteJob(_row_selected); + emit job_deleted(_job_name_selected); + _row_selected = -1; + _job_name_selected = ""; + updateButtonsStates(); + } +} + +void +BL::GenericGui::job_selected(const QModelIndex & index) +{ + DEBTRACE("BL::GenericGui::job_selected slot"); + QStandardItem * item = _model->itemFromIndex(index); + QStandardItem * item_name = _model->item(item->row()); + _row_selected = item->row(); + _job_name_selected = item_name->text(); + updateButtonsStates(); +} + +void +BL::GenericGui::job_state_changed(const QString & name) +{ + if (name == _job_name_selected) + updateButtonsStates(); +} +void +BL::GenericGui::updateButtonsStates() +{ + DEBTRACE("BL::GenericGui::updateButtonsStates slot"); + + // First case: no job selected + if (_job_name_selected == "" and _row_selected == -1) + { + _start_job_action->setEnabled(false); + _delete_job_action->setEnabled(false); + _get_results_job_action->setEnabled(false); + _buttons->disable_start_button(); + _buttons->disable_delete_button(); + _buttons->disable_get_results_button(); + } + else if (_job_name_selected != "" and _row_selected != -1) + { + BL::Job * job = _jobs_manager->getJob(_job_name_selected.toStdString()); + BL::Job::State job_state = job->getState(); + + switch (job_state) + { + case BL::Job::CREATED: + _start_job_action->setEnabled(true); + _delete_job_action->setEnabled(true); + _get_results_job_action->setEnabled(false); + _buttons->enable_start_button(); + _buttons->enable_delete_button(); + _buttons->disable_get_results_button(); + break; + + case BL::Job::IN_PROCESS: + _start_job_action->setEnabled(false); + _buttons->disable_start_button(); + _delete_job_action->setEnabled(false); + _buttons->disable_delete_button(); + _get_results_job_action->setEnabled(false); + _buttons->disable_get_results_button(); + break; + + case BL::Job::QUEUED: + _start_job_action->setEnabled(false); + _buttons->disable_start_button(); + _delete_job_action->setEnabled(true); + _buttons->enable_delete_button(); + _get_results_job_action->setEnabled(false); + _buttons->disable_get_results_button(); + break; + + case BL::Job::RUNNING: + _start_job_action->setEnabled(false); + _buttons->disable_start_button(); + _delete_job_action->setEnabled(true); + _buttons->enable_delete_button(); + _get_results_job_action->setEnabled(false); + _buttons->disable_get_results_button(); + break; + + case BL::Job::PAUSED: + _start_job_action->setEnabled(false); + _buttons->disable_start_button(); + _delete_job_action->setEnabled(true); + _buttons->enable_delete_button(); + _get_results_job_action->setEnabled(false); + _buttons->disable_get_results_button(); + break; + + case BL::Job::ERROR: + _start_job_action->setEnabled(false); + _buttons->disable_start_button(); + _delete_job_action->setEnabled(true); + _buttons->enable_delete_button(); + _get_results_job_action->setEnabled(false); + _buttons->disable_get_results_button(); + break; + + case BL::Job::FINISHED: + _start_job_action->setEnabled(false); + _buttons->disable_start_button(); + _delete_job_action->setEnabled(true); + _buttons->enable_delete_button(); + _get_results_job_action->setEnabled(true); + _buttons->enable_get_results_button(); + break; + } + } + else + { + DEBTRACE("ERROR in updateButtonsStates !!!!!!"); + } +} diff --git a/src/genericgui/BL_GenericGui.hxx b/src/genericgui/BL_GenericGui.hxx new file mode 100644 index 0000000..161a24e --- /dev/null +++ b/src/genericgui/BL_GenericGui.hxx @@ -0,0 +1,98 @@ +// Copyright (C) 2009 CEA/DEN, EDF R&D +// +// This library is free software; you can redistribute it and/or +// modify it 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 +// + +#ifndef _BL_GENERICGUI_HXX_ +#define _BL_GENERICGUI_HXX_ + +#include + +#include "BL_Traces.hxx" + +#include "BL_SALOMEServices.hxx" + +#include "BL_MainWindows_Wrap.hxx" + +#include "BL_QModelManager.hxx" +#include "BL_JobsManager_QT.hxx" +#include "BL_JobsTable.hxx" +#include "BL_JobTab.hxx" +#include "BL_Buttons.hxx" +#include "BL_Summary.hxx" +#include "BL_MachineCatalog.hxx" + +namespace BL +{ + class GenericGui: public QObject + { + Q_OBJECT + + public: + GenericGui(BL::MainWindows_Wrap * wrapper); + virtual ~GenericGui(); + + void showDockWidgets(bool isVisible); + void createActions(); + void createMenus(); + + public slots: + void create_job(); + void start_job(); + void delete_job(); + void refresh_job(); + void get_results_job(); + void job_selected(const QModelIndex & index); + void job_state_changed(const QString & name); + void updateButtonsStates(); + + signals: + void job_deleted(QString job_name); + + protected: + + BL::MainWindows_Wrap * _wrapper; + + BL::SALOMEServices * _salome_services; + + QMainWindow * _dock_parent; + QMainWindow * _tab_parent; + QDockWidget * _dw_summary; + QDockWidget * _dw_machine_catalog; + + BL::Buttons * _buttons; + BL::JobsTable * _jobs_table; + BL::JobTab * _job_tab; + BL::Summary * _summary; + + QAction * _create_job_action; + QAction * _start_job_action; + QAction * _delete_job_action; + QAction * _get_results_job_action; + QAction * _refresh_job_action; + + BL::JobsManager_QT * _jobs_manager; + BL::QModelManager * _model_manager; + QStandardItemModel * _model; + BL::MachineCatalog * _machine_catalog; + + int _row_selected; + QString _job_name_selected; + }; +} + +#endif diff --git a/src/genericgui/BL_JobTab.cxx b/src/genericgui/BL_JobTab.cxx new file mode 100644 index 0000000..5f139cc --- /dev/null +++ b/src/genericgui/BL_JobTab.cxx @@ -0,0 +1,259 @@ +// Copyright (C) 2009 CEA/DEN, EDF R&D +// +// This library is free software; you can redistribute it and/or +// modify it 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 +// + +#include "BL_JobTab.hxx" +#include "BL_Traces.hxx" + +BL::JobTab::JobTab(QWidget *parent, BL::JobsManager_QT * jobs_manager) : QTabWidget(parent) +{ + DEBTRACE("Creating BL::JobTab"); + BL_ASSERT(parent); + BL_ASSERT(jobs_manager); + _parent = parent; + _jobs_manager = jobs_manager; + _model = NULL; + + createJobSummaryTab(); + createJobFilesTab(); + + addTab(_summary_tab, "Job Summary"); + addTab(_files_tab, "Job Files"); +} + +BL::JobTab::~JobTab() +{ + DEBTRACE("Destroying BL::JobTab"); +} + +void +BL::JobTab::setModel(QStandardItemModel * model) +{ + DEBTRACE("Call setModel BL::JobTab"); + BL_ASSERT(model); + + _model = model; +} + +void +BL::JobTab::createJobSummaryTab() +{ + _summary_tab = new QWidget(this); + + QLabel * job_name_label = new QLabel("Name:"); + _job_name_label_value = new QLabel(""); + QLabel * job_type_label = new QLabel("Type:"); + _job_type_label_value = new QLabel(""); + QLabel * job_state_label = new QLabel("State:"); + _job_state_label_value = new QLabel(""); + QLabel * job_machine_label = new QLabel("Machine:"); + _job_machine_label_value = new QLabel(""); + _job_command_label = new QLabel("Schema or Command:"); + _job_command_label_value = new QLabel(""); + + QGroupBox * main_values_box = new QGroupBox("Main values"); + QFormLayout * values_form = new QFormLayout; + values_form->insertRow(0, job_name_label, _job_name_label_value); + values_form->insertRow(1, job_type_label, _job_type_label_value); + values_form->insertRow(2, job_state_label, _job_state_label_value); + values_form->insertRow(3, job_machine_label, _job_machine_label_value); + values_form->insertRow(4, _job_command_label, _job_command_label_value); + main_values_box->setLayout(values_form); + + QLabel * job_nif_label = new QLabel("Number of Input Files:"); + _job_nif_label_value = new QLabel(""); + QLabel * job_nof_label = new QLabel("Number of Output Files:"); + _job_nof_label_value = new QLabel(""); + QLabel * job_bd_label = new QLabel("Execution directory:"); + _job_bd_label_value = new QLabel(""); + QLabel * job_rd_label = new QLabel("Result directory:"); + _job_rd_label_value = new QLabel(""); + + QLabel * job_edt_label = new QLabel("Expected during time:"); + _job_edt_label_value = new QLabel(""); + QLabel * job_em_label = new QLabel("Expected memory:"); + _job_em_label_value = new QLabel(""); + QLabel * job_nop_label = new QLabel("Number of processors:"); + _job_nop_label_value = new QLabel(""); + + QGroupBox * run_values_box = new QGroupBox("Run values"); + QFormLayout * run_values_form = new QFormLayout; + run_values_form->insertRow(0, job_nif_label, _job_nif_label_value); + run_values_form->insertRow(1, job_nof_label, _job_nof_label_value); + run_values_form->insertRow(2, job_bd_label, _job_bd_label_value); + run_values_form->insertRow(3, job_rd_label, _job_rd_label_value); + QFormLayout * other_run_values_form = new QFormLayout; + other_run_values_form->insertRow(0, job_edt_label, _job_edt_label_value); + other_run_values_form->insertRow(1, job_em_label, _job_em_label_value); + other_run_values_form->insertRow(2, job_nop_label, _job_nop_label_value); + QHBoxLayout * box_layout = new QHBoxLayout(); + box_layout->addLayout(run_values_form); + box_layout->addLayout(other_run_values_form); + run_values_box->setLayout(box_layout); + + QVBoxLayout * mainLayout = new QVBoxLayout(); + mainLayout->addWidget(main_values_box); + mainLayout->addWidget(run_values_box); + _summary_tab->setLayout(mainLayout); +} + +void +BL::JobTab::createJobFilesTab() +{ + _files_tab = new QWidget(this); + + _input_files_list = new QListWidget(this); + _input_files_list->setSelectionMode(QAbstractItemView::NoSelection); + QGroupBox * input_files_box = new QGroupBox("Input Files"); + QVBoxLayout * input_layout = new QVBoxLayout(); + input_layout->addWidget(_input_files_list); + input_files_box->setLayout(input_layout); + + _output_files_list = new QListWidget(this); + _output_files_list->setSelectionMode(QAbstractItemView::NoSelection); + QGroupBox * output_files_box = new QGroupBox("Output Files"); + QVBoxLayout * output_layout = new QVBoxLayout(); + output_layout->addWidget(_output_files_list); + output_files_box->setLayout(output_layout); + + QVBoxLayout * mainLayout = new QVBoxLayout(); + mainLayout->addWidget(input_files_box); + mainLayout->addWidget(output_files_box); + _files_tab->setLayout(mainLayout); +} + +void +BL::JobTab::job_selected(const QModelIndex & index) +{ + DEBTRACE("BL::JobTab::job_selected slot"); + QStandardItem * item = _model->itemFromIndex(index); + QStandardItem * item_name = _model->item(item->row()); + if (item) + { + BL::Job * job = _jobs_manager->getJob(item_name->text().toStdString()); + + _job_name_label_value->setText(QString(job->getName().c_str())); + + if (job->getState() == BL::Job::CREATED) + _job_state_label_value->setText("Created"); + else if (job->getState() == BL::Job::IN_PROCESS) + _job_state_label_value->setText("In Process"); + else if (job->getState() == BL::Job::QUEUED) + _job_state_label_value->setText("Queued"); + else if (job->getState() == BL::Job::RUNNING) + _job_state_label_value->setText("Running"); + else if (job->getState() == BL::Job::PAUSED) + _job_state_label_value->setText("Paused"); + else if (job->getState() == BL::Job::ERROR) + _job_state_label_value->setText("Error"); + else + _job_state_label_value->setText("Finished"); + + if (job->getType() == BL::Job::YACS_SCHEMA) + { + _job_command_label->setText("Schema:"); + _job_command_label_value->setText(QString(job->getYACSFile().c_str())); + _job_type_label_value->setText("YACS_Schema"); + } + else + { + _job_command_label->setText("Command:"); + _job_command_label_value->setText(QString(job->getCommand().c_str())); + _job_type_label_value->setText("Command"); + } + + _job_machine_label_value->setText(QString(job->getMachine().c_str())); + + BL::Job::BatchParam batch_params = job->getBatchParameters(); + + BL::Job::FilesParam files_params = job->getFilesParameters(); + int nif = files_params.input_files_list.size(); + _job_nif_label_value->setText(QVariant(nif).toString()); + int nof = files_params.output_files_list.size(); + _job_nof_label_value->setText(QVariant(nof).toString()); + _job_bd_label_value->setText(QString(batch_params.batch_directory.c_str())); + _job_rd_label_value->setText(QString(files_params.result_directory.c_str())); + + _job_edt_label_value->setText(QString(batch_params.expected_during_time.c_str())); + _job_em_label_value->setText(QString(batch_params.expected_memory.c_str())); + _job_nop_label_value->setText(QVariant(batch_params.nb_proc).toString()); + + std::list::iterator it; + for (it = files_params.input_files_list.begin(); it != files_params.input_files_list.end(); it++) + { + std::string file = *it; + _input_files_list->addItem(QString(file.c_str())); + } + for (it = files_params.output_files_list.begin(); it != files_params.output_files_list.end(); it++) + { + std::string file = *it; + _output_files_list->addItem(QString(file.c_str())); + } + + } + else + DEBTRACE ("itemFromIndex returns 0 !"); +} + +void +BL::JobTab::itemChanged(QStandardItem * item) +{ + DEBTRACE("BL::JobTab::itemChanged slot"); + + QStandardItem * item_name = _model->item(item->row()); + BL::Job * job = _jobs_manager->getJob(item_name->text().toStdString()); + + if (_job_name_label_value->text() == QString(job->getName().c_str())) + { + if (job->getState() == BL::Job::CREATED) + _job_state_label_value->setText("Created"); + else if (job->getState() == BL::Job::IN_PROCESS) + _job_state_label_value->setText("In Process"); + else if (job->getState() == BL::Job::QUEUED) + _job_state_label_value->setText("Queued"); + else if (job->getState() == BL::Job::RUNNING) + _job_state_label_value->setText("Running"); + else if (job->getState() == BL::Job::PAUSED) + _job_state_label_value->setText("Paused"); + else if (job->getState() == BL::Job::ERROR) + _job_state_label_value->setText("Error"); + else + _job_state_label_value->setText("Finished"); + } +} + +void +BL::JobTab::reset(QString job_name) +{ + _job_name_label_value->setText(""); + _job_type_label_value->setText(""); + _job_state_label_value->setText(""); + _job_machine_label_value->setText(""); + _job_nif_label_value->setText(""); + _job_nof_label_value->setText(""); + _job_bd_label_value->setText(""); + _job_rd_label_value->setText(""); + _job_edt_label_value->setText(""); + _job_em_label_value->setText(""); + _job_nop_label_value->setText(""); + _job_command_label->setText("Schema or Command:"); + _job_command_label_value->setText(""); + + _input_files_list->clear(); + _output_files_list->clear(); +} diff --git a/src/genericgui/BL_JobTab.hxx b/src/genericgui/BL_JobTab.hxx new file mode 100644 index 0000000..2f68cc0 --- /dev/null +++ b/src/genericgui/BL_JobTab.hxx @@ -0,0 +1,78 @@ +// Copyright (C) 2009 CEA/DEN, EDF R&D +// +// This library is free software; you can redistribute it and/or +// modify it 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 +// + +#ifndef _BL_JOBTAB_HXX_ +#define _BL_JOBTAB_HXX_ + +#include + +#include "BL_JobsManager_QT.hxx" + +namespace BL +{ + class JobTab: public QTabWidget + { + Q_OBJECT + + public: + JobTab(QWidget *parent, BL::JobsManager_QT * jobs_manager); + virtual ~JobTab(); + + void setModel(QStandardItemModel * model); + + void createJobSummaryTab(); + void createJobFilesTab(); + + public slots: + void job_selected(const QModelIndex & index); + void itemChanged(QStandardItem * item); + void reset(QString job_name); + + protected: + QWidget* _parent; + QStandardItemModel * _model; + BL::JobsManager_QT * _jobs_manager; + + QWidget * _summary_tab; + // Main Values + QLabel * _job_name_label_value; + QLabel * _job_type_label_value; + QLabel * _job_state_label_value; + QLabel * _job_machine_label_value; + QLabel * _job_command_label; + QLabel * _job_command_label_value; + + // Run Values + QLabel * _job_nif_label_value; + QLabel * _job_nof_label_value; + QLabel * _job_bd_label_value; + QLabel * _job_rd_label_value; + QLabel * _job_edt_label_value; + QLabel * _job_em_label_value; + QLabel * _job_nop_label_value; + + QWidget * _files_tab; + + QListWidget * _input_files_list; + QListWidget * _output_files_list; + }; +} + +#endif + diff --git a/src/genericgui/BL_JobsManager_QT.cxx b/src/genericgui/BL_JobsManager_QT.cxx new file mode 100644 index 0000000..04cc1b5 --- /dev/null +++ b/src/genericgui/BL_JobsManager_QT.cxx @@ -0,0 +1,330 @@ +// Copyright (C) 2009 CEA/DEN, EDF R&D +// +// This library is free software; you can redistribute it and/or +// modify it 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 +// + +#include "BL_JobsManager_QT.hxx" + +BL::JobManagerEvent::JobManagerEvent(const std::string & action_i, + const std::string & event_name_i, + const std::string & job_name_i, + const std::string & data_i) : QEvent(QEvent::User) +{ + action = action_i; + event_name = event_name_i; + job_name = job_name_i; + data = data_i; +} + +BL::JobManagerEvent::~JobManagerEvent() {} + +BL::JobsManager_QT::JobsManager_QT(QWidget * parent, BL::SALOMEServices * salome_services) : + QDockWidget(parent), BL::JobsManager(salome_services) +{ + DEBTRACE("Creating BL::JobsManager_QT"); + setObserver(this); + + // Widget Part + + QWidget * main_widget = new QWidget(this); + + _load_jobs = new QPushButton("Load Jobs"); + _save_jobs = new QPushButton("Save Jobs"); + _auto_refresh_jobs = new QPushButton("Auto Refresh: no"); + _timer = new QTimer(this); + _timer->stop(); + connect(_timer, SIGNAL(timeout()), this, SLOT(RefreshJobs())); + + // Menu for auto refresh + QMenu * refresh_menu = new QMenu(this); + refresh_menu->addAction("No", this, SLOT(no_auto_refresh())); + refresh_menu->addAction("10 seconds", this, SLOT(ten_seconds_refresh())); + refresh_menu->addAction("30 seconds", this, SLOT(thirty_seconds_refresh())); + refresh_menu->addAction("1 minute", this, SLOT(one_minute_refresh())); + refresh_menu->addAction("5 minutes", this, SLOT(five_minutes_refresh())); + refresh_menu->addAction("30 minutes", this, SLOT(thirty_minutes_refresh())); + refresh_menu->addAction("1 hour", this, SLOT(one_hour_refresh())); + _auto_refresh_jobs->setMenu(refresh_menu); + + QHBoxLayout * button_layout = new QHBoxLayout(); + button_layout->addWidget(_load_jobs); + button_layout->addWidget(_save_jobs); + button_layout->addWidget(_auto_refresh_jobs); + + QGroupBox * message_box = new QGroupBox("Messages"); + _log = new QTextEdit(this); + _log->setReadOnly(true); + QVBoxLayout * message_box_layout = new QVBoxLayout(message_box); + message_box_layout->addWidget(_log); + message_box->setLayout(message_box_layout); + + QVBoxLayout * mainLayout = new QVBoxLayout(); + mainLayout->addLayout(button_layout); + mainLayout->addWidget(message_box); + main_widget->setLayout(mainLayout); + + setWidget(main_widget); + setWindowTitle("Job Manager"); +} + +BL::JobsManager_QT::~JobsManager_QT() +{ + DEBTRACE("Destroying BL::JobsManager_QT"); +} + +void +BL::JobsManager_QT::RefreshJobs() +{ + refresh_jobs(); +} + +void +BL::JobsManager_QT::no_auto_refresh() +{ + _auto_refresh_jobs->setText("Auto Refresh: no"); + _timer->stop(); +} + +void +BL::JobsManager_QT::ten_seconds_refresh() +{ + _auto_refresh_jobs->setText("Auto Refresh: 10s"); + _timer->stop(); + _timer->start(10 * 1000); +} + +void +BL::JobsManager_QT::thirty_seconds_refresh() +{ + _auto_refresh_jobs->setText("Auto Refresh: 30s"); + _timer->stop(); + _timer->start(30 * 1000); +} + +void +BL::JobsManager_QT::one_minute_refresh() +{ + _auto_refresh_jobs->setText("Auto Refresh: 1min"); + _timer->stop(); + _timer->start(1 * 60 * 1000); +} + +void +BL::JobsManager_QT::five_minutes_refresh() +{ + _auto_refresh_jobs->setText("Auto Refresh: 5min"); + _timer->stop(); + _timer->start(5 * 60 * 1000); +} + +void +BL::JobsManager_QT::thirty_minutes_refresh() +{ + _auto_refresh_jobs->setText("Auto Refresh: 30min"); + _timer->stop(); + _timer->start(30 * 60 * 1000); +} + +void +BL::JobsManager_QT::one_hour_refresh() +{ + _auto_refresh_jobs->setText("Auto Refresh: 1hour"); + _timer->stop(); + _timer->start(1 * 60 * 60 * 1000); +} + +void +BL::JobsManager_QT::create_job_wizard() +{ + BL::CreateJobWizard wizard(this, _salome_services); + wizard.exec(); + + if (wizard.job_name != "") + { + BL::Job * new_job = addNewJob(wizard.job_name); + if (wizard.yacs_file != "") + { + // YACS schema job + new_job->setType(BL::Job::YACS_SCHEMA); + new_job->setYACSFile(wizard.yacs_file); + BL::Job::BatchParam param; + param.batch_directory = wizard.batch_directory; + param.expected_during_time = wizard.expected_during_time; + param.expected_memory = wizard.expected_memory; + param.nb_proc = wizard.nb_proc; + new_job->setBatchParameters(param); + BL::Job::FilesParam files_params; + files_params.result_directory = wizard.result_directory; + files_params.input_files_list = wizard.input_files_list; + files_params.output_files_list = wizard.output_files_list; + new_job->setFilesParameters(files_params); + new_job->setMachine(wizard.machine_choosed); + } + else + { + // Command Job + new_job->setType(BL::Job::COMMAND); + new_job->setCommand(wizard.command); + BL::Job::BatchParam param; + param.batch_directory = wizard.batch_directory; + param.expected_during_time = wizard.expected_during_time; + param.expected_memory = wizard.expected_memory; + param.nb_proc = wizard.nb_proc; + new_job->setBatchParameters(param); + BL::Job::FilesParam files_params; + files_params.result_directory = wizard.result_directory; + files_params.input_files_list = wizard.input_files_list; + files_params.output_files_list = wizard.output_files_list; + new_job->setFilesParameters(files_params); + new_job->setMachine(wizard.machine_choosed); + } + emit new_job_added(QString::fromStdString(wizard.job_name)); + if (wizard.start_job) + start_job(wizard.job_name); + } + else + { + DEBTRACE("User cancel Create Job Wizard"); + } +} + +void +BL::JobsManager_QT::delete_job(QString job_name) +{ + BL::JobsManager::removeJob(job_name.toStdString()); +} + +void +BL::JobsManager_QT::sendEvent(const std::string & action, + const std::string & event_name, + const std::string & job_name, + const std::string & data) +{ + DEBTRACE("sendEvent BL::JobsManager_QT"); + + // Sending a QEvent to go back to main thread + BL::JobManagerEvent * event = new JobManagerEvent(action, event_name, job_name, data); + QApplication::postEvent(this, event); +} + +bool +BL::JobsManager_QT::event(QEvent * e) +{ + QDockWidget::event(e); + JobManagerEvent * event = dynamic_cast(e); + if (!event) return false; + + DEBTRACE("BL::JobsManager_QT Receiving event : " + << event->action << " " + << event->event_name << " " + << event->job_name << " " + << event->data); + if (event->action == "start_job") + { + if (event->event_name == "Ok") + { + QString str((event->job_name).c_str()); + write_normal_text("Job " + str + " queued\n"); + } + else + { + QString str((event->job_name).c_str()); + write_error_text("Error in starting job: " + str + "\n"); + write_error_text("*** "); + write_error_text((event->data).c_str()); + write_error_text(" ***\n"); + } + emit job_state_changed(QString((event->job_name).c_str())); + } + else if (event->action == "refresh_job") + { + if (event->event_name == "Ok") + { + QString str((event->job_name).c_str()); + write_normal_text("Job " + str + " state changed\n"); + emit job_state_changed(QString((event->job_name).c_str())); + } + else + { + QString str((event->job_name).c_str()); + write_error_text("Error in refreshing job: " + str + "\n"); + write_error_text("*** "); + write_error_text((event->data).c_str()); + write_error_text(" ***\n"); + } + } + else if (event->action == "delete_job") + { + if (event->event_name == "Ok") + { + QString str((event->job_name).c_str()); + write_normal_text("Job " + str + " deleted\n"); + } + else + { + QString str((event->job_name).c_str()); + write_error_text("Warning delete job: " + str + " maybe not complete, exception catch in SALOME Launcher service\n"); + write_error_text("*** "); + write_error_text((event->data).c_str()); + write_error_text(" ***\n"); + } + } + else if (event->action == "get_results_job") + { + if (event->event_name == "Ok") + { + QString str((event->job_name).c_str()); + write_normal_text("Results of Job " + str + " are get\n"); + } + else + { + QString str((event->job_name).c_str()); + write_error_text("Warning for results of job: " + str + " maybe not complete, exception catch in SALOME Launcher service\n"); + write_error_text("*** "); + write_error_text((event->data).c_str()); + write_error_text(" ***\n"); + } + } + else + { + QString str((event->action).c_str()); + write_error_text("Unknown type of event received:" + str + "\n"); + } + return true; +} + +void +BL::JobsManager_QT::write_normal_text(const QString & text) +{ + _log->setReadOnly(false); + QTextCursor cursor = _log->textCursor(); + QTextCharFormat text_format; + text_format.setForeground(Qt::darkBlue); + cursor.insertText(text, text_format); + _log->setTextCursor(cursor); + _log->setReadOnly(true); +} + +void +BL::JobsManager_QT::write_error_text(const QString & text) +{ + QTextCursor cursor = _log->textCursor(); + QTextCharFormat text_format; + text_format.setForeground(Qt::red); + cursor.insertText(text, text_format); + _log->setTextCursor(cursor); +} diff --git a/src/genericgui/BL_JobsManager_QT.hxx b/src/genericgui/BL_JobsManager_QT.hxx new file mode 100644 index 0000000..b1b0980 --- /dev/null +++ b/src/genericgui/BL_JobsManager_QT.hxx @@ -0,0 +1,97 @@ +// Copyright (C) 2009 CEA/DEN, EDF R&D +// +// This library is free software; you can redistribute it and/or +// modify it 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 +// + +#ifndef _BL_JOBSMANAGER_QT_HXX_ +#define _BL_JOBSMANAGER_QT_HXX_ + +#include + +#include "BL_Traces.hxx" +#include "BL_JobsManager.hxx" +#include "BL_CreateJobWizard.hxx" + +#include + +namespace BL{ + + class JobManagerEvent : public QEvent + { + public: + JobManagerEvent(const std::string & action_i, + const std::string & event_name_i, + const std::string & job_name_i, + const std::string & data_i); + virtual ~JobManagerEvent(); + + public: + std::string action; + std::string event_name; + std::string job_name; + std::string data; + }; + + class JobsManager_QT: virtual public QDockWidget, + virtual public BL::JobsManager, + virtual public BL::Observer + { + Q_OBJECT + + public: + JobsManager_QT(QWidget * parent, BL::SALOMEServices * salome_services); + virtual ~JobsManager_QT(); + + void delete_job(QString job_name); + void create_job_wizard(); + + virtual void sendEvent(const std::string & action, + const std::string & event_name, + const std::string & job_name, + const std::string & data); + bool event(QEvent * e); + + void write_normal_text(const QString & text); + void write_error_text(const QString & text); + + public slots: + void RefreshJobs(); + void no_auto_refresh(); + void ten_seconds_refresh(); + void thirty_seconds_refresh(); + void one_minute_refresh(); + void five_minutes_refresh(); + void thirty_minutes_refresh(); + void one_hour_refresh(); + + signals: + void new_job_added(const QString & name); + void job_state_changed(const QString & name); + + private: + QPushButton * _load_jobs; + QPushButton * _save_jobs; + QPushButton * _auto_refresh_jobs; + QTimer * _timer; + QTextEdit * _log; + }; + +} + +#endif + + diff --git a/src/genericgui/BL_JobsTable.cxx b/src/genericgui/BL_JobsTable.cxx new file mode 100644 index 0000000..8a1f3fb --- /dev/null +++ b/src/genericgui/BL_JobsTable.cxx @@ -0,0 +1,44 @@ +// Copyright (C) 2009 CEA/DEN, EDF R&D +// +// This library is free software; you can redistribute it and/or +// modify it 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 +// + +#include "BL_JobsTable.hxx" +#include "BL_Traces.hxx" + +BL::JobsTable::JobsTable(QWidget *parent) : QTableView(parent) +{ + DEBTRACE("Creating BL::JobsTable"); + BL_ASSERT(parent); + _parent = parent; + + // Init + setShowGrid(false); + setCornerButtonEnabled(false); + setEditTriggers(QAbstractItemView::NoEditTriggers); + setSelectionBehavior(QAbstractItemView::SelectRows); + setAlternatingRowColors(true); + setSortingEnabled(true); + + QHeaderView * header_view = verticalHeader(); + header_view->setClickable(false); +} + +BL::JobsTable::~JobsTable() +{ + DEBTRACE("Destroying BL::JobsTable"); +} diff --git a/src/genericgui/BL_JobsTable.hxx b/src/genericgui/BL_JobsTable.hxx new file mode 100644 index 0000000..ace8b2f --- /dev/null +++ b/src/genericgui/BL_JobsTable.hxx @@ -0,0 +1,42 @@ +// Copyright (C) 2009 CEA/DEN, EDF R&D +// +// This library is free software; you can redistribute it and/or +// modify it 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 +// + +#ifndef _BL_JOBSTABLE_HXX_ +#define _BL_JOBSTABLE_HXX_ + +#include + +namespace BL +{ + class JobsTable: public QTableView + { + Q_OBJECT + + public: + JobsTable(QWidget *parent); + virtual ~JobsTable(); + + protected: + QWidget* _parent; + + }; +} + +#endif + diff --git a/src/genericgui/BL_MachineCatalog.cxx b/src/genericgui/BL_MachineCatalog.cxx new file mode 100644 index 0000000..eae8ded --- /dev/null +++ b/src/genericgui/BL_MachineCatalog.cxx @@ -0,0 +1,66 @@ +// Copyright (C) 2009 CEA/DEN, EDF R&D +// +// This library is free software; you can redistribute it and/or +// modify it 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 +// + +#include "BL_MachineCatalog.hxx" +#include "BL_Traces.hxx" + +BL::MachineCatalog::MachineCatalog(QWidget *parent, BL::SALOMEServices * salome_services) : QWidget(parent) +{ + DEBTRACE("Creating BL::MachineCatalog"); + BL_ASSERT(parent); + BL_ASSERT(salome_services); + _parent = parent; + _salome_services = salome_services; + + _refresh_button = new QPushButton("Refresh Machine List"); + _refresh_button->show(); + connect(_refresh_button, SIGNAL(clicked()), this, SLOT(refresh_machine_list())); + _machine_files_list = new QListWidget(this); + _machine_files_list->setSelectionMode(QAbstractItemView::NoSelection); + std::list machine_list = _salome_services->getMachineList(); + std::list::iterator it; + for (it = machine_list.begin(); it != machine_list.end(); it++) + { + std::string machine = *it; + _machine_files_list->addItem(QString(machine.c_str())); + } + + QVBoxLayout * mainLayout = new QVBoxLayout(this); + mainLayout->addWidget(_refresh_button); + mainLayout->addWidget(_machine_files_list); + setLayout(mainLayout); +} + +BL::MachineCatalog::~MachineCatalog() +{ + DEBTRACE("Destroying BL::MachineCatalog"); +} + +void +BL::MachineCatalog::refresh_machine_list() +{ + _machine_files_list->clear(); + std::list machine_list = _salome_services->getMachineList(); + std::list::iterator it; + for (it = machine_list.begin(); it != machine_list.end(); it++) + { + std::string machine = *it; + _machine_files_list->addItem(QString(machine.c_str())); + } +} diff --git a/src/genericgui/BL_MachineCatalog.hxx b/src/genericgui/BL_MachineCatalog.hxx new file mode 100644 index 0000000..95355b4 --- /dev/null +++ b/src/genericgui/BL_MachineCatalog.hxx @@ -0,0 +1,54 @@ +// Copyright (C) 2009 CEA/DEN, EDF R&D +// +// This library is free software; you can redistribute it and/or +// modify it 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 +// + +#ifndef _BL_MACHINECATALOG_HXX_ +#define _BL_MACHINECATALOG_HXX_ + +#include + +#include "BL_SALOMEServices.hxx" + +#include +#include + +namespace BL +{ + class MachineCatalog: public QWidget + { + Q_OBJECT + + public: + MachineCatalog(QWidget *parent, BL::SALOMEServices * salome_services); + virtual ~MachineCatalog(); + + public slots: + void refresh_machine_list(); + + protected: + QWidget* _parent; + BL::SALOMEServices * _salome_services; + + QPushButton * _refresh_button; + QListWidget * _machine_files_list; + }; +} + +#endif + + diff --git a/src/genericgui/BL_MainButtons.cxx b/src/genericgui/BL_MainButtons.cxx new file mode 100644 index 0000000..e69de29 diff --git a/src/genericgui/BL_MainButtons.hxx b/src/genericgui/BL_MainButtons.hxx new file mode 100644 index 0000000..e69de29 diff --git a/src/genericgui/BL_QModelManager.cxx b/src/genericgui/BL_QModelManager.cxx new file mode 100644 index 0000000..6412dd2 --- /dev/null +++ b/src/genericgui/BL_QModelManager.cxx @@ -0,0 +1,131 @@ +// Copyright (C) 2009 CEA/DEN, EDF R&D +// +// This library is free software; you can redistribute it and/or +// modify it 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 +// + +#include "BL_QModelManager.hxx" + +BL::QModelManager::QModelManager(QObject * parent, BL::JobsManager_QT * jobs_manager) : QObject(parent) +{ + DEBTRACE("Creating BL::QModelManager"); + BL_ASSERT(jobs_manager); + _jobs_manager = jobs_manager; + + _model = new QStandardItemModel(this); + QStringList headers; + headers << "Job Name" << "Type" << "State" << "Machine"; + _model->setHorizontalHeaderLabels(headers); +} + +BL::QModelManager::~QModelManager() +{ + DEBTRACE("Destroying BL::QModelManager"); +} + +QStandardItemModel * +BL::QModelManager::getModel() +{ + DEBTRACE("getModel BL::QModelManager called"); + + return _model; +} + +void +BL::QModelManager::new_job_added(const QString & name) +{ + BL::Job * job = _jobs_manager->getJob(name.toStdString()); + QStandardItem * new_job_name = new QStandardItem(name); + + QStandardItem * new_job_type; + if (job->getType() == BL::Job::YACS_SCHEMA) + new_job_type = new QStandardItem("YACS_Schema"); + else + new_job_type = new QStandardItem("Command"); + + QStandardItem * new_job_state; + if (job->getState() == BL::Job::CREATED) + new_job_state = new QStandardItem("Created"); + else if (job->getState() == BL::Job::QUEUED) + new_job_state = new QStandardItem("Queued"); + else if (job->getState() == BL::Job::RUNNING) + new_job_state = new QStandardItem("Running"); + else if (job->getState() == BL::Job::PAUSED) + new_job_state = new QStandardItem("Paused"); + else if (job->getState() == BL::Job::ERROR) + new_job_state = new QStandardItem("Error"); + else + new_job_state = new QStandardItem("Finished"); + + QStandardItem * new_job_machine = new QStandardItem(job->getMachine().c_str()); + + int row = _model->rowCount(); + _model->setItem(row, 0, new_job_name); + _model->setItem(row, 1, new_job_type); + _model->setItem(row, 2, new_job_state); + _model->setItem(row, 3, new_job_machine); +} + +void +BL::QModelManager::job_state_changed(const QString & name) +{ + DEBTRACE("BL::QModelManager::job_state_changed received"); + + BL::Job * job = _jobs_manager->getJob(name.toStdString()); + QList item_list = _model->findItems(name); + QStandardItem * job_state_item = _model->item(item_list.at(0)->row(), 2); + + if (job->getState() == BL::Job::CREATED) + job_state_item->setText("Created"); + else if (job->getState() == BL::Job::QUEUED) + job_state_item->setText("Queued"); + else if (job->getState() == BL::Job::RUNNING) + job_state_item->setText("Running"); + else if (job->getState() == BL::Job::PAUSED) + job_state_item->setText("Paused"); + else if (job->getState() == BL::Job::ERROR) + job_state_item->setText("Error"); + else + job_state_item->setText("Finished"); +} + +void +BL::QModelManager::deleteJob(int row) +{ + _model->removeRow(row); +} + +void +BL::QModelManager::job_selected(const QModelIndex & index) +{ + DEBTRACE("BL::QModelManager::job_selected slot"); + QStandardItem * item = _model->itemFromIndex(index); + int row = item->row(); + + // Algo un peu bourrin.... + for (int i = 0; i < _model->rowCount(); i++) + for (int j = 0; j < _model->columnCount(); j++) + { + _model->item(i,j)->setBackground(QBrush(Qt::white)); + _model->item(i,j)->setForeground(QBrush(Qt::black)); + } + + for (int j = 0; j < _model->columnCount(); j++) + { + _model->item(row,j)->setBackground(QBrush(Qt::darkBlue)); + _model->item(row,j)->setForeground(QBrush(Qt::white)); + } +} diff --git a/src/genericgui/BL_QModelManager.hxx b/src/genericgui/BL_QModelManager.hxx new file mode 100644 index 0000000..868d93a --- /dev/null +++ b/src/genericgui/BL_QModelManager.hxx @@ -0,0 +1,56 @@ +// Copyright (C) 2009 CEA/DEN, EDF R&D +// +// This library is free software; you can redistribute it and/or +// modify it 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 +// + +#ifndef _BL_QMODELMANAGER_HXX_ +#define _BL_QMODELMANAGER_HXX_ + +#include + +#include "BL_Job.hxx" +#include "BL_JobsManager_QT.hxx" + +namespace BL{ + + class QModelManager: virtual public QObject + { + Q_OBJECT + + public: + QModelManager(QObject * parent, BL::JobsManager_QT * jobs_manager); + virtual ~QModelManager(); + + QStandardItemModel * getModel(); + + void deleteJob(int row); + + public slots: + void new_job_added(const QString & name); + void job_state_changed(const QString & name); + void job_selected(const QModelIndex & index); + + private: + QStandardItemModel * _model; + BL::JobsManager_QT * _jobs_manager; + + }; + +} + +#endif + diff --git a/src/genericgui/BL_Summary.cxx b/src/genericgui/BL_Summary.cxx new file mode 100644 index 0000000..4cb67fc --- /dev/null +++ b/src/genericgui/BL_Summary.cxx @@ -0,0 +1,137 @@ +// Copyright (C) 2009 CEA/DEN, EDF R&D +// +// This library is free software; you can redistribute it and/or +// modify it 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 +// + +#include "BL_Summary.hxx" +#include "BL_Traces.hxx" + +BL::Summary::Summary(QWidget *parent, BL::JobsManager_QT * jobs_manager) : QWidget(parent) +{ + DEBTRACE("Creating BL::Summary"); + BL_ASSERT(parent); + BL_ASSERT(jobs_manager); + _parent = parent; + _jobs_manager = jobs_manager; + _model = NULL; + + + QLabel * summary_jobs = new QLabel("Jobs Summary:"); + QLabel * total_label = new QLabel("Number of jobs:"); + _total_line = new QLabel; + _total_line->setText("0"); + + QLabel * created_label = new QLabel("Number of created jobs:"); + _created_line = new QLabel; + _created_line->setText("0"); + + QLabel * queued_label = new QLabel("Number of queued jobs:"); + _queued_line = new QLabel; + _queued_line->setText("0"); + + QLabel * running_label = new QLabel("Number of running jobs:"); + _running_line = new QLabel; + _running_line->setText("0"); + + QLabel * finished_label = new QLabel("Number of finished jobs:"); + _finished_line = new QLabel; + _finished_line->setText("0"); + + QFormLayout *mainLayout = new QFormLayout; + mainLayout->insertRow(0, summary_jobs); + mainLayout->insertRow(1, total_label, _total_line); + mainLayout->insertRow(2, created_label, _created_line); + mainLayout->insertRow(3, queued_label, _queued_line); + mainLayout->insertRow(4, running_label, _running_line); + mainLayout->insertRow(5, finished_label, _finished_line); + setLayout(mainLayout); +} + +BL::Summary::~Summary() +{ + DEBTRACE("Destroying BL::Summary"); +} + +void +BL::Summary::setModel(QStandardItemModel * model) +{ + DEBTRACE("Call setModel BL::Summary"); + BL_ASSERT(model); + + _model = model; +} + +void +BL::Summary::rowsInserted(const QModelIndex & parent, int start, int end) +{ + DEBTRACE("BL::Summary::rowsInserted slot"); + updateJobs(); +} + +void +BL::Summary::rowsRemoved(const QModelIndex & parent, int start, int end) +{ + DEBTRACE("BL::Summary::rowsRemoved slot"); + updateJobs(); +} + +void +BL::Summary::itemChanged(QStandardItem * item) +{ + updateJobs(); +} + +void +BL::Summary::updateJobs() +{ + // Total + QVariant row_number = _model->rowCount(); + _total_line->setText(row_number.toString()); + + // New count... + _created_line->setText("0"); + _queued_line->setText("0"); + _running_line->setText("0"); + _finished_line->setText("0"); + + int created_jobs = 0; + int queued_jobs = 0; + int running_jobs = 0; + int finished_jobs = 0; + std::map jobs = _jobs_manager->getJobs(); + std::map::iterator jobs_it; + jobs_it = jobs.begin(); + for(; jobs_it != jobs.end(); jobs_it++) + { + BL::Job * job = jobs_it->second; + BL::Job::State job_state = job->getState(); + if (job_state == BL::Job::CREATED) + created_jobs++; + if (job_state == BL::Job::QUEUED) + queued_jobs++; + if (job_state == BL::Job::RUNNING) + running_jobs++; + if (job_state == BL::Job::FINISHED) + finished_jobs++; + } + + // End + _created_line->setText(QVariant(created_jobs).toString()); + _queued_line->setText(QVariant(queued_jobs).toString()); + _running_line->setText(QVariant(running_jobs).toString()); + _finished_line->setText(QVariant(finished_jobs).toString()); +} diff --git a/src/genericgui/BL_Summary.hxx b/src/genericgui/BL_Summary.hxx new file mode 100644 index 0000000..b972388 --- /dev/null +++ b/src/genericgui/BL_Summary.hxx @@ -0,0 +1,59 @@ +// Copyright (C) 2009 CEA/DEN, EDF R&D +// +// This library is free software; you can redistribute it and/or +// modify it 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 +// + +#ifndef _BL_SUMMARY_HXX_ +#define _BL_SUMMARY_HXX_ + +#include +#include "BL_JobsManager_QT.hxx" + +namespace BL +{ + class Summary: public QWidget + { + Q_OBJECT + + public: + Summary(QWidget *parent, BL::JobsManager_QT * jobs_manager); + virtual ~Summary(); + + void setModel(QStandardItemModel * model); + + void updateJobs(); + + public slots: + void rowsInserted(const QModelIndex & parent, int start, int end); + void rowsRemoved(const QModelIndex & parent, int start, int end); + void itemChanged(QStandardItem * item); + + protected: + QWidget* _parent; + QStandardItemModel * _model; + + BL::JobsManager_QT * _jobs_manager; + QLabel * _total_line; + QLabel * _created_line; + QLabel * _queued_line; + QLabel * _running_line; + QLabel * _finished_line; + }; +} + +#endif + diff --git a/src/genericgui/Makefile.am b/src/genericgui/Makefile.am new file mode 100644 index 0000000..c039365 --- /dev/null +++ b/src/genericgui/Makefile.am @@ -0,0 +1,64 @@ +# Copyright (C) 2009 CEA/DEN, EDF R&D +# +# This library is free software; you can redistribute it and/or +# modify it 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 +# + +libdir = $(prefix)/lib/salome + +lib_LTLIBRARIES = libBL_GenericGui.la + +libBL_GenericGui_la_SOURCES = BL_GenericGui.hxx BL_GenericGui.cxx \ + BL_JobsTable.hxx BL_JobsTable.cxx \ + BL_JobTab.hxx BL_JobTab.cxx \ + BL_Buttons.hxx BL_Buttons.cxx \ + BL_JobsManager_QT.hxx BL_JobsManager_QT.cxx \ + BL_QModelManager.hxx BL_QModelManager.cxx \ + BL_CreateJobWizard.hxx BL_CreateJobWizard.cxx \ + BL_Summary.hxx BL_Summary.cxx \ + BL_MachineCatalog.hxx BL_MachineCatalog.cxx + +nodist_libBL_GenericGui_la_SOURCES = BL_GenericGui_moc.cxx BL_JobsTable_moc.cxx \ + BL_JobTab_moc.cxx \ + BL_Buttons_moc.cxx BL_JobsManager_QT_moc.cxx \ + BL_QModelManager_moc.cxx BL_CreateJobWizard_moc.cxx \ + BL_Summary_moc.cxx BL_MachineCatalog_moc.cxx + +libBL_GenericGui_la_CXXFLAGS = $(qt4_cppflags) \ + -I$(top_srcdir)/src/bases \ + -I$(top_srcdir)/src/engine \ + -I$(KERNEL_ROOT_DIR)/include/salome \ + -I$(top_srcdir)/src/wrappers + +libBL_GenericGui_la_LDFLAGS = $(qt4_ldflags) + +libBL_GenericGui_la_LIBADD = -lQtGui -lQtCore -lQtWebKit \ + $(top_builddir)/src/bases/libBL_Bases.la \ + $(top_builddir)/src/engine/libBL_Engine.la + +SUFFIXES = .hxx _moc.cxx .qrc _qrc.cxx + +.hxx_moc.cxx : + $(QT_MOC) -p . -o $@ $< + +.qrc_qrc.cxx : + $(QT_RCC) -name $(*F) $< -o $@ + +clean-local-qt : + rm -f *_moc.cxx *_qrc.cxx ui_*.h + +clean-local: clean-local-qt + diff --git a/src/salomegui/BL_SalomeGui.cxx b/src/salomegui/BL_SalomeGui.cxx new file mode 100644 index 0000000..5895d94 --- /dev/null +++ b/src/salomegui/BL_SalomeGui.cxx @@ -0,0 +1,85 @@ +// Copyright (C) 2009 CEA/DEN, EDF R&D +// +// This library is free software; you can redistribute it and/or +// modify it 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 + +#include "BL_SalomeGui.hxx" + +BL::SalomeGui::SalomeGui() : MainWindows_SALOME("JobManager"), + SalomeApp_Module("JobManager"), + LightApp_Module("JobManager") +{ + DEBTRACE("Creating BL::SalomeGui"); + _gengui = NULL; +} + +BL::SalomeGui::~SalomeGui() +{ + DEBTRACE("Destroying BL::SalomeGui"); +} + +void +BL::SalomeGui::initialize(CAM_Application* app) +{ + DEBTRACE("Entering in initialize"); + SalomeApp_Module::initialize(app); // MANDATORY -> Otherwise SISEGV... + BL::MainWindows_SALOME::initialize(getApp()); + + _gengui = new BL::GenericGui(this); + _gengui->createActions(); + _gengui->createMenus(); + _gengui->updateButtonsStates(); +} + +bool +BL::SalomeGui::activateModule(SUIT_Study* theStudy) +{ + DEBTRACE("Entering in BL::SalomeGui::activateModule"); + + bool bOk = SalomeApp_Module::activateModule(theStudy); + setMenuShown(true); + + _gengui->showDockWidgets(true); + return bOk; +} + +void +BL::SalomeGui::windows(QMap& theMap) const +{ + DEBTRACE("Entering in BL::SalomeGui::windows"); + theMap.clear(); + theMap.insert(SalomeApp_Application::WT_ObjectBrowser, Qt::LeftDockWidgetArea); +} + +bool +BL::SalomeGui::deactivateModule(SUIT_Study* theStudy) +{ + DEBTRACE("Entering in BL::SalomeGui::deactivateModule"); + + setMenuShown(false); + _gengui->showDockWidgets(false); + bool bOk = SalomeApp_Module::deactivateModule(theStudy); + return bOk; +} + +// --- Export the module +extern "C" +{ + CAM_Module* createModule() + { + return new BL::SalomeGui(); + } +} diff --git a/src/salomegui/BL_SalomeGui.hxx b/src/salomegui/BL_SalomeGui.hxx new file mode 100644 index 0000000..c72142d --- /dev/null +++ b/src/salomegui/BL_SalomeGui.hxx @@ -0,0 +1,54 @@ +// Copyright (C) 2009 CEA/DEN, EDF R&D +// +// This library is free software; you can redistribute it and/or +// modify it 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 + +#ifndef _BL_SALOMEGUI_HXX_ +#define _BL_SALOMEGUI_HXX_ + +#include + +#include +#include + +#include "BL_MainWindows_SALOME.hxx" +#include "BL_GenericGui.hxx" +#include "BL_Traces.hxx" + +namespace BL +{ + class SalomeGui: virtual public MainWindows_SALOME + { + Q_OBJECT + + public: + SalomeGui(); + virtual ~SalomeGui(); + + void initialize( CAM_Application* app); // --- Call only once, at GUI module creation + void windows( QMap& theMap) const; // --- Default windows, called each time the module is activated + + public slots: + bool deactivateModule( SUIT_Study* theStudy); + bool activateModule( SUIT_Study* theStudy); + + protected: + BL::GenericGui * _gengui; + }; + +} + +#endif diff --git a/src/salomegui/Makefile.am b/src/salomegui/Makefile.am new file mode 100644 index 0000000..c916702 --- /dev/null +++ b/src/salomegui/Makefile.am @@ -0,0 +1,78 @@ +# Copyright (C) 2009 CEA/DEN, EDF R&D +# +# This library is free software; you can redistribute it and/or +# modify it 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 +# + +include $(top_srcdir)/src/bases/make_begin.am + +MOC_FILES = BL_SalomeGui_moc.cxx + +lib_LTLIBRARIES = libJOBMANAGER.la + +dist_libJOBMANAGER_la_SOURCES = BL_SalomeGui.hxx BL_SalomeGui.cxx + +nodist_libJOBMANAGER_la_SOURCES = $(MOC_FILES) + +libJOBMANAGER_la_CXXFLAGS = $(qt4_cppflags) \ + $(OMNIORB_INCLUDES) \ + -I$(KERNEL_ROOT_DIR)/include/salome \ + -I$(GUI_ROOT_DIR)/include/salome \ + -I$(top_srcdir)/src/genericgui \ + -I$(top_srcdir)/src/wrappers \ + -I$(top_srcdir)/src/engine \ + -I$(top_srcdir)/src/bases + +libJOBMANAGER_la_LDFLAGS = -L$(GUI_ROOT_DIR)/lib/salome \ + -L$(KERNEL_ROOT_DIR)/lib/salome \ + $(qt4_ldflags) + +libJOBMANAGER_la_LIBADD = $(qt4_libs) \ + $(top_builddir)/src/bases/libBL_Bases.la \ + $(top_builddir)/src/engine/libBL_Engine.la \ + $(top_builddir)/src/genericgui/libBL_GenericGui.la \ + $(top_builddir)/src/wrappers/libBL_Wrappers_SALOME.la \ + -lSalomeApp + +salomeinclude_HEADERS = BL_SalomeGui.hxx + +# resources files +LIBICONS = SalomeApp.xml jobmanager.png +dist_salomeres_DATA = ${ICONS} +ICONS = $(LIBICONS:%=resources/%) + +# -------------------------------------------- +# *.h --> *_moc.cxx +# -------------------------------------------- + +SUFFIXES = .hxx _moc.cxx .qrc _qrc.cxx + +.hxx_moc.cxx : + $(QT_MOC) -p . -o $@ $< + +.qrc_qrc.cxx : + $(QT_RCC) -name $(*F) $< -o $@ + +#.ui.h : +# $(QT_UIC) -o $@ $< + + +clean-local-qt : + rm -f *_moc.cxx *_qrc.cxx + + +clean-local: clean-local-qt + rm -f YACS_msg_en.qm YACS_msg_fr.qm diff --git a/src/salomegui/resources/SalomeApp.xml b/src/salomegui/resources/SalomeApp.xml new file mode 100644 index 0000000..c8e0933 --- /dev/null +++ b/src/salomegui/resources/SalomeApp.xml @@ -0,0 +1,31 @@ + + +
+ + + +
+
+ + +
+
diff --git a/src/salomegui/resources/jobmanager.png b/src/salomegui/resources/jobmanager.png new file mode 100644 index 0000000000000000000000000000000000000000..89d43e8fb50a01d551a59a0a5e9303d3ae033135 GIT binary patch literal 63360 zcmV*cKvTboP)kc8Nd^!TWFo2Ip; zm6>*C`q6H@O#A5QNa8dK-UhI{A8o}1P@kb2g&+h7LaLHV-7nweeCO=TTI-!Z-gjO0 z{!S$UQXH)GoCP*NUg|VoIr} z@^Y8j7usI&JF5V0lW+O<7t`*KTkrqw`_FpRrFP!hxj^gck_zzjYU-80dmFUh57M`R z)b#-E2e4l$y&nJq57tTn8c>kWlVHw71OoU&1oB}&Kp=qVV*u8m)W-l?2l@L^6bI-} zzT?1C{hXItYT?~oVgO%aO}+A+F9XzVfW8%=+W_1KrJ$680-%k81{1r|X&=D4U6?q` z0Fb!DyhbF19=;NU{^6Z422b#^-#a-za0%dkDD^QAJpkZi^ylC8v8QYxzQo%l2Jj`) z)GOclGAR8r5N-$XGTy16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IREn()A~)d8$|%o{`-f|RRDPTn?Jv$3L+Ww#IQ;T2W(#h`#u85=dFwD*(`1F4*)8n zKGg|YIpnhZ$GnWJDJ#xCxB@G_~oO1qrB#AU%4n5^!u*H=r7PV`#=YJ-c|v9c(*b# zLZX0tXpLUKrkxI~+X=U%`5^$`0{m9p?b%;FI&42#wi5xY*x!Eoale5cdiOWhygs`2 ze!rM@Tl3rlFTT&quhz%g+7HuMTzwa6;#Py4TeF?89|8+g{Q$k{b_|WtBc2V!VCfE0!Yx7$E z@`Deb0DqTuB7jTS@4okl-*|8Nz;_N&2hm2P0BjS(THAJer%7t;3P?B~zIOI*+D7en zdp-cb@4x@Z3G^?Zoe1DA?bqLa|Kf&x$48&MC@J)|cFY>s58F1%S{(Md_hTD={;l_& zzjUu^XxMB~P`yS2-n_rk}0_p@(5f&7S!br}9#@?^ZM^E%ncKJmmKcy=~n z+D+K)ChVqGpW=Ed$!VJ8m0(tq-2=iJ_1B78D~gqKMJWZP)LKeGnJeZ}Q09VpE-0m7 zo@ZGv+NSmM^S0ktKlJ7k$nSx@kXSW45x_OGZ~p8b`w77M`ql{mMgSjs=c`X(J`y{6 x0yx>pPIk3y+P}-mPIj{EY9|6X*~xCO{ST{AYjv0WL_h!l002ovPDHLkV1fd>$4dYJ literal 0 HcmV?d00001 diff --git a/src/standalone/Makefile.am b/src/standalone/Makefile.am new file mode 100644 index 0000000..e6c5d75 --- /dev/null +++ b/src/standalone/Makefile.am @@ -0,0 +1,23 @@ +bin_PROGRAMS = jobmanager_gui + +bin_SCRIPTS = start_jobmanager.sh + +jobmanager_gui_SOURCES = main.cxx + +jobmanager_gui_CXXFLAGS = $(qt4_cppflags) \ + -I$(top_srcdir)/src/bases \ + -I$(top_srcdir)/src/engine \ + -I$(KERNEL_ROOT_DIR)/include/salome \ + -I$(top_srcdir)/src/wrappers \ + -I$(top_srcdir)/src/genericgui + +jobmanager_gui_LDFLAGS = $(qt4_ldflags) + +jobmanager_gui_LDADD = -lQtGui -lQtCore \ + $(top_builddir)/src/genericgui/libBL_GenericGui.la \ + $(top_builddir)/src/engine/libBL_Engine.la \ + $(top_builddir)/src/wrappers/libBL_Wrappers_Qt.la \ + @OMNIORB_LIBS@ \ + -L$(KERNEL_ROOT_DIR)/lib/salome -lSalomeLifeCycleCORBA -lSalomeIDLKernel -lSalomeNS + +EXTRA_DIST = start_jobmanager.sh.in diff --git a/src/standalone/main.cxx b/src/standalone/main.cxx new file mode 100644 index 0000000..baf07c6 --- /dev/null +++ b/src/standalone/main.cxx @@ -0,0 +1,21 @@ +#include +#include "BL_GenericGui.hxx" +#include "BL_MainWindows_Qt.hxx" + +int main(int argc, char *argv[]) +{ + QApplication app(argc, argv); + + QMainWindow main_window; + BL::MainWindows_Qt wrapper(&main_window); + BL::GenericGui * main_widget = new BL::GenericGui(&wrapper); + main_widget->createActions(); + main_widget->createMenus(); + main_widget->updateButtonsStates(); + + main_window.setWindowTitle("Standalone JobManager Gui"); + main_window.show(); + + return app.exec(); +} + diff --git a/src/standalone/start_jobmanager.sh.in b/src/standalone/start_jobmanager.sh.in new file mode 100644 index 0000000..4b94938 --- /dev/null +++ b/src/standalone/start_jobmanager.sh.in @@ -0,0 +1,48 @@ +#!/bin/bash +# Copyright (C) 2009 CEA/DEN, EDF R&D +# +# This library is free software; you can redistribute it and/or +# modify it 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 +# + +usage() +{ + echo "Start JobManager GUI outside SALOME GUI" + echo "" + echo "Usage: $(basename $0) -a APPLIPATH [ -h ]" + echo "" + echo " -a APPLIPATH : Application Path where SALOME is launched " + echo " -h : Print this message" + echo "" +} + +while getopts 'a:h' OPTION + do + case $OPTION in + a)APPLIPATH="$OPTARG" ;; + h|?) usage + exit 1 ;; + esac + done + +if test "x${APPLIPATH}" == "x"; then + usage + exit 1 +fi + +JOBMANAGER_INSTALL_DIR=@prefix@/bin + +${APPLIPATH}/runSession ${JOBMANAGER_INSTALL_DIR}/jobmanager_gui diff --git a/src/wrappers/BL_MainWindows_Qt.cxx b/src/wrappers/BL_MainWindows_Qt.cxx new file mode 100644 index 0000000..ea7e5a2 --- /dev/null +++ b/src/wrappers/BL_MainWindows_Qt.cxx @@ -0,0 +1,77 @@ +// Copyright (C) 2009 CEA/DEN, EDF R&D +// +// This library is free software; you can redistribute it and/or +// modify it 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 + +#include "BL_MainWindows_Qt.hxx" + +BL::MainWindows_Qt::MainWindows_Qt(QMainWindow * main_window) +{ + DEBTRACE("Creating BL::MainWindows_Qt"); + BL_ASSERT(main_window); + _main_window = main_window; + _menuId = 0; +} + +BL::MainWindows_Qt::~MainWindows_Qt() +{ + DEBTRACE("Destroying BL::MainWindows_Qt"); +} + +QMainWindow * +BL::MainWindows_Qt::getDockParent() +{ + return _main_window; +} + +QMainWindow * +BL::MainWindows_Qt::getTabParent() +{ + return _main_window; +} + +QAction* +BL::MainWindows_Qt::createAction(const QString& toolTip, + const QIcon& icon, + const QString& menu, + const QString& status, + const int shortCut, + QObject* parent, + bool checkable, + QObject* receiver, + const char* member) +{ + QAction * action = new QAction(icon, menu, parent); + action->setStatusTip(status); + action->setToolTip(toolTip); + if (receiver) + connect(action, SIGNAL(triggered()), receiver, member); + return action; +} + +int +BL::MainWindows_Qt::createTopMenu(const QString & menu_name) +{ + QMenu * new_menu = _main_window->menuBar()->addMenu(menu_name); + _menu_map[getMenuId()] = new_menu; + return 0; +} + +void +BL::MainWindows_Qt::addActionToMenu(QAction * action, int menu_id) +{ + _menu_map[menu_id]->addAction(action); +} diff --git a/src/wrappers/BL_MainWindows_Qt.hxx b/src/wrappers/BL_MainWindows_Qt.hxx new file mode 100644 index 0000000..550d6c5 --- /dev/null +++ b/src/wrappers/BL_MainWindows_Qt.hxx @@ -0,0 +1,58 @@ +// Copyright (C) 2009 CEA/DEN, EDF R&D +// +// This library is free software; you can redistribute it and/or +// modify it 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 + + +#ifndef _BL_MAINWINDOWS_QT_HXX_ +#define _BL_MAINWINDOWS_QT_HXX_ + +#include "BL_MainWindows_Wrap.hxx" +#include + +namespace BL +{ + class MainWindows_Qt : public MainWindows_Wrap, public QObject + { + public: + MainWindows_Qt(QMainWindow * main_window); + virtual ~MainWindows_Qt(); + + virtual QMainWindow * getDockParent(); + virtual QMainWindow * getTabParent(); + + virtual QAction* createAction(const QString& toolTip, + const QIcon& icon, + const QString& menu, + const QString& status, + const int shortCut, + QObject* parent =0, + bool checkable = false, + QObject* receiver =0, + const char* member =0); + + virtual int createTopMenu(const QString & menu_name); + virtual void addActionToMenu(QAction * action, int menu_id); + + protected: + QMainWindow * _main_window; + int _menuId; + int getMenuId() { return _menuId++; } + std::map _menu_map; + }; +} + +#endif diff --git a/src/wrappers/BL_MainWindows_SALOME.cxx b/src/wrappers/BL_MainWindows_SALOME.cxx new file mode 100644 index 0000000..6a604b7 --- /dev/null +++ b/src/wrappers/BL_MainWindows_SALOME.cxx @@ -0,0 +1,100 @@ +// Copyright (C) 2009 CEA/DEN, EDF R&D +// +// This library is free software; you can redistribute it and/or +// modify it 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 + +#include "BL_MainWindows_SALOME.hxx" + +BL::MainWindows_SALOME::MainWindows_SALOME(const QString & module_name) : + SalomeApp_Module(module_name), + LightApp_Module(module_name) +{ + DEBTRACE("Creating BL::MainWindows_SALOME"); + _actionId = 190; +} + +void +BL::MainWindows_SALOME::initialize(SalomeApp_Application * appli) +{ + DEBTRACE("Initialize BL::MainWindows_SALOME"); + BL_ASSERT(appli); + + _appli = appli; + _svm = new SUIT_ViewManager(_appli->activeStudy(), _appli->desktop(), new SUIT_ViewModel()); + _appli->addViewManager(_svm); + _viewWin = _svm->createViewWindow(); + + if (_viewWin && _appli->desktop()) + _viewWin->resize((int)(_appli->desktop()->width() * 0.6), (int)(_appli->desktop()->height() * 0.6 )); +} + +QString +BL::MainWindows_SALOME::engineIOR() const +{ + DEBTRACE("Entering in BL::SalomeGui::engineIOR"); + return _appli->defaultEngineIOR(); +} + +void +BL::MainWindows_SALOME::viewManagers(QStringList& list) const +{ + DEBTRACE("Entering in BL::SalomeGui::viewManagers"); + list.append(_svm->getType()); +} + + +BL::MainWindows_SALOME::~MainWindows_SALOME() +{ + DEBTRACE("Destroying BL::MainWindows_SALOME"); +} + +QMainWindow * +BL::MainWindows_SALOME::getDockParent() +{ + return _appli->desktop(); +} + +QMainWindow * +BL::MainWindows_SALOME::getTabParent() +{ + return _viewWin; +} + +QAction* +BL::MainWindows_SALOME::createAction(const QString& toolTip, + const QIcon& icon, + const QString& menu, + const QString& status, + const int shortCut, + QObject* parent, + bool checkable, + QObject* receiver, + const char* member) +{ + return SalomeApp_Module::createAction(getActionId(), toolTip, icon, menu, status, shortCut, parent, checkable, receiver, member); +} + +int +BL::MainWindows_SALOME::createTopMenu(const QString & menu_name) +{ + return createMenu(menu_name, -1); +} + +void +BL::MainWindows_SALOME::addActionToMenu(QAction * action, int menu_id) +{ + createMenu(action, menu_id); +} diff --git a/src/wrappers/BL_MainWindows_SALOME.hxx b/src/wrappers/BL_MainWindows_SALOME.hxx new file mode 100644 index 0000000..ec2ee35 --- /dev/null +++ b/src/wrappers/BL_MainWindows_SALOME.hxx @@ -0,0 +1,80 @@ +// Copyright (C) 2009 CEA/DEN, EDF R&D +// +// This library is free software; you can redistribute it and/or +// modify it 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 + + +#ifndef _BL_MAINWINDOWS_SALOME_HXX_ +#define _BL_MAINWINDOWS_SALOME_HXX_ + +#include "BL_MainWindows_Wrap.hxx" + +#include +#include + +#include +#include +#include +#include + +namespace BL +{ + class MainWindows_SALOME : virtual public MainWindows_Wrap, + virtual public SalomeApp_Module + { + public: + MainWindows_SALOME(const QString & module_name); + virtual ~MainWindows_SALOME(); + + // mandatory by SalomeApp_Module + virtual QString engineIOR() const; + + // Usefull methods for good integration in SALOME + virtual void viewManagers( QStringList& list) const; // --- On ajoute nos viewManagers et ensuite LigthApp affiche le dernier + + // mandatory by MainWindows_Wrap + virtual QMainWindow * getDockParent(); + virtual QMainWindow * getTabParent(); + + virtual QAction* createAction(const QString& toolTip, + const QIcon& icon, + const QString& menu, + const QString& status, + const int shortCut, + QObject* parent =0, + bool checkable = false, + QObject* receiver =0, + const char* member =0); + + virtual int createTopMenu(const QString & menu_name); + virtual void addActionToMenu(QAction * action, int menu_id); + + // Usefull methods + virtual void initialize(SalomeApp_Application * appli); + + protected: + SalomeApp_Application * _appli; + SalomeApp_Module * _module; + SUIT_ViewManager * _svm; + SUIT_ViewWindow * _viewWin; + + int _actionId; + int getActionId() { return _actionId++; } + }; +} + +#endif + diff --git a/src/wrappers/BL_MainWindows_Wrap.hxx b/src/wrappers/BL_MainWindows_Wrap.hxx new file mode 100644 index 0000000..3d16e98 --- /dev/null +++ b/src/wrappers/BL_MainWindows_Wrap.hxx @@ -0,0 +1,54 @@ +// Copyright (C) 2009 CEA/DEN, EDF R&D +// +// This library is free software; you can redistribute it and/or +// modify it 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 + + +#ifndef _BL_MAINWINDOWS_WRAP_HXX_ +#define _BL_MAINWINDOWS_WRAP_HXX_ + +#include +#include "BL_Traces.hxx" + +namespace BL +{ + class MainWindows_Wrap + { + + public: + MainWindows_Wrap() {} + virtual ~MainWindows_Wrap() {} + + virtual QMainWindow * getDockParent() = 0; + virtual QMainWindow * getTabParent() = 0; + + virtual QAction* createAction(const QString& toolTip, + const QIcon& icon, + const QString& menu, + const QString& status, + const int shortCut, + QObject* parent =0, + bool checkable = false, + QObject* receiver =0, + const char* member =0) = 0; + + virtual int createTopMenu(const QString & menu_name) = 0; + virtual void addActionToMenu(QAction * action, int menu_id) = 0; + + }; +} + +#endif diff --git a/src/wrappers/Makefile.am b/src/wrappers/Makefile.am new file mode 100644 index 0000000..773d02e --- /dev/null +++ b/src/wrappers/Makefile.am @@ -0,0 +1,54 @@ +# Copyright (C) 2009 CEA/DEN, EDF R&D +# +# This library is free software; you can redistribute it and/or +# modify it 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 +# + +libdir = $(prefix)/lib/salome + +lib_LTLIBRARIES = libBL_Wrappers_Qt.la + +if HAS_GUI +lib_LTLIBRARIES += libBL_Wrappers_SALOME.la +endif + +libBL_Wrappers_Qt_la_SOURCES = BL_MainWindows_Wrap.hxx \ + BL_MainWindows_Qt.cxx BL_MainWindows_Qt.hxx + +nodist_libBL_Wrappers_Qt_la_SOURCES = + +libBL_Wrappers_Qt_la_CXXFLAGS = $(qt4_cppflags) -I$(top_srcdir)/src/bases + +libBL_Wrappers_Qt_la_LDFLAGS = $(qt4_ldflags) + +libBL_Wrappers_Qt_la_LIBADD = -lQtGui -lQtCore $(top_builddir)/src/bases/libBL_Bases.la + +########### + +libBL_Wrappers_SALOME_la_SOURCES = BL_MainWindows_Wrap.hxx \ + BL_MainWindows_SALOME.cxx BL_MainWindows_SALOME.hxx + +nodist_libBL_Wrappers_SALOME_la_SOURCES = + +libBL_Wrappers_SALOME_la_CXXFLAGS = $(qt4_cppflags) -I$(top_srcdir)/src/bases \ + $(OMNIORB_INCLUDES) \ + -I$(KERNEL_ROOT_DIR)/include/salome \ + -I$(GUI_ROOT_DIR)/include/salome + +libBL_Wrappers_SALOME_la_LDFLAGS = $(qt4_ldflags) + +libBL_Wrappers_SALOME_la_LIBADD = -lQtGui -lQtCore $(top_builddir)/src/bases/libBL_Bases.la + -- 2.30.2