From: admin Date: Wed, 12 Oct 2005 12:11:43 +0000 (+0000) Subject: This commit was generated by cvs2git to create tag X-Git-Tag: BR-D5-38-2003_D2005-12-10 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=b3472df518bb45fdd8cce2bb85a0b033070028df;p=modules%2Fvisu.git This commit was generated by cvs2git to create tag 'BR-D5-38-2003_D2005-12-10'. Sprout from BR-D5-38-2003 2005-10-12 12:11:42 UTC ouv '*** empty log message ***' Delete: LICENCE adm_local/unix/config_files/check_GUI.m4 adm_local/unix/config_files/check_Med.m4 adm_local/unix/make_omniorb.in configure.in.base doc/Makefile.in doc/salome/VISU_index.html doc/salome/gui/Makefile.in doc/salome/gui/VISU/animation.gif doc/salome/gui/VISU/createfieldprsnt.gif doc/salome/gui/VISU/createpresent.gif doc/salome/gui/VISU/createtable.gif doc/salome/gui/VISU/i_blue.jpg doc/salome/gui/VISU/image15.gif doc/salome/gui/VISU/image16.gif doc/salome/gui/VISU/image17.gif doc/salome/gui/VISU/image19.jpg doc/salome/gui/VISU/image20.jpg doc/salome/gui/VISU/image21.jpg doc/salome/gui/VISU/importmed.gif doc/salome/gui/VISU/launchvisu.gif doc/salome/gui/VISU/more.jpg doc/salome/gui/VISU/note1.gif doc/salome/gui/VISU/pics/animatdef.jpg doc/salome/gui/VISU/pics/animation.jpg doc/salome/gui/VISU/pics/animationparam.jpg doc/salome/gui/VISU/pics/begining.jpg doc/salome/gui/VISU/pics/cellsel.jpg doc/salome/gui/VISU/pics/cellselection.jpg doc/salome/gui/VISU/pics/cutlinesicn.jpg doc/salome/gui/VISU/pics/cutlinesicon.jpg doc/salome/gui/VISU/pics/cutlinesprsnt.jpg doc/salome/gui/VISU/pics/cutplpresent.jpg doc/salome/gui/VISU/pics/defshapeicon.jpg doc/salome/gui/VISU/pics/display.jpg doc/salome/gui/VISU/pics/display1.jpg doc/salome/gui/VISU/pics/end.jpg doc/salome/gui/VISU/pics/iso.jpg doc/salome/gui/VISU/pics/isosurf.jpg doc/salome/gui/VISU/pics/next.jpg doc/salome/gui/VISU/pics/points.jpg doc/salome/gui/VISU/pics/pointselection.jpg doc/salome/gui/VISU/pics/previous.jpg doc/salome/gui/VISU/pics/run.jpg doc/salome/gui/VISU/pics/scalarmapicon.jpg doc/salome/gui/VISU/pics/scalingicon.jpg doc/salome/gui/VISU/pics/selection1.jpg doc/salome/gui/VISU/pics/selmode.jpg doc/salome/gui/VISU/pics/shrink.jpg doc/salome/gui/VISU/pics/speed.jpg doc/salome/gui/VISU/pics/streamlinesicon.jpg doc/salome/gui/VISU/pics/streamlinesprsnt.jpg doc/salome/gui/VISU/pics/surface.jpg doc/salome/gui/VISU/pics/vecticon.jpg doc/salome/gui/VISU/pics/vectorsprsnt.jpg doc/salome/gui/VISU/pics/visuicon.jpg doc/salome/gui/VISU/pics/wireframe.jpg doc/salome/gui/VISU/ss_btn_related_topics.gif doc/salome/gui/VISU/texture_horiz_ltbluebubbles.jpg doc/salome/gui/VISU/tip1.gif doc/salome/gui/VISU/whestart.ico doc/salome/gui/VISU/whgdata/whexpbar.gif doc/salome/gui/VISU/whrstart.ico doc/salome/gui/VISU/whstart.ico doc/salome/gui/VISU/wht_fts_h.gif doc/salome/gui/VISU/wht_fts_n.gif doc/salome/gui/VISU/wht_glo_h.gif doc/salome/gui/VISU/wht_glo_n.gif doc/salome/gui/VISU/wht_go.gif doc/salome/gui/VISU/wht_hide.gif doc/salome/gui/VISU/wht_idx_h.gif doc/salome/gui/VISU/wht_idx_n.gif doc/salome/gui/VISU/wht_logo1.gif doc/salome/gui/VISU/wht_logo2.gif doc/salome/gui/VISU/wht_next.gif doc/salome/gui/VISU/wht_next_g.gif doc/salome/gui/VISU/wht_prev.gif doc/salome/gui/VISU/wht_prev_g.gif doc/salome/gui/VISU/wht_spac.gif doc/salome/gui/VISU/wht_sync.gif doc/salome/gui/VISU/wht_tab0.gif doc/salome/gui/VISU/wht_tab1.gif doc/salome/gui/VISU/wht_tab2.gif doc/salome/gui/VISU/wht_tab3.gif doc/salome/gui/VISU/wht_tab4.gif doc/salome/gui/VISU/wht_tab5.gif doc/salome/gui/VISU/wht_tab6.gif doc/salome/gui/VISU/wht_tab7.gif doc/salome/gui/VISU/wht_tab8.gif doc/salome/gui/VISU/wht_toc1.gif doc/salome/gui/VISU/wht_toc2.gif doc/salome/gui/VISU/wht_toc3.gif doc/salome/gui/VISU/wht_toc4.gif doc/salome/gui/VISU/wht_toc_h.gif doc/salome/gui/VISU/wht_toc_n.gif doc/salome/gui/VISU/wht_ws.gif doc/salome/gui/VISU/wht_ws_g.gif doc/salome/tui/Makefile.in doc/salome/tui/VISU/HTML/VISU_Gen.html doc/salome/tui/VISU/doxyfile doc/salome/tui/VISU/sources/Application-About.png doc/salome/tui/VISU/sources/Application-About1.jpg doc/salome/tui/VISU/sources/application.gif doc/salome/tui/VISU/sources/application.jpg doc/salome/tui/VISU/sources/bg_salome.gif doc/salome/tui/VISU/sources/logocorp.gif doc/salome/tui/VISU/sources/myheader.html doc/salome/tui/VISU/sources/occ.gif doc/salome/tui/VISU/sources/static/DataStruct.gif doc/salome/tui/VISU/sources/static/PrsObj.gif doc/salome/tui/VISU/sources/static/View.gif doc/salome/tui/VISU/sources/static/doxygen.css doc/salome/tui/VISU/sources/static/examples_VISU.html doc/salome/tui/VISU/sources/static/overview_VISU.html doc/salome/tui/VISU/sources/static/page2.html doc/salome/tui/VISU/sources/static/treeview.js idl/Makefile.in resources/ModuleVisu.png resources/VISU.config resources/VISU_en.xml resources/VISU_fr.xml resources/Visu_anim.png resources/Visu_cutlines.png resources/Visu_cutplane.png resources/Visu_deformed.png resources/Visu_deformed_anim.png resources/Visu_eraseall.png resources/Visu_graduated_axes.png resources/Visu_isosurfaces.png resources/Visu_plot2d.png resources/Visu_plot3d.png resources/Visu_points.png resources/Visu_sameas.png resources/Visu_scalars.png resources/Visu_scalars_anim.png resources/Visu_scaling.png resources/Visu_selectall.png resources/Visu_selectionactor.png resources/Visu_selectioncell.png resources/Visu_selectionedge.png resources/Visu_selectionpoint.png resources/Visu_selectonly.png resources/Visu_streamlines.png resources/Visu_surface.png resources/Visu_tree_visu.png resources/Visu_vectors.png resources/Visu_wireframe.png src/ENGINE/Makefile.in src/GUITOOLS/Makefile.in src/GUITOOLS/VisuGUI_TableDlg.cxx src/GUITOOLS/VisuGUI_TableDlg.h src/OBJECT/VISU_MeshAct.h src/OBJECT/VISU_VectorsAct.cxx src/OBJECT/VISU_VectorsAct.h src/PIPELINE/VISU_CutLinesPL.hxx src/PIPELINE/VISU_CutPlanesPL.hxx src/PIPELINE/VISU_DeformedShapePL.hxx src/PIPELINE/VISU_Extractor.hxx src/PIPELINE/VISU_FieldTransform.cxx src/PIPELINE/VISU_FieldTransform.hxx src/PIPELINE/VISU_IsoSurfacesPL.hxx src/PIPELINE/VISU_MeshPL.cxx src/PIPELINE/VISU_MeshPL.hxx src/PIPELINE/VISU_PipeLineUtils.cxx src/PIPELINE/VISU_PipeLineUtils.hxx src/PIPELINE/VISU_Plot3DPL.hxx src/PIPELINE/VISU_ScalarBarActor.cxx src/PIPELINE/VISU_ScalarBarActor.hxx src/PIPELINE/VISU_StreamLinesPL.hxx src/PIPELINE/VISU_UsedPointsFilter.cxx src/PIPELINE/VISU_UsedPointsFilter.hxx src/PIPELINE/VISU_VectorsPL.hxx src/VISUGUI/VISU_icons.po src/VISUGUI/VISU_images.po src/VISUGUI/VisuGUI_CursorDlg.cxx src/VISUGUI/VisuGUI_CursorDlg.h src/VISUGUI/VisuGUI_CutPlanesDlg.h src/VISUGUI/VisuGUI_EditContainerDlg.cxx src/VISUGUI/VisuGUI_EditContainerDlg.h src/VISUGUI/VisuGUI_FileDlg.cxx src/VISUGUI/VisuGUI_FileDlg.h src/VISUGUI/VisuGUI_NameDlg.cxx src/VISUGUI/VisuGUI_NameDlg.h src/VISUGUI/VisuGUI_OffsetDlg.cxx src/VISUGUI/VisuGUI_Plot3DDlg.cxx src/VISUGUI/VisuGUI_Plot3DDlg.h src/VISUGUI/VisuGUI_SweepPrefDlg.cxx src/VISUGUI/VisuGUI_SweepPrefDlg.h src/VISUGUI/VisuGUI_TimeAnimation.h src/VISU_I/VISU_Mesh_i.hh src/VISU_I/VISU_PrsObject_i.cc src/VISU_I/VISU_PrsObject_i.hh src/VISU_I/VISU_Result_i.hh src/VISU_I/VISU_Table_i.cc src/VISU_I/VISU_Table_i.hh src/VISU_I/VISU_TimeAnimation.h src/VISU_I/VISU_ViewManager_i.hh src/VISU_SWIG/VISU_Gen_s.hh src/VISU_SWIG/VISU_shared_modules.py src/VISU_SWIG/batch_test_events.py src/VISU_SWIG/batchmode_visu.py src/VISU_SWIG/batchmode_visu_table.py src/VISU_SWIG/batchmode_visu_view.py src/VISU_SWIG/libVISU_Swig.i src/VISU_SWIG/test_events.py src/VISU_SWIG/visu_big_table.py src/VISU_SWIG/visu_gui.py src/VISU_SWIG/visu_split_views.py src/VISU_SWIG/visu_table.py src/VISU_SWIG/visu_view.py --- diff --git a/LICENCE b/LICENCE deleted file mode 100644 index b1e3f5a2..00000000 --- a/LICENCE +++ /dev/null @@ -1,504 +0,0 @@ - GNU LESSER GENERAL PUBLIC LICENSE - Version 2.1, February 1999 - - Copyright (C) 1991, 1999 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. - -[This is the first released version of the Lesser GPL. It also counts - as the successor of the GNU Library Public License, version 2, hence - the version number 2.1.] - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -Licenses are intended to guarantee your freedom to share and change -free software--to make sure the software is free for all its users. - - This license, the Lesser General Public License, applies to some -specially designated software packages--typically libraries--of the -Free Software Foundation and other authors who decide to use it. You -can use it too, but we suggest you first think carefully about whether -this license or the ordinary General Public License is the better -strategy to use in any particular case, based on the explanations below. - - When we speak of free software, we are referring to freedom of use, -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 and use pieces of -it in new free programs; and that you are informed that you can do -these things. - - To protect your rights, we need to make restrictions that forbid -distributors to deny you these rights or to ask you to surrender these -rights. These restrictions translate to certain responsibilities for -you if you distribute copies of the library or if you modify it. - - For example, if you distribute copies of the library, whether gratis -or for a fee, you must give the recipients all the rights that we gave -you. You must make sure that they, too, receive or can get the source -code. If you link other code with the library, you must provide -complete object files to the recipients, so that they can relink them -with the library after making changes to the library and recompiling -it. And you must show them these terms so they know their rights. - - We protect your rights with a two-step method: (1) we copyright the -library, and (2) we offer you this license, which gives you legal -permission to copy, distribute and/or modify the library. - - To protect each distributor, we want to make it very clear that -there is no warranty for the free library. Also, if the library is -modified by someone else and passed on, the recipients should know -that what they have is not the original version, so that the original -author's reputation will not be affected by problems that might be -introduced by others. - - Finally, software patents pose a constant threat to the existence of -any free program. We wish to make sure that a company cannot -effectively restrict the users of a free program by obtaining a -restrictive license from a patent holder. Therefore, we insist that -any patent license obtained for a version of the library must be -consistent with the full freedom of use specified in this license. - - Most GNU software, including some libraries, is covered by the -ordinary GNU General Public License. This license, the GNU Lesser -General Public License, applies to certain designated libraries, and -is quite different from the ordinary General Public License. We use -this license for certain libraries in order to permit linking those -libraries into non-free programs. - - When a program is linked with a library, whether statically or using -a shared library, the combination of the two is legally speaking a -combined work, a derivative of the original library. The ordinary -General Public License therefore permits such linking only if the -entire combination fits its criteria of freedom. The Lesser General -Public License permits more lax criteria for linking other code with -the library. - - We call this license the "Lesser" General Public License because it -does Less to protect the user's freedom than the ordinary General -Public License. It also provides other free software developers Less -of an advantage over competing non-free programs. These disadvantages -are the reason we use the ordinary General Public License for many -libraries. However, the Lesser license provides advantages in certain -special circumstances. - - For example, on rare occasions, there may be a special need to -encourage the widest possible use of a certain library, so that it becomes -a de-facto standard. To achieve this, non-free programs must be -allowed to use the library. A more frequent case is that a free -library does the same job as widely used non-free libraries. In this -case, there is little to gain by limiting the free library to free -software only, so we use the Lesser General Public License. - - In other cases, permission to use a particular library in non-free -programs enables a greater number of people to use a large body of -free software. For example, permission to use the GNU C Library in -non-free programs enables many more people to use the whole GNU -operating system, as well as its variant, the GNU/Linux operating -system. - - Although the Lesser General Public License is Less protective of the -users' freedom, it does ensure that the user of a program that is -linked with the Library has the freedom and the wherewithal to run -that program using a modified version of the Library. - - The precise terms and conditions for copying, distribution and -modification follow. Pay close attention to the difference between a -"work based on the library" and a "work that uses the library". The -former contains code derived from the library, whereas the latter must -be combined with the library in order to run. - - GNU LESSER GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License Agreement applies to any software library or other -program which contains a notice placed by the copyright holder or -other authorized party saying it may be distributed under the terms of -this Lesser General Public License (also called "this License"). -Each licensee is addressed as "you". - - A "library" means a collection of software functions and/or data -prepared so as to be conveniently linked with application programs -(which use some of those functions and data) to form executables. - - The "Library", below, refers to any such software library or work -which has been distributed under these terms. A "work based on the -Library" means either the Library or any derivative work under -copyright law: that is to say, a work containing the Library or a -portion of it, either verbatim or with modifications and/or translated -straightforwardly into another language. (Hereinafter, translation is -included without limitation in the term "modification".) - - "Source code" for a work means the preferred form of the work for -making modifications to it. For a library, 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 library. - - Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running a program using the Library is not restricted, and output from -such a program is covered only if its contents constitute a work based -on the Library (independent of the use of the Library in a tool for -writing it). Whether that is true depends on what the Library does -and what the program that uses the Library does. - - 1. You may copy and distribute verbatim copies of the Library's -complete 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 distribute a copy of this License along with the -Library. - - 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 Library or any portion -of it, thus forming a work based on the Library, 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) The modified work must itself be a software library. - - b) You must cause the files modified to carry prominent notices - stating that you changed the files and the date of any change. - - c) You must cause the whole of the work to be licensed at no - charge to all third parties under the terms of this License. - - d) If a facility in the modified Library refers to a function or a - table of data to be supplied by an application program that uses - the facility, other than as an argument passed when the facility - is invoked, then you must make a good faith effort to ensure that, - in the event an application does not supply such function or - table, the facility still operates, and performs whatever part of - its purpose remains meaningful. - - (For example, a function in a library to compute square roots has - a purpose that is entirely well-defined independent of the - application. Therefore, Subsection 2d requires that any - application-supplied function or table used by this function must - be optional: if the application does not supply it, the square - root function must still compute square roots.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Library, -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 Library, 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 Library. - -In addition, mere aggregation of another work not based on the Library -with the Library (or with a work based on the Library) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may opt to apply the terms of the ordinary GNU General Public -License instead of this License to a given copy of the Library. To do -this, you must alter all the notices that refer to this License, so -that they refer to the ordinary GNU General Public License, version 2, -instead of to this License. (If a newer version than version 2 of the -ordinary GNU General Public License has appeared, then you can specify -that version instead if you wish.) Do not make any other change in -these notices. - - Once this change is made in a given copy, it is irreversible for -that copy, so the ordinary GNU General Public License applies to all -subsequent copies and derivative works made from that copy. - - This option is useful when you wish to copy part of the code of -the Library into a program that is not a library. - - 4. You may copy and distribute the Library (or a portion or -derivative of it, under Section 2) in object code or executable form -under the terms of Sections 1 and 2 above provided that you 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. - - If distribution of 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 satisfies the requirement to -distribute the source code, even though third parties are not -compelled to copy the source along with the object code. - - 5. A program that contains no derivative of any portion of the -Library, but is designed to work with the Library by being compiled or -linked with it, is called a "work that uses the Library". Such a -work, in isolation, is not a derivative work of the Library, and -therefore falls outside the scope of this License. - - However, linking a "work that uses the Library" with the Library -creates an executable that is a derivative of the Library (because it -contains portions of the Library), rather than a "work that uses the -library". The executable is therefore covered by this License. -Section 6 states terms for distribution of such executables. - - When a "work that uses the Library" uses material from a header file -that is part of the Library, the object code for the work may be a -derivative work of the Library even though the source code is not. -Whether this is true is especially significant if the work can be -linked without the Library, or if the work is itself a library. The -threshold for this to be true is not precisely defined by law. - - If such an object file uses only numerical parameters, data -structure layouts and accessors, and small macros and small inline -functions (ten lines or less in length), then the use of the object -file is unrestricted, regardless of whether it is legally a derivative -work. (Executables containing this object code plus portions of the -Library will still fall under Section 6.) - - Otherwise, if the work is a derivative of the Library, you may -distribute the object code for the work under the terms of Section 6. -Any executables containing that work also fall under Section 6, -whether or not they are linked directly with the Library itself. - - 6. As an exception to the Sections above, you may also combine or -link a "work that uses the Library" with the Library to produce a -work containing portions of the Library, and distribute that work -under terms of your choice, provided that the terms permit -modification of the work for the customer's own use and reverse -engineering for debugging such modifications. - - You must give prominent notice with each copy of the work that the -Library is used in it and that the Library and its use are covered by -this License. You must supply a copy of this License. If the work -during execution displays copyright notices, you must include the -copyright notice for the Library among them, as well as a reference -directing the user to the copy of this License. Also, you must do one -of these things: - - a) Accompany the work with the complete corresponding - machine-readable source code for the Library including whatever - changes were used in the work (which must be distributed under - Sections 1 and 2 above); and, if the work is an executable linked - with the Library, with the complete machine-readable "work that - uses the Library", as object code and/or source code, so that the - user can modify the Library and then relink to produce a modified - executable containing the modified Library. (It is understood - that the user who changes the contents of definitions files in the - Library will not necessarily be able to recompile the application - to use the modified definitions.) - - b) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (1) uses at run time a - copy of the library already present on the user's computer system, - rather than copying library functions into the executable, and (2) - will operate properly with a modified version of the library, if - the user installs one, as long as the modified version is - interface-compatible with the version that the work was made with. - - c) Accompany the work with a written offer, valid for at - least three years, to give the same user the materials - specified in Subsection 6a, above, for a charge no more - than the cost of performing this distribution. - - d) If distribution of the work is made by offering access to copy - from a designated place, offer equivalent access to copy the above - specified materials from the same place. - - e) Verify that the user has already received a copy of these - materials or that you have already sent this user a copy. - - For an executable, the required form of the "work that uses the -Library" must include any data and utility programs needed for -reproducing the executable from it. However, as a special exception, -the materials to be 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. - - It may happen that this requirement contradicts the license -restrictions of other proprietary libraries that do not normally -accompany the operating system. Such a contradiction means you cannot -use both them and the Library together in an executable that you -distribute. - - 7. You may place library facilities that are a work based on the -Library side-by-side in a single library together with other library -facilities not covered by this License, and distribute such a combined -library, provided that the separate distribution of the work based on -the Library and of the other library facilities is otherwise -permitted, and provided that you do these two things: - - a) Accompany the combined library with a copy of the same work - based on the Library, uncombined with any other library - facilities. This must be distributed under the terms of the - Sections above. - - b) Give prominent notice with the combined library of the fact - that part of it is a work based on the Library, and explaining - where to find the accompanying uncombined form of the same work. - - 8. You may not copy, modify, sublicense, link with, or distribute -the Library except as expressly provided under this License. Any -attempt otherwise to copy, modify, sublicense, link with, or -distribute the Library 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. - - 9. 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 Library or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Library (or any work based on the -Library), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Library or works based on it. - - 10. Each time you redistribute the Library (or any work based on the -Library), the recipient automatically receives a license from the -original licensor to copy, distribute, link with or modify the Library -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 with -this License. - - 11. 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 Library at all. For example, if a patent -license would not permit royalty-free redistribution of the Library 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 Library. - -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. - - 12. If the distribution and/or use of the Library is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Library 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. - - 13. The Free Software Foundation may publish revised and/or new -versions of the Lesser 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 Library -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 Library does not specify a -license version number, you may choose any version ever published by -the Free Software Foundation. - - 14. If you wish to incorporate parts of the Library into other free -programs whose distribution conditions are incompatible with these, -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 - - 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO -WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. -EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR -OTHER PARTIES PROVIDE THE LIBRARY "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 -LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. 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 LIBRARY 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 -LIBRARY (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 LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), 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 Libraries - - If you develop a new library, and you want it to be of the greatest -possible use to the public, we recommend making it free software that -everyone can redistribute and change. You can do so by permitting -redistribution under these terms (or, alternatively, under the terms of the -ordinary General Public License). - - To apply these terms, attach the following notices to the library. 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 library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -Also add information on how to contact you by electronic and paper mail. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the library, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the - library `Frob' (a library for tweaking knobs) written by James Random Hacker. - - , 1 April 1990 - Ty Coon, President of Vice - -That's all there is to it! - - diff --git a/adm_local/unix/config_files/check_GUI.m4 b/adm_local/unix/config_files/check_GUI.m4 deleted file mode 100755 index d2c8eb8a..00000000 --- a/adm_local/unix/config_files/check_GUI.m4 +++ /dev/null @@ -1,61 +0,0 @@ -# Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -# -# This library is free software; you can redistribute it and/or -# modify it 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org -# -#------------------------------------------------------------ -# Check availability of Salome binary distribution -# -# Author : Marc Tajchman (CEA, 2002) -#------------------------------------------------------------ - -AC_DEFUN([CHECK_SALOME_GUI],[ - -AC_CHECKING(for SalomeGUI) - -SalomeGUI_ok=yes - -AC_ARG_WITH(gui, - --with-salome_gui=DIR root directory path of SALOME GUI installation, - SALOME_GUI_DIR="$withval",SALOME_GUI_DIR="") - -if test "x$SALOME_GUI_DIR" = "x" ; then - if test "x$GUI_ROOT_DIR" != "x" ; then - SALOME_GUI_DIR=$GUI_ROOT_DIR - else - # search Salome binaries in PATH variable - AC_PATH_PROG(TEMP, libSalomeApp.so) - if test "x$TEMP" != "x" ; then - SALOME_GUI_DIR=`dirname $TEMP` - else - fi - fi -fi - -if test -f ${SALOME_GUI_DIR}/lib/salome/libSalomeApp.so ; then - SalomeGUI_ok=yes - AC_MSG_RESULT(Using SALOME GUI distribution in ${SALOME_GUI_DIR}) - GUI_ROOT_DIR=${SALOME_GUI_DIR} - AC_SUBST(GUI_ROOT_DIR) -else - AC_MSG_WARN("Cannot find compiled SALOME GUI distribution") -fi - -AC_MSG_RESULT(for SALOME GUI: $SalomeGUI_ok) - -])dnl - diff --git a/adm_local/unix/config_files/check_Med.m4 b/adm_local/unix/config_files/check_Med.m4 deleted file mode 100644 index 727bf438..00000000 --- a/adm_local/unix/config_files/check_Med.m4 +++ /dev/null @@ -1,45 +0,0 @@ -# Check availability of Med binary distribution -# -# Author : Nicolas REJNERI (OPEN CASCADE, 2003) -# - -AC_DEFUN([CHECK_MED],[ - -AC_CHECKING(for Med) - -Med_ok=no - -AC_ARG_WITH(med, - [ --with-med=DIR root directory path of MED installation ], - MED_DIR="$withval",MED_DIR="") - -if test "x$MED_DIR" == "x" ; then - -# no --with-med-dir option used - - if test "x$MED_ROOT_DIR" != "x" ; then - - # MED_ROOT_DIR environment variable defined - MED_DIR=$MED_ROOT_DIR - - fi -# -fi - -if test -f ${MED_DIR}/idl/salome/MED.idl ; then - Med_ok=yes - AC_MSG_RESULT(Using Med module distribution in ${MED_DIR}) - - if test "x$MED_ROOT_DIR" == "x" ; then - MED_ROOT_DIR=${MED_DIR} - fi - AC_SUBST(MED_ROOT_DIR) - -else - AC_MSG_WARN("Cannot find Med module sources") -fi - -AC_MSG_RESULT(for Med: $Med_ok) - -])dnl - diff --git a/adm_local/unix/make_omniorb.in b/adm_local/unix/make_omniorb.in deleted file mode 100644 index 7caf4b7c..00000000 --- a/adm_local/unix/make_omniorb.in +++ /dev/null @@ -1,59 +0,0 @@ -#======================================================================= -# Begin specific part to omniorb -# (include from file adm/unix/make_omniorb generated by -# adm/unix/make_omniorb.in) -#======================================================================= -# -* Makefile *- -# -# Author : Patrick GOLDBRONN (CEA) -# Date : 29/06/2001 -# $Header$ -# - -# Client and server object are the same with omniorb -# There are one header file and one source file generate - -#IDLOBJ=$(IDLSRC:%.idl=%$(IDL_CLN_OBJ)) - -# dependancies between idl and it's generated files -%$(OMNIORB_IDL_CLN_CXX) %$(OMNIORB_IDL_CLN_H): ${KERNEL_ROOT_DIR}/idl/salome/%.idl - $(OMNIORB_IDL) $(IDLCXXFLAGS) $(OMNIORB_IDLCXXFLAGS) $< - -%$(OMNIORB_IDL_CLN_CXX) %$(OMNIORB_IDL_CLN_H): ${GUI_ROOT_DIR}/idl/salome/%.idl - $(OMNIORB_IDL) $(IDLCXXFLAGS) $(OMNIORB_IDLCXXFLAGS) $< - -%$(OMNIORB_IDL_CLN_CXX) %$(OMNIORB_IDL_CLN_H): ${MED_ROOT_DIR}/idl/salome/%.idl - $(OMNIORB_IDL) $(IDLCXXFLAGS) $(OMNIORB_IDLCXXFLAGS) $< - -%$(OMNIORB_IDL_CLN_CXX) %$(OMNIORB_IDL_CLN_H): ${top_srcdir}/idl/%.idl - $(OMNIORB_IDL) $(IDLCXXFLAGS) $(OMNIORB_IDLCXXFLAGS) $< - -# dependncies between idl files -depend_idl: .depidl - -# we use cpp to generate dependencies between idl files. -# we change cpp output to keep only idl file and transform it to get a suitable rule -.depidl: $(IDL_FILES) - @touch $@ - @for dep in $? dummy; do \ - if [ $$dep != "dummy" ]; then \ - echo Building dependencies for $$dep; \ - basedep=`basename $$dep .idl`; \ - header="$$basedep"$(IDL_CLN_H); \ - sed '\%^'"$$header"':%,\%[^\\]$$%d' <$@ >$@- && mv $@- $@; \ - $(CPP) $(C_DEPEND_FLAG) -I$(srcdir) $$dep 2>/dev/null | \ - sed `echo "s%$$basedep\\.idl%$$header:%g"` | \ - sed 's% $(srcdir)/% %g' | \ - sed 's% $(top_srcdir)/% %g' | \ - sed 's% $(top_builddir)/% %g' | \ - sed 's%^.*:\.o: *%%' | sed 's%^ *\\ *%%'| sed 's%^ *\(.*\):%\1:%' | \ - sed 's/\.idl/$(IDL_CLN_H)/' >>$@; \ - echo '' >>$@; \ - fi; \ - done ; - --include .depidl - -#======================================================================= -# End specific part to omniorb -#======================================================================= diff --git a/configure.in.base b/configure.in.base deleted file mode 100644 index 1396ae1e..00000000 --- a/configure.in.base +++ /dev/null @@ -1,392 +0,0 @@ -# -# PLEASE DO NOT MODIFY configure.in FILE -# -# ALL CHANGES WILL BE DISCARDED BY THE NEXT -# build_configure COMMAND -# -# CHANGES MUST BE MADE IN configure.in.base FILE -# -# -# Author : Marc Tajchman (CEA) -# Date : 28/06/2001 -# Modified by : Patrick GOLDBRONN (CEA) -# Modified by : Marc Tajchman (CEA) -# -# Created from configure.in.base -# - -AC_INIT(src) -AC_CONFIG_AUX_DIR(${KERNEL_ROOT_DIR}/salome_adm/unix/config_files) -AC_CANONICAL_HOST - -PACKAGE=salome -AC_SUBST(PACKAGE) - -VERSION=0.0.1 -AC_SUBST(VERSION) - -dnl -dnl Initialize source and build root directories -dnl - -ROOT_BUILDDIR=`pwd` -ROOT_SRCDIR=`echo $0 | sed -e "s,[[^/]]*$,,;s,/$,,;s,^$,.,"` -cd $ROOT_SRCDIR -ROOT_SRCDIR=`pwd` -cd $ROOT_BUILDDIR - -AC_SUBST(ROOT_SRCDIR) -AC_SUBST(ROOT_BUILDDIR) - -echo -echo Source root directory : $ROOT_SRCDIR -echo Build root directory : $ROOT_BUILDDIR -echo -echo - -if test -z "$AR"; then - AC_CHECK_PROGS(AR,ar xar,:,$PATH) -fi -AC_SUBST(AR) - -dnl Export the AR macro so that it will be placed in the libtool file -dnl correctly. -export AR - -echo -echo --------------------------------------------- -echo testing make -echo --------------------------------------------- -echo - -AC_PROG_MAKE_SET -AC_PROG_INSTALL -dnl -dnl libtool macro check for CC, LD, NM, LN_S, RANLIB, STRIP + pour les librairies dynamiques ! - -AC_ENABLE_DEBUG(yes) -AC_DISABLE_PRODUCTION - -echo --------------------------------------------- -echo testing libtool -echo --------------------------------------------- - -dnl first, we set static to no! -dnl if we want it, use --enable-static -AC_ENABLE_STATIC(no) - -AC_LIBTOOL_DLOPEN -AC_PROG_LIBTOOL - -dnl Fix up the INSTALL macro if it s a relative path. We want the -dnl full-path to the binary instead. -case "$INSTALL" in - *install-sh*) - INSTALL='\${KERNEL_ROOT_DIR}'/salome_adm/unix/config_files/install-sh - ;; -esac - -echo -echo --------------------------------------------- -echo testing C/C++ -echo --------------------------------------------- -echo - -cc_ok=no -dnl inutil car libtool -dnl AC_PROG_CC -AC_PROG_CXX -AC_DEPEND_FLAG -# AC_CC_WARNINGS([ansi]) -cc_ok=yes - -dnl Library libdl : -AC_CHECK_LIB(dl,dlopen) - -dnl add library libm : -AC_CHECK_LIB(m,ceil) - -dnl -dnl Well we use sstream which is not in gcc pre-2.95.3 -dnl We must test if it exists. If not, add it in include ! -dnl - -AC_CXX_USE_STD_IOSTREAM -AC_CXX_HAVE_SSTREAM - -echo -echo --------------------------------------------- -echo BOOST Library -echo --------------------------------------------- -echo - -CHECK_BOOST - -dnl -dnl --------------------------------------------- -dnl testing MPICH -dnl --------------------------------------------- -dnl - -CHECK_MPICH - -echo -echo --------------------------------------------- -echo testing LEX \& YACC -echo --------------------------------------------- -echo - -lex_yacc_ok=no -AC_PROG_YACC -AC_PROG_LEX -lex_yacc_ok=yes - -echo -echo --------------------------------------------- -echo testing python -echo --------------------------------------------- -echo - -CHECK_PYTHON - -dnl echo -dnl echo --------------------------------------------- -dnl echo testing java -dnl echo --------------------------------------------- -dnl echo - -dnl CHECK_JAVA - -echo -echo --------------------------------------------- -echo testing swig -echo --------------------------------------------- -echo - -CHECK_SWIG - -echo -echo --------------------------------------------- -echo testing threads -echo --------------------------------------------- -echo - -ENABLE_PTHREADS - -echo -echo --------------------------------------------- -echo testing omniORB -echo --------------------------------------------- -echo - -CHECK_OMNIORB - -dnl echo -dnl echo --------------------------------------------- -dnl echo testing mico -dnl echo --------------------------------------------- -dnl echo - -dnl CHECK_MICO - -echo -echo --------------------------------------------- -echo default ORB : omniORB -echo --------------------------------------------- -echo - -DEFAULT_ORB=omniORB -CHECK_CORBA - -AC_SUBST_FILE(CORBA) -corba=make_$ORB -CORBA=adm_local/unix/$corba - -echo -echo --------------------------------------------- -echo testing openGL -echo --------------------------------------------- -echo - -CHECK_OPENGL - -echo -echo --------------------------------------------- -echo testing QT -echo --------------------------------------------- -echo - -CHECK_QT - -echo -echo --------------------------------------------- -echo testing msg2qm -echo --------------------------------------------- -echo - -CHECK_MSG2QM - -echo -echo --------------------------------------------- -echo testing VTK -echo --------------------------------------------- -echo - -CHECK_VTK - -echo -echo --------------------------------------------- -echo testing HDF5 -echo --------------------------------------------- -echo - -CHECK_HDF5 - -echo -echo --------------------------------------------- -echo Testing OpenCascade -echo --------------------------------------------- -echo - -CHECK_CAS - -echo -echo --------------------------------------------- -echo Testing qwt -echo --------------------------------------------- -echo - -CHECK_QWT - -echo -echo --------------------------------------------- -echo Testing html generators -echo --------------------------------------------- -echo - -CHECK_HTML_GENERATORS - -echo -echo --------------------------------------------- -echo Testing Kernel -echo --------------------------------------------- -echo - -CHECK_KERNEL - -echo -echo --------------------------------------------- -echo Testing Med -echo --------------------------------------------- -echo - -CHECK_MED - -echo -echo --------------------------------------------- -echo Summary -echo --------------------------------------------- -echo - -echo Configure -variables="cc_ok boost_ok lex_yacc_ok python_ok swig_ok threads_ok OpenGL_ok qt_ok vtk_ok hdf5_ok omniORB_ok occ_ok qwt_ok doxygen_ok graphviz_ok Kernel_ok Med_ok" - -for var in $variables -do - printf " %10s : " `echo \$var | sed -e "s,_ok,,"` - eval echo \$$var -done - -echo -echo "Default ORB : $DEFAULT_ORB" -echo - -dnl generals files which could be included in every makefile - -AC_SUBST_FILE(COMMENCE) COMMENCE=adm_local/unix/make_commence -AC_SUBST_FILE(CONCLUDE) CONCLUDE=salome_adm/unix/make_conclude -AC_SUBST_FILE(MODULE) MODULE=salome_adm/unix/make_module - -dnl les dependences -AC_SUBST_FILE(DEPEND) DEPEND=salome_adm/unix/depend - -dnl We don t need to say when we re entering directories if we re using -dnl GNU make becuase make does it for us. -if test "X$GMAKE" = "Xyes"; then - AC_SUBST(SETX) SETX=":" -else - AC_SUBST(SETX) SETX="set -x" -fi - -# make other build directories -for rep in salome_adm adm_local doc bin/salome include/salome lib/salome share/salome/resources idl -do -# if test ! -d $rep ; then -# eval mkdir $rep -# fi - $INSTALL -d $rep -done - -echo -echo --------------------------------------------- -echo copying resource files, shell scripts, and -echo xml files -echo --------------------------------------------- -echo - - -dnl copy resources directories - -#for i in `find $ROOT_SRCDIR -name 'resources' -print` -#do -# local_res=`echo $i | sed -e "s,$ROOT_SRCDIR,.,"` -# local_res_dir=`echo $local_res | sed -e "s,[[^/]]*$,,;s,/$,,;s,^$,.,"` -# mkdir -p $local_res_dir -# cd $local_res_dir -# ln -fs $i -# echo $local_res -# cd $ROOT_BUILDDIR -#done - -dnl copy shells and utilities contained in the bin directory -dnl excluding .in files (treated in AC-OUTPUT below) and CVS -dnl directory - -mkdir -p bin/salome -cd bin/salome -for i in $ROOT_SRCDIR/bin/* -do - local_bin=`echo $i | sed -e "s,$ROOT_SRCDIR,.,"` - case "$local_bin" in - *.in | *~) ;; - ./bin/CVS | ./bin/salome) ;; - *) /usr/bin/install $i .; echo $local_bin ;; - esac -done -cd $ROOT_BUILDDIR - -AC_SUBST_FILE(ENVSCRIPT) ENVSCRIPT=salome_adm/unix/envScript - -dnl copy xml files to the build tree (lib directory) -dnl pourquoi ???? - -#cd lib -#for i in `find $ROOT_SRCDIR -name "*.xml" -print` -#do -# ln -fs $i -# echo `echo $i | sed -e "s,$ROOT_SRCDIR,.,"` -#done -#cd $ROOT_BUILDDIR - - -echo -echo --------------------------------------------- -echo generating Makefiles and configure files -echo --------------------------------------------- -echo - -AC_OUTPUT_COMMANDS([ \ - chmod +x ./bin/* \ -]) - -## do not delete this line diff --git a/doc/Makefile.in b/doc/Makefile.in deleted file mode 100644 index 7295ede7..00000000 --- a/doc/Makefile.in +++ /dev/null @@ -1,40 +0,0 @@ - -# -* Makefile *- -# -# Author : Patrick GOLDBRONN (CEA) -# Date : 30/11/2001 -# $Header$ -# -# source path -top_srcdir=@top_srcdir@ -top_builddir=.. -srcdir=@srcdir@ -VPATH=.:@srcdir@ - -SUBDIRS= salome - -@COMMENCE@ - -docs: - @@SETX@; for d in $(SUBDIRS); do \ - (cd $$d && $(MAKE) $@) || exit 1; \ - done -clean: - @@SETX@; for d in $(SUBDIRS); do \ - (cd $$d && $(MAKE) $@) || exit 1; \ - done - -distclean: clean - @@SETX@; for d in $(SUBDIRS); do \ - (cd $$d && $(MAKE) $@) || exit 1; \ - done - -install: - @@SETX@; for d in $(SUBDIRS); do \ - (cd $$d && $(MAKE) $@) || exit 1; \ - done - -uninstall: - @@SETX@; for d in $(SUBDIRS); do \ - (cd $$d && $(MAKE) $@) || exit 1; \ - done diff --git a/doc/salome/VISU_index.html b/doc/salome/VISU_index.html deleted file mode 100644 index 84118080..00000000 --- a/doc/salome/VISU_index.html +++ /dev/null @@ -1,95 +0,0 @@ - - - - - - - - Post-Pro Module Documentation - - - -
  -
-
                   -   
- - - - - - - - - -
- - - -
- -
-
-
-

Post-Pro MODULE Documentation

-
-
- - - - - -
-
- -
-

Application-About.png -     

-
- -
- - - - -
-
-
-
-
- -
- -
GUI Documentation
- -
- -
- -

-
- -
- -
TUI Documentation
- -
- -
- -

-
-
-
-
-
-
- - diff --git a/doc/salome/gui/Makefile.in b/doc/salome/gui/Makefile.in deleted file mode 100644 index e03160f1..00000000 --- a/doc/salome/gui/Makefile.in +++ /dev/null @@ -1,33 +0,0 @@ -# Copyright (C) 2003 CEA/DEN, EDF R&D -# -# -# -# File : Makefile.in -# Author : Vasily Rusyaev (Open Cascade NN) -# Module : doc -# $Header: - -top_srcdir=@top_srcdir@ -top_builddir=../../.. -srcdir=@srcdir@ -VPATH=.:@srcdir@ - -@COMMENCE@ - -docs: - cp -fr $(srcdir)/VISU ./ - -find $(PWD) -name CVS -exec rm -rf {} \; - -clean: - rm -fr `ls | grep -v "Makefile"` - -distclean: clean - rm -fr VISU - -install: - mkdir -p $(docdir)/gui - cp -rf VISU $(docdir)/gui - -find $(PWD) -name CVS -exec rm -rf {} \; - -uninstall: - rm -rf $(docdir)/gui/VISU diff --git a/doc/salome/gui/VISU/animation.gif b/doc/salome/gui/VISU/animation.gif deleted file mode 100755 index 3f41856f..00000000 Binary files a/doc/salome/gui/VISU/animation.gif and /dev/null differ diff --git a/doc/salome/gui/VISU/createfieldprsnt.gif b/doc/salome/gui/VISU/createfieldprsnt.gif deleted file mode 100755 index 3e65e1fc..00000000 Binary files a/doc/salome/gui/VISU/createfieldprsnt.gif and /dev/null differ diff --git a/doc/salome/gui/VISU/createpresent.gif b/doc/salome/gui/VISU/createpresent.gif deleted file mode 100755 index 807cd7e2..00000000 Binary files a/doc/salome/gui/VISU/createpresent.gif and /dev/null differ diff --git a/doc/salome/gui/VISU/createtable.gif b/doc/salome/gui/VISU/createtable.gif deleted file mode 100755 index 2216f37d..00000000 Binary files a/doc/salome/gui/VISU/createtable.gif and /dev/null differ diff --git a/doc/salome/gui/VISU/i_blue.jpg b/doc/salome/gui/VISU/i_blue.jpg deleted file mode 100755 index ed3acfac..00000000 Binary files a/doc/salome/gui/VISU/i_blue.jpg and /dev/null differ diff --git a/doc/salome/gui/VISU/image15.gif b/doc/salome/gui/VISU/image15.gif deleted file mode 100755 index c752772f..00000000 Binary files a/doc/salome/gui/VISU/image15.gif and /dev/null differ diff --git a/doc/salome/gui/VISU/image16.gif b/doc/salome/gui/VISU/image16.gif deleted file mode 100755 index cd27cf1f..00000000 Binary files a/doc/salome/gui/VISU/image16.gif and /dev/null differ diff --git a/doc/salome/gui/VISU/image17.gif b/doc/salome/gui/VISU/image17.gif deleted file mode 100755 index 6c6272e6..00000000 Binary files a/doc/salome/gui/VISU/image17.gif and /dev/null differ diff --git a/doc/salome/gui/VISU/image19.jpg b/doc/salome/gui/VISU/image19.jpg deleted file mode 100755 index d24fdaee..00000000 Binary files a/doc/salome/gui/VISU/image19.jpg and /dev/null differ diff --git a/doc/salome/gui/VISU/image20.jpg b/doc/salome/gui/VISU/image20.jpg deleted file mode 100755 index a2a345f3..00000000 Binary files a/doc/salome/gui/VISU/image20.jpg and /dev/null differ diff --git a/doc/salome/gui/VISU/image21.jpg b/doc/salome/gui/VISU/image21.jpg deleted file mode 100755 index c1bc42f8..00000000 Binary files a/doc/salome/gui/VISU/image21.jpg and /dev/null differ diff --git a/doc/salome/gui/VISU/importmed.gif b/doc/salome/gui/VISU/importmed.gif deleted file mode 100755 index bc4549a7..00000000 Binary files a/doc/salome/gui/VISU/importmed.gif and /dev/null differ diff --git a/doc/salome/gui/VISU/launchvisu.gif b/doc/salome/gui/VISU/launchvisu.gif deleted file mode 100755 index 4d8d76d8..00000000 Binary files a/doc/salome/gui/VISU/launchvisu.gif and /dev/null differ diff --git a/doc/salome/gui/VISU/more.jpg b/doc/salome/gui/VISU/more.jpg deleted file mode 100755 index 1ed8250e..00000000 Binary files a/doc/salome/gui/VISU/more.jpg and /dev/null differ diff --git a/doc/salome/gui/VISU/note1.gif b/doc/salome/gui/VISU/note1.gif deleted file mode 100755 index b53e21d0..00000000 Binary files a/doc/salome/gui/VISU/note1.gif and /dev/null differ diff --git a/doc/salome/gui/VISU/pics/animatdef.jpg b/doc/salome/gui/VISU/pics/animatdef.jpg deleted file mode 100755 index ed9b4693..00000000 Binary files a/doc/salome/gui/VISU/pics/animatdef.jpg and /dev/null differ diff --git a/doc/salome/gui/VISU/pics/animation.jpg b/doc/salome/gui/VISU/pics/animation.jpg deleted file mode 100755 index eac0b736..00000000 Binary files a/doc/salome/gui/VISU/pics/animation.jpg and /dev/null differ diff --git a/doc/salome/gui/VISU/pics/animationparam.jpg b/doc/salome/gui/VISU/pics/animationparam.jpg deleted file mode 100755 index 06da5a36..00000000 Binary files a/doc/salome/gui/VISU/pics/animationparam.jpg and /dev/null differ diff --git a/doc/salome/gui/VISU/pics/begining.jpg b/doc/salome/gui/VISU/pics/begining.jpg deleted file mode 100755 index 9c624022..00000000 Binary files a/doc/salome/gui/VISU/pics/begining.jpg and /dev/null differ diff --git a/doc/salome/gui/VISU/pics/cellsel.jpg b/doc/salome/gui/VISU/pics/cellsel.jpg deleted file mode 100755 index 8e7f8d93..00000000 Binary files a/doc/salome/gui/VISU/pics/cellsel.jpg and /dev/null differ diff --git a/doc/salome/gui/VISU/pics/cellselection.jpg b/doc/salome/gui/VISU/pics/cellselection.jpg deleted file mode 100755 index 26c83e5d..00000000 Binary files a/doc/salome/gui/VISU/pics/cellselection.jpg and /dev/null differ diff --git a/doc/salome/gui/VISU/pics/cutlinesicn.jpg b/doc/salome/gui/VISU/pics/cutlinesicn.jpg deleted file mode 100755 index eb43365c..00000000 Binary files a/doc/salome/gui/VISU/pics/cutlinesicn.jpg and /dev/null differ diff --git a/doc/salome/gui/VISU/pics/cutlinesicon.jpg b/doc/salome/gui/VISU/pics/cutlinesicon.jpg deleted file mode 100755 index cd866735..00000000 Binary files a/doc/salome/gui/VISU/pics/cutlinesicon.jpg and /dev/null differ diff --git a/doc/salome/gui/VISU/pics/cutlinesprsnt.jpg b/doc/salome/gui/VISU/pics/cutlinesprsnt.jpg deleted file mode 100755 index 22191fa9..00000000 Binary files a/doc/salome/gui/VISU/pics/cutlinesprsnt.jpg and /dev/null differ diff --git a/doc/salome/gui/VISU/pics/cutplpresent.jpg b/doc/salome/gui/VISU/pics/cutplpresent.jpg deleted file mode 100755 index c318c2ec..00000000 Binary files a/doc/salome/gui/VISU/pics/cutplpresent.jpg and /dev/null differ diff --git a/doc/salome/gui/VISU/pics/defshapeicon.jpg b/doc/salome/gui/VISU/pics/defshapeicon.jpg deleted file mode 100755 index 5d59f160..00000000 Binary files a/doc/salome/gui/VISU/pics/defshapeicon.jpg and /dev/null differ diff --git a/doc/salome/gui/VISU/pics/display.jpg b/doc/salome/gui/VISU/pics/display.jpg deleted file mode 100755 index 2b8f9c21..00000000 Binary files a/doc/salome/gui/VISU/pics/display.jpg and /dev/null differ diff --git a/doc/salome/gui/VISU/pics/display1.jpg b/doc/salome/gui/VISU/pics/display1.jpg deleted file mode 100755 index 19c9e364..00000000 Binary files a/doc/salome/gui/VISU/pics/display1.jpg and /dev/null differ diff --git a/doc/salome/gui/VISU/pics/end.jpg b/doc/salome/gui/VISU/pics/end.jpg deleted file mode 100755 index 3aef5d1b..00000000 Binary files a/doc/salome/gui/VISU/pics/end.jpg and /dev/null differ diff --git a/doc/salome/gui/VISU/pics/iso.jpg b/doc/salome/gui/VISU/pics/iso.jpg deleted file mode 100755 index 0c1d46f2..00000000 Binary files a/doc/salome/gui/VISU/pics/iso.jpg and /dev/null differ diff --git a/doc/salome/gui/VISU/pics/isosurf.jpg b/doc/salome/gui/VISU/pics/isosurf.jpg deleted file mode 100755 index 88d5ac72..00000000 Binary files a/doc/salome/gui/VISU/pics/isosurf.jpg and /dev/null differ diff --git a/doc/salome/gui/VISU/pics/next.jpg b/doc/salome/gui/VISU/pics/next.jpg deleted file mode 100755 index 958ff001..00000000 Binary files a/doc/salome/gui/VISU/pics/next.jpg and /dev/null differ diff --git a/doc/salome/gui/VISU/pics/points.jpg b/doc/salome/gui/VISU/pics/points.jpg deleted file mode 100755 index 6164f769..00000000 Binary files a/doc/salome/gui/VISU/pics/points.jpg and /dev/null differ diff --git a/doc/salome/gui/VISU/pics/pointselection.jpg b/doc/salome/gui/VISU/pics/pointselection.jpg deleted file mode 100755 index fd227511..00000000 Binary files a/doc/salome/gui/VISU/pics/pointselection.jpg and /dev/null differ diff --git a/doc/salome/gui/VISU/pics/previous.jpg b/doc/salome/gui/VISU/pics/previous.jpg deleted file mode 100755 index 4b4106b8..00000000 Binary files a/doc/salome/gui/VISU/pics/previous.jpg and /dev/null differ diff --git a/doc/salome/gui/VISU/pics/run.jpg b/doc/salome/gui/VISU/pics/run.jpg deleted file mode 100755 index d8805928..00000000 Binary files a/doc/salome/gui/VISU/pics/run.jpg and /dev/null differ diff --git a/doc/salome/gui/VISU/pics/scalarmapicon.jpg b/doc/salome/gui/VISU/pics/scalarmapicon.jpg deleted file mode 100755 index fff992d5..00000000 Binary files a/doc/salome/gui/VISU/pics/scalarmapicon.jpg and /dev/null differ diff --git a/doc/salome/gui/VISU/pics/scalingicon.jpg b/doc/salome/gui/VISU/pics/scalingicon.jpg deleted file mode 100755 index 5acd2f57..00000000 Binary files a/doc/salome/gui/VISU/pics/scalingicon.jpg and /dev/null differ diff --git a/doc/salome/gui/VISU/pics/selection1.jpg b/doc/salome/gui/VISU/pics/selection1.jpg deleted file mode 100755 index c93668ce..00000000 Binary files a/doc/salome/gui/VISU/pics/selection1.jpg and /dev/null differ diff --git a/doc/salome/gui/VISU/pics/selmode.jpg b/doc/salome/gui/VISU/pics/selmode.jpg deleted file mode 100755 index c74a3c35..00000000 Binary files a/doc/salome/gui/VISU/pics/selmode.jpg and /dev/null differ diff --git a/doc/salome/gui/VISU/pics/shrink.jpg b/doc/salome/gui/VISU/pics/shrink.jpg deleted file mode 100755 index 0985b855..00000000 Binary files a/doc/salome/gui/VISU/pics/shrink.jpg and /dev/null differ diff --git a/doc/salome/gui/VISU/pics/speed.jpg b/doc/salome/gui/VISU/pics/speed.jpg deleted file mode 100755 index 3076f301..00000000 Binary files a/doc/salome/gui/VISU/pics/speed.jpg and /dev/null differ diff --git a/doc/salome/gui/VISU/pics/streamlinesicon.jpg b/doc/salome/gui/VISU/pics/streamlinesicon.jpg deleted file mode 100755 index 3d90087e..00000000 Binary files a/doc/salome/gui/VISU/pics/streamlinesicon.jpg and /dev/null differ diff --git a/doc/salome/gui/VISU/pics/streamlinesprsnt.jpg b/doc/salome/gui/VISU/pics/streamlinesprsnt.jpg deleted file mode 100755 index 08846927..00000000 Binary files a/doc/salome/gui/VISU/pics/streamlinesprsnt.jpg and /dev/null differ diff --git a/doc/salome/gui/VISU/pics/surface.jpg b/doc/salome/gui/VISU/pics/surface.jpg deleted file mode 100755 index 6f9a0240..00000000 Binary files a/doc/salome/gui/VISU/pics/surface.jpg and /dev/null differ diff --git a/doc/salome/gui/VISU/pics/vecticon.jpg b/doc/salome/gui/VISU/pics/vecticon.jpg deleted file mode 100755 index 40c36af4..00000000 Binary files a/doc/salome/gui/VISU/pics/vecticon.jpg and /dev/null differ diff --git a/doc/salome/gui/VISU/pics/vectorsprsnt.jpg b/doc/salome/gui/VISU/pics/vectorsprsnt.jpg deleted file mode 100755 index f8b359ed..00000000 Binary files a/doc/salome/gui/VISU/pics/vectorsprsnt.jpg and /dev/null differ diff --git a/doc/salome/gui/VISU/pics/visuicon.jpg b/doc/salome/gui/VISU/pics/visuicon.jpg deleted file mode 100755 index 8489eef2..00000000 Binary files a/doc/salome/gui/VISU/pics/visuicon.jpg and /dev/null differ diff --git a/doc/salome/gui/VISU/pics/wireframe.jpg b/doc/salome/gui/VISU/pics/wireframe.jpg deleted file mode 100755 index aa84b51c..00000000 Binary files a/doc/salome/gui/VISU/pics/wireframe.jpg and /dev/null differ diff --git a/doc/salome/gui/VISU/ss_btn_related_topics.gif b/doc/salome/gui/VISU/ss_btn_related_topics.gif deleted file mode 100755 index 5158bc46..00000000 Binary files a/doc/salome/gui/VISU/ss_btn_related_topics.gif and /dev/null differ diff --git a/doc/salome/gui/VISU/texture_horiz_ltbluebubbles.jpg b/doc/salome/gui/VISU/texture_horiz_ltbluebubbles.jpg deleted file mode 100755 index a10d494a..00000000 Binary files a/doc/salome/gui/VISU/texture_horiz_ltbluebubbles.jpg and /dev/null differ diff --git a/doc/salome/gui/VISU/tip1.gif b/doc/salome/gui/VISU/tip1.gif deleted file mode 100755 index bb74c875..00000000 Binary files a/doc/salome/gui/VISU/tip1.gif and /dev/null differ diff --git a/doc/salome/gui/VISU/whestart.ico b/doc/salome/gui/VISU/whestart.ico deleted file mode 100755 index 110f1835..00000000 Binary files a/doc/salome/gui/VISU/whestart.ico and /dev/null differ diff --git a/doc/salome/gui/VISU/whgdata/whexpbar.gif b/doc/salome/gui/VISU/whgdata/whexpbar.gif deleted file mode 100755 index e677dc6f..00000000 Binary files a/doc/salome/gui/VISU/whgdata/whexpbar.gif and /dev/null differ diff --git a/doc/salome/gui/VISU/whrstart.ico b/doc/salome/gui/VISU/whrstart.ico deleted file mode 100755 index bffcd6eb..00000000 Binary files a/doc/salome/gui/VISU/whrstart.ico and /dev/null differ diff --git a/doc/salome/gui/VISU/whstart.ico b/doc/salome/gui/VISU/whstart.ico deleted file mode 100755 index 365eceac..00000000 Binary files a/doc/salome/gui/VISU/whstart.ico and /dev/null differ diff --git a/doc/salome/gui/VISU/wht_fts_h.gif b/doc/salome/gui/VISU/wht_fts_h.gif deleted file mode 100755 index feb79ae8..00000000 Binary files a/doc/salome/gui/VISU/wht_fts_h.gif and /dev/null differ diff --git a/doc/salome/gui/VISU/wht_fts_n.gif b/doc/salome/gui/VISU/wht_fts_n.gif deleted file mode 100755 index 8483be43..00000000 Binary files a/doc/salome/gui/VISU/wht_fts_n.gif and /dev/null differ diff --git a/doc/salome/gui/VISU/wht_glo_h.gif b/doc/salome/gui/VISU/wht_glo_h.gif deleted file mode 100755 index 12223e5c..00000000 Binary files a/doc/salome/gui/VISU/wht_glo_h.gif and /dev/null differ diff --git a/doc/salome/gui/VISU/wht_glo_n.gif b/doc/salome/gui/VISU/wht_glo_n.gif deleted file mode 100755 index 32803ebd..00000000 Binary files a/doc/salome/gui/VISU/wht_glo_n.gif and /dev/null differ diff --git a/doc/salome/gui/VISU/wht_go.gif b/doc/salome/gui/VISU/wht_go.gif deleted file mode 100755 index 106f1d16..00000000 Binary files a/doc/salome/gui/VISU/wht_go.gif and /dev/null differ diff --git a/doc/salome/gui/VISU/wht_hide.gif b/doc/salome/gui/VISU/wht_hide.gif deleted file mode 100755 index 6ec602dc..00000000 Binary files a/doc/salome/gui/VISU/wht_hide.gif and /dev/null differ diff --git a/doc/salome/gui/VISU/wht_idx_h.gif b/doc/salome/gui/VISU/wht_idx_h.gif deleted file mode 100755 index 2df1b16a..00000000 Binary files a/doc/salome/gui/VISU/wht_idx_h.gif and /dev/null differ diff --git a/doc/salome/gui/VISU/wht_idx_n.gif b/doc/salome/gui/VISU/wht_idx_n.gif deleted file mode 100755 index fd193a0f..00000000 Binary files a/doc/salome/gui/VISU/wht_idx_n.gif and /dev/null differ diff --git a/doc/salome/gui/VISU/wht_logo1.gif b/doc/salome/gui/VISU/wht_logo1.gif deleted file mode 100755 index 2ef5700f..00000000 Binary files a/doc/salome/gui/VISU/wht_logo1.gif and /dev/null differ diff --git a/doc/salome/gui/VISU/wht_logo2.gif b/doc/salome/gui/VISU/wht_logo2.gif deleted file mode 100755 index 2ac62e86..00000000 Binary files a/doc/salome/gui/VISU/wht_logo2.gif and /dev/null differ diff --git a/doc/salome/gui/VISU/wht_next.gif b/doc/salome/gui/VISU/wht_next.gif deleted file mode 100755 index 8ea834d5..00000000 Binary files a/doc/salome/gui/VISU/wht_next.gif and /dev/null differ diff --git a/doc/salome/gui/VISU/wht_next_g.gif b/doc/salome/gui/VISU/wht_next_g.gif deleted file mode 100755 index c0e97584..00000000 Binary files a/doc/salome/gui/VISU/wht_next_g.gif and /dev/null differ diff --git a/doc/salome/gui/VISU/wht_prev.gif b/doc/salome/gui/VISU/wht_prev.gif deleted file mode 100755 index b7eaba83..00000000 Binary files a/doc/salome/gui/VISU/wht_prev.gif and /dev/null differ diff --git a/doc/salome/gui/VISU/wht_prev_g.gif b/doc/salome/gui/VISU/wht_prev_g.gif deleted file mode 100755 index 86479091..00000000 Binary files a/doc/salome/gui/VISU/wht_prev_g.gif and /dev/null differ diff --git a/doc/salome/gui/VISU/wht_spac.gif b/doc/salome/gui/VISU/wht_spac.gif deleted file mode 100755 index fc256098..00000000 Binary files a/doc/salome/gui/VISU/wht_spac.gif and /dev/null differ diff --git a/doc/salome/gui/VISU/wht_sync.gif b/doc/salome/gui/VISU/wht_sync.gif deleted file mode 100755 index 0ef17473..00000000 Binary files a/doc/salome/gui/VISU/wht_sync.gif and /dev/null differ diff --git a/doc/salome/gui/VISU/wht_tab0.gif b/doc/salome/gui/VISU/wht_tab0.gif deleted file mode 100755 index 955c42f4..00000000 Binary files a/doc/salome/gui/VISU/wht_tab0.gif and /dev/null differ diff --git a/doc/salome/gui/VISU/wht_tab1.gif b/doc/salome/gui/VISU/wht_tab1.gif deleted file mode 100755 index b3ec41d6..00000000 Binary files a/doc/salome/gui/VISU/wht_tab1.gif and /dev/null differ diff --git a/doc/salome/gui/VISU/wht_tab2.gif b/doc/salome/gui/VISU/wht_tab2.gif deleted file mode 100755 index 08fb0ce4..00000000 Binary files a/doc/salome/gui/VISU/wht_tab2.gif and /dev/null differ diff --git a/doc/salome/gui/VISU/wht_tab3.gif b/doc/salome/gui/VISU/wht_tab3.gif deleted file mode 100755 index 1819c8e8..00000000 Binary files a/doc/salome/gui/VISU/wht_tab3.gif and /dev/null differ diff --git a/doc/salome/gui/VISU/wht_tab4.gif b/doc/salome/gui/VISU/wht_tab4.gif deleted file mode 100755 index 1a6fc4f4..00000000 Binary files a/doc/salome/gui/VISU/wht_tab4.gif and /dev/null differ diff --git a/doc/salome/gui/VISU/wht_tab5.gif b/doc/salome/gui/VISU/wht_tab5.gif deleted file mode 100755 index 93401926..00000000 Binary files a/doc/salome/gui/VISU/wht_tab5.gif and /dev/null differ diff --git a/doc/salome/gui/VISU/wht_tab6.gif b/doc/salome/gui/VISU/wht_tab6.gif deleted file mode 100755 index fe312d23..00000000 Binary files a/doc/salome/gui/VISU/wht_tab6.gif and /dev/null differ diff --git a/doc/salome/gui/VISU/wht_tab7.gif b/doc/salome/gui/VISU/wht_tab7.gif deleted file mode 100755 index 3b95ae24..00000000 Binary files a/doc/salome/gui/VISU/wht_tab7.gif and /dev/null differ diff --git a/doc/salome/gui/VISU/wht_tab8.gif b/doc/salome/gui/VISU/wht_tab8.gif deleted file mode 100755 index c80acc8d..00000000 Binary files a/doc/salome/gui/VISU/wht_tab8.gif and /dev/null differ diff --git a/doc/salome/gui/VISU/wht_toc1.gif b/doc/salome/gui/VISU/wht_toc1.gif deleted file mode 100755 index 515c352d..00000000 Binary files a/doc/salome/gui/VISU/wht_toc1.gif and /dev/null differ diff --git a/doc/salome/gui/VISU/wht_toc2.gif b/doc/salome/gui/VISU/wht_toc2.gif deleted file mode 100755 index 2e3d6c8f..00000000 Binary files a/doc/salome/gui/VISU/wht_toc2.gif and /dev/null differ diff --git a/doc/salome/gui/VISU/wht_toc3.gif b/doc/salome/gui/VISU/wht_toc3.gif deleted file mode 100755 index 330f3691..00000000 Binary files a/doc/salome/gui/VISU/wht_toc3.gif and /dev/null differ diff --git a/doc/salome/gui/VISU/wht_toc4.gif b/doc/salome/gui/VISU/wht_toc4.gif deleted file mode 100755 index 3f9a0368..00000000 Binary files a/doc/salome/gui/VISU/wht_toc4.gif and /dev/null differ diff --git a/doc/salome/gui/VISU/wht_toc_h.gif b/doc/salome/gui/VISU/wht_toc_h.gif deleted file mode 100755 index fe20f686..00000000 Binary files a/doc/salome/gui/VISU/wht_toc_h.gif and /dev/null differ diff --git a/doc/salome/gui/VISU/wht_toc_n.gif b/doc/salome/gui/VISU/wht_toc_n.gif deleted file mode 100755 index ce283101..00000000 Binary files a/doc/salome/gui/VISU/wht_toc_n.gif and /dev/null differ diff --git a/doc/salome/gui/VISU/wht_ws.gif b/doc/salome/gui/VISU/wht_ws.gif deleted file mode 100755 index 563db8bf..00000000 Binary files a/doc/salome/gui/VISU/wht_ws.gif and /dev/null differ diff --git a/doc/salome/gui/VISU/wht_ws_g.gif b/doc/salome/gui/VISU/wht_ws_g.gif deleted file mode 100755 index 3056b754..00000000 Binary files a/doc/salome/gui/VISU/wht_ws_g.gif and /dev/null differ diff --git a/doc/salome/tui/Makefile.in b/doc/salome/tui/Makefile.in deleted file mode 100644 index 44faf46d..00000000 --- a/doc/salome/tui/Makefile.in +++ /dev/null @@ -1,43 +0,0 @@ -# Copyright (C) 2003 CEA/DEN, EDF R&D -# -# -# -# File : Makefile.in -# Author : Vasily Rusyaev (Open Cascade NN) -# Module : doc -# $Header: - -top_srcdir=@top_srcdir@ -top_builddir=../../.. -root_srcdir=@ROOT_SRCDIR@ -srcdir=@srcdir@ -VPATH=.:@srcdir@ -doxygen=@DOXYGEN@ - -@COMMENCE@ - -docs: - cp -fr $(srcdir)/VISU ./INPUT; \ - cd INPUT; \ - sed 's|../../../share/salome|$(root_srcdir)|' ./doxyfile > ./doxyfile1; \ - mv -f doxyfile1 doxyfile; \ - $(doxygen) ./doxyfile; \ - cd ..; \ - cp -fr $(srcdir)/VISU/sources/static/*.* ./VISU/ - cp -fr $(srcdir)/VISU/sources/ VISU/ - cp -fr $(srcdir)/VISU/HTML/ VISU/ - rm -fr INPUT - -clean: - rm -fr VISU - -distclean: clean - rm -fr INPUT - -install: - $(INSTALL) -d $(docdir); \ - mkdir -p $(docdir)/tui - cp -fr VISU $(docdir)/tui - -uninstall: - rm -fr $(docdir)/tui/VISU diff --git a/doc/salome/tui/VISU/HTML/VISU_Gen.html b/doc/salome/tui/VISU/HTML/VISU_Gen.html deleted file mode 100644 index 5d4af0b6..00000000 --- a/doc/salome/tui/VISU/HTML/VISU_Gen.html +++ /dev/null @@ -1,1070 +0,0 @@ - - - - - - - - - - - - - - - - -
interface Base
IDL file
Python
IdType GetID ( )
return_value = GetID ( )
VISUType GetType ( )
return_value = GetType ( )

- - - - - - - -
interface PrsObject
IDL file
Python

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
interface Table
IDL file
Python
void SetTitle ( in string theTitle )
SetTitle ( theTitle )
string GetTitle ( )
return_value = GetTitle ( )
void SetOrientation ( in Orientation theOrientation )
SetOrientation ( theOrientation )
Orientation GetOrientation ( )
return_value = GetOrientation ( )
long GetNbRows ( )
return_value = GetNbRows ( )
long GetNbColumns ( )
return_value = GetNbColumns ( )

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
interface Curve
IDL file
Python
void SetTitle ( in string theTitle )
SetTitle ( theTitle )
string GetTitle ( )
return_value = GetTitle ( )
void SetColor ( in Color theColor )
SetColor ( theColor )
Color GetColor ( )
return_value = GetColor ( )
void SetMarker ( in MarkerType theType )
SetMarker ( theType )
MarkerType GetMarker ( )
return_value = GetMarker ( )
void SetLine ( in LineType theType, in long theLineWidth )
SetLine ( theType, theLineWidth )
LineType GetLine ( )
return_value = GetLine ( )
long GetLineWidth ( )
return_value = GetLineWidth ( )

- - - - - - - - - - - - - - - - - - - - - - - -
interface Container
IDL file
Python
void AddCurve ( in Curve theCurve )
AddCurve ( theCurve )
void RemoveCurve ( in Curve theCurve )
RemoveCurve ( theCurve )
long GetNbCurves ( )
return_value = GetNbCurves ( )
void Clear ( )
Clear ( )

- - - - - - - -
interface Prs3d
IDL file
Python

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
interface Mesh
IDL file
Python
void SetCellColor ( in Color theColor )
SetCellColor ( theColor )
Color GetCellColor ( )
return_value = GetCellColor ( )
void SetNodeColor ( in Color theColor )
SetNodeColor ( theColor )
Color GetNodeColor ( )
return_value = GetNodeColor ( )
void SetLinkColor ( in Color theColor )
SetLinkColor ( theColor )
Color GetLinkColor ( )
return_value = GetLinkColor ( )
void SetPresentationType ( in PresentationType theType )
SetPresentationType ( theType )
PresentationType GetPresentationType ( )
return_value = GetPresentationType ( )

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
interface ScalarMap
IDL file
Python
void SetScalarMode ( in long theScalarMode )
SetScalarMode ( theScalarMode )
long GetScalarMode ( )
return_value = GetScalarMode ( )
void SetScaling ( in Scaling theScaling )
SetScaling ( theScaling )
Scaling GetScaling ( )
return_value = GetScaling ( )
void SetRange ( in double theMin, in double theMax )
SetRange ( theMin, theMax )
double GetMin ( )
return_value = GetMin ( )
double GetMax ( )
return_value = GetMax ( )
void SetBarOrientation ( in Orientation theOrientation )
SetBarOrientation ( theOrientation )
Orientation GetBarOrientation ( )
return_value = GetBarOrientation ( )
void SetPosition ( in double X, in double Y )
SetPosition ( X, Y )
double GetPosX ( )
return_value = GetPosX ( )
double GetPosY ( )
return_value = GetPosY ( )
void SetSize ( in double theWidth, in double theHeight )
SetSize ( theWidth, theHeight )
double GetWidth ( )
return_value = GetWidth ( )
double GetHeight ( )
return_value = GetHeight ( )
void SetNbColors ( in long theNbColors )
SetNbColors ( theNbColors )
long GetNbColors ( )
return_value = GetNbColors ( )
void SetLabels ( in long theNbLabels )
SetLabels ( theNbLabels )
long GetLabels ( )
return_value = GetLabels ( )
void SetTitle ( in string theName )
SetTitle ( theName )
string GetTitle ( )
return_value = GetTitle ( )

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
interface DeformedShape
IDL file
Python
void SetScale ( in double theScale )
SetScale ( theScale )
double GetScale ( )
return_value = GetScale ( )
boolean IsColored ( )
return_value = IsColored ( )
void ShowColored ( in boolean theColored )
ShowColored ( theColored )
Color GetColor ( )
return_value = GetColor ( )
void SetColor ( in Color theColor )
SetColor ( theColor )

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
interface CutPlanes
IDL file
Python
void SetOrientation ( in Orientation theOrientation, in double theXAngle, in double theYAngle )
SetOrientation ( theOrientation, theXAngle, theYAngle )
Orientation GetOrientationType ( )
return_value = GetOrientationType ( )
double GetRotateX ( )
return_value = GetRotateX ( )
double GetRotateY ( )
return_value = GetRotateY ( )
void SetDisplacement ( in double theDisp )
SetDisplacement ( theDisp )
double GetDisplacement ( )
return_value = GetDisplacement ( )
void SetPlanePosition ( in long thePlaneNumber, in double thePlanePosition )
SetPlanePosition ( thePlaneNumber, thePlanePosition )
void SetDefault ( in long thePlaneNumber )
SetDefault ( thePlaneNumber )
double GetPlanePosition ( in long thePlaneNumber )
return_value = GetPlanePosition ( thePlaneNumber )
boolean IsDefault ( in long thePlaneNumber )
return_value = IsDefault ( thePlaneNumber )
void SetNbPlanes ( in long theNb )
SetNbPlanes ( theNb )
long GetNbPlanes ( )
return_value = GetNbPlanes ( )

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
interface CutLines
IDL file
Python
void SetOrientation ( in Orientation theOrientation, in double theXAngle, in double theYAngle )
SetOrientation ( theOrientation, theXAngle, theYAngle )
void SetOrientation2 ( in Orientation theOrientation, in double theXAngle, in double theYAngle )
SetOrientation2 ( theOrientation, theXAngle, theYAngle )
Orientation GetOrientationType ( )
return_value = GetOrientationType ( )
Orientation GetOrientationType2 ( )
return_value = GetOrientationType2 ( )
double GetRotateX ( )
return_value = GetRotateX ( )
double GetRotateX2 ( )
return_value = GetRotateX2 ( )
double GetRotateY ( )
return_value = GetRotateY ( )
double GetRotateY2 ( )
return_value = GetRotateY2 ( )
void SetDisplacement ( in double theDisp )
SetDisplacement ( theDisp )
void SetDisplacement2 ( in double theDisp )
SetDisplacement2 ( theDisp )
double GetDisplacement ( )
return_value = GetDisplacement ( )
double GetDisplacement2 ( )
return_value = GetDisplacement2 ( )
void SetBasePlanePosition ( in double thePlanePosition )
SetBasePlanePosition ( thePlanePosition )
double GetBasePlanePosition ( )
return_value = GetBasePlanePosition ( )
void SetLinePosition ( in long thePlaneNumber, in double thePlanePosition )
SetLinePosition ( thePlaneNumber, thePlanePosition )
double GetLinePosition ( in long thePlaneNumber )
return_value = GetLinePosition ( thePlaneNumber )
void SetDefault ( )
SetDefault ( )
boolean IsDefault ( )
return_value = IsDefault ( )
void SetDefaultPosition ( in long thePlaneNumber )
SetDefaultPosition ( thePlaneNumber )
boolean IsDefaultPosition ( in long thePlaneNumber )
return_value = IsDefaultPosition ( thePlaneNumber )
void SetNbLines ( in long theNb )
SetNbLines ( theNb )
long GetNbLines ( )
return_value = GetNbLines ( )

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
interface StreamLines
IDL file
Python
boolean SetParams ( in double theIntStep, in double thePropogationTime, in double theStepLength, in Prs3d thePrs3d, in double thePercents, in Direction theDirection )
return_value = SetParams ( theIntStep, thePropogationTime, theStepLength, thePrs3d, thePercents, theDirection )
double GetIntegrationStep ( )
return_value = GetIntegrationStep ( )
double GetPropagationTime ( )
return_value = GetPropagationTime ( )
double GetStepLength ( )
return_value = GetStepLength ( )
Prs3d GetSource ( )
return_value = GetSource ( )
double GetUsedPoints ( )
return_value = GetUsedPoints ( )
Direction GetDirection ( )
return_value = GetDirection ( )

- - - - - - - - - - - - - - - -
interface IsoSurfaces
IDL file
Python
void SetNbSurfaces ( in long theNb )
SetNbSurfaces ( theNb )
long GetNbSurfaces ( )
return_value = GetNbSurfaces ( )

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
interface Vectors
IDL file
Python
void SetLineWidth ( in double theWidth )
SetLineWidth ( theWidth )
double GetLineWidth ( )
return_value = GetLineWidth ( )
void SetGlyphType ( in GlyphType theType )
SetGlyphType ( theType )
GlyphType GetGlyphType ( )
return_value = GetGlyphType ( )
void SetGlyphPos ( in GlyphPos thePos )
SetGlyphPos ( thePos )
GlyphPos GetGlyphPos ( )
return_value = GetGlyphPos ( )

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
interface Animation
IDL file
Python
void addField ( in SObject theObject )
addField ( theObject )
void generatePresentations ( in long theFieldNum )
generatePresentations ( theFieldNum )
boolean generateFrames ( )
return_value = generateFrames ( )
void clearView ( )
clearView ( )
void startAnimation ( )
startAnimation ( )
void stopAnimation ( )
stopAnimation ( )
void nextFrame ( )
nextFrame ( )
void prevFrame ( )
prevFrame ( )
void firstFrame ( )
firstFrame ( )
void lastFrame ( )
lastFrame ( )
void gotoFrame ( in long theFrame )
gotoFrame ( theFrame )
long getNbFields ( )
return_value = getNbFields ( )
long getNbFrames ( )
return_value = getNbFrames ( )
boolean isRunning ( )
return_value = isRunning ( )
long getCurrentFrame ( )
return_value = getCurrentFrame ( )
ScalarMap getPresentation ( in long theField, in long theFrame )
return_value = getPresentation ( theField, theFrame )
void setPresentationType ( in long theFieldNum, in VISUType theType )
setPresentationType ( theFieldNum, theType )
VISUType getPresentationType ( in long theFieldNum )
return_value = getPresentationType ( theFieldNum )
void setSpeed ( in long theSpeed )
setSpeed ( theSpeed )
long getSpeed ( )
return_value = getSpeed ( )
boolean isProportional ( )
return_value = isProportional ( )
void setAnimationRange ( in double theMin, in double theMax )
setAnimationRange ( theMin, theMax )
double getMinRange ( )
return_value = getMinRange ( )
double getMaxRange ( )
return_value = getMaxRange ( )
boolean isRangeDefined ( )
return_value = isRangeDefined ( )
void dumpTo ( in string thePath )
dumpTo ( thePath )
boolean isCycling ( )
return_value = isCycling ( )
double getMinTime ( )
return_value = getMinTime ( )
double getMaxTime ( )
return_value = getMaxTime ( )
void setProportional ( in boolean theProp )
setProportional ( theProp )
void setCycling ( in boolean theCycle )
setCycling ( theCycle )

- - - - - - - - - - - -
interface Result
IDL file
Python
boolean BuildAll ( )
return_value = BuildAll ( )

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
interface VISU_Gen
IDL file
Python
void SetCurrentStudy ( in Study theStudy )
SetCurrentStudy ( theStudy )
Study GetCurrentStudy ( )
return_value = GetCurrentStudy ( )
ViewManager GetViewManager ( )
return_value = GetViewManager ( )
SObject ImportTables ( in string theFileName )
return_value = ImportTables ( theFileName )
boolean ExportTableToFile ( in SObject theTable, in string theFileName )
return_value = ExportTableToFile ( theTable, theFileName )
Result ImportFile ( in string theFileName )
return_value = ImportFile ( theFileName )
Result CopyAndImportFile ( in string theFileName )
return_value = CopyAndImportFile ( theFileName )
Result ImportMed ( in SObject theMedSObject )
return_value = ImportMed ( theMedSObject )
Result ImportMedField ( in FIELD theField )
return_value = ImportMedField ( theField )
Mesh MeshOnEntity ( in Result theResult, in string theMeshName, in Entity theEntity )
return_value = MeshOnEntity ( theResult, theMeshName, theEntity )
Mesh FamilyMeshOnEntity ( in Result theResult, in string theMeshName, in Entity theEntity, in string theFamilyName )
return_value = FamilyMeshOnEntity ( theResult, theMeshName, theEntity, theFamilyName )
Mesh GroupMesh ( in Result theResult, in string theMeshName, in string theGroupName )
return_value = GroupMesh ( theResult, theMeshName, theGroupName )
ScalarMap ScalarMapOnField ( in Result theResult, in string theMeshName, in Entity theEntity, in string theFieldName, in double theIteration )
return_value = ScalarMapOnField ( theResult, theMeshName, theEntity, theFieldName, theIteration )
DeformedShape DeformedShapeOnField ( in Result theResult, in string theMeshName, in Entity theEntity, in string theFieldName, in double theIteration )
return_value = DeformedShapeOnField ( theResult, theMeshName, theEntity, theFieldName, theIteration )
Vectors VectorsOnField ( in Result theResult, in string theMeshName, in Entity theEntity, in string theFieldName, in double theIteration )
return_value = VectorsOnField ( theResult, theMeshName, theEntity, theFieldName, theIteration )
IsoSurfaces IsoSurfacesOnField ( in Result theResult, in string theMeshName, in Entity theEntity, in string theFieldName, in double theIteration )
return_value = IsoSurfacesOnField ( theResult, theMeshName, theEntity, theFieldName, theIteration )
StreamLines StreamLinesOnField ( in Result theResult, in string theMeshName, in Entity theEntity, in string theFieldName, in double theIteration )
return_value = StreamLinesOnField ( theResult, theMeshName, theEntity, theFieldName, theIteration )
CutPlanes CutPlanesOnField ( in Result theResult, in string theMeshName, in Entity theEntity, in string theFieldName, in double theIteration )
return_value = CutPlanesOnField ( theResult, theMeshName, theEntity, theFieldName, theIteration )
CutLines CutLinesOnField ( in Result theResult, in string theMeshName, in Entity theEntity, in string theFieldName, in double theIteration )
return_value = CutLinesOnField ( theResult, theMeshName, theEntity, theFieldName, theIteration )
Table CreateTable ( in string theTableEntry )
return_value = CreateTable ( theTableEntry )
Curve CreateCurve ( in Table theTable, in long theHRow, in long theVRow )
return_value = CreateCurve ( theTable, theHRow, theVRow )
Container CreateContainer ( )
return_value = CreateContainer ( )
Animation CreateAnimation ( in View3D theView3d )
return_value = CreateAnimation ( theView3d )
void DeleteResult ( in Result theResult )
DeleteResult ( theResult )
void DeletePrs3d ( in Prs3d thePrs3d )
DeletePrs3d ( thePrs3d )

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
interface View
IDL file
Python
void ShowPart ( in ViewRepresentation ViewRepr, in boolean state )
ShowPart ( ViewRepr, state )
boolean IsPartShown ( in ViewRepresentation ViewRepr )
return_value = IsPartShown ( ViewRepr )
void SetViewWidth ( in long Width )
SetViewWidth ( Width )
void SetViewHeight ( in long Height )
SetViewHeight ( Height )
long GetViewWidth ( )
return_value = GetViewWidth ( )
long GetViewHeight ( )
return_value = GetViewHeight ( )
void SetViewPositionHorizontal ( in ViewPosition ViewPosHor )
SetViewPositionHorizontal ( ViewPosHor )
void SetViewPositionVertical ( in ViewPosition ViewPosVer )
SetViewPositionVertical ( ViewPosVer )
void SetRelativePosition ( in double x, in double y )
SetRelativePosition ( x, y )
void SetRelativeSize ( in double x, in double y )
SetRelativeSize ( x, y )
void SetTitle ( in string theTitle )
SetTitle ( theTitle )
string GetTitle ( )
return_value = GetTitle ( )
void SetBackground ( in Color theColor )
SetBackground ( theColor )
Color GetBackground ( )
return_value = GetBackground ( )
void Minimize ( )
Minimize ( )
void Restore ( )
Restore ( )
void Maximize ( )
Maximize ( )
void EraseAll ( )
EraseAll ( )
void DisplayAll ( )
DisplayAll ( )
void Erase ( in PrsObject thePrsObj )
Erase ( thePrsObj )
void Display ( in PrsObject thePrsObj )
Display ( thePrsObj )
void DisplayOnly ( in PrsObject thePrsObj )
DisplayOnly ( thePrsObj )
void Update ( )
Update ( )
boolean SavePicture ( in string theFileName )
return_value = SavePicture ( theFileName )

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
interface View3D
IDL file
Python
void FitAll ( )
FitAll ( )
void SetView ( in ViewType theType )
SetView ( theType )
void SetPointOfView ( in XYZ theCoord )
SetPointOfView ( theCoord )
XYZ GetPointOfView ( )
return_value = GetPointOfView ( )
void SetViewUp ( in XYZ theDir )
SetViewUp ( theDir )
XYZ GetViewUp ( )
return_value = GetViewUp ( )
void SetFocalPoint ( in XYZ theDir )
SetFocalPoint ( theDir )
XYZ GetFocalPoint ( )
return_value = GetFocalPoint ( )
void SetParallelScale ( in double theScale )
SetParallelScale ( theScale )
double GetParallelScale ( )
return_value = GetParallelScale ( )
void ScaleView ( in Axis theAxis, in double theParam )
ScaleView ( theAxis, theParam )
void RemoveScale ( )
RemoveScale ( )
boolean SaveViewParams ( in string theName )
return_value = SaveViewParams ( theName )
boolean RestoreViewParams ( in string theName )
return_value = RestoreViewParams ( theName )

- - - - - - - -
interface TableView
IDL file
Python

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
interface XYPlot
IDL file
Python
void SetSubTitle ( in string theTitle )
SetSubTitle ( theTitle )
string GetSubTitle ( )
return_value = GetSubTitle ( )
void SetCurveType ( in CurveType theType )
SetCurveType ( theType )
CurveType GetCurveType ( )
return_value = GetCurveType ( )
void SetMarkerSize ( in long theSize )
SetMarkerSize ( theSize )
long GetMarkerSize ( )
return_value = GetMarkerSize ( )
void EnableXGrid ( in boolean theMajor, in long theNumMajor, in boolean theMinor, in long theNumMinor )
EnableXGrid ( theMajor, theNumMajor, theMinor, theNumMinor )
void EnableYGrid ( in boolean theMajor, in long theNumMajor, in boolean theMinor, in long theNumMinor )
EnableYGrid ( theMajor, theNumMajor, theMinor, theNumMinor )
void SetHorScaling ( in Scaling theScaling )
SetHorScaling ( theScaling )
Scaling GetHorScaling ( )
return_value = GetHorScaling ( )
void SetVerScaling ( in Scaling theScaling )
SetVerScaling ( theScaling )
Scaling GetVerScaling ( )
return_value = GetVerScaling ( )
void SetXTitle ( in string theTitle )
SetXTitle ( theTitle )
string GetXTitle ( )
return_value = GetXTitle ( )
void SetYTitle ( in string theTitle )
SetYTitle ( theTitle )
string GetYTitle ( )
return_value = GetYTitle ( )
void ShowLegend ( in boolean theShowing )
ShowLegend ( theShowing )
void FitAll ( )
FitAll ( )

- - - - - - - - - - - - - - - - - - - - - - - - - - - -
interface ViewManager
IDL file
Python
View GetCurrentView ( )
return_value = GetCurrentView ( )
View3D Create3DView ( )
return_value = Create3DView ( )
TableView CreateTableView ( in Table theTable )
return_value = CreateTableView ( theTable )
XYPlot CreateXYPlot ( )
return_value = CreateXYPlot ( )
void Destroy ( in View theView )
Destroy ( theView )

-
diff --git a/doc/salome/tui/VISU/doxyfile b/doc/salome/tui/VISU/doxyfile deleted file mode 100755 index 3ee35aea..00000000 --- a/doc/salome/tui/VISU/doxyfile +++ /dev/null @@ -1,200 +0,0 @@ -# Doxyfile 1.3-rc1 - -#--------------------------------------------------------------------------- -# General configuration options -#--------------------------------------------------------------------------- -PROJECT_NAME = "SALOME - VISU - v.2.1.0" -PROJECT_NUMBER = id#1.1 -OUTPUT_DIRECTORY = ../ -OUTPUT_LANGUAGE = English -EXTRACT_ALL = YES -EXTRACT_PRIVATE = YES -EXTRACT_STATIC = YES -EXTRACT_LOCAL_CLASSES = YES -HIDE_UNDOC_MEMBERS = NO -HIDE_UNDOC_CLASSES = NO -HIDE_FRIEND_COMPOUNDS = NO -HIDE_IN_BODY_DOCS = NO -BRIEF_MEMBER_DESC = YES -REPEAT_BRIEF = NO -ALWAYS_DETAILED_SEC = YES -INLINE_INHERITED_MEMB = YES -FULL_PATH_NAMES = NO -STRIP_FROM_PATH = -INTERNAL_DOCS = YES -CASE_SENSE_NAMES = YES -SHORT_NAMES = NO -HIDE_SCOPE_NAMES = NO -VERBATIM_HEADERS = YES -SHOW_INCLUDE_FILES = YES -JAVADOC_AUTOBRIEF = YES -MULTILINE_CPP_IS_BRIEF = NO -DETAILS_AT_TOP = NO -INHERIT_DOCS = YES -INLINE_INFO = YES -SORT_MEMBER_DOCS = NO -DISTRIBUTE_GROUP_DOC = NO -TAB_SIZE = 5 -GENERATE_TODOLIST = YES -GENERATE_TESTLIST = YES -GENERATE_BUGLIST = YES -GENERATE_DEPRECATEDLIST= YES -ALIASES = -ENABLED_SECTIONS = -MAX_INITIALIZER_LINES = 25 -OPTIMIZE_OUTPUT_FOR_C = YES -OPTIMIZE_OUTPUT_JAVA = YES -SHOW_USED_FILES = NO -#--------------------------------------------------------------------------- -# configuration options related to warning and progress messages -#--------------------------------------------------------------------------- -QUIET = NO -WARNINGS = YES -WARN_IF_UNDOCUMENTED = YES -WARN_FORMAT = "$file:$line: $text" -WARN_LOGFILE = log.txt -#--------------------------------------------------------------------------- -# configuration options related to the input files -#--------------------------------------------------------------------------- -INPUT = ../../../share/salome/idl/VISU_Gen.idl -FILE_PATTERNS = -RECURSIVE = NO -EXCLUDE = -EXCLUDE_SYMLINKS = NO -EXCLUDE_PATTERNS = -EXAMPLE_PATH = -EXAMPLE_PATTERNS = -EXAMPLE_RECURSIVE = NO -IMAGE_PATH = sources/ -INPUT_FILTER = -FILTER_SOURCE_FILES = YES -#--------------------------------------------------------------------------- -# configuration options related to source browsing -#--------------------------------------------------------------------------- -SOURCE_BROWSER = NO -INLINE_SOURCES = NO -STRIP_CODE_COMMENTS = YES -REFERENCED_BY_RELATION = NO -REFERENCES_RELATION = YES -#--------------------------------------------------------------------------- -# configuration options related to the alphabetical class index -#--------------------------------------------------------------------------- -ALPHABETICAL_INDEX = NO -COLS_IN_ALPHA_INDEX = 5 -IGNORE_PREFIX = -#--------------------------------------------------------------------------- -# configuration options related to the HTML output -#--------------------------------------------------------------------------- -GENERATE_HTML = YES -HTML_OUTPUT = VISU -HTML_FILE_EXTENSION = .html -HTML_HEADER = sources/myheader.html -HTML_FOOTER = -HTML_STYLESHEET = -HTML_ALIGN_MEMBERS = YES -GENERATE_HTMLHELP = NO -CHM_FILE = -HHC_LOCATION = -GENERATE_CHI = NO -BINARY_TOC = YES -TOC_EXPAND = YES -DISABLE_INDEX = YES -ENUM_VALUES_PER_LINE = 4 -GENERATE_TREEVIEW = YES -TREEVIEW_WIDTH = 250 -#--------------------------------------------------------------------------- -# configuration options related to the LaTeX output -#--------------------------------------------------------------------------- -GENERATE_LATEX = NO -LATEX_OUTPUT = latex -LATEX_CMD_NAME = latex -MAKEINDEX_CMD_NAME = makeindex -COMPACT_LATEX = NO -PAPER_TYPE = a4wide -EXTRA_PACKAGES = -LATEX_HEADER = -PDF_HYPERLINKS = NO -USE_PDFLATEX = NO -LATEX_BATCHMODE = NO -#--------------------------------------------------------------------------- -# configuration options related to the RTF output -#--------------------------------------------------------------------------- -GENERATE_RTF = NO -RTF_OUTPUT = rtf -COMPACT_RTF = NO -RTF_HYPERLINKS = NO -RTF_STYLESHEET_FILE = -RTF_EXTENSIONS_FILE = -#--------------------------------------------------------------------------- -# configuration options related to the man page output -#--------------------------------------------------------------------------- -GENERATE_MAN = NO -MAN_OUTPUT = man -MAN_EXTENSION = .3 -MAN_LINKS = NO -#--------------------------------------------------------------------------- -# configuration options related to the XML output -#--------------------------------------------------------------------------- -GENERATE_XML = NO -XML_SCHEMA = -XML_DTD = -#--------------------------------------------------------------------------- -# configuration options for the AutoGen Definitions output -#--------------------------------------------------------------------------- -GENERATE_AUTOGEN_DEF = NO -#--------------------------------------------------------------------------- -# configuration options related to the Perl module output -#--------------------------------------------------------------------------- -GENERATE_PERLMOD = NO -PERLMOD_LATEX = NO -PERLMOD_PRETTY = YES -PERLMOD_MAKEVAR_PREFIX = -#--------------------------------------------------------------------------- -# Configuration options related to the preprocessor -#--------------------------------------------------------------------------- -ENABLE_PREPROCESSING = YES -MACRO_EXPANSION = YES -EXPAND_ONLY_PREDEF = NO -SEARCH_INCLUDES = YES -INCLUDE_PATH = -INCLUDE_FILE_PATTERNS = -PREDEFINED = -EXPAND_AS_DEFINED = -SKIP_FUNCTION_MACROS = NO -#--------------------------------------------------------------------------- -# Configuration::addtions related to external references -#--------------------------------------------------------------------------- -TAGFILES = -GENERATE_TAGFILE = -ALLEXTERNALS = NO -EXTERNAL_GROUPS = YES -PERL_PATH = /usr/bin/perl -#--------------------------------------------------------------------------- -# Configuration options related to the dot tool -#--------------------------------------------------------------------------- -CLASS_DIAGRAMS = YES -HIDE_UNDOC_RELATIONS = NO -HAVE_DOT = YES -CLASS_GRAPH = YES -COLLABORATION_GRAPH = NO -TEMPLATE_RELATIONS = YES -INCLUDE_GRAPH = YES -INCLUDED_BY_GRAPH = NO -GRAPHICAL_HIERARCHY = YES -DOT_IMAGE_FORMAT = jpg -DOT_PATH = -DOTFILE_DIRS = -MAX_DOT_GRAPH_WIDTH = 1024 -MAX_DOT_GRAPH_HEIGHT = 1200 -GENERATE_LEGEND = NO -DOT_CLEANUP = YES -#--------------------------------------------------------------------------- -# Configuration::addtions related to the search engine -#--------------------------------------------------------------------------- -SEARCHENGINE = NO -CGI_NAME = search.cgi -CGI_URL = -DOC_URL = -DOC_ABSPATH = -BIN_ABSPATH = /usr/local/bin/ -EXT_DOC_PATHS = diff --git a/doc/salome/tui/VISU/sources/Application-About.png b/doc/salome/tui/VISU/sources/Application-About.png deleted file mode 100755 index 7b58330d..00000000 Binary files a/doc/salome/tui/VISU/sources/Application-About.png and /dev/null differ diff --git a/doc/salome/tui/VISU/sources/Application-About1.jpg b/doc/salome/tui/VISU/sources/Application-About1.jpg deleted file mode 100755 index cf7ab8ba..00000000 Binary files a/doc/salome/tui/VISU/sources/Application-About1.jpg and /dev/null differ diff --git a/doc/salome/tui/VISU/sources/application.gif b/doc/salome/tui/VISU/sources/application.gif deleted file mode 100644 index 0b05d5c1..00000000 Binary files a/doc/salome/tui/VISU/sources/application.gif and /dev/null differ diff --git a/doc/salome/tui/VISU/sources/application.jpg b/doc/salome/tui/VISU/sources/application.jpg deleted file mode 100755 index a6979ab9..00000000 Binary files a/doc/salome/tui/VISU/sources/application.jpg and /dev/null differ diff --git a/doc/salome/tui/VISU/sources/bg_salome.gif b/doc/salome/tui/VISU/sources/bg_salome.gif deleted file mode 100644 index c7e03068..00000000 Binary files a/doc/salome/tui/VISU/sources/bg_salome.gif and /dev/null differ diff --git a/doc/salome/tui/VISU/sources/logocorp.gif b/doc/salome/tui/VISU/sources/logocorp.gif deleted file mode 100755 index 7697e083..00000000 Binary files a/doc/salome/tui/VISU/sources/logocorp.gif and /dev/null differ diff --git a/doc/salome/tui/VISU/sources/myheader.html b/doc/salome/tui/VISU/sources/myheader.html deleted file mode 100755 index 83ca543c..00000000 --- a/doc/salome/tui/VISU/sources/myheader.html +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - Main Page - - - -  -
- - - - - - -
-
-
- - - - diff --git a/doc/salome/tui/VISU/sources/occ.gif b/doc/salome/tui/VISU/sources/occ.gif deleted file mode 100755 index ce017c8a..00000000 Binary files a/doc/salome/tui/VISU/sources/occ.gif and /dev/null differ diff --git a/doc/salome/tui/VISU/sources/static/DataStruct.gif b/doc/salome/tui/VISU/sources/static/DataStruct.gif deleted file mode 100755 index bec28ad2..00000000 Binary files a/doc/salome/tui/VISU/sources/static/DataStruct.gif and /dev/null differ diff --git a/doc/salome/tui/VISU/sources/static/PrsObj.gif b/doc/salome/tui/VISU/sources/static/PrsObj.gif deleted file mode 100755 index a8aa81fe..00000000 Binary files a/doc/salome/tui/VISU/sources/static/PrsObj.gif and /dev/null differ diff --git a/doc/salome/tui/VISU/sources/static/View.gif b/doc/salome/tui/VISU/sources/static/View.gif deleted file mode 100755 index b6aa909e..00000000 Binary files a/doc/salome/tui/VISU/sources/static/View.gif and /dev/null differ diff --git a/doc/salome/tui/VISU/sources/static/doxygen.css b/doc/salome/tui/VISU/sources/static/doxygen.css deleted file mode 100755 index 0a8e93d5..00000000 --- a/doc/salome/tui/VISU/sources/static/doxygen.css +++ /dev/null @@ -1,49 +0,0 @@ -H1 { text-align: center; } -CAPTION { font-weight: bold } -A.qindex {} -A.qindexRef {} -A.el { text-decoration: none; font-weight: bold } -A.elRef { font-weight: bold } -A.code { text-decoration: none; font-weight: normal; color: #4444ee } -A.codeRef { font-weight: normal; color: #4444ee } -A:hover { text-decoration: none; background-color: lightblue } -DL.el { margin-left: -1cm } -DIV.fragment { width: 100%; border: none; background-color: #CCCCCC } -DIV.ah { background-color: #CCCCCC; font-weight: bold; color: #ffffff; margin-bottom: 3px; margin-top: 3px } -TD.md { background-color: lightblue; font-weight: bold; } -TD.mdname1 { background-color: lightblue; font-weight: bold; color: #602020; } -TD.mdname { background-color: lightblue; font-weight: bold; color: #602020; width: 600px; } -DIV.groupHeader { margin-left: 16px; margin-top: 12px; margin-bottom: 6px; font-weight: bold } -DIV.groupText { margin-left: 16px; font-style: italic; font-size: smaller } -BODY { background: url(sources/bg_salome.gif) } -TD.indexkey { - background-color: #CCCCCC; - font-weight: bold; - padding-right : 10px; - padding-top : 2px; - padding-left : 10px; - padding-bottom : 2px; - margin-left : 0px; - margin-right : 0px; - margin-top : 2px; - margin-bottom : 2px -} -TD.indexvalue { - background-color: #CCCCCC; - font-style: italic; - padding-right : 10px; - padding-top : 2px; - padding-left : 10px; - padding-bottom : 2px; - margin-left : 0px; - margin-right : 0px; - margin-top : 2px; - margin-bottom : 2px -} -span.keyword { color: #008000 } -span.keywordtype { color: #604020 } -span.keywordflow { color: #e08000 } -span.comment { color: #800000 } -span.preprocessor { color: #806020 } -span.stringliteral { color: #002080 } -span.charliteral { color: #008080 } diff --git a/doc/salome/tui/VISU/sources/static/examples_VISU.html b/doc/salome/tui/VISU/sources/static/examples_VISU.html deleted file mode 100755 index 40e26ee9..00000000 --- a/doc/salome/tui/VISU/sources/static/examples_VISU.html +++ /dev/null @@ -1,1270 +0,0 @@ - - - - - - - - Main Page - - - - -   -
- - - - - - - - -
- - -
-
- -

Examples

-      Interfaces:
-
- VISU::Base

- VISU::VISU_Gen
- VISU::PrsObject
-

- VISU::Result
-
- VISU::Prs3d

- VISU::Mesh
- VISU::ScalarMap
- VISU::CutPlanes
- VISU::CutLines
- VISU::IsoSurfaces
- VISU::DeformedShape
- VISU::Vectors
- VISU::StreamLines
-
- VISU::Table
- VISU::Curve
- VISU::Container
-
- VISU::ViewManager

- VISU::View
- VISU::View3D
- VISU::TableView
- VISU::XYPlot
- -

Base

- - - - - - - - - - - - -
IdType - VISU::Base::GetID   -
-
- -

#Returns ID of the object. That is IOR of CORBA representation a VISU -object.
-

- -

aSObject = myLocalStudy.FindObjectIOR(theResult.GetID())
-

- - - - - - - - - - - -
VISUType - VISU::Base::GetType   -
- -

#Returns the type of the presentable object. It can be used for quick -class definition of an VISU object
-
- if aVISUObject.GetType() == VISU.TSCALARMAP :
-     #do something ...
-

- -


-

-

VISU_Gen
-

- - - - - - - - - - - - - -
void VISU::VISU_Gen::SetCurrentStudy - in SALOMEDS::Study   theStudy -
-
-
- -

- - - - - - - -
- - - - - - - - - - - -
SALOMEDS::Study -VISU::VISU_Gen::GetCurrentStudy   -
-
-
-
- #It is very important to set SALOMEDS::Study for VISU Engine before you -start any work with them.
- #Every object that you will create will be assigned to the study you set -before.
- #It can be done like this:
-

- -

aStudy = myStudyManager.NewStudy("A foo Study")
- if aStudy is None : raise RuntimeError, "Error"
- else : print "OK"
-     theVisuGen.SetCurrentStudy(aStudy)
-     #to do every things you like
-     ...
-

- -

- - - - - - - -
- - - - - - - - - - - -
ViewManager -VISU::VISU_Gen::GetViewManager   -
-
-
- - - - - - - - - -
  -

Gets the ViewManager which is used for creation of post-processing -presentations.

-
-
- #In order to display any VISU::PrsObject in propriate viewer you must take -VISU::ViewManager interface
-

- -

aViewManager = myVisuGen.GetViewManager()
- #to do something for displaing some presentation
- ...
-

- -

- - - - - - - -
- - - - - - - - - - - - -
SALOMEDS::SObject -VISU::VISU_Gen::ImportTables in string   theFileName -
-
-
- - - - - - - - - -
  -

Imports tables from a file and create TableAttribute in Sudy -

-
-
- #It is possible to import some ASCII files that include text table representation. -One file can consist from more than one table.
-

- -

aSObject = myVisuGen.ImportTables("/MyPresicousFileOfTables.txt")
-

- -

- - - - - - - -
- - - - - - - - - - - - -
Result -VISU::VISU_Gen::ImportFile in string   theFileName -
-
-
- - - - - - - - - -
  -

Imports data from a file.

-
-
- #It is possible import a med files to VISU
-

- -

aResult = myVisuGen.ImportFile("/ItIsDreamOfMyLife.med")
-

- -

- - - - - - - -
- - - - - - - - - - - - -
Result -VISU::VISU_Gen::ImportMed in SALOMEDS::SObject   theMedSObject -
-
-
- - - - - - - - - -
  -

Imports data from a MED object.

-
-
- #
-

- -

- - - - - - - -
- - - - - - - - - - - - -
Result -VISU::VISU_Gen::ImportMedField in SALOME_MED::FIELD   theField -
-
-
- - - - - - - - - -
  -

Imports data from a MED field.

-
-

- -

- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Mesh -VISU::VISU_Gen::MeshOnEntity in Result   theResult, -

-

-
in string   theMeshName, -

-

-
in Entity   theEntity

-

-
-
- - - - - - - - - -
  -

Creates a Mesh on the basis of the data generated in other sources -(MED object or file).

-
-

- -

- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Mesh -VISU::VISU_Gen::FamilyMeshOnEntity in Result   theResult, -

-

-
in string   theMeshName, -

-

-
in Entity   theEntity, -

-

-
in string   theFamilyName

-

-
-
-

- -

- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Mesh -VISU::VISU_Gen::GroupMesh in Result   theResult, -

-

-
in string   theMeshName, -

-

-
in string   theGroupName

-

-
-
-

- -

- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ScalarMap -VISU::VISU_Gen::ScalarMapOnField in Result   theResult, -

-

-
in string   theMeshName, -

-

-
in Entity   theEntity, -

-

-
in string   theFieldName, -

-

-
in double   theIteration

-

-
-
- - - - - - - - - -
  -

Creates a scalar bar presentation.

- -
-
Parameters:
-
- - - - - - - - - - - - - - - - - - - - - - - - -
theResult  Data generated in other sources. (MED object or file) -
theMeshName  One of the meshes presented in MED file
theEntity  Type of entity where the field is defined
theFieldName  Group of data attributed to the MESH. The data can -be scalar or vector.
theIteration  Number of iteration on the field
-
-
-
-

- -

- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
DeformedShape -VISU::VISU_Gen::DeformedShapeOnField in Result   theResult, -

-

-
in string   theMeshName, -

-

-
in Entity   theEntity, -

-

-
in string   theFieldName, -

-

-
in double   theIteration

-

-
-
- - - - - - - - - -
  -

Creates a deformed shape presentation.

- -
-
Parameters:
-
- - - - - - - - - - - - - - - - - - - - - - - - -
theResult  Data generated in other sources. (MED object or file) -
theMeshName  One of the meshes presented in MED file
theEntity  Type of entity where the field is defined
theFieldName  Group of data attributed to the MESH. The data can -be scalar or vector.
theIteration  Number of iteration on the field
-
-
-
-

- -

- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Vectors -VISU::VISU_Gen::VectorsOnField in Result   theResult, -

-

-
in string   theMeshName, -

-

-
in Entity   theEntity, -

-

-
in string   theFieldName, -

-

-
in double   theIteration

-

-
-
- - - - - - - - - -
  -

Creates a vector presentation.

- -
-
Parameters:
-
- - - - - - - - - - - - - - - - - - - - - - - - -
theResult  Data generated in other sources. (MED object or file) -
theMeshName  One of the meshes presented in MED file
theEntity  Type of entity where the field is defined
theFieldName  Group of data attributed to the MESH. The data can -be scalar or vector.
theIteration  Number of iteration on the field
-
-
-
-

- -

- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
IsoSurfaces -VISU::VISU_Gen::IsoSurfacesOnField in Result   theResult, -

-

-
in string   theMeshName, -

-

-
in Entity   theEntity, -

-

-
in string   theFieldName, -

-

-
in double   theIteration

-

-
-
- - - - - - - - - -
  -

Creates an iso surface presentation.

- -
-
Parameters:
-
- - - - - - - - - - - - - - - - - - - - - - - - -
theResult  Data generated in other sources. (MED object or file) -
theMeshName  One of the meshes presented in MED file
theEntity  Type of entity where the field is defined
theFieldName  Group of data attributed to the MESH. The data can -be scalar or vector.
theIteration  Number of iteration on the field
-
-
-
-

- -

- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
StreamLines -VISU::VISU_Gen::StreamLinesOnField in Result   theResult, -

-

-
in string   theMeshName, -

-

-
in Entity   theEntity, -

-

-
in string   theFieldName, -

-

-
in double   theIteration

-

-
-
- - - - - - - - - -
  -

Creates an stream lines presentation.

- -
-
Parameters:
-
- - - - - - - - - - - - - - - - - - - - - - - - -
theResult  Data generated in other sources. (MED object or file) -
theMeshName  One of the meshes presented in MED file
theEntity  Type of entity where the field is defined
theFieldName  Group of data attributed to the MESH. The data can -be scalar or vector.
theIteration  Number of iteration on the field
-
-
-
-

- -

- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
CutPlanes -VISU::VISU_Gen::CutPlanesOnField in Result   theResult, -

-

-
in string   theMeshName, -

-

-
in Entity   theEntity, -

-

-
in string   theFieldName, -

-

-
in double   theIteration

-

-
-
- - - - - -
  -

Creates a presentation of cut planes.

- -
-
Parameters:
-
- - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/doc/salome/tui/VISU/sources/static/overview_VISU.html b/doc/salome/tui/VISU/sources/static/overview_VISU.html deleted file mode 100755 index 844abd40..00000000 --- a/doc/salome/tui/VISU/sources/static/overview_VISU.html +++ /dev/null @@ -1,252 +0,0 @@ - - - - - - Main Page - - - -  -
theResult  Data generated in other sources. (MED object or file) -
theMeshName  One of the meshes presented in MED file
theEntity  Type of entity where the field is defined
theFieldName 
- - - - - - -
-
-
- - -

General overview -

-

Table of contents

- - -
-

1. Introduction

-

Post-processing module VISU for SALOME is destined for visualization of data - produced by other components. VISU provides various forms of data visualization - including:

- -
    -
  • Data tables,
  • -
  • XY plots based on data from tables,
  • -
  • 3D presentations,
  • -
      -
    • Scalar Map,
    • -
    • Deformed Shape,
    • -
    • Vectors,
    • -
    • Iso Surfaces,
    • -
    • Cut Planes,
    • -
    • Stream Lines,
    • -
    • Cut Lines.
    • -
    -
-Back to the contents -

2. Defintions

-

The following terms are used for presentation of the VISU module:

-
-
Study
-
manages data produced by various component of SALOME platform. More detailed description of the SALOME Study can be found in the document named "Data Structure and Persistence Specifications".
-
Component
-
a SALOME software module that implements predefined interfaces. -The component provides the data for the SALOME study in a form of links (stored in the Study) -to the specific data stored in the component. All components are CORBA servers and it allows them -to be running on different host stations.
-
Geometry
a coherent set of data produced by component GEOM or any other geometry tool -and imported using geometry exchange interface (like BRep, IGES and so on).
-
Mesh
a collection of elements used as a support for numeric simulation.
-
Field
the set of results of the same type allocated to mesh elements. -Fields can be one of next types: scalars, vectors, tensors, matrices, character strings.
-
-Back to the contents -

3. Forms of data visualization

-

3.1 Data tables

-

Table represents data in spreadsheet-like form. For these purposes the QTable - widget will be provided. This widget can be reused in any module for any dialog - box as a control. For post-processing data visualization needs this widget is - used inside of Table window (based on non-modal window frame). Data represented - in Table window of post-processing module is be editable.

-

3.2 XY plots

-

XY plot represents calculation data in form of 2D (XY) plotting. -XY plot view is shown in a separated view window (non-modal dialog box), which can be moved in any position of the screen for convenience. -The QWT extension of QT toolkit is used for XY plotting. -QWT provides unlimited number of displayed curves (data sets) and supports logarithmic scale, zooming, and selection.

- -

3.3 3D presentations

-

A 3D presentation shows geometry, mesh and fields in 3D space. -Provides selection, rotation, zooming, scaling, and panning of 3d scene. -Color bar for scalar data presentation is supplied. -For 3D presentation window of the current implementation of VTK viewer in study window is used.

-Back to the contents -

4. Data structure

-

Source data for post-processing module can be imported from MED file or MED object in study data structure (CORBA object) can be used for this purposes.

-

In case of import MED file the data from this file will be converted in form of VTK Data Source format and stored in VISU data structure. In case of using of MED object from study the label in VISU data structure will be created with reference to the corresponded MED object.

-

Available result data is displayed under corresponded MED data label. For every result the number of presentations can be created dependently on result type.

-

Presentation is represented in data structure in form of list of presentation creation parameters. This could be:

-
    -
  • Presentation type (table, XY plot, 3d view);
  • -
  • Presentation subtype (for example for 3d: scalar map, iso-surfaces, combined view and so on);
  • -
  • Parameters of the presentation dependently on its type (number of colors, type of scale, font parameters, grid parameters and so on).
  • -
-

Parameters of presentation are persistent data, which will be stored in study file.

- - -
-Back to the contents -

5. VISU module features and services

-

The functionality of the VISU module is provided by a set of classes which are combined into -the VISU package. -

The API reference of the VISU component can be found here.

-

5.1 Base class

-

This is a root class for all objects of the VISU module.

-

The API reference for this class can be found here.

- -

5.2 ViewManager class

-

This class is used for management of the view windows (creation and deletion).

-

The API reference for this class can be found here.

- -

5.3 View class

-

View class is a base for all other classes, necessary for creation of different views .

- -
-

The API reference for this class can be found here.

- -

5.3.1 3dView class

-

This class provides a set of methods for creation of a 3d view window.

-

The API reference for this class can be found here.

- -

5.3.2 TableView class

-

This class provides a set of methods for creation of a Table view window.

-

The API reference for this class can be found here.

- -

5.3.3 XYPlotView class

-

This class provides a set of methods for creation of a XYPlot view window.

-

The API reference for this class can be found here.

- -

5.4 Result class

-

This class serves for inner representation of data generated in other sources. -(MED object or file) This data is needed for further construction of graphical presentations.

-

The API reference for this class can be found here.

-

5.5 PrsObject class

-

It is the root class of all presentable objects.

-
-

The API reference for this class can be found here.

- -

5.5.1 Curve class

-

Manages presentation parameters of one curve. -This object can be used for presentation of set of curves using Container class.

-

The API reference for this class can be found here.

- -

5.5.2 Table class

-

Manages presentation parameters of a table.

-

The API reference for this class can be found here.

- -

5.5.3 Container class

-

This class is provided in order to create one presentation using several presentable objects. This can provide combination of a set of curves to display them in XY plot view. -

-

The API reference for this class can be found here.

- -

5.5.4 Prs3d class

-

Root class for all 3D presentations.

-

The API reference for this class can be found here.

- -

5.5.5 Mesh class

-

Manages presentation parameters of a 3D presentattion of a mesh. -This object can be used for presentation of set of curves using Container class.

-

The API reference for this class can be found here.

- -

5.5.6 ScalarMap class

-

Manages presentation parameters of the scalar bar.

-

The API reference for this class can be found here.

- -

5.5.7 CutLines class

-

Manages presentation parameters of the cut lines presentation.

-

The API reference for this class can be found here.

- -

5.5.8 CutPlanes class

-

Manages presentation parameters of the cut planes presentation.

-

The API reference for this class can be found here.

- -

5.5.9 IsoSurfaces class

-

Manages presentation parameters of the iso surfaces presentation.

-

The API reference for this class can be found here.

- -

5.5.10 DeformedShape class

-

Manages presentation parameters of the deformed shape presentation.

-

The API reference for this class can be found here.

- -

5.5.11 Vectors class

-

Manages presentation parameters of the vector presentation.

-

The API reference for this class can be found here.

- -

5.5.12 StreamLines class

-

Manages presentation parameters of the streamlines presentation.

-

The API reference for this class can be found here.

- -

5.6 Animation class

-

This class provides a set of methods used for:

-
    -
  • generating different animations,
  • -
  • setting the parameters of the animations,
  • -
  • playing these animations in the VISU module.
  • -
-

The API reference for this class can be found here.

- -

5.7 VISU_Gen class

-

This is the main clas of the VISU component in SALOME application. It is used for , -using the views provided by ViewManager. This class provides a set of methods used for:

-
    -
  • creation of all types of post-processing presentations from given Result and Table object reference
  • -
  • creation of animations
  • - -
-

The API reference for this class can be found here.

-Back to the contents - - diff --git a/doc/salome/tui/VISU/sources/static/page2.html b/doc/salome/tui/VISU/sources/static/page2.html deleted file mode 100755 index d31cf0c4..00000000 --- a/doc/salome/tui/VISU/sources/static/page2.html +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - Main Page - - - -  -
- - - - - - -
-
-
- - - - - - - - diff --git a/doc/salome/tui/VISU/sources/static/treeview.js b/doc/salome/tui/VISU/sources/static/treeview.js deleted file mode 100644 index 55eb43d0..00000000 --- a/doc/salome/tui/VISU/sources/static/treeview.js +++ /dev/null @@ -1,505 +0,0 @@ -//**************************************************************** -// You are free to copy the "Folder-Tree" script as long as you -// keep this copyright notice: -// Script found in: http://www.geocities.com/Paris/LeftBank/2178/ -// Author: Marcelino Alves Martins (martins@hks.com) December '97. -//**************************************************************** - -//Log of changes: -// 17 Feb 98 - Fix initialization flashing problem with Netscape -// -// 27 Jan 98 - Root folder starts open; support for USETEXTLINKS; -// make the ftien4 a js file -// -// DvH: Dec 2000 - Made some minor changes to support external -// references - -// Definition of class Folder -// ***************************************************************** - -function Folder(folderDescription, tagName, hreference) //constructor -{ - //constant data - this.desc = folderDescription - this.tagName = tagName - this.hreference = hreference - this.id = -1 - this.navObj = 0 - this.iconImg = 0 - this.nodeImg = 0 - this.isLastNode = 0 - - //dynamic data - this.isOpen = true - this.iconSrc = "ftv2folderopen.png" - this.children = new Array - this.nChildren = 0 - - //methods - this.initialize = initializeFolder - this.setState = setStateFolder - this.addChild = addChild - this.createIndex = createEntryIndex - this.hide = hideFolder - this.display = display - this.renderOb = drawFolder - this.totalHeight = totalHeight - this.subEntries = folderSubEntries - this.outputLink = outputFolderLink -} - -function setStateFolder(isOpen) -{ - var subEntries - var totalHeight - var fIt = 0 - var i=0 - - if (isOpen == this.isOpen) - return - - if (browserVersion == 2) - { - totalHeight = 0 - for (i=0; i < this.nChildren; i++) - totalHeight = totalHeight + this.children[i].navObj.clip.height - subEntries = this.subEntries() - if (this.isOpen) - totalHeight = 0 - totalHeight - for (fIt = this.id + subEntries + 1; fIt < nEntries; fIt++) - indexOfEntries[fIt].navObj.moveBy(0, totalHeight) - } - this.isOpen = isOpen - propagateChangesInState(this) -} - -function propagateChangesInState(folder) -{ - var i=0 - - if (folder.isOpen) - { - if (folder.nodeImg) - if (folder.isLastNode) - folder.nodeImg.src = "ftv2mlastnode.png" - else - folder.nodeImg.src = "ftv2mnode.png" - folder.iconImg.src = "ftv2folderopen.png" - for (i=0; i 0) - auxEv = "" - else - auxEv = "" - - if (level>0) - if (lastNode) //the last 'brother' in the children array - { - this.renderOb(leftSide + auxEv + "") -// leftSide = leftSide + "" - this.isLastNode = 1 - } - else - { - this.renderOb(leftSide + auxEv + "") - leftSide = leftSide + "" - this.isLastNode = 0 - } - else - this.renderOb("") - - if (nc > 0) - { - level = level + 1 - for (i=0 ; i < this.nChildren; i++) - { - if (i == this.nChildren-1) - this.children[i].initialize(level, 1, leftSide) - else - this.children[i].initialize(level, 0, leftSide) - } - } -} - -function drawFolder(leftSide) -{ - if (browserVersion == 2) { - if (!doc.yPos) - doc.yPos=8 - doc.write("") - } - if (browserVersion == 3) - { - doc.write("
") - } - - doc.write("\n") - doc.write("\n\n") - doc.write("\n
") - doc.write(leftSide) - this.outputLink() - doc.write("") - doc.write("") - if (USETEXTLINKS) - { - this.outputLink() - doc.write(this.desc + "") - } - else - doc.write(this.desc) - -/*! - if (this.tagName!="") - { - doc.write(" [external]") - } -*/ - doc.write("
\n") - - if (browserVersion == 2) { - doc.write("") - } - if (browserVersion == 3) { - doc.write("
") - } - - if (browserVersion == 1) { - this.navObj = doc.all["folder"+this.id] - this.iconImg = doc.all["folderIcon"+this.id] - this.nodeImg = doc.all["nodeIcon"+this.id] - } else if (browserVersion == 2) { - this.navObj = doc.layers["folder"+this.id] - this.iconImg = this.navObj.document.images["folderIcon"+this.id] - this.nodeImg = this.navObj.document.images["nodeIcon"+this.id] - doc.yPos=doc.yPos+this.navObj.clip.height - } else if (browserVersion == 3) { - this.navObj = doc.getElementById("folder"+this.id) - this.iconImg = doc.images.namedItem("folderIcon"+this.id) - this.nodeImg = doc.images.namedItem("nodeIcon"+this.id) - } -} - -function outputFolderLink() -{ - if (this.hreference) - { - doc.write(" 0) - doc.write("onClick='javascript:clickOnFolder("+this.id+")'") - doc.write(">") - } - else - doc.write("") -} - -function addChild(childNode) -{ - this.children[this.nChildren] = childNode - this.nChildren++ - return childNode -} - -function folderSubEntries() -{ - var i = 0 - var se = this.nChildren - - for (i=0; i < this.nChildren; i++){ - if (this.children[i].children) //is a folder - se = se + this.children[i].subEntries() - } - - return se -} - - -// Definition of class Item (a document or link inside a Folder) -// ************************************************************* - -function Item(itemDescription, tagName, itemLink) // Constructor -{ - // constant data - this.desc = itemDescription - this.tagName = tagName - this.link = itemLink - this.id = -1 //initialized in initalize() - this.navObj = 0 //initialized in render() - this.iconImg = 0 //initialized in render() - this.iconSrc = "ftv2doc.png" - - // methods - this.initialize = initializeItem - this.createIndex = createEntryIndex - this.hide = hideItem - this.display = display - this.renderOb = drawItem - this.totalHeight = totalHeight -} - -function hideItem() -{ - if (browserVersion == 1 || browserVersion == 3) { - if (this.navObj.style.display == "none") - return - this.navObj.style.display = "none" - } else { - if (this.navObj.visibility == "hidden") - return - this.navObj.visibility = "hidden" - } -} - -function initializeItem(level, lastNode, leftSide) -{ - this.createIndex() - - if (level>0) - if (lastNode) //the last 'brother' in the children array - { - this.renderOb(leftSide + "") - leftSide = leftSide + "" - } - else - { - this.renderOb(leftSide + "") - leftSide = leftSide + "" - } - else - this.renderOb("") -} - -function drawItem(leftSide) -{ - if (browserVersion == 2) - doc.write("") - if (browserVersion == 3) - doc.write("
") - - doc.write("\n\n") - doc.write("\n
") - doc.write(leftSide) - if (this.link!="") - { - doc.write("") - } - doc.write("") - if (this.link!="") - { - doc.write("") - } - doc.write("") - if (USETEXTLINKS && this.link!="") - doc.write("" + this.desc + "") - else - doc.write(this.desc) -/*! - if (this.tagName!="") - { - doc.write(" [external]"); - } -*/ - doc.write("\n
\n") - - if (browserVersion == 2) - doc.write("") - if (browserVersion == 3) - doc.write("
") - - if (browserVersion == 1) { - this.navObj = doc.all["item"+this.id] - this.iconImg = doc.all["itemIcon"+this.id] - } else if (browserVersion == 2) { - this.navObj = doc.layers["item"+this.id] - this.iconImg = this.navObj.document.images["itemIcon"+this.id] - doc.yPos=doc.yPos+this.navObj.clip.height - } else if (browserVersion == 3) { - this.navObj = doc.getElementById("item"+this.id) - this.iconImg = doc.images.namedItem("itemIcon"+this.id) - } -} - - -// Methods common to both objects (pseudo-inheritance) -// ******************************************************** - -function display() -{ - if (browserVersion == 1 || browserVersion == 3) - this.navObj.style.display = "block" - else - this.navObj.visibility = "show" -} - -function createEntryIndex() -{ - this.id = nEntries - indexOfEntries[nEntries] = this - nEntries++ -} - -// total height of subEntries open -function totalHeight() //used with browserVersion == 2 -{ - var h = this.navObj.clip.height - var i = 0 - - if (this.isOpen) //is a folder and _is_ open - for (i=0 ; i < this.nChildren; i++) - h = h + this.children[i].totalHeight() - - return h -} - - -// Events -// ********************************************************* - -function clickOnFolder(folderId) -{ - var clicked = indexOfEntries[folderId] - - if (!clicked.isOpen) - clickOnNode(folderId) - - return - - if (clicked.isSelected) - return -} - -function clickOnNode(folderId) -{ - var clickedFolder = 0 - var state = 0 - - clickedFolder = indexOfEntries[folderId] - state = clickedFolder.isOpen - - clickedFolder.setState(!state) //open<->close -} - -function initializeDocument() -{ - doc = document; - if (doc.all) - browserVersion = 1 //IE4 - else - if (doc.layers) - browserVersion = 2 //NS4 - else if(navigator.userAgent.toLowerCase().indexOf('gecko') != -1) - browserVersion = 3 //mozilla - else - browserVersion = 0 //other - - foldersTree.initialize(0, 1, "") - foldersTree.display() - - if (browserVersion > 0) - { - if(browserVersion != 3) - doc.write(" ") - - // close the whole tree - clickOnNode(0) - // open the root folder - clickOnNode(0) - } -} - -// Auxiliary Functions for Folder-Treee backward compatibility -// ********************************************************* - -function gFld(description, tagName, hreference) -{ - folder = new Folder(description, tagName, hreference) - return folder -} - -function gLnk(description, tagName, linkData) -{ - fullLink = "" - - if (linkData!="") - { - fullLink = "'"+linkData+"' target=\"basefrm\"" - } - - linkItem = new Item(description, tagName, fullLink) - return linkItem -} - -function insFld(parentFolder, childFolder) -{ - return parentFolder.addChild(childFolder) -} - -function insDoc(parentFolder, document) -{ - parentFolder.addChild(document) -} - -// Global variables -// **************** - -USETEXTLINKS = 1 -indexOfEntries = new Array -nEntries = 0 -doc = document -browserVersion = 0 -selectedFolder=0 diff --git a/idl/Makefile.in b/idl/Makefile.in deleted file mode 100644 index b032d41d..00000000 --- a/idl/Makefile.in +++ /dev/null @@ -1,68 +0,0 @@ -# -# generate dependencies for idl file : -# - -# source path -top_srcdir=@top_srcdir@ -top_builddir=.. -srcdir=@srcdir@ -VPATH=.:${KERNEL_ROOT_DIR}/idl/salome:${MED_ROOT_DIR}/idl/salome - -@COMMENCE@ - -IDL_FILES = \ - VISU_Gen.idl - -PY_CLIENT_IDL = $(IDL_FILES) - -# we copy all idl file in $(top_builddir)/idl -inc: $(top_builddir)/idl/salome $(IDL_FILES:%=$(top_builddir)/idl/salome/%) - -$(top_builddir)/idl/salome: - mkdir $@ - -$(IDL_FILES:%=$(top_builddir)/idl/salome/%):$(IDL_FILES:%=$(top_srcdir)/idl/%) -# $(CP) $< $@ - cp -f $^ $(top_builddir)/idl/salome - - -lib: pyidl - -PYTHON_BUILD_SITE=$(top_builddir)/lib/python$(PYTHON_VERSION)/site-packages/@PACKAGE@ - -pyidl: $(PYTHON_BUILD_SITE) $(IDL_FILES:%.idl=$(PYTHON_BUILD_SITE)/%_idl.py) - -$(PYTHON_BUILD_SITE): - $(INSTALL) -d $@ - -$(PYTHON_BUILD_SITE)/%_idl.py: $(top_builddir)/idl/salome/%.idl - $(OMNIORB_IDL) $(OMNIORB_IDLPYFLAGS) -C$(PYTHON_BUILD_SITE) $< - - -# install python client (generated from idl file -install: install-pyidl install-idl - -# create directory $(idldir) and copy idl files into it -install-idl: $(IDL_FILES:%=$(top_builddir)/idl/salome/%) - $(INSTALL) -d $(idldir) - $(INSTALL_DATA) $^ $(idldir) - - -install-pyidl: $(IDL_FILES:%=$(top_builddir)/idl/salome/%) - $(INSTALL) -d $(PYTHON_SITE_INSTALL) - @for file in $^ dummy; do \ - if [ $$file != "dummy" ]; then \ - $(OMNIORB_IDL) $(OMNIORB_IDLPYFLAGS) -C$(PYTHON_SITE_INSTALL) $$file ; \ - fi ; \ - done ; - -#@ CONCLUDE @ - -cleandep: - -$(RM) .dep* - -distclean: - -$(RM) *.py - -$(RM) $(IDL_FILES:%=$(top_builddir)/idl/salome/%) - -$(RM) Makefile - diff --git a/resources/ModuleVisu.png b/resources/ModuleVisu.png deleted file mode 100644 index 7990d934..00000000 Binary files a/resources/ModuleVisu.png and /dev/null differ diff --git a/resources/VISU.config b/resources/VISU.config deleted file mode 100644 index 69253976..00000000 --- a/resources/VISU.config +++ /dev/null @@ -1 +0,0 @@ -language=en \ No newline at end of file diff --git a/resources/VISU_en.xml b/resources/VISU_en.xml deleted file mode 100644 index 4e3aedae..00000000 --- a/resources/VISU_en.xml +++ /dev/null @@ -1,97 +0,0 @@ - - - - - - - - title="Visu component" - date="24/07/2001" - author="Laurent CORNABE" - appId="Visu for Salome" > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/resources/VISU_fr.xml b/resources/VISU_fr.xml deleted file mode 100644 index b10a3084..00000000 --- a/resources/VISU_fr.xml +++ /dev/null @@ -1,95 +0,0 @@ - - - - - - - - title="Visu component" - date="24/07/2001" - author="Laurent CORNABE" - appId="Visu for Salome" > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/resources/Visu_anim.png b/resources/Visu_anim.png deleted file mode 100644 index 86a5ffb9..00000000 Binary files a/resources/Visu_anim.png and /dev/null differ diff --git a/resources/Visu_cutlines.png b/resources/Visu_cutlines.png deleted file mode 100644 index 3ae88008..00000000 Binary files a/resources/Visu_cutlines.png and /dev/null differ diff --git a/resources/Visu_cutplane.png b/resources/Visu_cutplane.png deleted file mode 100644 index 5e92cf65..00000000 Binary files a/resources/Visu_cutplane.png and /dev/null differ diff --git a/resources/Visu_deformed.png b/resources/Visu_deformed.png deleted file mode 100644 index def8c330..00000000 Binary files a/resources/Visu_deformed.png and /dev/null differ diff --git a/resources/Visu_deformed_anim.png b/resources/Visu_deformed_anim.png deleted file mode 100644 index 4cee8007..00000000 Binary files a/resources/Visu_deformed_anim.png and /dev/null differ diff --git a/resources/Visu_eraseall.png b/resources/Visu_eraseall.png deleted file mode 100644 index 9cf15188..00000000 Binary files a/resources/Visu_eraseall.png and /dev/null differ diff --git a/resources/Visu_graduated_axes.png b/resources/Visu_graduated_axes.png deleted file mode 100755 index 9c9f3d20..00000000 Binary files a/resources/Visu_graduated_axes.png and /dev/null differ diff --git a/resources/Visu_isosurfaces.png b/resources/Visu_isosurfaces.png deleted file mode 100644 index 2946029d..00000000 Binary files a/resources/Visu_isosurfaces.png and /dev/null differ diff --git a/resources/Visu_plot2d.png b/resources/Visu_plot2d.png deleted file mode 100644 index e6d2089f..00000000 Binary files a/resources/Visu_plot2d.png and /dev/null differ diff --git a/resources/Visu_plot3d.png b/resources/Visu_plot3d.png deleted file mode 100644 index ea7b5745..00000000 Binary files a/resources/Visu_plot3d.png and /dev/null differ diff --git a/resources/Visu_points.png b/resources/Visu_points.png deleted file mode 100644 index 92d535ba..00000000 Binary files a/resources/Visu_points.png and /dev/null differ diff --git a/resources/Visu_sameas.png b/resources/Visu_sameas.png deleted file mode 100644 index 3611ef44..00000000 Binary files a/resources/Visu_sameas.png and /dev/null differ diff --git a/resources/Visu_scalars.png b/resources/Visu_scalars.png deleted file mode 100644 index f048e920..00000000 Binary files a/resources/Visu_scalars.png and /dev/null differ diff --git a/resources/Visu_scalars_anim.png b/resources/Visu_scalars_anim.png deleted file mode 100644 index e6188160..00000000 Binary files a/resources/Visu_scalars_anim.png and /dev/null differ diff --git a/resources/Visu_scaling.png b/resources/Visu_scaling.png deleted file mode 100644 index 5d344363..00000000 Binary files a/resources/Visu_scaling.png and /dev/null differ diff --git a/resources/Visu_selectall.png b/resources/Visu_selectall.png deleted file mode 100644 index ec589031..00000000 Binary files a/resources/Visu_selectall.png and /dev/null differ diff --git a/resources/Visu_selectionactor.png b/resources/Visu_selectionactor.png deleted file mode 100644 index 6d6cdfbd..00000000 Binary files a/resources/Visu_selectionactor.png and /dev/null differ diff --git a/resources/Visu_selectioncell.png b/resources/Visu_selectioncell.png deleted file mode 100644 index f83268fe..00000000 Binary files a/resources/Visu_selectioncell.png and /dev/null differ diff --git a/resources/Visu_selectionedge.png b/resources/Visu_selectionedge.png deleted file mode 100644 index bd6d9df9..00000000 Binary files a/resources/Visu_selectionedge.png and /dev/null differ diff --git a/resources/Visu_selectionpoint.png b/resources/Visu_selectionpoint.png deleted file mode 100644 index 0ac7cd43..00000000 Binary files a/resources/Visu_selectionpoint.png and /dev/null differ diff --git a/resources/Visu_selectonly.png b/resources/Visu_selectonly.png deleted file mode 100644 index 3d7b24ea..00000000 Binary files a/resources/Visu_selectonly.png and /dev/null differ diff --git a/resources/Visu_streamlines.png b/resources/Visu_streamlines.png deleted file mode 100644 index 344ca199..00000000 Binary files a/resources/Visu_streamlines.png and /dev/null differ diff --git a/resources/Visu_surface.png b/resources/Visu_surface.png deleted file mode 100644 index 98de1fdb..00000000 Binary files a/resources/Visu_surface.png and /dev/null differ diff --git a/resources/Visu_tree_visu.png b/resources/Visu_tree_visu.png deleted file mode 100644 index 56ce446c..00000000 Binary files a/resources/Visu_tree_visu.png and /dev/null differ diff --git a/resources/Visu_vectors.png b/resources/Visu_vectors.png deleted file mode 100644 index caac1595..00000000 Binary files a/resources/Visu_vectors.png and /dev/null differ diff --git a/resources/Visu_wireframe.png b/resources/Visu_wireframe.png deleted file mode 100644 index 8406b9b9..00000000 Binary files a/resources/Visu_wireframe.png and /dev/null differ diff --git a/src/ENGINE/Makefile.in b/src/ENGINE/Makefile.in deleted file mode 100644 index d26a08ba..00000000 --- a/src/ENGINE/Makefile.in +++ /dev/null @@ -1,50 +0,0 @@ -# Copyright (C) 2003 CEA/DEN, EDF R&D -# -# -# -# File : Makefile.in -# Author : Alexey Petrov -# Module : VISU -# $Header: - -top_srcdir=@top_srcdir@ -top_builddir=../.. -srcdir=@srcdir@ -VPATH=.:@srcdir@:@top_srcdir@/idl - - -@COMMENCE@ - -# Libraries targets -LIB = libVISUEngine.la -LIB_SRC = VISU_Engine_i.cc - -LIB_MOC = - -LIB_SERVER_IDL = VISU_Gen.idl SALOME_Component.idl \ - SALOME_Exception.idl SALOME_GenericObj.idl \ - SALOME_Session.idl MED.idl -LIB_CLIENT_IDL = SALOMEDS.idl SALOMEDS_Attributes.idl SALOME_Comm.idl - -# Executables targets -BIN = -BIN_SRC = - -BIN_CLIENT_IDL = -BIN_SERVER_IDL = - -EXPORT_HEADERS = - -# additionnal information to compil and link file -CPPFLAGS += -I${KERNEL_ROOT_DIR}/include/salome - -LDFLAGS += -L${KERNEL_ROOT_DIR}/lib/salome -lSalomeContainer - -LIBS+= - -# additional file to be cleaned -MOSTLYCLEAN = -CLEAN = -DISTCLEAN = - -@CONCLUDE@ \ No newline at end of file diff --git a/src/GUITOOLS/Makefile.in b/src/GUITOOLS/Makefile.in deleted file mode 100644 index eb8eeac4..00000000 --- a/src/GUITOOLS/Makefile.in +++ /dev/null @@ -1,66 +0,0 @@ -# VISU VISUGUI : GUI of VISU component -# -# Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -# -# This library is free software; you can redistribute it and/or -# modify it 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org -# -# -# -# File : Makefile.in -# Author : Marc Tajchman (CEA) -# Module : VISU -# $Header$ - -top_srcdir=@top_srcdir@ -top_builddir=../.. -srcdir=@srcdir@ -VPATH=.:@srcdir@ - -@COMMENCE@ - -# header files -EXPORT_HEADERS= \ - VisuGUI_TableDlg.h - -# .po files to transform in .qm -#PO_FILES = \ -# VISU_msg_en.po VISU_images.po - -# Libraries targets -LIB = libVISUGUITOOLS.la - -LIB_SRC = VisuGUI_TableDlg.cxx - -LIB_MOC = VisuGUI_TableDlg.h - -LIB_CLIENT_IDL = SALOME_Exception.idl - -LIB_SERVER_IDL = - -# additionnal information to compil and link file - -CPPFLAGS += -ftemplate-depth-32 $(QT_INCLUDES) $(VTK_INCLUDES) $(OCC_INCLUDES) \ - $(PYTHON_INCLUDES) $(HDF5_INCLUDES) $(QWT_INCLUDES) \ - -I${KERNEL_ROOT_DIR}/include/salome $(BOOST_CPPFLAGS) - -CXXFLAGS += -ftemplate-depth-32 $(OCC_CXXFLAGS) \ - -I${KERNEL_ROOT_DIR}/include/salome -I${GUI_ROOT_DIR}/include/salome - -LDFLAGS += $(QWT_LIBS) -L${KERNEL_ROOT_DIR}/lib/salome -L${GUI_ROOT_DIR}/lib/salome - -@CONCLUDE@ diff --git a/src/GUITOOLS/VisuGUI_TableDlg.cxx b/src/GUITOOLS/VisuGUI_TableDlg.cxx deleted file mode 100644 index 24443ef7..00000000 --- a/src/GUITOOLS/VisuGUI_TableDlg.cxx +++ /dev/null @@ -1,885 +0,0 @@ -// VISU VISUGUI : GUI of VISU component -// -// Copyright (C) 2003 CEA/DEN, EDF R&D -// -// -// -// File : VisuGUI_TableDlg.cxx -// Author : Vadim SANDLER -// Module : SALOME - -#include "VisuGUI_TableDlg.h" - -#include "SUIT_Tools.h" -#include "SUIT_MessageBox.h" - -#include "SALOMEDSClient_Study.hxx" -#include "SALOMEDSClient_GenericAttribute.hxx" -#include "SALOMEDSClient_AttributeTableOfInteger.hxx" -#include "SALOMEDSClient_AttributeTableOfReal.hxx" -#include "SALOMEDSClient_StudyBuilder.hxx" - -#include -#include -#include -#include -#include -#include -#include -#include -#include "utilities.h" -using namespace std; - -#define MARGIN_SIZE 11 -#define SPACING_SIZE 6 -#define SPACER_SIZE 5 -#define MIN_TABLE_WIDTH 200 -#define MIN_TABLE_HEIGHT 200 - - -class VisuGUI_Table : public QTable { -public: - VisuGUI_Table( Orientation orient, QWidget* parent = 0, const char* name = 0 ) - : QTable( parent, name ), myValidator( 0 ), myOrientation( orient ) {} - VisuGUI_Table( Orientation orient, int numRows, int numCols, QWidget* parent = 0, const char* name = 0 ) - : QTable( numRows, numCols, parent, name ), myValidator( 0 ), myOrientation( orient ) {} - - void setValidator( QValidator* v = 0 ) { myValidator = v; } - bool isEditing() const { return QTable::isEditing(); } - -protected: - QWidget* createEditor ( int row, int col, bool initFromCell ) const - { - bool testUnits = ( myOrientation == Horizontal && col == 0 ) || ( myOrientation == Vertical && row == 0 ); - QWidget* wg = QTable::createEditor( row, col, initFromCell ); - if ( wg && wg->inherits("QLineEdit") && myValidator && !testUnits ) - (( QLineEdit*)wg)->setValidator( myValidator ); - return wg; - } - -protected: - QValidator* myValidator; - Orientation myOrientation; -}; - -/*! - Constructor -*/ -VisuGUI_TableDlg::VisuGUI_TableDlg( QWidget* parent, - _PTR(SObject) obj, - bool edit, - int which, - Orientation orient, - bool showColumnTitles ) - : QDialog( parent, "", false, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu | WDestructiveClose), - myIntTable( 0 ), myRealTable( 0 ) -{ - setCaption( edit ? tr( "EDIT_TABLE_TLT" ) : tr( "VIEW_TABLE_TLT" ) ); - setSizeGripEnabled( true ); - - myObject = obj; - bool bHasIntTable = false; - bool bHasRealTable = false; - if ( myObject ) { - _PTR(GenericAttribute) anAttr; - bHasIntTable = myObject->FindAttribute( anAttr, "AttributeTableOfInteger"); - bHasRealTable = myObject->FindAttribute( anAttr, "AttributeTableOfReal"); - } - - QVBoxLayout* mainLayout = new QVBoxLayout( this ); - mainLayout->setMargin( MARGIN_SIZE ); - mainLayout->setSpacing( SPACING_SIZE ); - - bool bDoInt = which == ttInt || which == ttBoth || which == ttAuto && bHasIntTable; - bool bDoReal = which == ttReal || which == ttBoth || which == ttAuto && bHasRealTable; - - QWidget* top; - QVBoxLayout* tl; - if ( bDoInt && bDoReal ) { - top = new QTabWidget( this, "TabWidget" ); - ( ( QTabWidget* ) top) ->setMargin( MARGIN_SIZE ); - } - else { - top = new QWidget( this, "DumbWidget" ); - tl = new QVBoxLayout( top ); tl->setMargin( 0 ); tl->setSpacing( SPACING_SIZE ); - } - - if ( bDoInt ) { - myIntTable = new VisuGUI_TableWidget( top, "myIntTable", edit, orient, showColumnTitles ); - myIntTable->getTable()->setValidator( new QIntValidator( this ) ); - if ( bDoInt && bDoReal ) - ( ( QTabWidget* )top )->addTab( myIntTable, tr( "TABLE_OF_INTEGER_TLT" ) ); - else - tl->addWidget( myIntTable ); - } - if ( bDoReal ) { - myRealTable = new VisuGUI_TableWidget( top, "myRealTable", edit, orient, showColumnTitles ); - myRealTable->getTable()->setValidator( new QDoubleValidator( this ) ); - if ( bDoInt && bDoReal ) - ( ( QTabWidget* )top )->addTab( myRealTable, tr( "TABLE_OF_REAL_TLT" ) ); - else - tl->addWidget( myRealTable ); - } - if ( !bDoInt && !bDoReal ) { - QLabel *dumbLabel = new QLabel( tr( "ERR_TABLE_NOT_AVAILABLE" ), top, "DumbLabel" ); - dumbLabel->setAlignment( AlignCenter ); - tl->addWidget( dumbLabel ); - } - - QHBoxLayout* btnLayout = new QHBoxLayout; - btnLayout->setMargin( 0 ); btnLayout->setSpacing( SPACING_SIZE ); - - myOKBtn = new QPushButton( tr( "BUT_OK" ), this ); - if ( edit ) { - myCancelBtn = new QPushButton( tr( "BUT_CANCEL" ), this ); - btnLayout->addWidget( myOKBtn ); - btnLayout->addItem( new QSpacerItem( SPACER_SIZE, SPACER_SIZE, QSizePolicy::Expanding, QSizePolicy::Minimum ) ); - btnLayout->addWidget( myCancelBtn ); - connect( myOKBtn, SIGNAL( clicked() ), this, SLOT( onOK() ) ); - connect( myCancelBtn, SIGNAL( clicked() ), this, SLOT( reject() ) ); - } - else { - btnLayout->addItem( new QSpacerItem( SPACER_SIZE, SPACER_SIZE, QSizePolicy::Expanding, QSizePolicy::Minimum ) ); - btnLayout->addWidget( myOKBtn ); - btnLayout->addItem( new QSpacerItem( SPACER_SIZE, SPACER_SIZE, QSizePolicy::Expanding, QSizePolicy::Minimum ) ); - connect( myOKBtn, SIGNAL( clicked() ), this, SLOT( accept() ) ); - } - - mainLayout->addWidget( top ); - mainLayout->addLayout( btnLayout ); - - initDlg(); - resize( 500, 400 ); - SUIT_Tools::centerWidget( this, parent ); -} - -/*! - Destructor -*/ -VisuGUI_TableDlg::~VisuGUI_TableDlg() -{ -} - -/*! - button slot, saves table(s) - Called only in create/edit mode ( parameter for constructor is true ) -*/ -void VisuGUI_TableDlg::onOK() -{ - myOKBtn->setFocus(); // accept possible changes - bool done = true; - - if ( myObject ) { - _PTR(Study) study = myObject->GetStudy(); - _PTR(AttributeTableOfInteger) tblIntAttr; - _PTR(AttributeTableOfReal) tblRealAttr; - - if ( study ) { - _PTR(StudyBuilder) builder = study->NewBuilder(); - builder->NewCommand(); // start transaction !!!!!!!!!!!!!!!!!!!!!!!!!!!!! - try { - if ( myIntTable ) { - builder->RemoveAttribute( myObject, "AttributeTableOfInteger" ); - tblIntAttr = builder->FindOrCreateAttribute( myObject, "AttributeTableOfInteger" ); - - int i; - int nbRows = myIntTable->getNumRows(); - int nbCols = myIntTable->getNumCols(); - QString tlt = myIntTable->getTableTitle(); - QStringList rowTitles, colTitles, units; - myIntTable->getRowTitles( rowTitles ); - myIntTable->getColTitles( colTitles ); - myIntTable->getUnits( units ); - - if ( nbRows > 0) { - // data - int nRow = 0; - tblIntAttr->SetNbColumns( nbCols ); - for ( i = 0; i < nbRows; i++ ) { - QStringList data; - myIntTable->getRowData( i, data ); - bool bEmptyRow = true; - for ( int j = 0; j < data.count(); j++ ) { - if ( !data[ j ].isNull() ) { - tblIntAttr->PutValue( data[ j ].toInt(), nRow+1, j+1 ); - bEmptyRow = false; - } - } - if ( !bEmptyRow ) { // Skip rows with no data !!! - // set row title - tblIntAttr->SetRowTitle( nRow+1, rowTitles[ i ].isNull() ? "" : rowTitles[ i ].latin1() ); - // set row unit - tblIntAttr->SetRowUnit( nRow+1, units[ i ].isNull() ? "" : units[ i ].latin1() ); - nRow++; - } - } - if ( nRow > 0 ) { // Set columns only if table is not empty, otherwise exception is raised !!! - // column titles - for ( i = 0; i < colTitles.count(); i++ ) - tblIntAttr->SetColumnTitle( i+1, colTitles[ i ].isNull() ? "" : colTitles[ i ].latin1() ); - } - } - // title - tblIntAttr->SetTitle( myIntTable->getTableTitle().latin1() ); - } - if ( myRealTable ) { - builder->RemoveAttribute( myObject, "AttributeTableOfReal" ); - tblRealAttr = builder->FindOrCreateAttribute( myObject, "AttributeTableOfReal" ); - - int i; - int nbRows = myRealTable->getNumRows(); - int nbCols = myRealTable->getNumCols(); - QString tlt = myRealTable->getTableTitle(); - QStringList rowTitles, colTitles, units; - myRealTable->getRowTitles( rowTitles ); - myRealTable->getColTitles( colTitles ); - myRealTable->getUnits( units ); - - if ( nbRows > 0) { - // data - int nRow = 0; - tblRealAttr->SetNbColumns( nbCols ); - for ( i = 0; i < nbRows; i++ ) { - QStringList data; - myRealTable->getRowData( i, data ); - bool bEmptyRow = true; - for ( int j = 0; j < data.count(); j++ ) { - if ( !data[ j ].isNull() ) { - tblRealAttr->PutValue( data[ j ].toDouble(), nRow+1, j+1 ); - bEmptyRow = false; - } - } - if ( !bEmptyRow ) { // Skip rows with no data !!! - // set row title - tblRealAttr->SetRowTitle( nRow+1, rowTitles[ i ].isNull() ? "" : rowTitles[ i ].latin1() ); - // set row unit - tblRealAttr->SetRowUnit( nRow+1, units[ i ].isNull() ? "" : units[ i ].latin1() ); - nRow++; - } - } - if ( nRow > 0 ) { // Set columns only if table is not empty, otherwise exception is raised !!! - // column titles - for ( i = 0; i < colTitles.count(); i++ ) - tblRealAttr->SetColumnTitle( i+1, colTitles[ i ].isNull() ? "" : colTitles[ i ].latin1() ); - } - } - // title - tblRealAttr->SetTitle( myRealTable->getTableTitle().latin1() ); - } - if ( myIntTable || myRealTable) - builder->CommitCommand(); // commit transaction !!!!!!!!!!!!!!!!!!!!!!!!!!! - else - builder->AbortCommand(); // abort transaction !!!!!!!!!!!!!!!!!!!!!!!!!!! - } - catch( ... ) { - MESSAGE("VisuGUI_TableDlg::onOK : Exception has been caught !!!"); - builder->AbortCommand(); // abort transaction !!!!!!!!!!!!!!!!!!!!!!!!!!! - done = false; - SUIT_MessageBox::error1 ( this, tr("ERR_ERROR"), tr("ERR_APP_EXCEPTION"), tr ("BUT_OK") ); - } - } - } - if ( done ) - accept(); -} - -/*! - Populates table with data -*/ -void VisuGUI_TableDlg::initDlg() -{ - int i, j; - if ( myObject ) { - _PTR(GenericAttribute) anAttr; - _PTR(AttributeTableOfInteger) tblIntAttr; - _PTR(AttributeTableOfReal) tblRealAttr; - if ( myObject->FindAttribute( anAttr, "AttributeTableOfInteger") ) { - tblIntAttr = anAttr; - } - if ( myObject->FindAttribute( anAttr, "AttributeTableOfReal") ) { - tblRealAttr = anAttr; - } - // Table of integer - if ( tblIntAttr && myIntTable ) { - try { - // title - myIntTable->setTableTitle( tblIntAttr->GetTitle().c_str() ); - // nb of rows & cols - int nbRows = tblIntAttr->GetNbRows() ; - int nbCols = tblIntAttr->GetNbColumns(); - myIntTable->setNumRows( nbRows ); - myIntTable->setNumCols( nbCols ); - // rows titles - QStringList strlist; - vector rowTitles = tblIntAttr->GetRowTitles(); - for ( i = 0; i < nbRows; i++ ) { - if ( rowTitles.size() > 0 ) - strlist.append( rowTitles[i].c_str() ); - else - strlist.append( "" ); - } - myIntTable->setRowTitles( strlist ); - // columns titles - strlist.clear(); - vector colTitles = tblIntAttr->GetColumnTitles(); - for ( i = 0; i < nbCols; i++ ) { - if ( colTitles.size() > 0 ) - strlist.append( colTitles[i].c_str() ); - else - strlist.append( "" ); - } - myIntTable->setColTitles( strlist ); - // units - strlist.clear(); - vector rowUnits = tblIntAttr->GetRowUnits(); - if ( rowUnits.size() > 0 ) { - for ( i = 0; i < nbRows; i++ ) - strlist.append( rowUnits[i].c_str() ); - myIntTable->setUnits( strlist ); - } - // data - for ( i = 1; i <= nbRows; i++ ) { - strlist.clear(); - for ( j = 1; j <= nbCols; j++ ) { - if ( tblIntAttr->HasValue( i, j ) ) - strlist.append( QString::number( tblIntAttr->GetValue( i, j ) ) ); - else - strlist.append( QString::null ); - } - myIntTable->setRowData( i-1, strlist ); - } - myIntTable->adjustTable(); - } - catch( ... ) { - MESSAGE("VisuGUI_TableDlg::initDlg : Exception has been caught !!!"); - } - } - // Table of real - if ( tblRealAttr && myRealTable ) { - try { - // title - myRealTable->setTableTitle( tblRealAttr->GetTitle().c_str() ); - // nb of rows & cols - int nbRows = tblRealAttr->GetNbRows() ; - int nbCols = tblRealAttr->GetNbColumns(); - myRealTable->setNumRows( nbRows ); - myRealTable->setNumCols( nbCols ); - // rows titles - QStringList strlist; - vector rowTitles = tblRealAttr->GetRowTitles(); - for ( i = 0; i < nbRows; i++ ) { - if ( rowTitles.size() > 0 ) - strlist.append( rowTitles[i].c_str() ); - else - strlist.append( "" ); - } - myRealTable->setRowTitles( strlist ); - // columns titles - strlist.clear(); - vector colTitles = tblRealAttr->GetColumnTitles(); - for ( i = 0; i < nbCols; i++ ) { - if ( colTitles.size() > 0 ) - strlist.append( colTitles[i].c_str() ); - else - strlist.append( "" ); - } - myRealTable->setColTitles( strlist ); - // units - strlist.clear(); - vector rowUnits = tblRealAttr->GetRowUnits(); - if ( rowUnits.size() > 0 ) { - for ( i = 0; i < nbRows; i++ ) - strlist.append( rowUnits[i].c_str() ); - myRealTable->setUnits( strlist ); - } - // data - for ( i = 1; i <= nbRows; i++ ) { - strlist.clear(); - for ( j = 1; j <= nbCols; j++ ) { - if ( tblRealAttr->HasValue( i, j ) ) - strlist.append( QString::number( tblRealAttr->GetValue( i, j ) ) ); - else - strlist.append( QString::null ); - } - myRealTable->setRowData( i-1, strlist ); - } - myRealTable->adjustTable(); - } - catch( ... ) { - MESSAGE("VisuGUI_TableDlg::initDlg : Exception has been caught !!!"); - } - } - } -} - -/*! - Constructor -*/ -VisuGUI_TableWidget::VisuGUI_TableWidget( QWidget* parent, - const char* name, - bool edit, - Orientation orient, - bool showColumnTitles ) - : QWidget( parent, name ), myOrientation( orient ) -{ - QGridLayout* mainLayout = new QGridLayout( this ); - mainLayout->setMargin( 0 ); - mainLayout->setSpacing( SPACING_SIZE ); - - myTitleEdit = new QLineEdit( this, "TitleEdit" ); - myTitleEdit->setAlignment( AlignCenter ); - myTitleEdit->setReadOnly( !edit ); - QFont fnt = myTitleEdit->font(); - fnt.setBold( true ); - myTitleEdit->setFont( fnt ); - - myTable = new VisuGUI_Table( orient, this, "Table" ); - myTable->setNumRows( 5 ); - myTable->setNumCols( 5 ); - myTable->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ) ); - myTable->setMinimumSize( MIN_TABLE_WIDTH, MIN_TABLE_HEIGHT ); - myTable->setSelectionMode( QTable::Single ); - myTable->setShowGrid( true ); - myTable->setColumnMovingEnabled( false ); - myTable->setRowMovingEnabled( false ); - myTable->setReadOnly( !edit ); - myTable->setDragEnabled( false ); - setUnitsTitle( tr( "UNITS_TLT" ) ); - - if ( !showColumnTitles ) { - if ( myOrientation == Horizontal ) { - myTable->horizontalHeader()->hide(); - myTable->setTopMargin( 0 ); - } - else { - myTable->verticalHeader()->hide(); - myTable->setLeftMargin( 0 ); - } - } - - mainLayout->addWidget( myTitleEdit, 0, 0 ); - mainLayout->addWidget( myTable, 1, 0 ); - - if ( edit ) { - myAddRowBtn = new QPushButton( tr( "ADD_ROW_BTN" ), this, "AddRowBtn" ); - myDelRowBtn = new QPushButton( tr( "REMOVE_ROW_BTN" ), this, "DelRowBtn" ); - myAddColBtn = new QPushButton( tr( "ADD_COLUMN_BTN" ), this, "AddColBtn" ); - myDelColBtn = new QPushButton( tr( "REMOVE_COLUMN_BTN" ), this, "DelColBtn" ); - myAdjustBtn = new QPushButton( tr( "ADJUST_CELLS_BTN" ), this, "AdjustBtn" ); - mySelectAllBtn = new QPushButton( tr( "SELECT_ALL_BTN" ), this, "SelectAllBtn" ); - myClearBtn = new QPushButton( tr( "CLEAR_BTN"), this, "ClearBtn" ); - QVBoxLayout* btnLayout = new QVBoxLayout; btnLayout->setMargin( 0 ); btnLayout->setSpacing( SPACING_SIZE ); - btnLayout->addWidget( myAddRowBtn ); - btnLayout->addWidget( myDelRowBtn ); - btnLayout->addWidget( myAddColBtn ); - btnLayout->addWidget( myDelColBtn ); - btnLayout->addStretch(); - btnLayout->addWidget( myAdjustBtn ); - btnLayout->addStretch(); - btnLayout->addWidget( mySelectAllBtn ); - btnLayout->addWidget( myClearBtn ); - mainLayout->addLayout( btnLayout, 1, 1 ); - connect( myTable, SIGNAL( selectionChanged() ), this, SLOT( updateButtonsState() ) ); - connect( myTable, SIGNAL( currentChanged( int, int) ), this, SLOT( updateButtonsState() ) ); - connect( myAddRowBtn, SIGNAL( clicked() ), this, SLOT( addRow() ) ); - connect( myAddColBtn, SIGNAL( clicked() ), this, SLOT( addCol() ) ); - connect( myDelRowBtn, SIGNAL( clicked() ), this, SLOT( delRow() ) ); - connect( myDelColBtn, SIGNAL( clicked() ), this, SLOT( delCol() ) ); - connect( myAdjustBtn, SIGNAL( clicked() ), this, SLOT( adjustTable() ) ); - connect( mySelectAllBtn, SIGNAL( clicked() ), this, SLOT( selectAll() ) ); - connect( myClearBtn, SIGNAL( clicked() ), this, SLOT( clearTable() ) ); - myTable->horizontalHeader()->installEventFilter( this ); - myTable->verticalHeader()->installEventFilter( this ); - myTable->installEventFilter( this ); - } - updateButtonsState(); -} -/*! - Destructor -*/ -VisuGUI_TableWidget::~VisuGUI_TableWidget() -{ -} -/*! - Sets table title -*/ -void VisuGUI_TableWidget::setTableTitle( const QString& title ) -{ - myTitleEdit->setText( title ); -} -/*! - Gets table title -*/ -QString VisuGUI_TableWidget::getTableTitle() -{ - return myTitleEdit->text(); -} -/*! - Sets total number of rows -*/ -void VisuGUI_TableWidget::setNumRows( const int num ) -{ - myOrientation == Horizontal ? myTable->setNumRows( num ) : myTable->setNumCols( num ); -} -/*! - Gets total number of rows -*/ -int VisuGUI_TableWidget::getNumRows() -{ - return myOrientation == Horizontal ? myTable->numRows() : myTable->numCols(); -} -/*! - Sets total number of columns -*/ -void VisuGUI_TableWidget::setNumCols( const int num ) -{ - // !!! first column contains units !!! - myOrientation == Horizontal ? myTable->setNumCols( num+1 ) : myTable->setNumRows( num+1 ); -// myOrientation == Horizontal ? myTable->setColumnReadOnly( 0, true ) : myTable->setRowReadOnly( 0, true ); -} -/*! - Gets total number of columns -*/ -int VisuGUI_TableWidget::getNumCols() -{ - // !!! first column contains units !!! - return myOrientation == Horizontal ? myTable->numCols()-1 : myTable->numRows()-1; -} -/*! - Sets rows titles -*/ -void VisuGUI_TableWidget::setRowTitles( QStringList& tlts ) -{ - for ( int i = 0; i < tlts.count(); i++ ) { - myOrientation == Horizontal ? - myTable->verticalHeader()->setLabel( i, tlts[i] ) : - myTable->horizontalHeader()->setLabel( i, tlts[i] ); - } -} -/*! - Gets rows titles -*/ -void VisuGUI_TableWidget::getRowTitles( QStringList& tlts ) -{ - tlts.clear(); - if ( myOrientation == Horizontal ) { - for ( int i = 0; i < myTable->numRows(); i++ ) { - tlts.append( myTable->verticalHeader()->label( i ) ); - } - } - else { - for ( int i = 0; i < myTable->numCols(); i++ ) { - tlts.append( myTable->horizontalHeader()->label( i ) ); - } - } -} -/*! - Sets columns titles -*/ -void VisuGUI_TableWidget::setColTitles( QStringList& tlts ) -{ - // !!! first column contains units !!! - for ( int i = 0; i < tlts.count(); i++ ) { - myOrientation == Horizontal ? - myTable->horizontalHeader()->setLabel( i+1, tlts[i].isNull() ? "" : tlts[i] ) : - myTable->verticalHeader()->setLabel( i+1, tlts[i].isNull() ? "" : tlts[i] ); - } - setUnitsTitle( tr( "UNITS_TLT" ) ); -} -/*! - Sets columns titles -*/ -void VisuGUI_TableWidget::getColTitles( QStringList& tlts ) -{ - // !!! first column contains units !!! - tlts.clear(); - if ( myOrientation == Horizontal ) { - for ( int i = 1; i < myTable->numCols(); i++ ) { - tlts.append( myTable->horizontalHeader()->label( i ) ); - } - } - else { - for ( int i = 1; i < myTable->numRows(); i++ ) { - tlts.append( myTable->verticalHeader()->label( i ) ); - } - } -} -/*! - Sets units title -*/ -void VisuGUI_TableWidget::setUnitsTitle( const QString& tlt ) { - // !!! first column contains units !!! - myOrientation == Horizontal ? myTable->horizontalHeader()->setLabel( 0, tlt.isNull() ? "" : tlt ) : myTable->verticalHeader()->setLabel( 0, tlt.isNull() ? "" : tlt ); -} -/*! - Sets units -*/ -void VisuGUI_TableWidget::setUnits( QStringList& units ) -{ - for ( int i = 0; i < units.count(); i++ ) { - myOrientation == Horizontal ? myTable->setText( i, 0, units[i].isNull() ? "" : units[i] ) : myTable->setText( 0, i, units[i].isNull() ? "" : units[i] ); - } -} -/*! - Gets units -*/ -void VisuGUI_TableWidget::getUnits( QStringList& units ) -{ - units.clear(); - if ( myOrientation == Horizontal ) { - for ( int i = 0; i < myTable->numRows(); i++ ) - units.append( myTable->text( i, 0 ).isNull() ? QString("") : myTable->text( i, 0 ) ); - } - else { - for ( int i = 0; i < myTable->numCols(); i++ ) - units.append( myTable->text( 0, i ).isNull() ? QString("") : myTable->text( 0, i ) ); - } -} -/*! - Sets row data -*/ -void VisuGUI_TableWidget::setRowData( int row, QStringList& data ) -{ - if ( row >= 0 && row < getNumRows() ) { - for ( int i = 0; i < data.count(); i++ ) { - if ( data[i].isNull() ) { - myOrientation == Horizontal ? myTable->clearCell( row, i+1 ) : - myTable->clearCell( i+1, row ); - } - else { - myOrientation == Horizontal ? myTable->setText( row, i+1, data[i] ) : - myTable->setText( i+1, row, data[i] ); - } - } - } -} -/*! - Gets row data -*/ -void VisuGUI_TableWidget::getRowData( int row, QStringList& data ) -{ - data.clear(); - if ( row >= 0 && row < getNumRows() ) { - if ( myOrientation == Horizontal ) { - for ( int i = 1; i < myTable->numCols(); i++ ) - data.append( myTable->text( row, i ) ); - } - else { - for ( int i = 1; i < myTable->numRows(); i++ ) - data.append( myTable->text( i, row ) ); - } - } -} -/*! - Adjusts table cell to see contents, button slot -*/ -void VisuGUI_TableWidget::adjustTable() -{ - int i; - for ( i = 0; i < myTable->numRows(); i++ ) - myTable->adjustRow( i ); - for ( i = 0; i < myTable->numCols(); i++ ) - myTable->adjustColumn( i ); -} -/*! - Called when selection changed in table -*/ -void VisuGUI_TableWidget::updateButtonsState() -{ - if ( myTable->isReadOnly() ) - return; - bool bDR = false; // - bool bDC = false; // - bool bSA = false; // button slot -*/ -void VisuGUI_TableWidget::selectAll() -{ - myTable->clearSelection(); - QTableSelection ts; - ts.init( 0, 0 ); ts.expandTo( myTable->numRows()-1, myTable->numCols()-1 ); - myTable->addSelection( ts ); - updateButtonsState(); -} -/*! - button slot -*/ -void VisuGUI_TableWidget::clearTable() -{ - int nbSel = myTable->numSelections(); - for ( int i = 0; i < nbSel; i++ ) { - QTableSelection ts = myTable->selection( i ); - for ( int j = ts.topRow(); j < ts.bottomRow()+1; j++) { - if ( myOrientation == Vertical && j == 0 ) { -// continue; // UNITS - } - for ( int k = ts.leftCol(); k < ts.rightCol()+1; k++) { - if ( myOrientation == Horizontal && k == 0 ) { -// continue; // UNITS - } - myTable->clearCell( j, k ); - } - } - } - if ( nbSel == 0 ) - myTable->clearCell( myTable->currentRow(), myTable->currentColumn() ); - myTable->clearSelection(); - updateButtonsState(); -} -/*! - Event filter - handles titles editing -*/ -bool VisuGUI_TableWidget::eventFilter( QObject* o, QEvent* e ) -{ - if ( e->type() == QEvent::MouseButtonDblClick) { - QMouseEvent* me = ( QMouseEvent* )e; - if ( me->button() == LeftButton && !myTable->isReadOnly() ) { - if ( o == myTable->horizontalHeader() ) { - for ( int i = 0; i < myTable->horizontalHeader()->count(); i++ ) { - QRect rect = myTable->horizontalHeader()->sectionRect( i ); - rect.addCoords( 1, 1, -1, -1 ); - if ( rect.contains( myTable->horizontalHeader()->mapFromGlobal( me->globalPos() ) ) ) { - if ( myOrientation == Vertical || i != 0 ) { - bool bOk; - QString tlt = QInputDialog::getText( tr( "SET_TITLE_TLT" ), - tr( "TITLE_LBL" ), - QLineEdit::Normal, - myTable->horizontalHeader()->label( i ), - &bOk, - this ); - if ( bOk && !tlt.isNull() ) - myTable->horizontalHeader()->setLabel( i, tlt ); - break; - } - } - } - } - if ( o == myTable->verticalHeader() ) { - for ( int i = 0; i < myTable->verticalHeader()->count(); i++ ) { - QRect rect = myTable->verticalHeader()->sectionRect( i ); - rect.addCoords( 1, 1, -1, -1 ); - if ( rect.contains( myTable->verticalHeader()->mapFromGlobal( me->globalPos() ) ) ) { - if ( myOrientation == Horizontal || i != 0 ) { - bool bOk; - QString tlt = QInputDialog::getText( tr( "SET_TITLE_TLT" ), - tr( "TITLE_LBL" ), - QLineEdit::Normal, - myTable->verticalHeader()->label( i ), - &bOk, - this ); - if ( bOk && !tlt.isNull() ) - myTable->verticalHeader()->setLabel( i, tlt ); - break; - } - } - } - } - } - } - else if ( e->type() == QEvent::KeyRelease && o == myTable ) { - QKeyEvent* ke = (QKeyEvent*)e; - if ( ke->key() == Key_Delete && !myTable->isEditing() ) { - clearTable(); - } - else if ( ke->key() == Key_Backspace && !myTable->isEditing() ) { - clearTable(); - int i = myTable->currentRow(); - int j = myTable->currentColumn() - 1; - if ( j < 0 ) { j = myTable->numCols()-1; i--; } - if ( i >= 0 && j >= 0 ) - myTable->setCurrentCell( i, j ); - } - } - return QWidget::eventFilter( o, e ); -} - - - diff --git a/src/GUITOOLS/VisuGUI_TableDlg.h b/src/GUITOOLS/VisuGUI_TableDlg.h deleted file mode 100644 index 82481f9e..00000000 --- a/src/GUITOOLS/VisuGUI_TableDlg.h +++ /dev/null @@ -1,110 +0,0 @@ -// VISU VISUGUI : GUI of VISU component -// -// Copyright (C) 2003 CEA/DEN, EDF R&D -// -// -// -// File : VisuGUI_TableDlg.h -// Author : Vadim SANDLER -// Module : VISU - -#ifndef VisuGUI_TABLE_DLG_H -#define VisuGUI_TABLE_DLG_H - -#include -#include -#include - -class VisuGUI_Table; -class VisuGUI_TableWidget; - -#include - -class VisuGUI_TableDlg : public QDialog -{ - Q_OBJECT - -public: - - enum { ttNone, ttInt, ttReal, ttBoth, ttAuto }; - - VisuGUI_TableDlg( QWidget* parent, - _PTR(SObject) obj, - bool edit = false, - int which = ttAuto, - Orientation orient = Horizontal, - bool showColumnTitles = true ); - ~VisuGUI_TableDlg(); - -public slots: - void onOK(); - -private: - void initDlg(); - -private: - VisuGUI_TableWidget* myIntTable; - VisuGUI_TableWidget* myRealTable; - QPushButton* myOKBtn; - QPushButton* myCancelBtn; - - _PTR(SObject) myObject; -}; - -class VisuGUI_TableWidget : public QWidget -{ - Q_OBJECT -public: - VisuGUI_TableWidget( QWidget* parent = 0, - const char* name = 0, - bool edit = false, - Orientation orient = Horizontal, - bool showColumnTitles = true ); - ~VisuGUI_TableWidget(); - - void setTableTitle( const QString& title ); - QString getTableTitle(); - void setNumRows( const int num ); - int getNumRows(); - void setNumCols( const int num ); - int getNumCols(); - void setRowTitles( QStringList& tlts ); - void getRowTitles( QStringList& tlts ); - void setColTitles( QStringList& tlts ); - void getColTitles( QStringList& tlts ); - void setUnitsTitle( const QString& tlt ); - void setUnits( QStringList& units ); - void getUnits( QStringList& units ); - void setRowData( int row, QStringList& data ); - void getRowData( int row, QStringList& data ); - - VisuGUI_Table* getTable() { return myTable; } - QLineEdit* getTitleEdit() { return myTitleEdit; } - - bool eventFilter( QObject* o, QEvent* e); - -public slots: - void updateButtonsState(); - void addRow(); - void addCol(); - void delRow(); - void delCol(); - void adjustTable(); - void selectAll(); - void clearTable(); - -private: - QLineEdit* myTitleEdit; - VisuGUI_Table* myTable; - QPushButton* myAddRowBtn; - QPushButton* myAddColBtn; - QPushButton* myDelRowBtn; - QPushButton* myDelColBtn; - QPushButton* myAdjustBtn; - QPushButton* mySelectAllBtn; - QPushButton* myClearBtn; - Orientation myOrientation; -}; - -#endif // VisuGUI_TABLE_DLG_H - diff --git a/src/OBJECT/VISU_MeshAct.h b/src/OBJECT/VISU_MeshAct.h deleted file mode 100644 index bacc15c3..00000000 --- a/src/OBJECT/VISU_MeshAct.h +++ /dev/null @@ -1,83 +0,0 @@ -// VISU OBJECT : interactive object for VISU entities implementation -// -// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org -// -// -// -// File : VISU_MeshAct.h -// Author : Laurent CORNABE with the help of Nicolas REJNERI -// Module : VISU -// $Header$ - -#ifndef VISU_MeshAct_HeaderFile -#define VISU_MeshAct_HeaderFile - -#include "VISU_Actor.h" -class vtkDataSetMapper; - -class VTKOCC_EXPORT VISU_MeshAct : public VISU_Actor { - public: - vtkTypeMacro(VISU_MeshAct,VISU_Actor); - static VISU_MeshAct* New(); - ~VISU_MeshAct(); - - virtual void setIO(const Handle(SALOME_InteractiveObject)& theIO); - virtual void SetPrs3d(VISU::Prs3d_i* thePrs3d); - - virtual void AddToRender(vtkRenderer* theRenderer); - virtual void RemoveFromRender(vtkRenderer* theRenderer); - - virtual void SetPipeLine(VISU_PipeLine* thePipeLine) ; - virtual void SetTransform(VTKViewer_Transform* theTransform); - - virtual vtkProperty* GetSurfaceProperty(); - virtual void SetSurfaceProperty(vtkProperty* theProperty); - - virtual vtkProperty* GetEdgeProperty(); - virtual void SetEdgeProperty(vtkProperty* theProperty); - - virtual vtkProperty* GetNodeProperty(); - virtual void SetNodeProperty(vtkProperty* theProperty); - - virtual void SetOpacity(float theValue); - virtual float GetOpacity(); - - virtual void SetLineWidth(float theLineWidth); - virtual float GetLineWidth(); - - virtual void SetRepresentation(int theMode); - - virtual void SetVisibility(int theMode); - - virtual void SetShrinkable(bool theIsShrinkable); - virtual void SetShrinkFactor(float theFactor = 0.8); - - virtual void SetShrink(); - virtual void UnShrink(); - - virtual void Render(vtkRenderer *, vtkMapper *); - void Modified(); - - protected: - VISU_MeshAct(); - VISU_Actor *mySurfaceActor, *myEdgeActor, *myNodeActor; -}; - -#endif diff --git a/src/OBJECT/VISU_VectorsAct.cxx b/src/OBJECT/VISU_VectorsAct.cxx deleted file mode 100644 index 4cb16c27..00000000 --- a/src/OBJECT/VISU_VectorsAct.cxx +++ /dev/null @@ -1,82 +0,0 @@ -// VISU OBJECT : interactive object for VISU entities implementation -// -// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org -// -// -// -// File : VISU_VectorsAct.cxx -// Author : Laurent CORNABE with help of Nicolas REJNERI -// Module : VISU -// $Header$ - -#include "VISU_VectorsAct.h" -#include "VISU_VectorsPL.hxx" -#include "VTKViewer_PassThroughFilter.h" - -// VTK Includes -#include -#include -#include -#include - -using namespace std; - -//======================================================================= - -vtkStandardNewMacro(VISU_VectorsAct); - - -VISU_VectorsAct::VISU_VectorsAct(){} - - -VISU_VectorsAct::~VISU_VectorsAct(){} - - -void VISU_VectorsAct::SetPipeLine(VISU_PipeLine* thePipeLine) { - if((myPipeLine = dynamic_cast(thePipeLine))){ - VISU_Actor::SetPipeLine(myPipeLine); - myPipeLine->Delete(); - } -} - - -void VISU_VectorsAct::SetTransform(VTKViewer_Transform* theTransform){ - myPipeLine->SetTransform(theTransform); - Modified(); -} - - -void VISU_VectorsAct::SetMapper(vtkMapper* theMapper){ - if(theMapper){ - myPassFilter[0]->SetInput(theMapper->GetInput()); - myPassFilter[0]->Update(); - myPassFilter[1]->SetInput(myPassFilter[0]->GetPolyDataOutput()); - myPassFilter[1]->Update(); - myPassFilter[2]->SetInput(myPassFilter[1]->GetPolyDataOutput()); - myPassFilter[2]->Update(); - myPassFilter[3]->SetInput(myPassFilter[2]->GetPolyDataOutput()); - myPassFilter[3]->Update(); - if(vtkDataSetMapper* aMapper = dynamic_cast(theMapper)) - aMapper->SetInput(myPassFilter[3]->GetPolyDataOutput()); - else if(vtkPolyDataMapper* aMapper = dynamic_cast(theMapper)) - aMapper->SetInput(myPassFilter[3]->GetPolyDataOutput()); - } - vtkLODActor::SetMapper(theMapper); -} diff --git a/src/OBJECT/VISU_VectorsAct.h b/src/OBJECT/VISU_VectorsAct.h deleted file mode 100644 index ae5bc694..00000000 --- a/src/OBJECT/VISU_VectorsAct.h +++ /dev/null @@ -1,55 +0,0 @@ -// VISU OBJECT : interactive object for VISU entities implementation -// -// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org -// -// -// -// File : VISU_VectorsAct.h -// Author : Laurent CORNABE with help of Nicolas REJNERI -// Module : VISU -// $Header$ - -#ifndef VISU_VectorsAct_HeaderFile -#define VISU_VectorsAct_HeaderFile - -#include "VISU_ScalarMapAct.h" - -class VTKViewer_Transform; -class VISU_VectorsPL; - -class VTKOCC_EXPORT VISU_VectorsAct : public VISU_ScalarMapAct { - public: - vtkTypeMacro(VISU_VectorsAct,VISU_ScalarMapAct); - static VISU_VectorsAct* New(); - ~VISU_VectorsAct(); - - virtual void SetPipeLine(VISU_PipeLine* thePipeLine); - - virtual void SetTransform(VTKViewer_Transform* theTransform); - - virtual void SetMapper(vtkMapper* theMapper); - - protected: - VISU_VectorsAct(); - - VISU_VectorsPL* myPipeLine; -}; - -#endif diff --git a/src/PIPELINE/VISU_CutLinesPL.hxx b/src/PIPELINE/VISU_CutLinesPL.hxx deleted file mode 100644 index cc316781..00000000 --- a/src/PIPELINE/VISU_CutLinesPL.hxx +++ /dev/null @@ -1,69 +0,0 @@ -// VISU OBJECT : interactive object for VISU entities implementation -// -// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org -// -// -// File: VISU_PipeLine.hxx -// Author: Alexey PETROV -// Module : VISU - -#ifndef VISU_CutLinesPL_HeaderFile -#define VISU_CutLinesPL_HeaderFile - -#include "VISU_CutPlanesPL.hxx" - -class vtkAppendPolyData; - -class VISU_CutLinesPL : public VISU_CutPlanesPL{ -protected: - VISU_CutLinesPL(); - VISU_CutLinesPL(const VISU_CutLinesPL&); -public: - vtkTypeMacro(VISU_CutLinesPL,VISU_CutPlanesPL); - static VISU_CutLinesPL* New(); - virtual void ShallowCopy(VISU_PipeLine *thePipeLine); - - virtual void SetPosition(float thePosition); - virtual float GetPosition(); - - virtual void SetDefault(); - virtual int IsDefault(); - -public: - virtual void Init(); - virtual void Update(); - - static void CutWithPlanes(vtkAppendPolyData* theAppendPolyData, vtkDataSet* theDataSet, - int theNbPlanes, float theDir[3], float theBounds[6], - float thePlanePosition, int thePlaneCondition, - float theDisplacement); - - const float* GetDirLn(){ return myDirLn;} - const float* GetBoundPrjLn(){ return myBoundPrjLn;} - const float* GetBasePnt(){ return myBasePnt;} - -protected: - float myDirLn[3], myBoundPrjLn[3], myBasePnt[3]; - float myPosition; - int myCondition; -}; - - -#endif diff --git a/src/PIPELINE/VISU_CutPlanesPL.hxx b/src/PIPELINE/VISU_CutPlanesPL.hxx deleted file mode 100644 index b561f512..00000000 --- a/src/PIPELINE/VISU_CutPlanesPL.hxx +++ /dev/null @@ -1,104 +0,0 @@ -// VISU OBJECT : interactive object for VISU entities implementation -// -// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org -// -// -// File: VISU_CutPlanesPL.hxx -// Author: Alexey PETROV -// Module : VISU - -#ifndef VISU_CutPlanesPL_HeaderFile -#define VISU_CutPlanesPL_HeaderFile - -#include "VISU_ScalarMapPL.hxx" - -#include - -class vtkAppendPolyData; - -class VISU_CutPlanesPL : public VISU_ScalarMapPL{ -protected: - VISU_CutPlanesPL(); - VISU_CutPlanesPL(const VISU_CutPlanesPL&); -public: - vtkTypeMacro(VISU_CutPlanesPL,VISU_ScalarMapPL); - static VISU_CutPlanesPL* New(); - virtual ~VISU_CutPlanesPL(); - virtual void ShallowCopy(VISU_PipeLine *thePipeLine); - - enum PlaneOrientation {XY, YZ, ZX}; - virtual void SetOrientation(const VISU_CutPlanesPL::PlaneOrientation& theOrient, - float theXAng, float theYAng, int theNum = 0); - - virtual const PlaneOrientation& GetPlaneOrientation(int theNum = 0); - virtual float GetRotateX(int theNum = 0); - virtual float GetRotateY(int theNum = 0); - - virtual float GetDisplacement(int theNum = 0) { return myDisplacement[theNum];} - virtual void SetDisplacement(float theDisp, int theNum = 0) { myDisplacement[theNum] = theDisp;} - - virtual void SetPartPosition(int thePartNumber, float thePartPosition); - virtual float GetPartPosition(int thePartNumber, int theNum = 0); - - virtual void SetPartDefault(int thePartNumber); - virtual int IsPartDefault(int thePartNumber); - - virtual void SetNbParts(int theNb); - virtual int GetNbParts(){ return myNbParts;} - -public: - virtual void Init(); - virtual void Update(); - virtual vtkAppendPolyData* GetAppendPolyData() { return myAppendPolyData; } - -public: - static float* GetRx(float theRx[3][3], float thaAng); - static float* GetRy(float theRy[3][3], float thaAng); - static float* GetRz(float theRz[3][3], float thaAng); - - static void CorrectPnt(float thePnt[3], const float BoundPrj[6]); - static void GetBoundProject(float BoundPrj[3], const float BoundBox[6], const float Dir[3]); - - static void GetDir(float theDir[3], - const float theAng[3], - const PlaneOrientation& theBasePlane); - - static void ClearAppendPolyData(vtkAppendPolyData *theAppendPolyData); - - static void CutWithPlane(vtkAppendPolyData* theAppendPolyData, vtkDataSet* theDataSet, - float theDir[3], float theOrig[3]); - static void CutWithPlanes(vtkAppendPolyData* theAppendPolyData, vtkDataSet* theDataSet, - int theNbPlanes, float theDir[3], float theBounds[6], - const std::vector& thePlanePosition, - const std::vector& thePlaneCondition, - float theDisplacement); -protected: - virtual THook* DoHook(); - void SetPartPosition(int theNum = 0); - - int myNbParts; - PlaneOrientation myBasePlane[2]; - float myAng[2][3], myDisplacement[2]; - vtkAppendPolyData *myAppendPolyData; - std::vector myPartPosition; - std::vector myPartCondition; -}; - -#endif diff --git a/src/PIPELINE/VISU_DeformedShapePL.hxx b/src/PIPELINE/VISU_DeformedShapePL.hxx deleted file mode 100644 index 9c2f95a7..00000000 --- a/src/PIPELINE/VISU_DeformedShapePL.hxx +++ /dev/null @@ -1,65 +0,0 @@ -// VISU OBJECT : interactive object for VISU entities implementation -// -// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org -// -// -// File: VISU_PipeLine.hxx -// Author: Alexey PETROV -// Module : VISU - -#ifndef VISU_DeformedShapePL_HeaderFile -#define VISU_DeformedShapePL_HeaderFile - -#include "VISU_ScalarMapPL.hxx" - -class vtkCellDataToPointData; -class SALOME_Transform; -class vtkWarpVector; - -class VISU_DeformedShapePL : public VISU_ScalarMapPL{ -protected: - VISU_DeformedShapePL(); - VISU_DeformedShapePL(const VISU_DeformedShapePL&); -public: - vtkTypeMacro(VISU_DeformedShapePL,VISU_ScalarMapPL); - static VISU_DeformedShapePL* New(); - virtual ~VISU_DeformedShapePL(); - virtual void ShallowCopy(VISU_PipeLine *thePipeLine); - - virtual void SetScale(float theScale); - virtual float GetScale(); - -public: - virtual void Init(); - virtual void Update(); - virtual void SetMapScale(float theMapScale = 1.0); - - static float GetScaleFactor(vtkDataSet* theDataSet); - -protected: - virtual THook* DoHook(); - - float myScaleFactor; - vtkWarpVector *myWarpVector; - vtkCellDataToPointData* myCellDataToPointData; -}; - - -#endif diff --git a/src/PIPELINE/VISU_Extractor.hxx b/src/PIPELINE/VISU_Extractor.hxx deleted file mode 100644 index 7ab876d6..00000000 --- a/src/PIPELINE/VISU_Extractor.hxx +++ /dev/null @@ -1,50 +0,0 @@ -// VISU OBJECT : interactive object for VISU entities implementation -// -// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org -// -// -// File : VISU_Extractor.hxx -// Author : Alexey PETROV -// Module : VISU - -#ifndef VISU_Extractor_HeaderFile -#define VISU_Extractor_HeaderFile - -#include - -class VTK_EXPORT VISU_Extractor : public vtkPointSetToPointSetFilter{ -public: - vtkTypeMacro(VISU_Extractor,vtkPointSetToPointSetFilter); - static VISU_Extractor *New(); - - virtual int GetScalarMode(){ return myScalarMode;} - virtual void SetScalarMode(int theScalarMode = 0); - -protected: - VISU_Extractor(); - VISU_Extractor(const VISU_Extractor&); - ~VISU_Extractor(); - - virtual void Execute(); - - int myScalarMode; -}; - -#endif diff --git a/src/PIPELINE/VISU_FieldTransform.cxx b/src/PIPELINE/VISU_FieldTransform.cxx deleted file mode 100644 index 5fd70742..00000000 --- a/src/PIPELINE/VISU_FieldTransform.cxx +++ /dev/null @@ -1,166 +0,0 @@ -// Copyright (C) 2003 CEA/DEN, EDF R&D -// -// -// -// File : VISU_FieldTransform.cxx -// Module : VISU - -#include "VISU_FieldTransform.hxx" -#include "VTKViewer_Transform.h" - -#include -#include -#include -#include -#include -#include - -using namespace std; - -vtkStandardNewMacro(VISU_FieldTransform); - -double VISU_FieldTransform::Ident(double theArg){ - return theArg; -} -double VISU_FieldTransform::Log10(double theArg){ - if(theArg <= 0.0) return -VTK_LARGE_FLOAT; - return log10(theArg); -} - - -VISU_FieldTransform::VISU_FieldTransform(){ - myFunction = &Ident; - myTransform = NULL; -} - -VISU_FieldTransform::~VISU_FieldTransform() { - SetSpaceTransform(NULL); -} - - -void VISU_FieldTransform::Update(){ - if(myTransform && myTransform->GetMTime() > vtkSource::GetMTime()) - Modified(); - vtkSource::Update(); -} - -unsigned long VISU_FieldTransform::GetMTime(){ - if(myTransform && myTransform->GetMTime() > vtkSource::GetMTime()) - return myTransform->GetMTime(); - return vtkSource::GetMTime(); -} - -void VISU_FieldTransform::SetScalarTransform(TTransformFun theFunction) { - myFunction = theFunction; - if(myFunction == NULL) myFunction = &Ident; - Modified(); -} - -void VISU_FieldTransform::SetSpaceTransform(VTKViewer_Transform* theTransform){ - if(myTransform != theTransform){ - if (myTransform != NULL) myTransform->UnRegister(this); - myTransform = theTransform; - if (myTransform != NULL) myTransform->Register(this); - this->Modified(); - } -} - - -void VISU_FieldTransform::SetScalarRange(float theScalarRange[2]) { - myScalarRange[0] = theScalarRange[0]; - myScalarRange[1] = theScalarRange[1]; - Modified(); -} -void VISU_FieldTransform::SetScalarMin(float theValue){ - float aScalarRange[2] = {theValue, GetScalarRange()[1]}; - SetScalarRange(aScalarRange); -} -void VISU_FieldTransform::SetScalarMax(float theValue){ - float aScalarRange[2] = {GetScalarRange()[0], theValue}; - SetScalarRange(aScalarRange); -} - - -template void -ExecVectors(VISU_FieldTransform::TTransformFun theFunction, - VTKViewer_Transform* theTransform, - float theScalarRange[2], int theNbComponent, - TypeData* theInputData, TypeData* theOutputData) -{ - vtkDataArray *inVectors = theInputData->GetVectors(); - if ( !inVectors || theNbComponent < 1 ) return; - vtkFloatArray *newVectors = vtkFloatArray::New(); - newVectors->SetNumberOfComponents(3); - newVectors->SetNumberOfTuples(theNbComponent); - float aScalarRange[2] = {(*theFunction)(theScalarRange[0]),(*theFunction)(theScalarRange[1])}; - float *V, v[3], vMag, aDelta = aScalarRange[1] - aScalarRange[0]; - float aScale[3] = {1.0, 1.0, 1.0}; - if(theTransform){ - aScale[0] = theTransform->GetScale()[0]; - aScale[1] = theTransform->GetScale()[1]; - aScale[2] = theTransform->GetScale()[2]; - } - if(theFunction == &(VISU_FieldTransform::Ident)){ - for (int ptId = 0; ptId < theNbComponent; ptId++) { - V = inVectors->GetTuple3(ptId); - v[0] = V[0]*aScale[0]; - v[1] = V[1]*aScale[1]; - v[2] = V[2]*aScale[2]; - newVectors->SetTuple3(ptId, v[0], v[1], v[2]); - } - }else{ - for (int ptId = 0; ptId < theNbComponent; ptId++) { - V = inVectors->GetTuple3(ptId); - vMag = vtkMath::Norm(V); - vMag = ((*theFunction)(vMag) - aScalarRange[0]) / aDelta * theScalarRange[1] / vMag; - if(vMag <= 0.0) vMag = 0.0; - v[0] = V[0]*vMag*aScale[0]; - v[1] = V[1]*vMag*aScale[1]; - v[2] = V[2]*vMag*aScale[2]; - newVectors->SetTuple3(ptId, v[0], v[1], v[2]); - } - } - theOutputData->SetVectors(newVectors); - newVectors->Delete(); -} - -template void -ExecScalars(VISU_FieldTransform::TTransformFun theFunction, float theScalarRange[2], - int theNbComponent, TypeData* theInputData, TypeData* theOutputData) -{ - vtkDataArray *inScalars = theInputData->GetScalars(); - if ( !inScalars || theNbComponent < 1 ) - return; - vtkFloatArray *newScalars = vtkFloatArray::New(); - newScalars->SetNumberOfComponents(1); - newScalars->SetNumberOfTuples(theNbComponent); - float aScalarRange[2] = {(*theFunction)(theScalarRange[0]),(*theFunction)(theScalarRange[1])}; - for (int ptId = 0; ptId < theNbComponent; ptId++) { - float s = (*theFunction)(inScalars->GetTuple1(ptId )); - if(s < aScalarRange[0]) s = aScalarRange[0]; - newScalars->SetTuple1(ptId, s); - } - theOutputData->SetScalars(newScalars); - newScalars->Delete(); -} - -void VISU_FieldTransform::Execute(){ - vtkDataSet *input = this->GetInput(), *output = this->GetOutput(); - output->CopyStructure(input); - if(myFunction != &Ident || (myTransform && !myTransform->IsIdentity())){ - output->GetPointData()->CopyAllOff(); - output->GetCellData()->CopyAllOff(); - - ExecScalars(myFunction,myScalarRange,input->GetNumberOfPoints(),input->GetPointData(),output->GetPointData()); - ExecVectors(myFunction,myTransform,myScalarRange,input->GetNumberOfPoints(),input->GetPointData(),output->GetPointData()); - - ExecScalars(myFunction,myScalarRange,input->GetNumberOfCells(),input->GetCellData(),output->GetCellData()); - ExecVectors(myFunction,myTransform,myScalarRange,input->GetNumberOfCells(),input->GetCellData(),output->GetCellData()); - }else{ - output->GetPointData()->CopyAllOn(); - output->GetCellData()->CopyAllOn(); - - output->GetPointData()->PassData(input->GetPointData()); - output->GetCellData()->PassData(input->GetCellData()); - } -} diff --git a/src/PIPELINE/VISU_FieldTransform.hxx b/src/PIPELINE/VISU_FieldTransform.hxx deleted file mode 100644 index 1a22f59a..00000000 --- a/src/PIPELINE/VISU_FieldTransform.hxx +++ /dev/null @@ -1,68 +0,0 @@ -// VISU OBJECT : interactive object for VISU entities implementation -// -// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org -// -// -// File : VISU_Extractor.hxx -// Author : Alexey PETROV -// Module : VISU - -#ifndef VISU_FieldTransform_HeaderFile -#define VISU_FieldTransform_HeaderFile - -#include - -class VTKViewer_Transform; - -class VTK_EXPORT VISU_FieldTransform : public vtkDataSetToDataSetFilter{ -public: - vtkTypeMacro(VISU_FieldTransform,vtkDataSetToDataSetFilter); - static VISU_FieldTransform *New(); - - virtual void Update(); - virtual unsigned long GetMTime(); - - static double Ident(double theArg); - static double Log10(double theArg); - typedef double (*TTransformFun)(double); - void SetScalarTransform(TTransformFun theFunction); - TTransformFun GetScalarTransform() { return myFunction;} - - void SetSpaceTransform(VTKViewer_Transform* theTransform); - VTKViewer_Transform* GetSpaceTransform() { return myTransform;} - - float* GetScalarRange(){ return myScalarRange; } - void SetScalarRange(float theScalarRange[2]); - void SetScalarMin(float theValue); - void SetScalarMax(float theValue); - -protected: - VISU_FieldTransform(); - virtual ~VISU_FieldTransform(); - VISU_FieldTransform(const VISU_FieldTransform&) {}; - void operator=(const VISU_FieldTransform&) {}; - void Execute(); - - VTKViewer_Transform *myTransform; - TTransformFun myFunction; - float myScalarRange[2]; -}; - -#endif diff --git a/src/PIPELINE/VISU_IsoSurfacesPL.hxx b/src/PIPELINE/VISU_IsoSurfacesPL.hxx deleted file mode 100644 index 68732e37..00000000 --- a/src/PIPELINE/VISU_IsoSurfacesPL.hxx +++ /dev/null @@ -1,67 +0,0 @@ -// VISU OBJECT : interactive object for VISU entities implementation -// -// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org -// -// -// File: VISU_PipeLine.hxx -// Author: Alexey PETROV -// Module : VISU - -#ifndef VISU_IsoSurfacesPL_HeaderFile -#define VISU_IsoSurfacesPL_HeaderFile - -#include "VISU_ScalarMapPL.hxx" - -class vtkContourFilter; -class vtkCellDataToPointData; - -class VISU_IsoSurfacesPL : public VISU_ScalarMapPL{ -protected: - VISU_IsoSurfacesPL(); - VISU_IsoSurfacesPL(const VISU_IsoSurfacesPL&); -public: - vtkTypeMacro(VISU_IsoSurfacesPL,VISU_ScalarMapPL); - static VISU_IsoSurfacesPL* New(); - virtual ~VISU_IsoSurfacesPL(); - virtual void ShallowCopy(VISU_PipeLine *thePipeLine); - - virtual int GetNbParts(); - virtual void SetNbParts(int theNb = 10); - - virtual void SetScaling(int theScaling = VTK_SCALE_LINEAR); - virtual void SetRange(float theRange[2]); - virtual float GetMin(); - virtual float GetMax(); - -public: - virtual void Init(); - virtual void Update(); - virtual THook* DoHook(); - virtual void SetMapScale(float theMapScale = 1.0); - -protected: - int myNbParts; - float myRange[2]; - vtkCellDataToPointData* myCellDataToPointData; - vtkContourFilter *myContourFilter; -}; - - -#endif diff --git a/src/PIPELINE/VISU_MeshPL.cxx b/src/PIPELINE/VISU_MeshPL.cxx deleted file mode 100644 index b5d3fbc2..00000000 --- a/src/PIPELINE/VISU_MeshPL.cxx +++ /dev/null @@ -1,51 +0,0 @@ -// VISU OBJECT : interactive object for VISU entities implementation -// -// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org -// -// -// -// File: VISU_PipeLine.cxx -// Author: Alexey PETROV -// Module : VISU - - -#include "VISU_MeshPL.hxx" -#include "VTKViewer_GeometryFilter.h" - -#include -#include -#include -#include - -vtkStandardNewMacro(VISU_MeshPL); - -VISU_MeshPL::VISU_MeshPL() -{ - myIsShrinkable = true; -} - -void VISU_MeshPL::Build() -{ - myMapper->SetInput(GetInput2()); -} - -void VISU_MeshPL::Init() -{ -} diff --git a/src/PIPELINE/VISU_MeshPL.hxx b/src/PIPELINE/VISU_MeshPL.hxx deleted file mode 100644 index 27be219c..00000000 --- a/src/PIPELINE/VISU_MeshPL.hxx +++ /dev/null @@ -1,45 +0,0 @@ -// VISU OBJECT : interactive object for VISU entities implementation -// -// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org -// -// -// File: VISU_PipeLine.hxx -// Author: Alexey PETROV -// Module : VISU - -#ifndef VISU_MeshPL_HeaderFile -#define VISU_MeshPL_HeaderFile - -#include "VISU_PipeLine.hxx" - -class VISU_MeshPL : public VISU_PipeLine{ -protected: - VISU_MeshPL(); - VISU_MeshPL(const VISU_MeshPL&); -public: - vtkTypeMacro(VISU_MeshPL,VISU_PipeLine); - static VISU_MeshPL* New(); - -public: - virtual void Build(); - virtual void Init(); -}; - -#endif diff --git a/src/PIPELINE/VISU_PipeLineUtils.cxx b/src/PIPELINE/VISU_PipeLineUtils.cxx deleted file mode 100644 index f60c2cca..00000000 --- a/src/PIPELINE/VISU_PipeLineUtils.cxx +++ /dev/null @@ -1,36 +0,0 @@ -// VISU OBJECT : interactive object for VISU entities implementation -// -// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org -// -// -// File: VISU_PipeLine.hxx -// Author: Alexey PETROV -// Module : VISU - -#include "VISU_PipeLineUtils.hxx" - -void VISU::Mul(const float A[3], float b, float C[3]){ // A*b; - for(int i = 0; i < 3; i++) C[i] = A[i]*b; -} - -void VISU::Sub(const float A[3], const float B[3], float C[3]){ //A-B - for(int i = 0; i < 3; i++) C[i] = A[i] - B[i]; -} - diff --git a/src/PIPELINE/VISU_PipeLineUtils.hxx b/src/PIPELINE/VISU_PipeLineUtils.hxx deleted file mode 100644 index df7c8219..00000000 --- a/src/PIPELINE/VISU_PipeLineUtils.hxx +++ /dev/null @@ -1,90 +0,0 @@ -// VISU OBJECT : interactive object for VISU entities implementation -// -// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org -// -// -// File: VISU_PipeLine.hxx -// Author: Alexey PETROV -// Module : VISU - -#ifndef VISU_PipeLineUtils_HeaderFile -#define VISU_PipeLineUtils_HeaderFile - -#include "VISU_FieldTransform.hxx" -#include "VISU_LookupTable.hxx" -#include "VISU_Extractor.hxx" - -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#include - -#ifndef MESSAGE -#define MESSAGE(msg) std::cout<<__FILE__<<"["<<__LINE__<<"]::"< void CellDataToPoint(TItem* theTItem, - vtkCellDataToPointData *theFilter, - vtkDataSet* theDataSet, - VISU_FieldTransform *theFieldTransform) - { - if(theDataSet->GetCellData()->GetNumberOfArrays()){ - theFilter->SetInput(theFieldTransform->GetUnstructuredGridOutput()); - theFilter->PassCellDataOn(); - theTItem->SetInput(theFilter->GetUnstructuredGridOutput()); - }else - theTItem->SetInput(theFieldTransform->GetUnstructuredGridOutput()); - } - - template void ToCellCenters(TItem* theTItem, - vtkCellCenters *theFilter, - vtkDataSet* theDataSet, - VISU_FieldTransform *theFieldTransform) - { - if(theDataSet->GetCellData()->GetNumberOfArrays()){ - theFilter->SetInput(theFieldTransform->GetUnstructuredGridOutput()); - theFilter->VertexCellsOn(); - theTItem->SetInput(theFilter->GetOutput()); - }else - theTItem->SetInput(theFieldTransform->GetUnstructuredGridOutput()); - } -} - -#endif - diff --git a/src/PIPELINE/VISU_Plot3DPL.hxx b/src/PIPELINE/VISU_Plot3DPL.hxx deleted file mode 100644 index 9df47b2d..00000000 --- a/src/PIPELINE/VISU_Plot3DPL.hxx +++ /dev/null @@ -1,128 +0,0 @@ -// VISU OBJECT : interactive object for VISU entities implementation -// -// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org -// -// -// File: VISU_CutPlanesPL.hxx -// Author: Alexey PETROV -// Module : VISU - -#ifndef VISU_Plot3DPL_HeaderFile -#define VISU_Plot3DPL_HeaderFile - -#include "VISU_ScalarMapPL.hxx" -#include "VISU_CutPlanesPL.hxx" - -class vtkWarpScalar; -class vtkContourFilter; -class vtkGeometryFilter; -class vtkCellDataToPointData; - -class VISU_Plot3DPL : public VISU_ScalarMapPL{ -protected: - VISU_Plot3DPL(); - VISU_Plot3DPL(const VISU_Plot3DPL&); - -public: - vtkTypeMacro(VISU_Plot3DPL,VISU_ScalarMapPL); - static VISU_Plot3DPL* New(); - virtual ~VISU_Plot3DPL(); - - virtual - void - ShallowCopy(VISU_PipeLine *thePipeLine); - - VISU_CutPlanesPL::PlaneOrientation - GetPlaneOrientation() const; - - float - GetRotateX(); - - float - GetRotateY(); - - void - SetOrientation(VISU_CutPlanesPL::PlaneOrientation theOrientation, - float theXAngle = 0.0, - float theYAngle = 0.0); - - float - GetPlanePosition() const; - - bool - IsPositionRelative() const; - - void - SetPlanePosition(float thePosition, - bool theIsRelative); - - void - SetScaleFactor(float theScaleFactor); - - float - GetScaleFactor() const; - - void - SetContourPrs (bool theIsContourPrs ) { myIsContour = theIsContourPrs; } - - bool - GetIsContourPrs() { return myIsContour; } - - void - SetNumberOfContours(int theNumber); - - int - GetNumberOfContours() const; - - void GetBasePlane (float theOrigin[3], - float theNormal[3], - bool theCenterOrigine = false ) const; - - void GetMinMaxPosition( float& minPos, float& maxPos ) const; - -public: - virtual void Init(); - virtual void Update(); - - static - VISU_CutPlanesPL::PlaneOrientation - GetOrientation(vtkDataSet* theDataSet); - - float - GetScaleFactor(vtkDataSet* theDataSet); - - void SetMapScale(float theMapScale); - -protected: - virtual THook* DoHook(); - - float myAngle[3]; - bool myIsRelative, myIsContour; - float myPosition, myScaleFactor; - VISU_CutPlanesPL::PlaneOrientation myOrientation; - - TVTKSmartPtr myCellDataToPointData; - TVTKSmartPtr myAppendPolyData; - TVTKSmartPtr myGeometryFilter; - TVTKSmartPtr myContourFilter; - TVTKSmartPtr myWarpScalar; -}; - -#endif diff --git a/src/PIPELINE/VISU_ScalarBarActor.cxx b/src/PIPELINE/VISU_ScalarBarActor.cxx deleted file mode 100644 index afa44bd7..00000000 --- a/src/PIPELINE/VISU_ScalarBarActor.cxx +++ /dev/null @@ -1,607 +0,0 @@ -// VISU OBJECT : interactive object for VISU entities implementation -// -// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org -// -// -// File: VISU_PipeLine.hxx -// Author: Alexey PETROV -// Module : VISU - -#include "VISU_ScalarBarActor.hxx" - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -using namespace std; - -vtkCxxRevisionMacro(VISU_ScalarBarActor, "$Revision$"); - -vtkCxxSetObjectMacro(VISU_ScalarBarActor,LookupTable,VISU_LookupTable); -vtkCxxSetObjectMacro(VISU_ScalarBarActor,LabelTextProperty,vtkTextProperty); -vtkCxxSetObjectMacro(VISU_ScalarBarActor,TitleTextProperty,vtkTextProperty); - -//------------------------------------------------------------------------------ -VISU_ScalarBarActor* VISU_ScalarBarActor::New(){ - vtkObject* ret = vtkObjectFactory::CreateInstance("VISU_ScalarBarActor"); - if(ret) - return (VISU_ScalarBarActor*)ret; - return new VISU_ScalarBarActor; -} - -VISU_ScalarBarActor::VISU_ScalarBarActor() -{ - this->LookupTable = NULL; - this->Position2Coordinate->SetValue(0.17, 0.8); - - this->PositionCoordinate->SetCoordinateSystemToNormalizedViewport(); - this->PositionCoordinate->SetValue(0.82,0.1); - - this->MaximumNumberOfColors = 64; - this->NumberOfLabels = 5; - this->NumberOfLabelsBuilt = 0; - this->Orientation = VTK_ORIENT_VERTICAL; - this->Title = NULL; - - this->LabelTextProperty = vtkTextProperty::New(); - this->LabelTextProperty->SetFontSize(12); - this->LabelTextProperty->SetBold(1); - this->LabelTextProperty->SetItalic(1); - this->LabelTextProperty->SetShadow(1); - this->LabelTextProperty->SetFontFamilyToArial(); - - this->TitleTextProperty = vtkTextProperty::New(); - this->TitleTextProperty->ShallowCopy(this->LabelTextProperty); - - this->LabelFormat = new char[8]; - sprintf(this->LabelFormat,"%s","%-#6.3g"); - - this->TitleMapper = vtkTextMapper::New(); - this->TitleActor = vtkActor2D::New(); - this->TitleActor->SetMapper(this->TitleMapper); - this->TitleActor->GetPositionCoordinate()-> - SetReferenceCoordinate(this->PositionCoordinate); - - this->TextMappers = NULL; - this->TextActors = NULL; - - this->ScalarBar = vtkPolyData::New(); - this->ScalarBarMapper = vtkPolyDataMapper2D::New(); - this->ScalarBarMapper->SetInput(this->ScalarBar); - this->ScalarBarActor = vtkActor2D::New(); - this->ScalarBarActor->SetMapper(this->ScalarBarMapper); - this->ScalarBarActor->GetPositionCoordinate()-> - SetReferenceCoordinate(this->PositionCoordinate); - this->LastOrigin[0] = 0; - this->LastOrigin[1] = 0; - this->LastSize[0] = 0; - this->LastSize[1] = 0; -} - -void VISU_ScalarBarActor::ReleaseGraphicsResources(vtkWindow *win) -{ - this->TitleActor->ReleaseGraphicsResources(win); - if (this->TextMappers != NULL ) - { - for (int i=0; i < this->NumberOfLabelsBuilt; i++) - { - this->TextActors[i]->ReleaseGraphicsResources(win); - } - } - this->ScalarBarActor->ReleaseGraphicsResources(win); -} - -VISU_ScalarBarActor::~VISU_ScalarBarActor() -{ - if (this->LabelFormat) - { - delete [] this->LabelFormat; - this->LabelFormat = NULL; - } - - this->TitleMapper->Delete(); - this->TitleActor->Delete(); - - if (this->TextMappers != NULL ) - { - for (int i=0; i < this->NumberOfLabelsBuilt; i++) - { - this->TextMappers[i]->Delete(); - this->TextActors[i]->Delete(); - } - delete [] this->TextMappers; - delete [] this->TextActors; - } - - this->ScalarBar->Delete(); - this->ScalarBarMapper->Delete(); - this->ScalarBarActor->Delete(); - - if (this->Title) - { - delete [] this->Title; - this->Title = NULL; - } - - this->SetLookupTable(NULL); - this->SetLabelTextProperty(NULL); - this->SetTitleTextProperty(NULL); -} - -int VISU_ScalarBarActor::RenderOverlay(vtkViewport *viewport) -{ - int renderedSomething = 0; - int i; - - // Everything is built, just have to render - if (this->Title != NULL) - { - renderedSomething += this->TitleActor->RenderOverlay(viewport); - } - this->ScalarBarActor->RenderOverlay(viewport); - if( this->TextActors == NULL) - { - vtkWarningMacro(<<"Need a mapper to render a scalar bar"); - return renderedSomething; - } - - for (i=0; iNumberOfLabels; i++) - { - renderedSomething += this->TextActors[i]->RenderOverlay(viewport); - } - - renderedSomething = (renderedSomething > 0)?(1):(0); - - return renderedSomething; -} - -int VISU_ScalarBarActor::RenderOpaqueGeometry(vtkViewport *viewport) -{ - int renderedSomething = 0; - int i; - int size[2]; - - if (!this->LookupTable) - { - vtkWarningMacro(<<"Need a mapper to render a scalar bar"); - return 0; - } - - if (!this->TitleTextProperty) - { - vtkErrorMacro(<<"Need title text property to render a scalar bar"); - return 0; - } - - if (!this->LabelTextProperty) - { - vtkErrorMacro(<<"Need label text property to render a scalar bar"); - return 0; - } - - // Check to see whether we have to rebuild everything - int positionsHaveChanged = 0; - if (viewport->GetMTime() > this->BuildTime || - (viewport->GetVTKWindow() && - viewport->GetVTKWindow()->GetMTime() > this->BuildTime)) - { - // if the viewport has changed we may - or may not need - // to rebuild, it depends on if the projected coords chage - int *barOrigin; - barOrigin = this->PositionCoordinate->GetComputedViewportValue(viewport); - size[0] = - this->Position2Coordinate->GetComputedViewportValue(viewport)[0] - - barOrigin[0]; - size[1] = - this->Position2Coordinate->GetComputedViewportValue(viewport)[1] - - barOrigin[1]; - if (this->LastSize[0] != size[0] || - this->LastSize[1] != size[1] || - this->LastOrigin[0] != barOrigin[0] || - this->LastOrigin[1] != barOrigin[1]) - { - positionsHaveChanged = 1; - } - } - - // Check to see whether we have to rebuild everything - if (positionsHaveChanged || - this->GetMTime() > this->BuildTime || - this->LookupTable->GetMTime() > this->BuildTime || - this->LabelTextProperty->GetMTime() > this->BuildTime || - this->TitleTextProperty->GetMTime() > this->BuildTime) - { - - // Delete previously constructed objects - // - if (this->TextMappers != NULL ) - { - for (i=0; i < this->NumberOfLabelsBuilt; i++) - { - this->TextMappers[i]->Delete(); - this->TextActors[i]->Delete(); - } - delete [] this->TextMappers; - delete [] this->TextActors; - } - - // Build scalar bar object; determine its type - // - VISU_LookupTable *lut = this->LookupTable; //SALOME specific - int isLogTable = lut->GetScale() == VTK_SCALE_LOG10; - - // we hard code how many steps to display - int numColors = this->MaximumNumberOfColors; - float *range = lut->GetRange(); - - int numPts = 2*(numColors + 1); - vtkPoints *pts = vtkPoints::New(); - pts->SetNumberOfPoints(numPts); - vtkCellArray *polys = vtkCellArray::New(); - polys->Allocate(polys->EstimateSize(numColors,4)); - vtkUnsignedCharArray *colors = vtkUnsignedCharArray::New(); - colors->SetNumberOfComponents(3); - colors->SetNumberOfTuples(numColors); - - this->ScalarBarActor->SetProperty(this->GetProperty()); - this->ScalarBar->Initialize(); - this->ScalarBar->SetPoints(pts); - this->ScalarBar->SetPolys(polys); - this->ScalarBar->GetCellData()->SetScalars(colors); - pts->Delete(); polys->Delete(); colors->Delete(); - - // get the viewport size in display coordinates - int *barOrigin, barWidth, barHeight; - barOrigin = this->PositionCoordinate->GetComputedViewportValue(viewport); - size[0] = - this->Position2Coordinate->GetComputedViewportValue(viewport)[0] - - barOrigin[0]; - size[1] = - this->Position2Coordinate->GetComputedViewportValue(viewport)[1] - - barOrigin[1]; - this->LastOrigin[0] = barOrigin[0]; - this->LastOrigin[1] = barOrigin[1]; - this->LastSize[0] = size[0]; - this->LastSize[1] = size[1]; - - // Update all the composing objects - this->TitleActor->SetProperty(this->GetProperty()); - this->TitleMapper->SetInput(this->Title); - if (this->TitleTextProperty->GetMTime() > this->BuildTime) - { - // Shallow copy here so that the size of the title prop is not affected - // by the automatic adjustment of its text mapper's size (i.e. its - // mapper's text property is identical except for the font size - // which will be modified later). This allows text actors to - // share the same text property, and in that case specifically allows - // the title and label text prop to be the same. - this->TitleMapper->GetTextProperty()->ShallowCopy(this->TitleTextProperty); - this->TitleMapper->GetTextProperty()->SetJustificationToCentered(); - } - - // find the best size for the title font - int titleSize[2]; - this->SizeTitle(titleSize, size, viewport); - - // find the best size for the ticks - int labelSize[2]; - this->AllocateAndSizeLabels(labelSize, size, viewport,range); - this->NumberOfLabelsBuilt = this->NumberOfLabels; - - // generate points - float x[3]; x[2] = 0.0; - float delta, val; - if ( this->Orientation == VTK_ORIENT_VERTICAL ) - { - barWidth = size[0] - 4 - labelSize[0]; - barHeight = (int)(0.86*size[1]); - delta=(float)barHeight/numColors; - for (i=0; iSetPoint(2*i,x); - x[0] = barWidth; - pts->SetPoint(2*i+1,x); - } - } - else - { - barWidth = size[0]; - barHeight = (int)(0.4*size[1]); - delta=(float)barWidth/numColors; - for (i=0; iSetPoint(2*i,x); - x[1] = 0; - pts->SetPoint(2*i+1,x); - } - } - - //polygons & cell colors - unsigned char *rgba, *rgb; - vtkIdType ptIds[4]; - for (i=0; iInsertNextCell(4,ptIds); - - if ( isLogTable ){ //SALOME specific - float rgbval = log10(range[0]) + - i*(log10(range[1])-log10(range[0]))/(numColors -1); - rgba = lut->MapValue(rgbval); - }else{ - rgba = lut->MapValue(range[0] + (range[1] - range[0])* - ((float)i /(numColors-1.0))); - } - - rgb = colors->GetPointer(3*i); //write into array directly - rgb[0] = rgba[0]; - rgb[1] = rgba[1]; - rgb[2] = rgba[2]; - } - - // Now position everything properly - // - if (this->Orientation == VTK_ORIENT_VERTICAL) - { - int sizeTextData[2]; - - // center the title - this->TitleActor->SetPosition(size[0]/2, 0.9*size[1]); - - for (i=0; i < this->NumberOfLabels; i++) - { - val = (float)i/(this->NumberOfLabels-1) *barHeight; - this->TextMappers[i]->GetSize(viewport,sizeTextData); - this->TextMappers[i]->GetTextProperty()->SetJustificationToLeft(); - this->TextActors[i]->SetPosition(barWidth+3, - val - sizeTextData[1]/2); - } - } - else - { - this->TitleActor->SetPosition(size[0]/2, - barHeight + labelSize[1] + 0.1*size[1]); - for (i=0; i < this->NumberOfLabels; i++) - { - this->TextMappers[i]->GetTextProperty()->SetJustificationToCentered(); - val = (float)i/(this->NumberOfLabels-1) * barWidth; - this->TextActors[i]->SetPosition(val, barHeight + 0.05*size[1]); - } - } - - this->BuildTime.Modified(); - } - - // Everything is built, just have to render - if (this->Title != NULL) - { - renderedSomething += this->TitleActor->RenderOpaqueGeometry(viewport); - } - this->ScalarBarActor->RenderOpaqueGeometry(viewport); - for (i=0; iNumberOfLabels; i++) - { - renderedSomething += this->TextActors[i]->RenderOpaqueGeometry(viewport); - } - - renderedSomething = (renderedSomething > 0)?(1):(0); - - return renderedSomething; -} - -void VISU_ScalarBarActor::PrintSelf(ostream& os, vtkIndent indent) -{ - this->Superclass::PrintSelf(os,indent); - - if ( this->LookupTable ) - { - os << indent << "Lookup Table:\n"; - this->LookupTable->PrintSelf(os,indent.GetNextIndent()); - } - else - { - os << indent << "Lookup Table: (none)\n"; - } - - if (this->TitleTextProperty) - { - os << indent << "Title Text Property:\n"; - this->TitleTextProperty->PrintSelf(os,indent.GetNextIndent()); - } - else - { - os << indent << "Title Text Property: (none)\n"; - } - - if (this->LabelTextProperty) - { - os << indent << "Label Text Property:\n"; - this->LabelTextProperty->PrintSelf(os,indent.GetNextIndent()); - } - else - { - os << indent << "Label Text Property: (none)\n"; - } - - os << indent << "Title: " << (this->Title ? this->Title : "(none)") << "\n"; - os << indent << "Maximum Number Of Colors: " - << this->MaximumNumberOfColors << "\n"; - os << indent << "Number Of Labels: " << this->NumberOfLabels << "\n"; - os << indent << "Number Of Labels Built: " << this->NumberOfLabelsBuilt << "\n"; - - os << indent << "Orientation: "; - if ( this->Orientation == VTK_ORIENT_HORIZONTAL ) - { - os << "Horizontal\n"; - } - else - { - os << "Vertical\n"; - } - - os << indent << "Label Format: " << this->LabelFormat << "\n"; -} - -void VISU_ScalarBarActor::ShallowCopy(vtkProp *prop) -{ - VISU_ScalarBarActor *a = VISU_ScalarBarActor::SafeDownCast(prop); - if ( a != NULL ) - { - this->SetPosition2(a->GetPosition2()); - this->SetLookupTable(a->GetLookupTable()); - this->SetMaximumNumberOfColors(a->GetMaximumNumberOfColors()); - this->SetOrientation(a->GetOrientation()); - this->SetLabelTextProperty(a->GetLabelTextProperty()); - this->SetTitleTextProperty(a->GetTitleTextProperty()); - this->SetLabelFormat(a->GetLabelFormat()); - this->SetTitle(a->GetTitle()); - this->GetPositionCoordinate()->SetCoordinateSystem( - a->GetPositionCoordinate()->GetCoordinateSystem()); - this->GetPositionCoordinate()->SetValue( - a->GetPositionCoordinate()->GetValue()); - this->GetPosition2Coordinate()->SetCoordinateSystem( - a->GetPosition2Coordinate()->GetCoordinateSystem()); - this->GetPosition2Coordinate()->SetValue( - a->GetPosition2Coordinate()->GetValue()); - } - - // Now do superclass - this->vtkActor2D::ShallowCopy(prop); -} - -void VISU_ScalarBarActor::AllocateAndSizeLabels(int *labelSize, int *size, - vtkViewport *viewport, - float *range) -{ - labelSize[0] = labelSize[1] = 0; - - this->TextMappers = new vtkTextMapper * [this->NumberOfLabels]; - this->TextActors = new vtkActor2D * [this->NumberOfLabels]; - - char string[512]; - - float val; - int i; - - // TODO: this should be optimized, maybe by keeping a list of - // allocated mappers, in order to avoid creation/destruction of - // their underlying text properties (i.e. each time a mapper is - // created, text properties are created and shallow-assigned a font size - // which value might be "far" from the target font size). - - VISU_LookupTable *lut = this->LookupTable; //SALOME specific - int isLogTable = lut->GetScale() == VTK_SCALE_LOG10; - - for (i=0; i < this->NumberOfLabels; i++) - { - this->TextMappers[i] = vtkTextMapper::New(); - - if(isLogTable && 0 < i && i < this->NumberOfLabels - 1){ // SALOME specific - float lval = log10(range[0]) + (float)i/(this->NumberOfLabels-1) * - (log10(range[1])-log10(range[0])); - val = pow(10,lval); - }else{ - val = range[0] + (float)i/(this->NumberOfLabels-1) * (range[1]-range[0]); - } - sprintf(string, this->LabelFormat, val); - this->TextMappers[i]->SetInput(string); - - // Shallow copy here so that the size of the label prop is not affected - // by the automatic adjustment of its text mapper's size (i.e. its - // mapper's text property is identical except for the font size - // which will be modified later). This allows text actors to - // share the same text property, and in that case specifically allows - // the title and label text prop to be the same. - this->TextMappers[i]->GetTextProperty()->ShallowCopy( - this->LabelTextProperty); - - this->TextActors[i] = vtkActor2D::New(); - this->TextActors[i]->SetMapper(this->TextMappers[i]); - this->TextActors[i]->SetProperty(this->GetProperty()); - this->TextActors[i]->GetPositionCoordinate()-> - SetReferenceCoordinate(this->PositionCoordinate); - } - - if (this->NumberOfLabels) - { - int targetWidth, targetHeight; - - if ( this->Orientation == VTK_ORIENT_VERTICAL ) - { - targetWidth = (int)(0.6*size[0]); - targetHeight = (int)(0.86*size[1]/this->NumberOfLabels); - } - else - { - targetWidth = (int)(size[0]*0.8/this->NumberOfLabels); - targetHeight = (int)(0.25*size[1]); - } - - vtkTextMapper::SetMultipleConstrainedFontSize(viewport, - targetWidth, - targetHeight, - this->TextMappers, - this->NumberOfLabels, - labelSize); - } -} - -void VISU_ScalarBarActor::SizeTitle(int *titleSize, int *size, - vtkViewport *viewport) -{ - titleSize[0] = titleSize[1] = 0; - - if (this->Title == NULL || !strlen(this->Title)) - { - return; - } - - int targetWidth, targetHeight; - - targetWidth = size[0]; - if ( this->Orientation == VTK_ORIENT_VERTICAL ) - { - targetHeight = (int)(0.1*size[1]); - } - else - { - targetHeight = (int)(0.25*size[1]); - } - - this->TitleMapper->SetConstrainedFontSize( - viewport, targetWidth, targetHeight); - - this->TitleMapper->GetSize(viewport, titleSize); -} diff --git a/src/PIPELINE/VISU_ScalarBarActor.hxx b/src/PIPELINE/VISU_ScalarBarActor.hxx deleted file mode 100644 index be2f62ce..00000000 --- a/src/PIPELINE/VISU_ScalarBarActor.hxx +++ /dev/null @@ -1,164 +0,0 @@ -// VISU OBJECT : interactive object for VISU entities implementation -// -// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org -// -// -// File: VISU_PipeLine.hxx -// Author: Alexey PETROV -// Module : VISU - -#ifndef VISU_ScalarBarActor_HeaderFile -#define VISU_ScalarBarActor_HeaderFile - -#include "VISU_LookupTable.hxx" - -#include - -class vtkPolyData; -class vtkPolyDataMapper2D; -class vtkScalarsToColors; -class vtkTextMapper; -class vtkTextProperty; - -#ifndef VTK_ORIENT_HORIZONTAL -#define VTK_ORIENT_HORIZONTAL 0 -#endif - -#ifndef VTK_ORIENT_VERTICAL -#define VTK_ORIENT_VERTICAL 1 -#endif - -class VISU_ScalarBarActor : public vtkActor2D -{ -public: - vtkTypeRevisionMacro(VISU_ScalarBarActor,vtkActor2D); - void PrintSelf(ostream& os, vtkIndent indent); - - // Description: - // Instantiate object with 64 maximum colors; 5 labels; %%-#6.3g label - // format, no title, and vertical orientation. The initial scalar bar - // size is (0.05 x 0.8) of the viewport size. - static VISU_ScalarBarActor *New(); - - // Description: - // Draw the scalar bar and annotation text to the screen. - int RenderOpaqueGeometry(vtkViewport* viewport); - int RenderTranslucentGeometry(vtkViewport*) { return 0; }; - int RenderOverlay(vtkViewport* viewport); - - // Description: - // Release any graphics resources that are being consumed by this actor. - // The parameter window could be used to determine which graphic - // resources to release. - virtual void ReleaseGraphicsResources(vtkWindow *); - - // Description: - // Set/Get the vtkLookupTable to use. The lookup table specifies the number - // of colors to use in the table (if not overridden), as well as the scalar - // range. - virtual void SetLookupTable(VISU_LookupTable*); - vtkGetObjectMacro(LookupTable,VISU_LookupTable); - - // Description: - // Set/Get the maximum number of scalar bar segments to show. This may - // differ from the number of colors in the lookup table, in which case - // the colors are samples from the lookup table. - vtkSetClampMacro(MaximumNumberOfColors, int, 2, VTK_LARGE_INTEGER); - vtkGetMacro(MaximumNumberOfColors, int); - - // Description: - // Set/Get the number of annotation labels to show. - vtkSetClampMacro(NumberOfLabels, int, 0, 64); - vtkGetMacro(NumberOfLabels, int); - - // Description: - // Control the orientation of the scalar bar. - vtkSetClampMacro(Orientation,int,VTK_ORIENT_HORIZONTAL, VTK_ORIENT_VERTICAL); - vtkGetMacro(Orientation, int); - void SetOrientationToHorizontal() - {this->SetOrientation(VTK_ORIENT_HORIZONTAL);}; - void SetOrientationToVertical() {this->SetOrientation(VTK_ORIENT_VERTICAL);}; - - // Description: - // Set/Get the title text property. - virtual void SetTitleTextProperty(vtkTextProperty *p); - vtkGetObjectMacro(TitleTextProperty,vtkTextProperty); - - // Description: - // Set/Get the labels text property. - virtual void SetLabelTextProperty(vtkTextProperty *p); - vtkGetObjectMacro(LabelTextProperty,vtkTextProperty); - - // Description: - // Set/Get the format with which to print the labels on the scalar - // bar. - vtkSetStringMacro(LabelFormat); - vtkGetStringMacro(LabelFormat); - - // Description: - // Set/Get the title of the scalar bar actor, - vtkSetStringMacro(Title); - vtkGetStringMacro(Title); - - // Description: - // Shallow copy of a scalar bar actor. Overloads the virtual vtkProp method. - void ShallowCopy(vtkProp *prop); - -protected: - VISU_ScalarBarActor(); - ~VISU_ScalarBarActor(); - - VISU_LookupTable *LookupTable; - vtkTextProperty *TitleTextProperty; - vtkTextProperty *LabelTextProperty; - - int MaximumNumberOfColors; - int NumberOfLabels; - int NumberOfLabelsBuilt; - int Orientation; - char *Title; - char *LabelFormat; - - vtkTextMapper **TextMappers; - virtual void AllocateAndSizeLabels(int *labelSize, int *size, - vtkViewport *viewport, float *range); - -private: - vtkTextMapper *TitleMapper; - vtkActor2D *TitleActor; - - vtkActor2D **TextActors; - - vtkPolyData *ScalarBar; - vtkPolyDataMapper2D *ScalarBarMapper; - vtkActor2D *ScalarBarActor; - - vtkTimeStamp BuildTime; - int LastSize[2]; - int LastOrigin[2]; - - void SizeTitle(int *titleSize, int *size, vtkViewport *viewport); - -private: - VISU_ScalarBarActor(const VISU_ScalarBarActor&); // Not implemented. - void operator=(const VISU_ScalarBarActor&); // Not implemented. -}; - -#endif diff --git a/src/PIPELINE/VISU_StreamLinesPL.hxx b/src/PIPELINE/VISU_StreamLinesPL.hxx deleted file mode 100644 index b360f974..00000000 --- a/src/PIPELINE/VISU_StreamLinesPL.hxx +++ /dev/null @@ -1,120 +0,0 @@ -// VISU OBJECT : interactive object for VISU entities implementation -// -// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org -// -// -// File: VISU_PipeLine.hxx -// Author: Alexey PETROV -// Module : VISU - -#ifndef VISU_StreamLinesPL_HeaderFile -#define VISU_StreamLinesPL_HeaderFile - -#include "VISU_DeformedShapePL.hxx" -#include - -using namespace std; - -class vtkPointSet; -class vtkCellCenters; -class VTKViewer_GeometryFilter; -class VISU_UsedPointsFilter; - -class VISU_StreamLinesPL : public VISU_DeformedShapePL{ -protected: - VISU_StreamLinesPL(); - VISU_StreamLinesPL(const VISU_StreamLinesPL&); -public: - vtkTypeMacro(VISU_StreamLinesPL,VISU_DeformedShapePL); - static VISU_StreamLinesPL* New(); - virtual ~VISU_StreamLinesPL(); - virtual void ShallowCopy(VISU_PipeLine *thePipeLine); - - virtual int SetParams(float theIntStep, - float thePropogationTime, - float theStepLength, - vtkPointSet* theSource = NULL, - float thePercents = 0.3, - int theDirection = VTK_INTEGRATE_BOTH_DIRECTIONS, - int isOnlyTry = false); - virtual vtkPointSet* GetSource(); - virtual float GetUsedPoints(); - virtual float GetIntegrationStep(); - virtual float GetPropagationTime(); - virtual float GetStepLength(); - virtual int GetDirection(); - - virtual vtkDataSet* GetStreamerSource(); - virtual float GetVelocityCoeff(); - - virtual float GetMaxIntegrationStep(); - virtual float GetMinIntegrationStep(); - - virtual float GetMinStepLength(); - virtual float GetMaxStepLength(); - - virtual float GetMinPropagationTime(); - virtual float GetMaxPropagationTime(); - virtual float GetBasePropagationTime(); - -public: - virtual THook* DoHook(); - virtual void Init(); - virtual void Update(); - virtual void SetMapScale(float theMapScale = 1.0); - -public: - static float GetMaxIntegrationStep(vtkPointSet* theDataSet); - static float GetMinIntegrationStep(vtkPointSet* theDataSet, float thePercents = 0.3); - static float GetBaseIntegrationStep(vtkPointSet* theDataSet, float thePercents = 0.3); - - static float GetMinPropagationTime(vtkPointSet* theDataSet); - static float GetMaxPropagationTime(vtkPointSet* theDataSet); - static float GetBasePropagationTime(vtkPointSet* theDataSet); - - static float GetMinStepLength(vtkPointSet* theDataSet); - static float GetMaxStepLength(vtkPointSet* theDataSet); - static float GetBaseStepLength(vtkPointSet* theDataSet); - - static float GetVelocityCoeff(vtkPointSet* theDataSet); - - static int IsPossible(vtkPointSet* theDataSet, float thePercents = 0.3); - -protected: - static float GetNecasseryMemorySize(vtkIdType theNbOfPoints, float theStepLength, - float thePropogationTime, float thePercents = 0.3); - static int FindPossibleParams(vtkPointSet* theDataSet, float& theStepLength, - float& thePropogationTime, float& thePercents); - - static float CorrectIntegrationStep(float theStep, vtkPointSet* theDataSet, float thePercents = 0.3); - static float CorrectPropagationTime(float thePropagationTime, vtkPointSet* theDataSet); - static float CorrectStepLength(float theStep, vtkPointSet* theDataSet); - - vtkStreamLine* myStream; - vtkPointSet* mySource; - vtkCellCenters* myCenters; - VTKViewer_GeometryFilter *myGeomFilter; - VISU_UsedPointsFilter *myPointsFilter; - float myPercents; -}; - - -#endif - diff --git a/src/PIPELINE/VISU_UsedPointsFilter.cxx b/src/PIPELINE/VISU_UsedPointsFilter.cxx deleted file mode 100644 index 311248cf..00000000 --- a/src/PIPELINE/VISU_UsedPointsFilter.cxx +++ /dev/null @@ -1,70 +0,0 @@ -// VISU OBJECT : interactive object for VISU entities implementation -// -// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org -// -// -// File: VISU_StreamLinesPL.cxx -// Author: Alexey PETROV -// Module : VISU - - -#include "VISU_UsedPointsFilter.hxx" - -#include -#include -#include -#include -#include -#include - -vtkStandardNewMacro(VISU_UsedPointsFilter); - -VISU_UsedPointsFilter::VISU_UsedPointsFilter(){ - PercentsOfUsedPoints = 1.0; -} - -VISU_UsedPointsFilter::~VISU_UsedPointsFilter(){} - -void VISU_UsedPointsFilter::Execute(){ - vtkPointSet *anInput = this->GetInput(), *anOutput = this->GetOutput(); - anOutput->GetPointData()->CopyAllOff(); - anOutput->GetCellData()->CopyAllOff(); - anOutput->CopyStructure(anInput); - - vtkPoints* aPoints = vtkPoints::New(); - vtkIdList *anIdList = vtkIdList::New(); - vtkIdType iEnd = anInput->GetNumberOfPoints(); - for(vtkIdType i = 0; i < iEnd; i++){ - anInput->GetPointCells(i,anIdList); - if(anIdList->GetNumberOfIds() > 0) - aPoints->InsertNextPoint(anInput->GetPoint(i)); - } - vtkPoints* aNewPoints = vtkPoints::New(); - iEnd = aPoints->GetNumberOfPoints(); - if (PercentsOfUsedPoints > 0){ - vtkIdType anOffset = vtkIdType(1.0/PercentsOfUsedPoints); - if(anOffset < 1) anOffset = 1; - for(vtkIdType i = 0; i < iEnd; i += anOffset) - aNewPoints->InsertNextPoint(aPoints->GetPoint(i)); - } - anOutput->SetPoints(aNewPoints); - aNewPoints->Delete(); - aPoints->Delete(); -} diff --git a/src/PIPELINE/VISU_UsedPointsFilter.hxx b/src/PIPELINE/VISU_UsedPointsFilter.hxx deleted file mode 100644 index 273ab3d2..00000000 --- a/src/PIPELINE/VISU_UsedPointsFilter.hxx +++ /dev/null @@ -1,49 +0,0 @@ -// VISU OBJECT : interactive object for VISU entities implementation -// -// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org -// -// -// File: VISU_UsedPointsFilter.hxx -// Author: Alexey PETROV -// Module : VISU - -#ifndef VISU_UsedPointsFilter_HeaderFile -#define VISU_UsedPointsFilter_HeaderFile - -#include - -class VISU_UsedPointsFilter : public vtkPointSetToPointSetFilter{ -protected: - VISU_UsedPointsFilter(); - VISU_UsedPointsFilter(const VISU_UsedPointsFilter&); - - virtual void Execute(); - float PercentsOfUsedPoints; - -public: - vtkTypeMacro(VISU_UsedPointsFilter,vtkPointSetToPointSetFilter); - static VISU_UsedPointsFilter* New(); - virtual ~VISU_UsedPointsFilter(); - - vtkSetMacro(PercentsOfUsedPoints,float); - vtkGetMacro(PercentsOfUsedPoints,float); -}; - -#endif diff --git a/src/PIPELINE/VISU_VectorsPL.hxx b/src/PIPELINE/VISU_VectorsPL.hxx deleted file mode 100644 index 8b24ece6..00000000 --- a/src/PIPELINE/VISU_VectorsPL.hxx +++ /dev/null @@ -1,87 +0,0 @@ -// VISU OBJECT : interactive object for VISU entities implementation -// -// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org -// -// -// File: VISU_PipeLine.hxx -// Author: Alexey PETROV -// Module : VISU - -#ifndef VISU_VectorsPL_HeaderFile -#define VISU_VectorsPL_HeaderFile - -#include "VISU_DeformedShapePL.hxx" - -class VTKViewer_TransformFilter; -class VTKViewer_Transform; -class vtkCellCenters; - -class vtkGlyphSource2D; -class vtkConeSource; -class vtkLineSource; - -class vtkGlyph3D; - -class VISU_VectorsPL : public VISU_DeformedShapePL{ -protected: - VISU_VectorsPL(); - VISU_VectorsPL(const VISU_VectorsPL&); -public: - vtkTypeMacro(VISU_VectorsPL,VISU_DeformedShapePL); - static VISU_VectorsPL* New(); - virtual ~VISU_VectorsPL(); - virtual void ShallowCopy(VISU_PipeLine *thePipeLine); - - virtual void SetScale(float theScale); - virtual float GetScale(); - - enum GlyphType{ ARROW, CONE2, CONE6, NONE}; - virtual void SetGlyphType(GlyphType theType) { myTypeGlyph = theType;} - virtual GlyphType GetGlyphType() { return myTypeGlyph;} - - enum GlyphPos{ CENTER, TAIL,HEAD}; - virtual void SetGlyphPos(GlyphPos thePos) { myPosGlyph = thePos;} - virtual GlyphPos GetGlyphPos() { return myPosGlyph;} - -public: - virtual THook* DoHook(); - virtual void Init(); - virtual void Update(); - - virtual void SetTransform(VTKViewer_Transform* theTransform); - virtual VTKViewer_Transform* GetTransform(); - - virtual void SetMapScale(float theMapScale = 1.0); - -protected: - GlyphType myTypeGlyph; - GlyphPos myPosGlyph; - vtkGlyph3D *myGlyph; - - vtkGlyphSource2D *myGlyphSource; - vtkLineSource *myLineSource; - vtkConeSource *myConeSource; - - vtkCellCenters* myCenters; - VTKViewer_TransformFilter *myTransformFilter; -}; - - -#endif diff --git a/src/VISUGUI/VISU_icons.po b/src/VISUGUI/VISU_icons.po deleted file mode 100644 index 4422d48d..00000000 --- a/src/VISUGUI/VISU_icons.po +++ /dev/null @@ -1,58 +0,0 @@ -# VISU VISUGUI : GUI of VISU component -# -# Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -# -# This library is free software; you can redistribute it and/or -# modify it 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org -# -# -# -# File : VisuGUI_icons.po -# Module : VISU - -msgid "" -msgstr "" -"Project-Id-Version: PROJECT VERSION\n" -"POT-Creation-Date: 2002-05-28 10:57:43 AM CEST\n" -"PO-Revision-Date: YYYY-MM-DD\n" -"Last-Translator: FULLNAME \n" -"Content-Type: text/plain; charset=iso-8859-1\n" - - -msgid "ICON_OBJBROWSER_Visu" -msgstr "Visu_tree_visu.png" - -msgid "ICON_SCALAR_MAP" -msgstr "Visu_scalars.png" - -msgid "ICON_DEFORMED_SHAPE" -msgstr "Visu_deformed.png" - -msgid "ICON_VECTORS" -msgstr "Visu_vectors.png" - -msgid "ICON_ISO_SURFACES" -msgstr "Visu_isosurfaces.png" - -msgid "ICON_CUT_PLANES" -msgstr "Visu_cutplane.png" - -msgid "ICON_CUT_LINES" -msgstr "Visu_cutlines.png" - -msgid "ICON_STREAM_LINES" -msgstr "Visu_streamlines.png" diff --git a/src/VISUGUI/VISU_images.po b/src/VISUGUI/VISU_images.po deleted file mode 100644 index 0f7909b9..00000000 --- a/src/VISUGUI/VISU_images.po +++ /dev/null @@ -1,98 +0,0 @@ -# VISU VISUGUI : GUI of VISU component -# -# Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -# -# This library is free software; you can redistribute it and/or -# modify it 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org -# -# -# -# File : VisuGUI_icons.po -# Module : VISU - -msgid "" -msgstr "" -"Project-Id-Version: PROJECT VERSION\n" -"POT-Creation-Date: 2002-05-28 10:57:43 AM CEST\n" -"PO-Revision-Date: 2005-05-10 15:20+0400\n" -"Last-Translator: FULLNAME \n" -"Content-Type: text/plain; charset=iso-8859-1\n" - - -msgid "ICON_OBJBROWSER_Visu" -msgstr "Visu_tree_visu.png" - -msgid "ICON_SCALAR_MAP" -msgstr "Visu_scalars.png" - -msgid "ICON_DEFORMED_SHAPE" -msgstr "Visu_deformed.png" - -msgid "ICON_VECTORS" -msgstr "Visu_vectors.png" - -msgid "ICON_ISO_SURFACES" -msgstr "Visu_isosurfaces.png" - -msgid "ICON_CUT_PLANES" -msgstr "Visu_cutplane.png" - -msgid "ICON_CUT_LINES" -msgstr "Visu_cutlines.png" - -msgid "ICON_STREAM_LINES" -msgstr "Visu_streamlines.png" - -msgid "ICON_PLOT2D" -msgstr "Visu_plot2d.png" - -# Representation menu - -msgid "ICON_POINTS" -msgstr "Visu_points.png" - -msgid "ICON_WIREFRAME" -msgstr "Visu_wireframe.png" - -msgid "ICON_SURFACE" -msgstr "Visu_surface.png" - -msgid "ICON_ERASE_ALL" -msgstr "Visu_eraseall.png" - -msgid "ICON_GLOBAL_SELECTION" -msgstr "Visu_selectall.png" - -msgid "ICON_PARTIAL_SELECTION" -msgstr "Visu_selectonly.png" - -msgid "ICON_SCALING" -msgstr "Visu_scaling.png" - -# - -msgid "ICON_TIMEANIMATION" -msgstr "Visu_anim.png" - -msgid "ICON_SWEEP" -msgstr "Visu_scalars_anim.png" - -msgid "ICON_PLOT_3D" -msgstr "Visu_plot3d.png" - -msgid "ICON_CUBE_AXES" -msgstr "Visu_graduated_axes.png" diff --git a/src/VISUGUI/VisuGUI_CursorDlg.cxx b/src/VISUGUI/VisuGUI_CursorDlg.cxx deleted file mode 100644 index e1adefcf..00000000 --- a/src/VISUGUI/VisuGUI_CursorDlg.cxx +++ /dev/null @@ -1,109 +0,0 @@ -// VISU VISUGUI : GUI of VISU component -// -// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org -// -// -// -// File : VisuGUI_CursorDlg.cxx -// Author : Laurent CORNABE & Hubert ROLLAND -// Module : VISU -// $Header$ - -using namespace std; -#include "VisuGUI_CursorDlg.h" -#include - -/*! - Constructor -*/ -VisuGUI_CursorDlg::VisuGUI_CursorDlg( QWidget* parent, const char* name, bool modal, WFlags fl ) - : QDialog( parent, name, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu ) -{ - if ( !name ) - setName( "VisuGUI_CursorDlg" ); - setCaption( name ); - setSizeGripEnabled( TRUE ); - - QGridLayout* TopLayout = new QGridLayout( this ); - TopLayout->setSpacing( 6 ); - TopLayout->setMargin( 11 ); - - TopGroupBox = new QGroupBox( this, "TopGroupBox" ); - TopGroupBox->setColumnLayout(0, Qt::Vertical ); - TopGroupBox->layout()->setSpacing( 0 ); - TopGroupBox->layout()->setMargin( 0 ); - QGridLayout* TopGroupBoxLayout = new QGridLayout( TopGroupBox->layout() ); - TopGroupBoxLayout->setAlignment( Qt::AlignTop ); - TopGroupBoxLayout->setSpacing( 6 ); - TopGroupBoxLayout->setMargin( 11 ); - - Comment1 = new QLabel( tr( "TextLabel1" ), TopGroupBox, "Comment1" ); - Comment1->setAlignment( QLabel::AlignCenter ); - TopGroupBoxLayout->addWidget( Comment1, 0, 0 ); - - Comment2 = new QLabel( tr( "TextLabel2" ), TopGroupBox, "Comment2" ); - Comment2->setAlignment( QLabel::AlignCenter ); - TopGroupBoxLayout->addWidget( Comment2, 1, 0 ); - - SpinBox1 = new QSpinBox( 1, 100, 1, TopGroupBox, "SpinBox1" ); - SpinBox1->setValue( 100 ); - SpinBox1->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) ); - SpinBox1->setMinimumSize( 70, 0 ); - QHBoxLayout* SLayout = new QHBoxLayout; - SLayout->addItem( new QSpacerItem( 5, 5, QSizePolicy::Expanding, QSizePolicy::Minimum ) ); - SLayout->addWidget( SpinBox1 ); - SLayout->addItem( new QSpacerItem( 5, 5, QSizePolicy::Expanding, QSizePolicy::Minimum ) ); - TopGroupBoxLayout->addLayout( SLayout, 2, 0 ); - - GroupButtons = new QGroupBox (this, "GroupButtons"); - GroupButtons->setGeometry(QRect(10, 10, 281, 48)); - GroupButtons->setColumnLayout(0, Qt::Vertical); - GroupButtons->layout()->setSpacing(0); - GroupButtons->layout()->setMargin(0); - QGridLayout* GroupButtonsLayout = new QGridLayout (GroupButtons->layout()); - GroupButtonsLayout->setAlignment(Qt::AlignTop); - GroupButtonsLayout->setSpacing(6); - GroupButtonsLayout->setMargin(11); - - buttonOk = new QPushButton (tr("&OK"), GroupButtons, "buttonOk"); - buttonOk->setAutoDefault(TRUE); - buttonOk->setDefault(TRUE); - GroupButtonsLayout->addWidget(buttonOk, 0, 0); - - GroupButtonsLayout->addItem(new QSpacerItem (5, 5, QSizePolicy::Expanding, QSizePolicy::Minimum), 0, 1); - - buttonCancel = new QPushButton(tr("&Cancel") , GroupButtons, "buttonCancel"); - buttonCancel->setAutoDefault(TRUE); - GroupButtonsLayout->addWidget(buttonCancel, 0, 2); - - TopLayout->addWidget(TopGroupBox, 0, 0); - TopLayout->addWidget(GroupButtons, 1, 0); - - // signals and slots connections - connect( buttonOk, SIGNAL( clicked() ), this, SLOT( accept() ) ); - connect( buttonCancel, SIGNAL( clicked() ), this, SLOT( reject() ) ); -} - -/*! - Destructor -*/ -VisuGUI_CursorDlg::~VisuGUI_CursorDlg() -{ -} diff --git a/src/VISUGUI/VisuGUI_CursorDlg.h b/src/VISUGUI/VisuGUI_CursorDlg.h deleted file mode 100644 index 018709cf..00000000 --- a/src/VISUGUI/VisuGUI_CursorDlg.h +++ /dev/null @@ -1,55 +0,0 @@ -// VISU VISUGUI : GUI of VISU component -// -// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org -// -// -// -// File : VisuGUI_CursorDlg.h -// Author : Laurent CORNABE & Hubert ROLLAND -// Module : VISU -// $Header$ - -#ifndef VISUGUI_CURSORDLG_H -#define VISUGUI_CURSORDLG_H - -#include -#include -#include -#include -#include - -class VisuGUI_CursorDlg : public QDialog -{ - Q_OBJECT - -public: - VisuGUI_CursorDlg( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); - ~VisuGUI_CursorDlg(); - - QGroupBox* TopGroupBox; - QLabel* Comment1; - QLabel* Comment2; - QSpinBox* SpinBox1; - QGroupBox* GroupButtons; - QPushButton* buttonOk; - QPushButton* buttonCancel; -}; - -#endif // VISUGUI_CURSORDLG_H diff --git a/src/VISUGUI/VisuGUI_CutPlanesDlg.h b/src/VISUGUI/VisuGUI_CutPlanesDlg.h deleted file mode 100644 index e5ccea9f..00000000 --- a/src/VISUGUI/VisuGUI_CutPlanesDlg.h +++ /dev/null @@ -1,136 +0,0 @@ -// VISU VISUGUI : GUI of VISU component -// -// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org -// -// -// -// File : VisuGUI_CutPlanesDlg.h -// Author : Laurent CORNABE & Hubert ROLLAND -// Module : VISU -// $Header$ - -#ifndef VISUGUI_CUTPLANESDLG_H -#define VISUGUI_CUTPLANESDLG_H - -#include "VisuGUI_ScalarBarDlg.h" -#include "VISU_CutPlanes_i.hh" - -#include - -#include -#include - -#include "SALOMEconfig.h" -#include CORBA_CLIENT_HEADER(VISU_Gen) - -class QtxDblSpinBox; -class SUIT_ViewWindow; -class SUIT_ViewManager; -class SalomeApp_Module; - - -class VisuGUI_CutPlanesPane : public QFrame -{ - Q_OBJECT - -public: - VisuGUI_CutPlanesPane (QWidget* parent); - ~VisuGUI_CutPlanesPane(); - - void setNbPlanes( const int nbp ) {nbPlan->setValue( nbp );} - int getNbPlanes() {return nbPlan->value();} - void setPlanePos( const VISU::CutPlanes::Orientation orient/*, const double pos1, const double pos2 */); - VISU::CutPlanes::Orientation getOrientaion(); - void setRotation( const double r1, const double r2 ); - double getRotation1() {return Rot1->value();} - double getRotation2() {return Rot2->value();} - - void initFromPrsObject(VISU::CutPlanes_i* thePrs); - int storeToPrsObject(VISU::CutPlanes_i* thePrs); - -private: - void createPlanes(); - void deletePlanes(); - - - QLabel* LabelRot1; - QLabel* LabelRot2; - QSpinBox* nbPlan; - QtxDblSpinBox* Rot1; - QtxDblSpinBox* Rot2; - QRadioButton* RBzx; - QRadioButton* RByz; - QRadioButton* RBxy; - QtxDblSpinBox* myPosSpn; - QTable* myPosTable; - VISU::CutPlanes_i* myCutPlanes; - QCheckBox* myPreviewCheck; - double X1, X2; - double Y1, Y2; - double Z1, Z2; - bool hasInit; - - SALOME_Actor* myPreviewActor; - -private slots: - void editScalarBar(); - void orientationChanged( int ); - void DrawTable(); - void setDefault( int all = -1); - void onValueChanged(int theRow, int theCol); - void onRotation(double theValue); - void onPreviewCheck(bool thePreview); -}; - - -class VisuGUI_CutPlanesDlg : public QDialog -{ - Q_OBJECT - -public: - VisuGUI_CutPlanesDlg (SalomeApp_Module* theModule); - ~VisuGUI_CutPlanesDlg() {}; - - void initFromPrsObject (VISU::CutPlanes_i* thePrs); - int storeToPrsObject (VISU::CutPlanes_i* thePrs); - -protected slots: - void accept(); - void reject(); - void onWindowActivated (SUIT_ViewWindow*); - -private: - VisuGUI_CutPlanesPane* myCutPane; - VisuGUI_ScalarBarPane* myScalarPane; - VISU::CutPlanes_i* myPrs; -}; - - -class VisuGUI_NumEditItem: public QTableItem -{ -public: - VisuGUI_NumEditItem(QTable* table, EditType et, const QString& text ): - QTableItem(table, et, text) {}; - ~VisuGUI_NumEditItem() {}; - - QWidget* createEditor() const; -}; - -#endif // VISUGUI_CUTPLANESDLG_H diff --git a/src/VISUGUI/VisuGUI_EditContainerDlg.cxx b/src/VISUGUI/VisuGUI_EditContainerDlg.cxx deleted file mode 100644 index eed32a53..00000000 --- a/src/VISUGUI/VisuGUI_EditContainerDlg.cxx +++ /dev/null @@ -1,429 +0,0 @@ -// VISU VISUGUI : GUI of VISU component -// -// Copyright (C) 2003 CEA/DEN, EDF R&D -// -// -// -// File : VisuGUI_EditContainerDlg.cxx -// Author : VSV -// Module : VISU - - -#include "VisuGUI_EditContainerDlg.h" - -#include "VisuGUI.h" -#include "VisuGUI_Tools.h" - -#include "VISU_Table_i.hh" - -#include "SalomeApp_Application.h" -#include "SUIT_Desktop.h" - -#include -#include -#include -#include -#include - -using namespace std; - - -/* XPM */ -static const char * left_xpm[] = { -"24 24 61 1", -" c None", -". c #323232", -"+ c #010101", -"@ c #4A4A4A", -"# c #040404", -"$ c #979797", -"% c #7B7B7B", -"& c #939393", -"* c #EEEEEE", -"= c #686868", -"- c #030303", -"; c #9C9C9C", -"> c #FFFFFF", -", c #B1B1B1", -"' c #5E5E5E", -") c #060606", -"! c #C1C1C1", -"~ c #626262", -"{ c #000000", -"] c #989898", -"^ c #A1A1A1", -"/ c #A5A5A5", -"( c #909090", -"_ c #868686", -": c #616161", -"< c #959595", -"[ c #919191", -"} c #848484", -"| c #606060", -"1 c #0B0B0B", -"2 c #545454", -"3 c #727272", -"4 c #A2A2A2", -"5 c #969696", -"6 c #838383", -"7 c #5F5F5F", -"8 c #101010", -"9 c #434343", -"0 c #6B6B6B", -"a c #858585", -"b c #8E8E8E", -"c c #373737", -"d c #696969", -"e c #8D8D8D", -"f c #B5B5B5", -"g c #111111", -"h c #393939", -"i c #898989", -"j c #B0B0B0", -"k c #191919", -"l c #3A3A3A", -"m c #646464", -"n c #535353", -"o c #050505", -"p c #353535", -"q c #585858", -"r c #4C4C4C", -"s c #0D0D0D", -"t c #3E3E3E", -"u c #020202", -"v c #0A0A0A", -" ", -" ", -" .+ .+ ", -" .@# .@# ", -" .$%# .$%# ", -" .&*=- .&*=- ", -" .;>,') .;>,') ", -" .;>!;~{ .;>!;~{ ", -" .]>!^&~{ .]>!^&~{ ", -" ./>!/(_:{ ./>!/(_:{ ", -" .<*!^[}}|{.<*!^[}}|{ ", -" 123}45667{123}45667{ ", -" 890a45b7{ 890a45b7{ ", -" 8cdef5'{ 8cdef5'{ ", -" gh0ij7k gh0ij7k ", -" 8lm0no 8lm0no ", -" 8pqr- 8pqr- ", -" sht- sht- ", -" 1.u 1.u ", -" v{ v{ ", -" ", -" ", -" ", -" "}; - -static QPixmap MYLeftPix(left_xpm); - - -static const char * right_xpm[] = { -"24 24 43 1", -" g None", -". g #323232", -"+ g #5D5D5D", -"@ g #000000", -"# g #C4C4C4", -"$ g #313131", -"% g #C5C5C5", -"& g #E4E4E4", -"* g #2D2D2D", -"= g #B7B7B7", -"- g #EFEFEF", -"; g #DCDCDC", -"> g #282828", -", g #AFAFAF", -"' g #E0E0E0", -") g #242424", -"! g #C7C7C7", -"~ g #9A9A9A", -"{ g #8E8E8E", -"] g #1F1F1F", -"^ g #A5A5A5", -"/ g #989898", -"( g #888888", -"_ g #1B1B1B", -": g #ADADAD", -"< g #858585", -"[ g #838383", -"} g #868686", -"| g #929292", -"1 g #C1C1C1", -"2 g #161616", -"3 g #909090", -"4 g #747474", -"5 g #3A3A3A", -"6 g #121212", -"7 g #0D0D0D", -"8 g #7A7A7A", -"9 g #8A8A8A", -"0 g #090909", -"a g #040404", -"b g #707070", -"c g #6E6E6E", -"d g #3F3F3F", -" ", -" ", -" .. .. ", -" .+@ .+@ ", -" .#+@ .#+@ ", -" $%&+@ $%&+@ ", -" *=-;+@ *=-;+@ ", -" >,'=;+@ >,'=;+@ ", -" ),!~{;+@ ),!~{;+@ ", -" ]^!/({;+@ ]^!/({;+@ ", -" _~:<[}|1+@_~:<[}|1+@ ", -" 23~[[{:45@23~[[{:45@ ", -" 6setFrameStyle(QFrame::Box | QFrame::Sunken); - - QGridLayout* aControlLay = new QGridLayout (aControlFrame); - aControlLay->setSpacing(6); - aControlLay->setMargin(11); - aControlLay->addRowSpacing(1, 30); - aControlLay->addRowSpacing(4, 30); - aControlLay->setRowStretch(1, 1); - aControlLay->setRowStretch(4, 1); - aControlLay->addColSpacing(0, 180); - aControlLay->addColSpacing(2, 180); - - QLabel* aSelectLbl = new QLabel (tr("LBL_STUDY"), aControlFrame); - aControlLay->addWidget(aSelectLbl, 0, 0); - - myStudyLst = new QListView (aControlFrame); - myStudyLst->setSelectionMode(QListView::Extended); - myStudyLst->addColumn(tr("TXT_TABLE"), 80); - myStudyLst->addColumn(tr("TXT_CURVE"), 50); - myStudyLst->addColumn(tr(""), 0); - myStudyLst->setAllColumnsShowFocus(true); - myStudyLst->setMinimumHeight(130); - connect(myStudyLst, SIGNAL(selectionChanged()), this, SLOT(onLeftSelected())); - aControlLay->addMultiCellWidget(myStudyLst, 1, 4, 0, 0); - - myRightBtn = new QToolButton (aControlFrame); - myRightBtn->setIconSet(MYRightPix); - myRightBtn->setEnabled(false); - connect(myRightBtn, SIGNAL(clicked()), this, SLOT(onRightClicked())); - aControlLay->addWidget(myRightBtn, 2, 1); - - myLeftBtn = new QToolButton(aControlFrame); - myLeftBtn->setIconSet(MYLeftPix); - myLeftBtn->setEnabled(false); - connect(myLeftBtn, SIGNAL(clicked()), this, SLOT(onLeftClicked())); - aControlLay->addWidget(myLeftBtn, 3, 1); - - QLabel* aForceLbl = new QLabel (tr("LBL_CONTAINER"), aControlFrame); - aControlLay->addWidget(aForceLbl, 0, 2); - - myContainerLst = new QListView(aControlFrame); - myContainerLst->setSelectionMode(QListView::Extended); - myContainerLst->addColumn(tr("TXT_TABLE"), 80); - myContainerLst->addColumn(tr("TXT_CURVE"), 50); - myContainerLst->addColumn(tr(""), 0); - myContainerLst->setMinimumWidth(130); - connect(myContainerLst, SIGNAL(selectionChanged()), this, SLOT(onRightSelected())); - aControlLay->addMultiCellWidget(myContainerLst, 1, 4, 2, 2); - - TopLayout->addWidget(aControlFrame); - - // Common buttons =========================================================== - QGroupBox* GroupButtons = new QGroupBox(this, "GroupButtons"); - GroupButtons->setColumnLayout(0, Qt::Vertical); - GroupButtons->layout()->setSpacing(0); - GroupButtons->layout()->setMargin(0); - QGridLayout* GroupButtonsLayout = new QGridLayout(GroupButtons->layout()); - GroupButtonsLayout->setAlignment(Qt::AlignTop); - GroupButtonsLayout->setSpacing(6); - GroupButtonsLayout->setMargin(11); - - QPushButton* buttonOk = new QPushButton(tr("&OK"), GroupButtons, "buttonOk"); - buttonOk->setAutoDefault(TRUE); - buttonOk->setDefault(TRUE); - GroupButtonsLayout->addWidget(buttonOk, 0, 0); - GroupButtonsLayout->addItem(new QSpacerItem(5, 5, QSizePolicy::Expanding, - QSizePolicy::Minimum), 0, 1); - - QPushButton* buttonCancel = new QPushButton(tr("&Cancel") , GroupButtons, "buttonCancel"); - buttonCancel->setAutoDefault(TRUE); - GroupButtonsLayout->addWidget(buttonCancel, 0, 2); - - TopLayout->addWidget(GroupButtons); - - connect(buttonOk, SIGNAL(clicked()), this, SLOT(accept())); - connect(buttonCancel, SIGNAL(clicked()), this, SLOT(reject())); -} - -void VisuGUI_EditContainerDlg::initFromPrsObject (VISU::Container_i* theContainer) -{ - _PTR(Study) aStudy = VISU::GetCStudy(VISU::GetAppStudy(myVisuGUI)); - _PTR(SComponent) aVisuSO = aStudy->FindComponent("VISU"); - if (!aVisuSO) { - return; - } - QValueList aStudyCurves; - QValueList aContainerCurves; - // Find curves in container - for (int i = 1; i <= theContainer->GetNbCurves(); i++) { - VISU::Curve_i* aCurve = theContainer->GetCurve(i); - if (aCurve == NULL) continue; - CurveStruct aEntry; - aEntry.CurveName = aCurve->GetTitle(); - aEntry.CurveEntry = aCurve->GetEntry(); - _PTR(SObject) aTableSO = aStudy->FindObjectID(aCurve->GetTableID()); - if (!aTableSO) continue; - aEntry.TableName = getSObjectName(aTableSO); - aContainerCurves.append(aEntry); - new QListViewItem(myContainerLst, aEntry.TableName, aEntry.CurveName, aEntry.CurveEntry); - } - // Find curves in study - _PTR(ChildIterator) aIter = aStudy->NewChildIterator(aVisuSO); - for (aIter->InitEx(true); aIter->More(); aIter->Next()) { - _PTR(SObject) aSObject = aIter->Value(); - CORBA::Object_var anObject = VISU::ClientSObjectToObject(aSObject); - VISU::Base_var aVisuObj = VISU::Base::_narrow(anObject); - if (!CORBA::is_nil(aVisuObj)) { - if (aVisuObj->GetType() == VISU::TCURVE) { - _PTR(SObject) aTableSO = aSObject->GetFather(); - CurveStruct aEntry; - aEntry.TableName = getSObjectName(aTableSO); - aEntry.CurveName = getSObjectName(aSObject); - aEntry.CurveEntry = aSObject->GetID().c_str(); - aStudyCurves.append(aEntry); - } - } - } - //Show Curves which are not in Curve - QValueList::iterator it; - QValueList::iterator it2; - bool isExist = false; - for (it = aStudyCurves.begin(); it != aStudyCurves.end(); ++it) { - for (it2 = aContainerCurves.begin(); it2 != aContainerCurves.end(); ++it2) { - if (isExist = ((*it).CurveEntry == (*it2).CurveEntry)) - break; - } - if (!isExist) - new QListViewItem(myStudyLst, (*it).TableName, (*it).CurveName, (*it).CurveEntry); - } -} - -void VisuGUI_EditContainerDlg::storeToPrsObject (VISU::Container_i* theContainer) -{ - theContainer->Clear(); - - _PTR(Study) aStudy = VISU::GetCStudy(VISU::GetAppStudy(myVisuGUI)); - QListViewItem* anItem = myContainerLst->firstChild(); - while (anItem) { - _PTR(SObject) aCurveSO = aStudy->FindObjectID(anItem->text(2).latin1()); - if (aCurveSO) { - CORBA::Object_var aObject = VISU::ClientSObjectToObject(aCurveSO); - if (!CORBA::is_nil(aObject)) { - VISU::Curve_i* aCurve = dynamic_cast(VISU::GetServant(aObject).in()); - if (aCurve) theContainer->AddCurve(aCurve->_this()); - } - } - anItem = anItem->nextSibling(); - } -} - -QString VisuGUI_EditContainerDlg::getSObjectName (_PTR(SObject) theSObject) -{ - if (!theSObject) return QString(""); - - _PTR(GenericAttribute) anAttr; - if (theSObject->FindAttribute(anAttr, "AttributeName")) { - _PTR(AttributeName) aName (anAttr); - return QString(aName->Value().c_str()); - } - return QString(""); -} - -void VisuGUI_EditContainerDlg::onLeftClicked() -{ - QListViewItem* anItem = myContainerLst->firstChild(); - while (anItem) { - if (anItem->isSelected()) { - QListViewItem* anTmpItem = anItem; - anItem = anTmpItem->nextSibling(); - myContainerLst->takeItem(anTmpItem); - myStudyLst->insertItem(anTmpItem); - } else { - anItem = anItem->nextSibling(); - } - } -} - -void VisuGUI_EditContainerDlg::onRightClicked() -{ - QListViewItem* anItem = myStudyLst->firstChild(); - while (anItem) { - if (anItem->isSelected()) { - QListViewItem* anTmpItem = anItem; - anItem = anTmpItem->nextSibling(); - myStudyLst->takeItem(anTmpItem); - myContainerLst->insertItem(anTmpItem); - } else { - anItem = anItem->nextSibling(); - } - } -} - -void VisuGUI_EditContainerDlg::onLeftSelected() -{ - QListViewItem* anItem = myStudyLst->firstChild(); - bool isSelected = false; - while (anItem) { - if (anItem->isSelected()) { - isSelected = true; - break; - } - anItem = anItem->nextSibling(); - } - myRightBtn->setEnabled(isSelected); -} - -void VisuGUI_EditContainerDlg::onRightSelected() -{ - QListViewItem* anItem = myContainerLst->firstChild(); - bool isSelected = false; - while (anItem) { - if (anItem->isSelected()) { - isSelected = true; - break; - } - anItem = anItem->nextSibling(); - } - myLeftBtn->setEnabled(isSelected); -} diff --git a/src/VISUGUI/VisuGUI_EditContainerDlg.h b/src/VISUGUI/VisuGUI_EditContainerDlg.h deleted file mode 100644 index 8493d0ff..00000000 --- a/src/VISUGUI/VisuGUI_EditContainerDlg.h +++ /dev/null @@ -1,63 +0,0 @@ -// VISU VISUGUI : GUI of VISU component -// -// Copyright (C) 2003 CEA/DEN, EDF R&D -// -// -// -// File : VisuGUI_EditContainerDlg.h -// Author : VSV -// Module : VISU - -#ifndef VISUGUI_EDITCONTAINER_H -#define VISUGUI_EDITCONTAINER_H - -#include -#include -#include -#include - -#include "SALOMEDSClient_SObject.hxx" - -class VisuGUI; - -namespace VISU { - class Container_i; -} - - -struct CurveStruct { - QString TableName; - QString CurveName; - QString CurveEntry; -}; - - -class VisuGUI_EditContainerDlg: public QDialog -{ - Q_OBJECT; - - public: - VisuGUI_EditContainerDlg (VisuGUI* theModule, bool theIsModal = true); - ~VisuGUI_EditContainerDlg() {}; - - void initFromPrsObject (VISU::Container_i* theContainer); - void storeToPrsObject (VISU::Container_i* theContainer); - - private slots: - void onLeftClicked(); - void onRightClicked(); - void onLeftSelected(); - void onRightSelected(); - - private: - QString getSObjectName (_PTR(SObject) theSObject); - - QListView* myStudyLst; - QListView* myContainerLst; - QToolButton* myLeftBtn; - QToolButton* myRightBtn; - - VisuGUI* myVisuGUI; -}; - -#endif // VISUGUI_EDITCONTAINER_H diff --git a/src/VISUGUI/VisuGUI_FileDlg.cxx b/src/VISUGUI/VisuGUI_FileDlg.cxx deleted file mode 100644 index 1e788c46..00000000 --- a/src/VISUGUI/VisuGUI_FileDlg.cxx +++ /dev/null @@ -1,111 +0,0 @@ -// SALOME SALOMEGUI : GUI of VISU module -// -// Copyright (C) 2003 CEA/DEN, EDF R&D -// -// -// -// File : VisuGUI_FileDlg.cxx -// Author : -// Module : SALOME -// $Header: /dn05/salome/CVS/SALOME_ROOT/SALOME/src/VISUGUI/Visu_FileDlg.cxx - - -#include -#include -#include -#include -#include - -#include "VISUConfig.hh" -#include "VisuGUI_FileDlg.h" -#include "SUIT_ResourceMgr.h" - -using namespace std; - -bool VisuGUI_FileDlg::IsBuild = false; - -/*! -Constructor -*/ -VisuGUI_FileDlg::VisuGUI_FileDlg (QWidget* parent, - bool open, - bool showQuickDir, - bool modal) : - SUIT_FileDlg(parent, open, showQuickDir, modal) -{ - myCBuildAll = new QCheckBox (tr("FULL_LOAD"), this); - QLabel* label = new QLabel("", this); - label->setMaximumWidth(0); - QPushButton* pb = new QPushButton(this); - pb->setMaximumWidth(0); - addWidgets( label, myCBuildAll, pb ); - bool toBuildAll = VISU::GetResourceMgr()->booleanValue("VISU", "full_med_loading", false); - if (toBuildAll) myCBuildAll->setChecked(true); -} - -/*! - Destructor -*/ -VisuGUI_FileDlg::~VisuGUI_FileDlg() -{ -} - -/*! - Processes selection : tries to set given path or filename as selection -*/ -bool VisuGUI_FileDlg::processPath( const QString& path ) -{ - if ( !path.isNull() ) { - QFileInfo fi( path ); - if ( fi.exists() ) { - if ( fi.isFile() ) - setSelection( path ); - else if ( fi.isDir() ) - setDir( path ); - return true; - } - else { - if ( QFileInfo( fi.dirPath() ).exists() ) { - setDir( fi.dirPath() ); - return true; - } - } - } - return false; -} - -/*! - Returns the file name for Open/Save [ static ] -*/ -QString VisuGUI_FileDlg::getFileName( QWidget* parent, - const QString& initial, - const QStringList& filters, - const QString& caption, - bool open, - bool showQuickDir, - SUIT_FileValidator* validator ) -{ - VisuGUI_FileDlg* fd = new VisuGUI_FileDlg( parent, open, showQuickDir, true ); - if ( !caption.isEmpty() ) - fd->setCaption( caption ); - if ( !initial.isEmpty() ) { - fd->processPath( initial ); // VSR 24/03/03 check for existing of directory has been added to avoid QFileDialog's bug - } - fd->setFilters( filters ); - if ( validator ) - fd->setValidator( validator ); - fd->exec(); - QString filename = fd->selectedFile(); - - VisuGUI_FileDlg::IsBuild = fd->IsChecked(); - - delete fd; - qApp->processEvents(); - - return filename; -} - -bool VisuGUI_FileDlg::IsChecked() -{ - return myCBuildAll->isChecked(); -} diff --git a/src/VISUGUI/VisuGUI_FileDlg.h b/src/VISUGUI/VisuGUI_FileDlg.h deleted file mode 100644 index ec3b219f..00000000 --- a/src/VISUGUI/VisuGUI_FileDlg.h +++ /dev/null @@ -1,45 +0,0 @@ -// SALOME SALOMEGUI : GUI of VISU module -// -// Copyright (C) 2003 CEA/DEN, EDF R&D -// -// -// -// File : VisuGUI_FileDlg.h -// Author : -// Module : SALOME -// $Header: /dn05/salome/CVS/SALOME_ROOT/VISU/src/VISUGUI/VisuGUI_FileDlg.h - -#ifndef VISU_FILEDIALOG_H -#define VISU_FILEDIALOG_H - -#include "SUIT_FileDlg.h" - -class QCheckBox; - -class VisuGUI_FileDlg : public SUIT_FileDlg -{ - Q_OBJECT; - public: - VisuGUI_FileDlg( QWidget* parent, - bool open, - bool showQuickDir = true, - bool modal = true ); - ~VisuGUI_FileDlg(); - - public: - static bool IsBuild; - static QString getFileName( QWidget* parent, - const QString& initial, - const QStringList& filters, - const QString& caption, - bool open, - bool showQuickDir = true, - SUIT_FileValidator* validator = 0); - -private: - QCheckBox* myCBuildAll; - bool IsChecked(); - bool processPath( const QString& path ); -}; - -#endif diff --git a/src/VISUGUI/VisuGUI_NameDlg.cxx b/src/VISUGUI/VisuGUI_NameDlg.cxx deleted file mode 100644 index c847861f..00000000 --- a/src/VISUGUI/VisuGUI_NameDlg.cxx +++ /dev/null @@ -1,134 +0,0 @@ -// SALOME VisuGUI : implementation of desktop and GUI kernel -// -// Copyright (C) 2003 CEA/DEN, EDF R&D -// -// -// -// File : VisuGUI_NameDlg.cxx -// Author : Vadim SANDLER -// Module : SALOME -// $Header$ - -#include "VisuGUI_NameDlg.h" - -#include -#include -#include -#include - -#include -#include -#include -#include -#include -using namespace std; - -/*! - Constructor -*/ -VisuGUI_NameDlg::VisuGUI_NameDlg( QWidget* parent ) - : QDialog( parent ? parent : SUIT_Session::session()->activeApplication()->desktop(), - "VisuGUI_NameDlg", - true, - WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu ) -{ - setCaption( tr("TLT_RENAME") ); - setSizeGripEnabled( TRUE ); - - QVBoxLayout* topLayout = new QVBoxLayout( this ); - topLayout->setMargin( 11 ); topLayout->setSpacing( 6 ); - - /***************************************************************/ - QGroupBox* GroupC1 = new QGroupBox( this, "GroupC1" ); - GroupC1->setColumnLayout(0, Qt::Vertical ); - GroupC1->layout()->setMargin( 0 ); GroupC1->layout()->setSpacing( 0 ); - QHBoxLayout* GroupC1Layout = new QHBoxLayout( GroupC1->layout() ); - GroupC1Layout->setAlignment( Qt::AlignTop ); - GroupC1Layout->setMargin( 11 ); GroupC1Layout->setSpacing( 6 ); - - QLabel* TextLabel = new QLabel( GroupC1, "TextLabel1" ); - TextLabel->setText( tr( "NAME_LBL" ) ); - GroupC1Layout->addWidget( TextLabel ); - - myLineEdit = new QLineEdit( GroupC1, "LineEdit1" ); - myLineEdit->setMinimumSize( 250, 0 ); - GroupC1Layout->addWidget( myLineEdit ); - - /***************************************************************/ - QGroupBox* GroupButtons = new QGroupBox( this, "GroupButtons" ); - GroupButtons->setColumnLayout(0, Qt::Vertical ); - GroupButtons->layout()->setMargin( 0 ); GroupButtons->layout()->setSpacing( 0 ); - QHBoxLayout* GroupButtonsLayout = new QHBoxLayout( GroupButtons->layout() ); - GroupButtonsLayout->setAlignment( Qt::AlignTop ); - GroupButtonsLayout->setMargin( 11 ); GroupButtonsLayout->setSpacing( 6 ); - - myButtonOk = new QPushButton( GroupButtons, "buttonOk" ); - myButtonOk->setText( tr( "BUT_OK" ) ); - myButtonOk->setAutoDefault( TRUE ); myButtonOk->setDefault( TRUE ); - GroupButtonsLayout->addWidget( myButtonOk ); - - GroupButtonsLayout->addStretch(); - - myButtonCancel = new QPushButton( GroupButtons, "buttonCancel" ); - myButtonCancel->setText( tr( "BUT_CANCEL" ) ); - myButtonCancel->setAutoDefault( TRUE ); - GroupButtonsLayout->addWidget( myButtonCancel ); - /***************************************************************/ - - topLayout->addWidget( GroupC1 ); - topLayout->addWidget( GroupButtons ); - - // signals and slots connections - connect( myButtonOk, SIGNAL( clicked() ), this, SLOT( accept() ) ); - connect( myButtonCancel, SIGNAL( clicked() ), this, SLOT( reject() ) ); - - /* Move widget on the botton right corner of main widget */ - SUIT_Tools::centerWidget( this, parent ); -} - -/*! - Destructor -*/ -VisuGUI_NameDlg::~VisuGUI_NameDlg() -{ -} - -/*! - Sets name -*/ -void VisuGUI_NameDlg::setName( const QString& name ) -{ - myLineEdit->setText( name ); - myLineEdit->end(false); - myLineEdit->home(true); -} - -/*! - Returns name entered by user -*/ -QString VisuGUI_NameDlg::name() -{ - return myLineEdit->text(); -} - -void VisuGUI_NameDlg::accept() -{ - if ( name().stripWhiteSpace().isEmpty() ) - return; - QDialog::accept(); -} - -/*! - Creates modal dialog and returns name entered [ static ] -*/ -QString VisuGUI_NameDlg::getName( QWidget* parent, const QString& oldName ) -{ - QString n; - VisuGUI_NameDlg* dlg = new VisuGUI_NameDlg( parent ); - if ( !oldName.isNull() ) - dlg->setName( oldName ); - if ( dlg->exec() == QDialog::Accepted ) - n = dlg->name(); - delete dlg; - return n; -} diff --git a/src/VISUGUI/VisuGUI_NameDlg.h b/src/VISUGUI/VisuGUI_NameDlg.h deleted file mode 100644 index 56a9819b..00000000 --- a/src/VISUGUI/VisuGUI_NameDlg.h +++ /dev/null @@ -1,46 +0,0 @@ -// SALOME VisuGUI : implementation of desktop and GUI kernel -// -// Copyright (C) 2003 CEA/DEN, EDF R&D -// -// -// -// File : VisuGUI_NameDlg.h -// Author : Vadim SANDLER -// Module : SALOME -// $Header$ - -#ifndef VisuGUI_NAMEDLG_H -#define VisuGUI_NAMEDLG_H - -#include - -class QLineEdit; -class QPushButton; - -//================================================================================= -// class : VisuGUI_NameDlg -// purpose : Common dialog box class -//================================================================================= -class VisuGUI_NameDlg : public QDialog -{ - Q_OBJECT - -public: - VisuGUI_NameDlg( QWidget* parent = 0 ); - ~VisuGUI_NameDlg(); - - void setName( const QString& name ); - QString name(); - - static QString getName( QWidget* parent = 0, const QString& oldName = QString::null ); - -protected slots: - void accept(); - -private: - QPushButton* myButtonOk; - QPushButton* myButtonCancel; - QLineEdit* myLineEdit; -}; - -#endif // VisuGUI_NAMEDLG_H diff --git a/src/VISUGUI/VisuGUI_OffsetDlg.cxx b/src/VISUGUI/VisuGUI_OffsetDlg.cxx deleted file mode 100644 index bb078813..00000000 --- a/src/VISUGUI/VisuGUI_OffsetDlg.cxx +++ /dev/null @@ -1,210 +0,0 @@ - -#include "VisuGUI_OffsetDlg.h" - -#include "VisuGUI.h" -#include "VisuGUI_Tools.h" - -#include "VISU_ViewManager_i.hh" -#include "VISU_Actor.h" - -#include "SalomeApp_Application.h" -#include "SVTK_ViewWindow.h" -#include "SVTK_ViewModel.h" -#include "SUIT_Desktop.h" - -#include "QtxDblSpinBox.h" - -// VTK Includes -#include "vtkRenderer.h" - -// QT Includes -#include -#include -#include -#include -#include -#include - - -#define MAXVAL 1e10 - - -VisuGUI_OffsetDlg::VisuGUI_OffsetDlg (VisuGUI* theModule) -: QDialog(VISU::GetDesktop(theModule), 0, false, WStyle_Customize | - WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu | WDestructiveClose), -myModule(theModule) -{ - myPrsList.setAutoDelete(false); - - setName("VisuGUI_OffsetDlg"); - setCaption(tr("TIT_OFFSETDLG")); - setSizeGripEnabled(TRUE); - - QVBoxLayout* TopLayout = new QVBoxLayout (this); - TopLayout->setSpacing(6); - TopLayout->setMargin(11); - - QHBox* aOffsetsPane = new QHBox (this); - aOffsetsPane->setSpacing(6); - - new QLabel ("dX:", aOffsetsPane); - myDxEdt = new QtxDblSpinBox (aOffsetsPane, "myDxEdt"); - myDxEdt->setRange(-MAXVAL, MAXVAL); - - new QLabel("dY:", aOffsetsPane); - myDyEdt = new QtxDblSpinBox (aOffsetsPane, "myDyEdt"); - myDyEdt->setRange(-MAXVAL, MAXVAL); - - new QLabel("dZ:", aOffsetsPane); - myDzEdt = new QtxDblSpinBox (aOffsetsPane, "myDzEdt"); - myDzEdt->setRange(-MAXVAL, MAXVAL); - - QPushButton* aResetBtn = new QPushButton(tr("BTN_RESET"), aOffsetsPane); - connect(aResetBtn, SIGNAL(clicked()), this, SLOT(onReset())); - - TopLayout->addWidget(aOffsetsPane); - - if (!VISU::GetCStudy(VISU::GetAppStudy(theModule))->GetProperties()->IsLocked()) { - mySaveChk = new QCheckBox ("Save to presentation", this); - TopLayout->addWidget(mySaveChk); - mySaveChk->setChecked(true); - } else { - mySaveChk = 0; - } - - // Common buttons =========================================================== - QGroupBox* GroupButtons = new QGroupBox(this, "GroupButtons"); - GroupButtons->setColumnLayout(0, Qt::Vertical); - GroupButtons->layout()->setSpacing(0); - GroupButtons->layout()->setMargin(0); - QGridLayout* GroupButtonsLayout = new QGridLayout(GroupButtons->layout()); - GroupButtonsLayout->setAlignment(Qt::AlignTop); - GroupButtonsLayout->setSpacing(6); - GroupButtonsLayout->setMargin(11); - - QPushButton* buttonOk = new QPushButton(tr("&OK"), GroupButtons, "buttonOk"); - buttonOk->setAutoDefault(TRUE); - buttonOk->setDefault(TRUE); - GroupButtonsLayout->addWidget(buttonOk, 0, 0); - GroupButtonsLayout->addItem(new QSpacerItem(5, 5, QSizePolicy::Expanding, QSizePolicy::Minimum), 0, 1); - - QPushButton* buttonApply = new QPushButton(tr("&Apply"), GroupButtons, "buttonApply"); - buttonOk->setAutoDefault(TRUE); - GroupButtonsLayout->addWidget(buttonApply, 0, 2); - GroupButtonsLayout->addItem(new QSpacerItem(5, 5, QSizePolicy::Expanding, QSizePolicy::Minimum), 0, 3); - - QPushButton* buttonCancel = new QPushButton(tr("&Cancel") , GroupButtons, "buttonCancel"); - buttonCancel->setAutoDefault(TRUE); - GroupButtonsLayout->addWidget(buttonCancel, 0, 4); - - TopLayout->addWidget(GroupButtons); - - connect(buttonOk, SIGNAL(clicked()), this, SLOT(accept())); - connect(buttonApply, SIGNAL(clicked()), this, SLOT(onApply())); - connect(buttonCancel, SIGNAL(clicked()), this, SLOT(reject())); -} - -void VisuGUI_OffsetDlg::addPresentation (VISU::Prs3d_i* thePrs) -{ - myPrsList.append(thePrs); - OffsetStruct aOffs; - thePrs->GetOffset(aOffs.myOffset); - myOldOffsets.append(aOffs); - if (myPrsList.count() == 1) { - setOffset(aOffs.myOffset); - } else if (myPrsList.count() == 2) { - float aOffset[3]; - aOffset[0] = aOffset[1] = aOffset[2] = 0; - setOffset(aOffset); - } -} - -void VisuGUI_OffsetDlg::setOffset (const float* theOffset) -{ - myDxEdt->setValue(theOffset[0]); - myDyEdt->setValue(theOffset[1]); - myDzEdt->setValue(theOffset[2]); -} - -void VisuGUI_OffsetDlg::getOffset (float* theOffset) const -{ - theOffset[0] = myDxEdt->value(); - theOffset[1] = myDyEdt->value(); - theOffset[2] = myDzEdt->value(); -} - -void VisuGUI_OffsetDlg::onReset() -{ - myDxEdt->setValue(0); - myDyEdt->setValue(0); - myDzEdt->setValue(0); -} - -bool VisuGUI_OffsetDlg::isToSave() const -{ - if (mySaveChk) - return mySaveChk->isChecked(); - else - return false; -} - -void VisuGUI_OffsetDlg::updateOffset (VISU::Prs3d_i* thePrs, float* theOffset) -{ - if (myPrsList.count() == 0) return; - - if (isToSave()) thePrs->SetOffset(theOffset); - - ViewManagerList aViewManagerList; - SalomeApp_Application* anApp = myModule->getApp(); - anApp->viewManagers(SVTK_Viewer::Type(), aViewManagerList); - QPtrListIterator anVMIter (aViewManagerList); - for (; anVMIter.current(); ++anVMIter) { - SUIT_ViewManager* aViewManager = anVMIter.current(); - QPtrVector aViews = aViewManager->getViews(); - for (int i = 0, iEnd = aViews.size(); i < iEnd; i++) { - if (SUIT_ViewWindow* aViewWindow = aViews.at(i)) { - if (SVTK_ViewWindow* vw = dynamic_cast(aViewWindow)) { - vw->onAdjustTrihedron(); - - if (VISU_Actor* anActor = VISU::GetActor(thePrs, vw)) { - anActor->SetPosition(theOffset); - vw->getRenderer()->ResetCameraClippingRange(); - vw->Repaint(); - - Handle(SALOME_InteractiveObject) anIO; - CORBA::Object_var anObject = VISU::GetSelectedObj(myModule, &anIO); - if (!CORBA::is_nil(anObject)) - vw->highlight(anIO, 1); - } - } - } - } - } -} - -void VisuGUI_OffsetDlg::accept() -{ - float aOffset[3]; - getOffset(aOffset); - for (int i = 0; i < myPrsList.count(); i++) { - updateOffset(myPrsList.at(i), aOffset); - } - QDialog::accept(); -} - -void VisuGUI_OffsetDlg::reject() -{ - for (int i = 0; i < myPrsList.count(); i++) { - updateOffset(myPrsList.at(i), myOldOffsets[i].myOffset); - } - QDialog::reject(); -} - -void VisuGUI_OffsetDlg::onApply() -{ - float aOffset[3]; - getOffset(aOffset); - for (int i = 0; i < myPrsList.count(); i++) { - updateOffset(myPrsList.at(i), aOffset); - } -} diff --git a/src/VISUGUI/VisuGUI_Plot3DDlg.cxx b/src/VISUGUI/VisuGUI_Plot3DDlg.cxx deleted file mode 100644 index 78cbcec2..00000000 --- a/src/VISUGUI/VisuGUI_Plot3DDlg.cxx +++ /dev/null @@ -1,566 +0,0 @@ -// VISU VISUGUI : GUI of VISU component -// -// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org -// -// -// -// File : VisuGUI_Plot3DDlg.cxx -// Author : Laurent CORNABE & Hubert ROLLAND -// Module : VISU -// $Header$ - -#include "VisuGUI_Plot3DDlg.h" - -#include "VisuGUI.h" -#include "VisuGUI_Tools.h" - -#include "VISU_ViewManager_i.hh" -#include "VISU_Plot3DPL.hxx" - -#include "SALOME_Actor.h" -#include "SVTK_ViewWindow.h" -#include "SUIT_Desktop.h" - -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -using namespace std; - -#define SURFACE_PRS_ID 0 -#define CONTOUR_PRS_ID 1 - -//======================================================================= -//function : renderViewFrame -//purpose : -//======================================================================= -static void renderViewFrame (SVTK_ViewWindow* vw) -{ - if (vw) { - vw->getRenderer()->ResetCameraClippingRange(); - vw->Repaint(); - } -} - -//======================================================================= -//class : TPlane -//purpose : actor of plane preview -//======================================================================= -class TPlane : public SALOME_Actor -{ - float mySize; - vtkDataSetMapper* myMapper; - vtkPlaneSource* myPlaneSource; - - public: - // constructor - TPlane(float planeSize): mySize(planeSize) - { - Init(); - } - // set plane parameters - void Set(float origin[3], float normal[3]) - { - float point2[3], point1[3]; - vtkMath::Perpendiculars(normal, point1, point2, 0.); - for (int i = 0; i < 3; ++i) { - point1[ i ] = point1[ i ] * mySize + origin[ i ]; - point2[ i ] = point2[ i ] * mySize + origin[ i ]; - } - myPlaneSource->SetOrigin(origin); - myPlaneSource->SetPoint1(point1); - myPlaneSource->SetPoint2(point2); - myPlaneSource->SetCenter(origin); - } - vtkTypeMacro(TPlane,SALOME_Actor); - - protected: - void Init() { - myPlaneSource = vtkPlaneSource::New(); - myMapper = vtkDataSetMapper::New(); - myMapper->SetInput(myPlaneSource->GetOutput()); - // actor methods - VisibilityOff(); - PickableOff(); - SetInfinitive(true); - SetOpacity(0.85); - SetMapper(myMapper); - } - ~TPlane() { - myMapper->RemoveAllInputs(); - myMapper->Delete(); - myPlaneSource->UnRegisterAllOutputs(); - myPlaneSource->Delete(); - }; - // Not implemented. - TPlane(const TPlane&); - void operator=(const TPlane&); -}; - -//======================================================================= -//function : VisuGUI_Plot3DPane -//purpose : -//======================================================================= -VisuGUI_Plot3DPane::VisuGUI_Plot3DPane (QWidget* parent) - : QVBox(parent), myInitFromPrs(false), myPreviewActor(NULL), - myViewWindow(VISU::GetViewWindow()), myPrs(NULL), myPipeCopy(NULL) -{ - layout()->setAlignment(Qt::AlignTop); - setSpacing(6); - - // Orientation - - GBOrientation = new QButtonGroup (tr("Orientation"), this, "GBOrientation"); - GBOrientation->setTitle(tr("ORIENTATION")); - GBOrientation->setColumnLayout(0, Qt::Vertical); - GBOrientation->layout()->setSpacing(0); - GBOrientation->layout()->setMargin(0); - QGridLayout* BGOrientationLayout = new QGridLayout (GBOrientation->layout()); - BGOrientationLayout->setAlignment(Qt::AlignTop); - BGOrientationLayout->setSpacing(6); - BGOrientationLayout->setMargin(11); - - QRadioButton *RBxy, *RByz, *RBzx; - RBxy = new QRadioButton (tr("// X-Y"), GBOrientation, "RBxy"); - RByz = new QRadioButton (tr("// Y-Z"), GBOrientation, "RByz"); - RBzx = new QRadioButton (tr("// Z-X"), GBOrientation, "RBzx"); - BGOrientationLayout->addWidget(RBxy, 0, 0); - BGOrientationLayout->addWidget(RByz, 0, 1); - BGOrientationLayout->addWidget(RBzx, 0, 2); - - // Rotation - - QGroupBox* GBrot = new QGroupBox (tr("ROTATIONS"), this, "GBrot"); - GBrot->setColumnLayout(0, Qt::Vertical); - GBrot->layout()->setSpacing(0); - GBrot->layout()->setMargin(0); - QGridLayout* GBrotLayout = new QGridLayout (GBrot->layout()); - GBrotLayout->setAlignment(Qt::AlignTop); - GBrotLayout->setSpacing(6); - GBrotLayout->setMargin(11); - // label 1 - LabelRot1 = new QLabel (tr("ROTATION_X"), GBrot, "LabelRot1"); - GBrotLayout->addWidget(LabelRot1, 0, 0); - // spin 1 - Rot1 = new QtxDblSpinBox (-180, 180, 5, GBrot); - Rot1->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed)); - GBrotLayout->addWidget(Rot1, 0, 1); - // label 2 - LabelRot2 = new QLabel (tr("ROTATION_Y"), GBrot, "LabelRot2"); - GBrotLayout->addWidget(LabelRot2, 1, 0); - // spin 2 - Rot2 = new QtxDblSpinBox (-180, 180, 5, GBrot); - Rot2->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed)); - GBrotLayout->addWidget(Rot2, 1, 1); - - // Position - - QGroupBox* GBpos = new QGroupBox (tr("POSITION"), this, "GBpos"); - GBpos->setColumnLayout(0, Qt::Horizontal); - GBpos->layout()->setSpacing(0); - GBpos->layout()->setMargin(0); - QGridLayout* GBposLayout = new QGridLayout (GBpos->layout()); - GBposLayout->setAlignment(Qt::AlignTop); - GBposLayout->setSpacing(6); - GBposLayout->setMargin(11); - // value label - QLabel * valueLabel = new QLabel (tr("POSITION_VALUE"), GBpos, "LabelRot1"); - GBposLayout->addWidget(valueLabel, 0, 0); - // value spin - PositionSpn = new QtxDblSpinBox (0, 1, 0.1, GBpos); - GBposLayout->addWidget(PositionSpn, 0, 1); - // Relative CheckBox - RelativeChkB = new QCheckBox (tr("RELATIVE"), GBpos, "RelativeChkB"); - RelativeChkB->setChecked(true); - GBposLayout->addWidget(RelativeChkB, 0, 2); - - // Scale, Presentation type, Nb Contours, Preview - - QFrame* bottomFrame = new QFrame (this); - QGridLayout* bottomLayout = new QGridLayout (bottomFrame); - bottomLayout->setAlignment(Qt::AlignTop); - bottomLayout->setSpacing(11); - bottomLayout->setMargin(0); - // scale - QLabel* scaleLabel = new QLabel (tr("SCALE"), bottomFrame); - ScaleSpn = new QtxDblSpinBox (-1.e6, 1.e6, 0.1, bottomFrame); - // Presentation type - GBPrsType = new QHButtonGroup (tr("PRESENTATION_TYPE"), bottomFrame); - new QRadioButton (tr("SURFACE"), GBPrsType); - new QRadioButton (tr("CONTOUR"), GBPrsType); - // nb Contours - QLabel* nbContLabel = new QLabel (tr("NUMBER_CONTOURS"), bottomFrame); - NbContoursSpn = new QSpinBox (1, 999, 1, bottomFrame, "NbContoursSpn"); - // Preview - PreviewChkB = new QCheckBox (tr("PREVIEW"), bottomFrame); - PreviewChkB->setChecked(false); - - bottomLayout->addWidget(scaleLabel, 0, 0); - bottomLayout->addWidget(ScaleSpn, 0, 1); - bottomLayout->addMultiCellWidget(GBPrsType, 1, 1, 0, 1); - bottomLayout->addWidget(nbContLabel, 2, 0); - bottomLayout->addWidget(NbContoursSpn, 2, 1); - bottomLayout->addWidget(PreviewChkB, 3, 0); - - // signals and slots connections - connect(GBOrientation, SIGNAL(clicked(int)), this, SLOT(orientationChanged(int))); - connect(Rot1, SIGNAL(valueChanged(double)), this, SLOT(updatePreview())); - connect(Rot2, SIGNAL(valueChanged(double)), this, SLOT(updatePreview())); - connect(PositionSpn, SIGNAL(valueChanged(double)), this, SLOT(onPositionSpn())); - connect(RelativeChkB, SIGNAL(toggled(bool)), this, SLOT(onRelativePos(bool))); - connect(GBPrsType, SIGNAL(clicked(int)), this, SLOT(onPrsType(int))); - connect(PreviewChkB, SIGNAL(toggled(bool)), this, SLOT(updatePreview())); -} - -//======================================================================= -//function : destructor -//purpose : -//======================================================================= -VisuGUI_Plot3DPane::~VisuGUI_Plot3DPane() -{ -} - -//======================================================================= -//function : storePrsParams -//purpose : create a copy of Prs parameters and then store current -// control values into the Prs -//======================================================================= -void VisuGUI_Plot3DPane::storePrsParams() -{ - if (!myPipeCopy) - myPipeCopy = VISU_Plot3DPL::New(); - if (myPrs) { - myPipeCopy->ShallowCopy(myPrs->GetPL()); - storeToPrsObject(myPrs); - } -} - -//======================================================================= -//function : restorePrsParams -//purpose : restore Prs parameters from the copy -//======================================================================= -void VisuGUI_Plot3DPane::restorePrsParams() -{ - if (!myPipeCopy) - myPipeCopy = VISU_Plot3DPL::New(); - if (myPrs) - myPrs->GetPL()->ShallowCopy(myPipeCopy); -} - -//======================================================================= -//function : onPositionSpn -//purpose : update absolute position range -//======================================================================= -void VisuGUI_Plot3DPane::onPositionSpn() -{ - if (myPrs && !RelativeChkB->isChecked()) { - float minPos, maxPos; - storePrsParams(); - myPrs->GetPlot3DPL()->GetMinMaxPosition(minPos, maxPos); - restorePrsParams(); - if (minPos > PositionSpn->value()) - minPos = PositionSpn->value(); - if (maxPos < PositionSpn->value()) - maxPos = PositionSpn->value(); - PositionSpn->setRange(minPos, maxPos); - } - updatePreview(); -} - -//======================================================================= -//function : orientationChanged -//purpose : update rotation labels and preview -//======================================================================= -void VisuGUI_Plot3DPane::orientationChanged(int Id) -{ - if (Id == 0) { // RBxy->isChecked() - LabelRot1->setText(tr("ROTATION_X")); - LabelRot2->setText(tr("ROTATION_Y")); - } else if (Id == 1) { // RByz->isChecked() - LabelRot1->setText(tr("ROTATION_Y")); - LabelRot2->setText(tr("ROTATION_Z")); - } else { - LabelRot1->setText(tr("ROTATION_Z")); - LabelRot2->setText(tr("ROTATION_X")); - } - updatePreview(); -} - -//======================================================================= -//function : onRelativePos -//purpose : update position value and range -//======================================================================= -void VisuGUI_Plot3DPane::onRelativePos(bool isRelativePos) -{ - float minPos = 0., maxPos = 1., pos = PositionSpn->value(); - if (myPrs) { - storePrsParams(); - myPrs->GetPlot3DPL()->GetMinMaxPosition(minPos, maxPos); - restorePrsParams(); - if (-1e-7 < (maxPos - minPos) && (maxPos - minPos) < 1e-7) { - pos = 0; - } else { - if (isRelativePos) // absolute -> relative - pos = (pos - minPos) / (maxPos - minPos); - else // relative -> absolute - pos = minPos * (1. - pos) + maxPos * pos; - } - } - if (isRelativePos) { - minPos = 0.; - maxPos = 1.; - } - PositionSpn->setMinValue(minPos); - PositionSpn->setMaxValue(maxPos); - PositionSpn->setLineStep((maxPos - minPos) / 10.); - PositionSpn->setValue(pos); -} - -//======================================================================= -//function : onPrsType -//purpose : -//======================================================================= -void VisuGUI_Plot3DPane::onPrsType(int id) -{ - NbContoursSpn->setEnabled(id == CONTOUR_PRS_ID); -} - -//======================================================================= -//function : updatePreview -//purpose : -//======================================================================= -void VisuGUI_Plot3DPane::updatePreview() -{ - if (myInitFromPrs || !myPrs || !myViewWindow) - return; - bool fitall = false; - if (PreviewChkB->isChecked()) // place preview plane - { - // get plane preview actor - TPlane* planePreview = (TPlane*) myPreviewActor; - if (!planePreview) { - myPreviewActor = planePreview = new TPlane(myPrs->GetInput()->GetLength()); - myViewWindow->AddActor(planePreview); - fitall = !VISU::GetActor(myPrs, myViewWindow); - } - // set plane parameters corresponding to control values - storePrsParams(); - float normal[3], origin[3]; - myPrs->GetPlot3DPL()->GetBasePlane(origin, normal, true); - planePreview->Set(origin, normal); - restorePrsParams(); - } - if (myPreviewActor) - myPreviewActor->SetVisibility(PreviewChkB->isChecked()); - - renderViewFrame(myViewWindow); - - if (fitall) { - myPreviewActor->SetInfinitive(false); - myViewWindow->onFitAll(); - myPreviewActor->SetInfinitive(true); - } -} - -//======================================================================= -//function : initFromPrsObject -//purpose : -//======================================================================= -void VisuGUI_Plot3DPane::initFromPrsObject(VISU::Plot3D_i* thePrs) -{ - myInitFromPrs = true; - myPrs = thePrs; - - // orientation - int id; - switch (thePrs->GetOrientationType()) { - case VISU::Plot3D::XY: id = 0; break; - case VISU::Plot3D::YZ: id = 1; break; - default: id = 2; - } - GBOrientation->setButton(id); - orientationChanged(id); - - // rotation - Rot1->setValue(thePrs->GetRotateX() * 180./PI); - Rot2->setValue(thePrs->GetRotateY() * 180./PI); - - // position - RelativeChkB->setChecked(thePrs->IsPositionRelative()); - onRelativePos(thePrs->IsPositionRelative()); // update range - PositionSpn->setValue(thePrs->GetPlanePosition()); - - // scale - ScaleSpn->setValue(thePrs->GetScaleFactor()); - - // prs type - id = thePrs->GetIsContourPrs() ? CONTOUR_PRS_ID : SURFACE_PRS_ID; - GBPrsType->setButton(id); - onPrsType(id); - - // nb contours - NbContoursSpn->setValue(thePrs->GetNbOfContours()); - - // disable cutting plane controls if the mesh is planar - - if (thePrs->GetPL()->IsPlanarInput()) - { - GBOrientation->setEnabled(false); - Rot1 ->setEnabled(false); - Rot2 ->setEnabled(false); - PositionSpn ->setEnabled(false); - RelativeChkB ->setEnabled(false); - PreviewChkB ->setEnabled(false); - } - - myInitFromPrs = false; - updatePreview(); -} - -//======================================================================= -//function : storeToPrsObject -//purpose : -//======================================================================= -int VisuGUI_Plot3DPane::storeToPrsObject(VISU::Plot3D_i* thePrs) -{ - if (myInitFromPrs) - return 0; - // orientation - int id = GBOrientation->id (GBOrientation->selected()); - VISU::Plot3D::Orientation ori; - switch (id) { - case 0 : ori = VISU::Plot3D::XY; break; - case 1 : ori = VISU::Plot3D::YZ; break; - default: ori = VISU::Plot3D::ZX; - } - // rotation - thePrs->SetOrientation(ori, Rot1->value()*PI/180., Rot2->value()*PI/180.); - - // position - thePrs->SetPlanePosition(PositionSpn->value(), RelativeChkB->isChecked()); - - // scale - thePrs->SetScaleFactor(ScaleSpn->value()); - - // prs type - id = GBPrsType->id (GBPrsType->selected()); - thePrs->SetContourPrs(id == CONTOUR_PRS_ID); - - // nb contours - thePrs->SetNbOfContours(NbContoursSpn->value()); - - return 1; -} - -//======================================================================= -//function : check -//purpose : -//======================================================================= -bool VisuGUI_Plot3DPane::check() -{ - if (myPreviewActor && myViewWindow) // erase preview - { - myPreviewActor->SetVisibility(false); - myViewWindow->RemoveActor(myPreviewActor); - myPreviewActor->Delete(); - myPreviewActor = 0; - } - - return true; -} - -//======================================================================= -//function : Constructor -//purpose : -//======================================================================= -VisuGUI_Plot3DDlg::VisuGUI_Plot3DDlg (SalomeApp_Module* theModule) - : QDialog(VISU::GetDesktop(theModule), "VisuGUI_Plot3DDlg", false, WStyle_Customize | - WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu) -{ - setCaption(tr("TITLE")); - setSizeGripEnabled(TRUE); - - QVBoxLayout* TopLayout = new QVBoxLayout(this); - TopLayout->setSpacing(6); - TopLayout->setMargin(11); - - QTabWidget* aTabBox = new QTabWidget (this); - myIsoPane = new VisuGUI_Plot3DPane (this); - myIsoPane->setMargin(5); - aTabBox->addTab(myIsoPane, tr("PLOT3D_TAB_TITLE")); - myScalarPane = new VisuGUI_ScalarBarPane (this, false); - myScalarPane->setMargin(5); - aTabBox->addTab(myScalarPane, tr("SCALAR_BAR_TAB_TITLE")); - - TopLayout->addWidget(aTabBox); - - QGroupBox* GroupButtons = new QGroupBox (this, "GroupButtons"); - GroupButtons->setGeometry(QRect(10, 10, 281, 48)); - GroupButtons->setColumnLayout(0, Qt::Vertical); - GroupButtons->layout()->setSpacing(0); - GroupButtons->layout()->setMargin(0); - QGridLayout* GroupButtonsLayout = new QGridLayout (GroupButtons->layout()); - GroupButtonsLayout->setAlignment(Qt::AlignTop); - GroupButtonsLayout->setSpacing(6); - GroupButtonsLayout->setMargin(11); - - QPushButton* buttonOk = new QPushButton (tr("&OK"), GroupButtons, "buttonOk"); - buttonOk->setAutoDefault(TRUE); - buttonOk->setDefault(TRUE); - GroupButtonsLayout->addWidget(buttonOk, 0, 0); - GroupButtonsLayout->addItem(new QSpacerItem (5, 5, QSizePolicy::Expanding, QSizePolicy::Minimum), 0, 1); - QPushButton* buttonCancel = new QPushButton (tr("&Cancel") , GroupButtons, "buttonCancel"); - buttonCancel->setAutoDefault(TRUE); - GroupButtonsLayout->addWidget(buttonCancel, 0, 2); - - TopLayout->addWidget(GroupButtons); - - // signals and slots connections - connect(buttonOk, SIGNAL(clicked()), this, SLOT(accept())); - connect(buttonCancel, SIGNAL(clicked()), this, SLOT(reject())); -} - -//======================================================================= -//function : accept -//purpose : -//======================================================================= -void VisuGUI_Plot3DDlg::accept() -{ - if (myIsoPane->check() && myScalarPane->check()) - QDialog::accept(); -} - -//======================================================================= -//function : reject -//purpose : -//======================================================================= -void VisuGUI_Plot3DDlg::reject() -{ - myIsoPane->check(); // hide preview - - QDialog::reject(); -} diff --git a/src/VISUGUI/VisuGUI_Plot3DDlg.h b/src/VISUGUI/VisuGUI_Plot3DDlg.h deleted file mode 100644 index a1e59f90..00000000 --- a/src/VISUGUI/VisuGUI_Plot3DDlg.h +++ /dev/null @@ -1,119 +0,0 @@ -// VISU VISUGUI : GUI of VISU component -// -// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org -// -// -// -// File : VisuGUI_Plot3DDlg.h -// Author : Laurent CORNABE & Hubert ROLLAND -// Module : VISU -// $Header$ - -#ifndef VISUGUI_PLOT3D_H -#define VISUGUI_PLOT3D_H - -#include "VisuGUI_ScalarBarDlg.h" - -#include "VISU_Plot3D_i.hh" - -#include - -class SalomeApp_Module; - -namespace VISU { - class Plot3D_i; -}; - -class VISU_Plot3DPL; -class SVTK_ViewWindow; -class SALOME_Actor; -class QtxDblSpinBox; - -class VisuGUI_Plot3DPane : public QVBox -{ - Q_OBJECT - - public: - VisuGUI_Plot3DPane(QWidget* parent); - ~VisuGUI_Plot3DPane(); - - void initFromPrsObject (VISU::Plot3D_i* thePrs); - int storeToPrsObject (VISU::Plot3D_i* thePrs); - - bool check(); - - VISU::Plot3D_i* GetPrs() { return myPrs; } - - private: - bool myInitFromPrs; - SALOME_Actor* myPreviewActor; - SVTK_ViewWindow* myViewWindow; - VISU::Plot3D_i* myPrs; - VISU_Plot3DPL* myPipeCopy; - - void storePrsParams(); - void restorePrsParams(); - - QButtonGroup * GBOrientation; - QLabel * LabelRot1; - QLabel * LabelRot2; - QtxDblSpinBox * Rot1; - QtxDblSpinBox * Rot2; - QtxDblSpinBox * PositionSpn; - QCheckBox * RelativeChkB; - QtxDblSpinBox * ScaleSpn; - QHButtonGroup * GBPrsType; - QSpinBox * NbContoursSpn; - QCheckBox * PreviewChkB; - - private slots: - - void orientationChanged( int ); - void onRelativePos( bool ); - void onPrsType( int ); - void onPositionSpn(); - void updatePreview(); -}; - - -class VisuGUI_Plot3DDlg : public QDialog -{ - Q_OBJECT - - public: - VisuGUI_Plot3DDlg (SalomeApp_Module* theModule); - ~VisuGUI_Plot3DDlg() {}; - - void initFromPrsObject (VISU::Plot3D_i* thePrs) - { myScalarPane->initFromPrsObject(thePrs); myIsoPane->initFromPrsObject(thePrs); } - - int storeToPrsObject (VISU::Plot3D_i* thePrs) - { return myScalarPane->storeToPrsObject(thePrs) && myIsoPane->storeToPrsObject(thePrs); } - - protected slots: - void accept(); - void reject(); - - private: - VisuGUI_Plot3DPane* myIsoPane; - VisuGUI_ScalarBarPane* myScalarPane; -}; - -#endif // VISUGUI_PLOT3D_H diff --git a/src/VISUGUI/VisuGUI_SweepPrefDlg.cxx b/src/VISUGUI/VisuGUI_SweepPrefDlg.cxx deleted file mode 100644 index 48ec2dcf..00000000 --- a/src/VISUGUI/VisuGUI_SweepPrefDlg.cxx +++ /dev/null @@ -1,161 +0,0 @@ -// VISU VISUGUI : GUI of VISU component -// -// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org -// -// -// -// File : VisuGUI_SweepPrefDlg.cxx -// Author : Laurent CORNABE & Hubert ROLLAND -// Module : VISU -// $Header$ - -using namespace std; -#include "VisuGUI_SweepPrefDlg.h" -#include - -/*! - Constructor -*/ -VisuGUI_SweepPrefDlg::VisuGUI_SweepPrefDlg( QWidget* parent, const char* name, bool modal, WFlags fl ) - : QDialog( parent, name, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu ) -{ - if (!name) - setName("VisuGUI_SweepPrefDlg"); - setCaption(tr("DLG_TITLE")); - setSizeGripEnabled(TRUE); - - QVBoxLayout* TopLayout = new QVBoxLayout( this ); - TopLayout->setSpacing( 6 ); - TopLayout->setMargin( 11 ); - - TopGroup = new QGroupBox( this, "TopGroup" ); - TopGroup->setColumnLayout(0, Qt::Vertical ); - TopGroup->layout()->setSpacing( 0 ); - TopGroup->layout()->setMargin( 0 ); - QGridLayout* TopGroupLayout = new QGridLayout( TopGroup->layout() ); - TopGroupLayout->setAlignment( Qt::AlignTop ); - TopGroupLayout->setSpacing( 6 ); - TopGroupLayout->setMargin( 11 ); - - TimeLabel = new QLabel (tr("LBL_TIME_STEP"), TopGroup, "TimeLabel"); - TimeSpin = new QtxDblSpinBox( 0.1, 1000.0, 0.1, TopGroup ); - TimeSpin->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) ); - TimeSpin->setMinimumSize( 70, 0 ); - TimeSpin->setValue( 0.2 ); - - CyclesLabel = new QLabel (tr("LBL_NB_CYCLES"), TopGroup, "CyclesLabel"); - CyclesSpin = new QSpinBox( 1, 100, 1, TopGroup, "CyclesSpin" ); - CyclesSpin->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) ); - CyclesSpin->setMinimumSize( 70, 0 ); - CyclesSpin->setValue( 1 ); - - StepsLabel = new QLabel (tr("LBL_NB_STEPS"), TopGroup, "StepsLabel"); - StepsSpin = new QSpinBox( 1, 200, 1, TopGroup, "StepsSpin" ); - StepsSpin->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) ); - StepsSpin->setMinimumSize( 70, 0 ); - StepsSpin->setValue( 20 ); - - TopGroupLayout->addWidget( TimeLabel, 0, 0 ); - TopGroupLayout->addWidget( TimeSpin, 0, 1 ); - TopGroupLayout->addWidget( CyclesLabel, 1, 0 ); - TopGroupLayout->addWidget( CyclesSpin, 1, 1 ); - TopGroupLayout->addWidget( StepsLabel, 2, 0 ); - TopGroupLayout->addWidget( StepsSpin, 2, 1 ); - - GroupButtons = new QGroupBox( this, "GroupButtons" ); - GroupButtons->setColumnLayout(0, Qt::Vertical ); - GroupButtons->layout()->setSpacing( 0 ); - GroupButtons->layout()->setMargin( 0 ); - QGridLayout* GroupButtonsLayout = new QGridLayout( GroupButtons->layout() ); - GroupButtonsLayout->setAlignment( Qt::AlignTop ); - GroupButtonsLayout->setSpacing( 6 ); - GroupButtonsLayout->setMargin( 11 ); - - buttonOk = new QPushButton( tr( "&OK" ), GroupButtons, "buttonOk" ); - buttonOk->setAutoDefault( TRUE ); - buttonOk->setDefault( TRUE ); - GroupButtonsLayout->addWidget( buttonOk, 0, 0 ); - GroupButtonsLayout->addItem( new QSpacerItem( 5, 5, QSizePolicy::Expanding, QSizePolicy::Minimum ), 0, 1 ); - buttonCancel = new QPushButton( tr( "&Cancel" ) , GroupButtons, "buttonCancel" ); - buttonCancel->setAutoDefault( TRUE ); - GroupButtonsLayout->addWidget( buttonCancel, 0, 2 ); - - TopLayout->addWidget( TopGroup, 0, 0); - TopLayout->addWidget( GroupButtons, 1, 0 ); - - // signals and slots connections =========================================== - connect( buttonOk, SIGNAL( clicked() ), this, SLOT( accept() ) ); - connect( buttonCancel, SIGNAL( clicked() ), this, SLOT( reject() ) ); -} - -/*! - Destructor -*/ -VisuGUI_SweepPrefDlg::~VisuGUI_SweepPrefDlg() -{ -} - -/*! - Sets Time step -*/ -void VisuGUI_SweepPrefDlg::setTimeStep( double step ) -{ - TimeSpin->setValue( step ); -} - -/*! - Gets Time step -*/ -double VisuGUI_SweepPrefDlg::getTimeStep() -{ - return TimeSpin->value(); -} - -/*! - Sets Nb of cycles -*/ -void VisuGUI_SweepPrefDlg::setNbCycles( int nbc ) -{ - CyclesSpin->setValue( nbc ); -} - -/*! - Gets Nb of cycles -*/ -int VisuGUI_SweepPrefDlg::getNbCycles() -{ - return CyclesSpin->value(); -} - -/*! - Sets Nb of Steps -*/ -void VisuGUI_SweepPrefDlg::setNbSteps( int nbs ) -{ - StepsSpin->setValue( nbs ); -} - -/*! - Gets Nb of Steps -*/ -int VisuGUI_SweepPrefDlg::getNbSteps() -{ - return StepsSpin->value(); -} diff --git a/src/VISUGUI/VisuGUI_SweepPrefDlg.h b/src/VISUGUI/VisuGUI_SweepPrefDlg.h deleted file mode 100644 index 6179c111..00000000 --- a/src/VISUGUI/VisuGUI_SweepPrefDlg.h +++ /dev/null @@ -1,67 +0,0 @@ -// VISU VISUGUI : GUI of VISU component -// -// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org -// -// -// -// File : VisuGUI_SweepPrefDlg.h -// Author : Laurent CORNABE & Hubert ROLLAND -// Module : VISU -// $Header$ - -#ifndef VISUGUI_SWEEPPREFDLG_H -#define VISUGUI_SWEEPPREFDLG_H - -#include -#include -#include -#include -#include -#include "QtxDblSpinBox.h" - -class VisuGUI_SweepPrefDlg : public QDialog -{ - Q_OBJECT - -public: - VisuGUI_SweepPrefDlg( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); - ~VisuGUI_SweepPrefDlg(); - - void setTimeStep( double step ); - double getTimeStep(); - void setNbCycles( int nbc ); - int getNbCycles(); - void setNbSteps ( int nbs ); - int getNbSteps (); - -private: - QGroupBox* TopGroup; - QLabel* TimeLabel; - QtxDblSpinBox* TimeSpin; - QLabel* CyclesLabel; - QSpinBox* CyclesSpin; - QLabel* StepsLabel; - QSpinBox* StepsSpin; - QGroupBox* GroupButtons; - QPushButton* buttonOk; - QPushButton* buttonCancel; -}; - -#endif // VISUGUI_SWEEPPREFDLG_H diff --git a/src/VISUGUI/VisuGUI_TimeAnimation.h b/src/VISUGUI/VisuGUI_TimeAnimation.h deleted file mode 100644 index f9fd9743..00000000 --- a/src/VISUGUI/VisuGUI_TimeAnimation.h +++ /dev/null @@ -1,175 +0,0 @@ -// VISU VISUGUI : GUI of VISU component -// -// Copyright (C) 2003 CEA/DEN, EDF R&D -// -// -// -// File : VisuGUI_TimeAnimation.h -// Author : Vitaly SMETANNIKOV -// Module : VISU - -#ifndef VISUGUI_TIMEANIMATION_H -#define VISUGUI_TIMEANIMATION_H - -#include "QtxDblSpinBox.h" - -#include "SALOMEDSClient_Study.hxx" - -#include -#include -#include - -class VisuGUI; -class VISU_TimeAnimation; - -namespace VISU { - class Prs3d_i; -} - -class SVTK_ViewWindow; - -class QtxDblSpinBox; - -class QLabel; -class QSlider; -class QListBox; -class QCheckBox; -class QComboBox; -class QToolButton; - -/*! - * Auxilliary class for presentations definition - */ -class ArrangeDlg: public QDialog -{ - Q_OBJECT - public: - enum { AutoMode, ManualMode }; - enum { XAxis, YAxis, ZAxis }; - - ArrangeDlg(QWidget* theParent, VISU_TimeAnimation* theAnimator); - ArrangeDlg(QWidget* theParent, SVTK_ViewWindow* theViewWindow); - ~ArrangeDlg() {}; - - int getMode() const { return myStackWgt->id(myStackWgt->visibleWidget()); } - double getDistance() const { return myDistVal->value(); } - int getAxis() const { return myAxisGrp->id(myAxisGrp->selected()); } - - protected slots: - virtual void accept(); - void onFieldChange(int); - - private: - struct Offset { - float myOffset[3]; - }; - - - void init(); - void acceptAnimation(); - void acceptViewWindow(); - - VISU_TimeAnimation* myAnimator; - SVTK_ViewWindow * myViewWindow; - - QWidgetStack* myStackWgt; - QButtonGroup* myAxisGrp; - QtxDblSpinBox* myDistVal; - QListBox* myFieldLst; - QtxDblSpinBox* myCoord[3]; - QValueList myOffsets; - - QCheckBox* mySaveChk; - - int myCurrent; - QMap myPrsMap; -}; - - -class SetupDlg: public QDialog { - Q_OBJECT - - public: - SetupDlg(VisuGUI* theModule, VISU_TimeAnimation* theAnimator); - ~SetupDlg() {}; - - private slots: - void onFieldChange(int theIndex); - void onTypeChanged(int theIndex); - // void onScalarBarDlg(); - void onPreferencesDlg(); - void onRangeCheck(bool theCheck); - void onMinValue(double theVal); - void onMaxValue(double theVal); - void onArrangeDlg(); - - private: - VisuGUI* myModule; - VISU_TimeAnimation* myAnimator; - QListBox* myFieldLst; - QComboBox* myTypeCombo; - QPushButton* myPropBtn; - QPushButton* myArrangeBtn; - QCheckBox* myUseRangeChk; - QtxDblSpinBox* myMinVal; - QtxDblSpinBox* myMaxVal; -}; - - -class VisuGUI_TimeAnimationDlg: public QDialog -{ - Q_OBJECT - public: - VisuGUI_TimeAnimationDlg(VisuGUI* theModule, _PTR(Study) theStudy); - ~VisuGUI_TimeAnimationDlg(); - - void addField(_PTR(SObject) theField); - void clearView(); - - void restoreFromStudy(_PTR(SObject) theAnimation); - - protected: - virtual void closeEvent(QCloseEvent* theEvent); - void stopAnimation(); - - private slots: - void onTypeChange(int index); - void onPlayPressed(); - void onBackPressed(); - void onForvardPressed(); - void onLastPressed(); - void onFirstPressed(); - void onSetupDlg(); - void onWindowChanged(int index); - void createFrames(); - void onSpeedChange(double theSpeed); - void onExecution(long theNewFrame, double theTime); - void onBrowse(); - void onStop(); - void saveToStudy(); - void publishToStudy(); - - private: - QSlider* mySlider; - QComboBox* myTypeCombo; - QPushButton* myPropBtn; - QToolButton* myPlayBtn; - QLabel* myTimeLbl; - QPushButton* mySetupBtn; - QPushButton* myGenBtn; - - QFrame* myPlayFrame; - _PTR(Study) myStudy; - VisuGUI* myModule; - - VISU_TimeAnimation* myAnimator; - QCheckBox* mySaveCheck; - QLineEdit* myPathEdit; - bool isClosing; - QCloseEvent* myEvent; - - QPushButton* myPublishBtn; - QPushButton* mySaveBtn; -}; - -#endif //VISUGUI_TIMEANIMATION_H diff --git a/src/VISU_I/VISU_Mesh_i.hh b/src/VISU_I/VISU_Mesh_i.hh deleted file mode 100644 index 6f7ffd5f..00000000 --- a/src/VISU_I/VISU_Mesh_i.hh +++ /dev/null @@ -1,107 +0,0 @@ -// VISU OBJECT : interactive object for VISU entities implementation -// -// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org -// -// -// File : VISU_PrsObject_i.hxx -// Author : Alexey PETROV -// Module : VISU - -#ifndef VISU_Mesh_i_HeaderFile -#define VISU_Mesh_i_HeaderFile - -#include "VISU_Prs3d_i.hh" - -class VISU_MeshPL; - -namespace VISU{ - class Mesh_i : public virtual POA_VISU::Mesh, - public virtual Prs3d_i - { - static int myNbPresent; - Mesh_i(); - Mesh_i(const Mesh_i&); - public: - explicit - Mesh_i(Result_i* theResult); - explicit - Mesh_i(Result_i* theResult, - SALOMEDS::SObject_ptr theSObject); - virtual void SameAs(const Mesh_i* theOrigin); - virtual ~Mesh_i(); - virtual void RemoveFromStudy(); - - virtual VISU::VISUType GetType() { return VISU::TMESH;}; - - virtual void SetCellColor(const SALOMEDS::Color& theColor) { myCellColor = theColor;} - virtual SALOMEDS::Color GetCellColor() { return myCellColor;} - - virtual void SetNodeColor(const SALOMEDS::Color& theColor) { myNodeColor = theColor;} - virtual SALOMEDS::Color GetNodeColor() { return myNodeColor;} - - virtual void SetLinkColor(const SALOMEDS::Color& theColor) { myLinkColor = theColor;} - virtual SALOMEDS::Color GetLinkColor() { return myLinkColor;} - - virtual void SetPresentationType(VISU::PresentationType theType) { myPresentType = theType;} - virtual PresentationType GetPresentationType() { return myPresentType;} - - typedef VISU::Mesh TInterface; - VISU_MeshPL* GetMeshPL(){ return myMeshPL;} - - protected: - Storable* Build(int theRestoring); - - VISU_MeshPL* myMeshPL; - - // std::string myMeshName; move it to Prs3d_i - int myEntity;//jfa IPAL9284: TEntity myEntity; - std::string mySubMeshName; - VISU::VISUType myType; - - VISU::PresentationType myPresentType; - struct SALOMEDS::Color myCellColor, myNodeColor, myLinkColor; - - public: - static int IsPossible(Result_i* theResult, const char* theMeshName, - Entity theEntity, const char* theFamilyName = ""); - virtual Storable* Create(const char* theMeshName, Entity theEntity, const char* theFamilyName = ""); - - static int IsPossible(Result_i* theResult, const char* theMeshName, const char* theGroupName); - virtual Storable* Create(const char* theMeshName, const char* theGroupName); - - const std::string& GetMeshName() const { return myMeshName;} - VISU::Entity GetEntity() const { return VISU::Entity(myEntity);} - const string& GetSubMeshName() const { return mySubMeshName;} - - virtual void ToStream(std::ostringstream& theStr); - - virtual const char* GetComment() const; - static const std::string myComment; - virtual QString GenerateName(); - - virtual Storable* Restore(const Storable::TRestoringMap& theMap); - - virtual VISU_Actor* CreateActor(const Handle(SALOME_InteractiveObject)& theIO = NULL); - - virtual void UpdateActor(VISU_Actor* theActor); - }; -} - -#endif diff --git a/src/VISU_I/VISU_PrsObject_i.cc b/src/VISU_I/VISU_PrsObject_i.cc deleted file mode 100644 index 321696a1..00000000 --- a/src/VISU_I/VISU_PrsObject_i.cc +++ /dev/null @@ -1,59 +0,0 @@ -// VISU OBJECT : interactive object for VISU entities implementation -// -// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org -// -// -// File : VISU_PrsObject_i.cxx -// Author : Alexey PETROV -// Module : VISU - -#include "VISU_PrsObject_i.hh" -using namespace VISU; -using namespace std; - -#ifdef _DEBUG_ -static int MYDEBUG = 1; -static int MYDEBUGWITHFILES = 0; -#else -static int MYDEBUG = 0; -static int MYDEBUGWITHFILES = 0; -#endif - -void VISU::PrsObject_i::SetName( const char* theName ) -{ - myName = theName; - SALOMEDS::SObject_var mySO = myStudy->FindObjectID( GetEntry() ); - if(!mySO->_is_nil()){ - SALOMEDS::StudyBuilder_var aBuilder = myStudy->NewBuilder(); - SALOMEDS::GenericAttribute_var anAttr = aBuilder->FindOrCreateAttribute( mySO, "AttributeName" ); - SALOMEDS::AttributeName_var aNameAttr = SALOMEDS::AttributeName::_narrow( anAttr ); - aNameAttr->SetValue( theName ); - } -} -QString VISU::PrsObject_i::GetEntry() { - CORBA::String_var anIOR = GetID(); - SALOMEDS::SObject_var aSObject = myStudy->FindObjectIOR(anIOR.in()); - CORBA::String_var anEntry; - if(!CORBA::is_nil(aSObject.in())) - anEntry = aSObject->GetID(); - else - MESSAGE("PrsObject_i::GetEntry - Cannot find SObject in the Study with StudyId = "<StudyId()<<" !!!"); - return anEntry.in(); -} diff --git a/src/VISU_I/VISU_PrsObject_i.hh b/src/VISU_I/VISU_PrsObject_i.hh deleted file mode 100644 index b9aca61e..00000000 --- a/src/VISU_I/VISU_PrsObject_i.hh +++ /dev/null @@ -1,54 +0,0 @@ -// VISU OBJECT : interactive object for VISU entities implementation -// -// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org -// -// -// File : VISU_PrsObject_i.hxx -// Author : Alexey PETROV -// Module : VISU - -#ifndef VISU_PrsObject_i_HeaderFile -#define VISU_PrsObject_i_HeaderFile - -#include "VISUConfig.hh" - -namespace VISU{ - class PrsObject_i : public virtual POA_VISU::PrsObject, - public virtual RemovableObject_i - { - PrsObject_i(const PrsObject_i&); - - public: - PrsObject_i(SALOMEDS::Study_ptr theStudy) : myStudy(SALOMEDS::Study::_duplicate(theStudy)) {}; - virtual ~PrsObject_i() {} - - protected: - std::string myName; - SALOMEDS::Study_var myStudy; - - public: - virtual const char* GetName() const { return myName.c_str();} - virtual void SetName( const char* theName ); - const SALOMEDS::Study_var& GetStudyDocument() const { return myStudy;} - QString GetEntry(); - }; -} - -#endif diff --git a/src/VISU_I/VISU_Result_i.hh b/src/VISU_I/VISU_Result_i.hh deleted file mode 100644 index beb1e558..00000000 --- a/src/VISU_I/VISU_Result_i.hh +++ /dev/null @@ -1,132 +0,0 @@ -// VISU OBJECT : interactive object for VISU entities implementation -// -// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org -// -// -// File : VISU_Result_i.hh -// Author : Alexey PETROV -// Module : VISU - -#ifndef __VISU_RESULT_I_H__ -#define __VISU_RESULT_I_H__ - -#include "VISUConfig.hh" -#include "SALOME_GenericObj_i.hh" - -#include - -#include - -class VISU_Convertor; - -namespace VISU{ - class Result_i : public virtual POA_VISU::Result, - public virtual RemovableObject_i, - public virtual SALOME::GenericObj_i - { - Result_i(); - Result_i(const Result_i &); - - public: - enum ESourceId {eRestoredComponent = -2, eRestoredFile = -1, eFile = 1, eComponent = 2}; - enum ECreationId {eImportFile, eCopyAndImportFile, eImportMed, eImportMedField}; - - Result_i(SALOMEDS::Study_ptr theStudy, - const ESourceId& theSourceId, - const ECreationId& theCreationId); - - virtual ~Result_i(); - virtual void RemoveFromStudy(); - - virtual VISU::VISUType GetType() { return VISU::TRESULT;} - virtual CORBA::Boolean BuildAll(); - - typedef VISU_Convertor TInput; - - private: - ESourceId mySourceId; - ECreationId myCreationId; - - TInput *myInput; - CORBA::Boolean myIsDone; - std::string myName, myInitFileName; - QFileInfo myFileInfo; - - protected: - virtual Storable* Build(SALOMEDS::SObject_ptr theSObject = SALOMEDS::SObject::_nil()) ; - - public: - virtual int IsPossible(); - - virtual Storable* Create(const char* theFileName); - virtual Storable* Create(SALOMEDS::SObject_ptr theMedSObject); - virtual Storable* Create(SALOME_MED::FIELD_ptr theField); - - virtual Storable* Restore(SALOMEDS::SObject_ptr theSObject, - const Storable::TRestoringMap& theMap, - const std::string& thePrefix); - - static Storable* Restore(SALOMEDS::SObject_ptr theSObject, - const std::string& thePrefix, - const Storable::TRestoringMap& theMap); - - virtual void ToStream(std::ostringstream& theStr); - virtual const char* GetComment() const; - static const std::string myComment; - TInput* GetInput(); - - const std::string& GetName() const { return myName;} - const QFileInfo& GetFileInfo() const { return myFileInfo;} - const std::string& GetFileName() const { return myInitFileName;} - const ECreationId& GetCreationId() const { return myCreationId;} - - private: - SALOMEDS::SObject_var mySObject; - SALOMEDS::Study_var myStudyDocument; - SALOMEDS::SComponent_var mySComponent; - - public: - std::string GetRefFatherEntry(); - std::string GetEntry(); - const SALOMEDS::SObject_var& GetSObject() const; - const SALOMEDS::Study_var& GetStudyDocument() const; - const SALOMEDS::SComponent_var& GetSComponent() const; - std::string GetEntry(const std::string& theComment); - - // Info on structured mesh contained in TInput - public: - typedef enum { AXIS_X = 0, AXIS_Y, AXIS_Z } TAxis; - const std::vector< float >* GetAxisInfo(const std::string& theMeshName, - TAxis theAxis, - gp_Dir& thePlaneNormal); - // Return i,j or k values and cutting plane normal for theAxis. - // In the case of any problems, return NULL pointer - private: - struct TGridInfo { - std::vector< float > myComponets[ 3 ]; - gp_Dir myAxis [ 3 ]; - }; - map< string, TGridInfo > myMeshName2GridInfoMap; - }; - - Result_var FindResult(SALOMEDS::SObject_ptr theSObject); -} - -#endif diff --git a/src/VISU_I/VISU_Table_i.cc b/src/VISU_I/VISU_Table_i.cc deleted file mode 100644 index dfe598c1..00000000 --- a/src/VISU_I/VISU_Table_i.cc +++ /dev/null @@ -1,1292 +0,0 @@ -// VISU OBJECT : interactive object for VISU entities implementation -// -// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org -// -// -// File : VISU_Table_i.cc -// Author : Vadim SANDLER -// Module : VISU - -#include "VISU_Table_i.hh" - -#include "VISU_CutLines_i.hh" -#include "VISU_Result_i.hh" -#include "VISU_ViewManager_i.hh" - -#include "SPlot2d_Curve.h" - -#include -#include -#include - -#include -#include -#include - -using namespace std; - -#ifdef _DEBUG_ -static int MYDEBUG = 0; -#else -static int MYDEBUG = 0; -#endif -//---------------------------------------------------------------- -// Table Object -//---------------------------------------------------------------- -int VISU::Table_i::myNbPresent = 0; -const string VISU::Table_i::myComment = "TABLE"; -/*! - Generate unique name -*/ -const char* VISU::Table_i::GenerateName() -{ - return VISU::GenerateName( "Table", ++myNbPresent ); -} -/*! - Gets comment string -*/ -const char* VISU::Table_i::GetComment() const -{ - return myComment.c_str(); -} -/*! - Constructor -*/ -VISU::Table_i::Table_i( SALOMEDS::Study_ptr theStudy, const char* theObjectEntry ) - : PrsObject_i(theStudy) -{ - mySObj = SALOMEDS::SObject::_duplicate((theStudy->FindObjectID(theObjectEntry))); - myOrientation = VISU::Table::HORIZONTAL; -} -/*! - Destructor -*/ -VISU::Table_i::~Table_i() -{ - MESSAGE("Table_i::~Table_i"); -} -/*! - Gets number of rows in table -*/ -CORBA::Long VISU::Table_i::GetNbRows() -{ - SALOMEDS::SObject_var SO = mySObj; - SALOMEDS::StudyBuilder_var Builder = myStudy->NewBuilder(); - if ( !SO->_is_nil() ) { - SALOMEDS::GenericAttribute_var anAttr; - if ( Builder->FindAttribute( SO, anAttr, "AttributeTableOfInteger" ) ) { - SALOMEDS::AttributeTableOfInteger_var anInt = SALOMEDS::AttributeTableOfInteger::_narrow( anAttr ); - return anInt->GetNbRows(); - } - else if ( Builder->FindAttribute( SO, anAttr, "AttributeTableOfReal" ) ) { - SALOMEDS::AttributeTableOfReal_var aReal = SALOMEDS::AttributeTableOfReal::_narrow( anAttr ); - return aReal->GetNbRows(); - } - } - return 0; -} -/*! - Gets number of columns in table -*/ -CORBA::Long VISU::Table_i::GetNbColumns() -{ - SALOMEDS::SObject_var SO = mySObj; - SALOMEDS::StudyBuilder_var Builder = myStudy->NewBuilder(); - if ( !SO->_is_nil() ) { - SALOMEDS::GenericAttribute_var anAttr; - if ( Builder->FindAttribute( SO, anAttr, "AttributeTableOfInteger" ) ) { - SALOMEDS::AttributeTableOfInteger_var anInt = SALOMEDS::AttributeTableOfInteger::_narrow( anAttr ); - return anInt->GetNbColumns(); - } - else if ( Builder->FindAttribute( SO, anAttr, "AttributeTableOfReal" ) ) { - SALOMEDS::AttributeTableOfReal_var aReal = SALOMEDS::AttributeTableOfReal::_narrow( anAttr ); - return aReal->GetNbColumns(); - } - } - return 0; -} -/*! - Creates table object -*/ -VISU::Storable* VISU::Table_i::Create() -{ - // generate name ... - myName = GetTableTitle(); - - // mpv (PAL 5357): if name attribute already exist at this label, use it as name of table - if ( myName == "" ) - if ( !mySObj->_is_nil() ) { - CutLines_i* pCutLines = NULL; - CORBA::Object_var anObj = SObjectToObject(mySObj); - if(!CORBA::is_nil(anObj)){ - VISU::CutLines_var aCutLines = VISU::CutLines::_narrow(anObj); - if(!aCutLines->_is_nil()) - pCutLines = dynamic_cast(GetServant(aCutLines).in()); - } - if (!pCutLines) - if (mySObj->GetName()) myName = mySObj->GetName(); - } - - if ( myName == "" ) - myName = GenerateName(); - // ... and build the object - return Build( false ); -} -/*! - Builds presentation of table -*/ -VISU::Storable* VISU::Table_i::Build( int theRestoring ) -{ - - // look for reference SObject with table attribute - SALOMEDS::SObject_var SO = mySObj; - - if ( !SO->_is_nil() ) { - CutLines_i* pCutLines = NULL; - CORBA::Object_var anObj = SObjectToObject(SO); - if(!CORBA::is_nil(anObj)){ - VISU::CutLines_var aCutLines = VISU::CutLines::_narrow(anObj); - if(!aCutLines->_is_nil()) - pCutLines = dynamic_cast(GetServant(aCutLines).in()); - } - SALOMEDS::StudyBuilder_var Builder = myStudy->NewBuilder(); - SALOMEDS::GenericAttribute_var anAttr; - // look for component - if ( !theRestoring ) { - SALOMEDS::SComponent_var SComponent = VISU::FindOrCreateVisuComponent( myStudy ); - // create SObject and set attributes - QString aComment; - if(pCutLines) - aComment.sprintf("myComment=%s;myType=%d;mySourceId=CutLines",GetComment(),VISU::TTABLE); - else{ - aComment.sprintf("myComment=%s;myType=%d;mySourceId=TableAttr",GetComment(),VISU::TTABLE); - SALOMEDS::SObject_var aFatherSObject = SO->GetFather(); - if(aFatherSObject->FindAttribute(anAttr,"AttributeComment")){ - SALOMEDS::AttributeComment_var aCommentAttr = - SALOMEDS::AttributeComment::_narrow(anAttr); - CORBA::String_var aValue = aCommentAttr->Value(); - Storable::TRestoringMap aMap; - Storable::StrToMap(aValue.in(),aMap); - bool anIsExist; - QString aMethodName = VISU::Storable::FindValue(aMap,"myComment",&anIsExist); - if(anIsExist){ - if(strcmp(aMethodName.latin1(),"ImportTables") == 0){ - aComment.sprintf("myComment=%s;myType=%d;mySourceId=TableFile",GetComment(),VISU::TTABLE); - } - } - } - } - - string anEntry = CreateAttributes( myStudy, - SO->GetID(),//SComponent->GetID(), - "", - GetID(), - GetName(), - "", - aComment.latin1(), - pCutLines ); - // create SObject referenced to real table object - mySObj = SALOMEDS::SObject::_duplicate(myStudy->FindObjectID( anEntry.c_str() )); - if(pCutLines) { - pCutLines->BuildTableOfReal(mySObj); - } - // mpv (PAL5357): reference attributes are unnecessary now - //SALOMEDS::SObject_var refSO = Builder->NewObject( mySObj ); - //Builder->Addreference( refSO, SO ); - } - return this; - } - return NULL; -} -/*! - Restores table object from stream -*/ -VISU::Storable* VISU::Table_i::Restore( const Storable::TRestoringMap& theMap, SALOMEDS::SObject_ptr SO) -{ - if(MYDEBUG) MESSAGE(GetComment()); - myName = (const char*)(VISU::Storable::FindValue(theMap,"myName")); - myTitle = (const char*)(VISU::Storable::FindValue(theMap,"myTitle")); - myOrientation = ( VISU::Table::Orientation )( VISU::Storable::FindValue(theMap,"myOrientation").toInt() ); - mySObj = SALOMEDS::SObject::_duplicate(SO); - return Build( true ); -} -/*! - Flushes table data into stream -*/ -void VISU::Table_i::ToStream( std::ostringstream& theStr ) -{ - Storable::DataToStream( theStr, "myName", myName.c_str() ); - Storable::DataToStream( theStr, "myTitle", myTitle.c_str() ); - Storable::DataToStream( theStr, "myOrientation", myOrientation ); -} -/*! - Called from engine to restore table from the file -*/ -VISU::Storable* VISU::Table_i::Restore(SALOMEDS::SObject_ptr theSObject, - const string& thePrefix, const Storable::TRestoringMap& theMap) -{ - SALOMEDS::Study_var aStudy = theSObject->GetStudy(); - VISU::Table_i* pResent = new VISU::Table_i( aStudy, "" ); - return pResent->Restore( theMap, theSObject); -} -/*! - Gets title for the original table object -*/ -const char* VISU::Table_i::GetTableTitle() -{ - SALOMEDS::SObject_var SO = mySObj; - SALOMEDS::StudyBuilder_var Builder = myStudy->NewBuilder(); - SALOMEDS::GenericAttribute_var anAttr; - SALOMEDS::AttributeTableOfInteger_var anInt; - SALOMEDS::AttributeTableOfReal_var aReal; - if ( !SO->_is_nil() ) { - if ( Builder->FindAttribute( SO, anAttr, "AttributeTableOfInteger" ) ) { - anInt = SALOMEDS::AttributeTableOfInteger::_narrow( anAttr ); - return anInt->GetTitle(); - } - else if ( Builder->FindAttribute( SO, anAttr, "AttributeTableOfReal" ) ) { - aReal = SALOMEDS::AttributeTableOfReal::_narrow( anAttr ); - return aReal->GetTitle(); - } - } - return ""; -} - -void VISU::Table_i::RemoveFromStudy() -{ - // Remove the table with all curves - VISU::RemoveFromStudy(mySObj,false); -} - -//---------------------------------------------------------------- -// Curve Object -//---------------------------------------------------------------- -/*! - Restores table object from the stream [ static ] -*/ -static VISU::Table_i* GetTable( SALOMEDS::Study_ptr theStudy, SALOMEDS::SObject_ptr theSO ) { - CORBA::Object_var anObject = VISU::SObjectToObject( theSO ); - if( !CORBA::is_nil( anObject ) ) { - CORBA::Object_ptr aTable = VISU::Table::_narrow( anObject ); - if( !CORBA::is_nil( aTable ) ) - return dynamic_cast(VISU::GetServant(aTable).in()); - } - return NULL; -} - -int VISU::Curve_i::myNbPresent = 0; -const string VISU::Curve_i::myComment = "CURVE"; -/*! - Generate unique name -*/ -const char* VISU::Curve_i::GenerateName() -{ - return VISU::GenerateName( "Curve", ++myNbPresent ); -} -/*! - Gets comment string -*/ -const char* VISU::Curve_i::GetComment() const -{ - return myComment.c_str(); -} -/*! - Constructor - NB : theHRow, theVRow are the indexes of rows in the Table object and numbered from the 1 to GetNbRows() -*/ -VISU::Curve_i::Curve_i(SALOMEDS::Study_ptr theStudy, Table_i* theTable, CORBA::Long theHRow, CORBA::Long theVRow ) - : PrsObject_i(theStudy), myTable( theTable ), myHRow( theHRow ), myVRow( theVRow ) -{ - myAuto = true; - myLine = VISU::Curve::SOLIDLINE; - myLineWidth = 0; - myMarker = VISU::Curve::CIRCLE; - myColor.R = 0.0; myColor.G = 0.0; myColor.B = 0.0; -} -/*! - Destructor -*/ -VISU::Curve_i::~Curve_i() -{ - MESSAGE("Curve_i::~Curve_i"); -} -/*! - Creates curve object -*/ -VISU::Storable* VISU::Curve_i::Create() -{ - // generate name ... - myName = GetVerTitle(); - if ( myName == "" ) - myName = GenerateName(); - // ... and build the object - return Build( false ); -} -/*! - Builds presentation of curve -*/ -VISU::Storable* VISU::Curve_i::Build(int theRestoring ) -{ - if ( myTable != NULL ) { - // getting table SObject by it's entry - int nbRows = myTable->GetNbRows(); - if ( myHRow > 0 && myHRow <= nbRows && myVRow > 0 && myVRow <= nbRows ) { - if ( !theRestoring ) { - // look for component - SALOMEDS::SComponent_var SComponent = VISU::FindOrCreateVisuComponent( myStudy ); - // create SObject and set attributes - QString aComment; - aComment.sprintf("myComment=%s;myType=%d",GetComment(),VISU::TCURVE); - string anEntry = CreateAttributes( myStudy, - myTable->GetObjectEntry(), - "", - GetID(), - GetName(), - "", - aComment.latin1(), - true ); - // create SObject referenced to real table object - mySObj = SALOMEDS::SObject::_duplicate(myStudy->FindObjectID(anEntry.c_str())); - } - return this; - } - } - return NULL; -} - -/*! - Returns CORBA::True if curve refers to valid table data -*/ -CORBA::Boolean VISU::Curve_i::IsValid() -{ - // getting table SObject by it's entry - SALOMEDS::SObject_var SO = myStudy->FindObjectID(myTable->GetObjectEntry()); - SALOMEDS::StudyBuilder_var Builder = myStudy->NewBuilder(); - SALOMEDS::GenericAttribute_var anAttr; - SALOMEDS::AttributeTableOfInteger_var anInt; - SALOMEDS::AttributeTableOfReal_var aReal; - if ( !SO->_is_nil() ) { - if ( Builder->FindAttribute( SO, anAttr, "AttributeTableOfInteger" ) ) { - anInt = SALOMEDS::AttributeTableOfInteger::_narrow( anAttr ); - if ( myHRow > 0 && myHRow <= anInt->GetNbRows() && myVRow > 0 && myVRow <= anInt->GetNbRows() ) { - return true; - } - } - else if ( Builder->FindAttribute( SO, anAttr, "AttributeTableOfReal" ) ) { - aReal = SALOMEDS::AttributeTableOfReal::_narrow( anAttr ); - if ( myHRow > 0 && myHRow <= aReal->GetNbRows() && myVRow > 0 && myVRow <= aReal->GetNbRows() ) { - return true; - } - } - } - return false; -} -/*! - Returns hor.axis title -*/ -string VISU::Curve_i::GetHorTitle() -{ - string title; - // getting table SObject by it's entry - SALOMEDS::SObject_var SO = myStudy->FindObjectID(myTable->GetObjectEntry()); - SALOMEDS::StudyBuilder_var Builder = myStudy->NewBuilder(); - SALOMEDS::GenericAttribute_var anAttr; - SALOMEDS::AttributeTableOfInteger_var anInt; - SALOMEDS::AttributeTableOfReal_var aReal; - if ( !SO->_is_nil() ) { - if ( Builder->FindAttribute( SO, anAttr, "AttributeTableOfInteger" ) ) { - anInt = SALOMEDS::AttributeTableOfInteger::_narrow( anAttr ); - SALOMEDS::StringSeq_var rowTitles = anInt->GetRowTitles(); - if ( rowTitles->length() > 0 && myHRow > 0 && myHRow <= anInt->GetNbRows() ) { - title = rowTitles[ myHRow-1 ]; - } - } - else if ( Builder->FindAttribute( SO, anAttr, "AttributeTableOfReal" ) ) { - aReal = SALOMEDS::AttributeTableOfReal::_narrow( anAttr ); - SALOMEDS::StringSeq_var rowTitles = aReal->GetRowTitles(); - if ( rowTitles->length() > 0 && myHRow > 0 && myHRow <= aReal->GetNbRows() ) { - title = rowTitles[ myHRow-1 ]; - } - } - } - return title; -} -/*! - Returns ver.axis title -*/ -string VISU::Curve_i::GetVerTitle() -{ - string title; - // getting table SObject by it's entry - SALOMEDS::SObject_var SO = myStudy->FindObjectID(myTable->GetObjectEntry()); - SALOMEDS::StudyBuilder_var Builder = myStudy->NewBuilder(); - SALOMEDS::GenericAttribute_var anAttr; - SALOMEDS::AttributeTableOfInteger_var anInt; - SALOMEDS::AttributeTableOfReal_var aReal; - if ( !SO->_is_nil() ) { - if ( Builder->FindAttribute( SO, anAttr, "AttributeTableOfInteger" ) ) { - anInt = SALOMEDS::AttributeTableOfInteger::_narrow( anAttr ); - SALOMEDS::StringSeq_var rowTitles = anInt->GetRowTitles(); - if ( rowTitles->length() > 0 && myVRow > 0 && myVRow <= anInt->GetNbRows() ) - title = rowTitles[ myVRow-1 ]; - } - else if ( Builder->FindAttribute( SO, anAttr, "AttributeTableOfReal" ) ) { - aReal = SALOMEDS::AttributeTableOfReal::_narrow( anAttr ); - SALOMEDS::StringSeq_var rowTitles = aReal->GetRowTitles(); - if ( rowTitles->length() > 0 && myVRow > 0 && myVRow <= aReal->GetNbRows() ) - title = rowTitles[ myVRow-1 ]; - } - } - return title; -} -/*! - Returns hor.axis units -*/ -string VISU::Curve_i::GetHorUnits() -{ - string units; - // getting table SObject by it's entry - SALOMEDS::SObject_var SO = myStudy->FindObjectID(myTable->GetObjectEntry()); - SALOMEDS::StudyBuilder_var Builder = myStudy->NewBuilder(); - SALOMEDS::GenericAttribute_var anAttr; - SALOMEDS::AttributeTableOfInteger_var anInt; - SALOMEDS::AttributeTableOfReal_var aReal; - if ( !SO->_is_nil() ) { - if ( Builder->FindAttribute( SO, anAttr, "AttributeTableOfInteger" ) ) { - anInt = SALOMEDS::AttributeTableOfInteger::_narrow( anAttr ); - SALOMEDS::StringSeq_var rowUnits = anInt->GetRowUnits(); - if ( rowUnits->length() > 0 && myHRow > 0 && myHRow <= anInt->GetNbRows() ) - units = rowUnits[ myHRow-1 ]; - } - else if ( Builder->FindAttribute( SO, anAttr, "AttributeTableOfReal" ) ) { - aReal = SALOMEDS::AttributeTableOfReal::_narrow( anAttr ); - SALOMEDS::StringSeq_var rowUnits = aReal->GetRowUnits(); - if ( rowUnits->length() > 0 && myHRow > 0 && myHRow <= aReal->GetNbRows() ) - units = rowUnits[ myHRow-1 ]; - } - } - return units; -} -/*! - Returns ver.axis units -*/ -string VISU::Curve_i::GetVerUnits() -{ - string units; - // getting table SObject by it's entry - SALOMEDS::SObject_var SO = myStudy->FindObjectID(myTable->GetObjectEntry()); - SALOMEDS::StudyBuilder_var Builder = myStudy->NewBuilder(); - SALOMEDS::GenericAttribute_var anAttr; - SALOMEDS::AttributeTableOfInteger_var anInt; - SALOMEDS::AttributeTableOfReal_var aReal; - if ( !SO->_is_nil() ) { - if ( Builder->FindAttribute( SO, anAttr, "AttributeTableOfInteger" ) ) { - anInt = SALOMEDS::AttributeTableOfInteger::_narrow( anAttr ); - SALOMEDS::StringSeq_var rowUnits = anInt->GetRowUnits(); - if ( rowUnits->length() > 0 && myVRow > 0 && myVRow <= anInt->GetNbRows() ) - units = rowUnits[ myVRow-1]; - } - else if ( Builder->FindAttribute( SO, anAttr, "AttributeTableOfReal" ) ) { - aReal = SALOMEDS::AttributeTableOfReal::_narrow( anAttr ); - SALOMEDS::StringSeq_var rowUnits = aReal->GetRowUnits(); - if ( rowUnits->length() > 0 && myVRow > 0 && myVRow <= aReal->GetNbRows() ) - units = rowUnits[ myVRow-1 ]; - } - } - return units; -} -/*! - Gets curve data -*/ -int VISU::Curve_i::GetData( double*& theHorList, double*& theVerList ) -{ - theHorList = 0; theVerList = 0; - // getting table SObject by it's entry - SALOMEDS::SObject_var SO = myStudy->FindObjectID(myTable->GetObjectEntry()); - SALOMEDS::StudyBuilder_var Builder = myStudy->NewBuilder(); - SALOMEDS::GenericAttribute_var anAttr; - SALOMEDS::AttributeTableOfInteger_var anInt; - SALOMEDS::AttributeTableOfReal_var aReal; - if ( !SO->_is_nil() ) { - if ( Builder->FindAttribute( SO, anAttr, "AttributeTableOfInteger" ) ) { - anInt = SALOMEDS::AttributeTableOfInteger::_narrow( anAttr ); - int nbCols = anInt->GetNbColumns() ; - if ( nbCols > 0 && myHRow > 0 && myHRow <= anInt->GetNbRows() && myVRow > 0 && myVRow <= anInt->GetNbRows() ) { - int nbPoints = 0; - for ( int j = 1; j <= nbCols; j++ ) { - if ( anInt->HasValue( myHRow, j ) && anInt->HasValue( myVRow, j ) ) - nbPoints++; - } - if ( nbPoints > 0 ) { - theHorList = new double[ nbPoints ]; - theVerList = new double[ nbPoints ]; - int k = 0; - for ( int j = 1; j <= nbCols; j++ ) { - if ( anInt->HasValue( myHRow, j ) && anInt->HasValue( myVRow, j ) ) { - theHorList[k] = anInt->GetValue( myHRow, j ); - theVerList[k] = anInt->GetValue( myVRow, j ); - k++; - } - } - } - return nbPoints; - } - } - else if ( Builder->FindAttribute( SO, anAttr, "AttributeTableOfReal" ) ) { - aReal = SALOMEDS::AttributeTableOfReal::_narrow( anAttr ); - int nbCols = aReal->GetNbColumns() ; - if ( nbCols > 0 && myHRow > 0 && myHRow <= aReal->GetNbRows() && myVRow > 0 && myVRow <= aReal->GetNbRows() ) { - int nbPoints = 0; - for ( int j = 1; j <= nbCols; j++ ) { - if ( aReal->HasValue( myHRow, j ) && aReal->HasValue( myVRow, j ) ) - nbPoints++; - } - if ( nbPoints > 0 ) { - theHorList = new double[ nbPoints ]; - theVerList = new double[ nbPoints ]; - int k = 0; - for ( int j = 1; j <= nbCols; j++ ) { - if ( aReal->HasValue( myHRow, j ) && aReal->HasValue( myVRow, j ) ) { - theHorList[k] = aReal->GetValue( myHRow, j ); - theVerList[k] = aReal->GetValue( myVRow, j ); - k++; - } - } - } - return nbPoints; - } - } - } - return 0; -} -/*! - Creates curve Plot2d presentation object -*/ -SPlot2d_Curve* VISU::Curve_i::CreatePresentation() -{ - SPlot2d_Curve* crv = new SPlot2d_Curve(); - crv->setHorTitle( GetHorTitle().c_str() ); - string tlt = GetTitle(); - if ( tlt.length() <= 0 ) - tlt = GetVerTitle(); - //crv->setVerTitle( strdup( GetVerTitle().c_str() ) ); - //crv->setVerTitle( strdup( GetName() ) ); - crv->setVerTitle( tlt.c_str() ); - crv->setHorUnits( GetHorUnits().c_str() ); - crv->setVerUnits( GetVerUnits().c_str() ); - double* xList = 0; - double* yList = 0; - int nbPoints = GetData( xList, yList ); - if ( nbPoints > 0 && xList && yList ) { - crv->setData( xList, yList, nbPoints ); - } - //cout << "********** Number of points: " << nbPoints <setLine( (Plot2d_Curve::LineType)GetLine(), GetLineWidth() ); - crv->setMarker( (Plot2d_Curve::MarkerType)GetMarker() ); - SALOMEDS::Color color = GetColor(); - crv->setColor( QColor( (int)(color.R*255.), (int)(color.G*255.), (int)(color.B*255.) ) ); - crv->setAutoAssign( IsAuto() ); - crv->setIO(new SALOME_InteractiveObject(mySObj->GetID(),"VISU",GetName())); - if ( myTable ) - crv->setTableIO(new SALOME_InteractiveObject(myTable->GetObjectEntry(),"VISU",myTable->GetName())); - return crv; -} -/*! - Restores curve object from stream -*/ -VISU::Storable* VISU::Curve_i::Restore( const Storable::TRestoringMap& theMap, SALOMEDS::SObject_ptr theSO) -{ - if(MYDEBUG) MESSAGE(GetComment()); - mySObj = SALOMEDS::SObject::_duplicate(theSO); - myName = VISU::Storable::FindValue(theMap,"myName").latin1(); - myHRow = VISU::Storable::FindValue(theMap,"myHRow").toInt(); - myVRow = VISU::Storable::FindValue(theMap,"myVRow").toInt(); - myColor.R = VISU::Storable::FindValue(theMap,"myColor.R").toDouble(); - myColor.G = VISU::Storable::FindValue(theMap,"myColor.G").toDouble(); - myColor.B = VISU::Storable::FindValue(theMap,"myColor.B").toDouble(); - myMarker = ( VISU::Curve::MarkerType )( VISU::Storable::FindValue(theMap,"myMarker").toInt() ); - myLine = ( VISU::Curve::LineType )( VISU::Storable::FindValue(theMap,"myLine").toInt() ); - myLineWidth = VISU::Storable::FindValue(theMap,"myLineWidth").toInt(); - myAuto = VISU::Storable::FindValue(theMap,"myAuto").toInt(); - return Build( true ); -} -/*! - Flushes curve data into stream -*/ -void VISU::Curve_i::ToStream( std::ostringstream& theStr ) -{ - Storable::DataToStream( theStr, "myName", myName.c_str() ); - Storable::DataToStream( theStr, "myHRow", myHRow ); - Storable::DataToStream( theStr, "myVRow", myVRow ); - Storable::DataToStream( theStr, "myColor.R", myColor.R ); - Storable::DataToStream( theStr, "myColor.G", myColor.G ); - Storable::DataToStream( theStr, "myColor.B", myColor.B ); - Storable::DataToStream( theStr, "myMarker", myMarker ); - Storable::DataToStream( theStr, "myLine", myLine ); - Storable::DataToStream( theStr, "myLineWidth", myLineWidth ); - Storable::DataToStream( theStr, "myAuto", myAuto ); -} -/*! - Gets reference table's entry -*/ -const char* VISU::Curve_i::GetTableID() { - return myTable->GetObjectEntry(); -} -/*! - Called from engine to restore curve from the file -*/ -VISU::Storable* VISU::Curve_i::Restore(SALOMEDS::SObject_ptr theSObject, - const string& thePrefix, const Storable::TRestoringMap& theMap) -{ - SALOMEDS::Study_var aStudy = theSObject->GetStudy(); - VISU::Table_i* pTable = GetTable(aStudy, theSObject->GetFather()); - if( pTable != NULL ) { - VISU::Curve_i* pResent = new VISU::Curve_i( aStudy, pTable, 0, 0 ); - return pResent->Restore( theMap, theSObject); - } - return NULL; -} - -void VISU::Curve_i::RemoveFromStudy() -{ - VISU::DeleteActors(this); - VISU::RemoveFromStudy(mySObj,false); -} - -SALOMEDS::SObject_var VISU::Curve_i::GetSObject() -{ - return mySObj; -} - -//---------------------------------------------------------------- -// Container Object -//---------------------------------------------------------------- -int VISU::Container_i::myNbPresent = 0; -const string VISU::Container_i::myComment = "CONTAINER"; -/*! - Generate unique name -*/ -const char* VISU::Container_i::GenerateName() -{ - return VISU::GenerateName( "Plot2DView", ++myNbPresent ); -} -/*! - Gets comment string -*/ -const char* VISU::Container_i::GetComment() const -{ - return myComment.c_str(); -} -/*! - Constructor -*/ -VISU::Container_i::Container_i( SALOMEDS::Study_ptr theStudy ) - : PrsObject_i( theStudy ) -{ -} -/*! - Destructor -*/ -VISU::Container_i::~Container_i() -{ - MESSAGE("Container_i::~Container_i"); - myCurves.clear(); -} -/*! - Inserts curve into the container -*/ -void VISU::Container_i::AddCurve( Curve_ptr theCurve ) -{ - if ( myStudy->_is_nil() ) - return; - SALOMEDS::SObject_var mySO = myStudy->FindObjectID( GetEntry() ); - if ( mySO->_is_nil() ) - return; - PortableServer::POA_ptr aPOA = GetPOA(); - Curve_i* pCurve = dynamic_cast( aPOA->reference_to_servant( theCurve ) ); - if( pCurve ) { - QString entry = pCurve->GetEntry(); - SALOMEDS::SObject_var SO = myStudy->FindObjectID( entry.latin1() ); - if ( !SO->_is_nil() && myCurves.find( entry ) == myCurves.end() ) { - myCurves.append( entry ); - SALOMEDS::StudyBuilder_var Builder = myStudy->NewBuilder(); - SALOMEDS::SObject_var newSO = Builder->NewObject( mySO ); - Builder->Addreference( newSO, SO ); - } - } -} -/*! - Removes curve from the container -*/ -void VISU::Container_i::RemoveCurve( Curve_ptr theCurve ) -{ - if ( myStudy->_is_nil() ) - return; - SALOMEDS::SObject_var mySO = myStudy->FindObjectID( GetEntry() ); - if ( mySO->_is_nil() ) - return; - PortableServer::POA_ptr aPOA = GetPOA(); - Curve_i* pCurve = dynamic_cast( aPOA->reference_to_servant( theCurve ) ); - if( pCurve ) { - QString entry = pCurve->GetEntry(); - if ( myCurves.find( entry ) != myCurves.end() ) { - // found !!! - myCurves.remove( entry ); - SALOMEDS::StudyBuilder_var Builder = myStudy->NewBuilder(); - SALOMEDS::ChildIterator_var CI = myStudy->NewChildIterator( mySO ); - for ( ; CI->More(); CI->Next() ) { - SALOMEDS::SObject_var childSO = CI->Value(); - SALOMEDS::SObject_var refSO; - if ( childSO->ReferencedObject( refSO ) && !refSO->_is_nil() && entry == QString( refSO->GetID() ) ) { - Builder->RemoveObject( childSO ); - } - } - } - } -} -/*! - Gets number of curves in the container -*/ -CORBA::Long VISU::Container_i::GetNbCurves() -{ - Update(); - return myCurves.count(); -} -/*! - Clears container -*/ -void VISU::Container_i::Clear() -{ - if ( myStudy->_is_nil() ) - return; - SALOMEDS::SObject_var mySO = myStudy->FindObjectID( GetEntry() ); - if ( mySO->_is_nil() ) - return; - QStringList toDelete; - SALOMEDS::ChildIterator_var CI = myStudy->NewChildIterator( mySO ); - for ( ; CI->More(); CI->Next() ) { - toDelete.append( CI->Value()->GetID() ); - } - SALOMEDS::StudyBuilder_var Builder = myStudy->NewBuilder(); - for ( int i = 0; i < toDelete.count(); i++ ) { - SALOMEDS::SObject_var SO = myStudy->FindObjectID( toDelete[i].latin1() ); - Builder->RemoveObject( SO ); - } - myCurves.clear(); -} -/*! - Creates container object -*/ -VISU::Storable* VISU::Container_i::Create() -{ - // generate name ... - myName = GenerateName(); - // ... and build the object - return Build( false ); -} -/*! - Builds presentation of container -*/ -VISU::Storable* VISU::Container_i::Build( int theRestoring ) -{ - if ( !theRestoring ) { - // looking for component - SALOMEDS::SComponent_var SComponent = VISU::FindOrCreateVisuComponent( myStudy ); - // create SObject and set attributes - QString aComment; - aComment.sprintf("myComment=%s;myType=%d",GetComment(),VISU::TCONTAINER); - string anEntry = CreateAttributes( myStudy, - SComponent->GetID(), - "", - GetID(), - GetName(), - "", - aComment.latin1(), - true ); - mySObj = SALOMEDS::SObject::_duplicate(myStudy->FindObjectID(anEntry.c_str())); - } - return this; -} -/*! - Updates presentation of container -*/ -void VISU::Container_i::Update() -{ - if ( myStudy->_is_nil() ) - return; - SALOMEDS::StudyBuilder_var Builder = myStudy->NewBuilder(); - SALOMEDS::SObject_var mySO = myStudy->FindObjectID( GetEntry() ); - SALOMEDS::GenericAttribute_var anAttr; - if ( !mySO->_is_nil() ) { - QStringList toDelete; - int i; - for ( i = 0; i < myCurves.count(); i++ ) { - SALOMEDS::SObject_var SO = myStudy->FindObjectID( myCurves[i].latin1() ); - if ( !SO->_is_nil() && Builder->FindAttribute( SO, anAttr, "AttributeIOR" ) ) { - // if real Curve Object still exists - SALOMEDS::ChildIterator_var CI = myStudy->NewChildIterator( mySO ); - bool bFound = false; - for ( ; CI->More(); CI->Next() ) { - SALOMEDS::SObject_var childSO = CI->Value(); - SALOMEDS::SObject_var refSO; - if ( childSO->ReferencedObject( refSO ) && !refSO->_is_nil() && myCurves[i] == QString( refSO->GetID() ) ) { - bFound = true; break; - } - } - if (! bFound ) { - // create SObject referenced to real curve object if is not yet added - SALOMEDS::SObject_var newSO = Builder->NewObject( mySO ); - Builder->Addreference( newSO, SO ); - } - } - else { - // real Curve Object doesn't exist (might be removed) - toDelete.append( myCurves[i] ); - } - } - for ( i = 0; i < toDelete.count(); i++ ) { - myCurves.remove( toDelete[i] ); - } - toDelete.clear(); - SALOMEDS::ChildIterator_var CI = myStudy->NewChildIterator( mySO ); - for ( ; CI->More(); CI->Next() ) { - SALOMEDS::SObject_var childSO = CI->Value(); - SALOMEDS::SObject_var refSO; - if ( childSO->ReferencedObject( refSO ) && ( refSO->_is_nil() || !Builder->FindAttribute( refSO, anAttr, "AttributeIOR" ) || - myCurves.find( refSO->GetID() ) == myCurves.end() ) ) { - toDelete.append( childSO->GetID() ); - } - } - for ( i = 0; i < toDelete.count(); i++ ) { - SALOMEDS::ChildIterator_var CI = myStudy->NewChildIterator( mySO ); - for ( ; CI->More(); CI->Next() ) { - SALOMEDS::SObject_var childSO = CI->Value(); - if ( toDelete[i] == CI->Value()->GetID() ) { - Builder->RemoveObject( childSO ); - } - } - } - } -} -/*! - Gets curve from container by index - NB : curves are numbered from 1 -*/ -VISU::Curve_i* VISU::Container_i::GetCurve( CORBA::Long theIndex ) -{ - if ( theIndex > 0 && theIndex <= myCurves.count() ) { - SALOMEDS::StudyBuilder_var Builder = myStudy->NewBuilder(); - SALOMEDS::GenericAttribute_var anAttr; - SALOMEDS::SObject_var SO = myStudy->FindObjectID( myCurves[ theIndex-1 ].latin1() ); - CORBA::Object_var anObject = VISU::SObjectToObject( SO ); - if( !CORBA::is_nil( anObject ) ) { - // if real Curve Object exists - CORBA::Object_ptr aCurve = VISU::Curve::_narrow( anObject ); - if( !CORBA::is_nil( aCurve ) ) - return dynamic_cast(VISU::GetServant(aCurve).in()); - } - } - return NULL; -} -/*! - Restores container data from the stream -*/ -VISU::Storable* VISU::Container_i::Restore( const Storable::TRestoringMap& theMap, SALOMEDS::SObject_ptr SO ) -{ - if(MYDEBUG) MESSAGE(GetComment()); - mySObj = SALOMEDS::SObject::_duplicate(SO); - myName = VISU::Storable::FindValue( theMap, "myName" ).latin1(); - QString val = VISU::Storable::FindValue( theMap, "myCurves" ); - myCurves = QStringList::split( QString( "*" ), val, false ); - return Build( true ); -} -/*! - Flushes container data into the stream -*/ -void VISU::Container_i::ToStream( std::ostringstream& theStr ) -{ - Storable::DataToStream( theStr, "myName", myName.c_str() ); - Storable::DataToStream( theStr, "myCurves", myCurves.join( QString( "*" ) ) ); -// theStr<<" myName "<GetStudy(); - VISU::Container_i* pResent = new VISU::Container_i( aStudy ); - return pResent->Restore( theMap, theSObject ); -} - -void VISU::Container_i::RemoveFromStudy() -{ - VISU::RemoveFromStudy(mySObj,false); -} - -//------------------------------------------------------------- -// Implementation of reading from file -//------------------------------------------------------------- -typedef string TValue; -typedef vector TValues; - -struct TRow{ - string myTitle; - string myUnit; - TValues myValues; -}; - -typedef vector TRows; - -struct TTable2D { - string myTitle; - vector myColumnUnits; - vector myColumnTitles; - TRows myRows; - int Check(){ - if(myRows.empty()) return 0; - int iEnd = myRows[0].myValues.size(); - if(iEnd == 0) return 0; - if(myColumnTitles.size() != iEnd) myColumnTitles.resize(iEnd); - if(myColumnUnits.size() != iEnd) myColumnUnits.resize(iEnd); - int jEnd = myRows.size(); - for(int j = 0; j < jEnd; j++) - if(myRows[j].myValues.size() != iEnd) - return 0; - return 1; - } - void getColumns(TTable2D& theTable2D) const { - TRows& aRows = theTable2D.myRows; - aRows.clear(); - if(myRows.empty()) return; - int jEnd = myRows.size(); - //Define Titles & Units - theTable2D.myColumnTitles.resize(jEnd); - theTable2D.myColumnUnits.resize(jEnd); - for(int j = 0; j < jEnd; j++){ - theTable2D.myColumnTitles[j] = myRows[j].myTitle; - theTable2D.myColumnUnits[j] = myRows[j].myUnit; - } - //Define Rows - int iEnd = myRows[0].myValues.size(); - for(int i = 0; i < iEnd; i++){ - TRow aNewRow; - aNewRow.myTitle = myColumnTitles[i]; - aNewRow.myUnit = myColumnUnits[i]; - aNewRow.myValues.resize(jEnd); - for(int j = 0; j < jEnd; j++){ - aNewRow.myValues[j] = myRows[j].myValues[i]; - } - aRows.push_back(aNewRow); - } - } -}; - -typedef vector TTableCont; - -int getLine(ifstream& theStmIn, QString& theString){ - char tmp; - ostrstream aStrOut; - while(theStmIn.get(tmp)){ - aStrOut<= 0 ) { - data = aTmp.left( index ).stripWhiteSpace(); - cmt = aTmp.mid( index+1 ).stripWhiteSpace(); - } - // if comment is not empty, try to get keyword from it (separated by ':' symbol) - if ( !cmt.isEmpty() ) { - int index1 = cmt.find( ":" ); - if ( index1 >= 0 ) { - QString tmpstr = cmt.left( index1 ).stripWhiteSpace(); - if ( tmpstr == QString( "TITLE" ) || - tmpstr == QString( "COLUMN_TITLES" ) || - tmpstr == QString( "COLUMN_UNITS" ) || - tmpstr == QString( "COMMENT" ) ) { - keyword = tmpstr; - cmt = cmt.mid( index1+1 ).stripWhiteSpace(); - } - } - } - // if data is empty, process only comment - if ( data.isEmpty() ) { - // if keyword is found, try to process it - // elsewise it is a simple comment, just ignore it - if ( !keyword.isEmpty() ) { - if ( keyword == QString( "TITLE" ) ) { - QString title = cmt; - if ( aTable2D.myTitle != "" ) - title = QString( aTable2D.myTitle.c_str() ) + QString( " " ) + title; - if(MYDEBUG) cout << "...Table TITLE is: " << title.latin1() << endl; - aTable2D.myTitle = title.latin1(); - } - else if ( keyword == QString( "COLUMN_TITLES" ) ) { - // comment may contain column headers - QStringList aStrList = QStringList::split( "|", cmt ); - if(MYDEBUG) cout << "...Column TITLES are: "; - for ( int i = 0; i < aStrList.count(); i++ ) { - QString tmpstr = aStrList[ i ].stripWhiteSpace(); - if(MYDEBUG) cout << tmpstr.latin1() << " "; - aTable2D.myColumnTitles.push_back( tmpstr.latin1() ); - } - if(MYDEBUG) cout << endl; - } - else if ( keyword == QString( "COLUMN_UNITS" ) ) { - // comment may contain column units - QStringList aStrList = QStringList::split( " ", cmt ); - if(MYDEBUG) cout << "...Column UNITS are: "; - for ( int i = 0; i < aStrList.count(); i++ ) { - QString tmpstr = aStrList[ i ].stripWhiteSpace(); - if(MYDEBUG) cout << tmpstr.latin1() << " "; - aTable2D.myColumnUnits.push_back( tmpstr.latin1() ); - } - if(MYDEBUG) cout << endl; - } - else if ( keyword == QString( "COMMENT" ) ) { - // keyword 'COMMENT' processing can be here - // currently it is ignored - if(MYDEBUG) cout << "...COMMENT: " << cmt.latin1() << endl; - } - } - else { - if(MYDEBUG) cout << "...comment: " << cmt.latin1() << endl; - // simple comment processing can be here - // currently it is ignored - } - } - // if data is not empty, try to process it - else { - TRow aRow; - if(MYDEBUG) cout << "...New row is found: " << endl; - if ( !cmt.isEmpty() ) { - aRow.myTitle = cmt.latin1(); - if(MYDEBUG) cout << "......ROW TITLE is: " << cmt.latin1() << endl; - } - QStringList aValList = QStringList::split( " ", data ); - for ( int i = 0; i < aValList.count(); i++ ) { - if ( aValList[i].stripWhiteSpace() != "" ) { - TValue aVal = aValList[i].stripWhiteSpace().latin1(); - aRow.myValues.push_back( aVal ); - } - } - if( aRow.myValues.size() > 0 ) - aTable2D.myRows.push_back( aRow ); - // ************** OLD CODE ****************** - /* - TValue aVal; - istrstream aStream( data ); - aStream.precision( STRPRECISION ); - while( aStream >> aVal ) { - aRow.myValues.push_back( aVal ); - } - if( aRow.myValues.size() > 0 ) - aTable2D.myRows.push_back( aRow ); - */ - // ************** OLD CODE ****************** - } - getLine( aStmIn, aTmp ); - } - if( aTable2D.Check() ) { - if(MYDEBUG) cout << "aTable2D is checked OK " << aTable2D.myTitle << endl; - theTableCont.push_back( aTable2D ); - } - } - while( !aStmIn.eof() ); - aStmIn.close(); - if(MYDEBUG) cout << "After close" << endl; -} - -SALOMEDS::SObject_var VISU::ImportTables(const char* theFileName, SALOMEDS::Study_ptr theStudy){ - TTableCont aTableCont; - ImportTables(theFileName,aTableCont); - if(aTableCont.empty()) return SALOMEDS::SObject::_nil(); - SALOMEDS::StudyBuilder_var aStudyBuilder = theStudy->NewBuilder(); - SALOMEDS::SComponent_var theSComponent = VISU::FindOrCreateVisuComponent(theStudy); - SALOMEDS::SObject_var aFileObject = aStudyBuilder->NewObject(theSComponent); - SALOMEDS::GenericAttribute_var anAttr = - aStudyBuilder->FindOrCreateAttribute(aFileObject, "AttributeName"); - SALOMEDS::AttributeName_var aName = SALOMEDS::AttributeName::_narrow(anAttr); - QFileInfo aFileInfo(theFileName); - aName->SetValue(aFileInfo.fileName().latin1()); - anAttr = aStudyBuilder->FindOrCreateAttribute(aFileObject, "AttributeComment"); - SALOMEDS::AttributeComment_var aComment = SALOMEDS::AttributeComment::_narrow(anAttr); - QString aString; - aString.sprintf("myComment=ImportTables;myFileName=%s", - aFileInfo.absFilePath().latin1()); - aComment->SetValue(aString.latin1()); - for(int i = 0, iEnd = aTableCont.size(); i < iEnd; i++){ - const TTable2D& aTable2D = aTableCont[i]; - SALOMEDS::SObject_var aRealObject = aStudyBuilder->NewObject(aFileObject); - anAttr = aStudyBuilder->FindOrCreateAttribute(aRealObject, "AttributeName"); - aName = SALOMEDS::AttributeName::_narrow(anAttr); - if(MYDEBUG) cout<<"aTable2D.myTitle = "<SetValue(aTable2D.myTitle.c_str()); - else{ - QString aNewName; - aNewName.sprintf("Table:%d",i); - aName->SetValue(aNewName.latin1()); - } - anAttr = aStudyBuilder->FindOrCreateAttribute(aRealObject, "AttributeTableOfReal"); - SALOMEDS::AttributeTableOfReal_var aTableOfReal = SALOMEDS::AttributeTableOfReal::_narrow(anAttr); - aTableOfReal->SetTitle(aTable2D.myTitle.c_str()); - TTable2D aNewTable2D; - aTable2D.getColumns(aNewTable2D); - int kEnd = aNewTable2D.myRows[0].myValues.size(); - aTableOfReal->SetNbColumns(kEnd); - for(int j = 0, jEnd = aNewTable2D.myRows.size(); j < jEnd; j++){ - if(MYDEBUG) cout<<"j = "<PutValue(aValue,j+1,k+1); - } - - aTableOfReal->SetRowTitle(j+1,aNewTable2D.myRows[j].myTitle.c_str()); - aTableOfReal->SetRowUnit(j+1,aNewTable2D.myRows[j].myUnit.c_str()); - } - for(int k = 0; k < kEnd; k++) - aTableOfReal->SetColumnTitle(k+1,aNewTable2D.myColumnTitles[k].c_str()); - } - return aFileObject; -} - -template bool ExportTableToFile(const TTableAttr& aTabAttr, - const char* theFileName) -{ - if (!CORBA::is_nil(aTabAttr)) { - QFile aFile(theFileName); - aFile.open(IO_WriteOnly); - - /* extract the tabe info and write it into file */ - - QString aTitle(aTabAttr->GetTitle()); /*Table title*/ - int aRowsNb = aTabAttr->GetNbRows(); - int aColNb = aTabAttr->GetNbColumns(); - - SALOMEDS::StringSeq_var aRowTitles = aTabAttr->GetRowTitles(); - QString anAbscissTitle(aRowTitles[0]); /*Absciss row title (X coord)*/ - anAbscissTitle.stripWhiteSpace(); - - SALOMEDS::StringSeq_var aRowUnits = aTabAttr->GetRowUnits(); - QString anAbscissUnit(aRowUnits[0]); - anAbscissUnit.stripWhiteSpace(); - - SALOMEDS::StringSeq_var aColumnTitles = aTabAttr->GetColumnTitles(); - if (aRowsNb > 2 && aTitle.length() ) aTitle = aTitle + " - "; - - QString aLine; - for (int i = 2; i <= aRowsNb; i++ ) - { - /* TITLE */ - QString anOrdinate(aRowTitles[i-1]), aTail; - anOrdinate.stripWhiteSpace(); - - aLine = "#TITLE: " + aTitle + - ((anOrdinate.length())? anOrdinate : - (aRowsNb>2)? aTail.sprintf("%d",i-1) : aTail.sprintf("") ) + "\n"; - aFile.writeBlock(aLine, aLine.length() ); - - /* COLUMN_TITLES */ - if ( anAbscissTitle.length() || anOrdinate.length() ) { - aLine = "#COLUMN_TITLES: " + anAbscissTitle + " | " + anOrdinate + "\n"; - aFile.writeBlock(aLine, aLine.length() ); - } - - /* COLUMN_UNITS */ - aLine = anAbscissUnit + " " +aRowUnits[i-1]; - if (!aLine.stripWhiteSpace().isEmpty()) { - aLine = "#COLUMN_UNITS: " + aLine + "\n"; - aFile.writeBlock(aLine, aLine.length() ); - } - - /* CURVE COORDINATES */ - for (int j = 1; j <= aColNb; j++) - { - if ( aTabAttr -> HasValue(i,j) && aTabAttr -> HasValue(1, j)) { - aLine = aLine.sprintf("%.16g %.16g", - (double)(aTabAttr->GetValue(1,j)), - (double)(aTabAttr->GetValue(i,j))); /* aTabAttr->GetValue(1,j) - X coord */ - if ( !aLine.stripWhiteSpace().isEmpty() ) { - QString aColTitle(aColumnTitles[j-1]); - if ( !aColTitle.stripWhiteSpace().isEmpty() ) - aLine = aLine + " #TITLE: " + aColTitle ; - aFile.writeBlock(aLine + "\n", aLine.length() + 1); - } - } - } - aFile.writeBlock("\n", 1); - } - aFile.close(); - return true; - } - return false; -} - -bool VISU::ExportTableToFile(SALOMEDS::SObject_ptr theTable, const char* theFileName) -{ - //Find table - SALOMEDS::GenericAttribute_var anAttr ; - if (theTable->FindAttribute(anAttr, "AttributeTableOfReal")) - { - SALOMEDS::AttributeTableOfReal_var aTabAttr = SALOMEDS::AttributeTableOfReal ::_narrow(anAttr); - return ExportTableToFile ( aTabAttr , theFileName); - - } - else if (theTable->FindAttribute(anAttr, "AttributeTableOfInteger")) { - - SALOMEDS::AttributeTableOfInteger_var aTabAttr = SALOMEDS::AttributeTableOfInteger ::_narrow(anAttr); - return ExportTableToFile ( aTabAttr , theFileName); - - } - return false; -} diff --git a/src/VISU_I/VISU_Table_i.hh b/src/VISU_I/VISU_Table_i.hh deleted file mode 100644 index ed911dcf..00000000 --- a/src/VISU_I/VISU_Table_i.hh +++ /dev/null @@ -1,206 +0,0 @@ -// VISU OBJECT : interactive object for VISU entities implementation -// -// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org -// -// -// File : VISU_Table_i.hh -// Author : Vadim SANDLER -// Module : VISU - -#ifndef VISU_Table_i_HeaderFile -#define VISU_Table_i_HeaderFile - -#include "VISU_PrsObject_i.hh" - -#include - -class SPlot2d_Curve; - -namespace VISU{ - //============================================================================== - class Table_i : public virtual POA_VISU::Table, - public virtual PrsObject_i - { - static int myNbPresent; - Table_i(); - Table_i( const Table_i& ); - public: - Table_i( SALOMEDS::Study_ptr theStudy, const char* theObject ); - virtual ~Table_i(); - virtual VISU::VISUType GetType() { return VISU::TTABLE;}; - - virtual void SetTitle( const char* theName ) { SetName( theName ); } - virtual char* GetTitle() { return CORBA::string_dup( GetName() ); } - - virtual void SetOrientation( VISU::Table::Orientation theOrientation ) { myOrientation = theOrientation; } - virtual VISU::Table::Orientation GetOrientation() { return myOrientation; } - - virtual CORBA::Long GetNbRows(); - virtual CORBA::Long GetNbColumns(); - - virtual void RemoveFromStudy(); - - protected: - Storable* Build(int theRestoring); - - protected: - VISU::Table::Orientation myOrientation; - std::string myTitle; - SALOMEDS::SObject_var mySObj; - - public: - virtual Storable* Create(); - SALOMEDS::SObject_var GetSObject() const { return mySObj;} - - virtual Storable* Restore( const Storable::TRestoringMap& theMap, SALOMEDS::SObject_ptr SO); - static Storable* Restore(SALOMEDS::SObject_ptr theSObject, - const std::string& thePrefix, - const Storable::TRestoringMap& theMap); - virtual void ToStream( std::ostringstream& theStr ); - static const std::string myComment; - virtual const char* GetComment() const; - virtual const char* GenerateName(); - virtual const char* GetTableTitle(); - - virtual char* GetObjectEntry() { return CORBA::string_dup( mySObj->GetID() ); } - }; - SALOMEDS::SObject_var ImportTables(const char* theFileName, SALOMEDS::Study_ptr theStudy); - bool ExportTableToFile(SALOMEDS::SObject_ptr theTable, const char* theFileName); - //============================================================================== - class Curve_i : public virtual POA_VISU::Curve, - public virtual PrsObject_i - { - static int myNbPresent; - Curve_i(); - Curve_i( const Curve_i& ); - public: - Curve_i( SALOMEDS::Study_ptr theStudy, Table_i* theTable, CORBA::Long theHRow, CORBA::Long theVRow ); - virtual ~Curve_i(); - virtual VISU::VISUType GetType() { return VISU::TCURVE;}; - - virtual void SetTitle( const char* theName ) { SetName( theName ); } - virtual char* GetTitle() { return CORBA::string_dup( GetName() ); } - - virtual void SetColor( const SALOMEDS::Color& theColor ) { myColor = theColor; myAuto = false; } - virtual SALOMEDS::Color GetColor() { return myColor; } - - virtual void SetMarker( VISU::Curve::MarkerType theType ) { myMarker = theType; myAuto = false; } - virtual VISU::Curve::MarkerType GetMarker() { return myMarker; } - - virtual void SetLine( VISU::Curve::LineType theType, CORBA::Long theWidth ) - { myLine = theType; myLineWidth = theWidth; myAuto = false; } - virtual VISU::Curve::LineType GetLine() { return myLine; } - virtual CORBA::Long GetLineWidth() { return myLineWidth; } - - virtual void RemoveFromStudy(); - - virtual SALOMEDS::SObject_var GetSObject(); - - protected: - Storable* Build(int theRestoring); - - protected: - Table_i* myTable; - int myHRow; - int myVRow; - struct SALOMEDS::Color myColor; - VISU::Curve::MarkerType myMarker; - VISU::Curve::LineType myLine; - int myLineWidth; - std::string myTitle; - bool myAuto; - SALOMEDS::SObject_var mySObj; - - public: - virtual Storable* Create(); - - int GetHRow() const { return myHRow;} - int GetVRow() const { return myVRow;} - - virtual Storable* Restore( const Storable::TRestoringMap& theMap, SALOMEDS::SObject_ptr theSO); - - static Storable* Restore(SALOMEDS::SObject_ptr theSObject, - const std::string& thePrefix, - const Storable::TRestoringMap& theMap); - - virtual void ToStream( std::ostringstream& theStr ); - static const std::string myComment; - virtual const char* GetComment() const; - virtual const char* GenerateName(); - virtual const char* GetTableID(); - - virtual CORBA::Boolean IsAuto() { return myAuto; } - virtual CORBA::Boolean IsValid(); - virtual std::string GetHorTitle(); - virtual std::string GetVerTitle(); - virtual std::string GetHorUnits(); - virtual std::string GetVerUnits(); - virtual int GetData( double*& theHorList, double*& theVerList ); - - virtual SPlot2d_Curve* CreatePresentation(); - }; - - //============================================================================== - class Container_i : public virtual POA_VISU::Container, - public virtual PrsObject_i - { - static int myNbPresent; - Container_i(); - Container_i( const Container_i& ); - public: - Container_i(SALOMEDS::Study_ptr theStudy); - virtual ~Container_i(); - virtual VISU::VISUType GetType() { return VISU::TCONTAINER;}; - - virtual void AddCurve( Curve_ptr theCurve ); - virtual void RemoveCurve( Curve_ptr theCurve ); - - virtual CORBA::Long GetNbCurves(); - virtual void Clear(); - - virtual void RemoveFromStudy(); - - protected: - Storable* Build(int theRestoring); - - protected: - QStringList myCurves; - SALOMEDS::SObject_var mySObj; - - public: - virtual Storable* Create(); - virtual Storable* Restore( const Storable::TRestoringMap& theMap, SALOMEDS::SObject_ptr SO ); - - static Storable* Restore(SALOMEDS::SObject_ptr theSObject, - const std::string& thePrefix, - const Storable::TRestoringMap& theMap); - - virtual void ToStream( std::ostringstream& theStr ); - static const std::string myComment; - virtual const char* GetComment() const; - virtual const char* GenerateName(); - - void Update(); - VISU::Curve_i* GetCurve( CORBA::Long theIndex ); - - }; -} - -#endif diff --git a/src/VISU_I/VISU_TimeAnimation.h b/src/VISU_I/VISU_TimeAnimation.h deleted file mode 100644 index 26cc764c..00000000 --- a/src/VISU_I/VISU_TimeAnimation.h +++ /dev/null @@ -1,218 +0,0 @@ -// Copyright (C) 2003 CEA/DEN, EDF R&D -// -// -// -// File : VISU_TimeAnimation.h -// Author : Vitaly SMETANNIKOV -// Module : VISU - -#ifndef VISU_TIMEANIMATION_H -#define VISU_TIMEANIMATION_H - -#include "VISUConfig.hh" - -#include - -#include -#include -#include - -class SVTK_ViewWindow; -class VISU_Actor; - -namespace VISU{ - class Result_i; - class ScalarMap_i; -} - -struct FieldData -{ - VISU::VISUType myPrsType; - _PTR(SObject) myField; // field label - long myNbTimes; // number of Timestamps - long myNbFrames; // number of created Frames - std::vector myPrs; // Presentations - std::vector myActors; // Actors - std::vector myTiming; // time values - float myOffset[3]; -}; - - -class VISU_TimeAnimation: public QObject, public QThread -{ - Q_OBJECT; - public: - //static VISU::Result_i* createPresent (SALOMEDS::SObject_var theField); - //static VISU::Storable::TRestoringMap getMapOfValue (SALOMEDS::SObject_var theSObject); - //static double getTimeValue (SALOMEDS::SObject_var theTimestamp); - - static VISU::Result_i* createPresent (_PTR(SObject) theField); - static VISU::Storable::TRestoringMap getMapOfValue (_PTR(SObject) theSObject); - static double getTimeValue (_PTR(SObject) theTimestamp); - - VISU_TimeAnimation(_PTR(Study) theStudy, - VISU::View3D_ptr theView3D = VISU::View3D::_nil()); - ~VISU_TimeAnimation(); - - virtual VISU::VISUType GetType() { return VISU::TNONE;}; - - void addField (_PTR(SObject) theField); - void addField (SALOMEDS::SObject_ptr theField); - FieldData& getFieldData (int theNum) { return myFieldsLst[theNum]; } - - CORBA::Boolean generateFrames(); - void generatePresentations(CORBA::Long theFieldNum); - void setViewer(SVTK_ViewWindow* theView) { myView = theView; } - SVTK_ViewWindow* getViewer() { return myView; } - void clearView(); - void clearData(FieldData& theData); - - void stopAnimation(); - void startAnimation(); - void nextFrame(); - void prevFrame(); - void firstFrame(); - void lastFrame(); - void gotoFrame(CORBA::Long theFrame); - - CORBA::Long getNbFields() { return myFieldsLst.size(); } - CORBA::Long getNbFrames(); - CORBA::Boolean isRunning() { return myIsActive; } - CORBA::Long getCurrentFrame() { return myFrame; } - - VISU::ScalarMap_ptr getPresentation(CORBA::Long theField, CORBA::Long theFrame); - - void setPresentationType(CORBA::Long theFieldNum, VISU::VISUType theType) - { myFieldsLst[theFieldNum].myPrsType = theType; } - VISU::VISUType getPresentationType(CORBA::Long theFieldNum) - { return myFieldsLst[theFieldNum].myPrsType; } - - void setSpeed(CORBA::Long theSpeed); - CORBA::Long getSpeed() { return mySpeed; } - - CORBA::Boolean isProportional() { return myProportional; } - - void setAnimationRange(CORBA::Double theMin, CORBA::Double theMax) - { myMaxVal = theMax; myMinVal = theMin; } - - CORBA::Double getMinRange() { return myMinVal; } - CORBA::Double getMaxRange() { return myMaxVal; } - CORBA::Boolean isRangeDefined() { return !((myMaxVal==0) && (myMinVal == myMaxVal)); } - - void dumpTo(const char* thePath) { myDumpPath = thePath; } - - QString getLastErrorMsg() { return myLastError; } - - CORBA::Boolean isCycling() { return myCycling; } - - CORBA::Double getMinTime() { return myTimeMin;} - CORBA::Double getMaxTime() { return myTimeMax;} - - void setProportional(CORBA::Boolean theProp) { myProportional = theProp; } - void setCycling(CORBA::Boolean theCycle) { myCycling = theCycle; } - - SALOMEDS::SObject_ptr publishInStudy(); - void restoreFromStudy(SALOMEDS::SObject_ptr theField); - void restoreFromStudy(_PTR(SObject) theField); - void saveAnimation(); - bool isSavedInStudy() const { return !myAnimEntry.isEmpty(); } - - public slots: - void setProportionalSlot(bool theProp) { myProportional = theProp; } - void setCyclingSlot(bool theCycle) { myCycling = theCycle; } - - signals: - void frameChanged(long theNewFrame, double theTime); - void stopped(); - - protected: - void run(); - QString GenerateName(); - - private: - QString myLastError; - - QValueList myFieldsLst; - bool myIsActive; - long myFrame; - int mySpeed; - bool myProportional; - bool myCycling; - _PTR(Study) myStudy; - - double myMaxVal, myMinVal; - double myTimeMin, myTimeMax; - QString myDumpPath; - SVTK_ViewWindow* myView; - - QString myAnimEntry; - - static int myNBAnimations; -}; - - -class VISU_TimeAnimation_i: public virtual POA_VISU::Animation, - public virtual VISU::Base_i -{ - VISU_TimeAnimation* myAnim; -public: - VISU_TimeAnimation_i(SALOMEDS::Study_ptr theStudy, - VISU::View3D_ptr theView3D = VISU::View3D::_nil()); - ~VISU_TimeAnimation_i(); - - virtual VISU::VISUType GetType() { return VISU::TANIMATION; } - //virtual VISU::VISUType GetType() { return VISU::TNONE; } - - virtual void addField(SALOMEDS::SObject_ptr theField); - - virtual CORBA::Boolean generateFrames(); - virtual void generatePresentations(CORBA::Long theFieldNum); - - virtual void clearView(); - - virtual void stopAnimation(); - virtual void startAnimation(); - virtual void nextFrame(); - virtual void prevFrame(); - virtual void firstFrame(); - virtual void lastFrame(); - virtual void gotoFrame(CORBA::Long theFrame); - - virtual CORBA::Long getNbFields(); - virtual CORBA::Long getNbFrames(); - virtual CORBA::Boolean isRunning(); - virtual CORBA::Long getCurrentFrame(); - - virtual VISU::ScalarMap_ptr getPresentation(CORBA::Long theField, CORBA::Long theFrame); - - virtual void setPresentationType(CORBA::Long theFieldNum, VISU::VISUType theType); - virtual VISU::VISUType getPresentationType(CORBA::Long theFieldNum); - - virtual void setSpeed(CORBA::Long theSpeed); - virtual CORBA::Long getSpeed(); - - virtual CORBA::Boolean isProportional(); - - virtual void setAnimationRange(CORBA::Double theMin, CORBA::Double theMax); - - virtual CORBA::Double getMinRange(); - virtual CORBA::Double getMaxRange(); - virtual CORBA::Boolean isRangeDefined(); - - virtual void dumpTo(const char* thePath); - - virtual CORBA::Boolean isCycling(); - - virtual CORBA::Double getMinTime(); - virtual CORBA::Double getMaxTime(); - - virtual void setProportional(CORBA::Boolean theProp); - virtual void setCycling(CORBA::Boolean theCycle); - - virtual SALOMEDS::SObject_ptr publishInStudy(); - virtual void restoreFromStudy(SALOMEDS::SObject_ptr theField); - virtual CORBA::Boolean isSavedInStudy(); - virtual void saveAnimation(); -}; - -#endif //VISU_TIMEANIMATION_H diff --git a/src/VISU_I/VISU_ViewManager_i.hh b/src/VISU_I/VISU_ViewManager_i.hh deleted file mode 100644 index 5fa7284a..00000000 --- a/src/VISU_I/VISU_ViewManager_i.hh +++ /dev/null @@ -1,83 +0,0 @@ -// VISU OBJECT : interactive object for VISU entities implementation -// -// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org -// -// -// File : VISU_ViewManager_i.hh -// Author : Alexey PETROV -// Module : VISU - -#ifndef VISU_ViewManager_i_HeaderFile -#define VISU_ViewManager_i_HeaderFile - -#include "VISUConfig.hh" - -class SalomeApp_Application; - -class VISU_Actor; - -class SUIT_ViewWindow; - -class SVTK_ViewWindow; -class Plot2d_ViewFrame; - -class vtkRenderer; -class vtkCamera; - - -namespace VISU { - class Prs3d_i; - class Curve_i; - - class ViewManager_i : public virtual POA_VISU::ViewManager, - public virtual Base_i - { - public: - ViewManager_i(SALOMEDS::Study_ptr theStudy); - virtual ~ViewManager_i(); - virtual VISU::VISUType GetType() { return VISU::TVIEWMANAGER;}; - - virtual View3D_ptr Create3DView(); - virtual View_ptr GetCurrentView(); - virtual TableView_ptr CreateTableView(VISU::Table_ptr theTable); - virtual XYPlot_ptr CreateXYPlot(); - virtual void Destroy(View_ptr theView); - - protected: - SalomeApp_Application *myApplication; - }; - - SVTK_ViewWindow* GetViewWindow (SUIT_ViewWindow* theStudyFrame); - vtkRenderer* GetRenderer (SUIT_ViewWindow* theStudyFrame); - vtkCamera* GetCamera (SUIT_ViewWindow* theStudyFrame); - - void RepaintView (SUIT_ViewWindow* theStudyFrame); - - enum Displaing {eDisplayAll, eDisplay, eDisplayOnly, eErase, eEraseAll}; - VISU_Actor* UpdateViewer (SUIT_ViewWindow* theStudyFrame, int theDisplaing, Prs3d_i* thePrs = NULL); - void UpdatePlot2d (Plot2d_ViewFrame *theView, int theDisplaying, Curve_i* theCurve); - - VISU_Actor* GetActor (VISU::Prs3d_i* thePrs, SVTK_ViewWindow* theViewWindow); - - void DeleteActors (VISU::Prs3d_i* thePrs); - void DeleteActors (VISU::Curve_i* thePrs); -} - -#endif diff --git a/src/VISU_SWIG/VISU_Gen_s.hh b/src/VISU_SWIG/VISU_Gen_s.hh deleted file mode 100644 index ecb0c3d0..00000000 --- a/src/VISU_SWIG/VISU_Gen_s.hh +++ /dev/null @@ -1,67 +0,0 @@ -// VISU OBJECT : interactive object for VISU entities implementation -// -// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org -// -// -// File : VISU_Gen_s.hh -// Author : Alexey PETROV -// Module : VISU - -#ifndef __VISU_VISU_Gen_s_H__ -#define __VISU_VISU_Gen_s_H__ - -class VISU_Convertor; -class Convertor{ - VISU_Convertor* myConvertor; -public: - Convertor() : myConvertor(0) {}; - Convertor(const char* theFileName); - - VISU_Convertor* GetImpl(){ return myConvertor;} -}; - -class VISU_ScalarMapPL; -class ScalarMap{ - VISU_ScalarMapPL* myScalarMap; -public: - ScalarMap() : myScalarMap(0) {}; - ScalarMap(Convertor* theConvertor, const char* theMeshName, int theEntity, - const char* theFieldName, int theIteration); - - VISU_ScalarMapPL* GetImpl(){ return myScalarMap;} -}; - -class vtkRenderer; -class vtkRenderWindow; -class vtkRenderWindowInteractor; -class View3D{ - vtkRenderer *myRen; - vtkRenderWindow *myRenWin; - vtkRenderWindowInteractor *myIRen; -public: - View3D(); - ~View3D(); - - void SetPosition(int theX, int theY); - void Display(ScalarMap* theScalarMap); -}; - - -#endif diff --git a/src/VISU_SWIG/VISU_shared_modules.py b/src/VISU_SWIG/VISU_shared_modules.py deleted file mode 100644 index afd4231f..00000000 --- a/src/VISU_SWIG/VISU_shared_modules.py +++ /dev/null @@ -1,19 +0,0 @@ -""" - -""" - -# force VISU importation at interpretor initialization -# see salome_shared_modules.py -# (avoids incomplete import at run time) - -print "============== import VISU =======================" - -import VISU - -# this function is required - -def init_shared_modules(): - """ - This function initializes shared modules that need to be - """ - pass diff --git a/src/VISU_SWIG/batch_test_events.py b/src/VISU_SWIG/batch_test_events.py deleted file mode 100644 index df7f3c3c..00000000 --- a/src/VISU_SWIG/batch_test_events.py +++ /dev/null @@ -1,14 +0,0 @@ -############################################################### -# -# File : batch_test_events.py -# Description : Test postEvent() functionality for VISU module -# -############################################################### - -import batchmode_visu - -for i in range ( 10 ): - batchmode_visu.myVisu.CreateTestView() - for j in range ( 10 ): - batchmode_visu.myVisu.ShowTestObject(); - diff --git a/src/VISU_SWIG/batchmode_visu.py b/src/VISU_SWIG/batchmode_visu.py deleted file mode 100644 index 559a3eb4..00000000 --- a/src/VISU_SWIG/batchmode_visu.py +++ /dev/null @@ -1,76 +0,0 @@ -# VISU VISU_SWIG : binding of C++ implementation and Python -# -# Copyright (C) 2003 CEA/DEN, EDF R&D -# -# -# -# File : batchmode_visu.py -# Module : VISU - -from batchmode_salome import * -import visu - -myVisu = visu.Initialize(orb,naming_service,lcc,myStudyManager,myStudy,10) -if myVisu is None: - raise RuntimeError, "myVisu is none, VISU component is not loaded or found" - -def try_mesh_parameters(theMeshPattern): - aResult = [] - if theMeshPattern is None : return aResult ; - theMeshPattern = theMeshPattern._narrow(VISU.Mesh) - if theMeshPattern is None : return aResult ; - - aTYPES = [VISU.POINT, VISU.WIREFRAME, VISU.SHADED, VISU.INSIDEFRAME, VISU.SHRINK] - import copy; import os; - for ind in aTYPES: - aNewMesh = copy.deepcopy(theMeshPattern); - aNewMesh.SetPresentationType(ind) - aResult.append(aNewMesh) - - return aResult - -def try_scalarmap_parameters(thePattern, theNum): - aList = [] - if thePattern is None : return aList - thePattern = thePattern._narrow(VISU.ScalarMap) - if thePattern is None : return aList - SCALING = [VISU.LINEAR, VISU.LOGARITHMIC] - import copy - import random - for ind in range(0,theNum): - anObj = copy.deepcopy(thePattern); - if ind%2 : - #try incorrect value deliberately (but allowed by idl description) - #try SetScalarMode(long) - mode = random.randint(-100000,100000); #incorrect value deliberately - else: - #correct value of ScalarMode - mode = random.randint(0, 3) - - print "\tSetScalarMode(" + str(mode) +")" - anObj.SetScalarMode(mode) - - # --- SCALING --- - scal = random.randint(0,1) - print "\tSetScaling(" + str(SCALING[scal]) +")" - anObj.SetScaling(SCALING[scal]) - - # --- BOUNDARIES --- - if ind%2 : - alfa = random.random()*random.randint(-100000,100000) - betta = random.random()*random.randint(-100000,100000) - aMin = alfa; aMax = betta - else: - #more correct set - aPMin = thePattern.GetMin() - aPMax = thePattern.GetMax() - aLen = aPMax - aPMin - alfa = random.random()%0.5 - betta = random.random()%0.5 - aMin = alfa*aLen*random.randint(-1,1) + aPMin - aMax = betta*aLen*random.randint(-1,1) + aPMax - print "\tSetRange(" + str(aMin) + ", " + str(aMax) + ")" - anObj.SetRange(aMin, aMax) - aList.append(anObj) - - return aList diff --git a/src/VISU_SWIG/batchmode_visu_table.py b/src/VISU_SWIG/batchmode_visu_table.py deleted file mode 100644 index aca745d1..00000000 --- a/src/VISU_SWIG/batchmode_visu_table.py +++ /dev/null @@ -1,77 +0,0 @@ -# VISU VISU_SWIG : binding of C++ implementation and Python -# -# Copyright (C) 2003 CEA/DEN, EDF R&D -# -# -# -# File : visu_big_table.py -# Author : Vadim SANDLER -# Module : VISU -# $Header$ - -from batchmode_salome import * -import batchmode_visu -import SALOMEDS -import VISU -import math - -#-------------------------------------------------------------------------- -modulecatalog = naming_service.Resolve("/Kernel/ModulCatalog") - -# >>> Getting study builder ================================================== -myBuilder = myStudy.NewBuilder() - -# >>> Getting (loading) VISU component ======================================= -myVisu = lcc.FindOrLoadComponent("FactoryServer", "VISU") -myComponent = myStudy.FindComponent("VISU") -myVisu.SetCurrentStudy(myStudy) -if not myComponent: - myComponent = myBuilder.NewComponent("VISU") - aName = myBuilder.FindOrCreateAttribute(myComponent, "AttributeName") - #aName.SetValue("Visu") - Comp = modulecatalog.GetComponent( "VISU" ) - aName.SetValue( Comp._get_componentusername() ) - - A2 = myBuilder.FindOrCreateAttribute(myComponent, "AttributePixMap"); - aPixmap = A2._narrow(SALOMEDS.AttributePixMap); - aPixmap.SetPixMap( "ICON_OBJBROWSER_Visu" ); - - myBuilder.DefineComponentInstance(myComponent,myVisu) - -# >>> Creating object with Table of real[ 200 * 20 ] ======================== -myTRealObject = myBuilder.NewObject(myComponent) -AName = myBuilder.FindOrCreateAttribute(myTRealObject, "AttributeName") -AName.SetValue("Table Of Real") -ARealTable = myBuilder.FindOrCreateAttribute(myTRealObject, "AttributeTableOfReal") -myHorNb = 10 -myVerNb = 200 - -k={} -for j in range(0,myHorNb): - k[j] = j*10+1 -ARealTable.AddRow(k.values()) -ARealTable.SetRowTitle(1, "Frequency") -ARealTable.SetRowUnit(1, "Hz") - -for i in range(1,myVerNb+1): - for j in range(0,myHorNb): - if j % 2 == 1: - k[j] = math.log10(j*30*math.pi/180) * 20 + i * 15 + j*5 - else: - k[j] = math.sin(j*30*math.pi/180) * 20 + i * 15 + j*5 - ARealTable.AddRow(k.values()) - ARealTable.SetRowTitle(i+1, "Power " + str(i)) - ARealTable.SetRowUnit(i+1, "Wt") -ARealTable.SetTitle("Very useful data") - -# >>> Create Visu table -myVisuTableReal = myVisu.CreateTable( myTRealObject.GetID() ) - -# >>> Create container and insert curves -myContainer = myVisu.CreateContainer() - -# >>> Create curves -for i in range(1,myVerNb+1): - myCurve = myVisu.CreateCurve( myVisuTableReal, 1, i+1 ) - myContainer.AddCurve(myCurve) -# ============================================================================ diff --git a/src/VISU_SWIG/batchmode_visu_view.py b/src/VISU_SWIG/batchmode_visu_view.py deleted file mode 100644 index 4bc74a8b..00000000 --- a/src/VISU_SWIG/batchmode_visu_view.py +++ /dev/null @@ -1,57 +0,0 @@ -# VISU VISU_SWIG : binding of C++ implementation and Python -# -# Copyright (C) 2003 CEA/DEN, EDF R&D -# -# -# -# File : test_table.py -# Author : Alexey Petrov -# Module : VISU -# $Header: - -from VISU import * -from batchmode_visu_table import * - -myViewMan = myVisu.GetViewManager() - -myTable = myViewMan.CreateTableView(myVisuTableReal) -myTitle = myTable.GetTitle() -myTable.SetTitle('Changed Title') - -myPlot = myViewMan.CreateXYPlot() -myTitle = myPlot.GetTitle() -myPlot.SetTitle('Change the title from python') - -mySubTitle = myPlot.GetSubTitle() -myPlot.SetSubTitle(myTitle) - -myXTitle = myPlot.GetXTitle() -myYTitle = myPlot.GetYTitle() -myPlot.SetXTitle(myYTitle) -myPlot.SetYTitle(myXTitle) - -myPlot.GetMarkerSize() -myPlot.SetMarkerSize(20) -myPlot.GetMarkerSize() -myPlot.ShowLegend(0) - -myPlot.SetCurveType(VISU.XYPlot.POINTS) -myPlot.SetCurveType(VISU.XYPlot.MULTYLINE) -myPlot.GetCurveType() -myPlot.SetCurveType(VISU.XYPlot.SPLINE) - -myPlot.SetHorScaling(VISU.LOGARITHMIC) -myPlot.EnableXGrid(1,3,1,4) -myPlot.SetHorScaling(VISU.LINEAR) -myPlot.EnableXGrid(1,10,1,10) -myPlot.GetHorScaling() - -myPlot.SetVerScaling(VISU.LOGARITHMIC) -myPlot.GetVerScaling() -myPlot.EnableYGrid(1,2,1,10) - -myPlot.ShowLegend(1) -myPlot.SetMarkerSize(5) -myPlot.GetMarkerSize() - -myPlot.Display(myContainer) diff --git a/src/VISU_SWIG/libVISU_Swig.i b/src/VISU_SWIG/libVISU_Swig.i deleted file mode 100644 index 1f9a4de7..00000000 --- a/src/VISU_SWIG/libVISU_Swig.i +++ /dev/null @@ -1,54 +0,0 @@ -// VISU VISU_SWIG : binding of C++ implementation and Python -// -// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org -// -// -// -// File : libVISU_Swig.i -// Author : Paul RASCLE, EDF -// Module : VISU -// $Header$ - -%module libVISU_Swig -%{ -#include "VISU_Gen_s.hh" -%} - - -class Convertor{ -public: - Convertor(){}; - Convertor(const char* theFileName); -}; - - -class ScalarMap{ -public: - ScalarMap(){}; - ScalarMap(Convertor* theConvertor, const char* theMeshName, int theEntity, - const char* theFieldName, int theIteration); -}; - -class View3D{ -public: - View3D(); - void Display(ScalarMap* theScalarMap); - void SetPosition(int theX, int theY); -}; \ No newline at end of file diff --git a/src/VISU_SWIG/test_events.py b/src/VISU_SWIG/test_events.py deleted file mode 100755 index df53a3e8..00000000 --- a/src/VISU_SWIG/test_events.py +++ /dev/null @@ -1,14 +0,0 @@ -############################################################### -# -# File : test_events.py -# Description : Test postEvent() functionality for VISU module -# This script can be run from GUI Python console only! -############################################################### - -from visu_gui import * - -for i in range ( 10 ): - myVisu.CreateTestView() - for j in range ( 10 ): - myVisu.ShowTestObject(); - diff --git a/src/VISU_SWIG/visu_big_table.py b/src/VISU_SWIG/visu_big_table.py deleted file mode 100644 index fb90b2d6..00000000 --- a/src/VISU_SWIG/visu_big_table.py +++ /dev/null @@ -1,77 +0,0 @@ -# VISU VISU_SWIG : binding of C++ implementation and Python -# -# Copyright (C) 2003 CEA/DEN, EDF R&D -# -# -# -# File : visu_big_table.py -# Author : Vadim SANDLER -# Module : VISU -# $Header$ - -import salome -import math -import SALOMEDS -import VISU - -# >>> Getting study builder ================================================== -myStudy = salome.myStudy -myBuilder = myStudy.NewBuilder() - -# >>> Getting (loading) VISU component ======================================= -myVisu = salome.lcc.FindOrLoadComponent("FactoryServer", "VISU") -myComponent = myStudy.FindComponent("VISU") -myVisu.SetCurrentStudy(myStudy) -if not myComponent: - myComponent = myBuilder.NewComponent("VISU") - aName = myBuilder.FindOrCreateAttribute(myComponent, "AttributeName") - #aName.SetValue("Visu") - aName.SetValue( salome.sg.getComponentUserName("VISU") ) - - A2 = myBuilder.FindOrCreateAttribute(myComponent, "AttributePixMap"); - aPixmap = A2._narrow(SALOMEDS.AttributePixMap); - aPixmap.SetPixMap( "ICON_OBJBROWSER_Visu" ); - - myBuilder.DefineComponentInstance(myComponent,myVisu) - -# >>> Creating object with Table of real[ 200 * 20 ] ======================== -myTRealObject = myBuilder.NewObject(myComponent) -AName = myBuilder.FindOrCreateAttribute(myTRealObject, "AttributeName") -AName.SetValue("Table Of Real") -ARealTable = myBuilder.FindOrCreateAttribute(myTRealObject, "AttributeTableOfReal") -myHorNb = 10 -myVerNb = 200 - -k={} -for j in range(0,myHorNb): - k[j] = j*10+1 -ARealTable.AddRow(k.values()) -ARealTable.SetRowTitle(1, "Frequency") -ARealTable.SetRowUnit(1, "Hz") - -for i in range(1,myVerNb+1): - for j in range(0,myHorNb): - if j % 2 == 1: - k[j] = math.log10(j*30*math.pi/180) * 20 + i * 15 + j*5 - else: - k[j] = math.sin(j*30*math.pi/180) * 20 + i * 15 + j*5 - ARealTable.AddRow(k.values()) - ARealTable.SetRowTitle(i+1, "Power " + str(i)) - ARealTable.SetRowUnit(i+1, "Wt") -ARealTable.SetTitle("Very useful data") - -# >>> Create Visu table -myVisuTableReal = myVisu.CreateTable( myTRealObject.GetID() ) - -# >>> Create container and insert curves -myContainer = myVisu.CreateContainer() - -# >>> Create curves -for i in range(1,myVerNb+1): - myCurve = myVisu.CreateCurve( myVisuTableReal, 1, i+1 ) - myContainer.AddCurve(myCurve) - -# >>> Updating Object Browser ================================================ -salome.sg.updateObjBrowser(1) - -# ============================================================================ diff --git a/src/VISU_SWIG/visu_gui.py b/src/VISU_SWIG/visu_gui.py deleted file mode 100644 index d21a239f..00000000 --- a/src/VISU_SWIG/visu_gui.py +++ /dev/null @@ -1,23 +0,0 @@ -# VISU VISU_SWIG : binding of C++ implementation and Python -# -# Copyright (C) 2003 CEA/DEN, EDF R&D -# -# -# -# File : visu_gui.py -# Module : VISU - -import sys -import os - -import SALOMEDS -import SALOME -import SALOME_MED -import VISU - -from salome import * -import visu - -myVisu = visu.Initialize(orb, naming_service,lcc,myStudyManager,myStudy, 2) -if myVisu is None: - raise RuntimeError, "myVisu is none, VISU component is not loaded or found" diff --git a/src/VISU_SWIG/visu_split_views.py b/src/VISU_SWIG/visu_split_views.py deleted file mode 100644 index 545ed7a3..00000000 --- a/src/VISU_SWIG/visu_split_views.py +++ /dev/null @@ -1,129 +0,0 @@ - -import VISU -import SALOMEDS -from visu_gui import * - -myViewManager = myVisu.GetViewManager() - -################################################ - -myView1 = myViewManager.Create3DView() -myView1.SetTitle("The window will be soon destroyed!") -print "myView1 = myViewManager.Create3DView()" - -myView1.Maximize() -print "myView1.Maximize()" - -myView1.Restore() -print "myView1.Restore()" - -myView1.Minimize() -print "myView1.Minimize()" - -myViewManager.Destroy(myView1) -print "myViewManager.Destroy(myView1)" - -################################################ - -myView2 = myViewManager.Create3DView() -print "myView2 = myViewManager.Create3DView()" -myView2.SetTitle("myView2") - -aColor = SALOMEDS.Color(0.0,0.3,1.0) -myView2.SetBackground(aColor) -print "aColor = SALOMEDS.Color(0.0,0.3,1.0)" -print "myView2.SetBackground(aColor)" - -myView2.SetFocalPoint([0,0,0]) -print "myView2.SetFocalPoint([0,0,0])" -myView2.SetParallelScale(2) -print "myView2.SetParallelScale(2)" - -################################################ - -myView3 = myViewManager.Create3DView() -print "myView3 = myViewManager.Create3DView()" -myView3.SetTitle("myView3") - -myView3.SplitRight() -print "myView3.SplitRight()" - -aColor = SALOMEDS.Color(0.0,0.7,0.0) -print "aColor = SALOMEDS.Color(0.0,0.7,0.0)" -myView3.SetBackground(aColor) -print "myView3.SetBackground(aColor)" - -aPoint = myView3.GetPointOfView() -aPoint[0] = aPoint[0] + 10 -myView3.SetPointOfView(aPoint) -print "myView3.SetPointOfView(...)" -myView3.ScaleView(VISU.View3D.YAxis,10.0) -myView3.ScaleView(VISU.View3D.XAxis,3.0) -print "myView3.ScaleView(...)" - -myView3.FitAll() - -myView3.SaveViewParams('AAA') -print "myView3.SaveViewParams('AAA')" - -myView3.RemoveScale() -print "myView3.RemoveScale()" - -myView3.Update() -print "myView3.Update()" -myView3.FitAll() -print "myView3.FitAll()" - -################################################ - -myView4 = myViewManager.Create3DView() -print "myView4 = myViewManager.Create3DView()" -myView4.SetTitle("myView4") - -aColor = SALOMEDS.Color(1.0,0.7,0.0) -print "aColor = SALOMEDS.Color(1.0,0.7,0.0)" -myView4.SetBackground(aColor) -print "myView4.SetBackground(aColor)" - -################################################ - -myView5 = myViewManager.Create3DView() -print "myView5 = myViewManager.Create3DView()" -myView5.SetTitle("myView5") - -myView5.SplitTop() -print "myView5.SplitTop()" - -aColor = SALOMEDS.Color(0.7,0.7,0.7) -print "aColor = SALOMEDS.Color(0.7,0.7,0.7)" -myView5.SetBackground(aColor) -print "myView5.SetBackground(aColor)" - -################################################ - -myView6 = myViewManager.CreateXYPlot() -print "myView6 = myViewManager.CreateXYPlot()" -myView6.SetTitle("myView6") - -################################################ - -myView7 = myViewManager.Create3DView() -print "myView7 = myViewManager.Create3DView()" -myView7.SetTitle("myView7") - -################################################ - -myView6.OnTop() -print "myView6.OnTop()" - -myView4.Attract(myView2) -print "myView4.Attract(myView2)" - -myView4.SetRelativePositionInSplitter(0.7) -print "myView4.SetRelativePositionInSplitter(0.7)" - -myView4.SetRelativePositionX(0.2) -print "myView4.SetRelativePositionX(0.7)" - -#myView4.SetRelativePositionY(0.2) -#print "myView4.SetRelativePositionY(0.2)" diff --git a/src/VISU_SWIG/visu_table.py b/src/VISU_SWIG/visu_table.py deleted file mode 100644 index 780e698c..00000000 --- a/src/VISU_SWIG/visu_table.py +++ /dev/null @@ -1,163 +0,0 @@ -# VISU VISU_SWIG : binding of C++ implementation and Python -# -# Copyright (C) 2003 CEA/DEN, EDF R&D -# -# -# -# File : visu_table.py -# Author : Vadim SANDLER -# Module : VISU -# $Header$ - -import salome -import math -import SALOMEDS -import VISU - -# >>> Getting study builder ================================================== -myStudy = salome.myStudy -myBuilder = myStudy.NewBuilder() - -# >>> Getting (loading) VISU component ======================================= -myVisu = salome.lcc.FindOrLoadComponent("FactoryServer", "VISU") -myComponent = myStudy.FindComponent("VISU") -myVisu.SetCurrentStudy(myStudy) -if not myComponent: - myComponent = myBuilder.NewComponent("VISU") - aName = myBuilder.FindOrCreateAttribute(myComponent, "AttributeName") - #aName.SetValue("Visu") - aName.SetValue( salome.sg.getComponentUserName("VISU") ) - - A2 = myBuilder.FindOrCreateAttribute(myComponent, "AttributePixMap"); - aPixmap = A2._narrow(SALOMEDS.AttributePixMap); - aPixmap.SetPixMap( "ICON_OBJBROWSER_Visu" ); - - myBuilder.DefineComponentInstance(myComponent,myVisu) - -# >>> Creating object with Table of integer ================================== -myTIntObject = myBuilder.NewObject(myComponent) -AName = myBuilder.FindOrCreateAttribute(myTIntObject, "AttributeName") -AName.SetValue("Table Of Integer") -AIntTable = myBuilder.FindOrCreateAttribute(myTIntObject, "AttributeTableOfInteger") - -a=[1,2,3,4,5,6,7,8,9,10] -AIntTable.AddRow(a) -a=[110,120,130,140,150,160,170,180,190,200] -AIntTable.AddRow(a) -a=[-1,272,0,0,-642,10000,13,578,-578,99] -AIntTable.AddRow(a) -AIntTable.SetTitle("TEST table of integer") -AIntTable.SetRowTitle(1,"FR") -AIntTable.SetRowUnit(1,"m/h") -AIntTable.SetRowTitle(2,"SR") -AIntTable.SetRowUnit(2,"s") -AIntTable.SetRowTitle(3,"TR") -AIntTable.SetRowUnit(3,"$") -c=["C1","C2","C3","C4","C5","C6","C7","C8","C9","C10"] -AIntTable.SetColumnTitles(c) - -# >>> Creating object with Table of real ===================================== -myTRealObject = myBuilder.NewObject(myComponent) -AName = myBuilder.FindOrCreateAttribute(myTRealObject, "AttributeName") -AName.SetValue("Table Of Real") -ARealTable = myBuilder.FindOrCreateAttribute(myTRealObject, "AttributeTableOfReal") - -k={} -l={} -for j in range(0,20): - k[j] = j*10+1 - l[j] = "C"+str(j+1) -ARealTable.AddRow(k.values()) -ARealTable.SetRowTitle(1, "Row 0") -ARealTable.SetRowUnit(1, "Hz") -ARealTable.SetColumnTitles(l.values()) -for i in range(1,11): - for j in range(1,21): - if j % 2 == 1: - k[j] = math.log10(j*30*math.pi/180) * 20 + i * 15 + j*5 - else: - k[j] = math.sin(j*30*math.pi/180) * 20 + i * 15 + j*5 - ARealTable.AddRow(k.values()) - ARealTable.SetRowTitle(i+1, "Row " + str(i)) - ARealTable.SetRowUnit(i+1, "Wt") -ARealTable.SetTitle("TEST table of real") - -# >>> Creating object with integer attribute ================================= -myIntObject = myBuilder.NewObject(myComponent) -AName = myBuilder.FindOrCreateAttribute(myIntObject, "AttributeName") -AName.SetValue("Integer") -AInt = myBuilder.FindOrCreateAttribute(myIntObject, "AttributeInteger") -AInt.SetValue(123) - -# >>> Creating object with real attribute ==================================== -myRealObject = myBuilder.NewObject(myComponent) -AName = myBuilder.FindOrCreateAttribute(myRealObject, "AttributeName") -AName.SetValue("Real") -AReal = myBuilder.FindOrCreateAttribute(myRealObject, "AttributeReal") -AReal.SetValue(-56.9634) - -# >>> Creating object with comment attribute ================================= -myCmtObject = myBuilder.NewObject(myComponent) -AName = myBuilder.FindOrCreateAttribute(myCmtObject, "AttributeName") -AName.SetValue("Comment") -ACmt = myBuilder.FindOrCreateAttribute(myCmtObject, "AttributeComment") -ACmt.SetValue("Just a comment") - -# >>> Create VISU presentable objects ======================================== -# >>> Create table of real -myVisuTableReal = myVisu.CreateTable( myTRealObject.GetID() ) - -# >>> Create curves -myCurve1 = myVisu.CreateCurve( myVisuTableReal, 1, 2 ) -myCurve2 = myVisu.CreateCurve( myVisuTableReal, 1, 3 ) -myCurve3 = myVisu.CreateCurve( myVisuTableReal, 1, 4 ) -myCurve4 = myVisu.CreateCurve( myVisuTableReal, 1, 6 ) -myCurve5 = myVisu.CreateCurve( myVisuTableReal, 1, 8 ) -myCurve6 = myVisu.CreateCurve( myVisuTableReal, 1, 11 ) - -# >>> Set curve parameters -myCurve4.SetMarker( VISU.Curve.RECTANGLE ) -myCurve4.SetLine( VISU.Curve.DASHLINE, 3 ) -myCurve4.SetColor( SALOMEDS.Color(0, 0.7, 0.3) ) -myCurve6.SetMarker( VISU.Curve.LTRIANGLE ) -myCurve6.SetLine( VISU.Curve.DOTLINE, 2 ) -myCurve6.SetColor( SALOMEDS.Color(0.2, 0.2, 0.9) ) - -# >>> Create container and insert curves -myContainer1 = myVisu.CreateContainer() -myContainer1.AddCurve(myCurve1) -myContainer1.AddCurve(myCurve2) -myContainer1.AddCurve(myCurve3) -myContainer1.AddCurve(myCurve4) -myContainer1.AddCurve(myCurve5) -myContainer1.AddCurve(myCurve6) - -# >>> Create container and insert curves -myContainer2 = myVisu.CreateContainer() -myContainer2.AddCurve(myCurve4) - -# >>> Create table of integer -myVisuTableInt = myVisu.CreateTable( myTIntObject.GetID() ) - -# >>> Create curves -myCurve101 = myVisu.CreateCurve( myVisuTableInt, 1, 1 ) -myCurve102 = myVisu.CreateCurve( myVisuTableInt, 1, 3 ) - -# >>> Set curve parameters -myCurve101.SetMarker( VISU.Curve.RECTANGLE ) -myCurve101.SetLine( VISU.Curve.DASHLINE, 3 ) -myCurve101.SetColor( SALOMEDS.Color(0, 0.7, 0.3) ) -myCurve101.SetTitle( "Very useful data" ) - -# >>> Create container and insert curves -myContainer3 = myVisu.CreateContainer() -myContainer3.AddCurve(myCurve101) -myContainer3.AddCurve(myCurve102) - -# >>> Updating Object Browser ================================================ -salome.sg.updateObjBrowser(1) - -# ============================================================================ - - - diff --git a/src/VISU_SWIG/visu_view.py b/src/VISU_SWIG/visu_view.py deleted file mode 100644 index d301e592..00000000 --- a/src/VISU_SWIG/visu_view.py +++ /dev/null @@ -1,62 +0,0 @@ -# VISU VISU_SWIG : binding of C++ implementation and Python -# -# Copyright (C) 2003 CEA/DEN, EDF R&D -# -# -# -# File : test_table.py -# Author : Alexey Petrov -# Module : VISU -# $Header: - -import SALOMEDS -import VISU - -import salome -import SALOMEDS -from VISU import * - -from visu_table import * - -myViewMan = myVisu.GetViewManager() - -myTable = myViewMan.CreateTableView(myVisuTableReal) -myTitle = myTable.GetTitle() -myTable.SetTitle('Changed Title') - -myPlot = myViewMan.CreateXYPlot() -myTitle = myPlot.GetTitle() -myPlot.SetTitle('Change the title from python') - -mySubTitle = myPlot.GetSubTitle() -myPlot.SetSubTitle(myTitle) - -myXTitle = myPlot.GetXTitle() -myYTitle = myPlot.GetYTitle() -myPlot.SetXTitle(myYTitle) -myPlot.SetYTitle(myXTitle) - -myPlot.GetMarkerSize() -myPlot.SetMarkerSize(20) -myPlot.GetMarkerSize() -myPlot.ShowLegend(0) - -myPlot.SetCurveType(VISU.XYPlot.POINTS) -myPlot.SetCurveType(VISU.XYPlot.MULTYLINE) -myPlot.GetCurveType() -myPlot.SetCurveType(VISU.XYPlot.SPLINE) - -myPlot.SetHorScaling(VISU.LOGARITHMIC) -myPlot.EnableXGrid(1,3,1,4) -myPlot.SetHorScaling(VISU.LINEAR) -myPlot.EnableXGrid(1,10,1,10) -myPlot.GetHorScaling() - -myPlot.SetVerScaling(VISU.LOGARITHMIC) -myPlot.GetVerScaling() -myPlot.EnableYGrid(1,2,1,10) - -myPlot.ShowLegend(1) -myPlot.SetMarkerSize(5) -myPlot.GetMarkerSize() -