-# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+# Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# -* Makefile *-
# Author : Patrick GOLDBRONN (CEA)
# Date : 28/06/2001
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : VISU_version.h
// Author : Vadim SANDLER
// Module : SALOME
-# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+# Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
include $(top_srcdir)/adm_local/unix/make_common_starter.am
SUBDIRS = unix cmake_files
-# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+# Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
include $(top_srcdir)/adm_local/unix/make_common_starter.am
SUBDIRS = config_files
-# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+# Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
include $(top_srcdir)/adm_local/unix/make_common_starter.am
dist_admlocalm4_DATA = \
-dnl Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+dnl Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
dnl
dnl Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
dnl
dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
dnl
+
###########################################################
# File : check_Visu.m4
# Author : Vadim SANDLER (OCN)
-# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+# Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# The following is to avoid PACKAGE_... env variable
# redefinition compilation warnings
# ============================================================
+#
AM_CXXFLAGS = @KERNEL_CXXFLAGS@ -include SALOMEconfig.h
AM_CPPFLAGS = @KERNEL_CXXFLAGS@ -include SALOMEconfig.h
-# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+# Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
include $(top_srcdir)/adm_local/unix/make_common_starter.am
# non-distributed files
#!/bin/sh
-# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+# Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
-\r
+@REM Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
+@REM
+@REM This library is free software; you can redistribute it and/or
+@REM modify it under the terms of the GNU Lesser General Public
+@REM License as published by the Free Software Foundation; either
+@REM version 2.1 of the License.
+@REM
+@REM This library is distributed in the hope that it will be useful,
+@REM but WITHOUT ANY WARRANTY; without even the implied warranty of
+@REM MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+@REM Lesser General Public License for more details.
+@REM
+@REM You should have received a copy of the GNU Lesser General Public
+@REM License along with this library; if not, write to the Free Software
+@REM Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+@REM
+@REM See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+@REM
+
%PYTHONBIN% %KERNEL_ROOT_DIR%\salome_adm\cmake_files\am2cmake.py --visu\r
#!/bin/bash
-# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
#
# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# Tool for updating list of .in file for the SALOME project
# and regenerating configure script
# Author : Marc Tajchman - CEA
#!/bin/sh
-# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+# Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
rm -rf autom4te.cache aclocal.m4 configure make_config
find . -name "*~" -print -exec rm {} \;
find . -name "*.pyc" -print -exec rm {} \;
-# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+# Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# Author : Marc Tajchman (CEA)
# Date : 28/06/2001
# Modified by : Patrick GOLDBRONN (CEA)
# Modified by : Marc Tajchman (CEA)
# Modified by : Mikhail Ponikarov (OCN)
#
-AC_INIT([Salome2 Project VISU module], [5.1.3], [webmaster.salome@opencascade.com], [SalomeVISU])
+AC_INIT([Salome2 Project VISU module], [5.1.4], [webmaster.salome@opencascade.com], [SalomeVISU])
AC_CONFIG_AUX_DIR(adm_local/unix/config_files)
AC_CANONICAL_HOST
AC_CANONICAL_TARGET
doc/salome/gui/VISU/Makefile \
doc/salome/gui/VISU/doxyfile \
doc/salome/gui/VISU/doxyfile_idl \
+ doc/salome/gui/VISU/static/header.html \
doc/salome/tui/Makefile \
doc/salome/tui/doxyfile \
+ doc/salome/tui/static/header.html \
idl/Makefile \
resources/VISUCatalog.xml \
resources/Makefile \
src/CONVERTOR/Makefile \
src/PIPELINE/Makefile \
src/OBJECT/Makefile \
- src/VVTK/Makefile \
- src/GUITOOLS/Makefile \
src/VISU_I/Makefile \
src/VISUGUI/Makefile \
src/VISU_SWIG/Makefile \
-# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+# Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
SUBDIRS = salome
usr_docs:
-# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+# Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# $Header$
#
SUBDIRS = tui gui
-# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+# Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# File : Makefile.am
# Author : Vasily Rusyaev (Open Cascade NN)
# Module : doc
-# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+# Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# File : Makefile.am
# Author : Vasily Rusyaev (Open Cascade NN)
# Module : doc
#
include $(top_srcdir)/adm_local/unix/make_common_starter.am
-EXTRA_DIST += images input static
+EXTRA_DIST += images input static/footer.html static/doxygen.css
+
+guidocdir = $(docdir)/gui/VISU
+guidoc_DATA = images/head.png
usr_docs: doxyfile_idl doxyfile
@echo "===========================================" ; \
-# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
#
# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
#---------------------------------------------------------------------------
# Project related configuration options
#---------------------------------------------------------------------------
-PROJECT_NAME = "Post-Pro Module Reference Manual v.@VERSION@"
+PROJECT_NAME = "SALOME Post-Pro User's Guide"
OUTPUT_DIRECTORY = .
CREATE_SUBDIRS = NO
OUTPUT_LANGUAGE = English
#---------------------------------------------------------------------------
GENERATE_HTML = YES
HTML_OUTPUT = .
-HTML_HEADER = @srcdir@/static/header.html
+HTML_HEADER = @builddir@/static/header.html
HTML_FOOTER = @srcdir@/static/footer.html
-#HTML_STYLESHEET = @srcdir@/static/doxygen.css
+HTML_STYLESHEET = @srcdir@/static/doxygen.css
TOC_EXPAND = YES
DISABLE_INDEX = NO
GENERATE_TREEVIEW = YES
-# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
#
# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
#---------------------------------------------------------------------------
# Project related configuration options
#---------------------------------------------------------------------------
-PROJECT_NAME = "Post-Pro Module Reference Manual v.@VERSION@"
+PROJECT_NAME = "SALOME Post-Pro User's Guide"
OUTPUT_DIRECTORY = .
CREATE_SUBDIRS = NO
OUTPUT_LANGUAGE = English
#---------------------------------------------------------------------------
GENERATE_HTML = YES
HTML_OUTPUT = visugen_doc
-HTML_HEADER = @srcdir@/static/header.html
+HTML_HEADER = @builddir@/static/header.html
HTML_FOOTER = @srcdir@/static/footer.html
-#HTML_STYLESHEET = @srcdir@/static/doxygen.css
+HTML_STYLESHEET = @srcdir@/static/doxygen.css
TOC_EXPAND = YES
DISABLE_INDEX = YES
GENERATE_TREEVIEW = NO
presentations on fields. </li>
<li> \subpage evolution_page - tracing of temporal evolution of a
variable at a given point.</li>
+<li> \subpage point_marker_page - allows to change the representation
+of points, using standard or custom markers.</li>
<li> \subpage translate_presentation_page - displacement of
presentations in the viewer.</li>
<li> \subpage recording_page - allows to dump user actions in an AVI
</ul>
Created presentations can be edited, animaded, recorded and viewed in
-different modes. The whole range of such operations is described in \subpage a3d_management_page "Managing 3D Presentations" section.
+different modes. The whole range of such operations is described in \ref a3d_management_page "Managing 3D Presentations" section.
*/
your animation with proportional periods of time between every frame
(not depending on the time stamps).
<br><br>
+<b>Time stamp frequency</b> spin box: this option is available if
+<b>Save animation to AVI file</b> mode is turned on. It provides a
+possibility to capture only timestamps with indices divisible by the
+specified frequency, that allows to generate less voluminous films.
+<br><br>
<b>Clean memory at each frame</b> - this option allows to optimize the
performance of the operation.
<ul>
<li>\b H (horisontal) - the values of this column will correspond to
X-coordinates of the curve.</li>
-<li>\b V (vertical) - the values of this column will correspond to
-Y-coordinates of the curve.</li>
+<li>\b V (vertical left) - the values of this column will correspond to
+Y-coordinates of the curve to be attached to the left vertical axis of
+the Plot2d viewer.</li>
+<li>\b V2 (vertical right) - the values of this column will correspond to
+Y-coordinates of the curve to be attached to the right vertical axis of
+the Plot2d viewer.</li>
+\note If there are several curves attached both to left and right
+vertical axes, they will be indicated by the following icons in the
+legend:
+\image html axis_bottom_left.png
+<br>
+\image html axis_bottom_right.png
</ul>
The column \b Assigned allows to represent the values assigned to the
-points of the curve (possible for V-rows only). Any row, even
+points of the curve (possible for V- and V2-rows only). Any row, even
coinciding with the current or empty (no values assigned), can be
represented. All values are indicated with tool tips over the
corresponding curve points in the Plot2d viewer.
<li>From the following standard dialog box:
-\image html importtablefromfile.png
+\image html importtables.png
+
+choose the necessary *.txt, *.tab or *.csv file containing tables and
+click \b Open button.
+
+Checkbox "Use first string as title" is checked if it is needed to use
+information from first string of file as titles of columns of table.
-choose the necessary *.txt or *.tab file containing tables and
-click \b Open button.
</li>
<li>In the Object Browser \b Post-Pro will create a new folder having
contain your exported table, and click \b OK button. Your table will
be exported.
-\image html exporttable.png
+You can perform export table to *.txt or *.tab file
+
+\image html exporttables1.png
+
+Or you can perform export table to *.csv file
+
+\image html exporttables2.png
</li>
</ul>
\subpage table_presentations_page "Data Table Objects",
two-dimensional data arrays, as input type for visualization.
-\n The Python interface of \b Post-Pro module is described in \subpage idl_interface_page "Access to Post-Pro module functionality" page.
+\n The Python interface of \b Post-Pro module is described in \subpage
+idl_interface_page "Access to Post-Pro module functionality" page.
*/
--- /dev/null
+/*!
+
+\page point_marker_page Point Marker
+
+\n You can change the representation of points in
+the 3D viewer either by selecting one of the predefined
+shapes or by loading a custom texture from an external file.
+
+- Standard point markers
+
+The Post-Pro module provides a set of predefined point marker shapes
+which can be used to display points in 3D viewer.
+Each standard point marker has two attributes: type (defines shape
+form) and scale factor (defines shape size).
+
+\image html point_marker_dlg1.png
+
+<br>
+
+\image html std_point_marker.png "Presentation with standard point markers"
+
+- Custom point markers
+
+It is also possible to load a point marker shape from an external file.
+This file should provide a description of the point texture as a set
+of lines; each line is represented as sequence of "0" and "1" symbols,
+where "1" symbol means an opaque pixel and "0" symbol means a
+transparent pixel. The width of the texture correspond to the length
+of the longest line in the file, expanded to the nearest byte-aligned
+value. The height of the texture is equal to the number of non-empty
+lines in the file. Note that missing symbols are replaced by "0".
+
+Here is a texture file sample:
+
+<pre>
+00111100
+00111100
+11111111
+11111111
+11111111
+11111111
+00111100
+00111100
+</pre>
+
+\image html point_marker_dlg2.png
+
+<br>
+
+\image html custom_point_marker.png "Presentation with custom point markers"
+
+
+Our TUI Scripts provide you with \subpage tui_point_marker_page script.
+
+*/
+
\image html viewtable.png
+When the <b>Enable editing</b> option is checked, contents of the table
+are editable.
+\note At the current moment this mode allows to sort table data only.
+Sorting is performed by clicking on header of the column, by which the data
+has to be sorted.
+
+<b>Sort policy</b> option allows to specify how the empty cells will be processed
+during the sort procedure. The following options are available:
+<ul>
+<li><b>Empty cells are considered as lowest values</b></li>
+<li><b>Empty cells are considered as highest values</b></li>
+<li><b>Empty cells are always first</b></li>
+<li><b>Empty cells are always last</b></li>
+<li><b>Empty cells are ignored</b> (means that positions of the empty cells
+will not change after sorting)</li>
+</ul>
+
+<b>Adjust Cells</b> button allows to adjust size of the table cells according
+to their contents.
+
It is also possible to create
\subpage table_3d_page "Table 3D presentation" basing on the table
data and display it in the VTK viewer.
--- /dev/null
+/*!
+
+\page tui_point_marker_page Example of using Point Markers
+
+\code
+import os
+import time
+import VISU
+from visu_gui import *
+
+data_dir = os.getenv("DATA_DIR")
+sleep_delay = 2
+
+myViewManager = myVisu.GetViewManager();
+
+myView = myViewManager.Create3DView()
+myView.SetTitle("The viewer for Point Marker Example")
+print "myViewManager.Create3DView()"
+
+medFile = "fra.med"
+medFile = data_dir + '/MedFiles/' + medFile
+myResult = myVisu.ImportFile(medFile)
+
+aMeshName ="LE VOLUME"
+anEntity = VISU.NODE
+aFieldName = "VITESSE";
+aTimeStampId = 1
+
+aScalarMap = myVisu.ScalarMapOnField(myResult,aMeshName,anEntity,aFieldName,aTimeStampId)
+myView.Display(aScalarMap);
+myView.FitAll();
+
+print "Set representation type to Point"
+myView.SetPresentationType(aScalarMap, VISU.POINT)
+
+print "Set standard marker"
+aScalarMap.SetMarkerStd(VISU.MT_PLUS, VISU.MS_25)
+myView.Update()
+time.sleep(sleep_delay)
+
+print "Set custom marker"
+custom_texture = myVisu.LoadTexture(os.path.join(data_dir, "Textures", "texture1.dat"))
+aScalarMap.SetMarkerTexture(custom_texture)
+myView.Update()
+
+\endcode
+
+*/
shrink_factor.png
- <b>Edge Color</b> - allows to set the color of lines representing
the edges of the presentation displayed in SurfaceFrame mode.
+ - \ref point_marker_page "Point Marker" - allows to change the
+ representation of points.
- \ref translate_presentation_page "Translate Presentation" - allows
to translate the presentation along coordinate axes.
-H1 {
+body {
+ font-family: Arial, Helvetica, sans-serif;
+ background-color: #ffffff;
+}
+
+h1 {
text-align: center;
+ text-decoration: none;
+ border: none;
+ line-height: 25px;
+ text-align: center;
+// text-transform:uppercase;
+ background: #D9f4fd;
+ font-size: 12pt;
+ font-weight: bold;
+ border: 1px solid #CCCCCC;
+ -moz-border-radius: 8px;
+ -moz-box-shadow:5px 5px 5px rgba(0, 0, 0, 0.15);
+/* background-color: rgb(75, 140, 185);
+ color: #ffffff;
+ text-align: center;
+ height: 25px;*/
+
+}
+
+h2 {
+ font-size: 12pt;
+ font-weight: bold;
+}
+
+table {
+ font-size: 10pt;
}
CAPTION {
A.qindexRef {}
-/* Link to any cross-referenced Doxygen element */
-A.el {
- text-decoration: none;
- font-weight: bold
-}
-
-A.elRef {
- font-weight: bold
-}
-
/* Link to any cross-referenced Doxygen element inside a code section
(ex: header)
*/
A:hover {
text-decoration: none;
- background-color: lightblue
+ background-color: lightblue;
+}
+
+div.contents {
+ font-family: Arial, Helvetica, sans-serif;
+ font-size: 10pt;
+}
+
+div.navpath {
+ font-size: 11pt;
+}
+
+div.version {
+ background-color:#ffffde;
+ border:1px solid #cccccc;
+ font-family: Arial, Helvetica, sans-serif;
+ font-size: 9pt;
+ text-align: center;
+ width:100px;
+ -moz-border-radius: 8px;
+// -moz-box-shadow:5px 5px 5px rgba(0, 0, 0, 0.15);
+}
+
+div.header {
+ background: url("head.png");
+ background-color: #175783;
+ border: 1px solid;
+ height: 80px;
+ background-repeat: no-repeat;
+ margin-bottom: 10px;
+}
+
+div.tabs {
+ display: none;
+}
+
+div.footer {
+ background-color: #D9f4fd;
+ border: 1px solid #AAAAAA;
+ font-family: Arial, Helvetica, sans-serif;
+ font-size: 11px;
+ padding: 10px;
+ margin-top: 15px;
}
DL.el {
}
/* A code fragment (ex: header) */
-DIV.fragment {
- width: 100%;
+div.fragment {
border: none;
- background-color: #CCCCCC
}
/* In the alpha list (coumpound index), style of an alphabetical index letter */
font-size: smaller
}
-BODY {
- background: #FFFFFF;
-}
-
/*div.div-page {
background-color: #FFFFFF;
margin-left: 1em;
span.preprocessor { color: #806020 }
span.stringliteral { color: #002080 }
span.charliteral { color: #008080 }
+
+/* @group Code Colorization */
+
+.fragment {
+ font-family: monospace, fixed;
+ font-size: 10pt;
+}
+
+pre.fragment {
+ width: 95%;
+ border: 1px solid #CCCCCC;
+ -moz-border-radius: 8px;
+ -moz-box-shadow:5px 5px 5px rgba(0, 0, 0, 0.15);
+ background-color:#EEF3F5;
+ padding: 4px 6px;
+ margin: 4px 1px 4px 1px;
+}
+
+/* Top Navigation style */
+
+div.navigation {
+ margin-bottom:20px;
+}
+
+/* Left navigation panel style */
+
+body.ftvtree {
+ background-color: #D9f4fd;
+ margin: 10px;
+}
+
+div.directory {
+ margin: 0;
+}
+
+div.directory.p {
+ margin: 0;
+}
+
+h3.swap {
+ font-size: 10pt;
+ margin-bottom: 0;
+}
+
+/* Link to any cross-referenced Doxygen element */
+a.el {
+ text-decoration: none;
+ font-family: Arial, Helvetica, sans-serif;
+ font-weight: bold;
+ font-size: 9pt;
+ color: #551a8b;
+}
+
+a.el:hover {
+ background-color: transparent;
+}
+
+a.elRef {
+ font-weight: normal;
+}
+
+
+#MSearchBox {
+ -moz-border-radius:8px 8px 8px 8px;
+ background-color:white;
+ border:1px solid #84B0C7;
+ margin:0;
+ padding:0;
+ white-space:nowrap;
+}
+
+div.directory img {
+ vertical-align:-30%;
+}
+
+div.directory p {
+ white-space:nowrap;
+ margin: 0;
+}
+
+div.directory-alt div {
+ display: none;
+ margin: 0px;
+}
+
+
+div.directory div {
+ display: none;
+ margin: 0px;
+}
+
+div.version {
+ background-color:#ffffde;
+ border:1px solid #cccccc;
+ font-family: Arial, Helvetica, sans-serif;
+ font-size: 9pt;
+ text-align: center;
+ width:100px;
+ -moz-border-radius: 8px;
+// -moz-box-shadow:5px 5px 5px rgba(0, 0, 0, 0.15);
+}
+
+/* @group Member Descriptions */
+
+.mdescLeft, .mdescRight,
+.memItemLeft, .memItemRight,
+.memTemplItemLeft, .memTemplItemRight, .memTemplParams {
+ background-color: #FAFAFA;
+ border: none;
+ margin: 4px;
+ padding: 1px 0 0 8px;
+}
+
+.mdescLeft, .mdescRight {
+ padding: 0px 8px 4px 8px;
+ color: #555;
+}
+
+.memItemLeft, .memItemRight, .memTemplParams {
+ border-top: 1px solid #ccc;
+}
+
+.memItemLeft, .memTemplItemLeft {
+ white-space: nowrap;
+}
+
+.memTemplParams {
+ color: #606060;
+ white-space: nowrap;
+}
+
+/* @end */
+
+/* Styles for detailed member documentation */
+
+.memtemplate {
+ font-size: 80%;
+ color: #606060;
+ font-weight: normal;
+ margin-left: 3px;
+}
+
+.memnav {
+ background-color: #e8eef2;
+ border: 1px solid #84b0c7;
+ text-align: center;
+ margin: 2px;
+ margin-right: 15px;
+ padding: 2px;
+}
+
+.memitem {
+ padding: 0;
+ margin-bottom: 10px;
+}
+
+.memname {
+ white-space: nowrap;
+ font-weight: bold;
+}
+
+.memproto, .memdoc {
+ border: 1px solid #84b0c7;
+}
+
+.memproto {
+ padding: 0;
+ background-color: #d5e1e8;
+ font-weight: bold;
+ -webkit-border-top-left-radius: 8px;
+ -webkit-border-top-right-radius: 8px;
+ -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
+ -moz-border-radius-topleft: 8px;
+ -moz-border-radius-topright: 8px;
+ -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px;
+
+}
+
+
+
+.memdoc {
+ padding: 2px 5px;
+ background-color: #eef3f5;
+ border-top-width: 0;
+ -webkit-border-bottom-left-radius: 8px;
+ -webkit-border-bottom-right-radius: 8px;
+ -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
+ -moz-border-radius-bottomleft: 8px;
+ -moz-border-radius-bottomright: 8px;
+ -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px;
+}
+
+.paramkey {
+ text-align: right;
+}
+
+.paramtype {
+ white-space: nowrap;
+}
+
+.paramname {
+ color: #602020;
+ white-space: nowrap;
+}
+.paramname em {
+ font-style: normal;
+}
+
+/* @end */
<head>
</head>
<body>
-<hr style="width: 100%; height: 2px;">
+<div class="footer">
<div style="text-align: center;">
-Copyright © 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE<br>
+Copyright © 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE<br>
Copyright © 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS<br>
</div>
+</div>
</body>
</html>
--- /dev/null
+<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+ <title>$title</title>
+ <link href="doxygen.css" rel="stylesheet" type="text/css">
+</head>
+<div class="header"></div>
+<div align="right"><div class="version">Version: @VERSION@</div></div>
+
-# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+# Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# File : Makefile.in
# Author : Vasily Rusyaev (Open Cascade NN)
# Module : doc
#
include $(top_srcdir)/adm_local/unix/make_common_starter.am
-EXTRA_DIST += images static
+EXTRA_DIST += images static/doxygen.css static/footer.html
+
+tuidocdir = $(docdir)/tui/VISU
+tuidoc_DATA = images/head.png images/visuscreen.png
+
dev_docs: doxyfile
echo "Running doxygen in directory: "`pwd`; \
-# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
#
# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
#---------------------------------------------------------------------------
# Project related configuration options
#---------------------------------------------------------------------------
-PROJECT_NAME = "Post-Pro Module Programming Guide v.@VERSION@"
+PROJECT_NAME = "SALOME Post-Pro Developer"
PROJECT_NUMBER =
OUTPUT_DIRECTORY = VISU
CREATE_SUBDIRS = NO
INPUT = @top_srcdir@/src \
@top_srcdir@/bin \
@top_srcdir@/idl \
- @top_builddir@/bin
-FILE_PATTERNS = *.idl *.hxx *.cxx *.h *.c *.hh *.cc @DOXYGEN_PYTHON_EXTENSION@
+ @top_builddir@/bin \
+ @srcdir@/input
+FILE_PATTERNS = *.idl *.hxx *.cxx *.h *.c *.hh *.cc @DOXYGEN_PYTHON_EXTENSION@ *.doc
RECURSIVE = YES
EXCLUDE =
EXCLUDE_SYMLINKS = NO
GENERATE_HTML = YES
HTML_OUTPUT = .
HTML_FILE_EXTENSION = .html
-HTML_HEADER = @srcdir@/static/myheader.html
+HTML_HEADER = @builddir@/static/header.html
HTML_FOOTER = @srcdir@/static/footer.html
HTML_STYLESHEET = @srcdir@/static/doxygen.css
HTML_ALIGN_MEMBERS = YES
--- /dev/null
+/*! \mainpage
+
+\image html visuscreen.png
+
+To browse the \b SALOME Post-Pro module Developer Documentation, follow the links below or use navigation menu at the top of the page:
+<ul>
+<li> <a href="namespaces.html">Packages</a> - list of TUI packages and scripts.</li>
+<li> <a href="annotated.html">Data Structures</a> - list of all data structures and classes with brief descriptions.</li>
+<li> <a href="files.html">Files</a> - list of all files with brief descriptions.</li>
+</ul>
+
+*/
\ No newline at end of file
-H1 {
+body {
+ font-family: Arial, Helvetica, sans-serif;
+ background-color: #ffffff;
+}
+
+h1 {
text-align: center;
+ text-decoration: none;
+ border: none;
+ line-height: 25px;
+ text-align: center;
+// text-transform:uppercase;
+ background: #D9f4fd;
+ font-size: 12pt;
+ font-weight: bold;
+ border: 1px solid #CCCCCC;
+ margin-top: 50px;
+ -moz-border-radius: 8px;
+ -moz-box-shadow:5px 5px 5px rgba(0, 0, 0, 0.15);
+}
+
+h2 {
+ font-size: 12pt;
+ font-weight: bold;
+}
+
+table {
+ font-size: 10pt;
+ padding-left: 20px;
}
CAPTION {
A.qindexRef {}
-/* Link to any cross-referenced Doxygen element */
-A.el {
- text-decoration: none;
- font-weight: bold
-}
-
-A.elRef {
- font-weight: bold
-}
-
/* Link to any cross-referenced Doxygen element inside a code section
(ex: header)
*/
A:hover {
text-decoration: none;
- background-color: lightblue
+ background-color: lightblue;
+}
+
+div.contents {
+ font-family: Arial, Helvetica, sans-serif;
+ font-size: 10pt;
+ padding: 20px;
+}
+
+div.navpath {
+ font-size: 11pt;
+}
+
+div.header {
+ background: url("head.png");
+ background-color: #175783;
+ border: 1px solid;
+ height: 80px;
+ background-repeat: no-repeat;
+ margin-bottom:20px;
+}
+
+div.tabs {
+ text-align: justify;
+ margin-left : 2px;
+ margin-right : 2px;
+ margin-top : 2px;
+ margin-bottom : 2px
+ font-weight: bold;
+ color: #FFFFFF;
+}
+
+div.footer {
+ background-color: #D9f4fd;
+ border: 1px solid #AAAAAA;
+ font-family: Arial, Helvetica, sans-serif;
+ font-size: 11px;
+ padding: 10px;
+}
+
+div.div-footer {
+ background-color: #D9f4fd;
+ border: 1px solid #AAAAAA;
+ font-family: Arial, Helvetica, sans-serif;
+ font-size: 11px;
+ padding: 10px;
+ text-align: center;
}
DL.el {
}
/* A code fragment (ex: header) */
-DIV.fragment {
- width: 100%;
+div.fragment {
border: none;
- background-color: #CCCCCC
}
/* In the alpha list (coumpound index), style of an alphabetical index letter */
font-size: smaller
}
-BODY {
- background: #FFFFFF;
-}
-
/*div.div-page {
background-color: #FFFFFF;
margin-left: 1em;
color: #FFFFFF;
}
-DIV.div-footer {
- margin-left: 1em;
- margin-right: 1em;
- margin-bottom: 0.2em;
- text-align: right;
- font-size: 9pt;
-}
-
/* In File List, Coumpound List, etc, 1st column of the index */
TD.indexkey {
- background-color: #CCCCCC;
+ background-color: #DDDDEE;
font-weight: bold;
padding-right : 10px;
padding-top : 2px;
/* In File List, Coumpound List, etc, 2nd column of the index */
TD.indexvalue {
- background-color: #CCCCCC;
+ background-color: #EEEEFF;
font-style: italic;
padding-right : 10px;
padding-top : 2px;
span.preprocessor { color: #806020 }
span.stringliteral { color: #002080 }
span.charliteral { color: #008080 }
+
+/* @group Code Colorization */
+
+.fragment {
+ font-family: monospace, fixed;
+ font-size: 10pt;
+}
+
+pre.fragment {
+ width: 95%;
+ border: 1px solid #CCCCCC;
+ -moz-border-radius: 8px;
+ -moz-box-shadow:5px 5px 5px rgba(0, 0, 0, 0.15);
+ background-color:#EEF3F5;
+ padding: 4px 6px;
+ margin: 20px;
+}
+
+/* Top Navigation style */
+
+div.navigation {
+ margin-bottom:20px;
+}
+
+/* Left navigation panel style */
+
+body.ftvtree {
+ background-color: #D9f4fd;
+ margin: 10px;
+}
+
+div.directory {
+ margin: 0;
+}
+
+div.directory.p {
+ margin: 0;
+}
+
+h3.swap {
+ font-size: 10pt;
+ margin-bottom: 0;
+}
+
+/* Link to any cross-referenced Doxygen element */
+a.el {
+ text-decoration: none;
+ font-family: Arial, Helvetica, sans-serif;
+ font-weight: bold;
+ font-size: 10pt;
+ color: #551a8b;
+}
+
+a.el:hover {
+ background-color: transparent;
+ color: #551acc;
+}
+
+a {
+// text-decoration: none;
+ font-family: Arial, Helvetica, sans-serif;
+ font-weight: bold;
+ font-size: 10pt;
+ color: #551a8b;
+}
+
+a:hover {
+ background-color: transparent;
+ color: #551acc;
+}
+
+a.elRef {
+ font-weight: normal;
+}
+
+
+#MSearchBox {
+ -moz-border-radius:8px 8px 8px 8px;
+ background-color:white;
+ border:1px solid #84B0C7;
+ margin:0;
+ padding:0;
+ white-space:nowrap;
+}
+
+div.directory img {
+ vertical-align:-30%;
+}
+
+div.directory p {
+ white-space:nowrap;
+ margin: 0;
+}
+
+div.directory-alt div {
+ display: none;
+ margin: 0px;
+}
+
+
+div.directory div {
+ display: none;
+ margin: 0px;
+}
+
+div.version {
+ background-color:#ffffde;
+ border:1px solid #cccccc;
+ font-family: Arial, Helvetica, sans-serif;
+ font-size: 9pt;
+ text-align: center;
+ width:100px;
+ -moz-border-radius: 8px;
+ // -moz-box-shadow:5px 5px 5px rgba(0, 0, 0, 0.15);
+}
+
+/* @group Member Descriptions */
+
+.mdescLeft, .mdescRight,
+.memItemLeft, .memItemRight,
+.memTemplItemLeft, .memTemplItemRight, .memTemplParams {
+ background-color: #FAFAFA;
+ border: none;
+ margin: 4px;
+ padding: 1px 0 0 8px;
+}
+
+.mdescLeft, .mdescRight {
+ padding: 0px 8px 4px 8px;
+ color: #555;
+}
+
+.memItemLeft, .memItemRight, .memTemplParams {
+ border-top: 1px solid #ccc;
+}
+
+.memItemLeft, .memTemplItemLeft {
+ white-space: nowrap;
+}
+
+.memTemplParams {
+ color: #606060;
+ white-space: nowrap;
+}
+
+/* @end */
+
+/* Styles for detailed member documentation */
+
+.memtemplate {
+ font-size: 80%;
+ color: #606060;
+ font-weight: normal;
+ margin-left: 3px;
+}
+
+.memnav {
+ background-color: #e8eef2;
+ border: 1px solid #84b0c7;
+ text-align: center;
+ margin: 2px;
+ margin-right: 15px;
+ padding: 2px;
+}
+
+.memitem {
+ padding: 0;
+ margin-bottom: 10px;
+}
+
+.memname {
+ white-space: nowrap;
+ font-weight: bold;
+}
+
+.memproto, .memdoc {
+ border: 1px solid #84b0c7;
+}
+
+.memproto {
+ padding: 0;
+ background-color: #d5e1e8;
+ font-weight: bold;
+ -webkit-border-top-left-radius: 8px;
+ -webkit-border-top-right-radius: 8px;
+ -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
+ -moz-border-radius-topleft: 8px;
+ -moz-border-radius-topright: 8px;
+ -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px;
+
+}
+
+
+
+.memdoc {
+ padding: 2px 5px;
+ background-color: #eef3f5;
+ border-top-width: 0;
+ -webkit-border-bottom-left-radius: 8px;
+ -webkit-border-bottom-right-radius: 8px;
+ -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
+ -moz-border-radius-bottomleft: 8px;
+ -moz-border-radius-bottomright: 8px;
+ -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px;
+}
+
+.paramkey {
+ text-align: right;
+}
+
+.paramtype {
+ white-space: nowrap;
+}
+
+.paramname {
+ color: #602020;
+ white-space: nowrap;
+}
+.paramname em {
+ font-style: normal;
+}
+
+/* @end */
-</DIV>
-<DIV class="div-footer">
-Generated on $datetime for $projectname by <A href="http://www.doxygen.org/index.html"><img src="doxygen.png" alt="doxygen" align="middle" border="0"></A> $doxygenversion</DIV>
-</BODY>
-</HTML>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+</head>
+<body>
+<div class="footer">
+<!--hr style="width: 100%; height: 2px;"-->
+<div style="text-align: center;">
+Copyright © 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE<br>
+Copyright © 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS<br>
+</div>
+</div>
+</body>
+</html>
--- /dev/null
+<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+ <meta name="GENERATOR" content="Mozilla/4.73 [en] (WinNT; I) [Netscape]">
+ <title>$title</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+<link href="tabs.css" rel="stylesheet" type="text/css">
+</head>
+<body>
+<div class="header"></div>
+<div align="right"><div class="version">Version: @VERSION@</div></div>
+</body>
+</html>
-# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+# Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# This Makefile is responsible of generating the client and server
# implementation of IDL interfaces for both C++ and python usage.
# The building process of the C++ files is in charge of each source
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : VISU_Gen.idl
// Author : Alexey Petrov
//
NODE, /*!< Node corresponds to a geometrical point. */
EDGE, /*!< Edge corresponds to a geometrical line connecting two points. */
FACE, /*!< Face corresponds to a geometrical plane bounded by several lines. */
- CELL, /*!< Cell is a volumic element of a mesh */
+ CELL, /*!< Cell is a volumic element of a mesh */
NONE /*!< Indicates undefined entity value */
};
+ /*!
+ * Marker type (used for point rendering)
+ */
+ enum MarkerType {
+ MT_NONE,
+ MT_POINT,
+ MT_PLUS,
+ MT_STAR,
+ MT_O,
+ MT_X,
+ MT_O_POINT,
+ MT_O_PLUS,
+ MT_O_STAR,
+ MT_O_X,
+ MT_USER
+ };
+
+ /*!
+ * Marker scale (used for point rendering)
+ */
+ enum MarkerScale {
+ MS_NONE,
+ MS_10,
+ MS_15,
+ MS_20,
+ MS_25,
+ MS_30,
+ MS_35,
+ MS_40,
+ MS_45,
+ MS_50,
+ MS_55,
+ MS_60,
+ MS_65,
+ MS_70
+ };
+
+ /*!
+ * Tables' sort order
+ */
+ enum SortOrder {
+ AscendingOrder, /*!< The table items are sorted ascending */
+ DescendingOrder /*!< The table items are sorted descending */
+ };
+
+ /*!
+ * Tables' sort policy (specifies how empty cells are taken into account when sorting)
+ */
+ enum SortPolicy {
+ EmptyLowest, /*!< Empty cells are considered as lowest values */
+ EmptyHighest, /*!< Empty cells are considered as highest values */
+ EmptyFirst, /*!< Empty cells are always first */
+ EmptyLast, /*!< Empty cells are always last */
+ EmptyIgnore /*!< Empty cells are ignored (stay at initial positions) */
+ };
+
/*!
* This enumeration contains a set of elements defining the type of the %VISU object.
* This enumeration is used for navigation between a set of %VISU interfaces.
*/
void GetOffset(out float theDx, out float theDy, out float theDz);
+ /*!
+ * Set standard point marker for the object
+ * \param theType standard marker type
+ * \param theScale standard marker scale
+ */
+ void SetMarkerStd(in MarkerType theType, in MarkerScale theScale);
+
+ /*!
+ * Set custom point marker for the object. The texture can be added
+ * by LoadTexture() function
+ * \param theTextureId texture ID
+ */
+ void SetMarkerTexture(in long theTextureId);
+
+ /*!
+ * Get type of the point marker assigned to the object
+ * \return current marker type (MT_NONE if no marker is set)
+ */
+ MarkerType GetMarkerType();
+
+ /*!
+ * Get scale of the point marker assigned to the object
+ * \return current marker scale (MS_NONE if no marker is set)
+ */
+ MarkerScale GetMarkerScale();
+
+ /*!
+ * Get texture idenifier of the point marker assigned to the object
+ * \return marker texture ID (0 if no marker set)
+ */
+ long GetMarkerTexture();
+
/*!
* Gets memory size actually used by the presentation (Mb).
*/
* \return Long value corresponding to the number of columns of the table
*/
long GetNbColumns();
+
+ /*!
+ * Sorts the specified row of the table.
+ * \param theRow Index of the row to sort
+ * \param theSortOrder Sort order (see <VAR>SortOrder</VAR> enumeration)
+ * \param theSortPolicy Sort policy (see <VAR>SortPolicy</VAR> enumeration)
+ */
+ void SortRow(in long theRow, in SortOrder theSortOrder, in SortPolicy theSortPolicy);
+
+ /*!
+ * Sorts the specified column of the table.
+ * \param theRow Index of the column to sort
+ * \param theSortOrder Sort order (see <VAR>SortOrder</VAR> enumeration)
+ * \param theSortPolicy Sort policy (see <VAR>SortPolicy</VAR> enumeration)
+ */
+ void SortColumn(in long theColumn, in SortOrder theSortOrder, in SortPolicy theSortPolicy);
+
+ /*!
+ * Sorts the table by the specified row.
+ * \param theRow Index of the row, by which the table has to be sort
+ * \param theSortOrder Sort order (see <VAR>SortOrder</VAR> enumeration)
+ * \param theSortPolicy Sort policy (see <VAR>SortPolicy</VAR> enumeration)
+ */
+ void SortByRow(in long theRow, in SortOrder theSortOrder, in SortPolicy theSortPolicy);
+
+ /*!
+ * Sorts the table by the specified column.
+ * \param theColumn Index of the column, by which the table has to be sort
+ * \param theSortOrder Sort order (see <VAR>SortOrder</VAR> enumeration)
+ * \param theSortPolicy Sort policy (see <VAR>SortPolicy</VAR> enumeration)
+ */
+ void SortByColumn(in long theColumn, in SortOrder theSortOrder, in SortPolicy theSortPolicy);
};
//-------------------------------------------------------
*/
string setDumpFormat(in string theFormat);
+ /*! Set frequency of timestamps used to generate AVI file.
+ * \param theFrequency The frequency of timestamps to use.
+ */
+ void setTimeStampFrequency(in long theFrequency);
+
+ /*! Get frequency of timestamps used to generate AVI file.
+ * \return The frequency of timestamps to use.
+ */
+ long getTimeStampFrequency();
+
/*! Returns True, if the playback of the animation is cycling.
*/
boolean isCycling();
ViewManager GetViewManager();
/*!
- * Imports tables from a file and create TableAttribute in Sudy
+ * Imports tables from a file and create TableAttribute in Study
*/
- SALOMEDS::SObject ImportTables(in string theFileName);
+ SALOMEDS::SObject ImportTables(in string theFileName,
+ in boolean theFirstStrAsTitle);
/*!
* Export table to a file
/*!
* Creates a curve on the basis of points, whose values are taken from the table.
* \param theTable Table containing the data for construction of curves.
- * \param HRow Index of the row in the table: abscissa of the point.
- * \param VRow Index of the row in the table: ordinate of the point.
+ * \param theHRow Index of the row in the table: abscissa of the point.
+ * \param theVRow Index of the row in the table: ordinate of the point.
*/
Curve CreateCurve(in Table theTable, in long theHRow, in long theVRow);
* Creates a curve on the basis of points, whose values are taken from the table.
* Each point has also assigned value, that will be shown as tooltip in Plot2d
* \param theTable Table containing the data for construction of curves.
- * \param HRow Index of the row in the table: abscissa of the point.
- * \param VRow Index of the row in the table: ordinate of the point.
- * \param ZRow Index of the row in the table: assigned value (so-called as Z).
+ * \param theHRow Index of the row in the table: abscissa of the point.
+ * \param theVRow Index of the row in the table: ordinate of the point.
+ * \param theZRow Index of the row in the table: assigned value (so-called as Z).
*/
Curve CreateCurveWithZ( in Table theTable, in long theHRow, in long theVRow, in long theZRow );
+ /*!
+ * Creates a curve on the basis of points, whose values are taken from the table.
+ * Each point has also assigned value, that will be shown as tooltip in Plot2d.
+ * The curve can be displayed using right axis of Plot2d view.
+ * \param theTable Table containing the data for construction of curves.
+ * \param theHRow Index of the row in the table: abscissa of the point.
+ * \param theVRow Index of the row in the table: ordinate of the point.
+ * \param theZRow Index of the row in the table: assigned value (so-called as Z).
+ * \param theIsV2 Flag allowed to display the curve using right axis of Plot2d view.
+ */
+ Curve CreateCurveWithZExt( in Table theTable, in long theHRow, in long theVRow, in long theZRow,
+ in boolean theIsV2 );
+
/*!
* Creates a presentation form containing an array of references to the curves.
*/
in string theMeshName,
in double_array theTStamps );
+ /*!
+ * Load texture from file
+ * \param theTextureFile texture file name
+ * \return unique texture identifier
+ */
+ long LoadTexture(in string theTextureFile);
};
/*! \brief %View interface
-# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+# Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-# $Header$
-#
+
include $(top_srcdir)/adm_local/unix/make_common_starter.am
#
Visu_isosurfaces.png \
Visu_load_texture.png \
Visu_ok.png \
-Visu_PlaneSegmentation.png \
Visu_plot2d.png \
Visu_plot3d.png \
Visu_point_selection.png \
Visu_points.png \
-Visu_recording_pause.png \
-Visu_recording_play.png \
-Visu_recording_start.png \
Visu_recording_stop.png \
Visu_remove.png \
Visu_sameas.png \
Visu_selectionedge.png \
Visu_selectionpoint.png \
Visu_selectonly.png \
-Visu_SphereSegmentation.png \
Visu_streamlines.png \
Visu_surface.png \
Visu_tree_container.png \
Visu_tree_vectors.png \
Visu_tree_visu.png \
Visu_vectors.png \
-Visu_vvtk_switch.png \
Visu_wireframe.png \
Visu_slider_more.png \
Visu_slider_avi.png \
<!--
- Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+ Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
<parameter name="plot3d_represent" value="2"/>
<parameter name="scalar_def_represent" value="2"/>
<parameter name="scalar_def_shrink" value="false"/>
- <parameter name="floating_point_precision" value="6"/>
+ <!-- Input field precisions -->
+ <parameter name="length_precision" value="-3" />
+ <parameter name="angle_precision" value="-3" />
+ <parameter name="len_tol_precision" value="3" />
+ <parameter name="parametric_precision" value="-3" />
+ <parameter name="memory_precision" value="1" />
+ <parameter name="visual_data_precision" value="-6"/>
+
<parameter name="quadratic_mode" value="0" />
<parameter name="max_angle" value="2" />
<parameter name="elem0d_size" value="5" />
<parameter name="show_non_manifold_edges" value="false"/>
<parameter name="feature_edges_coloring" value="false"/>
<parameter name="edge_color" value="255, 255, 255"/>
+ <parameter name="type_of_marker" value="1"/>
+ <parameter name="marker_scale" value="9"/>
+ <parameter name="tables_enable_editing" value="false"/>
+ <parameter name="tables_sort_policy" value="3"/>
<parameter name="scalar_bar_horizontal_height" value="0.08"/>
<parameter name="scalar_bar_horizontal_width" value="0.8" />
<parameter name="scalar_bar_horizontal_x" value="0.1"/>
<parameter name="cycled_animation" value="false"/>
<parameter name="use_proportional_timing" value="false"/>
<parameter name="clean_memory_at_each_frame" value="false"/>
+ <parameter name="dump_mode" value="0"/>
+ <parameter name="time_stamp_frequency" value="1"/>
<parameter name="mouse_behaviour" value="0" />
<parameter name="speed_increment" value="10" />
<parameter name="spacemouse_func1_btn" value="1" />
<?xml version='1.0' encoding='us-ascii' ?>
<!--
- Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+ Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
<?xml version='1.0' encoding='us-ascii'?>
<!DOCTYPE application PUBLIC "" "desktop.dtd">
<!--
- Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+ Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
<?xml version='1.0' encoding='us-ascii'?>
<!DOCTYPE application PUBLIC "" "desktop.dtd">
<!--
- Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+ Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+# Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# VISU OBJECT : interactive object for VISU entities implementation
# File : Makefile.am
# Module : VISU
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File: VISUConvertor.cxx
// Author: Alexey PETROV
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : VISUConvertor.hxx
// Author : Oleg UVAROV
// Module : VISU
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SALOME OBJECT : kernel of SALOME component
// File : VISU_GeometryFilter.cxx
// Author :
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
#ifndef VISU_APPENDFILTER_H
#define VISU_APPENDFILTER_H
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SALOME OBJECT : kernel of SALOME component
// File : VISU_GeometryFilter.cxx
// Author :
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
#ifndef VISU_APPENDFILTERUTILITIES_H
#define VISU_APPENDFILTERUTILITIES_H
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SALOME OBJECT : kernel of SALOME component
// File : VTKViewer_GeometryFilter.cxx
// Author :
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
#ifndef VISU_APPENDPOLYDATA_H
#define VISU_APPENDPOLYDATA_H
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : VISU_CommonCellsFilter.cxx
// Created : Wed Apr 4 08:45:07 2007
// Author : Eugeny NIKOLAEV (enk)
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : VISU_CommonCellsFilter.hxx
// Created : Tue Apr 3 16:16:53 2007
// Author : Eugeny NIKOLAEV (enk)
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File: VISU_Convertor.cxx
// Author: Alexey PETROV
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU CONVERTOR :
// File : VISU_Convertor.hxx
// Author : Alexey PETROV
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU CONVERTOR :
// File :
// Author :
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU CONVERTOR :
// File :
// Author :
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File : VISU_Convertor_impl.cxx
// Author : Alexey PETROV
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File : VISU_ConvertorUtils.hxx
// Author : Alexey PETROV
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File : VISU_Convertor_impl.cxx
// Author : Alexey PETROV
aFamilyArr.resize(aFamilySet.size());
for(vtkIdType anID = 0; anIter != aFamilySet.end(); anIter++, anID++){
- VISU::PFamilyImpl aFamily = *anIter;
+ VISU::PFamilyImpl aFamily = (*anIter).second;
const std::string& aFamilyName = aFamily->myName;
const VISU::TEntity& anEntity = aFamily->myEntity;
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SALOME VTKViewer : build VTK viewer into Salome desktop
// File :
// Author :
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : VISU_ElnoMeshValue.hxx
// Author : Alexey PETROV
// Module : VISU
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU CONVERTOR :
// File: VISU_ExtractUnstructuredGrid.cxx
// Author: Alexey PETROV
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU CONVERTOR :
// File : VISU_ExtractUnstructuredGrid.hxx
// Author : Alexey PETROV
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SALOME VTKViewer : build VTK viewer into Salome desktop
// File :
// Author :
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SALOME VTKViewer : build VTK viewer into Salome desktop
// File :
// Author :
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File:
// Author:
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU CONVERTOR :
// File : VISU_Convertor.hxx
// Author : Alexey PETROV
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File : VISU_MedConvertor.cxx
// Author : Alexey PETROV
if(aName == aFamilyName){
aFamily = aFamilyMapIter->second;
aVEntity = aFamily->myEntity;
- goto exit_lable;
+ if(aFamily && aVEntity >= 0){
+ aFamilySet.insert(VISU::TEnity2Family(aVEntity, aFamily));
+ INITMSG(MY_GROUP_DEBUG,
+ "- aFamilyName = '"<<aFamilyName<<"'"<<
+ "; aVEntity = "<<aVEntity<<
+ "\n");
+ }
}
}
}
- exit_lable:
- if(aFamily && aVEntity >= 0){
- aFamilySet.insert(aFamily);
- INITMSG(MY_GROUP_DEBUG,
- "- aFamilyName = '"<<aFamilyName<<"'"<<
- "; aVEntity = "<<aVEntity<<
- "\n");
- }
}
if(!aFamilySet.empty())
aGroupMap.insert(VISU::TGroupMap::value_type(aGroupName,aGroup));
int isPointsUpdated = 0, isCellsOnEntityUpdated = 0;
VISU::TFamilySet::const_iterator aFamilyIter = theFamilySet.begin();
for(; aFamilyIter != theFamilySet.end(); aFamilyIter++){
- VISU::PMEDFamily aFamily = *aFamilyIter;
+ VISU::PMEDFamily aFamily = (*aFamilyIter).second;
const VISU::TEntity& anEntity = aFamily->myEntity;
const VISU::PMEDMeshOnEntity aMeshOnEntity = theMesh->myMeshOnEntityMap[anEntity];
isPointsUpdated += LoadPoints(myMed, theMesh);
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : VISU_MedConvertor.hxx
// Author : Alexey PETROV
// Module : VISU
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SALOME VTKViewer : build VTK viewer into Salome desktop
// File :
// Author :
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SALOME VTKViewer : build VTK viewer into Salome desktop
// File :
// Author :
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SALOME VTKViewer : build VTK viewer into Salome desktop
// File :
// Author :
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SALOME VTKViewer : build VTK viewer into Salome desktop
// File :
// Author :
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File:
// Author:
// Module : VISU
-
+//
#include "VISU_MeshValue.hxx"
#include "VISU_ElnoMeshValue.hxx"
#include "VISU_Structures_impl.hxx"
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU CONVERTOR :
// File : VISU_Convertor.hxx
// Author : Alexey PETROV
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File:
// Author:
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU CONVERTOR :
// File : VISU_Convertor.hxx
// Author : Alexey PETROV
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File:
// Author: Alexey PETROV
// Module : VISU
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File :
// Author : Alexey PETROV
// Module : VISU
bool VISU_CONVERTOR_EXPORT
operator<(const PFamily& theLeft, const PFamily& theRight);
- typedef std::set<PFamily> TFamilySet;
+ typedef std::pair<TEntity, PFamily> TEnity2Family;
+ typedef std::set<TEnity2Family> TFamilySet;
//! Define a basic class for MED GROUP entity
struct VISU_CONVERTOR_EXPORT TGroup: virtual TUnstructuredGridIDMapper
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File:
// Author: Alexey PETROV
// Module : VISU
-
+//
#include "VISU_Structures_impl.hxx"
#include "VISU_PointCoords.hxx"
#include "VISU_MeshValue.hxx"
vtkIdType aNbCells = 0, aCellsSize = 0;
TFamilySet::const_iterator anIter = myFamilySet.begin();
for(; anIter != myFamilySet.end(); anIter++){
- PFamilyImpl aFamily = *anIter;
+ PFamilyImpl aFamily = (*anIter).second;
aNbCells += aFamily->myNbCells;
aCellsSize += aFamily->myCellsSize;
}
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File :
// Author : Alexey PETROV
// Module : VISU
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File:
// Author:
return !theStmIn.eof();
}
+
+ //=======================================================================
+ //function : findNextCell
+ //purpose : auxilary for ImportCSVTable
+ //=======================================================================
+ bool findNextCell(std::ifstream& aStmIn, QString& aStr,
+ QString& aCell, const char theSeparator)
+ {
+ aCell = "";
+ int index, tmpind = 0;
+ if( aStr.at(0) == theSeparator ) {
+ aStr.remove(0,1);
+ aStr = aStr.trimmed();
+ if(aStr.size()==0) return true;
+ }
+ QString aTmp = aStr;
+ if( aTmp.at(0) == '"' ) {
+ // find closed "
+ while( !aStmIn.eof() ) {
+ tmpind = aTmp.indexOf('"',1);
+ if( tmpind < 0 ) {
+ while( !aStmIn.eof() ) {
+ aCell.push_back(aTmp);
+ aCell.push_back('\n');
+ getLine( aStmIn, aTmp );
+ tmpind = aTmp.indexOf('"',1);
+ if( tmpind >= 0 ) {
+ break;
+ }
+ }
+ }
+ if(tmpind < 0)
+ return false;
+ // read next symbol
+ if( aTmp.at(tmpind+1) == '"' ) {
+ // "" is found => need to continue
+ aCell.push_back(aTmp.left(tmpind+1));
+ aTmp = aTmp.mid(tmpind+2);
+ }
+ else if( aTmp.at(tmpind+1) == theSeparator ) {
+ index = tmpind+1;
+ break;
+ }
+ else {
+ return false;
+ }
+ }
+ }
+ else {
+ // find index for separator
+ index = aTmp.indexOf( theSeparator );
+ }
+ if( index < 0 ) {
+ aCell += aTmp;
+ aStr = "";
+ }
+ else {
+ if(index>0) aCell += aTmp.left(index);
+ aStr = aTmp.mid(index).trimmed();
+ }
+ if( aCell.size()>0 && aCell.at(0) == '"' ) {
+ // remove first and last symbols
+ int last = aCell.size()-1;
+ aCell.remove(last,1);
+ aCell.remove(0,1);
+ }
+ // replace "" to " in aCell
+ QChar ctmp = '"';
+ QString tmp(ctmp);
+ tmp += ctmp;
+ index = aCell.indexOf(tmp);
+ while(index>=0) {
+ aCell.remove(index,1);
+ index = aCell.indexOf(tmp);
+ }
+ return true;
+ }
+
}
//---------------------------------------------------------------
void
-VISU::ImportTables( const char* theFileName, TTableContainer& theContainer )
+VISU::ImportTables( const char* theFileName, TTableContainer& theContainer,
+ bool theFirstStrAsTitle)
{
std::ifstream aStmIn;
QFileInfo aFileInfo( theFileName );
if( !aFileInfo.isFile() || !aFileInfo.isReadable() || !aFileInfo.size() )
return;
+ QString tmp(theFileName);
+ tmp = tmp.trimmed();
+ tmp = tmp.right(3).trimmed();
+
+ if( tmp == QString("csv") ) {
+ const char separator = ',';
+ ImportCSVTable(theFileName, theContainer, theFirstStrAsTitle, separator);
+ return;
+ }
+
aStmIn.open( theFileName );
QString aTmp;
do {
// find beginning of table (tables are separated by empty lines)
- while( ::getLine( aStmIn, aTmp ) && aTmp.trimmed() == "");
+ while( getLine( aStmIn, aTmp ) && aTmp.trimmed() == "" );
PTableIDMapper aTableIDMapper( new TTableIDMapper() );
TTable2D& aTable2D = *aTableIDMapper;
if(MYDEBUG) std::cout << "New table is found" << std::endl;
+ bool IsFirst = true;
while( !aStmIn.eof() && aTmp.trimmed() != "" ){
QString data = aTmp.trimmed();
QString cmt = "";
else {
TTable2D::TRow aRow;
if(MYDEBUG) std::cout << "...New row is found: " << std::endl;
- if ( !cmt.isEmpty() ) {
- aRow.myTitle = cmt.toLatin1().constData();
- if(MYDEBUG) std::cout << "......ROW TITLE is: " << cmt.toLatin1().constData() << std::endl;
- }
QString datar1 = data.replace(QRegExp("\t"), " ");
QStringList aValList = datar1.split( " ", QString::SkipEmptyParts );
- for ( int i = 0; i < aValList.count(); i++ ) {
- if ( aValList[i].trimmed() != "" ) {
- TTable2D::TValue aVal = aValList[i].trimmed().toLatin1().constData();
- aRow.myValues.push_back( aVal );
+ if( aTable2D.myColumnTitles.size()==0 && IsFirst && theFirstStrAsTitle ) {
+ for ( int i = 0; i < aValList.count(); i++ ) {
+ QString tmpstr = aValList[ i ].trimmed();
+ aTable2D.myColumnTitles.push_back( tmpstr.toLatin1().constData() );
}
}
- if( aRow.myValues.size() > 0 )
- aTable2D.myRows.push_back( aRow );
+ else {
+ if ( !cmt.isEmpty() ) {
+ aRow.myTitle = cmt.toLatin1().constData();
+ if(MYDEBUG) std::cout << "......ROW TITLE is: " << cmt.toLatin1().constData() << std::endl;
+ }
+ //QString datar1 = data.replace(QRegExp("\t"), " ");
+ //QStringList aValList = datar1.split( " ", QString::SkipEmptyParts );
+ for ( int i = 0; i < aValList.count(); i++ ) {
+ if ( aValList[i].trimmed() != "" ) {
+ TTable2D::TValue aVal = aValList[i].trimmed().toLatin1().constData();
+ aRow.myValues.push_back( aVal );
+ }
+ }
+ if( aRow.myValues.size() > 0 )
+ aTable2D.myRows.push_back( aRow );
+ }
+ IsFirst = false;
// ************** OLD CODE ******************
/*
TValue aVal;
*/
// ************** OLD CODE ******************
}
- ::getLine( aStmIn, aTmp );
+ getLine( aStmIn, aTmp );
}
if( aTable2D.Check() ) {
if(MYDEBUG) std::cout << "aTable2D is checked OK " << aTable2D.myTitle << std::endl;
}
+//=======================================================================
+//function : ImportCSVTable
+//purpose :
+//=======================================================================
+void VISU::ImportCSVTable(const char* theFileName, TTableContainer& theContainer,
+ bool theFirstStrAsTitle, const char theSeparator)
+{
+ std::ifstream aStmIn;
+ QFileInfo aFileInfo( theFileName );
+ if( !aFileInfo.isFile() || !aFileInfo.isReadable() || !aFileInfo.size() )
+ return;
+ aStmIn.open( theFileName );
+ QString aTmp;
+ do {
+ // find beginning of table (tables are separated by empty lines)
+ while( getLine( aStmIn, aTmp ) && aTmp.trimmed() == "" );
+
+ PTableIDMapper aTableIDMapper( new TTableIDMapper() );
+ TTable2D& aTable2D = *aTableIDMapper;
+ if(MYDEBUG) std::cout << "New table is found" << std::endl;
+
+ bool IsFirst = true;
+ QStringList aValList;
+
+ while( !aStmIn.eof() ) {
+ QString aCell = "";
+ if( !( findNextCell(aStmIn, aTmp, aCell, theSeparator)) ) {
+ return;
+ }
+ if( aTmp.size()==0 ) {
+ // make table row
+ aValList.push_back(aCell);
+ if( IsFirst && theFirstStrAsTitle ) {
+ for ( int i = 0; i < aValList.count(); i++ ) {
+ aTable2D.myColumnTitles.push_back( aValList[i].trimmed().toLatin1().constData() );
+ }
+ }
+ else {
+ TTable2D::TRow aRow;
+ for ( int i = 0; i < aValList.count(); i++ ) {
+ if ( aValList[i].trimmed() != "" ) {
+ TTable2D::TValue aVal = aValList[i].trimmed().toLatin1().constData();
+ aRow.myValues.push_back( aVal );
+ }
+ else {
+ aRow.myValues.push_back( "Empty" );
+ }
+ }
+ if( aRow.myValues.size() > 0 ) {
+ aTable2D.myRows.push_back( aRow );
+ }
+ }
+ // clear list of values and read next string
+ aValList.clear();
+ getLine( aStmIn, aTmp );
+ IsFirst = false;
+ }
+ else {
+ // put value to table cell
+ aValList.push_back(aCell);
+ }
+ }
+
+ if( aTable2D.Check() ) {
+ if(MYDEBUG) std::cout << "aTable2D is checked OK " << aTable2D.myTitle << std::endl;
+ theContainer.push_back( aTableIDMapper );
+ }
+
+ } while ( !aStmIn.eof() );
+ aStmIn.close();
+
+ if(MYDEBUG) std::cout << "After close" << std::endl;
+}
+
+
//---------------------------------------------------------------
VISU::TTableIDMapper
::TTableIDMapper():
myOutput->ShallowCopy( aFilter->GetOutput() );
aFilter->Delete();
}
+
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU CONVERTOR :
// File : VISU_TableReader.hxx
// Author : Alexey PETROV
//---------------------------------------------------------------
typedef std::vector<PTableIDMapper> TTableContainer;
VISU_CONVERTOR_EXPORT
- void ImportTables( const char* theFileName, TTableContainer& theContainer );
+ void ImportTables( const char* theFileName, TTableContainer& theContainer,
+ bool theFirstStrAsTitle = false);
+ void ImportCSVTable(const char* theFileName,
+ TTableContainer& theContainer,
+ bool theFirstStrAsTitle,
+ const char theSeparator);
//---------------------------------------------------------------
}
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File : VISU_TypeList.hxx
// Author : Oleg UVAROV
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU CONVERTOR :
// File : VISU_UsedPointsFilter.cxx
// Author :
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU CONVERTOR :
// File : VISU_UsedPointsFilter.hxx
// Author :
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File : VISU_VTKTypeList.hxx
// Author : Oleg UVAROV
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : VISU_Vtk2MedConvertor.cxx
// Author : Eugeny NIKOLAEV, Open CASCADE SAS
//
-
#include "VISU_Vtk2MedConvertor.hxx"
// QT includes
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : VISU_Vtk2MedConvertor.hxx
// Author : Eugeny NIKOLAEV, Open CASCADE SAS
//
-
#ifndef VISU_VTK2MEDCONVERTOR_H
#define VISU_VTK2MEDCONVERTOR_H
-# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+# Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# File : Makefile.in
# Author : Alexey Petrov
# Module : VISU
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
#include "VISU_Engine_i.hh"
#include "utilities.h"
}
- SALOMEDS::SObject_ptr VISU_Gen_i::ImportTables(const char* theFileName){
- return myVisuGen->ImportTables(theFileName);
+ SALOMEDS::SObject_ptr VISU_Gen_i::ImportTables(const char* theFileName,
+ bool theFirstStrAsTitle)
+ {
+ return myVisuGen->ImportTables(theFileName,theFirstStrAsTitle);
}
return myVisuGen->CreateCurveWithZ(theTable,theHRow,theVRow,theZRow);
}
+ Curve_ptr VISU_Gen_i::CreateCurveWithZExt(Table_ptr theTable,
+ CORBA::Long theHRow,
+ CORBA::Long theVRow,
+ CORBA::Long theZRow,
+ CORBA::Boolean theIsV2)
+ {
+ return myVisuGen->CreateCurveWithZExt(theTable,theHRow,theVRow,theZRow,theIsV2);
+ }
Container_ptr VISU_Gen_i::CreateContainer(){
return myVisuGen->CreateContainer();
return myVisuGen->VTK2MED(theVTKFiles, theMEDFile, theMeshName, theTStamps);
}
+ /* Load texture from file */
+ CORBA::Long VISU_Gen_i::LoadTexture(const char* theTextureFile)
+ {
+ return myVisuGen->LoadTexture(theTextureFile);
+ }
};
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
#ifndef __VISU_ENGINE_I_H__
#define __VISU_ENGINE_I_H__
virtual ViewManager_ptr GetViewManager();
- virtual SALOMEDS::SObject_ptr ImportTables(const char* theFileName);
- virtual CORBA::Boolean ExportTableToFile(SALOMEDS::SObject_ptr theTable, const char* theFileName);
+ virtual SALOMEDS::SObject_ptr ImportTables(const char* theFileName,
+ bool theFirstStrAsTitle = false);
+ virtual CORBA::Boolean ExportTableToFile(SALOMEDS::SObject_ptr theTable,
+ const char* theFileName);
//Create Result
virtual Result_ptr ImportFile(const char* theFileName);
virtual Result_ptr ImportMedField(SALOME_MED::FIELD_ptr theField);
//Create Presentation Of Submeshes
- virtual Mesh_ptr MeshOnEntity(Result_ptr theResult, const char* theMeshName, VISU::Entity theEntity);
+ virtual Mesh_ptr MeshOnEntity(Result_ptr theResult, const char* theMeshName,
+ VISU::Entity theEntity);
virtual Mesh_ptr FamilyMeshOnEntity(Result_ptr theResult, const char* theMeshName,
VISU::Entity theEntity, const char* theFamilyName);
- virtual Mesh_ptr GroupMesh(Result_ptr theResult, const char* theMeshName, const char* theGroupName);
+ virtual Mesh_ptr GroupMesh(Result_ptr theResult, const char* theMeshName,
+ const char* theGroupName);
//Rename Presentation Of Submeshes
virtual void RenameEntityInStudy(Result_ptr theResult, const char* theMeshName,
VISU::Entity theEntity, const char* theNewName);
- virtual void RenameFamilyInStudy(Result_ptr theResult, const char* theMeshName, VISU::Entity theEntity,
+ virtual void RenameFamilyInStudy(Result_ptr theResult, const char* theMeshName,
+ VISU::Entity theEntity,
const char* theFamilyName, const char* theNewName);
virtual void RenameGroupInStudy (Result_ptr theResult, const char* theMeshName,
const char* theGroupName, const char* theNewName);
virtual Table_ptr CreateTable(const char* theTableEntry);
virtual Curve_ptr CreateCurve(Table_ptr theTable, CORBA::Long theHRow, CORBA::Long theVRow);
virtual Curve_ptr CreateCurveWithZ(Table_ptr theTable, CORBA::Long theHRow, CORBA::Long theVRow, CORBA::Long theZRow);
+ virtual Curve_ptr CreateCurveWithZExt(Table_ptr theTable, CORBA::Long theHRow, CORBA::Long theVRow, CORBA::Long theZRow,
+ CORBA::Boolean theIsV2);
virtual Container_ptr CreateContainer();
virtual Animation_ptr CreateAnimation(View3D_ptr theView3d);
virtual Evolution_ptr CreateEvolution(XYPlot_ptr theXYPlot);
const char* theMEDFile,
const char* theMeshName,
const VISU::double_array& theTStamps );
+
+ /* Load texture from file */
+ virtual CORBA::Long LoadTexture(const char* theTextureFile);
};
};
-# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+# Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# $Header$
#
-SUBDIRS = CONVERTOR PIPELINE OBJECT VVTK GUITOOLS VISU_I VISUGUI VISU_SWIG ENGINE
+SUBDIRS = CONVERTOR PIPELINE OBJECT VISU_I VISUGUI VISU_SWIG ENGINE
-# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+# Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# VISU OBJECT : interactive object for VISU entities implementation
# File : Makefile.in
# Module : VISU
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File :
// Author :
// Module : VISU
-
+//
#include "VISU_Actor.h"
#include "VISU_ActorFactory.h"
#include <stdexcept>
#include <sstream>
+#include <cmath> // to use std::abs( int )
// VTK Includes
#include <vtkProperty.h>
char aFormat[16] = "%g";
SUIT_ResourceMgr* aResourceMgr = SUIT_Session::session()->resourceMgr();
if (aResourceMgr) {
- int aFloatingPrec = aResourceMgr->integerValue("VISU", "floating_point_precision", 6);
+ // san: precision can be negative - this is used by double spin boxes
+ int aFloatingPrec = std::abs( aResourceMgr->integerValue("VISU", "visual_data_precision", 6) );
sprintf(aFormat, "%%.%dg", aFloatingPrec);
//cout << "$$$ aFormat = " << aFormat << endl;
}
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File :
// Author :
// Module : VISU
-
+//
#ifndef VISU_ACTOR_H
#define VISU_ACTOR_H
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File :
// Author :
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File :
// Author :
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File :
// Author :
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File :
// Author :
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File :
// Author :
#include "VISU_UnstructuredGridPL.hxx"
#include "VISU_PipeLineUtils.hxx"
-#include <vtkDataSetMapper.h>
+#include <VTKViewer_DataSetMapper.h>
+
#include <vtkObjectFactory.h>
#include <vtkImplicitBoolean.h>
#include <SALOME_ExtractGeometry.h>
//----------------------------------------------------------------------------
VISU_DataSetActor
::VISU_DataSetActor():
- myMapper(vtkDataSetMapper::New()),
+ myMapper(VTKViewer_DataSetMapper::New()),
myExtractor(SALOME_ExtractGeometry::New()),
myPolyDataExtractor(SALOME_ExtractPolyDataGeometry::New()),
myFunction(vtkImplicitBoolean::New())
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File :
// Author :
#include "VISU_Actor.h"
class vtkDataSetMapper;
+class VTKViewer_DataSetMapper;
class SALOME_ExtractGeometry;
class SALOME_ExtractPolyDataGeometry;
class vtkImplicitBoolean;
SetMapperInput(vtkDataSet* theDataSet);
//----------------------------------------------------------------------------
- vtkSmartPointer<vtkDataSetMapper> myMapper;
+ vtkSmartPointer<VTKViewer_DataSetMapper> myMapper;
vtkSmartPointer<SALOME_ExtractGeometry> myExtractor;
vtkSmartPointer<SALOME_ExtractPolyDataGeometry> myPolyDataExtractor;
vtkSmartPointer<vtkImplicitBoolean> myFunction;
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SALOME VTKViewer : build VTK viewer into Salome desktop
// File :
// Author :
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File : VISU_MeshAct.hxx
// Author : Laurent CORNABE with the help of Nicolas REJNERI
VISU_PickingSettings* aPickingSettings = VISU_PickingSettings::Get();
if(aSelectionMode == GaussPointSelection && theIsHighlight){
+ SVTK::TPickLimiter aPickLimiter( myPointPicker, this );
myPointPicker->Pick(theSelectionEvent->myX,
theSelectionEvent->myY,
0.0,
theIsHighlight);
if(aSelectionMode == GaussPointSelection && !theSelectionEvent->myIsRectangle){
-
vtkRenderer *aRenderer = theInteractorStyle->GetCurrentRenderer();
+
+ SVTK::TPickLimiter aPickLimiter( myPointPicker, this );
myPointPicker->Pick(theSelectionEvent->myX,
theSelectionEvent->myY,
0.0,
// myCursorPyramidSelected->SetVisibility(anIsVisible);
//GetScalarBarCtrl()->Update();
-// myIsHighlighted = aCurrentHasIndex;
+ // to fix a bug with incorrect representation after the first highlight action
+ myIsHighlighted = aCurrentHasIndex;
// Zoom if necessary
// ChangeZoom(myPickingSettings,
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File : VISU_ScalarMapAct.h
// Author : Laurent CORNABE with help of Nicolas REJNERI
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File : VISU_ScalarMapAct.h
// Author : Laurent CORNABE with help of Nicolas REJNERI
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH OBJECT : interactive object for SMESH visualization
// File :
// Author :
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH OBJECT : interactive object for SMESH visualization
// File :
// Author :
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File :
// Author :
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File :
// Author :
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File : VISU_IsoSurfActor.cxx
// Author : Vitaly Smetannikov
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File : VISU_IsoSurfActor.h
// Author : Vitaly Smetannikov
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File : VISU_MeshAct.cxx
// Author :
break;
}
}
+
+void VISU_MeshAct::SetMarkerStd( VTK::MarkerType theMarkerType, VTK::MarkerScale theMarkerScale )
+{
+ Superclass::SetMarkerStd( theMarkerType, theMarkerScale );
+ myNodeActor->SetMarkerStd( theMarkerType, theMarkerScale );
+}
+
+void VISU_MeshAct::SetMarkerTexture( int theMarkerId, VTK::MarkerTexture theMarkerTexture )
+{
+ Superclass::SetMarkerTexture( theMarkerId, theMarkerTexture );
+ myNodeActor->SetMarkerTexture( theMarkerId, theMarkerTexture );
+}
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File : VISU_MeshAct.h
// Author : Laurent CORNABE with the help of Nicolas REJNERI
virtual void
SetQuadratic2DRepresentation( EQuadratic2DRepresentation theMode );
+ virtual
+ void
+ SetMarkerStd( VTK::MarkerType, VTK::MarkerScale );
+
+ virtual
+ void
+ SetMarkerTexture( int, VTK::MarkerTexture );
protected:
VISU_MeshAct();
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
#ifdef WIN32
# if defined VISU_OBJECT_EXPORTS || defined VisuObject_EXPORTS
# define VISU_OBJECT_EXPORT __declspec(dllexport)
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File : VISU_PickingSettings.cxx
// Author : Oleg UVAROV
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File : VISU_PickingSettings.cxx
// Author : Oleg UVAROV
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File :
// Author :
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File : VISU_PointMap3dActor.h
// Author : Dmitry MATVEICHEV with help of Alexey PETROV
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File : VISU_MeshAct.hxx
// Author : Laurent CORNABE with the help of Nicolas REJNERI
#include <vtkImageData.h>
-//============================================================================
-class VISU_PointsDeviceActor: public VISU_GaussDeviceActorBase
-{
- public:
- vtkTypeMacro(VISU_PointsDeviceActor, VISU_GaussDeviceActorBase);
-
- static
- VISU_PointsDeviceActor*
- New();
-
-
- //----------------------------------------------------------------------------
- virtual
- void
- SetInput(vtkDataSet* theDataSet)
- {
- myGeomFilter->SetInput( theDataSet );
- }
-
-
- //----------------------------------------------------------------------------
- void
- SetInteractor(vtkRenderWindowInteractor* theInteractor)
- {
- if(theInteractor == myInteractor)
- return;
-
- if(myInteractor)
- myInteractor->RemoveObserver(myEventCallbackCommand);
-
- if(theInteractor)
- theInteractor->AddObserver(vtkCommand::CharEvent,
- myEventCallbackCommand,
- 0.0);
-
- myInteractor = theInteractor;
- }
-
-
- //----------------------------------------------------------------------------
- void
- DoMapperShallowCopy( vtkMapper* theMapper,
- bool theIsCopyInput )
- {
- Superclass::DoMapperShallowCopy( theMapper, theIsCopyInput );
-
- vtkDataSet* aDataSet = theMapper->GetInput();
- vtkFloatingPointType aScaleFactor = VISU_DeformedShapePL::GetScaleFactor( aDataSet );
-
- GetPointSpriteMapper()->SetAverageCellSize( aScaleFactor );
- }
-
-
- //----------------------------------------------------------------------------
- void
- DeepCopy( VISU_PointsDeviceActor *theActor )
- {
- VISU::CopyPointSpriteDataMapper( GetPointSpriteMapper(), theActor->GetPointSpriteMapper(), false );
- }
-
- protected:
- //----------------------------------------------------------------------------
- VISU_PointsDeviceActor():
- myGeomFilter( VTKViewer_GeometryFilter::New() ),
- myEventCallbackCommand( vtkCallbackCommand::New() ),
- myInteractor( NULL )
- {
- myGeomFilter->SetInside(true);
-
- VISU_OpenGLPointSpriteMapper* aMapper = VISU_OpenGLPointSpriteMapper::New();
- aMapper->SetInput( myGeomFilter->GetOutput() );
-
- std::string aRootDir( getenv( "VISU_ROOT_DIR") );
- std::string aMainTexture = aRootDir + "/share/salome/resources/visu/sprite_texture.bmp";
- std::string anAlphaTexture = aRootDir + "/share/salome/resources/visu/sprite_alpha.bmp";
- VISU::TTextureValue aTextureValue = VISU::GetTexture( aMainTexture, anAlphaTexture );
- aMapper->SetImageData( aTextureValue.GetPointer() );
-
- aMapper->SetUseLookupTableScalarRange(true);
- aMapper->SetColorModeToMapScalars();
- aMapper->SetScalarVisibility(true);
-
- SetPointSpriteMapper( aMapper );
-
- aMapper->Delete();
-
- myEventCallbackCommand->SetClientData( this );
- myEventCallbackCommand->SetCallback( VISU_PointsDeviceActor::ProcessEvents );
- }
-
-
- //----------------------------------------------------------------------------
- ~VISU_PointsDeviceActor()
- {
- SetInteractor( NULL );
- myGeomFilter->Delete();
- myEventCallbackCommand->Delete();
- }
-
-
- //----------------------------------------------------------------------------
- static
- void
- ProcessEvents(vtkObject* theObject,
- unsigned long theEvent,
- void* theClientData,
- void* theCallData)
- {
- if ( VISU_PointsDeviceActor* self = reinterpret_cast<VISU_PointsDeviceActor*>( theClientData ) )
- self->OnInteractorEvent( theEvent );
- }
-
-
- //----------------------------------------------------------------------------
- void
- OnInteractorEvent(unsigned long theEvent)
- {
- switch ( theEvent ) {
- case vtkCommand::CharEvent: {
- switch( myInteractor->GetKeyCode() ) {
- case 'M' :
- case 'm' : {
- if ( !GetVisibility() )
- return;
-
- static vtkFloatingPointType anIncrement = 2;
- vtkFloatingPointType aMagnification = GetPointSpriteMapper()->GetPointSpriteMagnification();
- vtkFloatingPointType coefficient = myInteractor->GetShiftKey() ? anIncrement : 1 / anIncrement;
-
- GetPointSpriteMapper()->SetPointSpriteMagnification( aMagnification * coefficient );
-
- myInteractor->CreateTimer(VTKI_TIMER_UPDATE);
- break;
- }
- default:
- return;
- }
- break;
- }
- default:
- return;
- }
- }
-
-
- //----------------------------------------------------------------------------
- vtkCallbackCommand* myEventCallbackCommand;
- vtkRenderWindowInteractor* myInteractor;
- VTKViewer_GeometryFilter* myGeomFilter;
-
- private:
- VISU_PointsDeviceActor(const VISU_PointsDeviceActor&); // Not implemented
- void operator=(const VISU_PointsDeviceActor&); // Not implemented
-};
-
-vtkStandardNewMacro(VISU_PointsDeviceActor);
-
//----------------------------------------------------------------------------
vtkStandardNewMacro(VISU_ScalarMapAct);
static vtkFloatingPointType EPS = 1.0 / VTK_LARGE_FLOAT;
myEdgeActor->SetUserMatrix(aMatrix);
myEdgeActor->GetProperty()->SetColor(255.,255.,255.);
- myPointsActor = VISU_PointsDeviceActor::New();
+ myPointsActor = SVTK_DeviceActor::New();
+ myPointsActor->SetRepresentation(SVTK::Representation::Points);
myPointsActor->SetProperty(aProperty);
myPointsActor->SetUserMatrix(aMatrix);
myEdgeActor->GetMapper()->ScalarVisibilityOff();
- myPointsActor->DoMapperShallowCopy( thePipeLine->GetMapper(), false );
-
+ VISU::CopyMapper( myPointsActor->GetMapper(), thePipeLine->GetMapper(), false );
VISU::CopyMapper( mySurfaceActor->GetMapper(), thePipeLine->GetMapper(), false );
}
if(VISU_ScalarMapAct* anActor = dynamic_cast<VISU_ScalarMapAct*>(theActor)){
Superclass::DeepCopy(theActor);
SetBarVisibility(anActor->GetBarVisibility());
- myPointsActor->DeepCopy( anActor->myPointsActor );
SetShading(anActor->IsShading());
}
}
{
Superclass::AddToRender(theRenderer);
- myPointsActor->SetInteractor( myInteractor );
-
if(myScalarBar)
theRenderer->AddActor2D(myScalarBar);
}
return 1;
}
-//----------------------------------------------------------------------------
-unsigned long int
-VISU_ScalarMapAct
-::GetMemorySize()
-{
- unsigned long int aSize = Superclass::GetMemorySize();
-
- aSize += myPointsActor->GetMemorySize();
-
- return aSize;
-}
-
//----------------------------------------------------------------------------
VISU_Actor::EQuadratic2DRepresentation
break;
}
}
+
+void VISU_ScalarMapAct::SetMarkerStd( VTK::MarkerType theMarkerType, VTK::MarkerScale theMarkerScale )
+{
+ Superclass::SetMarkerStd( theMarkerType, theMarkerScale );
+ myPointsActor->SetMarkerStd( theMarkerType, theMarkerScale );
+}
+
+void VISU_ScalarMapAct::SetMarkerTexture( int theMarkerId, VTK::MarkerTexture theMarkerTexture )
+{
+ Superclass::SetMarkerTexture( theMarkerId, theMarkerTexture );
+ myPointsActor->SetMarkerTexture( theMarkerId, theMarkerTexture );
+}
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File : VISU_ScalarMapAct.h
// Author : Laurent CORNABE with help of Nicolas REJNERI
#include "VISU_DataSetActor.h"
class VISU_ScalarBarActor;
-class VISU_PointsDeviceActor;
-
//----------------------------------------------------------------------------
class VISU_OBJECT_EXPORT VISU_ScalarMapAct : public VISU_DataSetActor
bool
IsShading();
- //! Gets memory size used by the instance (bytes).
virtual
- unsigned long int
- GetMemorySize();
-
+ void
+ SetMarkerStd( VTK::MarkerType, VTK::MarkerScale );
+
+ virtual
+ void
+ SetMarkerTexture( int, VTK::MarkerTexture );
+
protected:
VISU_ScalarMapAct();
bool myBarVisibility;
VISU_ScalarBarActor* myScalarBar;
- VISU_PointsDeviceActor* myPointsActor;
+ SVTK_DeviceActor* myPointsActor;
SVTK_DeviceActor* mySurfaceActor;
SVTK_DeviceActor* myEdgeActor;
};
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File : VISU_SelectVisiblePoints.h
// Author : Oleg UVAROV
// Module : VISU
-
+//
#include "VISU_SelectVisiblePoints.h"
#include "vtkCamera.h"
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File : VISU_SelectVisiblePoints.h
// Author : Oleg UVAROV
// Module : VISU
-
+//
#ifndef VISU_SelectVisiblePoints_HeaderFile
#define VISU_SelectVisiblePoints_HeaderFile
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File : VISU_VectorsAct.cxx
// Author : Laurent CORNABE with help of Nicolas REJNERI
// Module : VISU
-
+//
#include "VISU_VectorsAct.h"
#include "VISU_VectorsPL.hxx"
#include <SVTK_Actor.h>
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File : VISU_VectorsAct.h
// Author : Laurent CORNABE with help of Nicolas REJNERI
// Module : VISU
-
+//
#ifndef VISU_VectorsAct_HeaderFile
#define VISU_VectorsAct_HeaderFile
-# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+# Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# VISU OBJECT : interactive object for VISU entities implementation
# File : Makefile.in
# Module : VISU
VISU_IsoSurfacesPL.hxx \
VISU_DeformedShapePL.hxx \
VISU_VectorsPL.hxx \
+ VISU_Streamer.hxx \
+ VISU_StreamLine.hxx \
VISU_StreamLinesPL.hxx \
VISU_LookupTable.hxx \
VISU_ScalarBarActor.hxx \
VISU_IsoSurfacesPL.cxx \
VISU_DeformedShapePL.cxx \
VISU_VectorsPL.cxx \
+ VISU_Streamer.cxx \
+ VISU_StreamLine.cxx \
VISU_StreamLinesPL.cxx \
VISU_LookupTable.cxx \
VISU_ScalarBarActor.cxx \
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
#include "SALOME_ExtractGeometry.h"
#include <vtkCell.h>
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
#ifndef SALOME_ExtractGeometry_H
#define SALOME_ExtractGeometry_H
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
#include "SALOME_ExtractPolyDataGeometry.h"
#include <vtkCellArray.h>
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
#ifndef SALOME_ExtractPolyDataGeometry_H
#define SALOME_ExtractPolyDataGeometry_H
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File: VISU_PipeLine.hxx
// Author: Alexey PETROV
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : VISUPipeline.hxx
// Author : Oleg UVAROV
// Module : VISU
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File: VISU_ColoredPL.cxx
// Author: Alexey PETROV
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File: VISU_ColoredPL.hxx
// Author: Alexey PETROV
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File: VISU_CutLinesBasePL.cxx
// Author: Oleg UVAROV
// Module : VISU
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File: VISU_CutLinesBasePL.hxx
// Author: Oleg UVAROV
// Module : VISU
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File: VISU_PipeLine.cxx
// Author: Alexey PETROV
// Module : VISU
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File: VISU_PipeLine.hxx
// Author: Alexey PETROV
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File: VISU_PipeLine.cxx
// Author: Alexey PETROV
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File: VISU_CutPlanesPL.hxx
// Author: Alexey PETROV
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File: VISU_CutSegmentPL.hxx
// Author: Oleg UVAROV
// Module : VISU
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File: VISU_CutSegmentPL.hxx
// Author: Oleg UVAROV
// Module : VISU
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File: VISU_DataSetMapperHolder.cxx
// Author: Alexey PETROV
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File: VISU_DataSetMapperHolder.hxx
// Author: Alexey PETROV
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File: VISU_ScalarMapPL.cxx
// Author: Roman NIKOLAEV
// Module : VISU
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : VISU_DeformationPL.hxx
// Author :
// Module : SALOME
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File: VISU_DeformedGridPL.cxx
// Author: Alexey PETROV
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File: VISU_ScalarMapPL.hxx
// Author: Alexey PETROV
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU DeformedShapeAndScalarMapPL
// File: VISU_DeformedShapeAndScalarMapPL.cxx
// Author: Eugeny Nikolaev
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File: VISU_DeformedShapeAndScalarMapPL.hxx
// Author: Eugeny Nikolaev
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File: VISU_PipeLine.cxx
// Author: Alexey PETROV
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File: VISU_PipeLine.hxx
// Author: Alexey PETROV
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
#include "VISU_ElnoAssembleFilter.hxx"
#include "VISU_PipeLineUtils.hxx"
#include "VISU_ElnoMeshValue.hxx"
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
#ifndef VISU_ElnoAssembleFilter_H
#define VISU_ElnoAssembleFilter_H
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
#include "VISU_ElnoDisassembleFilter.hxx"
#include "VISU_PipeLineUtils.hxx"
#include "VISU_ElnoMeshValue.hxx"
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
#ifndef VISU_ElnoDisassembleFilter_H
#define VISU_ElnoDisassembleFilter_H
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File : VISU_Extractor.cxx
// Module : VISU
-
+//
#include "VISU_Extractor.hxx"
#include "VISU_PipeLineUtils.hxx"
#include "VISU_ConvertorUtils.hxx"
#include <SUIT_ResourceMgr.h>
#include <sstream>
+#include <cmath> // to use std::abs( int )
#include <vtkObjectFactory.h>
#include <vtkUnstructuredGrid.h>
void *aPtr = aScalars->GetVoidPointer(0);
SUIT_ResourceMgr* aResourceMgr = SUIT_Session::session()->resourceMgr();
- int aDecimals = aResourceMgr->integerValue("VISU", "floating_point_precision", 6);
+ // san: precision can be negative - this is used by double spin boxes
+ int aDecimals = std::abs( aResourceMgr->integerValue("VISU", "visual_data_precision", 6) );
switch(aDataType) {
vtkTemplateMacro3(CutScalarsTempl,
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File : VISU_Extractor.hxx
// Author : Alexey PETROV
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : VISU_FieldTransform.cxx
// Module : VISU
//
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File : VISU_FieldTransform.hxx
// Author : Alexey PETROV
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File: VISU_GaussPoints.cxx
// Author: Alexey PETROV
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File: VISU_GaussPointsPL.hxx
// Author:
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SALOME VTKViewer : build VTK viewer into Salome desktop
// File : VVTK_ImplicitFunctionWidget.cxx
// Author : Peter KURNEV
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SALOME VTKViewer : build VTK viewer into Salome desktop
// File : VISU_PlanesWidget.h
// Author : Peter KURNEV
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File: VISU_PipeLine.cxx
// Author: Alexey PETROV
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File: VISU_PipeLine.hxx
// Author: Alexey PETROV
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File: VISU_LabelPointsFilter.cxx
// Author: Vitaly Smetannikov
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File: VISU_LabelPointsFilter.hxx
// Author: Vitaly Smetannikov
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File : VISU_LookupTable.cxx
// Author : Vitaliy Smetannikov
// Module : VISU
-
+//
#include "VISU_LookupTable.hxx"
#include <vtkObjectFactory.h>
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : VISU_LookupTable.h
// Author : Vitaliy Smetannikov
// Module : VISU
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File: VISU_MapperHolder.cxx
// Author: Alexey PETROV
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File: VISU_MapperHolder.hxx
// Author: Alexey PETROV
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File: VISU_StreamLinesPL.cxx
// Author: Alexey PETROV
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File: VISU_MaskPointsFilter.hxx
// Author: Alexey PETROV
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File: VISU_MergedPL.cxx
// Author: Alexey PETROV
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File: VISU_MergedPL.hxx
// Author: Alexey PETROV
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File: VISU_MeshPL.cxx
// Author: Alexey PETROV
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File: VISU_MeshPL.hxx
// Author: Alexey PETROV
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File: VISU_OpenGLPointSpriteMapper.cxx
// Author:
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File: VISU_OpenGLPointSpriteMapper.hxx
// Author:
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File: VISU_ScalarMapPL.cxx
// Author: Roman NIKOLAEV
// Module : VISU
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : VISU_OptionalDeformationPL.hxx
// Author :
// Module : SALOME
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File: VISU_PipeLine.cxx
// Author: Alexey PETROV
//----------------------------------------------------------------------------
size_t
VISU_PipeLine
-::GetAvailableMemory(size_t theSize,
- size_t theMinSize)
+::GetAvailableMemory(double theSize,
+ double theMinSize)
{
// Finds acceptable memory size by half-deflection methods
static double EPSILON = 2 * 1024;
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File: VISU_PipeLine.hxx
// Author: Alexey PETROV
static
size_t
- GetAvailableMemory(size_t theSize,
- size_t theMinSize = 1024*1024);
+ GetAvailableMemory(double theSize,
+ double theMinSize = 1024*1024);
protected:
//----------------------------------------------------------------------------
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File: VISU_PipeLine.hxx
// Author: Alexey PETROV
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File: VISU_PipeLine.hxx
// Author: Alexey PETROV
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SALOME VTKViewer : build VTK viewer into Salome desktop
// File : VVTK_ImplicitFunctionWidget.cxx
// Author : Peter KURNEV
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SALOME VTKViewer : build VTK viewer into Salome desktop
// File : VISU_PlanesWidget.h
// Author : Peter KURNEV
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File: VISU_PipeLine.cxx
// Author: Alexey PETROV
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File: VISU_CutPlanesPL.hxx
// Author: Alexey PETROV
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File: VISU_PointSpriteMapperHolder.cxx
// Author: Alexey PETROV
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File: VISU_PointSpriteMapperHolder.hxx
// Author: Alexey PETROV
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File: VISU_PolyDataMapperHolder.cxx
// Author: Alexey PETROV
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File: VISU_PolyDataMapperHolder.hxx
// Author: Alexey PETROV
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File: VISU_PolyDataPL.cxx
// Author: Alexey PETROV
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File: VISU_UnstructuredGripPL.hxx
// Author: Alexey PETROV
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File: VISU_PipeLine.hxx
// Author: Alexey PETROV
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File: VISU_PipeLine.hxx
// Author: Alexey PETROV
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File: VISU_ScalarBarCtrl.cxx
// Author: Peter KURNEV
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File: VISU_ScalarBarCtrl.hxx
// Author: Peter KURNEV
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
-//
// File: VISU_ScalarMapPL.cxx
// Author: Alexey PETROV
// Module : VISU
-
+//
#include "VISU_ScalarMapPL.hxx"
#include "VISU_DataSetMapperHolder.hxx"
#include "VISU_ElnoAssembleFilter.hxx"
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File: VISU_ScalarMapPL.hxx
// Author: Alexey PETROV
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
#include "VISU_SphereWidget.hxx"
#include <vtkActor.h>
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
#ifndef __VISU_SphereWidget_h
#define __VISU_SphereWidget_h
--- /dev/null
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#include "VISU_StreamLine.hxx"
+
+#include "vtkCellArray.h"
+#include "vtkDataSet.h"
+#include "vtkFloatArray.h"
+#include "vtkInformation.h"
+#include "vtkInformationVector.h"
+#include "vtkMath.h"
+#include "vtkObjectFactory.h"
+#include "vtkPointData.h"
+#include "vtkPolyData.h"
+#include "vtkPolyLine.h"
+
+vtkCxxRevisionMacro(VISU_StreamLine, "$Revision$");
+vtkStandardNewMacro(VISU_StreamLine);
+
+// Construct object with step size set to 1.0.
+VISU_StreamLine::VISU_StreamLine()
+{
+ this->StepLength = 1.0;
+ this->NumberOfStreamers = 0;
+}
+
+int VISU_StreamLine::RequestData(
+ vtkInformation *,
+ vtkInformationVector **inputVector,
+ vtkInformationVector *outputVector)
+{
+ vtkInformation *inInfo = inputVector[0]->GetInformationObject(0);
+ vtkInformation *outInfo = outputVector->GetInformationObject(0);
+ vtkInformation *sourceInfo = inputVector[1]->GetInformationObject(0);
+
+ vtkDataSet *input = vtkDataSet::SafeDownCast(
+ inInfo->Get(vtkDataObject::DATA_OBJECT()));
+ vtkPolyData *output = vtkPolyData::SafeDownCast(
+ outInfo->Get(vtkDataObject::DATA_OBJECT()));
+ vtkDataSet *source = 0;
+ if (sourceInfo)
+ {
+ source = vtkDataSet::SafeDownCast(
+ sourceInfo->Get(vtkDataObject::DATA_OBJECT()));
+ }
+
+ vtkStreamer::StreamPoint *sPrev, *sPtr;
+ vtkPoints *newPts;
+ vtkFloatArray *newVectors;
+ vtkFloatArray *newScalars=NULL;
+ vtkCellArray *newLines;
+ vtkIdType ptId, i, id;
+ int j;
+ vtkIdList *pts;
+ double tOffset, x[3], v[3], s, r;
+ double theta;
+ vtkPolyLine* lineNormalGenerator = NULL;
+ vtkFloatArray* normals = NULL;
+ vtkFloatArray* rotation = 0;
+
+ this->SavePointInterval = this->StepLength;
+ this->VISU_Streamer::Integrate(input, source);
+ if ( this->NumberOfStreamers <= 0 ) {return 1;}
+
+ pts = vtkIdList::New();
+ pts->Allocate(2500);
+
+ //
+ // Convert streamer into lines. Lines may be dashed.
+ //
+ newPts = vtkPoints::New();
+ newPts->Allocate(1000);
+ newVectors = vtkFloatArray::New();
+ newVectors->SetNumberOfComponents(3);
+ newVectors->Allocate(3000);
+ if ( this->Vorticity )
+ {
+ lineNormalGenerator = vtkPolyLine::New();
+ normals = vtkFloatArray::New();
+ normals->SetNumberOfComponents(3);
+ normals->Allocate(3000);
+ rotation = vtkFloatArray::New();
+ rotation->SetNumberOfComponents(1);
+ rotation->Allocate(1000);
+ rotation->SetName("Thetas");
+ output->GetPointData()->AddArray(rotation);
+ }
+
+ if ( input->GetPointData()->GetScalars() || this->SpeedScalars
+ || this->OrientationScalars)
+ {
+ newScalars = vtkFloatArray::New();
+ newScalars->Allocate(1000);
+ }
+ newLines = vtkCellArray::New();
+ newLines->Allocate(newLines->EstimateSize(2*this->NumberOfStreamers,
+ VTK_CELL_SIZE));
+ //
+ // Loop over all streamers generating points
+ //
+ for (ptId=0; ptId < this->NumberOfStreamers; ptId++)
+ {
+ if ( this->Streamers[ptId].GetNumberOfPoints() < 2 )
+ {
+ continue;
+ }
+ sPrev = this->Streamers[ptId].GetStreamPoint(0);
+ sPtr = this->Streamers[ptId].GetStreamPoint(1);
+
+ if ( this->Streamers[ptId].GetNumberOfPoints() == 2 && sPtr->cellId >= 0 )
+ {
+ continue;
+ }
+
+ tOffset = sPrev->t;
+
+ for ( i=1;
+ i < this->Streamers[ptId].GetNumberOfPoints() && sPtr->cellId >= 0;
+ i++, sPrev=sPtr, sPtr=this->Streamers[ptId].GetStreamPoint(i) )
+ {
+ //
+ // Create points for line
+ //
+ while ( tOffset >= sPrev->t && tOffset < sPtr->t )
+ {
+ r = (tOffset - sPrev->t) / (sPtr->t - sPrev->t);
+
+ for (j=0; j<3; j++)
+ {
+ x[j] = sPrev->x[j] + r * (sPtr->x[j] - sPrev->x[j]);
+ v[j] = sPrev->v[j] + r * (sPtr->v[j] - sPrev->v[j]);
+ }
+
+ // add point to line
+ id = newPts->InsertNextPoint(x);
+ pts->InsertNextId(id);
+ newVectors->InsertTuple(id,v);
+
+ if ( newScalars )
+ {
+ s = sPrev->s + r * (sPtr->s - sPrev->s);
+ newScalars->InsertTuple(id,&s);
+ }
+
+ if ( this->Vorticity )
+ {
+ // Store the rotation values. Used after all the streamlines
+ // are generated.
+ theta = sPrev->theta + r * (sPtr->theta - sPrev->theta);
+ rotation->InsertTuple(id, &theta);
+ }
+
+ tOffset += this->StepLength;
+
+ } // while
+ } //for this streamer
+
+ if ( pts->GetNumberOfIds() > 1 )
+ {
+ newLines->InsertNextCell(pts);
+ pts->Reset();
+ }
+ } //for all streamers
+
+ vtkDebugMacro(<<"Created " << newPts->GetNumberOfPoints() << " points, "
+ << newLines->GetNumberOfCells() << " lines");
+
+ if (this->Vorticity)
+ {
+ // Rotate the normal vectors with stream vorticity
+ vtkIdType nPts=0;
+ vtkIdType *linePts=0;
+ double normal[3], local1[3], local2[3], length, costheta, sintheta;
+
+ lineNormalGenerator->GenerateSlidingNormals(newPts,newLines,normals);
+
+ // Loop over all lines, from the above code we are know that each line
+ // will have at least two points and that no points will be shared
+ // between lines. It is important to loop over the points used by the
+ // lines because newPts may actually contain points that are not used by
+ // any lines. The normals are only calculated for points that are used
+ // in lines so referencing normals for all points can lead to UMRs
+ for (newLines->InitTraversal(); newLines->GetNextCell(nPts,linePts); )
+ {
+ for(i=0; i<nPts; i++)
+ {
+ normals->GetTuple(linePts[i], normal);
+ newVectors->GetTuple(linePts[i], v);
+ // obtain two unit orthogonal vectors on the plane perpendicular to
+ // the streamline
+ for(j=0; j<3; j++)
+ {
+ local1[j] = normal[j];
+ }
+ length = vtkMath::Normalize(local1);
+ vtkMath::Cross(local1, v, local2);
+ vtkMath::Normalize(local2);
+ // Rotate the normal with theta
+ rotation->GetTuple(linePts[i], &theta);
+ costheta = cos(theta);
+ sintheta = sin(theta);
+ for(j=0; j<3; j++)
+ {
+ normal[j] = length* (costheta*local1[j] + sintheta*local2[j]);
+ }
+ normals->SetTuple(linePts[i], normal);
+ }
+ }
+ output->GetPointData()->SetNormals(normals);
+ normals->Delete();
+ lineNormalGenerator->Delete();
+ rotation->Delete();
+ }
+
+ output->SetPoints(newPts);
+ newPts->Delete();
+
+ output->GetPointData()->SetVectors(newVectors);
+ newVectors->Delete();
+
+ if ( newScalars )
+ {
+ int idx = output->GetPointData()->AddArray(newScalars);
+ output->GetPointData()->SetActiveAttribute(idx, vtkDataSetAttributes::SCALARS);
+ newScalars->Delete();
+ }
+
+ pts->Delete();
+ output->SetLines(newLines);
+ newLines->Delete();
+
+ // Delete the streamers since they are no longer needed
+ delete[] this->Streamers;
+ this->Streamers = 0;
+ this->NumberOfStreamers = 0;
+
+ output->Squeeze();
+
+ return 1;
+}
+
+void VISU_StreamLine::PrintSelf(ostream& os, vtkIndent indent)
+{
+ this->Superclass::PrintSelf(os,indent);
+
+ os << indent << "Step Length: " << this->StepLength << "\n";
+
+}
--- /dev/null
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#ifndef VISU_StreamLine_HeaderFile
+#define VISU_StreamLine_HeaderFile
+
+#include "VISUPipeline.hxx"
+#include "VISU_Streamer.hxx"
+
+class VISU_PIPELINE_EXPORT VISU_StreamLine : public VISU_Streamer
+{
+public:
+ vtkTypeRevisionMacro(VISU_StreamLine,VISU_Streamer);
+ void PrintSelf(ostream& os, vtkIndent indent);
+
+ // Description:
+ // Construct object with step size set to 1.0.
+ static VISU_StreamLine *New();
+
+ // Description:
+ // Specify the length of a line segment. The length is expressed in terms of
+ // elapsed time. Smaller values result in smoother appearing streamlines, but
+ // greater numbers of line primitives.
+ vtkSetClampMacro(StepLength,double,0.000001,VTK_DOUBLE_MAX);
+ vtkGetMacro(StepLength,double);
+
+protected:
+ VISU_StreamLine();
+ ~VISU_StreamLine() {};
+
+ // Convert streamer array into vtkPolyData
+ virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
+
+ // the length of line primitives
+ double StepLength;
+
+private:
+ VISU_StreamLine(const VISU_StreamLine&); // Not implemented.
+ void operator=(const VISU_StreamLine&); // Not implemented.
+};
+
+#endif
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File: VISU_StreamLinesPL.cxx
// Author: Alexey PETROV
//#include "VISU_UsedPointsFilter.hxx"
#include "VISU_MaskPointsFilter.hxx"
#include "VISU_PipeLineUtils.hxx"
+#include "VISU_StreamLine.hxx"
#include "VTKViewer_GeometryFilter.h"
#include <vtkCell.h>
#include <vtkDataSet.h>
-#include <vtkStreamLine.h>
#ifdef _DEBUG_
static int MYDEBUG = 0;
SetIsShrinkable(false);
SetIsFeatureEdgesAllowed(false);
- myStream = vtkStreamLine::New();
+ myStream = VISU_StreamLine::New();
myCenters = vtkCellCenters::New();
myGeomFilter = VTKViewer_GeometryFilter::New();
myPointsFilter = VISU_MaskPointsFilter::New();
//----------------------------------------------------------------------------
-size_t
+vtkFloatingPointType
VISU_StreamLinesPL
::GetNecasseryMemorySize(vtkIdType theNbOfPoints,
vtkFloatingPointType theStepLength,
vtkFloatingPointType anAssignedDataSize = aCellsSize*4.0*sizeof(vtkFloatingPointType);
vtkFloatingPointType anOutputDataSetSize = aMeshSize + anAssignedDataSize;
- size_t aResult = size_t(aStreamArraySize*aNbCells + anOutputDataSetSize);
+ vtkFloatingPointType aResult = aStreamArraySize*aNbCells + anOutputDataSetSize;
return aResult;
}
{
static vtkFloatingPointType aPercentsDecrease = 3.0, aStepLengthIncrease = 9.0;
vtkIdType aNbOfPoints = theDataSet->GetNumberOfPoints();
- size_t aSize = GetNecasseryMemorySize(aNbOfPoints,theStepLength,thePropogationTime,thePercents);
+ vtkFloatingPointType aSize = GetNecasseryMemorySize(aNbOfPoints,theStepLength,thePropogationTime,thePercents);
size_t anIsPossible = CheckAvailableMemory(aSize);
if(!anIsPossible){
vtkFloatingPointType aMaxStepLength = std::max(GetMaxStepLength(theDataSet),thePropogationTime);
return 0.0; // absolutely empty object
vtkFloatingPointType anStepLength = GetMaxIntegrationStep(theDataSet)/aCoeffOfIntStep;
- vtkFloatingPointType aBasePropTime = GetBasePropagationTime(theDataSet)/GetVelocityCoeff(theDataSet);
+ // 0020724: last division has been commented, seems to be a logical mistake (to discuss with APO)
+ vtkFloatingPointType aBasePropTime = GetBasePropagationTime(theDataSet); // /GetVelocityCoeff(theDataSet)
thePercents = 1.0;
vtkIdType aNbOfPoints = theDataSet->GetNumberOfPoints();
- size_t aSize = GetNecasseryMemorySize(aNbOfPoints,anStepLength,aBasePropTime,thePercents);
+ vtkFloatingPointType aSize = GetNecasseryMemorySize(aNbOfPoints,anStepLength,aBasePropTime,thePercents);
size_t aRealSize = GetAvailableMemory(aSize);
vtkFloatingPointType anAverageVolume = aVolume / aRealSize;
vtkFloatingPointType aStep = pow(double(anAverageVolume), double(1.0/double(degree)));
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File: VISU_StreamLinesPL.hxx
// Author: Alexey PETROV
#include "VISUPipeline.hxx"
#include "VISU_DeformedShapePL.hxx"
-#include <vtkStreamLine.h>
+
+#include <vtkStreamer.h>
class vtkDataSet;
class vtkPointSet;
class vtkCellCenters;
class VTKViewer_GeometryFilter;
class VISU_MaskPointsFilter;
+class VISU_StreamLine;
//----------------------------------------------------------------------------
bool theIsCopyInput);
static
- size_t
+ vtkFloatingPointType
GetNecasseryMemorySize(vtkIdType theNbOfPoints,
vtkFloatingPointType theStepLength,
vtkFloatingPointType thePropogationTime,
CorrectStepLength(vtkFloatingPointType theStep,
vtkDataSet* theDataSet);
- vtkStreamLine* myStream;
+ VISU_StreamLine* myStream;
vtkPointSet* mySource;
vtkCellCenters* myCenters;
VTKViewer_GeometryFilter *myGeomFilter;
--- /dev/null
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#include "VISU_Streamer.hxx"
+
+#include "vtkCell.h"
+#include "vtkDataSet.h"
+#include "vtkDoubleArray.h"
+#include "vtkExecutive.h"
+#include "vtkGenericCell.h"
+#include "vtkInformation.h"
+#include "vtkInterpolatedVelocityField.h"
+#include "vtkMath.h"
+#include "vtkMultiThreader.h"
+#include "vtkObjectFactory.h"
+#include "vtkPointData.h"
+#include "vtkRungeKutta2.h"
+
+vtkCxxRevisionMacro(VISU_Streamer, "$Revision$");
+
+#define VTK_START_FROM_POSITION 0
+#define VTK_START_FROM_LOCATION 1
+
+struct VISU_StreamerThreadStruct
+{
+ VISU_Streamer *Filter;
+ vtkDataSet *Input;
+ vtkDataSet *Source;
+};
+
+vtkStreamer::StreamArray::StreamArray()
+{
+ this->MaxId = -1;
+ this->Array = new vtkStreamer::StreamPoint[1000];
+ this->Size = 1000;
+ this->Extend = 5000;
+ this->Direction = VTK_INTEGRATE_FORWARD;
+}
+
+vtkStreamer::StreamPoint *vtkStreamer::StreamArray::Resize(vtkIdType sz)
+{
+ vtkStreamer::StreamPoint *newArray;
+ vtkIdType newSize;
+
+ if (sz >= this->Size)
+ {
+ newSize = this->Size +
+ this->Extend*(((sz-this->Size)/this->Extend)+1);
+ }
+ else
+ {
+ newSize = sz;
+ }
+
+ newArray = new vtkStreamer::StreamPoint[newSize];
+
+ memcpy(newArray, this->Array,
+ (sz < this->Size ? sz : this->Size) * sizeof(vtkStreamer::StreamPoint));
+
+ this->Size = newSize;
+ delete [] this->Array;
+ this->Array = newArray;
+
+ return this->Array;
+}
+
+// Construct object to start from position (0,0,0); integrate forward; terminal
+// speed 0.0; vorticity computation off; integrations step length 0.2; and
+// maximum propagation time 100.0.
+VISU_Streamer::VISU_Streamer()
+{
+}
+
+VISU_Streamer::~VISU_Streamer()
+{
+}
+
+static const double VTK_EPSILON=1E-7;
+
+VTK_THREAD_RETURN_TYPE VISU_Streamer::ThreadedIntegrate( void *arg )
+{
+ VISU_Streamer *self;
+ VISU_StreamerThreadStruct *str;
+ int thread_count;
+ int thread_id;
+ vtkStreamer::StreamArray *streamer;
+ vtkStreamer::StreamPoint *sNext = 0, *sPtr;
+ vtkStreamer::StreamPoint pt1, pt2;
+ int i;
+ vtkIdType idxNext, ptId;
+ double d, step, dir;
+ double xNext[3], vel[3];
+ double *cellVel;
+ double derivs[9];
+ double *w, pcoords[3];
+ double coords[4];
+ vtkDataSet *input;
+ vtkGenericCell *cell;
+ vtkPointData *pd;
+ vtkDataArray *inScalars;
+ vtkDataArray *inVectors;
+ vtkDoubleArray *cellVectors;
+ vtkDataArray *cellScalars=0;
+ double tOffset, vort[3];
+ double err;
+ int counter=0;
+
+ thread_id = ((vtkMultiThreader::ThreadInfo *)(arg))->ThreadID;
+ thread_count = ((vtkMultiThreader::ThreadInfo *)(arg))->NumberOfThreads;
+ str = (VISU_StreamerThreadStruct*)(((vtkMultiThreader::ThreadInfo *)(arg))->UserData);
+ self = str->Filter;
+
+ input = str->Input;
+ pd = input->GetPointData();
+ inScalars = pd->GetScalars();
+ inVectors = pd->GetVectors();
+
+ cell = vtkGenericCell::New();
+ cellVectors = vtkDoubleArray::New();
+ cellVectors->SetNumberOfComponents(3);
+ cellVectors->Allocate(3*VTK_CELL_SIZE);
+ if (inScalars)
+ {
+ cellScalars = inScalars->NewInstance();
+ cellScalars->SetNumberOfComponents(inScalars->GetNumberOfComponents());
+ cellScalars->Allocate(inScalars->GetNumberOfComponents()*VTK_CELL_SIZE);
+ }
+
+ w = new double[input->GetMaxCellSize()];
+
+ // Set the function set to be integrated
+ vtkInterpolatedVelocityField* func = vtkInterpolatedVelocityField::New();
+ func->AddDataSet(input);
+
+ if (self->GetIntegrator() == 0)
+ {
+ vtkGenericWarningMacro("No integrator is specified.");
+ return VTK_THREAD_RETURN_VALUE;
+ }
+
+ // Create a new integrator, the type is the same as Integrator
+ vtkInitialValueProblemSolver* integrator =
+ self->GetIntegrator()->NewInstance();
+ integrator->SetFunctionSet(func);
+
+ // Used to avoid calling these function many times during
+ // the integration
+ double termspeed = self->GetTerminalSpeed();
+ double maxtime = self->GetMaximumPropagationTime();
+ double savePointInterval = self->GetSavePointInterval();
+
+ // For each streamer, integrate in appropriate direction
+ // Do only the streamers that this thread should handle.
+ for (ptId=0; ptId < self->GetNumberOfStreamers(); ptId++)
+ {
+ if ( ptId % thread_count == thread_id )
+ {
+ // Get starting step
+ streamer = self->GetStreamers() + ptId;
+ sPtr = streamer->GetStreamPoint(0);
+ if ( sPtr->cellId < 0 )
+ {
+ continue;
+ }
+ // Set the last cell id in the vtkInterpolatedVelocityField
+ // object to speed up FindCell calls
+ func->SetLastCellId(sPtr->cellId);
+
+ dir = streamer->Direction;
+
+ // Copy the first point
+ pt1 = *sPtr;
+ pt2 = *sPtr;
+ tOffset = pt1.t;
+
+ //integrate until time has been exceeded
+ while ( pt1.cellId >= 0 && pt1.speed > termspeed && pt1.t < maxtime )
+ {
+
+ if ( counter++ % 1000 == 0 )
+ {
+ if (!thread_id)
+ {
+ self->UpdateProgress((double)ptId/self->GetNumberOfStreamers()
+ +pt1.t/maxtime/self->GetNumberOfStreamers());
+ }
+ if (self->GetAbortExecute())
+ {
+ break;
+ }
+ }
+
+ // Set the integration step to be characteristic cell length
+ // time IntegrationStepLength
+ input->GetCell(pt1.cellId, cell);
+ step = dir*self->GetIntegrationStepLength()
+ * sqrt((double)cell->GetLength2())/pt1.speed;
+
+ // Calculate the next step using the integrator provided
+ if (integrator->ComputeNextStep(pt1.x, pt1.v, xNext, 0, step, 0, err)
+ != 0)
+ {
+ break;
+ }
+
+ for(i=0; i<3; i++)
+ {
+ coords[i] = xNext[i];
+ }
+
+ // Interpolate the velocity field at coords
+ if ( !func->FunctionValues(coords, vel) )
+ {
+ break;
+ }
+
+ for(i=0; i<3; i++)
+ {
+ pt2.v[i] = vel[i];
+ }
+
+ for (i=0; i<3; i++)
+ {
+ pt2.x[i] = xNext[i];
+ }
+
+ pt2.cellId = func->GetLastCellId();
+ func->GetLastWeights(w);
+ func->GetLastLocalCoordinates(pcoords);
+ input->GetCell(pt2.cellId, cell);
+
+ if ( inScalars )
+ {
+ // Interpolate scalars
+ inScalars->GetTuples(cell->PointIds, cellScalars);
+ for (pt2.s=0.0, i=0; i < cell->GetNumberOfPoints(); i++)
+ {
+ pt2.s += cellScalars->GetComponent(i,0) * w[i];
+ }
+ }
+
+ pt2.speed = vtkMath::Norm(pt2.v);
+
+ d = sqrt((double)vtkMath::Distance2BetweenPoints(pt1.x,pt2.x));
+ pt2.d = pt1.d + d;
+ // If at stagnation region, stop the integration
+ if ( d < VTK_EPSILON || (pt1.speed + pt2.speed) < VTK_EPSILON )
+ {
+ pt2.t = pt1.t;
+ break;
+ }
+ pt2.t = pt1.t + (2.0 * d / (pt1.speed + pt2.speed));
+
+ if (self->GetVorticity() && inVectors)
+ {
+ // compute vorticity
+ inVectors->GetTuples(cell->PointIds, cellVectors);
+ cellVel = cellVectors->GetPointer(0);
+ cell->Derivatives(0, pcoords, cellVel, 3, derivs);
+ vort[0] = derivs[7] - derivs[5];
+ vort[1] = derivs[2] - derivs[6];
+ vort[2] = derivs[3] - derivs[1];
+ // rotation
+ pt2.omega = vtkMath::Dot(vort, pt2.v);
+ pt2.omega /= pt2.speed;
+ pt2.theta += (pt1.omega+pt2.omega)/2 * (pt2.t - pt1.t);
+ }
+
+
+ // Store only points which have a point to be displayed
+ // between them
+ if (tOffset >= pt1.t && tOffset <= pt2.t)
+ {
+ // Do not store if same as the last point.
+ // To avoid storing some points twice.
+ if ( !sNext || sNext->x[0] != pt1.x[0] || sNext->x[1] != pt1.x[1]
+ || sNext->x[2] != pt1.x[2] )
+ {
+ idxNext = streamer->InsertNextStreamPoint();
+ sNext = streamer->GetStreamPoint(idxNext);
+ *sNext = pt1;
+ }
+ idxNext = streamer->InsertNextStreamPoint();
+ sNext = streamer->GetStreamPoint(idxNext);
+ *sNext = pt2;
+ }
+ if (tOffset < pt2.t)
+ {
+ tOffset += ((int)(( pt2.t - tOffset) / savePointInterval) + 1)
+ * savePointInterval;
+ }
+ pt1 = pt2;
+
+ }
+ // Store the last point anyway.
+ if ( !sNext || sNext->x[0] != pt2.x[0] || sNext->x[1] != pt2.x[1]
+ || sNext->x[2] != pt2.x[2] )
+ {
+ idxNext = streamer->InsertNextStreamPoint();
+ sNext = streamer->GetStreamPoint(idxNext);
+ *sNext = pt2;
+ }
+ // Clear the last cell to avoid starting a search from
+ // the last point in the streamline
+ func->ClearLastCellId();
+ }
+ }
+
+ integrator->Delete();
+ func->Delete();
+
+ cell->Delete();
+ cellVectors->Delete();
+ if (cellScalars)
+ {
+ cellScalars->Delete();
+ }
+ delete[] w;
+
+ return VTK_THREAD_RETURN_VALUE;
+}
+
+void VISU_Streamer::Integrate(vtkDataSet *input, vtkDataSet *source)
+{
+ vtkPointData *pd = input->GetPointData();
+ vtkDataArray *inScalars;
+ vtkDataArray *inVectors;
+ vtkIdType numSourcePts, idx, idxNext;
+ vtkStreamer::StreamPoint *sNext, *sPtr;
+ vtkIdType ptId, i;
+ int j, offset;
+ vtkCell *cell;
+ double v[3], *cellVel, derivs[9], xNext[3], vort[3];
+ double tol2;
+ double *w = new double[input->GetMaxCellSize()];
+ vtkDoubleArray *cellVectors;
+ vtkDataArray *cellScalars=0;
+
+ vtkDebugMacro(<<"Generating streamers");
+ this->NumberOfStreamers = 0;
+
+ // reexecuting - delete old stuff
+ if( this->Streamers )
+ {
+ delete [] this->Streamers;
+ }
+ this->Streamers = NULL;
+
+ if ( ! (inVectors=pd->GetVectors()) )
+ {
+ delete [] w;
+ vtkErrorMacro(<<"No vector data defined!");
+ return;
+ }
+
+ cellVectors = vtkDoubleArray::New();
+ cellVectors->SetNumberOfComponents(3);
+ cellVectors->Allocate(3*VTK_CELL_SIZE);
+
+ inScalars = pd->GetScalars();
+
+ if (inScalars)
+ {
+ cellScalars = inScalars->NewInstance();
+ cellScalars->SetNumberOfComponents(inScalars->GetNumberOfComponents());
+ cellScalars->Allocate(cellScalars->GetNumberOfComponents()*VTK_CELL_SIZE);
+ }
+
+ tol2 = input->GetLength()/1000;
+ tol2 = tol2*tol2;
+
+ //
+ // Create starting points
+ //
+ this->NumberOfStreamers = numSourcePts = offset = 1;
+ if ( source )
+ {
+ this->NumberOfStreamers = numSourcePts = source->GetNumberOfPoints();
+ }
+
+ if ( this->IntegrationDirection == VTK_INTEGRATE_BOTH_DIRECTIONS )
+ {
+ offset = 2;
+ this->NumberOfStreamers *= 2;
+ }
+
+ this->Streamers = new vtkStreamer::StreamArray[this->NumberOfStreamers];
+
+ if ( this->StartFrom == VTK_START_FROM_POSITION && !source )
+ {
+ idx = this->Streamers[0].InsertNextStreamPoint();
+ sPtr = this->Streamers[0].GetStreamPoint(idx);
+ sPtr->subId = 0;
+ for (i=0; i<3; i++)
+ {
+ sPtr->x[i] = this->StartPosition[i];
+ }
+ sPtr->cellId = input->FindCell(this->StartPosition, NULL, -1, 0.0,
+ sPtr->subId, sPtr->p, w);
+ }
+
+ else if ( this->StartFrom == VTK_START_FROM_LOCATION && !source )
+ {
+ idx = this->Streamers[0].InsertNextStreamPoint();
+ sPtr = this->Streamers[0].GetStreamPoint(idx);
+ sPtr->subId = 0;
+ cell = input->GetCell(sPtr->cellId);
+ cell->EvaluateLocation(sPtr->subId, sPtr->p, sPtr->x, w);
+ }
+
+ else //VTK_START_FROM_SOURCE
+ {
+ for (ptId=0; ptId < numSourcePts; ptId++)
+ {
+ idx = this->Streamers[offset*ptId].InsertNextStreamPoint();
+ sPtr = this->Streamers[offset*ptId].GetStreamPoint(idx);
+ sPtr->subId = 0;
+ source->GetPoint(ptId,sPtr->x);
+ sPtr->cellId = input->FindCell(sPtr->x, NULL, -1, tol2,
+ sPtr->subId, sPtr->p, w);
+ }
+ }
+
+ // Finish initializing each streamer
+ //
+ for (idx=0, ptId=0; ptId < numSourcePts; ptId++)
+ {
+ this->Streamers[offset*ptId].Direction = 1.0;
+ sPtr = this->Streamers[offset*ptId].GetStreamPoint(idx);
+ sPtr->d = 0.0;
+ sPtr->t = 0.0;
+ sPtr->s = 0.0;
+ sPtr->theta = 0.0;
+ sPtr->omega = 0.0;
+
+ if ( sPtr->cellId >= 0 ) //starting point in dataset
+ {
+ cell = input->GetCell(sPtr->cellId);
+ cell->EvaluateLocation(sPtr->subId, sPtr->p, xNext, w);
+
+ inVectors->GetTuples(cell->PointIds, cellVectors);
+ sPtr->v[0] = sPtr->v[1] = sPtr->v[2] = 0.0;
+ for (i=0; i < cell->GetNumberOfPoints(); i++)
+ {
+ cellVectors->GetTuple(i, v);
+ for (j=0; j<3; j++)
+ {
+ sPtr->v[j] += v[j] * w[i];
+ }
+ }
+
+ sPtr->speed = vtkMath::Norm(sPtr->v);
+
+ if (this->GetVorticity() && inVectors)
+ {
+ // compute vorticity
+ inVectors->GetTuples(cell->PointIds, cellVectors);
+ cellVel = cellVectors->GetPointer(0);
+ cell->Derivatives(0, sPtr->p, cellVel, 3, derivs);
+ vort[0] = derivs[7] - derivs[5];
+ vort[1] = derivs[2] - derivs[6];
+ vort[2] = derivs[3] - derivs[1];
+ // rotation
+ sPtr->omega = vtkMath::Dot(vort, sPtr->v);
+ sPtr->omega /= sPtr->speed;
+ sPtr->theta = 0;
+ }
+
+ if ( inScalars )
+ {
+ inScalars->GetTuples(cell->PointIds, cellScalars);
+ for (sPtr->s=0, i=0; i < cell->GetNumberOfPoints(); i++)
+ {
+ sPtr->s += cellScalars->GetComponent(i,0) * w[i];
+ }
+ }
+ }
+ else
+ {
+ for (j=0; j<3; j++)
+ {
+ sPtr->p[j] = 0.0;
+ sPtr->v[j] = 0.0;
+ }
+ sPtr->speed = 0;
+ }
+
+ if ( this->IntegrationDirection == VTK_INTEGRATE_BOTH_DIRECTIONS )
+ {
+ this->Streamers[offset*ptId+1].Direction = -1.0;
+ idxNext = this->Streamers[offset*ptId+1].InsertNextStreamPoint();
+ sNext = this->Streamers[offset*ptId+1].GetStreamPoint(idxNext);
+ sPtr = this->Streamers[offset*ptId].GetStreamPoint(idx);
+ *sNext = *sPtr;
+ }
+ else if ( this->IntegrationDirection == VTK_INTEGRATE_BACKWARD )
+ {
+ this->Streamers[offset*ptId].Direction = -1.0;
+ }
+
+
+ } //for each streamer
+
+ // Some data access methods must be called once from a single thread before they
+ // can safely be used. Call those now
+ vtkGenericCell *gcell = vtkGenericCell::New();
+ input->GetCell(0,gcell);
+ gcell->Delete();
+
+ // Set up and execute the thread
+ this->Threader->SetNumberOfThreads( this->NumberOfThreads );
+ VISU_StreamerThreadStruct str;
+ str.Filter = this;
+ str.Input = input;
+ str.Source = source;
+ this->Threader->SetSingleMethod( VISU_Streamer::ThreadedIntegrate, &str );
+ this->Threader->SingleMethodExecute();
+
+ //
+ // Now create appropriate representation
+ //
+ if ( this->OrientationScalars && !this->SpeedScalars)
+ {
+ for (ptId=0; ptId < this->NumberOfStreamers; ptId++)
+ {
+ for ( sPtr=this->Streamers[ptId].GetStreamPoint(0), i=0;
+ i < this->Streamers[ptId].GetNumberOfPoints() && sPtr->cellId >= 0;
+ i++, sPtr=this->Streamers[ptId].GetStreamPoint(i) )
+ {
+ sPtr->s = sPtr->theta;
+ }
+ }
+ }
+
+ if ( this->SpeedScalars )
+ {
+ for (ptId=0; ptId < this->NumberOfStreamers; ptId++)
+ {
+ for ( sPtr=this->Streamers[ptId].GetStreamPoint(0), i=0;
+ i < this->Streamers[ptId].GetNumberOfPoints() && sPtr->cellId >= 0;
+ i++, sPtr=this->Streamers[ptId].GetStreamPoint(i) )
+ {
+ sPtr->s = sPtr->speed;
+ }
+ }
+ }
+ delete [] w;
+ cellVectors->Delete();
+ if (cellScalars)
+ {
+ cellScalars->Delete();
+ }
+}
--- /dev/null
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#ifndef VISU_Streamer_HeaderFile
+#define VISU_Streamer_HeaderFile
+
+#include "VISUPipeline.hxx"
+
+#include <vtkStreamer.h>
+
+class VISU_PIPELINE_EXPORT VISU_Streamer : public vtkStreamer
+{
+public:
+ vtkTypeRevisionMacro(VISU_Streamer,vtkStreamer);
+
+protected:
+ // Description:
+ // Construct object to start from position (0,0,0); integrate forward;
+ // terminal speed 0.0; vorticity computation off; integrations step length
+ // 0.2; and maximum propagation time 100.0.
+ VISU_Streamer();
+ ~VISU_Streamer();
+
+ // Integrate data
+ void Integrate(vtkDataSet *input, vtkDataSet *source);
+
+ static VTK_THREAD_RETURN_TYPE ThreadedIntegrate( void *arg );
+
+private:
+ VISU_Streamer(const VISU_Streamer&); // Not implemented.
+ void operator=(const VISU_Streamer&); // Not implemented.
+};
+
+#endif
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File: VISU_UnstructuredGridPL.cxx
// Author: Alexey PETROV
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File: VISU_UnstructuredGripPL.hxx
// Author: Alexey PETROV
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File: VISU_PipeLine.cxx
// Author: Alexey PETROV
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File: VISU_PipeLine.hxx
// Author: Alexey PETROV
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SALOME VTKViewer : build VTK viewer into Salome desktop
// File : VVTK_WidgetCtrl.cxx
// Author : Peter KURNEV
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SALOME VTKViewer : build VTK viewer into Salome desktop
// File : VISU_WidgetCtrl.hxx
// Author : Peter KURNEV
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
+ *** Modified by OPEN CASCADE
+
=========================================================================*/
#include "VISU_XYPlotActor.hxx"
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
+
+ *** Modified by OPEN CASCADE
=========================================================================*/
// .NAME vtkXYPlotActor - generate an x-y plot from input dataset(s) or field data
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File: VISU_img2vti.cxx
// Author: Oleg UVAROV
-# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+# Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# VISU VISUGUI : GUI of VISU component
# File : Makefile.am
# Author : Marc Tajchman (CEA)
# Module : VISU
-
+#
include $(top_srcdir)/adm_local/unix/make_common_starter.am
lib_LTLIBRARIES= libVISU.la
VisuGUI_Slider.h \
VisuGUI_InputPane.h \
VisuGUI_FieldFilter.h \
- VisuGUI_ValuesLabelingDlg.h
+ VisuGUI_ValuesLabelingDlg.h \
+ VisuGUI_PrimitiveBox.h \
+ VisuGUI_SizeBox.h
dist_libVISU_la_SOURCES= \
VisuGUI.cxx \
VisuGUI_ClippingPanel.cxx \
VisuGUI_ClippingPlaneDlg.cxx \
VisuGUI_FilterScalarsDlg.cxx \
- VisuGUI_ValuesLabelingDlg.cxx
+ VisuGUI_ValuesLabelingDlg.cxx \
+ VisuGUI_PrimitiveBox.cxx \
+ VisuGUI_SizeBox.cxx
MOC_FILES= \
VisuGUI_moc.cxx \
VisuGUI_ClippingPanel_moc.cxx \
VisuGUI_ClippingPlaneDlg_moc.cxx \
VisuGUI_FilterScalarsDlg_moc.cxx \
- VisuGUI_ValuesLabelingDlg_moc.cxx
+ VisuGUI_ValuesLabelingDlg_moc.cxx \
+ VisuGUI_PrimitiveBox_moc.cxx \
+ VisuGUI_SizeBox_moc.cxx
nodist_libVISU_la_SOURCES=$(MOC_FILES)
$(BOOST_CPPFLAGS) \
$(GUI_CXXFLAGS) \
$(CORBA_CXXFLAGS) $(CORBA_INCLUDES) \
- -I$(srcdir)/../VVTK -I$(srcdir)/../OBJECT -I$(srcdir)/../VISU_I -I$(srcdir)/../GUITOOLS \
+ -I$(srcdir)/../OBJECT -I$(srcdir)/../VISU_I \
-I$(top_builddir)/idl -I$(srcdir)/../CONVERTOR -I$(srcdir)/../PIPELINE
libVISU_la_LDFLAGS= \
$(CAS_LDFLAGS) -lTKV3d \
$(KERNEL_LDFLAGS) -lSalomeNS -lSalomeDSClient \
$(GUI_LDFLAGS) -lSVTK -lSPlot2d -lSalomePrs -lOCCViewer \
- ../VVTK/libVVTK.la ../OBJECT/libVisuObject.la ../VISU_I/libVISUEngineImpl.la \
- ../GUITOOLS/libVISUGUITOOLS.la \
+ ../OBJECT/libVisuObject.la ../VISU_I/libVISUEngineImpl.la \
../../idl/libSalomeIDLVISU.la
if MED_ENABLE_MULTIPR
<!DOCTYPE TS>
<!--
- Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+ Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
<source>ICON_VECTORS</source>
<translation>Visu_vectors.png</translation>
</message>
- <message>
- <source>ICON_VVTK_INTERACTOR_STYLE_SWITCH</source>
- <translation>Visu_vvtk_switch.png</translation>
- </message>
- <message>
- <source>ICON_VVTK_PLANE_SEGMENTATION_SWITCH</source>
- <translation>Visu_PlaneSegmentation.png</translation>
- </message>
- <message>
- <source>ICON_VVTK_RECORDING_PAUSE</source>
- <translation>Visu_recording_pause.png</translation>
- </message>
- <message>
- <source>ICON_VVTK_RECORDING_PLAY</source>
- <translation>Visu_recording_play.png</translation>
- </message>
- <message>
- <source>ICON_VVTK_RECORDING_START</source>
- <translation>Visu_recording_start.png</translation>
- </message>
- <message>
- <source>ICON_VVTK_RECORDING_STOP</source>
- <translation>Visu_recording_stop.png</translation>
- </message>
<message>
<source>ICON_SWEEP_STOP</source>
<translation>Visu_recording_stop.png</translation>
</message>
- <message>
- <source>ICON_VVTK_SELECTION_MODE_SWITCH</source>
- <translation>Visu_points.png</translation>
- </message>
- <message>
- <source>ICON_VVTK_SPHERE_SEGMENTATION_SWITCH</source>
- <translation>Visu_SphereSegmentation.png</translation>
- </message>
<message>
<source>ICON_WIREFRAME</source>
<translation>Visu_wireframe.png</translation>
<!DOCTYPE TS>
<!--
- Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+ Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
<source>VISU_DISP_ONLY</source>
<translation>Display only on creation</translation>
</message>
+ <message>
+ <source>VISU_DUMP_MODE</source>
+ <translation>Dump mode</translation>
+ </message>
+ <message>
+ <source>VISU_DUMP_PICTURES</source>
+ <translation>Save pictures to directory</translation>
+ </message>
+ <message>
+ <source>VISU_DUMP_VIDEO</source>
+ <translation>Save animation to AVI file</translation>
+ </message>
<message>
<source>VISU_EDGE_COLOR</source>
<translation>Edge Color</translation>
<source>VISU_LOGARITHMIC_SCALING</source>
<translation>Logarithmic</translation>
</message>
+ <message>
+ <source>VISU_MARKER_SCALE</source>
+ <translation>Scale of marker</translation>
+ </message>
<message>
<source>VISU_MAX</source>
<translation>Max:</translation>
<source>VISU_NB_STEPS</source>
<translation>Number of steps</translation>
</message>
+ <message>
+ <source>VISU_NO_DUMP</source>
+ <translation>No dump</translation>
+ </message>
<message>
<source>VISU_ORIENTATION</source>
<translation>Orientation</translation>
<source>VISU_SWEEPING_PREF</source>
<translation>Sweeping preferences</translation>
</message>
+ <message>
+ <source>VISU_TABLES</source>
+ <translation>Tables</translation>
+ </message>
+ <message>
+ <source>VISU_TABLES_EDITING_PROPS</source>
+ <translation>Tables editing properties</translation>
+ </message>
+ <message>
+ <source>VISU_TABLES_ENABLE_EDITING</source>
+ <translation>Enable editing</translation>
+ </message>
+ <message>
+ <source>VISU_TABLES_SORT_POLICY</source>
+ <translation>Sort policy</translation>
+ </message>
+ <message>
+ <source>VISU_TABLES_EMPTY_LOWEST</source>
+ <translation>Empty cells are considered as lowest values</translation>
+ </message>
+ <message>
+ <source>VISU_TABLES_EMPTY_HIGHEST</source>
+ <translation>Empty cells are considered as highest values</translation>
+ </message>
+ <message>
+ <source>VISU_TABLES_EMPTY_FIRST</source>
+ <translation>Empty cells are always first</translation>
+ </message>
+ <message>
+ <source>VISU_TABLES_EMPTY_LAST</source>
+ <translation>Empty cells are always last</translation>
+ </message>
+ <message>
+ <source>VISU_TABLES_EMPTY_IGNORE</source>
+ <translation>Empty cells are ignored</translation>
+ </message>
+ <message>
+ <source>VISU_TIME_STAMP_FREQUENCY</source>
+ <translation>Time stamp frequency (for AVI generation)</translation>
+ </message>
<message>
<source>VISU_TIME_STEP</source>
<translation>Time step(second)</translation>
<source>VISU_TITLE</source>
<translation>Title</translation>
</message>
+ <message>
+ <source>VISU_TYPE_OF_MARKER</source>
+ <translation>Type of marker</translation>
+ </message>
<message>
<source>QUADRATIC_REPRESENT_MODE</source>
<translation>Representation of the 2D quadratic elements</translation>
<translation>Def. Shape and Scalar Map</translation>
</message>
<message>
- <source>VISU_FLOATING_POINT_PRECISION</source>
- <translation>Floating Point Precision</translation>
- </message>
- <message>
- <source>VISU_REALLY_DELETE</source>
- <translation>Do you really want to delete this %1 object(s): %2</translation>
- </message>
- <message>
- <source>WRN_NO_APPROPRIATE_SELECTION</source>
- <translation>No appropriate objects selected</translation>
- </message>
- </context>
- <context>
- <name>VVTK_MainWindow</name>
- <message>
- <source>DSC_VVTK_RECORDING_PAUSE</source>
- <translation>Pause recording</translation>
- </message>
- <message>
- <source>DSC_VVTK_RECORDING_PLAY</source>
- <translation>Play recording</translation>
- </message>
- <message>
- <source>DSC_VVTK_RECORDING_START</source>
- <translation>Start recording</translation>
- </message>
- <message>
- <source>DSC_VVTK_RECORDING_STOP</source>
- <translation>Stop recording</translation>
- </message>
- <message>
- <source>LBL_TOOLBAR_RECORD_LABEL</source>
- <translation>Recording Operations</translation>
- </message>
- <message>
- <source>MNU_VVTK_RECORDING_PAUSE</source>
- <translation>Pause recording</translation>
- </message>
- <message>
- <source>MNU_VVTK_RECORDING_PLAY</source>
- <translation>Play recording</translation>
- </message>
- <message>
- <source>MNU_VVTK_RECORDING_START</source>
- <translation>Start recording</translation>
- </message>
- <message>
- <source>MNU_VVTK_RECORDING_STOP</source>
- <translation>Stop recording</translation>
- </message>
- <message>
- <source>MSG_NO_AVI_MAKER</source>
- <translation>Tool jpeg2yuv, necessary for AVI recording, is not available.
-Please, refer to the documentation.</translation>
- </message>
- </context>
- <context>
- <name>VVTK_MainWindow1</name>
- <message>
- <source>DSC_VVTK_INTERACTOR_STYLE_SWITCH</source>
- <translation>Interaction Style Switch</translation>
- </message>
- <message>
- <source>DSC_VVTK_PLANE_SEGMENTATION_SWITCH</source>
- <translation>Plane Segmentation</translation>
- </message>
- <message>
- <source>DSC_VVTK_SELECTION_MODE_SWITCH</source>
- <translation>Selection Mode Switch</translation>
- </message>
- <message>
- <source>DSC_VVTK_SPHERE_SEGMENTATION_SWITCH</source>
- <translation>Sphere Segmentation</translation>
- </message>
- <message>
- <source>LBL_TOOLBAR_GAUSS_LABEL</source>
- <translation>Gauss Viewer Tools</translation>
- </message>
- <message>
- <source>MNU_VVTK_INTERACTOR_STYLE_SWITCH</source>
- <translation>Interaction Style Switch</translation>
- </message>
- <message>
- <source>MNU_VVTK_PLANE_SEGMENTATION_SWITCH</source>
- <translation>Plane Segmentation</translation>
- </message>
- <message>
- <source>MNU_VVTK_SELECTION_MODE_SWITCH</source>
- <translation>Selection Mode Switch</translation>
- </message>
- <message>
- <source>MNU_VVTK_SPHERE_SEGMENTATION_SWITCH</source>
- <translation>Sphere Segmentation</translation>
- </message>
- </context>
- <context>
- <name>VVTK_PickingDlg</name>
- <message>
- <source>BELOW_POINT</source>
- <translation>Centered below the point</translation>
- </message>
- <message>
- <source>CAMERA_TITLE</source>
- <translation>Movement of the camera</translation>
- </message>
- <message>
- <source>CURSOR_SIZE</source>
- <translation>Size of the cursor :</translation>
- </message>
- <message>
- <source>CURSOR_TITLE</source>
- <translation>Cursor</translation>
- </message>
- <message>
- <source>DISPLAY_PARENT_MESH</source>
- <translation>Display parent mesh element</translation>
- </message>
- <message>
- <source>INFO_WINDOW_TITLE</source>
- <translation>Information window</translation>
- </message>
- <message>
- <source>PARENT_MESH_TITLE</source>
- <translation>Parent mesh element</translation>
- </message>
- <message>
- <source>PICKING_DLG_TITLE</source>
- <translation>Picking</translation>
- </message>
- <message>
- <source>POINT_TOLERANCE</source>
- <translation>Point tolerance :</translation>
- </message>
- <message>
- <source>POSITION</source>
- <translation>Position :</translation>
- </message>
- <message>
- <source>PYRAMID_HEIGHT</source>
- <translation>Height of the pyramids :</translation>
- </message>
- <message>
- <source>SELECTION_COLOR</source>
- <translation>Selection cursor color :</translation>
- </message>
- <message>
- <source>STEP_NUMBER</source>
- <translation>Number of steps between two positions :</translation>
- </message>
- <message>
- <source>TOLERANCE_TITLE</source>
- <translation>Tolerance</translation>
- </message>
- <message>
- <source>TOP_LEFT_CORNER</source>
- <translation>Top-left corner of the 3D view</translation>
- </message>
- <message>
- <source>TRANSPARENCY</source>
- <translation>Transparency :</translation>
- </message>
- <message>
- <source>ZOOM_FACTOR</source>
- <translation>Zoom at first selected point (ratio) :</translation>
- </message>
- <message>
- <source>DATA_POSITION</source>
- <translation>Position</translation>
- </message>
- <message>
- <source>PARENT_ELEMENT</source>
- <translation>Parent mesh element ID:</translation>
- </message>
- <message>
- <source>LOCAL_POINT</source>
- <translation>Local Gauss Point ID:</translation>
- </message>
- </context>
- <context>
- <name>VVTK_PrimitiveBox</name>
- <message>
- <source>ALPHA_TEXTURE</source>
- <translation>Alpha Channel Texture (16x16) : </translation>
- </message>
- <message>
- <source>ALPHA_THRESHOLD</source>
- <translation>Alpha Channel Threshold : </translation>
- </message>
- <message>
- <source>CLAMP</source>
- <translation>Maximum Size (Clamp) : </translation>
- </message>
- <message>
- <source>FACE_LIMIT</source>
- <translation>Notify when number of faces exceeds : </translation>
- </message>
- <message>
- <source>FACE_NUMBER</source>
- <translation>Number of faces : </translation>
- </message>
- <message>
- <source>GEOMETRICAL_SPHERE</source>
- <translation>Geometrical Sphere</translation>
- </message>
- <message>
- <source>MAIN_TEXTURE</source>
- <translation>Main Texture (16x16) : </translation>
- </message>
- <message>
- <source>OPENGL_POINT</source>
- <translation>OpenGL Point</translation>
- </message>
- <message>
- <source>POINT_SPRITE</source>
- <translation>Point Sprite</translation>
- </message>
- <message>
- <source>PRIMITIVE_TITLE</source>
- <translation>Primitive</translation>
- </message>
- <message>
- <source>RESOLUTION</source>
- <translation>Resolution : </translation>
- </message>
- </context>
- <context>
- <name>VVTK_RecorderDlg</name>
- <message>
- <source>ALL_DISLPAYED_FRAMES</source>
- <translation>Recording all displayed frames</translation>
- </message>
- <message>
- <source>CLOSE</source>
- <translation>Close</translation>
- </message>
- <message>
- <source>DLG_RECORDER_TITLE</source>
- <translation>Recorder</translation>
- </message>
- <message>
- <source>FILE_NAME</source>
- <translation>Save to file : </translation>
- </message>
- <message>
- <source>FLT_ALL_FILES</source>
- <translation>All Files (*.*)</translation>
- </message>
- <message>
- <source>FLT_AVI_FILES</source>
- <translation>AVI Files (*.avi)</translation>
- </message>
- <message>
- <source>FPS</source>
- <translation>FPS : </translation>
- </message>
- <message>
- <source>PROGRESSIVE</source>
- <translation>Progressive</translation>
- </message>
- <message>
- <source>QUALITY</source>
- <translation>Quality : </translation>
- </message>
- <message>
- <source>RECORDING_MODE</source>
- <translation>Mode : </translation>
- </message>
- <message>
- <source>SETTINGS</source>
- <translation>Settings</translation>
- </message>
- <message>
- <source>SKIPPED_FRAMES</source>
- <translation>Recording at a given FPS</translation>
+ <source>VISU_PREF_GENERAL</source>
+ <translation>General</translation>
</message>
<message>
- <source>START</source>
- <translation>Start</translation>
+ <source>VISU_PREF_GROUP_PRECISION</source>
+ <translation>Input Fields Precision</translation>
</message>
- </context>
- <context>
- <name>VVTK_SegmentationCursorDlg</name>
<message>
- <source>DEPTH</source>
- <translation>Depth of the cursor: </translation>
+ <source>VISU_PREF_visual_data_precision</source>
+ <translation>Visual Data Precision</translation>
</message>
<message>
- <source>DEPTH_TITLE</source>
- <translation>Depth</translation>
+ <source>VISU_PREF_length_precision</source>
+ <translation>Length Precision</translation>
</message>
<message>
- <source>DIRECTION_DX</source>
- <translation>DX: </translation>
+ <source>VISU_PREF_angle_precision</source>
+ <translation>Angular Precision</translation>
</message>
<message>
- <source>DIRECTION_DY</source>
- <translation>DY: </translation>
+ <source>VISU_PREF_len_tol_precision</source>
+ <translation>Length Tolerance Precision</translation>
</message>
<message>
- <source>DIRECTION_DZ</source>
- <translation>DZ: </translation>
+ <source>VISU_PREF_parametric_precision</source>
+ <translation>Parametric Precision</translation>
</message>
<message>
- <source>DIRECTION_TITLE</source>
- <translation>Direction</translation>
+ <source>VISU_PREF_memory_precision</source>
+ <translation>Memory Size Precision</translation>
</message>
<message>
- <source>GAUSS_POINTS_TAB</source>
- <translation>Gauss Points</translation>
- </message>
- <message>
- <source>INCREMENT</source>
- <translation>+/- Ratio : </translation>
- </message>
- <message>
- <source>INSIDE_GAUSS_POINTS</source>
- <translation>Inside Cursor Gauss Points Presentation</translation>
- </message>
- <message>
- <source>MAGNIFICATION</source>
- <translation>Magnification (%) : </translation>
- </message>
- <message>
- <source>MAGNIFICATION_TITLE</source>
- <translation>Magnification</translation>
- </message>
- <message>
- <source>ORIGIN_TITLE</source>
- <translation>Origin</translation>
- </message>
- <message>
- <source>ORIGIN_X</source>
- <translation>X: </translation>
- </message>
- <message>
- <source>ORIGIN_Y</source>
- <translation>Y: </translation>
- </message>
- <message>
- <source>ORIGIN_Z</source>
- <translation>Z: </translation>
- </message>
- <message>
- <source>OUTSIDE_GAUSS_POINTS</source>
- <translation>Outside Cursor Gauss Points Presentation</translation>
- </message>
- <message>
- <source>RADIUS</source>
- <translation>Radius of the cursor :</translation>
- </message>
- <message>
- <source>RADIUS_TITLE</source>
- <translation>Radius</translation>
- </message>
- <message>
- <source>RATIO</source>
- <translation>+/- Ratio :</translation>
- </message>
- <message>
- <source>SEGMENTATION_CURSOR_DLG_TITLE</source>
- <translation>Segmentation Cursor</translation>
- </message>
- <message>
- <source>SEGMENTATION_CURSOR_TAB</source>
- <translation>Segmentation Cursor</translation>
- </message>
- </context>
- <context>
- <name>VVTK_SizeBox</name>
- <message>
- <source>COLOR</source>
- <translation>Color : </translation>
- </message>
- <message>
- <source>COLOR_TITLE</source>
- <translation>Color</translation>
+ <source>VISU_PRECISION_HINT</source>
+ <translation>
+Input value precision can be adjusted using
+'%1' parameter in Post-Pro module preferences.</translation>
</message>
<message>
- <source>GEOM_SIZE</source>
- <translation>Size of points (%) : </translation>
- </message>
- <message>
- <source>INCREMENT</source>
- <translation>+/- Ratio : </translation>
- </message>
- <message>
- <source>MAGNIFICATION</source>
- <translation>Magnification (%) : </translation>
- </message>
- <message>
- <source>MAX_SIZE</source>
- <translation>max size (%) : </translation>
- </message>
- <message>
- <source>MIN_SIZE</source>
- <translation>Range values for min size (%) : </translation>
- </message>
- <message>
- <source>OUTSIDE_SIZE</source>
- <translation>Percentage of normal size(%) : </translation>
- </message>
- <message>
- <source>SIZE_TITLE</source>
- <translation>Size</translation>
- </message>
- <message>
- <source>UNIFORM_COLOR</source>
- <translation>Uniform Color</translation>
- </message>
- </context>
- <context>
- <name>VVTK_ViewManager</name>
- <message>
- <source>VTK_VIEW_TITLE</source>
- <translation>Gauss scene:%1 - viewer:%2</translation>
+ <source>VISU_REALLY_DELETE</source>
+ <translation>Do you really want to delete this %1 object(s): %2</translation>
</message>
- </context>
- <context>
- <name>VVTK_ViewWindow</name>
<message>
- <source>LBL_TOOLBAR_LABEL</source>
- <translation>GAUSS viewer tools</translation>
+ <source>WRN_NO_APPROPRIATE_SELECTION</source>
+ <translation>No appropriate objects selected</translation>
</message>
</context>
<context>
</message>
<message>
<source>FLT_TABLE_FILES</source>
- <translation>Tables (*.txt *.tab)</translation>
+ <translation>Tables (*.txt *.tab *.csv)</translation>
</message>
<message>
<source>IMPORT_FROM_FILE</source>
<source>MEN_EXPORT_TABLE</source>
<translation>Export Table</translation>
</message>
+ <message>
+ <source>VISU_MEN_EXPORT_MED</source>
+ <translation>Export to MED file</translation>
+ </message>
<message>
<source>MEN_FEATURE_EDGES</source>
<translation>Feature Edges</translation>
<source>MEN_POINT_SELECTION</source>
<translation>Point Selection</translation>
</message>
+ <message>
+ <source>MEN_POINT_MARKER</source>
+ <translation>Point Marker</translation>
+ </message>
<message>
<source>MEN_POINTS</source>
<translation>Points</translation>
<source>USE_BUILD_PROGRESS</source>
<translation>Use build progress</translation>
</message>
+ <message>
+ <source>FIRST_STR_AS_TITLE</source>
+ <translation>Use first string as title</translation>
+ </message>
<message>
<source>MEN_LOAD_COMPONENT_DATA</source>
<translation>Load Component Data</translation>
<translation>Time step (second):</translation>
</message>
</context>
- <context>
- <name>VisuGUI_TableDlg</name>
- <message>
- <source>EDIT_TABLE_TLT</source>
- <translation>Edit Table</translation>
- </message>
- <message>
- <source>ERR_TABLE_NOT_AVAILABLE</source>
- <translation>Table is not available</translation>
- </message>
- <message>
- <source>TABLE_OF_INTEGER_TLT</source>
- <translation>Table of integer</translation>
- </message>
- <message>
- <source>TABLE_OF_REAL_TLT</source>
- <translation>Table of real</translation>
- </message>
- <message>
- <source>VIEW_TABLE_TLT</source>
- <translation>View Table</translation>
- </message>
- </context>
- <context>
- <name>VisuGUI_TableWidget</name>
- <message>
- <source>ADD_COLUMN_BTN</source>
- <translation>Add Column</translation>
- </message>
- <message>
- <source>ADD_ROW_BTN</source>
- <translation>Add Row</translation>
- </message>
- <message>
- <source>ADJUST_CELLS_BTN</source>
- <translation>Adjust Cells</translation>
- </message>
- <message>
- <source>CLEAR_BTN</source>
- <translation>Clear</translation>
- </message>
- <message>
- <source>REMOVE_COLUMN_BTN</source>
- <translation>Remove Column(s)</translation>
- </message>
- <message>
- <source>REMOVE_ROW_BTN</source>
- <translation>Remove Row(s)</translation>
- </message>
- <message>
- <source>SELECT_ALL_BTN</source>
- <translation>Select All</translation>
- </message>
- <message>
- <source>SET_TITLE_TLT</source>
- <translation>Set title</translation>
- </message>
- <message>
- <source>TITLE_LBL</source>
- <translation>Title:</translation>
- </message>
- <message>
- <source>UNITS_TLT</source>
- <translation>Units</translation>
- </message>
- </context>
<context>
<name>VisuGUI_TextPrefDlg</name>
<message>
<translation>Shrink Factor:</translation>
</message>
</context>
+ <context>
+ <name>VISU_TableDlg</name>
+ <message>
+ <source>ERR_TABLE_NOT_AVAILABLE</source>
+ <translation>Table is not available</translation>
+ </message>
+ <message>
+ <source>TABLE_OF_INTEGER_TLT</source>
+ <translation>Table of integer</translation>
+ </message>
+ <message>
+ <source>TABLE_OF_REAL_TLT</source>
+ <translation>Table of real</translation>
+ </message>
+ <message>
+ <source>TABLE_UNKNOWN_TLT</source>
+ <translation>Table of unknown</translation>
+ </message>
+ <message>
+ <source>VIEW_TABLE_TLT</source>
+ <translation>View Table</translation>
+ </message>
+ <message>
+ <source>ALLOW_EDIT_CHECK</source>
+ <translation>Enable editing</translation>
+ </message>
+ <message>
+ <source>DO_UPDATE_CHECK</source>
+ <translation>Immediate update</translation>
+ </message>
+ <message>
+ <source>ADD_COLUMN_BTN</source>
+ <translation>Add Column</translation>
+ </message>
+ <message>
+ <source>ADD_ROW_BTN</source>
+ <translation>Add Row</translation>
+ </message>
+ <message>
+ <source>ADJUST_CELLS_BTN</source>
+ <translation>Adjust Cells</translation>
+ </message>
+ <message>
+ <source>CLEAR_BTN</source>
+ <translation>Clear</translation>
+ </message>
+ <message>
+ <source>REMOVE_COLUMN_BTN</source>
+ <translation>Remove Column(s)</translation>
+ </message>
+ <message>
+ <source>REMOVE_ROW_BTN</source>
+ <translation>Remove Row(s)</translation>
+ </message>
+ <message>
+ <source>SELECT_ALL_BTN</source>
+ <translation>Select All</translation>
+ </message>
+ <message>
+ <source>SET_TITLE_TLT</source>
+ <translation>Set title</translation>
+ </message>
+ <message>
+ <source>TITLE_LBL</source>
+ <translation>Title:</translation>
+ </message>
+ <message>
+ <source>UNITS_TLT</source>
+ <translation>Units</translation>
+ </message>
+ </context>
</TS>
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU VISUGUI : GUI of VISU component
// File : VisuGUI.cxx
// Author :
// Module : VISU
-
+//
#include "VisuGUI.h"
// STL Includes
//#include "SVTK_MainWindow.h"
#include "VTKViewer_Algorithm.h"
+#include "VTKViewer_MarkerDlg.h"
#include "SPlot2d_ViewModel.h"
#include "VisuGUI_SetupPlot2dDlg.h"
#include "VISU_Vectors_i.hh"
#include "VisuGUI_VectorsDlg.h"
-#include "VisuGUI_TableDlg.h"
+#include "VISU_TableDlg.h"
#include "VisuGUI_FileInfoDlg.h"
#include "SALOMEconfig.h"
aFilter.append( tr("FLT_TABLE_FILES") );
aFilter.append( tr("FLT_ALL_FILES") );
- QString anInitialPath = "";
- if ( SUIT_FileDlg::getLastVisitedPath().isEmpty() )
- anInitialPath = QDir::currentPath();
+ //QString anInitialPath = "";
+ //if ( SUIT_FileDlg::getLastVisitedPath().isEmpty() )
+ // anInitialPath = QDir::currentPath();
+
+ //QStringList aFiles = SUIT_FileDlg::getOpenFileNames(GetDesktop(this),
+ // anInitialPath,
+ // aFilter,
+ // tr("TLT_IMPORT_TABLE"));
+
+ SUIT_ResourceMgr* aResourceMgr = GetResourceMgr();
+ bool aFirstStrAsTitle = aResourceMgr->booleanValue("VISU", "first_str_as_title", false);
+
+ SalomeApp_CheckFileDlg fd( GetDesktop(this), true, tr("FIRST_STR_AS_TITLE") );
+ fd.setWindowTitle( tr( "IMPORT_FROM_FILE" ) );
+ fd.setFileMode( SalomeApp_CheckFileDlg::ExistingFiles );
+ fd.setFilters( aFilter );
+ fd.SetChecked( aFirstStrAsTitle );
+ if ( SalomeApp_CheckFileDlg::getLastVisitedPath().isEmpty() )
+ fd.setDirectory( QDir::currentPath() );
+
+ QStringList aFiles;
+ if ( !fd.exec() )
+ return; // cancelled, return
+ aFiles = fd.selectedFiles();
+ aFirstStrAsTitle = fd.IsChecked();
- QStringList aFiles = SUIT_FileDlg::getOpenFileNames(GetDesktop(this),
- anInitialPath,
- aFilter,
- tr("TLT_IMPORT_TABLE"));
if ( aFiles.count() == 0 )
return; // nothing selected
QString anInfo( tr("TLT_IMPORT_TABLE") + " " + aFileInfo.filePath() + " ..." );
application()->putInfo( anInfo );
- CORBA::Object_var anObject = GetVisuGen(this)->ImportTables(aFileInfo.filePath().toLatin1().constData());
+ CORBA::Object_var anObject =
+ GetVisuGen(this)->ImportTables(aFileInfo.filePath().toLatin1().constData(),
+ aFirstStrAsTitle);
if (CORBA::is_nil(anObject.in())) {
errors.append( QString( "%1 :\n\t%2" ).arg( aFileInfo.filePath() ).
// get name for the file
QStringList aFilter;
aFilter.append("Table Files (*.txt *.tab)");
+ aFilter.append("CSV Table Files (*.csv)");
QFileInfo aFileInfo =
SUIT_FileDlg::getFileName(GetDesktop(this),
delete CursorDlg;
}
+//----------------------------------------------------------------------------
+void
+VisuGUI
+::OnChangePointMarker()
+{
+ SALOME_ListIO aListIO;
+ GetSelectionMgr( this )->selectedObjects( aListIO );
+ if( aListIO.Extent() < 1 )
+ return;
+
+ VISU::StudyId2MarkerMap& aMarkerMap = GetVisuGen( this )->GetMarkerMap();
+ _PTR(Study) aCStudy = GetCStudy( GetAppStudy( this ) );
+ int aStudyId = aCStudy->StudyId();
+
+ bool update = false;
+ for( SALOME_ListIteratorOfListIO It( aListIO ); It.More(); It.Next() )
+ {
+ Handle(SALOME_InteractiveObject)& anIO = It.Value();
+ std::vector<VISU::Prs3d_i*> aPrsList = GetPrs3dList( this, anIO );
+ for( int i = 0, n = aPrsList.size(); i < n; i++ )
+ {
+ if( VISU::Prs3d_i* aPrs = aPrsList[i] )
+ {
+ VTKViewer_MarkerDlg* aDlg = new VTKViewer_MarkerDlg( GetDesktop( this ) );
+
+ aDlg->setCustomMarkerMap( aMarkerMap[ aStudyId ] );
+
+ VISU::MarkerType aMarkerTypeCurrent = aPrs->GetMarkerType();
+ VISU::MarkerScale aMarkerScaleCurrent = aPrs->GetMarkerScale();
+ int aMarkerTextureCurrent = aPrs->GetMarkerTexture();
+ if( aMarkerTypeCurrent != VISU::MT_USER )
+ aDlg->setStandardMarker( (VTK::MarkerType)aMarkerTypeCurrent, (VTK::MarkerScale)aMarkerScaleCurrent );
+ else
+ aDlg->setCustomMarker( aMarkerTextureCurrent );
+
+ if( aDlg->exec() )
+ {
+ aMarkerMap[ aStudyId ] = aDlg->getCustomMarkerMap();
+
+ VISU::MarkerType aMarkerTypeNew = (VISU::MarkerType)aDlg->getMarkerType();
+ VISU::MarkerScale aMarkerScaleNew = (VISU::MarkerScale)aDlg->getStandardMarkerScale();
+ int aMarkerTextureNew = aDlg->getCustomMarkerID();
+ if( aMarkerTypeNew != VISU::MT_USER )
+ aPrs->SetMarkerStd( aMarkerTypeNew, aMarkerScaleNew );
+ else
+ aPrs->SetMarkerTexture( aMarkerTextureNew );
+
+ aPrs->UpdateActors();
+ update = true;
+ }
+
+ delete aDlg;
+ }
+ }
+ }
+
+ if( update )
+ if( SVTK_ViewWindow* vw = GetActiveViewWindow<SVTK_ViewWindow>( this ) )
+ vw->Repaint();
+}
+
//----------------------------------------------------------------------------
void
VisuGUI
Handle(SALOME_InteractiveObject) anIO = aSelectionItem.myIO;
VISU::Base_i* aBase = aSelectionItem.myObjectInfo.myBase;
_PTR(SObject) aSObject = aSelectionItem.myObjectInfo.mySObject;
- if(VISU::Table_i* aTable = dynamic_cast<VISU::Table_i*>(aBase))
+ if(VISU::Table_i* aTable = dynamic_cast<VISU::Table_i*>(aBase)) {
aSObject = GetCStudy( GetAppStudy( this ) )->FindObjectID( aTable->GetObjectEntry() );
-
- if( !IsSObjectTable( aSObject ) )
- return;
-
- VisuGUI_TableDlg* dlg = new VisuGUI_TableDlg( GetDesktop( this ),
- aSObject,
- false,
- //SAL2670 Orientation of show tables
- VisuGUI_TableDlg::ttAuto,
- Qt::Vertical );
- dlg->show();
+ if( IsSObjectTable( aSObject ) ) {
+ VISU_TableDlg* dlg = new VISU_TableDlg( GetDesktop( this ),
+ GetCStudy( GetAppStudy( this ) ),
+ aTable,
+ false,
+ //SAL2670 Orientation of show tables
+ VISU_TableDlg::ttAuto,
+ Qt::Vertical );
+ dlg->show();
+ }
+ }
}
//----------------------------------------------------------------------------
// if study is not locked - create new container, create curves and insert them
// into container, then plot container if current viewer is of VIEW_PLOT2D type
int horIndex;
- QList<int> verIndices, zIndices;
- aDlg->getCurvesSource( horIndex, verIndices, zIndices );
+ QList<int> verIndices, ver1Indices, ver2Indices, zIndices;
+ aDlg->getCurvesSource( horIndex, ver1Indices, ver2Indices, zIndices );
+ verIndices = ver1Indices + ver2Indices;
if( horIndex >= 0 && verIndices.count() > 0 ){
CORBA::Object_var aContainerObj = GetVisuGen(this)->CreateContainer();
if(VISU::Container_i* aContainer = dynamic_cast<VISU::Container_i*>(VISU::GetServant(aContainerObj).in())){
for( int i = 0; i < verIndices.count(); i++ ){
+ bool isV2 = ver2Indices.contains(verIndices[i]);
VISU::Curve_var aCurveObject =
- GetVisuGen(this)->CreateCurveWithZ(aTable->_this(), horIndex+1, verIndices[i]+1, zIndices[i]+1 );
+ GetVisuGen(this)->CreateCurveWithZExt(aTable->_this(), horIndex+1, verIndices[i]+1, zIndices[i]+1, isV2 );
if(VISU::Curve_i* aCurve = dynamic_cast<VISU::Curve_i*>(VISU::GetServant(aCurveObject).in())){
bool isAuto;
int marker, line, lineWidth;
// if study is not locked - create new table and container objects, create curves
// and insert them into container, then plot container if current viewer is of VIEW_PLOT2D type
int horIndex;
- QList<int> verIndices, zIndices;
- aDlg->getCurvesSource( horIndex, verIndices, zIndices );
+ QList<int> verIndices, ver1Indices, ver2Indices, zIndices;
+ aDlg->getCurvesSource( horIndex, verIndices, ver2Indices, zIndices );
+ verIndices = ver1Indices + ver2Indices;
if ( horIndex >= 0 && verIndices.count() > 0 ) {
VISU::Table_var aTableObject = GetVisuGen(this)->CreateTable(aSObject->GetID().c_str());
if(!CORBA::is_nil(aTableObject)){
VISU::Container_var aContainerObject = GetVisuGen(this)->CreateContainer();
VISU::Container_i* aContainer = dynamic_cast<VISU::Container_i*>(VISU::GetServant(aContainerObject).in());
for ( int i = 0; i < verIndices.count(); i++ ) {
- VISU::Curve_var aCurveObject = GetVisuGen(this)->CreateCurveWithZ
- ( aTableObject, horIndex+1, verIndices[i]+1, zIndices[i]+1 );
+ bool isV2 = ver2Indices.contains(verIndices[i]);
+ VISU::Curve_var aCurveObject = GetVisuGen(this)->CreateCurveWithZExt
+ ( aTableObject, horIndex+1, verIndices[i]+1, zIndices[i]+1, isV2 );
if(VISU::Curve_i* aCurve = dynamic_cast<VISU::Curve_i*>(VISU::GetServant(aCurveObject).in())){
bool isAuto;
int marker, line, lineWidth;
tr("MEN_LINE_WIDTH"), "", 0, aParent, false,
this, SLOT(OnChangeLines()));
+ createAction( VISU_POINT_MARKER, tr("MEN_POINT_MARKER"), QIcon(),
+ tr("MEN_POINT_MARKER"), "", 0, aParent, false,
+ this, SLOT(OnChangePointMarker()));
+
createAction( VISU_SHRINK_FACTOR, tr("MEN_SHRINK_FACTOR"), QIcon(),
tr("MEN_SHRINK_FACTOR"), "", 0, aParent, false,
this, SLOT(OnChangeShrinkFactor()));
tr("MEN_FILE_INFO"), "", 0, aParent, false,
this, SLOT(OnFileInfo()));
- createAction( VISU_EXPORT_MED, tr("MEN_EXPORT_MED"), QIcon(),
- tr("MEN_EXPORT_MED"), "", 0, aParent, false,
+ createAction( VISU_EXPORT_MED, tr("VISU_MEN_EXPORT_MED"), QIcon(),
+ tr("VISU_MEN_EXPORT_MED"), "", 0, aParent, false,
this, SLOT(OnExportMED()));
createAction( VISU_FILTERSCALARS, tr("MEN_FILTER_SCALARS"), QIcon(),
mgr->insert( action( VISU_COLOR ) , parentId, -1, -1 ); // color
mgr->insert( action( VISU_OPACITY ) , parentId, -1, -1 ); // opacity
mgr->insert( action( VISU_LINE_WIDTH ), parentId, -1, -1 ); // line width
+ mgr->insert( action( VISU_POINT_MARKER ), parentId, -1, -1 ); // point marker
mgr->insert( action( VISU_SHRINK_FACTOR ), parentId, -1, -1 ); // shrink factor
mgr->insert( separator(), -1, -1, -1 );
"or (type='VISU::TDEFORMEDSHAPE' and hasActor=1))" );
mgr->setRule( action( VISU_OPACITY ), aRule + " and hasActor=1" );
mgr->setRule( action( VISU_LINE_WIDTH ), aRule + aLineType + " and hasActor=1" );
+ mgr->setRule( action( VISU_POINT_MARKER ), aRule + aLineType + " and hasActor=1 and representation='VISU::POINT'" );
mgr->setRule( action( VISU_SHRINK_FACTOR ), aRule + aShrinkType + " and isShrunk=1" );
// rename command
void VisuGUI::createPreferences()
{
+ // TAB: General
+ int genTab = addPreference( tr( "VISU_PREF_GENERAL" ) );
+ // Quantities with individual precision settings
+ int precGroup = addPreference( tr( "VISU_PREF_GROUP_PRECISION" ), genTab );
+ setPreferenceProperty( precGroup, "columns", 2 );
+
+ // Default precision used by some input fieklds and data visualization code
+ // Moved here from "Representation" tab to have all precisions in the same place
+ int point_precision = addPreference( tr( "VISU_PREF_visual_data_precision" ), precGroup,
+ LightApp_Preferences::IntSpin, "VISU", "visual_data_precision" );
+ setPreferenceProperty( point_precision, "min", -16 );
+ setPreferenceProperty( point_precision, "max", 16 );
+ setPreferenceProperty( point_precision, "step", 1 );
+
+ const int nbQuantities = 5;
+ int precs[nbQuantities], ii = 0;
+ precs[ii++] = addPreference( tr( "VISU_PREF_length_precision" ), precGroup,
+ LightApp_Preferences::IntSpin, "VISU", "length_precision" );
+ precs[ii++] = addPreference( tr( "VISU_PREF_angle_precision" ), precGroup,
+ LightApp_Preferences::IntSpin, "VISU", "angle_precision" );
+ precs[ii++] = addPreference( tr( "VISU_PREF_len_tol_precision" ), precGroup,
+ LightApp_Preferences::IntSpin, "VISU", "len_tol_precision" );
+ precs[ii++] = addPreference( tr( "VISU_PREF_parametric_precision" ), precGroup,
+ LightApp_Preferences::IntSpin, "VISU", "parametric_precision" );
+ precs[ii ] = addPreference( tr( "VISU_PREF_memory_precision" ), precGroup,
+ LightApp_Preferences::IntSpin, "VISU", "memory_precision" );
+
+ // Set property for precision value for spinboxes
+ for ( ii = 0; ii < nbQuantities; ii++ ){
+ setPreferenceProperty( precs[ii], "min", ii == 2 ? 0 : -10 );
+ setPreferenceProperty( precs[ii], "max", ii == 2 ? 3 : 10 );
+ setPreferenceProperty( precs[ii], "precision", 2 );
+ }
+
+
// TAB: "MED import"
int importTab = addPreference( tr( "MED import" ) );
//printf( "++++++++++++++++++ Tab index %d\n", importTab );
// group: "Animation preferences"
{
int animationGroup = addPreference( tr( "VISU_ANIMATION_PREFERENCES" ), animationTab );
- setPreferenceProperty( animationGroup, "columns", 3 );
+ setPreferenceProperty( animationGroup, "columns", 1 );
int speed = addPreference( tr( "Speed" ), animationGroup,
LightApp_Preferences::IntSpin, "VISU", "speed" );
setPreferenceProperty( speed, "min", 1 );
setPreferenceProperty( speed, "max", 99 );
+
+ int dump_mode = addPreference( tr( "VISU_DUMP_MODE" ), animationGroup,
+ LightApp_Preferences::Selector, "VISU", "dump_mode" );
+
+ modes.clear();
+ modes.append( tr( "VISU_NO_DUMP" ) );
+ modes.append( tr( "VISU_DUMP_PICTURES" ) );
+ modes.append( tr( "VISU_DUMP_VIDEO" ) );
+ setPreferenceProperty( dump_mode, "strings", modes );
+
+ indices.clear();
+ indices.append( 0 );
+ indices.append( 1 );
+ indices.append( 2 );
+ setPreferenceProperty( dump_mode, "indexes", indices );
+
+ int time_stamp_frequency = addPreference( tr( "VISU_TIME_STAMP_FREQUENCY" ), animationGroup,
+ LightApp_Preferences::IntSpin, "VISU", "time_stamp_frequency" );
+ setPreferenceProperty( time_stamp_frequency, "min", 1 );
+ setPreferenceProperty( time_stamp_frequency, "max", 100 );
}
// group: "Sweeping preferences"
setPreferenceProperty( scalar_def_represent, "indexes", indices1 );
addPreference( tr( "VISU_SHRINK" ), representGr, LightApp_Preferences::Bool, "VISU", "scalar_def_shrink" );
- int point_precision = addPreference( tr( "VISU_FLOATING_POINT_PRECISION" ), representGr,
- LightApp_Preferences::IntSpin, "VISU", "floating_point_precision" );
- setPreferenceProperty( point_precision, "min", 1 );
- setPreferenceProperty( point_precision, "max", 16 );
- setPreferenceProperty( point_precision, "step", 1 );
- addPreference( "", representGr, LightApp_Preferences::Space );
-
-
int quadraticmode = addPreference( tr( "QUADRATIC_REPRESENT_MODE" ), representGr, LightApp_Preferences::Selector, "VISU", "quadratic_mode" );
QStringList quadraticModes;
quadraticModes.append("Lines");
addPreference( tr( "VISU_EDGE_COLOR" ), representGr, LightApp_Preferences::Color, "VISU", "edge_color" );
addPreference( "", representGr, LightApp_Preferences::Space );
+ SUIT_ResourceMgr* aResourceMgr = VISU::GetResourceMgr();
+
+ int typeOfMarker = addPreference( tr( "VISU_TYPE_OF_MARKER" ), representGr, LightApp_Preferences::Selector, "VISU", "type_of_marker" );
+
+ QList<QVariant> aMarkerTypeIndicesList;
+ QList<QVariant> aMarkerTypeIconsList;
+ for ( int i = VTK::MT_POINT; i <= VTK::MT_O_X; i++ ) {
+ QString icoFile = QString( "ICON_VERTEX_MARKER_%1" ).arg( i );
+ QPixmap pixmap = aResourceMgr->loadPixmap( "VTKViewer", tr( qPrintable( icoFile ) ) );
+ aMarkerTypeIndicesList << i;
+ aMarkerTypeIconsList << pixmap;
+ }
+ setPreferenceProperty( typeOfMarker, "indexes", aMarkerTypeIndicesList );
+ setPreferenceProperty( typeOfMarker, "icons", aMarkerTypeIconsList );
+
+ int markerScale = addPreference( tr( "VISU_MARKER_SCALE" ), representGr, LightApp_Preferences::Selector, "VISU", "marker_scale" );
+
+ QList<QVariant> aMarkerScaleIndicesList;
+ QStringList aMarkerScaleValuesList;
+ for ( int i = VISU::MS_10; i <= VISU::MS_70; i++ ) {
+ aMarkerScaleIndicesList << i;
+ aMarkerScaleValuesList << QString::number( (i-(int)VISU::MS_10)*0.5 + 1.0 );
+ }
+ setPreferenceProperty( markerScale, "strings", aMarkerScaleValuesList );
+ setPreferenceProperty( markerScale, "indexes", aMarkerScaleIndicesList );
+
addPreference( tr( "VISU_USE_SHADING" ), representGr, LightApp_Preferences::Bool, "VISU", "represent_shading" );
sp = addPreference( "", representGr, LightApp_Preferences::Space );
setPreferenceProperty( sp, "hstretch", 0 );
addPreference( tr( "VISU_AUTOMATIC_FIT_ALL" ), representGr,
LightApp_Preferences::Bool, "VISU", "automatic_fit_all" );
+ // TAB: Tables ; group: "Tables editing properties"
+ int tablesTab = addPreference( tr( "VISU_TABLES" ) );
+
+ int tablesGr = addPreference( tr( "VISU_TABLES_EDITING_PROPS" ), tablesTab );
+ setPreferenceProperty( tablesGr, "columns", 1 );
+
+ addPreference( tr( "VISU_TABLES_ENABLE_EDITING" ), tablesGr, LightApp_Preferences::Bool, "VISU", "tables_enable_editing" );
+
+ int sortPolicyPref = addPreference( tr( "VISU_TABLES_SORT_POLICY" ), tablesGr, LightApp_Preferences::Selector, "VISU", "tables_sort_policy" );
+ QStringList policies;
+ policies.append( tr( "VISU_TABLES_EMPTY_LOWEST" ) );
+ policies.append( tr( "VISU_TABLES_EMPTY_HIGHEST" ) );
+ policies.append( tr( "VISU_TABLES_EMPTY_FIRST" ) );
+ policies.append( tr( "VISU_TABLES_EMPTY_LAST" ) );
+ policies.append( tr( "VISU_TABLES_EMPTY_IGNORE" ) );
+ indices.clear();
+ indices.append( 0 );
+ indices.append( 1 );
+ indices.append( 2 );
+ indices.append( 3 );
+ indices.append( 4 );
+ setPreferenceProperty( sortPolicyPref, "strings", policies );
+ setPreferenceProperty( sortPolicyPref, "indexes", indices );
+
// TAB: Feature edges ; group: "Feature edges properties"
int featureEdgesTab = addPreference( tr( "VISU_FEATURE_EDGES" ) );
SUIT_FileDlg::getFileName(GetDesktop(this),
aPath,
aFilter,
- tr("MEN_EXPORT_MED"), // "Export To Med File"
+ tr("VISU_MEN_EXPORT_MED"), // "Export To Med File"
false);
QString aFile = aFileInfo.filePath();
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU VISUGUI : GUI of VISU component
// File : VisuGUI.h
// Author : Laurent CORNABE & Hubert ROLLAND
// Module : VISU
-
+//
#ifndef VisuGUI_HeaderFile
#define VisuGUI_HeaderFile
void OnChangeWireframeColor();
void OnChangeOpacity();
void OnChangeLines();
+ void OnChangePointMarker();
void OnChangeShrinkFactor();
void OnShowTable();
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
#ifndef VISUGUI_ACTIONSDEF
#define VISUGUI_ACTIONSDEF
#define VISU_EDGE_COLOR 4059
#define VISU_OPACITY 4060
#define VISU_LINE_WIDTH 4061
+#define VISU_POINT_MARKER 40611
#define VISU_SHRINK_FACTOR 40629
#define VISU_EDIT_SCALARMAP 40620
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU VISUGUI : GUI of VISU component
// File : VisuGUI_BasePanel.cxx
// Author : Oleg Uvarov
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU VISUGUI : GUI of VISU component
// File : VisuGUI_BasePanel.cxx
// Author : Oleg Uvarov
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU VISUGUI : GUI of VISU component
// File : VisuGUI_BuildProgressDlg.cxx
// Author : Oleg UVAROV
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU VISUGUI : GUI of VISU component
// File : VisuGUI_BuildProgressDlg.h
// Author : Oleg UVAROV
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU VISUGUI : GUI of VISU component
// File : VisuGUI_CacheDlg.cxx
// Author : Oleg UVAROV
#include "SUIT_ResourceMgr.h"
#include "SalomeApp_Module.h"
+#include <SalomeApp_DoubleSpinBox.h>
#include "LightApp_Application.h"
-#include "QtxDoubleSpinBox.h"
-
#include <QButtonGroup>
#include <QGroupBox>
#include <QLabel>
myMimimalMemoryButton->setChecked( !isLimitedMemory );
aGridLay->addWidget( myMimimalMemoryButton, 1, 0 );
- myLimitedMemory = new QtxDoubleSpinBox( 1.0, aLimitedMemoryMax, 10.0, aGB );
+ myLimitedMemory = new SalomeApp_DoubleSpinBox( aGB );
+ VISU::initSpinBox( myLimitedMemory, 1.0, aLimitedMemoryMax, 10.0, "memory_precision" );
myLimitedMemory->setSuffix( " Mb" );
myLimitedMemory->setValue( aLimitedMemory );
myLimitedMemory->setEnabled( isLimitedMemory );
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU VISUGUI : GUI of VISU component
// File : VisuGUI_CacheDlg.h
// Author : Oleg UVAROV
class QLineEdit;
class QRadioButton;
-class QtxDoubleSpinBox;
+class SalomeApp_DoubleSpinBox;
class SalomeApp_Module;
QRadioButton* myMimimalMemoryButton;
QRadioButton* myLimitedMemoryButton;
- QtxDoubleSpinBox* myLimitedMemory;
+ SalomeApp_DoubleSpinBox* myLimitedMemory;
QLineEdit* myUsedMemory;
QLineEdit* myFreeMemory;
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
#include "VisuGUI_ClippingDlg.h"
#include "VisuGUI.h"
#include "VISU_PipeLine.hxx"
#include "VISU_DataSetActor.h"
+#include <SalomeApp_IntSpinBox.h>
+#include <SalomeApp_DoubleSpinBox.h>
+
#include "LightApp_SelectionMgr.h"
#include "LightApp_Application.h"
#include <QValidator>
#include <QTabWidget>
#include <QRadioButton>
-#include <QSpinBox>
#include <QKeyEvent>
#include <QPushButton>
#include <QListWidget>
vw->Repaint();
}
}
-
- void RangeStepAndValidator (QtxDoubleSpinBox* theSpinBox, double min, double max,
- double step, unsigned short decimals)
- {
- theSpinBox->setRange(min, max);
- theSpinBox->setSingleStep(step);
- theSpinBox->setRange(min, max );
- theSpinBox->setDecimals( decimals);
- }
};
//=================================================================================
GroupButtonsLayout->addWidget(buttonOk, 0, 0);
// Initial state
- VISU::RangeStepAndValidator(SpinBoxDistance, 0.0, 1.0, 0.01, 3);
- VISU::RangeStepAndValidator(SpinBoxRot1, -180.0, 180.0, 1, 3);
- VISU::RangeStepAndValidator(SpinBoxRot2, -180.0, 180.0, 1, 3);
+ VISU::initSpinBox( SpinBoxDistance, 0., 1., .01, "length_precision" );
+ VISU::initSpinBox( SpinBoxRot1, -180., 180., 1., "angle_precision" );
+ VISU::initSpinBox( SpinBoxRot2, -180., 180., 1., "angle_precision" );
ComboBoxOrientation->addItem(tr("PARALLEL_XOY_COMBO_ITEM"));
ComboBoxOrientation->addItem(tr("PARALLEL_YOZ_COMBO_ITEM"));
TextLabelDistance->setText(tr("LBL_DISTANCE"));
GroupParametersLayout->addWidget(TextLabelDistance, 1, 0);
- SpinBoxDistance = new QtxDoubleSpinBox(GroupParameters);
+ SpinBoxDistance = new SalomeApp_DoubleSpinBox(GroupParameters);
GroupParametersLayout->addWidget(SpinBoxDistance, 1, 1);
TextLabelRot1 = new QLabel(GroupParameters);
TextLabelRot1->setText(tr("LBL_ROTATION_YZ"));
GroupParametersLayout->addWidget(TextLabelRot1, 2, 0);
- SpinBoxRot1 = new QtxDoubleSpinBox(GroupParameters);
+ SpinBoxRot1 = new SalomeApp_DoubleSpinBox(GroupParameters);
GroupParametersLayout->addWidget(SpinBoxRot1, 2, 1);
TextLabelRot2 = new QLabel(GroupParameters);
TextLabelRot2->setText(tr("LBL_ROTATION_XZ"));
GroupParametersLayout->addWidget(TextLabelRot2, 3, 0);
- SpinBoxRot2 = new QtxDoubleSpinBox(GroupParameters);
+ SpinBoxRot2 = new SalomeApp_DoubleSpinBox(GroupParameters);
GroupParametersLayout->addWidget(SpinBoxRot2, 3, 1);
return GroupParameters;
// Index
TextLabelIJKIndex = new QLabel(WidgetIJKTab);
TextLabelIJKIndex->setText(tr("LBL_IJK_INDEX"));
- SpinBoxIJKIndex = new QSpinBox(WidgetIJKTab);
+ SpinBoxIJKIndex = new SalomeApp_IntSpinBox(WidgetIJKTab);
+ SpinBoxIJKIndex->setAcceptNames( false );
// Orientation
CheckBoxIJKPlaneReverse = new QCheckBox (tr("REVERSE_NORMAL_CHK"), WidgetIJKTab);
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
#ifndef DIALOGBOX_CLIPPING_H
#define DIALOGBOX_CLIPPING_H
#include "SALOME_InteractiveObject.hxx"
-#include "QtxDoubleSpinBox.h"
+#include "SalomeApp_DoubleSpinBox.h"
// QT Includes
#include <QDialog>
class QGroupBox;
class QComboBox;
class QButtonGroup;
-class QSpinBox;
class QTabWidget;
class QListWidget;
class SALOME_Actor;
-class QtxDoubleSpinBox;
-
class SVTK_ViewWindow;
class LightApp_SelectionMgr;
+class SalomeApp_IntSpinBox;
+
class VisuGUI;
class vtkPlaneSource;
class vtkDataSetMapper;
QTabWidget* TabPane;
QComboBox* ComboBoxOrientation;
- QtxDoubleSpinBox* SpinBoxDistance;
- QtxDoubleSpinBox* SpinBoxRot1;
- QtxDoubleSpinBox* SpinBoxRot2;
+ SalomeApp_DoubleSpinBox* SpinBoxDistance;
+ SalomeApp_DoubleSpinBox* SpinBoxRot1;
+ SalomeApp_DoubleSpinBox* SpinBoxRot2;
QWidget* WidgetIJKTab;
QButtonGroup* ButtonGroupIJKAxis;
QGroupBox* GroupBoxIJKAxis;
QLabel* TextLabelIJKIndex;
- QSpinBox* SpinBoxIJKIndex;
+ SalomeApp_IntSpinBox* SpinBoxIJKIndex;
QCheckBox* CheckBoxIJKPlaneReverse;
QCheckBox* PreviewCheckBox;
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
#include "VisuGUI_ClippingPanel.h"
#include "VisuGUI.h"
#include "VisuGUI_Tools.h"
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
#ifndef DIALOGBOX_CLIPPINGPANEL_H
#define DIALOGBOX_CLIPPINGPANEL_H
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
#include "VisuGUI_ClippingPlaneDlg.h"
#include "VisuGUI.h"
#include "VisuGUI_Tools.h"
#include <SUIT_ViewManager.h>
#include <SUIT_MessageBox.h>
#include <SUIT_ResourceMgr.h>
-#include <QtxDoubleSpinBox.h>
#include <SVTK_ViewWindow.h>
#include <VTKViewer_Utilities.h>
+#include <SalomeApp_DoubleSpinBox.h>
#include <QVBoxLayout>
#include <QHBoxLayout>
QHBoxLayout* aOriginLayout = new QHBoxLayout(aOriginGroup);
aOriginLayout->addWidget( new QLabel("X", aOriginGroup) );
- myXOrigin = new QtxDoubleSpinBox( -1000.0, 1000.0, 0.1, aOriginGroup );
+ myXOrigin = new SalomeApp_DoubleSpinBox( aOriginGroup );
+ VISU::initSpinBox( myXOrigin, -1000.0, 1000.0, 0.1, "length_precision" );
myXOrigin->setValue( 0.0 );
connect(myXOrigin, SIGNAL(valueChanged(double)), this, SLOT(onValueChanged()));
aOriginLayout->addWidget( myXOrigin );
aOriginLayout->addWidget( new QLabel("Y", aOriginGroup) );
- myYOrigin = new QtxDoubleSpinBox( -1000.0, 1000, 0.1, aOriginGroup );
+ myYOrigin = new SalomeApp_DoubleSpinBox( aOriginGroup );
+ VISU::initSpinBox( myYOrigin, -1000.0, 1000.0, 0.1, "length_precision" );
myYOrigin->setValue( 0.0 );
connect(myYOrigin, SIGNAL(valueChanged(double)), this, SLOT(onValueChanged()));
aOriginLayout->addWidget( myYOrigin );
aOriginLayout->addWidget( new QLabel("Z", aOriginGroup) );
- myZOrigin = new QtxDoubleSpinBox( -1000.0, 1000.0, 0.1, aOriginGroup );
+ myZOrigin = new SalomeApp_DoubleSpinBox( aOriginGroup );
+ VISU::initSpinBox( myZOrigin, -1000.0, 1000.0, 0.1, "length_precision" );
myZOrigin->setValue( 0.0 );
connect(myZOrigin, SIGNAL(valueChanged(double)), this, SLOT(onValueChanged()));
aOriginLayout->addWidget( myZOrigin );
QHBoxLayout* aDirLayout = new QHBoxLayout(aDirGroup);
aDirLayout->addWidget( new QLabel("dX", aDirGroup) );
- myXDir = new QtxDoubleSpinBox( -1000.0, 1000.0, 0.1, aDirGroup );
+ myXDir = new SalomeApp_DoubleSpinBox( aDirGroup );
+ VISU::initSpinBox( myXDir, -1000.0, 1000.0, 0.1, "length_precision" );
myXDir->setValue( 0.0 );
connect(myXDir, SIGNAL(valueChanged(double)), this, SLOT(onValueChanged()));
aDirLayout->addWidget( myXDir );
aDirLayout->addWidget( new QLabel("dY", aDirGroup) );
- myYDir = new QtxDoubleSpinBox( -1000.0, 1000.0, 0.1, aDirGroup );
+ myYDir = new SalomeApp_DoubleSpinBox( aDirGroup );
+ VISU::initSpinBox( myYDir, -1000.0, 1000.0, 0.1, "length_precision" );
myYDir->setValue( 0.0 );
connect(myYDir, SIGNAL(valueChanged(double)), this, SLOT(onValueChanged()));
aDirLayout->addWidget( myYDir );
aDirLayout->addWidget( new QLabel("dZ", aDirGroup) );
- myZDir = new QtxDoubleSpinBox( -1000.0, 1000.0, 0.1, aDirGroup );
+ myZDir = new SalomeApp_DoubleSpinBox( aDirGroup );
+ VISU::initSpinBox( myZDir, -1000.0, 1000.0, 0.1, "length_precision" );
myZDir->setValue( 1.0 );
connect(myZDir, SIGNAL(valueChanged(double)), this, SLOT(onValueChanged()));
aDirLayout->addWidget( myZDir );
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
#ifndef DIALOGBOX_CLIPPINGPLANEDLG_H
#define DIALOGBOX_CLIPPINGPLANEDLG_H
class QLineEdit;
class QCheckBox;
-class QtxDoubleSpinBox;
+class SalomeApp_DoubleSpinBox;
class vtkImplicitPlaneWidget;
class vtkCallbackCommand;
class vtkObject;
QLineEdit* myNameEdt;
- QtxDoubleSpinBox* myXOrigin;
- QtxDoubleSpinBox* myYOrigin;
- QtxDoubleSpinBox* myZOrigin;
+ SalomeApp_DoubleSpinBox* myXOrigin;
+ SalomeApp_DoubleSpinBox* myYOrigin;
+ SalomeApp_DoubleSpinBox* myZOrigin;
- QtxDoubleSpinBox* myXDir;
- QtxDoubleSpinBox* myYDir;
- QtxDoubleSpinBox* myZDir;
+ SalomeApp_DoubleSpinBox* myXDir;
+ SalomeApp_DoubleSpinBox* myYDir;
+ SalomeApp_DoubleSpinBox* myZDir;
QCheckBox* myAutoApply;
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU VISUGUI : GUI of VISU component
// File : VisuGUI_CursorDlg.cxx
// Author : Laurent CORNABE & Hubert ROLLAND
#include "LightApp_Application.h"
+#include <SalomeApp_IntSpinBox.h>
+
#include <QLayout>
#include <QLabel>
#include <QPushButton>
-#include <QSpinBox>
#include <QGroupBox>
#include <QKeyEvent>
Comment2->setAlignment( Qt::AlignCenter );
TopGroupBoxLayout->addWidget( Comment2, 1, 0 );
- SpinBox1 = new QSpinBox( TopGroupBox );
+ SpinBox1 = new SalomeApp_IntSpinBox( TopGroupBox );
+ SpinBox1->setAcceptNames( false );
SpinBox1->setMinimum( 0 );
SpinBox1->setMaximum(100 );
SpinBox1->setSingleStep( 1 );
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU VISUGUI : GUI of VISU component
// File : VisuGUI_CursorDlg.h
// Author : Laurent CORNABE & Hubert ROLLAND
#include <QDialog>
class QLabel;
class QPushButton;
-class QSpinBox;
+class SalomeApp_IntSpinBox;
class QGroupBox;
class VisuGUI_CursorDlg : public QDialog
QGroupBox* TopGroupBox;
QLabel* Comment1;
QLabel* Comment2;
- QSpinBox* SpinBox1;
+ SalomeApp_IntSpinBox* SpinBox1;
QGroupBox* GroupButtons;
QPushButton* buttonOk;
QPushButton* buttonCancel;
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : VisuGUI_CutLinesDlg.cxx
// Author : VSV
// Module : VISU
#include "LightApp_Application.h"
#include "SalomeApp_Study.h"
+#include <SalomeApp_DoubleSpinBox.h>
#include "SUIT_Desktop.h"
#include "SUIT_Session.h"
//TO DO
//#include "OB_Browser.h"
-#include "VisuGUI_TableDlg.h"
+#include "VISU_TableDlg.h"
#include <QLayout>
#include <QTabWidget>
myRotXLbl = new QLabel( tr( "LBL_ROT_X" ), aRotBox);
aGridLay->addWidget( myRotXLbl, 0, 0 );
- myRotXSpn = new QtxDoubleSpinBox( -45, 45, 5, aRotBox );
+ myRotXSpn = new SalomeApp_DoubleSpinBox( aRotBox );
+ VISU::initSpinBox( myRotXSpn, -45., 45., 5., "angle_precision" );
aGridLay->addWidget( myRotXSpn, 0, 1 );
myRotXSpn->setValue( 0 );
myRotYLbl = new QLabel( tr( "LBL_ROT_Y" ), aRotBox );
aGridLay->addWidget( myRotYLbl, 1, 0 );
- myRotYSpn = new QtxDoubleSpinBox( -45, 45, 5, aRotBox );
+ myRotYSpn = new SalomeApp_DoubleSpinBox( aRotBox );
+ VISU::initSpinBox( myRotYSpn, -45., 45., 5., "angle_precision" );
aGridLay->addWidget( myRotYSpn, 1, 1 );
myRotYSpn->setValue( 0 );
aHBLay->setSpacing(5);
aHBLay->addWidget( new QLabel (tr("LBL_POS"), aPosBox) );
- myPosSpn = new QtxDoubleSpinBox (0, 1, 0.1, aPosBox);
+ myPosSpn = new SalomeApp_DoubleSpinBox (aPosBox);
+ VISU::initSpinBox( myPosSpn, 0., 1., .1, "parametric_precision" );
myPosSpn->setValue(0.5);
aHBLay->addWidget( myPosSpn );
aPlaneLayout->addWidget(aPosBox);
myRotXLbl2 = new QLabel( tr( "LBL_ROT_X" ), aRotBox2);
aGridLay->addWidget( myRotXLbl2, 0, 0 );
- myRotXSpn2 = new QtxDoubleSpinBox( -45, 45, 5, aRotBox2 );
+ myRotXSpn2 = new SalomeApp_DoubleSpinBox( aRotBox2 );
+ VISU::initSpinBox( myRotXSpn2, -45., 45., 5., "angle_precision" );
aGridLay->addWidget( myRotXSpn2, 0, 1 );
myRotXSpn2->setValue( 0 );
myRotYLbl2 = new QLabel( tr( "LBL_ROT_Y" ), aRotBox2 );
aGridLay->addWidget( myRotYLbl2, 1, 0 );
- myRotYSpn2 = new QtxDoubleSpinBox( -45, 45, 5, aRotBox2 );
+ myRotYSpn2 = new SalomeApp_DoubleSpinBox( aRotBox2 );
+ VISU::initSpinBox( myRotYSpn2, -45., 45., 5., "angle_precision" );
aGridLay->addWidget( myRotYSpn2, 1, 1 );
myRotYSpn2->setValue( 0 );
aLinesLayout->addWidget( aRotBox2 );
aHBLay = new QHBoxLayout( aNbBox );
aHBLay->setSpacing(5);
aHBLay->addWidget( new QLabel( tr( "LBL_NB_PLANS" ), aNbBox ) );
- myNbSpn = new QtxDoubleSpinBox( 1, 100, 1, aNbBox );
+ myNbSpn = new SalomeApp_DoubleSpinBox( aNbBox );
+ VISU::initSpinBox( myNbSpn, 1., 100., 1., "parametric_precision" );
myNbSpn->setValue( 10 );
aHBLay->addWidget( myNbSpn );
aHBLay = new QHBoxLayout( aPosBox2 );
aHBLay->setSpacing(5);
aHBLay->addWidget( new QLabel( tr( "LBL_POS" ), aPosBox2 ) );
- myPosSpn2 = new QtxDoubleSpinBox( 0, 1, 0.1, aPosBox2 );
+ myPosSpn2 = new SalomeApp_DoubleSpinBox( aPosBox2 );
+ VISU::initSpinBox( myPosSpn2, 0., 1., .1, "parametric_precision" );
myPosSpn2->setValue( 0.5 );
aHBLay->addWidget( myPosSpn2 );
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : VisuGUI_CutLinesDlg.h
// Author : VSV
// Module : VISU
class SUIT_ViewManager;
class SalomeApp_Module;
class VisuGUI_InputPane;
+class SalomeApp_DoubleSpinBox;
namespace VISU
{
void updateGlyphs(bool update);
QButtonGroup* mySelPlane;
- QtxDoubleSpinBox* myRotXSpn;
- QtxDoubleSpinBox* myRotYSpn;
+ SalomeApp_DoubleSpinBox* myRotXSpn;
+ SalomeApp_DoubleSpinBox* myRotYSpn;
QLabel* myRotXLbl;
QLabel* myRotYLbl;
- QtxDoubleSpinBox* myPosSpn;
+ SalomeApp_DoubleSpinBox* myPosSpn;
QLineEdit* myBasePlanePos;
QCheckBox* myCBSetDef;
QCheckBox* myCreateTable;
QCheckBox* myCurvesCheck;
QButtonGroup* mySelPlane2;
- QtxDoubleSpinBox* myNbSpn;
- QtxDoubleSpinBox* myRotXSpn2;
- QtxDoubleSpinBox* myRotYSpn2;
+ SalomeApp_DoubleSpinBox* myNbSpn;
+ SalomeApp_DoubleSpinBox* myRotXSpn2;
+ SalomeApp_DoubleSpinBox* myRotYSpn2;
QLabel* myRotXLbl2;
QLabel* myRotYLbl2;
- QtxDoubleSpinBox* myPosSpn2;
+ SalomeApp_DoubleSpinBox* myPosSpn2;
QTableWidget* myPosTable;
bool hasInit;
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU VISUGUI : GUI of VISU component
// File : VisuGUI_CutPlanesDlg.cxx
// Author : Laurent CORNABE & Hubert ROLLAND
//#include "OB_Browser.h"
-#include "VisuGUI_TableDlg.h"
+#include "VISU_TableDlg.h"
#include "SVTK_ViewWindow.h"
#include "LightApp_Application.h"
+#include <SalomeApp_IntSpinBox.h>
+#include <SalomeApp_DoubleSpinBox.h>
+
#include "SUIT_Application.h"
#include "SUIT_Desktop.h"
#include "SUIT_ViewWindow.h"
#include <QLineEdit>
#include <QTabWidget>
#include <QKeyEvent>
-#include <QSpinBox>
#include <QRadioButton>
#include <QTableWidget>
#include <QGroupBox>
QLabel* LabelPosi_3 = new QLabel (tr("LBL_NB_PLANS"), this);
- nbPlan = new QSpinBox( this );
+ nbPlan = new SalomeApp_IntSpinBox( this );
+ nbPlan->setAcceptNames( false );
nbPlan->setMinimum( 1 );
nbPlan->setMaximum(100);
nbPlan->setSingleStep( 1 );
LabelRot1 = new QLabel (tr("LBL_ROT_X"), GBrot );
GBrotLayout->addWidget( LabelRot1, 0, 0 );
- Rot1 = new QtxDoubleSpinBox( -180, 180, 10, GBrot );
+ Rot1 = new SalomeApp_DoubleSpinBox( GBrot );
+ VISU::initSpinBox( Rot1, -180., 180., 10., "angle_precision" );
Rot1->setValue( 0 );
Rot1->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
connect( Rot1, SIGNAL( valueChanged( double )), this, SLOT( onRotation( double ) ) );
LabelRot2 = new QLabel (tr("LBL_ROT_Y"), GBrot );
GBrotLayout->addWidget( LabelRot2, 1, 0 );
- Rot2 = new QtxDoubleSpinBox( -180, 180, 10, GBrot );
+ Rot2 = new SalomeApp_DoubleSpinBox( GBrot );
+ VISU::initSpinBox( Rot2, -180., 180., 10., "angle_precision" );
Rot2->setValue( 0 );
Rot2->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
connect( Rot2, SIGNAL( valueChanged( double )), this, SLOT( onRotation( double ) ) );
GBrotLayout->addWidget( Rot2, 1, 1 );
QLabel* aPosLbl = new QLabel(tr( "LBL_POS" ), this);
- myPosSpn = new QtxDoubleSpinBox( 0, 1, 0.1, this );
+ myPosSpn = new SalomeApp_DoubleSpinBox( this );
+ VISU::initSpinBox( myPosSpn, 0., 1., .1, "parametric_precision" );
GDeformation = new QGroupBox(tr("LBL_DEFORMATION"), this);
GDeformation->setCheckable(true);
myVectorialFieldCombo = new QComboBox (GDeformation);
GDeformationLayout->addWidget( myVectorialFieldCombo, 0, 1 );
- SUIT_ResourceMgr* aResourceMgr = VISU::GetResourceMgr();
- int aPrecision = aResourceMgr->integerValue( "VISU", "floating_point_precision", 0 );
-
QLabel* LabelDeformation2 = new QLabel (tr("LBL_DEFROMATION_SCALE"), GDeformation);
GDeformationLayout->addWidget( LabelDeformation2, 1, 0 );
- myScaleSpn = new QtxDoubleSpinBox (0, 1.0E+38, 0.1, aPrecision*(-1), 38, GDeformation);
+ myScaleSpn = new SalomeApp_DoubleSpinBox (GDeformation);
+ VISU::initSpinBox( myScaleSpn, 0., 1.0E+38, 0.1, "visual_data_precision" );
myScaleSpn->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed));
GDeformationLayout->addWidget( myScaleSpn, 1, 1 );
connect(myVectorialFieldCombo, SIGNAL(activated(int)), this, SLOT(onVectorialFieldChanged(int)));
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU VISUGUI : GUI of VISU component
// File : VisuGUI_CutPlanesDlg.h
// Author : Laurent CORNABE & Hubert ROLLAND
#include "VisuGUI_Prs3dDlg.h"
#include <SALOME_Actor.h>
-
-#include <QtxDoubleSpinBox.h>
+#include <SalomeApp_IntSpinBox.h>
+#include <SalomeApp_DoubleSpinBox.h>
#include <QFrame>
-class QSpinBox;
class QRadioButton;
class QTabWidget;
class QTableWidget;
QLabel* LabelRot1;
QLabel* LabelRot2;
QGroupBox* GDeformation;
- QSpinBox* nbPlan;
- QtxDoubleSpinBox* Rot1;
- QtxDoubleSpinBox* Rot2;
+ SalomeApp_IntSpinBox* nbPlan;
+ SalomeApp_DoubleSpinBox* Rot1;
+ SalomeApp_DoubleSpinBox* Rot2;
QRadioButton* RBzx;
QRadioButton* RByz;
QRadioButton* RBxy;
- QtxDoubleSpinBox* myPosSpn;
+ SalomeApp_DoubleSpinBox* myPosSpn;
QTableWidget* myPosTable;
SALOME::GenericObjPtr<VISU::CutPlanes_i> myCutPlanes;
QCheckBox* myPreviewCheck;
QComboBox* myVectorialFieldCombo;
- QtxDoubleSpinBox* myScaleSpn;
+ SalomeApp_DoubleSpinBox* myScaleSpn;
double X1, X2;
double Y1, Y2;
double Z1, Z2;
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : VisuGUI_CutSegmentDlg.cxx
// Author : Oleg UVAROV
// Module : VISU
#include "LightApp_Application.h"
#include "SalomeApp_Study.h"
+#include <SalomeApp_DoubleSpinBox.h>
#include "SUIT_ResourceMgr.h"
QLabel* aPoint2YLabel = new QLabel( tr( "LBL_Y" ), aSegmentBox );
QLabel* aPoint2ZLabel = new QLabel( tr( "LBL_Z" ), aSegmentBox );
for( int i = 0; i < 3; i++ ) {
- myPoint1.append( new QtxDoubleSpinBox( aSegmentBox ) );
- myPoint2.append( new QtxDoubleSpinBox( aSegmentBox ) );
+ myPoint1.append( new SalomeApp_DoubleSpinBox( aSegmentBox ) );
+ myPoint2.append( new SalomeApp_DoubleSpinBox( aSegmentBox ) );
}
- QListIterator<QtxDoubleSpinBox*> anIter( myPoint1 + myPoint2 );
+ QListIterator<SalomeApp_DoubleSpinBox*> anIter( myPoint1 + myPoint2 );
while( anIter.hasNext() ) {
- QtxDoubleSpinBox* aSpinBox = anIter.next();
- aSpinBox->setDecimals( 6 );
+ SalomeApp_DoubleSpinBox* aSpinBox = anIter.next();
+ // Use default range - see QDoubleSpinBox minimum/maximum properties
+ VISU::initSpinBox( aSpinBox, 0., 99.99, 1., "length_precision" );
aSpinBox->setMinimumWidth( 100 );
}
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : VisuGUI_CutSegmentDlg.h
// Author : Oleg UVAROV
// Module : VISU
class SalomeApp_Module;
class VisuGUI_InputPane;
+class SalomeApp_DoubleSpinBox;
namespace VISU
{
bool hasInit;
- QList<QtxDoubleSpinBox*> myPoint1;
- QList<QtxDoubleSpinBox*> myPoint2;
+ QList<SalomeApp_DoubleSpinBox*> myPoint1;
+ QList<SalomeApp_DoubleSpinBox*> myPoint2;
SALOME::GenericObjPtr<VISU::CutSegment_i> myCutSegment;
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU VISUGUI : GUI of VISU component
// File : VisuGUI_DeformedShapeAndScalarMapDlg.cxx
// Author : Eugeny Nikolaev
#include "VISU_Convertor.hxx"
-#include <QtxDoubleSpinBox.h>
+#include <SalomeApp_DoubleSpinBox.h>
#include <SalomeApp_Module.h>
#include <LightApp_Application.h>
#include <LightApp_SelectionMgr.h>
#include <SUIT_Desktop.h>
-#include <SUIT_ResourceMgr.h>
#include <SUIT_Session.h>
#include <SUIT_MessageBox.h>
QLabel* ScaleLabel = new QLabel (tr("SCALE_FACTOR"), TopGroup);
TopGroupLayout->addWidget(ScaleLabel, 0, 0);
- SUIT_ResourceMgr* aResourceMgr = VISU::GetResourceMgr();
- int aPrecision = aResourceMgr->integerValue( "VISU", "floating_point_precision", 0 );
-
- ScalFact = new QtxDoubleSpinBox (0, 1.0E+38, 0.1, aPrecision*(-1), 32, TopGroup);
+ ScalFact = new SalomeApp_DoubleSpinBox (TopGroup);
+ VISU::initSpinBox( ScalFact, 0., 1.0E+38, .1, "visual_data_precision" );
ScalFact->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed));
ScalFact->setValue(0.1);
TopGroupLayout->addWidget(ScalFact, 0, 1);
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU VISUGUI : GUI of VISU component
// File : VisuGUI_DeformedShapeAndScalarMapDlg.h
// Author : Eugeny Nikolaev
class SalomeApp_Module;
class VisuGUI_InputPane;
-class QtxDoubleSpinBox;
+class SalomeApp_DoubleSpinBox;
class QComboBox;
class QTabWidget;
void onTimeStampChanged(int i=0);
private:
- QtxDoubleSpinBox* ScalFact;
+ SalomeApp_DoubleSpinBox* ScalFact;
QTabWidget* myTabBox;
VisuGUI_ScalarBarPane* myScalarPane;
VisuGUI_InputPane* myInputPane;
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU VISUGUI : GUI of VISU component
// File : VisuGUI_MagnitudeDlg.cxx
// Author : Laurent CORNABE & Hubert ROLLAND
#include "VisuGUI_Tools.h"
#include "VisuGUI_InputPane.h"
#include "VisuGUI.h"
+#include "VisuGUI_Prs3dTools.h"
+
#include "VISU_ColoredPrs3dFactory.hh"
#include "VISU_DeformedShape_i.hh"
#include "VisuGUI_ViewTools.h"
#include "VISU_Gen_i.hh"
#include "VISU_Result_i.hh"
-#include "VisuGUI_Prs3dTools.h"
+
#include "SVTK_ViewWindow.h"
#include "SalomeApp_Module.h"
+#include <SalomeApp_DoubleSpinBox.h>
#include "LightApp_Application.h"
#include "SUIT_Desktop.h"
#include "SUIT_Session.h"
QLabel* ScaleLabel = new QLabel (tr("SCALE_FACTOR"), TopGroup );
TopGroupLayout->addWidget(ScaleLabel, 0, 0);
- SUIT_ResourceMgr* aResourceMgr = VISU::GetResourceMgr();
- int aPrecision = aResourceMgr->integerValue( "VISU", "floating_point_precision", 0 );
-
- ScalFact = new QtxDoubleSpinBox (0, 1.0E+38, 0.1, aPrecision*(-1), 38, TopGroup);
+ ScalFact = new SalomeApp_DoubleSpinBox (TopGroup);
+ VISU::initSpinBox( ScalFact, 0., 1.0E+38, .1, "visual_data_precision" );
ScalFact->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed));
ScalFact->setValue(0.1);
TopGroupLayout->addWidget(ScalFact, 0, 1);
return anIsOk;
}
-void VisuGUI_DeformedShapeDlg::updatePrsCopy()
+void VisuGUI_DeformedShapeDlg::updatePrsCopy( VISU::Prs3d_i* thePrs )
{
SVTK_ViewWindow* aViewWindow = VISU::GetActiveViewWindow<SVTK_ViewWindow>();
VisuGUI* aVisuGUI = dynamic_cast <VisuGUI*>(myModule);
if ( myPrsCopy->GetNumberOfActors() == 0 ) {
PublishInView(aVisuGUI, myPrsCopy, aViewWindow);
+
+ // Bug 0020821
+ if( thePrs ) {
+ if( SVTK_ViewWindow* aViewWindow = VISU::GetActiveViewWindow<SVTK_ViewWindow>( myModule ) ) {
+ VISU_Actor* anActorSource = VISU::FindActor( aViewWindow, thePrs );
+ VISU_Actor* anActorCopy = VISU::FindActor( aViewWindow, myPrsCopy );
+ if( anActorSource && anActorCopy )
+ anActorCopy->DeepCopy( anActorSource );
+ }
+ }
+
if(VISU::GetResourceMgr()->booleanValue("VISU","automatic_fit_all",false))
aViewWindow->onFitAll();
int aPos = VISU::GetFreePositionOfDefaultScalarBar(aVisuGUI, aViewWindow);
{
if ( storeToPrsObject( myPrsCopy ) )
{
- updatePrsCopy();
+ updatePrsCopy( myPrsCopy );
isApplyed = true;
return true;
}
if (TPrs3d_i* aPrs3d = dynamic_cast<TPrs3d_i*>(thePrs3d)) {
VisuGUI_DeformedShapeDlg* aDlg = new VisuGUI_DeformedShapeDlg (theModule);
aDlg->initFromPrsObject(aPrs3d, true);
- aDlg->updatePrsCopy();
+ aDlg->updatePrsCopy(thePrs3d);
//Hide thePrs3d from Viewer
SVTK_ViewWindow* aViewWindow = VISU::GetActiveViewWindow<SVTK_ViewWindow>(theModule);
anActor->VisibilityOff();
VisuGUI_DialogRunner r(aDlg);
- int dlgResult = r.run( false );
+ int dlgResult = r.run( true );
if ( dlgResult != 0 )
aDlg->storeToPrsObject( aPrs3d );
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU VISUGUI : GUI of VISU component
// File : VisuGUI_MagnitudeDlg.h
// Author : Laurent CORNABE & Hubert ROLLAND
#include "VisuGUI_Prs3dDlg.h"
-#include "QtxDoubleSpinBox.h"
+#include <SalomeApp_DoubleSpinBox.h>
#include <QCheckBox>
class QTabWidget;
-
-
-class QtxDoubleSpinBox;
class SalomeApp_Module;
class VisuGUI_InputPane;
class VisuGUI;
static VISU::Prs3d_i* CreatePrs3d(VisuGUI* theModule);
static void EditPrs3d(VisuGUI* theModule, VISU::Prs3d_i* thePrs3d, Handle(SALOME_InteractiveObject)& theIO);
- void updatePrsCopy();
+ void updatePrsCopy( VISU::Prs3d_i* thePrs );
protected:
virtual QString GetContextHelpFilePath();
- int isValid();
+ int isValid();
protected slots:
void accept();
bool onApply();
void reject();
private:
- QtxDoubleSpinBox* ScalFact;
+ SalomeApp_DoubleSpinBox* ScalFact;
QCheckBox* UseMagn;
QTabWidget* myTabBox;
VisuGUI_InputPane* myInputPane;
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File: VisuGUI_DialogRunner.cxx
// Created: Thu Oct 6 10:17:39 2005
// Author: Alexander SOLOVYOV
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
#ifndef DIALOG_RUNNER_HEADER
#define DIALOG_RUNNER_HEADER
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU VISUGUI : Displayer for VISU module
// File : VisuGUI_Displayer.cxx
// Author : Alexander SOLOVYOV
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU VISUGUI : Displayer for VISU module
// File : VisuGUI_Displayer.h
// Author : Alexander SOLOVYOV
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : VisuGUI_EditContainerDlg.cxx
// Author : VSV
// Module : VISU
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : VisuGUI_EditContainerDlg.h
// Author : VSV
// Module : VISU
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : VisuGUI_EvolutionDlg.cxx
// Author : Oleg UVAROV
// Module : VISU
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : VisuGUI_EvolutionDlg.h
// Author : Oleg UVAROV
// Module : VISU
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU VISUGUI : GUI of VISU component
// File : VisuGUI_Factory.cxx
// Author :
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU VISUGUI : GUI of VISU component
// File : VisuGUI_FeatureEdgesPanel.cxx
// Author : Oleg Uvarov
#include <QLayout>
#include <QPushButton>
-#include <QtxDoubleSpinBox.h>
-
#include <SUIT_MessageBox.h>
#include <SUIT_Session.h>
#include <SUIT_ResourceMgr.h>
#include <SalomeApp_Application.h>
+#include <SalomeApp_DoubleSpinBox.h>
#include <LightApp_SelectionMgr.h>
aLayout->setAlignment( Qt::AlignTop );
QLabel* anAngleLbl = new QLabel( tr( "FEATURE_EDGES_ANGLE" ), myGrp );
- myAngleSpinBox = new QtxDoubleSpinBox( 0.0, 90.0, 10.0, myGrp );
+ myAngleSpinBox = new SalomeApp_DoubleSpinBox( myGrp );
+ VISU::initSpinBox( myAngleSpinBox, 0.0, 90.0, 10.0, "angle_precision" );
myFeatureEdgesCB = new QCheckBox( tr( "SHOW_FEATURE_EDGES" ), myGrp );
myBoundaryEdgesCB = new QCheckBox( tr( "SHOW_BOUNDARY_EDGES" ), myGrp );
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU VISUGUI : GUI of VISU component
// File : VisuGUI_FeatureEdgesPanel.h
// Author : Oleg Uvarov
class QCheckBox;
class QGroupBox;
-class QtxDoubleSpinBox;
+class SalomeApp_DoubleSpinBox;
class VISU_Actor;
private:
QGroupBox* myGrp;
- QtxDoubleSpinBox* myAngleSpinBox;
+ SalomeApp_DoubleSpinBox* myAngleSpinBox;
QCheckBox* myFeatureEdgesCB;
QCheckBox* myBoundaryEdgesCB;
QCheckBox* myManifoldEdgesCB;
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU VISUGUI : GUI of VISU component
// File : VisuGUI_FieldFilter.cxx
// Author : Oleg UVAROV
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : VisuGUI_FieldFilter.hxx
// Author : Oleg UVAROV
// Module : VISU
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : VisuGUI_FileDlg.cxx
// Author :
// Module : SALOME
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : VisuGUI_FileDlg.h
// Author :
// Module : SALOME
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU VISUGUI : GUI of VISU component
// File : VisuGUI_FileInfoDlg.cxx
// Author : Alexandre SOLOVYOV, Open CASCADE S.A.S. ( alexander.solovyov@opencascade.com)
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU VISUGUI : GUI of VISU component
// File : VisuGUI_FileInfoDlg.h
// Author : Alexandre SOLOVYOV, Open CASCADE S.A.S. ( alexander.solovyov@opencascade.com)
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
#include "VisuGUI_FilterScalarsDlg.h"
#include "VISU_ColoredPrs3d_i.hh"
#include "VISU_ColoredPrs3dHolder_i.hh"
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU VISUGUI : GUI of VISU component
// File : VisuGUI_FilterScalarsDlg.h
// Author : vsv
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU VISUGUI : GUI of VISU component
// File : VisuGUI_FindPane.cxx
// Author : Oleg Uvarov
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU VISUGUI : GUI of VISU component
// File : VisuGUI_FindPane.h
// Author : Oleg Uvarov
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU VISUGUI : GUI of VISU component
// File : VisuGUI_GaussPointsDlg.cxx
// Author : Oleg UVAROV
// Module : VISU
-
+//
#include "VisuGUI_GaussPointsDlg.h"
#include "VISUConfig.hh"
#include "VisuGUI_Tools.h"
#include "VisuGUI_InputPane.h"
+#include "VisuGUI_PrimitiveBox.h"
+#include "VisuGUI_SizeBox.h"
#include "VISU_ColoredPrs3dFactory.hh"
#include "VISU_GaussPoints_i.hh"
#include "VISU_OpenGLPointSpriteMapper.hxx"
#include "VISU_Convertor.hxx"
-#include "VVTK_PrimitiveBox.h"
-#include "VVTK_SizeBox.h"
-
#include "LightApp_Application.h"
#include "SalomeApp_Module.h"
+#include "SalomeApp_IntSpinBox.h"
+#include <SalomeApp_DoubleSpinBox.h>
#include "LightApp_SelectionMgr.h"
#include "SUIT_Desktop.h"
#include "SUIT_ResourceMgr.h"
#include "SUIT_MessageBox.h"
#include "SVTK_FontWidget.h"
-#include "QtxDoubleSpinBox.h"
-
#include <QLayout>
#include <QTabWidget>
#include <QButtonGroup>
#include <QLabel>
#include <QPushButton>
#include <QLineEdit>
-#include <QSpinBox>
#include <QComboBox>
#include <QToolButton>
#include <QTabWidget>
RangeGroup->addButton( RBImposedRange );
SUIT_ResourceMgr* aResourceMgr = VISU::GetResourceMgr();
- int aPrecision = aResourceMgr->integerValue( "VISU", "floating_point_precision", 0 );
+ int aPrecision = qAbs(aResourceMgr->integerValue( "VISU", "visual_data_precision", 0 ));
QDoubleValidator* dv = new QDoubleValidator(this);
dv->setDecimals(aPrecision);
TypeGroup->addButton( RainbowButton );
ColorLabel = new QLabel (tr("LBL_NB_COLORS"), ColLabGroup );
- ColorSpin = new QSpinBox( ColLabGroup );
+ ColorSpin = new SalomeApp_IntSpinBox( ColLabGroup );
+ ColorSpin->setAcceptNames( false );
ColorSpin->setMinimum( 2 );
ColorSpin->setMaximum( 256 );
ColorSpin->setSingleStep( 1 );
ColorSpin->setValue( 64 );
LabelLabel = new QLabel (tr("LBL_NB_LABELS"), ColLabGroup);
- LabelSpin = new QSpinBox( ColLabGroup );
+ LabelSpin = new SalomeApp_IntSpinBox( ColLabGroup );
+ LabelSpin->setAcceptNames( false );
LabelSpin->setMinimum( 2 );
LabelSpin->setMaximum( 65 );
LabelSpin->setSingleStep( 1 );
OriginGroupLayout->setMargin( 11 );
QLabel* XLabel = new QLabel (tr("LBL_X"), OriginGroup );
- XSpin = new QtxDoubleSpinBox( 0.0, 1.0, 0.1, OriginGroup );
+ XSpin = new SalomeApp_DoubleSpinBox( OriginGroup );
+ VISU::initSpinBox( XSpin, 0.0, 1.0, 0.1, "parametric_precision" );
XSpin->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
XSpin->setMinimumWidth( 70 );
XSpin->setValue( 0.01 );
QLabel* YLabel = new QLabel (tr("LBL_Y"), OriginGroup );
- YSpin = new QtxDoubleSpinBox( 0.0, 1.0, 0.1, OriginGroup );
+ YSpin = new SalomeApp_DoubleSpinBox( OriginGroup );
+ VISU::initSpinBox( YSpin, 0.0, 1.0, 0.1, "parametric_precision" );
YSpin->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
YSpin->setMinimumWidth( 70 );
YSpin->setValue( 0.01 );
DimGroupLayout->setMargin( 11 );
QLabel* WidthLabel = new QLabel (tr("LBL_WIDTH"), DimGroup );
- WidthSpin = new QtxDoubleSpinBox( 0.0, 1.0, 0.1, DimGroup );
+ WidthSpin = new SalomeApp_DoubleSpinBox( DimGroup );
+ VISU::initSpinBox( WidthSpin, 0.0, 1.0, 0.1, "parametric_precision" );
WidthSpin->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
WidthSpin->setMinimumWidth( 70 );
WidthSpin->setValue( 0.1 );
QLabel* HeightLabel = new QLabel (tr("LBL_HEIGHT"), DimGroup );
- HeightSpin = new QtxDoubleSpinBox( 0.0, 1.0, 0.1, DimGroup );
+ HeightSpin = new SalomeApp_DoubleSpinBox( DimGroup );
+ VISU::initSpinBox( HeightSpin, 0.0, 1.0, 0.1, "parametric_precision" );
HeightSpin->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
HeightSpin->setMinimumWidth( 70 );
HeightSpin->setValue( 0.8 );
QLabel* SpacingLabel = new QLabel (tr("LBL_SPACING"), DimGroup );
- SpacingSpin = new QtxDoubleSpinBox( 0.0, 1.0, 0.01, DimGroup );
+ SpacingSpin = new SalomeApp_DoubleSpinBox( DimGroup );
+ VISU::initSpinBox( SpacingSpin, 0.0, 1.0, 0.01, "parametric_precision" );
SpacingSpin->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
SpacingSpin->setMinimumWidth( 70 );
SpacingSpin->setValue( 0.01 );
MaxEdit->setEnabled( false );
SUIT_ResourceMgr* aResourceMgr = VISU::GetResourceMgr();
- int aPrecision = aResourceMgr->integerValue("VISU", "floating_point_precision", 0);
+ int aPrecision = qAbs(aResourceMgr->integerValue("VISU", "visual_data_precision", 0));
MinEdit->setText(QString::number(myPrsCopy->GetMin(), 'g', aPrecision));
MaxEdit->setText(QString::number(myPrsCopy->GetMax(), 'g', aPrecision));
MaxEdit->setEnabled( RBImposedRange->isChecked() );
SUIT_ResourceMgr* aResourceMgr = VISU::GetResourceMgr();
- int aPrecision = aResourceMgr->integerValue("VISU", "floating_point_precision", 0);
+ int aPrecision = qAbs(aResourceMgr->integerValue("VISU", "visual_data_precision", 0));
MinEdit->setText(QString::number(myPrsCopy->GetMin(), 'g', aPrecision));
MaxEdit->setText(QString::number(myPrsCopy->GetMax(), 'g', aPrecision));
MaxEdit->setEnabled( false );
SUIT_ResourceMgr* aResourceMgr = VISU::GetResourceMgr();
- int aPrecision = aResourceMgr->integerValue("VISU", "floating_point_precision", 0);
+ int aPrecision = qAbs(aResourceMgr->integerValue("VISU", "visual_data_precision", 0));
MinEdit->setText(QString::number(myPrsCopy->GetMin(), 'g', aPrecision));
MaxEdit->setText(QString::number(myPrsCopy->GetMax(), 'g', aPrecision));
myPrsCopy->SetScalarMode( theMode );
if ( UseFieldRange() ) {
SUIT_ResourceMgr* aResourceMgr = VISU::GetResourceMgr();
- int aPrecision = aResourceMgr->integerValue("VISU", "floating_point_precision", 0);
+ int aPrecision = qAbs(aResourceMgr->integerValue("VISU", "visual_data_precision", 0));
MinEdit->setText(QString::number(myPrsCopy->GetSourceMin(), 'g', aPrecision));
MaxEdit->setText(QString::number(myPrsCopy->GetSourceMax(), 'g', aPrecision));
}
SUIT_ResourceMgr* aResourceMgr = VISU::GetResourceMgr();
- int aPrecision = aResourceMgr->integerValue("VISU", "floating_point_precision", 0);
+ int aPrecision = qAbs(aResourceMgr->integerValue("VISU", "visual_data_precision", 0));
MinEdit->setText(QString::number(thePrs->GetMin(), 'g', aPrecision));
MaxEdit->setText(QString::number(thePrs->GetMax(), 'g', aPrecision));
*/
void VisuGUI_GaussScalarBarPane::XYChanged( double )
{
- QtxDoubleSpinBox* snd = (QtxDoubleSpinBox*)sender();
+ SalomeApp_DoubleSpinBox* snd = (SalomeApp_DoubleSpinBox*)sender();
if ( snd == XSpin ) {
WidthSpin->setMaximum( 1.0 - XSpin->value() );
}
aVBLay->setSpacing(6);
// Primitive
- myPrimitiveBox = new VVTK_PrimitiveBox( aBox );
+ myPrimitiveBox = new VisuGUI_PrimitiveBox( aBox );
aVBLay->addWidget( myPrimitiveBox );
// Size
- mySizeBox = new VVTK_SizeBox( aBox );
+ mySizeBox = new VisuGUI_SizeBox( aBox );
aVBLay->addWidget( mySizeBox );
// Deformed Shape
aDefShapeLayout->setSpacing(6);
aDefShapeLayout->setMargin(11);
- SUIT_ResourceMgr* aResourceMgr = VISU::GetResourceMgr();
- int aPrecision = aResourceMgr->integerValue( "VISU", "floating_point_precision", 0 );
-
QLabel* aScaleLabel = new QLabel( tr( "SCALE_FACTOR" ), myDefShapeBox );
- myScaleSpinBox = new QtxDoubleSpinBox( 0.0, 10.0, 0.1, aPrecision*(-1), 32, myDefShapeBox );
+ myScaleSpinBox = new SalomeApp_DoubleSpinBox( myDefShapeBox );
+ VISU::initSpinBox( myScaleSpinBox, 0.0, 10.0, 0.1, "visual_data_precision" );
aDefShapeLayout->addWidget( aScaleLabel, 0, 0 );
aDefShapeLayout->addWidget( myScaleSpinBox, 0, 1 );
myPrimitiveBox->setResolution( myPrsCopy->GetResolution() );
myPrimitiveBox->setFaceLimit( myPrsCopy->GetFaceLimit() );
- mySizeBox->setType( isResults || isDeformed ? VVTK_SizeBox::Results : VVTK_SizeBox::Geometry );
+ mySizeBox->setType( isResults || isDeformed ? VisuGUI_SizeBox::Results : VisuGUI_SizeBox::Geometry );
mySizeBox->setGeomSize( myPrsCopy->GetGeomSize() );
mySizeBox->setMinSize( myPrsCopy->GetMinSize() );
mySizeBox->setMaxSize( myPrsCopy->GetMaxSize() );
if( on )//myDefShapeButton->isChecked() )
{
myDefShapeBox->show();
- mySizeBox->setType( VVTK_SizeBox::Results );
+ mySizeBox->setType( VisuGUI_SizeBox::Results );
}
else
myDefShapeBox->hide();
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU VISUGUI : GUI of VISU component
// File : VisuGUI_GaussPointsDlg.h
// Author : Oleg UVAROV
#include "VisuGUI_Prs3dDlg.h"
#include "VISU_GaussPoints_i.hh"
-class QtxDoubleSpinBox;
+class SalomeApp_DoubleSpinBox;
class SalomeApp_Module;
-class VVTK_PrimitiveBox;
-class VVTK_SizeBox;
+class SalomeApp_IntSpinBox;
+class VisuGUI_PrimitiveBox;
+class VisuGUI_SizeBox;
class VisuGUI_TextPrefDlg;
class VisuGUI_InputPane;
QRadioButton* RBhori;
QRadioButton* RBvert;
- QtxDoubleSpinBox* XSpin;
- QtxDoubleSpinBox* YSpin;
+ SalomeApp_DoubleSpinBox* XSpin;
+ SalomeApp_DoubleSpinBox* YSpin;
- QtxDoubleSpinBox* WidthSpin;
- QtxDoubleSpinBox* HeightSpin;
- QtxDoubleSpinBox* SpacingSpin;
+ SalomeApp_DoubleSpinBox* WidthSpin;
+ SalomeApp_DoubleSpinBox* HeightSpin;
+ SalomeApp_DoubleSpinBox* SpacingSpin;
QRadioButton* BicolorButton;
QRadioButton* RainbowButton;
QLabel* ColorLabel;
- QSpinBox* ColorSpin;
+ SalomeApp_IntSpinBox* ColorSpin;
QLabel* LabelLabel;
- QSpinBox* LabelSpin;
+ SalomeApp_IntSpinBox* LabelSpin;
QLabel* myModeLbl;
QComboBox* myModeCombo;
QRadioButton* myGeometryButton;
QRadioButton* myDefShapeButton;
- VVTK_PrimitiveBox* myPrimitiveBox;
- VVTK_SizeBox* mySizeBox;
+ VisuGUI_PrimitiveBox* myPrimitiveBox;
+ VisuGUI_SizeBox* mySizeBox;
QGroupBox* myDefShapeBox;
- QtxDoubleSpinBox* myScaleSpinBox;
+ SalomeApp_DoubleSpinBox* myScaleSpinBox;
SALOME::GenericObjPtr<VISU::GaussPoints_i> myPrsCopy;
SalomeApp_Module* myModule;
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU VISUGUI : GUI of VISU component
// File : VisuGUI_GaussPointsSelectionPane.cxx
// Author : Oleg Uvarov
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU VISUGUI : GUI of VISU component
// File : VisuGUI_GaussPointsSelectionPane.h
// Author : Oleg Uvarov
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU VISUGUI : GUI of VISU component
// File : VisuGUI_InputPane.cxx
// Author : Oleg UVAROV
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU VISUGUI : GUI of VISU component
// File : VisuGUI_InputPane.h
// Author : Oleg UVAROV
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU VISUGUI : GUI of VISU component
// File : VisuGUI_InputPanel.cxx
// Author : Oleg Uvarov
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU VISUGUI : GUI of VISU component
// File : VisuGUI_InputPanel.cxx
// Author : Oleg Uvarov
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU VISUGUI : GUI of VISU component
// File : VisuGUI_IsoSurfacesDlg.cxx
// Author : Laurent CORNABE & Hubert ROLLAND
// Module : VISU
// $Header$
-
+//
#include "VisuGUI_IsoSurfacesDlg.h"
#include "VisuGUI.h"
#include <LightApp_Application.h>
+#include <SalomeApp_IntSpinBox.h>
+
#include <QtxColorButton.h>
#include <SUIT_Desktop.h>
#include <SUIT_Session.h>
#include <SUIT_MessageBox.h>
#include <SUIT_ResourceMgr.h>
-#include <limits.h>
+#include <limits>
#include <QLayout>
#include <QValidator>
#include <QLabel>
#include <QGroupBox>
-#include <QSpinBox>
#include <QPushButton>
#include <QCheckBox>
#include <QLineEdit>
#include <QButtonGroup>
#include <QRadioButton>
-using namespace std;
-
VisuGUI_IsoSurfPane::VisuGUI_IsoSurfPane (QWidget* parent,
VisuGUI_ScalarBarPane* theScalarPane)
: QWidget(parent),
QLabel* LabelNbr = new QLabel (tr("NB_SURFACES"), TopGroup);
TopGroupLayout->addWidget( LabelNbr, 1, 0 );
- NbrIso = new QSpinBox( TopGroup );
+ NbrIso = new SalomeApp_IntSpinBox( TopGroup );
+ NbrIso->setAcceptNames( false );
NbrIso->setMaximum( 100 );
NbrIso->setMinimum( 1 );
NbrIso->setSingleStep( 1 );
myUseLabels = new QCheckBox(tr("SHOW_VALUES_CHK"), TopGroup);
myUseLabels->setChecked(false);
TopGroupLayout->addWidget( myUseLabels, 3, 0 );
- myNbLabels = new QSpinBox( TopGroup );
+ myNbLabels = new SalomeApp_IntSpinBox( TopGroup );
+ myNbLabels->setAcceptNames( false );
myNbLabels->setMinimum(1);
myNbLabels->setMaximum(100);
myNbLabels->setSingleStep(1);
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU VISUGUI : GUI of VISU component
// File : VisuGUI_IsoSurfacesDlg.h
// Author : Laurent CORNABE & Hubert ROLLAND
// Module : VISU
// $Header$
-
+//
#ifndef VISUGUI_ISOSURFACESDLG_H
#define VISUGUI_ISOSURFACESDLG_H
class QTabWidget;
class QLineEdit;
-class QSpinBox;
+class SalomeApp_IntSpinBox;
class QButtonGroup;
class QtxColorButton;
void setColor();
private:
- QButtonGroup* myRangeGrp;
- QLineEdit* MinIso;
- QLineEdit* MaxIso;
- QSpinBox* NbrIso;
- QCheckBox* myUseMagnitude;
- QtxColorButton* mySelColor;
- QCheckBox* myUseLabels;
- QSpinBox* myNbLabels;
+ QButtonGroup* myRangeGrp;
+ QLineEdit* MinIso;
+ QLineEdit* MaxIso;
+ SalomeApp_IntSpinBox* NbrIso;
+ QCheckBox* myUseMagnitude;
+ QtxColorButton* mySelColor;
+ QCheckBox* myUseLabels;
+ SalomeApp_IntSpinBox* myNbLabels;
VisuGUI_ScalarBarPane* myScalarPane;
};
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU VISUGUI : GUI of VISU component
// File : VisuGUI_Module.cxx
// Author : Laurent CORNABE
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU VISUGUI : GUI of VISU component
// File : VisuGUI_Module.h
// Author :
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : VisuGUI_NameDlg.cxx
// Author : Vadim SANDLER
// Module : SALOME
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : VisuGUI_NameDlg.h
// Author : Vadim SANDLER
// Module : SALOME
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
#include "VisuGUI_OffsetDlg.h"
#include "VisuGUI.h"
#include "LightApp_SelectionMgr.h"
#include "SALOME_ListIteratorOfListIO.hxx"
#include "SalomeApp_Application.h"
+#include <SalomeApp_DoubleSpinBox.h>
#include "SVTK_ViewWindow.h"
#include "SVTK_ViewModel.h"
#include "SUIT_ViewManager.h"
#include "SUIT_MessageBox.h"
#include "SUIT_ResourceMgr.h"
-#include "QtxDoubleSpinBox.h"
-
// VTK Includes
#include "vtkRenderer.h"
aHBLay->setSpacing(6);
aHBLay->addWidget( new QLabel ("dX:", anOffsetsPane) );
- aHBLay->addWidget( myDxEdt = new QtxDoubleSpinBox (anOffsetsPane) );
- myDxEdt->setRange(-MAXVAL, MAXVAL);
+ aHBLay->addWidget( myDxEdt = new SalomeApp_DoubleSpinBox (anOffsetsPane) );
+ VISU::initSpinBox( myDxEdt, -MAXVAL, MAXVAL, 1., "length_precision" );
aHBLay->addWidget( new QLabel("dY:", anOffsetsPane) );;
- aHBLay->addWidget( myDyEdt = new QtxDoubleSpinBox (anOffsetsPane) );
- myDyEdt->setRange(-MAXVAL, MAXVAL);
+ aHBLay->addWidget( myDyEdt = new SalomeApp_DoubleSpinBox (anOffsetsPane) );
+ VISU::initSpinBox( myDyEdt, -MAXVAL, MAXVAL, 1., "length_precision" );
aHBLay->addWidget( new QLabel("dZ:", anOffsetsPane) );
- aHBLay->addWidget( myDzEdt = new QtxDoubleSpinBox (anOffsetsPane) );
- myDzEdt->setRange(-MAXVAL, MAXVAL);
+ aHBLay->addWidget( myDzEdt = new SalomeApp_DoubleSpinBox (anOffsetsPane) );
+ VISU::initSpinBox( myDzEdt, -MAXVAL, MAXVAL, 1., "length_precision" );
QPushButton* aResetBtn = new QPushButton(tr("BTN_RESET"), anOffsetsPane);
aHBLay->addWidget( aResetBtn );
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
#ifndef DIALOGBOX_OFFSET_H
#define DIALOGBOX_OFFSET_H
#include <QList>
class QCheckBox;
-class QtxDoubleSpinBox;
+class SalomeApp_DoubleSpinBox;
class VisuGUI;
class LightApp_SelectionMgr;
VisuGUI * myModule;
LightApp_SelectionMgr* mySelectionMgr;
- QtxDoubleSpinBox * myDxEdt;
- QtxDoubleSpinBox * myDyEdt;
- QtxDoubleSpinBox * myDzEdt;
+ SalomeApp_DoubleSpinBox * myDxEdt;
+ SalomeApp_DoubleSpinBox * myDyEdt;
+ SalomeApp_DoubleSpinBox * myDzEdt;
QCheckBox * mySaveChk;
QList<VISU::Prs3d_i*> myPrsList;
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU VISUGUI : GUI of VISU component
// File : VisuGUI_Panel.cxx
// Author : Oleg Uvarov
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU VISUGUI : GUI of VISU component
// File : VisuGUI_Panel.cxx
// Author : Oleg Uvarov
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU VISUGUI : GUI of VISU component
// File : VisuGUI_Plot3DDlg.cxx
// Author : Laurent CORNABE & Hubert ROLLAND
#include "SUIT_MessageBox.h"
#include "SUIT_ResourceMgr.h"
#include "LightApp_Application.h"
-
-#include "QtxDoubleSpinBox.h"
+#include <SalomeApp_IntSpinBox.h>
+#include <SalomeApp_DoubleSpinBox.h>
#include <QLayout>
#include <QValidator>
#include <QTabWidget>
#include <QRadioButton>
-#include <QSpinBox>
#include <QCheckBox>
#include <QVBoxLayout>
#include <QHBoxLayout>
LabelRot1 = new QLabel (tr("ROTATION_X"), GBrot );
GBrotLayout->addWidget(LabelRot1, 0, 0);
// spin 1
- Rot1 = new QtxDoubleSpinBox (-180, 180, 5, GBrot);
+ Rot1 = new SalomeApp_DoubleSpinBox (GBrot);
+ VISU::initSpinBox( Rot1, -180, 180, 5, "angle_precision" );
Rot1->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed));
GBrotLayout->addWidget(Rot1, 0, 1);
// label 2
LabelRot2 = new QLabel (tr("ROTATION_Y"), GBrot);
GBrotLayout->addWidget(LabelRot2, 1, 0);
// spin 2
- Rot2 = new QtxDoubleSpinBox (-180, 180, 5, GBrot);
+ Rot2 = new SalomeApp_DoubleSpinBox (GBrot);
+ VISU::initSpinBox( Rot2, -180, 180, 5, "angle_precision" );
Rot2->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed));
GBrotLayout->addWidget(Rot2, 1, 1);
QLabel * valueLabel = new QLabel (tr("POSITION_VALUE"), GBpos);
GBposLayout->addWidget(valueLabel, 0, 0);
// value spin
- PositionSpn = new QtxDoubleSpinBox (0, 1, 0.1, GBpos);
+ PositionSpn = new SalomeApp_DoubleSpinBox (GBpos);
+ VISU::initSpinBox( PositionSpn, 0, 1, 0.1, "parametric_precision" );
GBposLayout->addWidget(PositionSpn, 0, 1);
// Relative CheckBox
RelativeChkB = new QCheckBox (tr("RELATIVE"), GBpos);
bottomLayout->setMargin(0);
// scale
QLabel* scaleLabel = new QLabel (tr("SCALE"), bottomFrame);
- SUIT_ResourceMgr* aResourceMgr = VISU::GetResourceMgr();
- int aPrecision = aResourceMgr->integerValue( "VISU", "floating_point_precision", 0 );
- ScaleSpn = new QtxDoubleSpinBox (-1.e38, 1.e38, 0.1, aPrecision*(-1), 38, bottomFrame);
+ ScaleSpn = new SalomeApp_DoubleSpinBox (bottomFrame);
+ VISU::initSpinBox( ScaleSpn, -1.e38, 1.e38, 0.1, "visual_data_precision" );
// Presentation type
GBPrsType = new QButtonGroup ( bottomFrame);
QGroupBox* aGB = new QGroupBox (tr("PRESENTATION_TYPE"), bottomFrame);
GBPrsType->addButton( aRB, 1 );
// nb Contours
QLabel* nbContLabel = new QLabel (tr("NUMBER_CONTOURS"), bottomFrame);
- NbContoursSpn = new QSpinBox ( bottomFrame );
+ NbContoursSpn = new SalomeApp_IntSpinBox ( bottomFrame );
+ NbContoursSpn->setAcceptNames( false );
NbContoursSpn->setMinimum( 1 );
NbContoursSpn->setMaximum( 999 );
NbContoursSpn->setSingleStep( 1 );
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU VISUGUI : GUI of VISU component
// File : VisuGUI_Plot3DDlg.h
// Author : Laurent CORNABE & Hubert ROLLAND
class QGroupBox;
class SalomeApp_Module;
+class SalomeApp_IntSpinBox;
+
class VisuGUI_InputPane;
+class SalomeApp_DoubleSpinBox;
namespace VISU
{
class VISU_Plot3DPL;
class SVTK_ViewWindow;
class SALOME_Actor;
-class QtxDoubleSpinBox;
class VisuGUI_Plot3DPane : public QWidget//QVBox
{
QGroupBox * GBoxOrient;
QLabel * LabelRot1;
QLabel * LabelRot2;
- QtxDoubleSpinBox * Rot1;
- QtxDoubleSpinBox * Rot2;
- QtxDoubleSpinBox * PositionSpn;
+ SalomeApp_DoubleSpinBox * Rot1;
+ SalomeApp_DoubleSpinBox * Rot2;
+ SalomeApp_DoubleSpinBox * PositionSpn;
QCheckBox * RelativeChkB;
- QtxDoubleSpinBox * ScaleSpn;
+ SalomeApp_DoubleSpinBox * ScaleSpn;
QButtonGroup * GBPrsType;
- QSpinBox * NbContoursSpn;
+ SalomeApp_IntSpinBox * NbContoursSpn;
QCheckBox * PreviewChkB;
private slots:
--- /dev/null
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+// VISU VISUGUI : GUI of VISU component
+// File : VisuGUI_PrimitiveBox.cxx
+// Author : Oleg UVAROV
+// Module : VISU
+//
+#include "VisuGUI_PrimitiveBox.h"
+#include "VisuGUI_Tools.h"
+
+#include <VISU_OpenGLPointSpriteMapper.hxx>
+
+#include <SUIT_ResourceMgr.h>
+#include <SUIT_Session.h>
+
+#include <SalomeApp_DoubleSpinBox.h>
+#include <SalomeApp_IntSpinBox.h>
+
+#include <QLayout>
+#include <QLabel>
+#include <QLineEdit>
+#include <QButtonGroup>
+#include <QRadioButton>
+#include <QPushButton>
+#include <QFileDialog>
+
+#include <iostream>
+
+using namespace std;
+
+VisuGUI_PrimitiveBox::VisuGUI_PrimitiveBox( QWidget* parent ) :
+ QGroupBox( parent )
+{
+ SUIT_ResourceMgr* aResourceMgr = SUIT_Session::session()->resourceMgr();
+
+ setTitle( tr( "PRIMITIVE_TITLE" ) );
+ //setColumnLayout(0, Qt::Vertical );
+ //layout()->setSpacing( 0 );
+ //layout()->setMargin( 0 );
+
+ QGridLayout* aLayout = new QGridLayout( this );
+ aLayout->setAlignment(Qt::AlignTop | Qt::AlignCenter);
+ aLayout->setSpacing(6);
+ aLayout->setMargin(11);
+
+ myPrimitiveType = VISU_OpenGLPointSpriteMapper::PointSprite;
+
+ QString aRootDir = QString( getenv( "VISU_ROOT_DIR") ) + "/share/salome/resources/visu/";
+ myMainTexture = aRootDir + "sprite_texture.bmp";
+ myAlphaTexture = aRootDir + "sprite_alpha.bmp";
+
+ // Primitive Type
+ QGroupBox* aPrimitiveTypeGroup = new QGroupBox( this );
+ aPrimitiveTypeGroup->setMinimumWidth( 450 );
+ QHBoxLayout* aPrimLayout = new QHBoxLayout( aPrimitiveTypeGroup );
+ aPrimLayout->setMargin( 0 );
+
+ //QButtonGroup* aPrimitiveTypeGroup = new QButtonGroup( 3, Qt::Horizontal, this, "PrimitiveTypeGroup" );
+ //aPrimitiveTypeGroup->setMinimumWidth( 450 );
+ //aPrimitiveTypeGroup->setRadioButtonExclusive( true );
+ //aPrimitiveTypeGroup->setFrameStyle( QFrame::NoFrame );
+ //aPrimitiveTypeGroup->layout()->setMargin( 0 );
+
+ myPointSpriteButton = new QRadioButton( tr( "POINT_SPRITE" ), aPrimitiveTypeGroup );
+ myOpenGLPointButton = new QRadioButton( tr( "OPENGL_POINT" ), aPrimitiveTypeGroup );
+ myGeomSphereButton = new QRadioButton( tr( "GEOMETRICAL_SPHERE" ), aPrimitiveTypeGroup );
+
+ aPrimLayout->addWidget( myPointSpriteButton );
+ aPrimLayout->addWidget( myOpenGLPointButton );
+ aPrimLayout->addWidget( myGeomSphereButton );
+
+ aLayout->addWidget( aPrimitiveTypeGroup, 0, 0, 1, 2 );
+
+ // Clamp ( Point Sprite & OpenGL Point )
+ myClampLabel = new QLabel( tr( "CLAMP" ), this );
+ myClampSpinBox = new SalomeApp_DoubleSpinBox( this );
+ VISU::initSpinBox( myClampSpinBox, 1.0, 512.0, 1.0, "parametric_precision" );
+ myClampSpinBox->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
+
+ aLayout->addWidget( myClampLabel, 1, 0 );
+ aLayout->addWidget( myClampSpinBox, 1, 1, 1, 2 );
+
+ // Main Texture ( Point Sprite )
+ myMainTextureLabel = new QLabel( tr( "MAIN_TEXTURE" ), this );
+ myMainTextureLineEdit = new QLineEdit( this );
+ myMainTextureButton = new QPushButton( this );
+ myMainTextureButton->setAutoDefault( false );
+ myMainTextureButton->setIcon( aResourceMgr->loadPixmap( "VISU", tr( "ICON_LOAD_TEXTURE" ) ) );
+ connect( myMainTextureButton, SIGNAL( clicked() ), this, SLOT( onBrowseMainTexture() ) );
+
+ aLayout->addWidget( myMainTextureLabel, 2, 0 );
+ aLayout->addWidget( myMainTextureLineEdit, 2, 1 );
+ aLayout->addWidget( myMainTextureButton, 2, 2 );
+
+ // Alpha Texture ( Point Sprite )
+ myAlphaTextureLabel = new QLabel( tr( "ALPHA_TEXTURE" ), this );
+ myAlphaTextureLineEdit = new QLineEdit( this );
+ myAlphaTextureButton = new QPushButton( this );
+ myAlphaTextureButton->setAutoDefault( false );
+ myAlphaTextureButton->setIcon( aResourceMgr->loadPixmap( "VISU", tr( "ICON_LOAD_TEXTURE" ) ) );
+ connect( myAlphaTextureButton, SIGNAL( clicked() ), this, SLOT( onBrowseAlphaTexture() ) );
+
+ aLayout->addWidget( myAlphaTextureLabel, 3, 0 );
+ aLayout->addWidget( myAlphaTextureLineEdit, 3, 1 );
+ aLayout->addWidget( myAlphaTextureButton, 3, 2 );
+
+ // Alpha Threshold ( Point Sprite )
+ myAlphaThresholdLabel = new QLabel( tr( "ALPHA_THRESHOLD" ), this );
+ myAlphaThresholdSpinBox = new SalomeApp_DoubleSpinBox( this );
+ VISU::initSpinBox( myAlphaThresholdSpinBox, 0.0, 1.0, 0.1, "parametric_precision" );
+ myAlphaThresholdSpinBox->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
+
+ aLayout->addWidget( myAlphaThresholdLabel, 4, 0 );
+ aLayout->addWidget( myAlphaThresholdSpinBox, 4, 1, 1, 2 );
+
+ // Resolution ( Geometrical Sphere )
+ myResolutionLabel = new QLabel( tr( "RESOLUTION" ), this );
+ myResolutionSpinBox = new SalomeApp_IntSpinBox( this );
+ VISU::initSpinBox( myResolutionSpinBox, 3, 100, 1 );
+ myResolutionSpinBox->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
+ connect( myResolutionSpinBox, SIGNAL( valueChanged( int ) ), this, SLOT( onResolutionChanged( int ) ) );
+
+ aLayout->addWidget( myResolutionLabel, 5, 0 );
+ aLayout->addWidget( myResolutionSpinBox, 5, 1, 1, 2 );
+
+ // Number of faces ( Geometrical Sphere )
+ myFaceNumberLabel = new QLabel( tr( "FACE_NUMBER" ), this );
+ myFaceNumberLineEdit = new QLineEdit( this );
+ myFaceNumberLineEdit->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
+ myFaceNumberLineEdit->setEnabled( false );
+ //myFaceNumberLineEdit->setReadOnly( true );
+
+ aLayout->addWidget( myFaceNumberLabel, 6, 0 );
+ aLayout->addWidget( myFaceNumberLineEdit, 6, 1, 1, 2 );
+
+ // Notification ( Geometrical Sphere )
+ myFaceLimitLabel = new QLabel( tr( "FACE_LIMIT" ), this );
+ myFaceLimitSpinBox = new SalomeApp_IntSpinBox( this );
+ VISU::initSpinBox( myFaceLimitSpinBox, 10, 1000000, 10 );
+ myFaceLimitSpinBox->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
+
+ aLayout->addWidget( myFaceLimitLabel, 7, 0 );
+ aLayout->addWidget( myFaceLimitSpinBox, 7, 1, 1, 2 );
+
+ connect( myPointSpriteButton, SIGNAL( clicked() ), this, SLOT( onTogglePointSprite() ) );
+ connect( myOpenGLPointButton, SIGNAL( clicked() ), this, SLOT( onToggleOpenGLPoint() ) );
+ connect( myGeomSphereButton, SIGNAL( clicked() ), this, SLOT( onToggleGeomSphere() ) );
+}
+
+void VisuGUI_PrimitiveBox::onTogglePointSprite()
+{
+ myPrimitiveType = VISU_OpenGLPointSpriteMapper::PointSprite;
+
+ myClampLabel->show();
+ myClampSpinBox->show();
+
+ myMainTextureLabel->show();
+ myMainTextureLineEdit->show();
+ myMainTextureButton->show();
+
+ myAlphaTextureLabel->show();
+ myAlphaTextureLineEdit->show();
+ myAlphaTextureButton->show();
+
+ myAlphaThresholdLabel->show();
+ myAlphaThresholdSpinBox->show();
+
+ myResolutionLabel->hide();
+ myResolutionSpinBox->hide();
+
+ myFaceNumberLabel->hide();
+ myFaceNumberLineEdit->hide();
+
+ myFaceLimitLabel->hide();
+ myFaceLimitSpinBox->hide();
+}
+
+void VisuGUI_PrimitiveBox::onToggleOpenGLPoint()
+{
+ myPrimitiveType = VISU_OpenGLPointSpriteMapper::OpenGLPoint;
+
+ myClampLabel->show();
+ myClampSpinBox->show();
+
+ myMainTextureLabel->hide();
+ myMainTextureLineEdit->hide();
+ myMainTextureButton->hide();
+
+ myAlphaTextureLabel->hide();
+ myAlphaTextureLineEdit->hide();
+ myAlphaTextureButton->hide();
+
+ myAlphaThresholdLabel->hide();
+ myAlphaThresholdSpinBox->hide();
+
+ myResolutionLabel->hide();
+ myResolutionSpinBox->hide();
+
+ myFaceNumberLabel->hide();
+ myFaceNumberLineEdit->hide();
+
+ myFaceLimitLabel->hide();
+ myFaceLimitSpinBox->hide();
+}
+
+void VisuGUI_PrimitiveBox::onToggleGeomSphere()
+{
+ myPrimitiveType = VISU_OpenGLPointSpriteMapper::GeomSphere;
+
+ myClampLabel->hide();
+ myClampSpinBox->hide();
+
+ myMainTextureLabel->hide();
+ myMainTextureLineEdit->hide();
+ myMainTextureButton->hide();
+
+ myAlphaTextureLabel->hide();
+ myAlphaTextureLineEdit->hide();
+ myAlphaTextureButton->hide();
+
+ myAlphaThresholdLabel->hide();
+ myAlphaThresholdSpinBox->hide();
+
+ myResolutionLabel->show();
+ myResolutionSpinBox->show();
+
+ myFaceNumberLabel->show();
+ myFaceNumberLineEdit->show();
+
+ myFaceLimitLabel->show();
+ myFaceLimitSpinBox->show();
+}
+
+void VisuGUI_PrimitiveBox::onResolutionChanged( int theResolution )
+{
+ setFaceNumber( 2 * theResolution * ( theResolution - 2 ) );
+}
+
+void VisuGUI_PrimitiveBox::setPrimitiveType( int theType )
+{
+ myPrimitiveType = theType;
+
+ switch( myPrimitiveType )
+ {
+ case VISU_OpenGLPointSpriteMapper::PointSprite :
+ myPointSpriteButton->setChecked( true );
+ onTogglePointSprite();
+ break;
+ case VISU_OpenGLPointSpriteMapper::OpenGLPoint :
+ myOpenGLPointButton->setChecked( true );
+ onToggleOpenGLPoint();
+ break;
+ case VISU_OpenGLPointSpriteMapper::GeomSphere :
+ myGeomSphereButton->setChecked( true );
+ onToggleGeomSphere();
+ break;
+ default : break;
+ }
+}
+
+float VisuGUI_PrimitiveBox::getClamp() const
+{
+ return myClampSpinBox->value();
+}
+
+void VisuGUI_PrimitiveBox::setClamp( float theClamp )
+{
+ myClampSpinBox->setValue( theClamp );
+}
+
+void VisuGUI_PrimitiveBox::setClampMaximum( float theClampMaximum )
+{
+ myClampSpinBox->setMaximum( theClampMaximum );
+}
+
+void VisuGUI_PrimitiveBox::setMainTexture( const QString& theMainTexture )
+{
+ myMainTexture = theMainTexture;
+ myMainTextureLineEdit->setText( theMainTexture.section( '/', -1 ) );
+}
+
+void VisuGUI_PrimitiveBox::setAlphaTexture( const QString& theAlphaTexture )
+{
+ myAlphaTexture = theAlphaTexture;
+ myAlphaTextureLineEdit->setText( theAlphaTexture.section( '/', -1 ) );
+}
+
+float VisuGUI_PrimitiveBox::getAlphaThreshold() const
+{
+ return myAlphaThresholdSpinBox->value();
+}
+
+void VisuGUI_PrimitiveBox::setAlphaThreshold( float theAlphaThreshold )
+{
+ myAlphaThresholdSpinBox->setValue( theAlphaThreshold );
+}
+
+int VisuGUI_PrimitiveBox::getResolution() const
+{
+ return myResolutionSpinBox->value();
+}
+
+void VisuGUI_PrimitiveBox::setResolution( int theResolution )
+{
+ myResolutionSpinBox->setValue( theResolution );
+}
+
+int VisuGUI_PrimitiveBox::getFaceNumber() const
+{
+ int aResolution = getResolution();
+ return 2 * aResolution * ( aResolution - 2 );
+ //return myFaceNumberLineEdit->text().toInt();
+}
+
+void VisuGUI_PrimitiveBox::setFaceNumber( int theFaceNumber )
+{
+ myFaceNumberLineEdit->setText( QString::number( theFaceNumber ) );
+}
+
+int VisuGUI_PrimitiveBox::getFaceLimit() const
+{
+ return myFaceLimitSpinBox->value();
+}
+
+void VisuGUI_PrimitiveBox::setFaceLimit( int theFaceLimit )
+{
+ myFaceLimitSpinBox->setValue( theFaceLimit );
+}
+
+void VisuGUI_PrimitiveBox::onBrowseMainTexture()
+{
+ QString aRootDir = QString( getenv( "VISU_ROOT_DIR") ) + "/share/salome/resources/visu/";
+ QString aFileName = QFileDialog::getOpenFileName( this,
+ 0,
+ aRootDir,
+ "Bitmap (*.bmp *.jpg *.png)" );
+
+ if( aFileName.isNull() )
+ return;
+
+ myMainTexture = aFileName;
+ myMainTextureLineEdit->setText( aFileName.section( '/', -1 ) );
+}
+
+void VisuGUI_PrimitiveBox::onBrowseAlphaTexture()
+{
+ QString aRootDir = QString( getenv( "VISU_ROOT_DIR") ) + "/share/salome/resources/visu/";
+ QString aFileName = QFileDialog::getOpenFileName( this,
+ 0,
+ aRootDir,
+ "Bitmap (*.bmp *.jpg *.png)" );
+
+ if( aFileName.isNull() )
+ return;
+
+ myAlphaTexture = aFileName;
+ myAlphaTextureLineEdit->setText( aFileName.section( '/', -1 ) );
+}
--- /dev/null
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+// VISU VISUGUI : GUI of VISU component
+// File : VisuGUI_PrimitiveBox.h
+// Author : Oleg UVAROV
+// Module : VISU
+//
+#ifndef VISUGUI_PRIMITIVEBOX_H
+#define VISUGUI_PRIMITIVEBOX_H
+
+#include <QGroupBox>
+
+class QLabel;
+class QLineEdit;
+class QPushButton;
+class QRadioButton;
+
+class SalomeApp_DoubleSpinBox;
+class SalomeApp_IntSpinBox;
+
+class VisuGUI_PrimitiveBox : public QGroupBox
+{
+ Q_OBJECT
+
+public:
+ VisuGUI_PrimitiveBox( QWidget* );
+ ~VisuGUI_PrimitiveBox() {}
+
+public:
+ int getPrimitiveType() const { return myPrimitiveType; }
+ void setPrimitiveType( int );
+
+ float getClamp() const;
+ void setClamp( float );
+ void setClampMaximum( float );
+
+ QString getMainTexture() const { return myMainTexture; }
+ void setMainTexture( const QString& );
+
+ QString getAlphaTexture() const { return myAlphaTexture; }
+ void setAlphaTexture( const QString& );
+
+ float getAlphaThreshold() const;
+ void setAlphaThreshold( float );
+
+ int getResolution() const;
+ void setResolution( int );
+
+ int getFaceNumber() const;
+ void setFaceNumber( int );
+
+ int getFaceLimit() const;
+ void setFaceLimit( int );
+
+protected slots:
+ void onTogglePointSprite();
+ void onToggleOpenGLPoint();
+ void onToggleGeomSphere();
+
+ void onBrowseMainTexture();
+ void onBrowseAlphaTexture();
+
+ void onResolutionChanged( int );
+
+private:
+ int myPrimitiveType;
+
+ QRadioButton* myPointSpriteButton;
+ QRadioButton* myOpenGLPointButton;
+ QRadioButton* myGeomSphereButton;
+
+ QString myMainTexture;
+ QString myAlphaTexture;
+
+ QLabel* myClampLabel;
+ SalomeApp_DoubleSpinBox* myClampSpinBox;
+
+ QLabel* myMainTextureLabel;
+ QLineEdit* myMainTextureLineEdit;
+ QPushButton* myMainTextureButton;
+
+ QLabel* myAlphaTextureLabel;
+ QLineEdit* myAlphaTextureLineEdit;
+ QPushButton* myAlphaTextureButton;
+
+ QLabel* myAlphaThresholdLabel;
+ SalomeApp_DoubleSpinBox* myAlphaThresholdSpinBox;
+
+ QLabel* myResolutionLabel;
+ SalomeApp_IntSpinBox* myResolutionSpinBox;
+
+ QLabel* myFaceNumberLabel;
+ QLineEdit* myFaceNumberLineEdit;
+
+ QLabel* myFaceLimitLabel;
+ SalomeApp_IntSpinBox* myFaceLimitSpinBox;
+};
+
+
+
+#endif
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU VISUGUI : GUI of VISU component
// File : VisuGUI_Prs3dDlg.cxx
// Author : Laurent CORNABE & Hubert ROLLAND
// Module : VISU
-
+//
#include "VisuGUI_Prs3dDlg.h"
#include "VisuGUI.h"
#include "VISU_Result_i.hh"
#include "VISU_Prs3dUtils.hh"
+#include <SalomeApp_IntSpinBox.h>
+#include <SalomeApp_DoubleSpinBox.h>
#include "LightApp_Application.h"
#include "SUIT_Session.h"
#include <QKeyEvent>
#include <QGridLayout>
-#include "QtxDoubleSpinBox.h"
-
#include <vtkTextProperty.h>
-#include <limits.h>
-
-using namespace std;
+#include <limits>
//-----------------------------------------------------------------------
// Text Preferences Dialog
aDimGrpLay->setSpacing( 5 );
aDimGrpLay->setMargin( 5 );
- myTitleSizeSpin = new QSpinBox( aDimGrp );
+ myTitleSizeSpin = new SalomeApp_IntSpinBox( aDimGrp );
+ myTitleSizeSpin->setAcceptNames( false );
myTitleSizeSpin->setRange( 0, 100 );
myTitleSizeSpin->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
myTitleSizeSpin->setMinimumWidth( 70 );
myTitleSizeSpin->setSpecialValueText( tr( "AUTO" ) );
QLabel* aTitleSizeLbl = new QLabel( tr( "LBL_TITLE_W" ), aDimGrp );
- myLabelSizeSpin = new QSpinBox( aDimGrp );
+ myLabelSizeSpin = new SalomeApp_IntSpinBox( aDimGrp );
+ myLabelSizeSpin->setAcceptNames( false );
myLabelSizeSpin->setRange( 0, 100 );
myLabelSizeSpin->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
myLabelSizeSpin->setMinimumWidth( 70 );
myLabelSizeSpin->setSpecialValueText( tr( "AUTO" ) );
QLabel* aLabelSizeLbl = new QLabel( tr( "LBL_LABEL_W" ), aDimGrp );
- myBarWidthSpin = new QSpinBox( aDimGrp );
+ myBarWidthSpin = new SalomeApp_IntSpinBox( aDimGrp );
+ myBarWidthSpin->setAcceptNames( false );
myBarWidthSpin->setRange( 0, 100 );
myBarWidthSpin->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
myBarWidthSpin->setMinimumWidth( 70 );
myBarWidthSpin->setSpecialValueText( tr( "AUTO" ) );
QLabel* aBarWidthLbl = new QLabel( tr( "LBL_BAR_W" ), aDimGrp );
- myBarHeightSpin = new QSpinBox( aDimGrp );
+ myBarHeightSpin = new SalomeApp_IntSpinBox( aDimGrp );
+ myBarHeightSpin->setAcceptNames( false );
myBarHeightSpin->setRange( 0, 100 );
myBarHeightSpin->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
myBarHeightSpin->setMinimumWidth( 70 );
// format and units
QLabel* aPrecLbl = new QLabel( tr( "PRECISION" ), aDimGrp );
- myPrecisionSpin = new QSpinBox( aDimGrp );
+ myPrecisionSpin = new SalomeApp_IntSpinBox( aDimGrp );
+ myPrecisionSpin->setAcceptNames( false );
myPrecisionSpin->setRange( 1, 100 );
myUnitsChk = new QCheckBox( tr( "LBL_SHOW_UNITS" ), aDimGrp );
RangeGroup->addButton( RBIrange, 1 );
RBFrange->setChecked( true );
- int aPrecision = aResourceMgr->integerValue( "VISU", "floating_point_precision", 0 );
+ int aPrecision = qAbs( aResourceMgr->integerValue( "VISU", "visual_data_precision", 0 ) );
QDoubleValidator* dv = new QDoubleValidator(this);
dv->setDecimals(aPrecision);
//ColLabGroupLayout->setMargin( 11 );
QLabel* ColorLabel = new QLabel (tr("LBL_NB_COLORS"), ColLabGroup);
- ColorSpin = new QSpinBox( ColLabGroup );
+ ColorSpin = new SalomeApp_IntSpinBox( ColLabGroup );
+ ColorSpin->setAcceptNames( false );
ColorSpin->setMinimum( 2 );
ColorSpin->setMaximum( 256 );
ColorSpin->setSingleStep( 1 );
ColorSpin->setValue( 64 );
QLabel* LabelLabel = new QLabel (tr("LBL_NB_LABELS"), ColLabGroup);
- LabelSpin = new QSpinBox( ColLabGroup );
+ LabelSpin = new SalomeApp_IntSpinBox( ColLabGroup );
+ LabelSpin->setAcceptNames( false );
LabelSpin->setMinimum( 2 );
LabelSpin->setMaximum( 65 );
LabelSpin->setSingleStep( 1 );
//OriginGroupLayout->setMargin( 11 );
QLabel* XLabel = new QLabel (tr("LBL_X"), OriginGroup);
- XSpin = new QtxDoubleSpinBox( OriginGroup );
- VISU::initSpinBox(XSpin, 0.0, +1.0);
+ XSpin = new SalomeApp_DoubleSpinBox( OriginGroup );
+ VISU::initSpinBox( XSpin, 0.0, +1.0, .1, "parametric_precision" );
XSpin->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
//XSpin->setMinimumWidth( 70 );
XSpin->setValue( 0.01 );
QLabel* YLabel = new QLabel (tr("LBL_Y"), OriginGroup);
- YSpin = new QtxDoubleSpinBox( OriginGroup );
- VISU::initSpinBox(YSpin, 0.0, +1.0);
+ YSpin = new SalomeApp_DoubleSpinBox( OriginGroup );
+ VISU::initSpinBox( YSpin, 0.0, +1.0, .1, "parametric_precision" );
YSpin->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
//YSpin->setMinimumWidth( 70 );
YSpin->setValue( 0.1 );
//DimGroupLayout->setMargin( 11 );
QLabel* WidthLabel = new QLabel (tr("LBL_WIDTH"), DimGroup);
- WidthSpin = new QtxDoubleSpinBox( DimGroup );
- VISU::initSpinBox(WidthSpin, 0.0, +1.0);
+ WidthSpin = new SalomeApp_DoubleSpinBox( DimGroup );
+ VISU::initSpinBox( WidthSpin, 0.0, +1.0, .1, "parametric_precision" );
WidthSpin->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
//WidthSpin->setMinimumWidth( 70 );
WidthSpin->setValue( 0.1 );
QLabel* HeightLabel = new QLabel (tr("LBL_HEIGHT"), DimGroup);
- HeightSpin = new QtxDoubleSpinBox( DimGroup );
- VISU::initSpinBox(HeightSpin, 0.0, +1.0);
+ HeightSpin = new SalomeApp_DoubleSpinBox( DimGroup );
+ VISU::initSpinBox( HeightSpin, 0.0, +1.0, .1, "parametric_precision" );
HeightSpin->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
//HeightSpin->setMinimumWidth( 70 );
HeightSpin->setValue( 0.8 );
*/
void VisuGUI_ScalarBarPane::XYChanged( double )
{
- QtxDoubleSpinBox* snd = (QtxDoubleSpinBox*)sender();
+ SalomeApp_DoubleSpinBox* snd = (SalomeApp_DoubleSpinBox*)sender();
if ( snd == XSpin ) {
WidthSpin->setMaximum( 1.0 - XSpin->value() );
}
if ( RBFrange->isChecked() ) {
SUIT_ResourceMgr* aResourceMgr = VISU::GetResourceMgr();
- int aPrecision = aResourceMgr->integerValue("VISU", "floating_point_precision", 0);
+ int aPrecision = qAbs( aResourceMgr->integerValue("VISU", "visual_data_precision", 0) );
MinEdit->setText(QString::number(myScalarMap->GetSourceMin(), 'g', aPrecision));
MaxEdit->setText(QString::number(myScalarMap->GetSourceMax(), 'g', aPrecision));
if ( RBFrange->isChecked() ) {
SUIT_ResourceMgr* aResourceMgr = VISU::GetResourceMgr();
- int aPrecision = aResourceMgr->integerValue("VISU", "floating_point_precision", 0);
+ int aPrecision = qAbs( aResourceMgr->integerValue("VISU", "visual_data_precision", 0) );
MinEdit->setText(QString::number(myScalarMap->GetSourceMin(), 'g', aPrecision));
MaxEdit->setText(QString::number(myScalarMap->GetSourceMax(), 'g', aPrecision));
void VisuGUI_ScalarBarPane::setRange( double imin, double imax, bool sbRange )
{
SUIT_ResourceMgr* aResourceMgr = VISU::GetResourceMgr();
- int aPrecision = aResourceMgr->integerValue("VISU", "floating_point_precision", 0);
+ int aPrecision = qAbs( aResourceMgr->integerValue("VISU", "visual_data_precision", 0) );
MinEdit->setText(QString::number(imin, 'g', aPrecision));
MaxEdit->setText(QString::number(imax, 'g', aPrecision));
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU VISUGUI : GUI of VISU component
// File : VisuGUI_Prs3dDlg.h
// Author : Laurent CORNABE & Hubert ROLLAND
class QCheckBox;
class QPushButton;
class QRadioButton;
-class QSpinBox;
class QLineEdit;
class QComboBox;
class QToolButton;
class QTabWidget;
-class QtxDoubleSpinBox;
+class SalomeApp_DoubleSpinBox;
class SalomeApp_Module;
+class SalomeApp_IntSpinBox;
class SVTK_FontWidget;
class VISU_ScalarMapAct;
class VISU_ScalarMapPL;
void onHelp();
protected:
- QSpinBox* myTitleSizeSpin;
- QSpinBox* myLabelSizeSpin;
- QSpinBox* myBarWidthSpin;
- QSpinBox* myBarHeightSpin;
+ SalomeApp_IntSpinBox* myTitleSizeSpin;
+ SalomeApp_IntSpinBox* myLabelSizeSpin;
+ SalomeApp_IntSpinBox* myBarWidthSpin;
+ SalomeApp_IntSpinBox* myBarHeightSpin;
QCheckBox* myUnitsChk;
- QSpinBox* myPrecisionSpin;
+ SalomeApp_IntSpinBox* myPrecisionSpin;
int myTitleSize;
int myLabelSize;
QRadioButton* RBhori;
QRadioButton* RBvert;
- QtxDoubleSpinBox* XSpin;
- QtxDoubleSpinBox* YSpin;
+ SalomeApp_DoubleSpinBox* XSpin;
+ SalomeApp_DoubleSpinBox* YSpin;
- QtxDoubleSpinBox* WidthSpin;
- QtxDoubleSpinBox* HeightSpin;
+ SalomeApp_DoubleSpinBox* WidthSpin;
+ SalomeApp_DoubleSpinBox* HeightSpin;
- QSpinBox* ColorSpin;
- QSpinBox* LabelSpin;
+ SalomeApp_IntSpinBox* ColorSpin;
+ SalomeApp_IntSpinBox* LabelSpin;
QCheckBox* CBSave;
QCheckBox* CBLog;
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU VISUGUI : GUI of VISU component
// File : VisuGUI_Module.h
// Author :
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU VISUGUI : GUI of VISU component
// File : VisuGUI_ScalarBarDlg.cxx
// Author : Laurent CORNABE & Hubert ROLLAND
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU VISUGUI : GUI of VISU component
// File : VisuGUI_ScalarBarDlg.h
// Author : Laurent CORNABE & Hubert ROLLAND
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU VISUGUI : GUI of VISU component
// File : VisuGUI_Selection.cxx
// Author : Sergey Anikin
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU VISUGUI : GUI of VISU component
// File : VisuGUI_Selection.h
// Author : Sergey Anikin
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU VISUGUI : GUI of VISU component
// File : VisuGUI_SelectionPanel.h
// Author : Laurent CORNABE & Hubert ROLLAND
// QT Includes
#include <QLabel>
-#include <QSpinBox>
#include <QListWidget>
#include <QLayout>
#include <QButtonGroup>
// STL Includes
#include <map>
-using namespace std;
-
class CustomIntValidator: public QIntValidator
{
public:
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU VISUGUI : GUI of VISU component
// File : VisuGUI_SelectionPanel.h
// Author : Laurent CORNABE & Hubert ROLLAND
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : VisuGUI_SelectionPrefDlg.cxx
// Author : Oleg UVAROV
// Module : SALOME
//
#include "VisuGUI_SelectionPrefDlg.h"
#include "VisuGUI.h"
+#include "VisuGUI_Tools.h"
#include "VISU_PickingSettings.h"
#include <LightApp_Application.h>
+#include <SalomeApp_IntSpinBox.h>
+#include <SalomeApp_DoubleSpinBox.h>
+
#include <QtxColorButton.h>
-#include <QtxDoubleSpinBox.h>
-#include <QtxIntSpinBox.h>
#include <QComboBox>
#include <QGroupBox>
#include <QLineEdit>
#include <QPushButton>
-using namespace std;
-
/*!
Constructor
*/
CursorGroupLayout->setMargin(11);
QLabel* CursorSizeLabel = new QLabel( tr( "CURSOR_SIZE" ), CursorGroup );
- myCursorSizeSpinBox = new QtxDoubleSpinBox( 0, 1, 0.1, CursorGroup );
+ myCursorSizeSpinBox = new SalomeApp_DoubleSpinBox( CursorGroup );
+ VISU::initSpinBox( myCursorSizeSpinBox, 0, 1, 0.1, "parametric_precision" );
myCursorSizeSpinBox->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
QLabel* PyramidHeightLabel = new QLabel( tr( "PYRAMID_HEIGHT" ), CursorGroup );
double aHeightMin=1.e-7;
double aHeightMax=10.;
double aHeightStep=0.1;
- myPyramidHeightSpinBox = new QtxDoubleSpinBox(aHeightMin, aHeightMax, aHeightStep, CursorGroup );
+ myPyramidHeightSpinBox = new SalomeApp_DoubleSpinBox(CursorGroup );
+ VISU::initSpinBox( myPyramidHeightSpinBox, aHeightMin, aHeightMax, aHeightStep, "length_precision" );
myPyramidHeightSpinBox->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
QLabel* SelectionColorLabel = new QLabel( tr( "SELECTION_COLOR" ), CursorGroup );
ToleranceGroupLayout->setMargin(11);
QLabel* PointToleranceLabel = new QLabel( tr( "POINT_TOLERANCE" ), ToleranceGroup );
- myPointToleranceSpinBox = new QtxDoubleSpinBox( 0.001, 10.0, 0.01, ToleranceGroup );
+ myPointToleranceSpinBox = new SalomeApp_DoubleSpinBox(ToleranceGroup );
+ VISU::initSpinBox( myPointToleranceSpinBox, 0.001, 10.0, 0.01, "len_tol_precision" );
myPointToleranceSpinBox->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
ToleranceGroupLayout->addWidget( PointToleranceLabel, 0, 0 );
InfoWindowGroupLayout->setAlignment(Qt::AlignTop | Qt::AlignCenter);
QLabel* TransparencyLabel = new QLabel( tr( "TRANSPARENCY" ), myInfoWindowGroup );
- myTransparencySpinBox = new QtxIntSpinBox( 0, 100, 10, myInfoWindowGroup );
+ myTransparencySpinBox = new SalomeApp_IntSpinBox( 0, 100, 10, myInfoWindowGroup );
+ myTransparencySpinBox->setAcceptNames( false );
myTransparencySpinBox->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
InfoWindowGroupLayout->addWidget( TransparencyLabel, 0, 0 );
CameraGroupLayout->setAlignment(Qt::AlignTop | Qt::AlignCenter);
QLabel* ZoomFactorLabel = new QLabel( tr( "ZOOM_FACTOR" ), myCameraGroup );
- myZoomFactorSpinBox = new QtxDoubleSpinBox( 0.1, 10.0, 0.1, myCameraGroup );
+ myZoomFactorSpinBox = new SalomeApp_DoubleSpinBox( myCameraGroup );
+ VISU::initSpinBox( myZoomFactorSpinBox, 0.1, 10.0, 0.1, "parametric_precision" );
myZoomFactorSpinBox->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
QLabel* StepNumberLabel = new QLabel( tr( "STEP_NUMBER" ), myCameraGroup );
StepNumberLabel->setToolTip( tr( "STEP_NUMBER_TIP" ) );
- myStepNumberSpinBox = new QtxIntSpinBox( 1, 100, 1, myCameraGroup );
+ myStepNumberSpinBox = new SalomeApp_IntSpinBox( 1, 100, 1, myCameraGroup );
+ myStepNumberSpinBox->setAcceptNames( false );
myStepNumberSpinBox->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
CameraGroupLayout->addWidget( ZoomFactorLabel, 0, 0 );
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : VisuGUI_SelectionPrefDlg.cxx
// Author : Oleg UVAROV
// Module : SALOME
class QPushButton;
class QtxColorButton;
-class QtxDoubleSpinBox;
-class QtxIntSpinBox;
+class SalomeApp_DoubleSpinBox;
+class SalomeApp_IntSpinBox;
class VisuGUI_SelectionPrefDlg : public QDialog
{
void onHelp();
private:
- QtxDoubleSpinBox* myCursorSizeSpinBox;
- QtxDoubleSpinBox* myPyramidHeightSpinBox;
+ SalomeApp_DoubleSpinBox* myCursorSizeSpinBox;
+ SalomeApp_DoubleSpinBox* myPyramidHeightSpinBox;
QtxColorButton* mySelectionColorButton;
- QtxDoubleSpinBox* myPointToleranceSpinBox;
+ SalomeApp_DoubleSpinBox* myPointToleranceSpinBox;
QGroupBox* myInfoWindowGroup;
- QtxIntSpinBox* myTransparencySpinBox;
+ SalomeApp_IntSpinBox* myTransparencySpinBox;
QComboBox* myPositionComboBox;
QGroupBox* myCameraGroup;
- QtxDoubleSpinBox* myZoomFactorSpinBox;
- QtxIntSpinBox* myStepNumberSpinBox;
+ SalomeApp_DoubleSpinBox* myZoomFactorSpinBox;
+ SalomeApp_IntSpinBox* myStepNumberSpinBox;
QPushButton* myButtonOk;
QPushButton* myButtonApply;
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : VisuGUI_SetupPlot2dDlg.cxx
// Author : Vadim SANDLER
// Module : SALOME
#include "LightApp_Application.h"
+#include <SalomeApp_IntSpinBox.h>
+
#include <QtxColorButton.h>
#include <SALOMEDSClient_AttributeTableOfInteger.hxx>
#include <QScrollArea>
#include <QLayout>
#include <QColorDialog>
-#include <QSpinBox>
#include <QKeyEvent>
#include <QFrame>
#include "utilities.h"
-using namespace std;
-
#define DLG_SIZE_WIDTH 500
#define DLG_SIZE_HEIGHT 400
#define MAX_LINE_WIDTH 100
labUnit->setFont( font );
labAttr->setFont( font );
- frameLayout->addWidget( labAxis, 0, 0, 1, 2 );
+ frameLayout->addWidget( labAxis, 0, 0, 1, 3 );
lin = new QFrame( frame ); lin->setFrameStyle( QFrame::VLine | QFrame::Sunken );
- frameLayout->addWidget( lin, 0, 2 );
+ frameLayout->addWidget( lin, 0, 3 );
- frameLayout->addWidget( labAssigned, 0, 3 );
+ frameLayout->addWidget( labAssigned, 0, 4 );
lin = new QFrame( frame ); lin->setFrameStyle( QFrame::VLine | QFrame::Sunken );
- frameLayout->addWidget( lin, 0, 4 );
+ frameLayout->addWidget( lin, 0, 5 );
- frameLayout->addWidget( labData, 0, 5 );
+ frameLayout->addWidget( labData, 0, 6 );
lin = new QFrame( frame ); lin->setFrameStyle( QFrame::VLine | QFrame::Sunken );
- frameLayout->addWidget( lin, 0, 6 );
- frameLayout->addWidget( labUnit, 0, 7 );
+ frameLayout->addWidget( lin, 0, 7 );
+ frameLayout->addWidget( labUnit, 0, 8 );
lin = new QFrame( frame ); lin->setFrameStyle( QFrame::VLine | QFrame::Sunken );
- frameLayout->addWidget( lin, 0, 8 );
- frameLayout->addWidget( labAttr, 0, 9, 1, 5 );
- //frameLayout->setColStretch( 14, 5 );
+ frameLayout->addWidget( lin, 0, 9 );
+ frameLayout->addWidget( labAttr, 0, 10, 1, 5 );
+ //frameLayout->setColStretch( 15, 5 );
lin = new QFrame( frame ); lin->setFrameStyle( QFrame::HLine | QFrame::Sunken );
- frameLayout->addWidget( lin, 1, 0, 1, 15 );
+ frameLayout->addWidget( lin, 1, 0, 1, 16 );
int row = 2;
_PTR(GenericAttribute) anAttr;
if ( tblIntAttr ) {
try {
int nbRows = tblIntAttr->GetNbRows() ;
- vector<string> rowTitles = tblIntAttr->GetRowTitles();
- vector<string> rowUnits = tblIntAttr->GetRowUnits();
+ std::vector<std::string> rowTitles = tblIntAttr->GetRowTitles();
+ std::vector<std::string> rowUnits = tblIntAttr->GetRowUnits();
QStringList rows;
for ( int i = 0; i < nbRows; i++ )
rows.append( rowTitles[i].c_str() );
item->createWidgets( frame, rows );
frameLayout->addWidget( item->myHBtn, row, 0 );
frameLayout->addWidget( item->myVBtn, row, 1 );
- frameLayout->addWidget( item->myAssigned, row, 3 );
+ frameLayout->addWidget( item->myV2Btn, row, 2 );
+ frameLayout->addWidget( item->myAssigned, row, 4 );
- frameLayout->addWidget( item->myTitleLab, row, 5 );
+ frameLayout->addWidget( item->myTitleLab, row, 6 );
if ( rowTitles.size() > 0 )
item->myTitleLab->setText( QString( rowTitles[ i ].c_str() ) );
- frameLayout->addWidget( item->myUnitLab, row, 7 );
+ frameLayout->addWidget( item->myUnitLab, row, 8 );
if ( rowUnits.size() > 0 )
item->myUnitLab->setText( QString( rowUnits[ i ].c_str() ) );
- frameLayout->addWidget( item->myAutoCheck, row, 9 );
- frameLayout->addWidget( item->myLineCombo, row, 10 );
- frameLayout->addWidget( item->myLineSpin, row, 11 );
- frameLayout->addWidget( item->myMarkerCombo, row, 12 );
- frameLayout->addWidget( item->myColorBtn, row, 13 );
+ frameLayout->addWidget( item->myAutoCheck, row, 10 );
+ frameLayout->addWidget( item->myLineCombo, row, 11 );
+ frameLayout->addWidget( item->myLineSpin, row, 12 );
+ frameLayout->addWidget( item->myMarkerCombo, row, 13 );
+ frameLayout->addWidget( item->myColorBtn, row, 14 );
connect( item, SIGNAL( horToggled( bool ) ), this, SLOT( onHBtnToggled( bool ) ) );
connect( item, SIGNAL( verToggled( bool ) ), this, SLOT( onVBtnToggled( bool ) ) );
+ connect( item, SIGNAL( ver2Toggled( bool ) ), this, SLOT( onV2BtnToggled( bool ) ) );
myItems.append( item );
row++;
}
if ( tblRealAttr ) {
try {
int nbRows = tblRealAttr->GetNbRows() ;
- vector<string> rowTitles = tblRealAttr->GetRowTitles();
- vector<string> rowUnits = tblRealAttr->GetRowUnits();
+ std::vector<std::string> rowTitles = tblRealAttr->GetRowTitles();
+ std::vector<std::string> rowUnits = tblRealAttr->GetRowUnits();
QStringList rows;
for ( int i = 0; i < nbRows; i++ )
rows.append( rowTitles[i].c_str() );
item->createWidgets( frame, rows );
frameLayout->addWidget( item->myHBtn, row, 0 );
frameLayout->addWidget( item->myVBtn, row, 1 );
- frameLayout->addWidget( item->myAssigned, row, 3 );
+ frameLayout->addWidget( item->myV2Btn, row, 2 );
+ frameLayout->addWidget( item->myAssigned, row, 4 );
- frameLayout->addWidget( item->myTitleLab, row, 5 );
+ frameLayout->addWidget( item->myTitleLab, row, 6 );
if ( rowTitles.size() > 0 )
item->myTitleLab->setText( QString( rowTitles[ i ].c_str() ) );
- frameLayout->addWidget( item->myUnitLab, row, 7 );
+ frameLayout->addWidget( item->myUnitLab, row, 8 );
if ( rowUnits.size() > 0 )
item->myUnitLab->setText( QString( rowUnits[ i ].c_str() ) );
- frameLayout->addWidget( item->myAutoCheck, row, 9 );
- frameLayout->addWidget( item->myLineCombo, row, 10 );
- frameLayout->addWidget( item->myLineSpin, row, 11 );
- frameLayout->addWidget( item->myMarkerCombo, row, 12 );
- frameLayout->addWidget( item->myColorBtn, row, 13 );
+ frameLayout->addWidget( item->myAutoCheck, row, 10 );
+ frameLayout->addWidget( item->myLineCombo, row, 11 );
+ frameLayout->addWidget( item->myLineSpin, row, 12 );
+ frameLayout->addWidget( item->myMarkerCombo, row, 13 );
+ frameLayout->addWidget( item->myColorBtn, row, 14 );
connect( item, SIGNAL( horToggled( bool ) ), this, SLOT( onHBtnToggled( bool ) ) );
connect( item, SIGNAL( verToggled( bool ) ), this, SLOT( onVBtnToggled( bool ) ) );
+ connect( item, SIGNAL( ver2Toggled( bool ) ), this, SLOT( onV2BtnToggled( bool ) ) );
myItems.append( item );
row++;
}
}
}
lin = new QFrame( frame ); lin->setFrameStyle( QFrame::VLine | QFrame::Sunken );
- frameLayout->addWidget( lin, 2, 2, row, 1 );
+ frameLayout->addWidget( lin, 2, 3, row, 1 );
lin = new QFrame( frame ); lin->setFrameStyle( QFrame::VLine | QFrame::Sunken );
- frameLayout->addWidget( lin, 2, 4, row, 1 );
+ frameLayout->addWidget( lin, 2, 5, row, 1 );
lin = new QFrame( frame ); lin->setFrameStyle( QFrame::VLine | QFrame::Sunken );
- frameLayout->addWidget( lin, 2, 6, row, 1 );
+ frameLayout->addWidget( lin, 2, 7, row, 1 );
//frameLayout->setRowStretch( row+1, 5 );
myView->setWidget( frame );
Gets curves info ( indexes of row data in the table for horizontal and verical axes )
*/
void VisuGUI_SetupPlot2dDlg::getCurvesSource( int& horIndex, QList<int>& verIndexes,
- QList<int>& zIndices )
+ QList<int>& ver2Indexes, QList<int>& zIndices )
{
/* collecting horizontal and vertical axis items */
horIndex = -1;
if ( myItems.at( i )->isHorizontalOn() ) {
horIndex = i;
}
- else if ( myItems.at( i )->isVerticalOn() ) {
- verIndexes.append( i );
+ else {
+ if ( myItems.at( i )->isVerticalOn() ) {
+ verIndexes.append( i );
+ }
+ else if ( myItems.at( i )->isVertical2On() ) {
+ ver2Indexes.append( i );
+ }
zIndices.append( myItems.at( i )->assigned() );
}
-
}
}
/*!
/* collecting horizontal and vertical axis items */
int horIndex;
int i, j;
- QList<int> verIndex, zIndices;
- getCurvesSource( horIndex, verIndex, zIndices );
- if ( horIndex < 0 || verIndex.isEmpty() ) /* no curves can be created */
+ QList<int> verIndex, ver2Index, zIndices;
+ getCurvesSource( horIndex, verIndex, ver2Index, zIndices );
+ if ( horIndex < 0 || verIndex.isEmpty() && ver2Index.isEmpty() ) /* no curves can be created */
return;
/* Try table of integer */
if ( tblIntAttr ) {
try {
int nbCols = tblIntAttr->GetNbColumns() ;
- vector<string> rowTitles = tblIntAttr->GetRowTitles();
- vector<string> rowUnits = tblIntAttr->GetRowUnits();
+ std::vector<std::string> rowTitles = tblIntAttr->GetRowTitles();
+ std::vector<std::string> rowUnits = tblIntAttr->GetRowUnits();
for ( i = 0; i < verIndex.count(); i++ ) {
SPlot2d_Curve* curve = new SPlot2d_Curve();
if ( tblRealAttr ) {
try {
int nbCols = tblRealAttr->GetNbColumns() ;
- vector<string> rowTitles = tblRealAttr->GetRowTitles();
- vector<string> rowUnits = tblRealAttr->GetRowUnits();
+ std::vector<std::string> rowTitles = tblRealAttr->GetRowTitles();
+ std::vector<std::string> rowUnits = tblRealAttr->GetRowUnits();
for ( i = 0; i < verIndex.count(); i++ ) {
SPlot2d_Curve* curve = new SPlot2d_Curve();
}
enableControls();
}
+/*!
+ Slot, called when any <V2> button is clicked
+*/
+void VisuGUI_SetupPlot2dDlg::onV2BtnToggled( bool on )
+{
+ VisuGUI_ItemContainer* item = ( VisuGUI_ItemContainer* )sender();
+ QList<VisuGUI_ItemContainer*> itemList;
+ //itemList.setAutoDelete( false );
+ item->myAssigned->setEnabled( on );
+ int i;
+ if ( on ) {
+ int totalOn = 0;
+ for ( i = 0; i < myItems.count(); i++ ) {
+ if ( myItems.at( i ) != item && !myItems.at( i )->isHorizontalOn() ) {
+ if ( myItems.at( i )->myUnitLab->text() == item->myUnitLab->text() ) {
+ if ( myItems.at( i )->isVertical2On() )
+ totalOn++;
+ else
+ itemList.append( myItems.at( i ) );
+ }
+ else {
+ myItems.at( i )->setVertical2On( false );
+ }
+ }
+ }
+ if ( totalOn == 0 && !itemList.isEmpty() &&
+ SUIT_MessageBox::information( this,
+ this->windowTitle(),
+ tr( "QUE_WANT_SAME_UNITS" ),
+ tr( "BUT_YES" ),
+ tr( "BUT_NO" ),
+ 1, 1 ) == 0 )
+ {
+ for ( i = 0; i < itemList.count(); i++ ) {
+ itemList.at( i )->blockSignals( true );
+ itemList.at( i )->setVertical2On( true );
+ itemList.at( i )->blockSignals( false );
+ }
+ }
+ }
+ enableControls();
+}
/*!
Slot, called when <Help> button is clicked
*/
}
}
for ( int i = 0; i < myItems.count(); i++ ) {
- if ( myItems.at( i )->isVerticalOn() )
+ bool isVOn = myItems.at( i )->isVerticalOn() || myItems.at( i )->isVertical2On();
+ if ( isVOn )
bVSet = true;
- myItems.at( i )->enableWidgets( bHSet && myItems.at( i )->isVerticalOn() );
+ myItems.at( i )->enableWidgets( bHSet && isVOn );
}
myOkBtn->setEnabled( bHSet && bVSet );
}
myVBtn->setCheckable( true );
myVBtn->setChecked( false );
+ myV2Btn = new QToolButton( parentWidget );
+ myV2Btn->setText( tr( "V2" ) );
+ myV2Btn->setCheckable( true );
+ myV2Btn->setChecked( false );
+
myTitleLab = new QLabel( parentWidget );
myUnitLab = new QLabel( parentWidget );
myUnitLab->setAlignment( Qt::AlignCenter);
myLineCombo->addItem( tr( "DAHSDOTDOT_LINE_LBL" ) );
myLineCombo->setCurrentIndex( 1 ); // SOLID by default
- myLineSpin = new QSpinBox( parentWidget );
+ myLineSpin = new SalomeApp_IntSpinBox( parentWidget );
+ myLineSpin->setAcceptNames( false );
myLineSpin->setMinimum( 0 );
myLineSpin->setMaximum( MAX_LINE_WIDTH );
myLineSpin->setSingleStep( 1 );
//connect( myColorBtn, SIGNAL( clicked() ), this, SLOT( onColorChanged() ) );
connect( myHBtn, SIGNAL( toggled( bool ) ), this, SLOT( onHVToggled( bool ) ) );
connect( myVBtn, SIGNAL( toggled( bool ) ), this, SLOT( onHVToggled( bool ) ) );
+ connect( myV2Btn, SIGNAL( toggled( bool ) ), this, SLOT( onHVToggled( bool ) ) );
setColor( QColor( 0, 0, 0 ) );
updateState();
}
return myHBtn->isChecked();
}
/*!
- Sets vertical button's state on
+ Sets first vertical button's state on
*/
void VisuGUI_ItemContainer::setVerticalOn( bool on )
{
myVBtn->setChecked( on );
}
/*!
- Gets vertical button's state
+ Gets first vertical button's state
*/
bool VisuGUI_ItemContainer::isVerticalOn() const
{
return myVBtn->isChecked();
}
+/*!
+ Sets second vertical button's state on
+*/
+void VisuGUI_ItemContainer::setVertical2On( bool on )
+{
+ myV2Btn->setChecked( on );
+}
+/*!
+ Gets second vertical button's state
+*/
+bool VisuGUI_ItemContainer::isVertical2On() const
+{
+ return myV2Btn->isChecked();
+}
/*!
Sets item AutoAssign flag state
*/
if ( myVBtn->isChecked() ) {
// blockSignals( true );
myVBtn->setChecked( false );
+// blockSignals( false );
+ }
+ else if ( myV2Btn->isChecked() ) {
+// blockSignals( true );
+ myV2Btn->setChecked( false );
// blockSignals( false );
}
}
emit horToggled( on );
}
- else {
+ else if ( snd == myVBtn ) {
if ( on ) {
if ( myHBtn->isChecked() ) {
// blockSignals( true );
myHBtn->setChecked( false );
+// blockSignals( false );
+ }
+ else if ( myV2Btn->isChecked() ) {
+// blockSignals( true );
+ myV2Btn->setChecked( false );
// blockSignals( false );
}
}
emit verToggled( on );
}
+ else {
+ if ( on ) {
+ if ( myHBtn->isChecked() ) {
+// blockSignals( true );
+ myHBtn->setChecked( false );
+// blockSignals( false );
+ }
+ else if ( myVBtn->isChecked() ) {
+// blockSignals( true );
+ myVBtn->setChecked( false );
+// blockSignals( false );
+ }
+ }
+ emit ver2Toggled( on );
+ }
}
/*!
*/
int VisuGUI_ItemContainer::assigned() const
{
- if( isVerticalOn() )
+ if( isVerticalOn() || isVertical2On() )
return myAssigned->currentIndex()-1;
else
return -1;
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : VisuGUI_SetupPlot2dDlg.h
// Author : Vadim SANDLER
// Module : SALOME
class QLabel;
class QCheckBox;
class QComboBox;
-class QSpinBox;
+class SalomeApp_IntSpinBox;
class QToolButton;
class VisuGUI_ItemContainer;
class QtxColorButton;
~VisuGUI_SetupPlot2dDlg();
void getCurves( QList<Plot2d_Curve*>& container );
- void getCurvesSource( int& horIndex, QList<int>& verIndexes, QList<int>& zIndexes );
+ void getCurvesSource( int& horIndex, QList<int>& verIndexes, QList<int>& ver2Indexes, QList<int>& zIndexes );
bool getCurveAttributes( const int vIndex, bool& isAuto, int& marker, int& line, int& lineWidth, QColor& color);
private:
private slots:
void onHBtnToggled( bool );
void onVBtnToggled( bool );
+ void onV2BtnToggled( bool );
void onHelp();
void enableControls();
bool isHorizontalOn() const;
void setVerticalOn( bool on );
bool isVerticalOn() const;
+ void setVertical2On( bool on );
+ bool isVertical2On() const;
bool isAutoAssign() const;
void setAutoAssign( bool on );
void setLine( const int line, const int width );
void autoClicked();
void horToggled( bool );
void verToggled( bool );
+ void ver2Toggled( bool );
public slots:
void onAutoChanged();
bool myEnabled;
QToolButton* myHBtn;
QToolButton* myVBtn;
+ QToolButton* myV2Btn;
QLabel* myTitleLab;
QLabel* myUnitLab;
QCheckBox* myAutoCheck;
QComboBox* myLineCombo;
- QSpinBox* myLineSpin;
+ SalomeApp_IntSpinBox* myLineSpin;
QComboBox* myMarkerCombo, *myAssigned;
QtxColorButton* myColorBtn;
};
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : VisuGUI_ShrinkFactorDlg.cxx
// Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com)
//
-
#include "VisuGUI_ShrinkFactorDlg.h"
#include "VisuGUI.h"
#include "SALOME_ListIteratorOfListIO.hxx"
#include "SALOME_InteractiveObject.hxx"
+#include <SalomeApp_IntSpinBox.h>
+
#include "LightApp_Study.h"
#include "LightApp_SelectionMgr.h"
#include "LightApp_Application.h"
// QT Includes
#include <QLabel>
#include <QPushButton>
-#include <QSpinBox>
#include <QLayout>
#include <QGroupBox>
#include <QKeyEvent>
GroupC1Layout->setMargin( 11 );
ValueLab = new QLabel( tr( "SHRINKFACTOR_VALUE" ), GroupC1 );
- ValueSpin = new QSpinBox( GroupC1 );
+ ValueSpin = new SalomeApp_IntSpinBox( GroupC1 );
+ ValueSpin->setAcceptNames( false );
ValueSpin->setRange( 20, 100 );
ValueSpin->setSingleStep( 10 );
ValueSpin->setMinimumWidth( 70 );
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : VisuGUI_ShrinkFactorDlg.h
// Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com)
//
-
#ifndef VISUGUI_SHRINKFACTORDLG_H
#define VISUGUI_SHRINKFACTORDLG_H
class QLabel;
class QPushButton;
-class QSpinBox;
+class SalomeApp_IntSpinBox;
class QGroupBox;
class LightApp_SelectionMgr;
class SalomeApp_Module;
QPushButton* buttonOk;
QPushButton* buttonHelp;
QLabel* ValueLab;
- QSpinBox* ValueSpin;
+ SalomeApp_IntSpinBox* ValueSpin;
public slots:
void help();
--- /dev/null
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+// VISU VISUGUI : GUI of VISU component
+// File : VisuGUI_SizeBox.cxx
+// Author : Oleg UVAROV
+// Module : VISU
+//
+#include "VisuGUI_SizeBox.h"
+
+#include "VisuGUI_Tools.h"
+
+#include <SUIT_ResourceMgr.h>
+#include <SUIT_Session.h>
+
+#include <SalomeApp_DoubleSpinBox.h>
+#include <SalomeApp_IntSpinBox.h>
+#include <QtxColorButton.h>
+
+#include <QLayout>
+#include <QLabel>
+#include <QLineEdit>
+#include <QCheckBox>
+#include <QGroupBox>
+#include <QButtonGroup>
+#include <QRadioButton>
+#include <QPushButton>
+#include <QColorDialog>
+
+using namespace std;
+
+VisuGUI_SizeBox::VisuGUI_SizeBox( QWidget* parent ) :
+ QWidget( parent )
+{
+ QVBoxLayout* aMainLayout = new QVBoxLayout( this );
+ aMainLayout->setSpacing( 0 );
+ aMainLayout->setMargin( 0 );
+
+ // Size
+ QGroupBox* SizeGroup = new QGroupBox ( tr( "SIZE_TITLE" ), this );
+ //SizeGroup->setColumnLayout(0, Qt::Vertical );
+ //SizeGroup->layout()->setSpacing( 0 );
+ //SizeGroup->layout()->setMargin( 0 );
+
+ QGridLayout* SizeGroupLayout = new QGridLayout (SizeGroup);
+ SizeGroupLayout->setAlignment(Qt::AlignTop | Qt::AlignCenter);
+ SizeGroupLayout->setSpacing(6);
+ SizeGroupLayout->setMargin(11);
+
+ // Outside Size
+ myOutsideSizeLabel = new QLabel( tr( "OUTSIDE_SIZE" ), SizeGroup );
+ myOutsideSizeSpinBox = new SalomeApp_IntSpinBox( SizeGroup );
+ VISU::initSpinBox( myOutsideSizeSpinBox, 0, 100, 1 );
+ myOutsideSizeSpinBox->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
+
+ SizeGroupLayout->addWidget( myOutsideSizeLabel, 0, 0 );
+ SizeGroupLayout->addWidget( myOutsideSizeSpinBox, 0, 1 );
+
+ // Geometry Size
+ myGeomSizeLabel = new QLabel( tr( "GEOM_SIZE" ), SizeGroup );
+ myGeomSizeSpinBox = new SalomeApp_IntSpinBox( SizeGroup );
+ VISU::initSpinBox( myGeomSizeSpinBox, 0, 100, 1 );
+ myGeomSizeSpinBox->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
+
+ SizeGroupLayout->addWidget( myGeomSizeLabel, 0, 0 );
+ SizeGroupLayout->addWidget( myGeomSizeSpinBox, 0, 1 );
+
+ // Min Size
+ myMinSizeLabel = new QLabel( tr( "MIN_SIZE" ), SizeGroup );
+ myMinSizeSpinBox = new SalomeApp_IntSpinBox( SizeGroup );
+ VISU::initSpinBox( myMinSizeSpinBox, 0, 100, 1 );
+ myMinSizeSpinBox->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
+
+ SizeGroupLayout->addWidget( myMinSizeLabel, 1, 0 );
+ SizeGroupLayout->addWidget( myMinSizeSpinBox, 1, 1 );
+
+ // Max Size
+ myMaxSizeLabel = new QLabel( tr( "MAX_SIZE" ), SizeGroup );
+ myMaxSizeSpinBox = new SalomeApp_IntSpinBox( SizeGroup );
+ VISU::initSpinBox( myMaxSizeSpinBox, 0, 100, 1 );
+ myMaxSizeSpinBox->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
+
+ SizeGroupLayout->addWidget( myMaxSizeLabel, 1, 2 );
+ SizeGroupLayout->addWidget( myMaxSizeSpinBox, 1, 3 );
+
+ // Magnification
+ myMagnificationLabel = new QLabel( tr( "MAGNIFICATION" ), SizeGroup );
+ myMagnificationSpinBox = new SalomeApp_IntSpinBox( SizeGroup );
+ VISU::initSpinBox( myMagnificationSpinBox, 1, 10000, 10 );
+ myMagnificationSpinBox->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
+
+ SizeGroupLayout->addWidget( myMagnificationLabel, 2, 0 );
+ SizeGroupLayout->addWidget( myMagnificationSpinBox, 2, 1 );
+
+ // Increment
+ myIncrementLabel = new QLabel( tr( "INCREMENT" ), SizeGroup );
+ myIncrementSpinBox = new SalomeApp_DoubleSpinBox( SizeGroup );
+ VISU::initSpinBox( myIncrementSpinBox, 0.01, 10, 0.1, "parametric_precision" );
+ myIncrementSpinBox->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
+
+ SizeGroupLayout->addWidget( myIncrementLabel, 2, 2 );
+ SizeGroupLayout->addWidget( myIncrementSpinBox, 2, 3 );
+
+ aMainLayout->addWidget( SizeGroup );
+
+ // Color
+ myColorGroup = new QGroupBox ( tr( "COLOR_TITLE" ), this );
+ //myColorGroup->setColumnLayout(0, Qt::Vertical );
+ //myColorGroup->layout()->setSpacing( 0 );
+ //myColorGroup->layout()->setMargin( 0 );
+
+ QGridLayout* ColorGroupLayout = new QGridLayout ( myColorGroup );
+ ColorGroupLayout->setAlignment(Qt::AlignTop | Qt::AlignLeft);
+ ColorGroupLayout->setSpacing(6);
+ ColorGroupLayout->setMargin(11);
+
+ myUniformCheckBox = new QCheckBox( tr( "UNIFORM_COLOR" ), myColorGroup );
+
+ myColorLabel = new QLabel( tr( "COLOR" ), myColorGroup );
+ myColorButton = new QtxColorButton( myColorGroup );
+
+ ColorGroupLayout->addWidget( myUniformCheckBox, 0, 0 );
+ ColorGroupLayout->addWidget( myColorLabel, 0, 1 );
+ ColorGroupLayout->addWidget( myColorButton, 0, 2 );
+
+ aMainLayout->addWidget( myColorGroup );
+
+ connect( myUniformCheckBox, SIGNAL( toggled( bool ) ), myColorButton, SLOT( setEnabled( bool ) ) );
+ //connect( myColorButton, SIGNAL( clicked() ), this, SLOT( onColorButtonPressed() ) );
+
+ setType( VisuGUI_SizeBox::Results );
+}
+
+void VisuGUI_SizeBox::onToggleResults()
+{
+ myType = VisuGUI_SizeBox::Results;
+
+ myOutsideSizeLabel->hide();
+ myOutsideSizeSpinBox->hide();
+
+ myGeomSizeLabel->hide();
+ myGeomSizeSpinBox->hide();
+
+ myMinSizeLabel->show();
+ myMinSizeSpinBox->show();
+
+ myMaxSizeLabel->show();
+ myMaxSizeSpinBox->show();
+
+ myMagnificationLabel->show();
+ myMagnificationSpinBox->show();
+
+ myIncrementLabel->show();
+ myIncrementSpinBox->show();
+
+ myColorGroup->hide();
+
+ myUniformCheckBox->hide();
+}
+
+void VisuGUI_SizeBox::onToggleGeometry()
+{
+ myType = VisuGUI_SizeBox::Geometry;
+
+ myOutsideSizeLabel->hide();
+ myOutsideSizeSpinBox->hide();
+
+ myGeomSizeLabel->show();
+ myGeomSizeSpinBox->show();
+
+ myMinSizeLabel->hide();
+ myMinSizeSpinBox->hide();
+
+ myMaxSizeLabel->hide();
+ myMaxSizeSpinBox->hide();
+
+ myMagnificationLabel->show();
+ myMagnificationSpinBox->show();
+
+ myIncrementLabel->show();
+ myIncrementSpinBox->show();
+
+ myColorGroup->show();
+
+ myUniformCheckBox->hide();
+}
+
+void VisuGUI_SizeBox::onToggleInside()
+{
+ myType = VisuGUI_SizeBox::Inside;
+
+ myOutsideSizeLabel->hide();
+ myOutsideSizeSpinBox->hide();
+
+ myGeomSizeLabel->hide();
+ myGeomSizeSpinBox->hide();
+
+ myMinSizeLabel->show();
+ myMinSizeSpinBox->show();
+
+ myMaxSizeLabel->show();
+ myMaxSizeSpinBox->show();
+
+ myMagnificationLabel->hide();
+ myMagnificationSpinBox->hide();
+
+ myIncrementLabel->hide();
+ myIncrementSpinBox->hide();
+
+ myColorGroup->hide();
+
+ myUniformCheckBox->hide();
+}
+
+void VisuGUI_SizeBox::onToggleOutside()
+{
+ myType = VisuGUI_SizeBox::Outside;
+
+ myOutsideSizeLabel->show();
+ myOutsideSizeSpinBox->show();
+
+ myGeomSizeLabel->hide();
+ myGeomSizeSpinBox->hide();
+
+ myMinSizeLabel->hide();
+ myMinSizeSpinBox->hide();
+
+ myMaxSizeLabel->hide();
+ myMaxSizeSpinBox->hide();
+
+ myMagnificationLabel->hide();
+ myMagnificationSpinBox->hide();
+
+ myIncrementLabel->hide();
+ myIncrementSpinBox->hide();
+
+ myColorGroup->show();
+
+ myUniformCheckBox->show();
+}
+
+void VisuGUI_SizeBox::setType( int theType )
+{
+ myType = theType;
+
+ switch( myType )
+ {
+ case VisuGUI_SizeBox::Results : onToggleResults(); break;
+ case VisuGUI_SizeBox::Geometry : onToggleGeometry(); break;
+ case VisuGUI_SizeBox::Inside : onToggleInside(); break;
+ case VisuGUI_SizeBox::Outside : onToggleOutside(); break;
+ default : break;
+ }
+}
+
+float VisuGUI_SizeBox::getOutsideSize() const
+{
+ return myOutsideSizeSpinBox->value() / 100.0;
+}
+
+void VisuGUI_SizeBox::setOutsideSize( float theOutsideSize )
+{
+ myOutsideSizeSpinBox->setValue( ( int )( theOutsideSize * 100 ) );
+}
+
+float VisuGUI_SizeBox::getGeomSize() const
+{
+ return myGeomSizeSpinBox->value() / 100.0;
+}
+
+void VisuGUI_SizeBox::setGeomSize( float theGeomSize )
+{
+ myGeomSizeSpinBox->setValue( ( int )( theGeomSize * 100 ) );
+}
+
+float VisuGUI_SizeBox::getMinSize() const
+{
+ return myMinSizeSpinBox->value() / 100.0;
+}
+
+void VisuGUI_SizeBox::setMinSize( float theMinSize )
+{
+ myMinSizeSpinBox->setValue( ( int )( theMinSize * 100 ) );
+}
+
+float VisuGUI_SizeBox::getMaxSize() const
+{
+ return myMaxSizeSpinBox->value() / 100.0;
+}
+
+void VisuGUI_SizeBox::setMaxSize( float theMaxSize )
+{
+ myMaxSizeSpinBox->setValue( ( int )( theMaxSize * 100 ) );
+}
+
+float VisuGUI_SizeBox::getMagnification() const
+{
+ return myMagnificationSpinBox->value() / 100.0;
+}
+
+void VisuGUI_SizeBox::setMagnification( float theMagnification )
+{
+ myMagnificationSpinBox->setValue( ( int )( theMagnification * 100 ) );
+}
+
+float VisuGUI_SizeBox::getIncrement() const
+{
+ return myIncrementSpinBox->value();
+}
+
+void VisuGUI_SizeBox::setIncrement( float theIncrement )
+{
+ myIncrementSpinBox->setValue( theIncrement );
+}
+
+bool VisuGUI_SizeBox::getUniform() const
+{
+ return myUniformCheckBox->isChecked();
+}
+
+void VisuGUI_SizeBox::setUniform( bool theUniform )
+{
+ myUniformCheckBox->setChecked( theUniform );
+ myColorButton->setEnabled( theUniform );
+}
+
+QColor VisuGUI_SizeBox::getColor() const
+{
+ return myColorButton->color();//palette().color( myColorButton->backgroundRole() );
+ //return myColorButton->paletteBackgroundColor();
+}
+
+void VisuGUI_SizeBox::setColor( const QColor& theColor )
+{
+ if ( theColor.isValid() )
+ {
+ //QPalette aPalette( myColorButton->palette() );
+ //aPalette.setColor( myColorButton->backgroundRole(), theColor );
+ myColorButton->setColor( theColor );
+ }
+ //myColorButton->setPaletteBackgroundColor( theColor );
+}
+
+void VisuGUI_SizeBox::enableSizeControls( bool enabled )
+{
+ myMagnificationSpinBox->setEnabled( enabled );
+ myMaxSizeSpinBox->setEnabled( enabled );
+ myMinSizeSpinBox->setEnabled( enabled );
+ myIncrementSpinBox->setEnabled( enabled );
+ myGeomSizeSpinBox->setEnabled( enabled );
+}
+
+/*void VisuGUI_SizeBox::onColorButtonPressed()
+{
+ QPalette aPalette( myColorButton->palette() );
+ QColor aColor = QColorDialog::
+ getColor( aPalette.color(myColorButton->backgroundRole() ), this );
+
+ if( aColor.isValid() )
+ {
+ aPalette.setColor( myColorButton->backgroundRole(), aColor );
+ myColorButton->setPalette( aPalette );
+ }
+}*/
--- /dev/null
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+// VISU VISUGUI : GUI of VISU component
+// File : VisuGUI_SizeBox.h
+// Author : Oleg UVAROV
+// Module : VISU
+//
+#ifndef VISUGUI_SIZEBOX_H
+#define VISUGUI_SIZEBOX_H
+
+#include <QWidget>
+
+class QLabel;
+class QLineEdit;
+class QPushButton;
+class QCheckBox;
+class QGroupBox;
+
+class SalomeApp_DoubleSpinBox;
+class SalomeApp_IntSpinBox;
+class QtxColorButton;
+
+class VisuGUI_SizeBox : public QWidget
+{
+ Q_OBJECT
+
+public:
+ enum { Results = 0, Geometry, Inside, Outside };
+
+public:
+ VisuGUI_SizeBox( QWidget* );
+ ~VisuGUI_SizeBox() {}
+
+public:
+ int getType() const { return myType; }
+ void setType( int );
+
+ float getOutsideSize() const;
+ void setOutsideSize( float );
+
+ float getGeomSize() const;
+ void setGeomSize( float );
+
+ float getMinSize() const;
+ void setMinSize( float );
+
+ float getMaxSize() const;
+ void setMaxSize( float );
+
+ float getMagnification() const;
+ void setMagnification( float );
+
+ float getIncrement() const;
+ void setIncrement( float );
+
+ bool getUniform() const;
+ void setUniform( bool );
+
+ QColor getColor() const;
+ void setColor( const QColor& );
+
+ void enableSizeControls( bool enabled );
+
+protected slots:
+ void onToggleResults();
+ void onToggleGeometry();
+ void onToggleInside();
+ void onToggleOutside();
+
+ //void onColorButtonPressed();
+
+private:
+ int myType;
+
+ QLabel* myOutsideSizeLabel;
+ SalomeApp_IntSpinBox* myOutsideSizeSpinBox;
+
+ QLabel* myGeomSizeLabel;
+ SalomeApp_IntSpinBox* myGeomSizeSpinBox;
+
+ QLabel* myMinSizeLabel;
+ SalomeApp_IntSpinBox* myMinSizeSpinBox;
+
+ QLabel* myMaxSizeLabel;
+ SalomeApp_IntSpinBox* myMaxSizeSpinBox;
+
+ QLabel* myMagnificationLabel;
+ SalomeApp_IntSpinBox* myMagnificationSpinBox;
+
+ QLabel* myIncrementLabel;
+ SalomeApp_DoubleSpinBox* myIncrementSpinBox;
+
+ QCheckBox* myUniformCheckBox;
+
+ QGroupBox* myColorGroup;
+ QLabel* myColorLabel;
+ QtxColorButton* myColorButton;
+};
+
+
+
+#endif
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU VISUGUI : GUI of VISU component
// File : VisuGUI_Slider.cxx
// Author : Oleg UVAROV
// Module : VISU
//
#include "VisuGUI_Slider.h"
+#include "VisuGUI_Tools.h"
#include "SUIT_ResourceMgr.h"
#include "SUIT_Session.h"
#include "SalomeApp_Application.h"
#include "SalomeApp_Study.h"
+#include <SalomeApp_DoubleSpinBox.h>
#include "LightApp_SelectionMgr.h"
#include "SVTK_Functor.h"
#include "QtxDockWidget.h"
-#include "QtxDoubleSpinBox.h"
#include <vtkActorCollection.h>
#include <vtkRenderer.h>
myLimitedMemoryButton->setChecked( true );
aHBoxLayout->addWidget( myLimitedMemoryButton );
- myLimitedMemory = new QtxDoubleSpinBox( aParent );
- myLimitedMemory->setMaximum( 10000 );
+ myLimitedMemory = new SalomeApp_DoubleSpinBox( aParent );
+ VISU::initSpinBox( myLimitedMemory, 0., 10000., 1., "memory_precision" );
myLimitedMemory->setValue( 512 );
aHBoxLayout->addWidget( myLimitedMemory );
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU VISUGUI : GUI of VISU component
// File : VisuGUI_Slider.h
// Author : Oleg UVAROV
class QLineEdit;
class QToolButton;
class QSlider;
-class QSpinBox;
class QCheckBox;
class QRadioButton;
class QMainWindow;
class QTimer;
class QAction;
-class QtxDoubleSpinBox;
+class SalomeApp_DoubleSpinBox;
class LightApp_SelectionMgr;
class VisuGUI;
QRadioButton* myMinimalMemoryButton;
QRadioButton* myLimitedMemoryButton;
- QtxDoubleSpinBox* myLimitedMemory;
+ SalomeApp_DoubleSpinBox* myLimitedMemory;
QLineEdit* myUsedMemory;
QLineEdit* myFreeMemory;
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : VisuGUI_StreamLinesDlg.cxx
// Author : Vitaly SMETANNIKOV
// Module : VISU
#include "VISU_StreamLinesPL.hxx"
#include "VISU_Actor.h"
+#include <SalomeApp_DoubleSpinBox.h>
#include "SalomeApp_Application.h"
#include "LightApp_Application.h"
#include "LightApp_SelectionMgr.h"
#include <SALOMEDSClient_SObject.hxx>
-#include <QtxDoubleSpinBox.h>
#include <QtxColorButton.h>
-#include <limits.h>
+#include <limits>
#include <QLayout>
#include <QLabel>
#include <QFrame>
-using namespace std;
-
VisuGUI_StreamLinesDlg::VisuGUI_StreamLinesDlg (SalomeApp_Module* theModule)
: VisuGUI_ScalarBarBaseDlg(theModule),
myVisuGUI(theModule)
QLabel* aPercentLbl = new QLabel (tr("LBL_USED_POINTS"), aSourceBox);
aSrcLayout->addWidget(aPercentLbl, 2, 0);
- myPntPercent = new QtxDoubleSpinBox( aSourceBox );
- VISU::initSpinBox(myPntPercent, 0, 1);
+ myPntPercent = new SalomeApp_DoubleSpinBox( aSourceBox );
+ VISU::initSpinBox( myPntPercent, 0., 1., .1, "parametric_precision" );
aSrcLayout->addWidget(myPntPercent, 2, 1);
TopLayout->addWidget(aSourceBox, 0, 0, 1, 2);
QLabel* aStepLenLbl = new QLabel (tr("LBL_STEP_LENGTH"), aTopBox);
TopLayout->addWidget(aStepLenLbl, 1, 0);
- myStepLen = new QtxDoubleSpinBox( aTopBox );
- VISU::initSpinBox(myStepLen, DBL_MIN, DBL_MAX);
+ myStepLen = new SalomeApp_DoubleSpinBox( aTopBox );
+ VISU::initSpinBox( myStepLen,
+ std::numeric_limits<double>::min(),
+ std::numeric_limits<double>::max(),
+ .1,
+ "parametrc_precision" );
myStepLen->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
TopLayout->addWidget(myStepLen, 1, 1);
connect(myStepLen, SIGNAL(valueChanged(double)), this, SLOT(StepLengthChanged(double)));
QLabel* aIntegStepLenLbl = new QLabel (tr("LBL_INTEGRATION_STEP"), aTopBox);
TopLayout->addWidget(aIntegStepLenLbl, 2, 0);
- myIntegStepLen = new QtxDoubleSpinBox( aTopBox );
- VISU::initSpinBox(myIntegStepLen, DBL_MIN, DBL_MAX);
+ myIntegStepLen = new SalomeApp_DoubleSpinBox( aTopBox );
+ VISU::initSpinBox( myIntegStepLen,
+ std::numeric_limits<double>::min(),
+ std::numeric_limits<double>::max(),
+ .1,
+ "parametrc_precision" );
myIntegStepLen->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
TopLayout->addWidget(myIntegStepLen, 2, 1);
connect(myIntegStepLen, SIGNAL(valueChanged(double)), this, SLOT(IntegrationStepChanged(double)));
QLabel* aPropagationLbl = new QLabel (tr("LBL_PROPAGATION_TIME"), aTopBox);
TopLayout->addWidget(aPropagationLbl, 3, 0);
- myPropTime = new QtxDoubleSpinBox( aTopBox );
- VISU::initSpinBox(myPropTime, DBL_MIN, DBL_MAX);
+ myPropTime = new SalomeApp_DoubleSpinBox( aTopBox );
+ VISU::initSpinBox( myPropTime,
+ std::numeric_limits<double>::min(),
+ std::numeric_limits<double>::max(),
+ .1,
+ "parametrc_precision" );
myPropTime->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
TopLayout->addWidget(myPropTime, 3, 1);
connect(myPropTime, SIGNAL(valueChanged(double)), this, SLOT(PropagationTimeChanged(double)));
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : VisuGUI_StreamLinesDlg.h
// Author : Vitaly SMETANNIKOV
// Module : VISU
class SalomeApp_Module;
class VisuGUI_InputPane;
-class QtxDoubleSpinBox;
+class SalomeApp_DoubleSpinBox;
class QtxColorButton;
namespace VISU
private:
VISU::Mesh_ptr createMesh(VISU::VISUType theType, QString theName);
- QtxDoubleSpinBox* myStepLen;
- QtxDoubleSpinBox* myIntegStepLen;
- QtxDoubleSpinBox* myPropTime;
+ SalomeApp_DoubleSpinBox* myStepLen;
+ SalomeApp_DoubleSpinBox* myIntegStepLen;
+ SalomeApp_DoubleSpinBox* myPropTime;
QComboBox* myDirCombo;
QCheckBox* myUseScalar;
QtxColorButton* SelColor;
//QCheckBox* myUseSrcChk;
QComboBox* myUseSrcCombo;
- QtxDoubleSpinBox* myPntPercent;
+ SalomeApp_DoubleSpinBox* myPntPercent;
QComboBox* mySrcCombo;
QTabWidget* myTabBox;
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU VISUGUI : GUI of VISU component
// File : VisuGUI_Slider.cxx
// Author : Oleg UVAROV
// Module : VISU
//
#include "VisuGUI_Sweep.h"
+#include "VisuGUI_Tools.h"
#include "SUIT_ResourceMgr.h"
#include "LightApp_SelectionMgr.h"
+#include <SalomeApp_IntSpinBox.h>
+#include <SalomeApp_DoubleSpinBox.h>
+
#include "VISU_Actor.h"
#include "VisuGUI.h"
#include "VISU_Actor.h"
#include "QtxDockWidget.h"
-#include "QtxIntSpinBox.h"
-#include "QtxDoubleSpinBox.h"
#include <QMainWindow>
#include <QComboBox>
aNumberOfStepsAnnotation->setText( tr( "NUMBER_OF_STEPS" ) );
aGridLayout->addWidget( aNumberOfStepsAnnotation, 1, 0, 1, 1 );
- myNumberOfSteps = new QtxIntSpinBox( aPropertiesTab );
+ myNumberOfSteps = new SalomeApp_IntSpinBox( aPropertiesTab );
+ myNumberOfSteps->setAcceptNames( false );
connect( myNumberOfSteps, SIGNAL( valueChanged( int ) ), SLOT( onNumberOfStepsChanged( int ) ) );
myNumberOfSteps->setValue( aResourceMgr->integerValue( "VISU", "sweeping_number_steps", 40 ) );
aGridLayout->addWidget( myNumberOfSteps, 1, 1, 1, 1 );
aStepDelayAnnotation->setText( tr( "DELAY_BETWEEN_STEPS" ) );
aGridLayout->addWidget( aStepDelayAnnotation, 2, 0, 1, 1 );
- myStepDelay = new QtxDoubleSpinBox( aPropertiesTab );
+ myStepDelay = new SalomeApp_DoubleSpinBox( aPropertiesTab );
+ VISU::initSpinBox( myStepDelay, 0., 99.99, .1, "parametric_precision" );
myStepDelay->setValue( aResourceMgr->doubleValue("VISU", "sweeping_time_step", 0.1) );
aGridLayout->addWidget( myStepDelay, 2, 1, 1, 1 );
}
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU VISUGUI : GUI of VISU component
// File : VisuGUI_Sweep.h
// Author : Oleg UVAROV
class QComboBox;
class QToolButton;
class QSlider;
-class QSpinBox;
class QCheckBox;
class QMainWindow;
class QTimer;
class QAction;
-class QtxIntSpinBox;
-class QtxDoubleSpinBox;
+class SalomeApp_IntSpinBox;
+class SalomeApp_DoubleSpinBox;
class LightApp_SelectionMgr;
class SVTK_ViewWindow;
QCheckBox* myIsCycled;
QComboBox* mySweepMode;
- QtxIntSpinBox* myNumberOfSteps;
+ SalomeApp_IntSpinBox* myNumberOfSteps;
QComboBox* myIntervals;
- QtxDoubleSpinBox* myStepDelay;
+ SalomeApp_DoubleSpinBox* myStepDelay;
QTimer* myTimer;
QPixmap myPlayPixmap;
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU VISUGUI : GUI of VISU component
// File : VisuGUI_Table3dDlg.cxx
// Author : Laurent CORNABE & Hubert ROLLAND
#include <SUIT_MessageBox.h>
#include <SUIT_ResourceMgr.h>
#include <LightApp_Application.h>
+#include <SalomeApp_IntSpinBox.h>
+#include <SalomeApp_DoubleSpinBox.h>
#include <SVTK_FontWidget.h>
-#include <QtxDoubleSpinBox.h>
#include <QGridLayout>
#include <QHBoxLayout>
#include <QVBoxLayout>
#include <QTabWidget>
#include <QRadioButton>
-#include <QSpinBox>
#include <QCheckBox>
#include <QLabel>
#include <QPushButton>
// scale
QLabel* scaleLabel = new QLabel( tr( "SCALE" ), this );
- ScaleSpn = new QtxDoubleSpinBox( -1.e6, 1.e6, 0.1, this );
+ ScaleSpn = new SalomeApp_DoubleSpinBox( this );
+ VISU::initSpinBox( ScaleSpn, -1.e6, 1.e6, 0.1, "parametric_precision" );
// Presentation type
GBPrsTypeBox = new QGroupBox( tr( "PRESENTATION_TYPE" ), this );
GBPrsType = new QButtonGroup( GBPrsTypeBox );
// nb Contours
QLabel* nbContLabel = new QLabel( tr( "NUMBER_CONTOURS" ), this );
- NbContoursSpn = new QSpinBox( this );
+ NbContoursSpn = new SalomeApp_IntSpinBox( this );
NbContoursSpn->setMinimum( 1 );
NbContoursSpn->setMaximum( 999 );
NbContoursSpn->setSingleStep( 1 );
ColLabGroupLayout->setMargin( 11 );
QLabel* ColorLabel = new QLabel( tr( "LBL_NB_COLORS" ), ColLabGroup );
- ColorSpin = new QSpinBox( ColLabGroup );
+ ColorSpin = new SalomeApp_IntSpinBox( ColLabGroup );
ColorSpin->setMinimum( 2 );
ColorSpin->setMaximum( 256 );
ColorSpin->setSingleStep( 1 );
ColorSpin->setValue( 64 );
QLabel* LabelLabel = new QLabel( tr( "LBL_NB_LABELS" ), ColLabGroup );
- LabelSpin = new QSpinBox( ColLabGroup );
+ LabelSpin = new SalomeApp_IntSpinBox( ColLabGroup );
LabelSpin->setMinimum( 2 );
LabelSpin->setMaximum( 65 );
LabelSpin->setSingleStep( 1 );
OriginGroupLayout->setMargin( 11 );
QLabel* XLabel = new QLabel( tr( "LBL_X" ), OriginGroup );
- XSpin = new QtxDoubleSpinBox( 0.0, 1.0, 0.1, OriginGroup );
+ XSpin = new SalomeApp_DoubleSpinBox( OriginGroup );
+ VISU::initSpinBox( XSpin, 0.0, 1.0, 0.1, "parametric_precision" );
XSpin->setMinimumWidth( 70 );
XSpin->setValue( 0.01 );
QLabel* YLabel = new QLabel( tr( "LBL_Y" ), OriginGroup );
- YSpin = new QtxDoubleSpinBox( 0.0, 1.0, 0.1, OriginGroup );
+ YSpin = new SalomeApp_DoubleSpinBox( OriginGroup );
+ VISU::initSpinBox( YSpin, 0.0, 1.0, 0.1, "parametric_precision" );
YSpin->setMinimumWidth( 70 );
YSpin->setValue( 0.1 );
DimGroupLayout->setMargin( 11 );
QLabel* WidthLabel = new QLabel( tr( "LBL_WIDTH" ), DimGroup );
- WidthSpin = new QtxDoubleSpinBox( 0.0, 1.0, 0.1, DimGroup );
+ WidthSpin = new SalomeApp_DoubleSpinBox( DimGroup );
+ VISU::initSpinBox( WidthSpin, 0.0, 1.0, 0.1, "parametric_precision" );
WidthSpin->setMinimumWidth( 70 );
WidthSpin->setValue( 0.1 );
QLabel* HeightLabel = new QLabel( tr( "LBL_HEIGHT" ), DimGroup );
- HeightSpin = new QtxDoubleSpinBox( 0.0, 1.0, 0.1, DimGroup );
+ HeightSpin = new SalomeApp_DoubleSpinBox( DimGroup );
+ VISU::initSpinBox( HeightSpin, 0.0, 1.0, 0.1, "parametric_precision" );
HeightSpin->setMinimumWidth( 70 );
HeightSpin->setValue( 0.8 );
*/
void VisuGUI_TableScalarBarPane::XYChanged( double )
{
- QtxDoubleSpinBox* snd = (QtxDoubleSpinBox*)sender();
+ SalomeApp_DoubleSpinBox* snd = (SalomeApp_DoubleSpinBox*)sender();
if ( snd == XSpin ) {
WidthSpin->setMaximum( 1.0 - XSpin->value() );
}
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU VISUGUI : GUI of VISU component
// File : VisuGUI_Table3dDlg.h
// Author : Laurent CORNABE & Hubert ROLLAND
class QLineEdit;
class QRadioButton;
class QPushButton;
-class QSpinBox;
-class QtxDoubleSpinBox;
+class SalomeApp_IntSpinBox;
+class SalomeApp_DoubleSpinBox;
class VisuGUI_TextPrefDlg;
class VisuGUI_BarPrefDlg;
class SVTK_ViewWindow;
SVTK_ViewWindow* myViewWindow;
VISU::PointMap3d_i* myPrs;
- QtxDoubleSpinBox* ScaleSpn;
+ SalomeApp_DoubleSpinBox* ScaleSpn;
QGroupBox* GBPrsTypeBox;
QButtonGroup* GBPrsType;
- QSpinBox* NbContoursSpn;
+ SalomeApp_IntSpinBox* NbContoursSpn;
};
class VisuGUI_TableScalarBarPane : public QWidget
QRadioButton* RBhori;
QRadioButton* RBvert;
- QtxDoubleSpinBox* XSpin;
- QtxDoubleSpinBox* YSpin;
+ SalomeApp_DoubleSpinBox* XSpin;
+ SalomeApp_DoubleSpinBox* YSpin;
- QtxDoubleSpinBox* WidthSpin;
- QtxDoubleSpinBox* HeightSpin;
+ SalomeApp_DoubleSpinBox* WidthSpin;
+ SalomeApp_DoubleSpinBox* HeightSpin;
- QSpinBox* ColorSpin;
- QSpinBox* LabelSpin;
+ SalomeApp_IntSpinBox* ColorSpin;
+ SalomeApp_IntSpinBox* LabelSpin;
QCheckBox* CBSave;
QCheckBox* CBLog;
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : VisuGUI_TimeAnimation.cxx
// Author : Vitaly SMETANNIKOV
// Module : VISU
#include "VISU_ScalarBarActor.hxx"
#include "VISU_Actor.h"
+#include <SalomeApp_DoubleSpinBox.h>
+#include <SalomeApp_IntSpinBox.h>
#include "SalomeApp_Study.h"
#include "LightApp_Application.h"
QHBoxLayout* aHLay = new QHBoxLayout( aDistPane );
aHLay->setSpacing(5);
aHLay->addWidget( new QLabel("Relative Distance", aDistPane) );
- myDistVal = new QtxDoubleSpinBox (-10,10, 0.5, aDistPane);
+ myDistVal = new SalomeApp_DoubleSpinBox( aDistPane );
+ VISU::initSpinBox( myDistVal, -10., 10., 0.5, "length_precision" );
myDistVal->setValue(1);
aHLay->addWidget( myDistVal );
aCoordLayout->setSpacing(5);
aCoordLayout->addWidget( new QLabel("X", aCoordPane), 0, 0 );
- myCoord[0] = new QtxDoubleSpinBox(aCoordPane);
- myCoord[0]->setRange(-MAXVAL, MAXVAL);
+ myCoord[0] = new SalomeApp_DoubleSpinBox(aCoordPane);
+ VISU::initSpinBox( myCoord[0], -MAXVAL, MAXVAL, 1., "length_precision" );
aCoordLayout->addWidget( myCoord[0], 0, 1 );
aCoordLayout->addWidget( new QLabel("Y", aCoordPane), 1, 0 );
- myCoord[1] = new QtxDoubleSpinBox(aCoordPane);
- myCoord[1]->setRange(-MAXVAL, MAXVAL);
+ myCoord[1] = new SalomeApp_DoubleSpinBox(aCoordPane);
+ VISU::initSpinBox( myCoord[1], -MAXVAL, MAXVAL, 1., "length_precision" );
aCoordLayout->addWidget( myCoord[1], 1, 1 );
aCoordLayout->addWidget( new QLabel("Z", aCoordPane), 2, 0 );
- myCoord[2] = new QtxDoubleSpinBox(aCoordPane);
- myCoord[2]->setRange(-MAXVAL, MAXVAL);
+ myCoord[2] = new SalomeApp_DoubleSpinBox(aCoordPane);
+ VISU::initSpinBox( myCoord[2], -MAXVAL, MAXVAL, 1., "length_precision" );
aCoordLayout->addWidget( myCoord[2], 2, 1 );
myStackWgt->insertWidget(ManualMode, aManualPane );
QLabel* aMinLbl = new QLabel("From", myUseRangeBox);
aRangeLayout->addWidget(aMinLbl);
- //myMinVal = new QtxDoubleSpinBox( aMinTime, aMaxTime, aStep, myUseRangeBox );
+ //myMinVal = new SalomeApp_DoubleSpinBox( aMinTime, aMaxTime, aStep, myUseRangeBox );
+ //VISU::initSpinBox( myMinVal, aMinTime, aMaxTime, aStep, "visual_data_precision" );
myMinVal = new LineEdit( myUseRangeBox );
myMinVal->setValidator( new QDoubleValidator( myMinVal ) );
if ( myUseRangeBox->isChecked() )
QLabel* aMaxLbl = new QLabel("To", myUseRangeBox);
aRangeLayout->addWidget(aMaxLbl);
- //myMaxVal = new QtxDoubleSpinBox( aMinTime, aMaxTime, aStep, myUseRangeBox );
+ //myMaxVal = new SalomeApp_DoubleSpinBox( aMinTime, aMaxTime, aStep, myUseRangeBox );
+ //VISU::initSpinBox( myMaxVal, aMinTime, aMaxTime, aStep, "visual_data_precision" );
myMaxVal = new LineEdit( myUseRangeBox );
myMaxVal->setValidator( new QDoubleValidator( myMaxVal ) );
if ( myUseRangeBox->isChecked() )
this, SLOT( onBrowseAVI() ));
aSaveLay->addWidget(myBrowseAVIBtn, 4, 2);
+ myFrequencyLbl = new QLabel("Time stamp frequency:", aSaveBox);
+ myFrequencyLbl->setEnabled(false);
+ aSaveLay->addWidget(myFrequencyLbl, 5, 0, 1, 2);
+
+ myFrequencySpin = new SalomeApp_IntSpinBox(aSaveBox);
+ VISU::initSpinBox(myFrequencySpin, 1, 100, 1);
+ myFrequencySpin->setValue(myAnimator->getTimeStampFrequency());
+ myFrequencySpin->setEnabled(false);
+ aSaveLay->addWidget(myFrequencySpin, 5, 2);
+
mySaveAVICheck->setChecked(false);
//mySaveAVICheck->setEnabled(myAnimator->checkAVIMaker());
+ int aDumpMode = myAnimator->getDumpMode();
+ if(aDumpMode == VISU_TimeAnimation::DM_Picture)
+ mySaveCheck->setChecked(true);
+ else if(aDumpMode == VISU_TimeAnimation::DM_Video && myAnimator->checkAVIMaker())
+ mySaveAVICheck->setChecked(true);
+
TopLayout->addWidget(aSaveBox, 7, 0, 1, 4);
QCheckBox* aCleanMemCheck = new QCheckBox("Clean memory at each frame",myPlayFrame);
} else if (mySaveAVICheck->isChecked()) {
myAnimator->setDumpFormat("AVI");
myAnimator->dumpTo(myPathAVIEdit->text().toLatin1().data());
+ myAnimator->setTimeStampFrequency(myFrequencySpin->value());
} else {
myAnimator->dumpTo("");
}
myPathAVILbl->setEnabled(true);
myPathAVIEdit->setEnabled(true);
myBrowseAVIBtn->setEnabled(true);
+ myFrequencyLbl->setEnabled(true);
+ myFrequencySpin->setEnabled(true);
}
}
else {
myPathAVILbl->setEnabled(false);
myPathAVIEdit->setEnabled(false);
myBrowseAVIBtn->setEnabled(false);
+ myFrequencyLbl->setEnabled(false);
+ myFrequencySpin->setEnabled(false);
}
mySaveCheck->setEnabled(!mySaveAVICheck->isChecked());
}
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : VisuGUI_TimeAnimation.h
// Author : Vitaly SMETANNIKOV
// Module : VISU
#ifndef VISUGUI_TIMEANIMATION_H
#define VISUGUI_TIMEANIMATION_H
-#include "QtxDoubleSpinBox.h"
+#include <SalomeApp_DoubleSpinBox.h>
#include "SALOMEDSClient_Study.hxx"
#include "VTKViewer.h"
class VisuGUI;
class SalomeApp_Module;
+class SalomeApp_IntSpinBox;
class VISU_TimeAnimation;
namespace VISU
class SVTK_ViewWindow;
-//class QtxDoubleSpinBox;
-
class QLabel;
class QSlider;
class QListWidget;
VISU_TimeAnimation* myAnimator;
SVTK_ViewWindow * myViewWindow;
- QStackedWidget* myStackWgt;
+ QStackedWidget* myStackWgt;
QButtonGroup* myAxisGrp;
- QtxDoubleSpinBox* myDistVal;
- QListWidget* myFieldLst;
- QtxDoubleSpinBox* myCoord[3];
- QList<Offset> myOffsets;
+ SalomeApp_DoubleSpinBox* myDistVal;
+ QListWidget* myFieldLst;
+ SalomeApp_DoubleSpinBox* myCoord[3];
+ QList<Offset> myOffsets;
QCheckBox* mySaveChk;
QPushButton* myPropBtn;
QPushButton* myArrangeBtn;
QGroupBox* myUseRangeBox;
- // QtxDoubleSpinBox* myMinVal;
- // QtxDoubleSpinBox* myMaxVal;
+ // SalomeApp_DoubleSpinBox* myMinVal;
+ // SalomeApp_DoubleSpinBox* myMaxVal;
QLineEdit* myMinVal;
QLineEdit* myMaxVal;
QLineEdit* myPathAVIEdit;
QLabel* myPathAVILbl;
QPushButton* myBrowseAVIBtn;
+ QLabel* myFrequencyLbl;
+ SalomeApp_IntSpinBox* myFrequencySpin;
QPushButton* myPublishBtn;
QPushButton* mySaveBtn;
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU VISUGUI : GUI of VISU component
// File : VisuGUI_Timer.cxx
// Module : SALOME
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU VISUGUI : GUI of VISU component
// File : VisuGUI_Timer.h
// Module : SALOME
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU VISUGUI : GUI of VISU component
// File : VisuGUI_Tools.cxx
// Author : Sergey Anikin
#include "SalomeApp_Module.h"
#include "SalomeApp_Study.h"
#include "SalomeApp_Application.h"
+#include "SalomeApp_IntSpinBox.h"
+#include "SalomeApp_DoubleSpinBox.h"
#include "LightApp_DataObject.h"
#include "LightApp_SelectionMgr.h"
#include "SUIT_MessageBox.h"
#include "SUIT_Desktop.h"
#include "SUIT_ViewWindow.h"
+#include "SUIT_ResourceMgr.h"
#include "CAM_DataModel.h"
#include <QString>
#include <QSpinBox>
#include <QDoubleSpinBox>
+#include <QVariant>
using namespace std;
}
}
//------------------------------------------------------------
- void initSpinBox( QSpinBox* spinBox,
- int min, int max, int step )
- {
- spinBox->setRange( min, max );
- spinBox->setSingleStep( step );
- }
- //------------------------------------------------------------
- void initSpinBox( QDoubleSpinBox* spinBox,
- double min, double max,
- double step, int decimals )
- {
- spinBox->setRange( min, max );
- spinBox->setSingleStep( step );
- spinBox->setDecimals( decimals );
- }
- //------------------------------------------------------------
bool getClippingPlanesFolder(_PTR(Study) theStudy, _PTR(SObject)& theSObject)
{
_PTR(SComponent) aVisuSO = theStudy->FindComponent("VISU");
theSObject = aFolder;
return true;
}
+
+ //------------------------------------------------------------
+ void initSpinBox( SalomeApp_IntSpinBox* sb,
+ const int bottom,
+ const int top,
+ const int step )
+ {
+ sb->setAcceptNames( false );
+ sb->setRange( bottom, top );
+ sb->setSingleStep( step );
+ }
+
+ //------------------------------------------------------------
+ void initSpinBox( SalomeApp_DoubleSpinBox* sb,
+ const double& bottom,
+ const double& top,
+ const double& step,
+ const char* quantity )
+ {
+ // Obtain precision from preferences
+ SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
+ int precision = resMgr->integerValue( "VISU", quantity, 3 );
+
+ sb->setPrecision ( precision );
+ sb->setDecimals ( qAbs(precision) );
+ sb->setRange ( bottom, top );
+ sb->setSingleStep ( step );
+ sb->setDefaultValue( bottom );
+ sb->setAcceptNames ( false );
+
+ // Add a hint for the user saying how to tune precision
+ QString userPropName = QObject::tr( QString( "VISU_PREF_%1" ).arg( quantity ).toLatin1().constData() );
+ sb->setProperty( "validity_tune_hint",
+ QVariant( QObject::tr( "VISU_PRECISION_HINT" ).arg( userPropName ) ) );
+ }
}
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU VISUGUI : GUI of VISU component
// File : VisuGUI_Tools.h
// Author : Sergey Anikin
class Plot2d_ViewFrame;
class CAM_Module;
class LightApp_SelectionMgr;
+class SalomeApp_DoubleSpinBox;
+class SalomeApp_IntSpinBox;
class SalomeApp_Module;
class SalomeApp_Study;
class VisuGUI;
VISU::Prs3d_i* thePrs3d, int pos);
void RemoveScalarBarPosition(VisuGUI* theModule, SVTK_ViewWindow* theViewWindow,
VISU::Prs3d_i* thePrs3d);
- void initSpinBox( QSpinBox*, int, int, int = 1 );
- void initSpinBox( QDoubleSpinBox*, double, double, double = 0.1, int = 6 );
#define CLIP_PLANES_FOLDER "Clipping Planes"
bool getClippingPlanesFolder(_PTR(Study) theStudy, _PTR(SObject)& theSObject);
+
+ void initSpinBox( SalomeApp_IntSpinBox*, const int, const int, const int );
+ void initSpinBox( SalomeApp_DoubleSpinBox*, const double&, const double&, const double&, const char* );
}
#endif
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU VISUGUI : GUI of VISU component
// File : VisuGUI_TransparencyDlg.cxx
// Author : Nicolas REJNERI
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU VisuGUI : GUI for VISU component
// File : VisuGUI_TransparencyDlg.h
// Author : Nicolas REJNERI
-// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : VisuGUI_ValuesLabelingDlg.cxx
// Author : Litonin SERGEY
// Module : SALOME
-
+//
#include "VisuGUI_ValuesLabelingDlg.h"
#include "VisuGUI.h"
-// 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.salome-platform.org/ or email : webmaster.salome@opencascade.com
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
// File : VisuGUI_ValuesLabelingDlg.h
// Author : Sergey LITONIN
// Module : SALOME
-
+//
#ifndef VisuGUI_ValuesLabelingDlg_H
#define VisuGUI_ValuesLabelingDlg_H
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU VISUGUI : GUI of VISU component
// File : VisuGUI_VectorsDlg.cxx
// Author : Laurent CORNABE & Hubert ROLLAND
#include "VISU_Vectors_i.hh"
#include "LightApp_Application.h"
#include "SalomeApp_Module.h"
+#include <SalomeApp_IntSpinBox.h>
+#include <SalomeApp_DoubleSpinBox.h>
#include "SUIT_Desktop.h"
#include "SUIT_MessageBox.h"
-#include "SUIT_ResourceMgr.h"
-#include "SUIT_Session.h"
#include <QtxColorButton.h>
#include <QRadioButton>
#include <QCheckBox>
#include <QLabel>
-#include <QSpinBox>
#include <QPushButton>
#include <QKeyEvent>
// Scale factor
ScaleLabel = new QLabel (tr("LBL_SCALE_FACTOR"), TopGroup );
- SUIT_ResourceMgr* aResourceMgr = VISU::GetResourceMgr();
- int aPrecision = aResourceMgr->integerValue( "VISU", "floating_point_precision", 0 );
-
- ScalFact = new QtxDoubleSpinBox( 0, 1.0E+38, 0.1, aPrecision*(-1), 32, TopGroup );
+ ScalFact = new SalomeApp_DoubleSpinBox( TopGroup );
+ VISU::initSpinBox( ScalFact, 0., 1.0E+38, .1, "visual_data_precision" );
ScalFact->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
ScalFact->setValue( 0.1 );
// Line width
LineWidLabel = new QLabel (tr("LBL_LINE_WIDTH"), TopGroup );
- LinWid = new QSpinBox( TopGroup );
+ LinWid = new SalomeApp_IntSpinBox( TopGroup );
+ LinWid->setAcceptNames( false );
LinWid->setMinimum( 1 );
LinWid->setMaximum( 10 );
LinWid->setSingleStep( 1 );
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU VISUGUI : GUI of VISU component
// File : VisuGUI_VectorsDlg.h
// Author : Laurent CORNABE & Hubert ROLLAND
#define VISUGUI_VECTORSDLG_H
#include "VisuGUI_Prs3dDlg.h"
-#include "QtxDoubleSpinBox.h"
class QGroupBox;
class QTabWidget;
#include CORBA_CLIENT_HEADER(VISU_Gen)
class SalomeApp_Module;
+class SalomeApp_IntSpinBox;
class VisuGUI_InputPane;
+class SalomeApp_DoubleSpinBox;
namespace VISU
{
QCheckBox* UseMagn;
QtxColorButton* SelColor;
QLabel* LineWidLabel;
- QSpinBox* LinWid;
+ SalomeApp_IntSpinBox* LinWid;
QLabel* ScaleLabel;
- QtxDoubleSpinBox* ScalFact;
+ SalomeApp_DoubleSpinBox* ScalFact;
QCheckBox* UseGlyph;
QButtonGroup* TypeGlyph;
QGroupBox* TypeGB;
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU VISUGUI : GUI of VISU component
// File : VisuGUI_ViewExtender.cxx
// Author : Vitaly Smetannikov
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU VISUGUI : GUI of VISU component
// File : VisuGUI_ViewExtender.h
// Author : Vitaly Smetannikov
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU VISUGUI : GUI of VISU component
// File : VisuGUI_Tools.cxx
// Author : Sergey Anikin
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU VISUGUI : GUI of VISU component
// File : VisuGUI_Tools.h
// Author : Sergey Anikin
-# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+# Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# File : Makefile.am
# Author : Alexey Petrov
# Module : VISU
VISU_Deformation_i.hh \
VISU_OptionalDeformation_i.hh \
SALOME_GenericObjPointer.hh \
- VISU_ClippingPlaneMgr.hxx
-
+ VISU_ClippingPlaneMgr.hxx \
+ VISU_TableDlg.h
libVISUEngineImpl_la_SOURCES = \
VISUConfig.cc \
VISU_Deformation_i.cc \
VISU_OptionalDeformation_i.cc \
SALOME_GenericObjPointer.cc \
- VISU_ClippingPlaneMgr.cxx
+ VISU_ClippingPlaneMgr.cxx \
+ VISU_TableDlg.cxx
+
+MOC_FILES = \
+ VISU_TimeAnimation_moc.cxx \
+ VISU_TableDlg_moc.cxx
-MOC_FILES = VISU_TimeAnimation_moc.cxx
nodist_libVISUEngineImpl_la_SOURCES= $(MOC_FILES)
# additionnal information to compil and link file
-I$(srcdir)/../CONVERTOR \
-I$(srcdir)/../PIPELINE \
-I$(srcdir)/../OBJECT \
- -I$(srcdir)/../GUITOOLS \
-I$(top_builddir)/idl
libVISUEngineImpl_la_LDFLAGS= \
../CONVERTOR/libVisuConvertor.la \
../PIPELINE/libVisuPipeLine.la \
../OBJECT/libVisuObject.la \
- ../GUITOOLS/libVISUGUITOOLS.la \
-lSalomeIDLKernel \
-lSalomeHDFPersist \
-lSalomeGenericObj \
-lTOOLSDS \
-lOpUtil \
-lSalomeLifeCycleCORBA \
+ -lCAM \
-lVTKViewer \
-lSVTK \
-lEvent \
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : SALOME_GenericObjPtr.cc
// Author : Oleg UVAROV
// Module : SALOME
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : SALOME_GenericObjPtr.hh
// Author : Oleg UVAROV
// Module : SALOME
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File : VISUConfig.cc
// Author : Alexey PETROV
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File : VISUConfig.hh
// Author : Alexey PETROV
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
#include "VISU_ClippingPlaneMgr.hxx"
#include "VISU_ColoredPrs3dHolder_i.hh"
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File : VISU_ClippingPlaneMgr.hxx
// Author : VSV
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File : VISU_ColoredPrs3dCache_i.cc
// Author : Oleg UVAROV
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File : VISU_ColoredPrs3dCache_i.hh
// Author : Oleg UVAROV
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File : VISU_ColoredPrs3dCache_i.cc
// Author : Oleg UVAROV
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File : VISU_ColoredPrs3dCache_i.hh
// Author : Oleg UVAROV
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File : VISU_ColoredPrs3dHolder_i.cc
// Author : Oleg UVAROV
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File : VISU_ColoredPrs3dHolder_i.hxx
// Author : Oleg UVAROV
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File : VISU_PrsObject_i.cxx
// Author : Alexey PETROV
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File : VISU_ColoredPrs3d_i.hh
// Author : Alexey PETROV
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File : VISU_CorbaMedConvertor.cxx
// Author : Alexey PETROV
VISU::PCFamily aFamily = boost::get<2>(aFindFamilyOnEntity);
if(MYDEBUG) MESSAGE("VISU_MEDConvertor::Build - aGroup - aFamilyName = '"<<aFamilyName.in()<<"' = "<<bool(aFamily));
if(aFamily){
- aFamilySet.insert(aFamily);
+ aFamilySet.insert(VISU::TEnity2Family(aVEntity, aFamily));
}
}
int anIsUpdated = LoadPoints(theMesh);
VISU::TFamilySet::const_iterator aFamilyIter = theFamilySet.begin();
for(; aFamilyIter != theFamilySet.end(); aFamilyIter++){
- VISU::PCFamily aFamily = *aFamilyIter;
+ VISU::PCFamily aFamily = (*aFamilyIter).second;
const VISU::TEntity& aVEntity = aFamily->myEntity;
VISU::PCMeshOnEntity aMeshOnEntity = theMesh->myMeshOnEntityMap[aVEntity];
if(aVEntity == VISU::NODE_ENTITY){
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File : VISU_CorbaMedConvertor.hxx
// Author : Alexey PETROV
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : VISU_CutLinesBase_i.cc
// Author : Oleg UVAROV
// Module : VISU
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : VISU_CutLinesBase_i.hh
// Author : Oleg UVAROV
// Module : VISU
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File : VISU_PrsObject_i.cxx
// Author : Alexey PETROV
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File : VISU_PrsObject_i.hxx
// Author : Alexey PETROV
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File : VISU_PrsObject_i.cxx
// Author : Alexey PETROV
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File : VISU_PrsObject_i.hxx
// Author : Alexey PETROV
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : VISU_CutSegment_i.cc
// Author : Oleg UVAROV
// Module : VISU
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : VISU_CutSegment_i.hh
// Author : Oleg UVAROV
// Module : VISU
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : VISU_Deformation_i.cc
// Author :
// Module : VISU
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : VISU_Deformation_i.hxx
// Author :
// Module : VISU
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File : VISU_DeformedShapeAndScalarMap_i.cc
// Author : Eugeny Nikolaev
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File: VISU_DeformedShapeAndScalarMap_i.hh
// Author: Eugeny Nikolaev
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File : VISU_PrsObject_i.cxx
// Author : Alexey PETROV
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File : VISU_PrsObject_i.hxx
// Author : Alexey PETROV
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File : VISU_DumpPython.cc
// Author : Alexey PETROV
theServant->GetOffset(x,y,z);
theStr<<thePrefix<<theName<<".SetOffset("<<x<<", "<<y<<", "<<z<<")"<<endl;
SetClippingPlane(theServant, theName, theStr, thePrefix);
+
+ VISU::MarkerType aMarkerType = theServant->GetMarkerType();
+ if( aMarkerType != VISU::MT_NONE ) {
+ if( aMarkerType != VISU::MT_USER ) {
+ VISU::MarkerScale aMarkerScale = theServant->GetMarkerScale();
+ std::string aParam1, aParam2;
+ switch( aMarkerType ) {
+ case MT_POINT: aParam1 = "MT_POINT"; break;
+ case MT_PLUS: aParam1 = "MT_PLUS"; break;
+ case MT_STAR: aParam1 = "MT_STAR"; break;
+ case MT_O: aParam1 = "MT_O"; break;
+ case MT_X: aParam1 = "MT_X"; break;
+ case MT_O_POINT: aParam1 = "MT_O_POINT"; break;
+ case MT_O_PLUS: aParam1 = "MT_O_PLUS"; break;
+ case MT_O_STAR: aParam1 = "MT_O_STAR"; break;
+ case MT_O_X: aParam1 = "MT_O_X"; break;
+ default: aParam1 = "MT_NONE"; break;
+ }
+ switch( aMarkerScale ) {
+ case MS_10: aParam2 = "MS_10"; break;
+ case MS_15: aParam2 = "MS_15"; break;
+ case MS_20: aParam2 = "MS_20"; break;
+ case MS_25: aParam2 = "MS_25"; break;
+ case MS_30: aParam2 = "MS_30"; break;
+ case MS_35: aParam2 = "MS_35"; break;
+ case MS_40: aParam2 = "MS_40"; break;
+ case MS_45: aParam2 = "MS_45"; break;
+ case MS_50: aParam2 = "MS_50"; break;
+ case MS_55: aParam2 = "MS_55"; break;
+ case MS_60: aParam2 = "MS_60"; break;
+ case MS_65: aParam2 = "MS_65"; break;
+ case MS_70: aParam2 = "MS_70"; break;
+ default: aParam2 = "MT_NONE"; break;
+ }
+ theStr<<thePrefix<<theName<<".SetMarkerStd(VISU."<<aParam1<<", VISU."<<aParam2<<")"<<endl;
+ }
+ else {
+ int aMarkerTexture = theServant->GetMarkerTexture();
+ if( aMarkerTexture >= 0 )
+ theStr<<thePrefix<<theName<<".SetMarkerTexture(texture_map["<<aMarkerTexture<<"])"<<endl;
+ }
+ }
}
//---------------------------------------------------------------------------
if(Curve_i* aServant = dynamic_cast<Curve_i*>(GetServant(anObj).in()))
{
bool withZ = aServant->GetZRow()>0;
+ bool isV2 = aServant->GetIsV2();
theStr << thePrefix << "aName2ObjectMap['" << aName << "'] = visu.CreateCurve";
- if( withZ )
+ if( isV2 )
+ theStr << "WithZExt";
+ else if( withZ )
theStr << "WithZ";
theStr << "(" <<
theArgumentName<< // table
- ", "<<aServant->GetHRow()<< // H row
- ", "<<aServant->GetVRow(); // V row
- if( withZ )
+ ", "<<aServant->GetHRow()<< // H row
+ ", "<<aServant->GetVRow(); // V row
+ if( withZ || isV2 )
theStr << ", " << aServant->GetZRow(); // Z row
+ if( isV2 )
+ theStr << ", " << aServant->GetIsV2(); // right axis
theStr << ", '"<<aServant->GetTitle()<<"'"; // title
SALOMEDS::Color aColor = aServant->GetColor();
if (aTypeName == "ImportTables") {
QString aFileName = VISU::Storable::FindValue(aMap,"myFileName",&anIsExist);
if(anIsExist){
- std::string aName = GenerateName(theSObject,theName2EntryMap,theEntry2NameMap);
- theStr<<thePrefix<<aName<<" = aVisu.ImportTables('"<<aFileName.toLatin1().data()<<"')"<<endl;
+ std::string aName =
+ GenerateName(theSObject,theName2EntryMap,theEntry2NameMap);
+ QString aFirstStrAsTitle =
+ VISU::Storable::FindValue(aMap,"myFirstStrAsTitle",&anIsExist);
+ theStr<<thePrefix<<aName<<" = aVisu.ImportTables('"
+ <<aFileName.toLatin1().data()<<"',"
+ <<aFirstStrAsTitle.toLatin1().data()<<")"<<endl;
theStr<<thePrefix<<"if "<<aName<<":"<<endl;
thePrefix += PREFIX;
}
+ void
+ DumpTextureMapToPython(SALOMEDS::Study_ptr theStudy,
+ CORBA::Boolean theIsPublished,
+ CORBA::Boolean& theIsValidScript,
+ SALOMEDS::SObject_ptr theSObject,
+ std::ostream& theStr,
+ std::string thePrefix,
+ const StudyId2MarkerMap& theMarkerMap)
+ {
+ if(!theIsPublished)
+ return;
+
+ if(CORBA::is_nil(theStudy))
+ return;
+
+ StudyId2MarkerMap::const_iterator anIter = theMarkerMap.find(theStudy->StudyId());
+ if(anIter == theMarkerMap.end())
+ return;
+
+ theStr<<thePrefix<<"texture_map = {}"<<endl<<endl;
+
+ const VTK::MarkerMap& aMarkerMap = anIter->second;
+ VTK::MarkerMap::const_iterator aMarkerIter = aMarkerMap.begin();
+ for(; aMarkerIter != aMarkerMap.end(); aMarkerIter++) {
+ int aMarkerId = aMarkerIter->first;
+ std::string aMarkerTexture = aMarkerIter->second.first;
+ theStr<<thePrefix<<"texture_map["<<aMarkerId<<"] = aVisu.LoadTexture(\""<<aMarkerTexture<<"\")"<<endl;
+ }
+ theStr<<endl;
+ }
+
+
//---------------------------------------------------------------------------
Engines::TMPFile*
VISU_Gen_i::
aPrefix,
myClippingPlaneMgr);
+ VISU::DumpTextureMapToPython(aStudy,
+ theIsPublished,
+ theIsValidScript,
+ aComponent.in(),
+ aStr,
+ aPrefix,
+ myMarkerMap);
VISU::DumpChildrenToPython(aStudy,
theIsPublished,
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : VISU_Evolution.cxx
// Author : Oleg UVAROV
// Module : VISU
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : VISU_Evolution.h
// Author : Oleg UVAROV
// Module : VISU
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File :
// Author :
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File : VISU_PrsObject_i.hxx
// Author : Alexey PETROV
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File : VISU_Gen_i.cc
// Author : Alexey PETROV
#include "VISU_Actor.h"
+#include "HDFOI.hxx"
#include "HDFascii.hxx"
#include "SALOMEDS_Tool.hxx"
#include "SalomeApp_Study.h"
#include "SalomeApp_Application.h"
#include "LightApp_SelectionMgr.h"
+#include "VTKViewer_MarkerUtils.h"
#include "SVTK_ViewModel.h"
#include "SVTK_ViewWindow.h"
#include "SALOME_Event.h"
}
+ //----------------------------------------------------------------------------
+ bool
+ LoadMarkerMap(SALOMEDS::Study_ptr theStudy,
+ const char* theURL,
+ bool theIsMultiFile,
+ bool theIsASCII,
+ StudyId2MarkerMap& theStudyId2MarkerMap,
+ std::string& theMarkerMapFileName,
+ std::string& theMarkerMapFile)
+ {
+ std::string aPrefix;
+ if( theIsMultiFile ) {
+ CORBA::String_var anURL = theStudy->URL();
+ aPrefix = SALOMEDS_Tool::GetNameFromPath(anURL.in());
+ }
+
+ theMarkerMapFileName = aPrefix + "_textures";
+ theMarkerMapFile = VISU_TMP_DIR + theMarkerMapFileName;
+
+ if( theIsASCII && !HDFascii::ConvertFromASCIIToHDF( const_cast<char*>( theMarkerMapFile.c_str() ), true ) )
+ return false;
+
+ HDFfile* aFile;
+ HDFdataset* aDataset;
+ HDFgroup* aTopGroup;
+ HDFgroup* aGroup;
+ HDFgroup* aSubGroup;
+ HDFgroup* aSubSubGroup;
+ int aSize;
+
+ aFile = new HDFfile( (char*)theMarkerMapFile.c_str() );
+ try {
+ aFile->OpenOnDisk( HDF_RDONLY );
+ }
+ catch ( HDFexception ) {
+ INFOS( "Load(): " << theMarkerMapFile << " not found!" );
+ return false;
+ }
+
+ VTK::MarkerMap& aMarkerMap = theStudyId2MarkerMap[ theStudy->StudyId() ];
+
+ for( int i = 0, n = aFile->nInternalObjects(); i < n; i++ ) {
+ char markerGrpName[ HDF_NAME_MAX_LEN+1 ];
+ aFile->InternalObjectIndentify( i, markerGrpName );
+
+ int aMarkerId = 0;
+ std::string aMarkerFile;
+ VTK::MarkerTexture aMarkerTexture;
+
+ if( string( markerGrpName ).substr( 0, 6 ) == string( "Marker" ) ) {
+ aTopGroup = new HDFgroup( markerGrpName, aFile );
+ aTopGroup->OpenOnDisk();
+
+ aMarkerId = atoi( string( markerGrpName ).substr( 6 ).c_str() );
+ if( aMarkerId < 1 )
+ continue;
+
+ if( aTopGroup->ExistInternalObject( "File" ) ) {
+ aDataset = new HDFdataset( "File", aTopGroup );
+ aDataset->OpenOnDisk();
+ aSize = aDataset->GetSize();
+ char* aFileName = new char[ aSize ];
+ aDataset->ReadFromDisk( aFileName );
+ aMarkerFile = aFileName;
+ delete [] aFileName;
+ aDataset->CloseOnDisk();
+ }
+
+ if( aTopGroup->ExistInternalObject( "Texture" ) ) {
+ aDataset = new HDFdataset( "Texture", aTopGroup );
+ aDataset->OpenOnDisk();
+ aSize = aDataset->GetSize();
+ int* aTextureData = new int[ aSize ];
+ aDataset->ReadFromDisk( aTextureData );
+ for( int j = 0; j < aSize; j++ )
+ aMarkerTexture.push_back( aTextureData[j] );
+ delete [] aTextureData;
+ aDataset->CloseOnDisk();
+ }
+
+ aTopGroup->CloseOnDisk();
+ }
+
+ if( aMarkerId > 0 )
+ aMarkerMap[ aMarkerId ] = VTK::MarkerData( aMarkerFile, aMarkerTexture );
+ }
+
+ aFile->CloseOnDisk();
+ delete aFile;
+
+ return true;
+ }
+
+ //----------------------------------------------------------------------------
+ bool
+ SaveMarkerMap(SALOMEDS::Study_ptr theStudy,
+ const char* theURL,
+ bool theIsMultiFile,
+ bool theIsASCII,
+ const StudyId2MarkerMap& theStudyId2MarkerMap,
+ std::string& theMarkerMapFileName,
+ std::string& theMarkerMapFile)
+ {
+ VISU::StudyId2MarkerMap::const_iterator aMainIter = theStudyId2MarkerMap.find( theStudy->StudyId() );
+ if( aMainIter == theStudyId2MarkerMap.end() )
+ return false;
+
+ const VTK::MarkerMap& aMarkerMap = aMainIter->second;
+ if( aMarkerMap.empty() )
+ return false;
+
+ std::string aPrefix;
+ if( theIsMultiFile ) {
+ CORBA::String_var anURL = theStudy->URL();
+ aPrefix = SALOMEDS_Tool::GetNameFromPath(anURL.in());
+ }
+
+ theMarkerMapFileName = aPrefix + "_textures";
+ theMarkerMapFile = string( theURL ) + theMarkerMapFileName;
+
+ HDFfile* aFile;
+ HDFdataset* aDataset;
+ HDFgroup* aTopGroup;
+ HDFgroup* aGroup;
+ HDFgroup* aSubGroup;
+ HDFgroup* aSubSubGroup;
+ hdf_size aSize[ 1 ];
+
+ aFile = new HDFfile( (char*)theMarkerMapFile.c_str() );
+ aFile->CreateOnDisk();
+
+ VTK::MarkerMap::const_iterator aMarkerIter = aMarkerMap.begin();
+ for( ; aMarkerIter != aMarkerMap.end(); aMarkerIter++ ) {
+ int aMarkerId = aMarkerIter->first;
+ const VTK::MarkerData& aMarkerData = aMarkerIter->second;
+ std::string aMarkerFile = aMarkerData.first;
+ VTK::MarkerTexture aMarkerTexture = aMarkerData.second;
+
+ char markerGrpName[30];
+ sprintf( markerGrpName, "Marker %d", aMarkerId );
+ aTopGroup = new HDFgroup( markerGrpName, aFile );
+
+ aTopGroup->CreateOnDisk();
+
+ aSize[ 0 ] = aMarkerFile.length() + 1;
+ aDataset = new HDFdataset( "File", aTopGroup, HDF_STRING, aSize, 1 );
+ aDataset->CreateOnDisk();
+ aDataset->WriteOnDisk( ( char* )( aMarkerFile.c_str() ) );
+ aDataset->CloseOnDisk();
+
+ int* aTextureData = new int[ aMarkerTexture.size() ];
+ VTK::MarkerTexture::const_iterator anIter = aMarkerTexture.begin();
+ for( int i = 0; anIter != aMarkerTexture.end(); anIter++, i++ )
+ aTextureData[i] = *anIter;
+
+ aSize[0] = aMarkerTexture.size();
+ aDataset = new HDFdataset( "Texture", aTopGroup, HDF_INT32, aSize, 1 );
+ aDataset->CreateOnDisk();
+ aDataset->WriteOnDisk( aTextureData );
+ aDataset->CloseOnDisk();
+ delete [] aTextureData;
+
+ aTopGroup->CloseOnDisk();
+ }
+
+ aFile->CloseOnDisk();
+ delete aFile;
+
+ if( theIsASCII && !HDFascii::ConvertFromHDFToASCII( const_cast<char*>( theMarkerMapFile.c_str() ), true ) )
+ return false;
+
+ return true;
+ }
+
+
//----------------------------------------------------------------------------
VISU_Gen_i
::VISU_Gen_i(CORBA::ORB_ptr theORB, PortableServer::POA_ptr thePOA,
//----------------------------------------------------------------------------
CORBA::Boolean
- VISU_Gen_i
- ::Load(SALOMEDS::SComponent_ptr theComponent,
- const SALOMEDS::TMPFile & theStream,
- const char* theURL,
- CORBA::Boolean theIsMultiFile)
+ LoadWithMarkerMap(SALOMEDS::SComponent_ptr theComponent,
+ const SALOMEDS::TMPFile & theStream,
+ const char* theURL,
+ CORBA::Boolean theIsMultiFile,
+ CORBA::Boolean theIsASCII,
+ StudyId2MarkerMap& theStudyId2MarkerMap)
{
- Mutex mt(myMutex);
SALOMEDS::Study_var aStudy = theComponent->GetStudy();
SALOMEDS::ChildIterator_var anIter = aStudy->NewChildIterator(theComponent);
CorrectSObjectType(aSObject, aStudyBuilder);
}
-
VISU_TMP_DIR = theIsMultiFile ? theURL : SALOMEDS_Tool::GetTmpDir();
SALOMEDS::ListOfFileNames_var aSeq =
SALOMEDS_Tool::PutStreamToFiles(theStream, VISU_TMP_DIR, theIsMultiFile);
myIsMultiFile = theIsMultiFile;
+
+ // load textures of custom point markers
+ Result_i::TFileNames aTMPFileNames;
+ std::string aMarkerMapFileName, aMarkerMapFile;
+ if( LoadMarkerMap( aStudy, theURL, theIsMultiFile, theIsASCII,
+ theStudyId2MarkerMap, aMarkerMapFileName, aMarkerMapFile ) ) {
+ aTMPFileNames.push_back( aMarkerMapFileName );
+ }
+
+ if(!theIsMultiFile && !aTMPFileNames.empty()) {
+ SALOMEDS::ListOfFileNames_var aListOfTMPFileNames = GetListOfFileNames(aTMPFileNames);
+ SALOMEDS_Tool::RemoveTemporaryFiles(VISU_TMP_DIR, aListOfTMPFileNames, true );
+ }
+
return true;
}
+ //----------------------------------------------------------------------------
+ CORBA::Boolean
+ VISU_Gen_i
+ ::Load(SALOMEDS::SComponent_ptr theComponent,
+ const SALOMEDS::TMPFile & theStream,
+ const char* theURL,
+ CORBA::Boolean theIsMultiFile)
+ {
+ Mutex mt(myMutex);
+ return LoadWithMarkerMap(theComponent, theStream, theURL, theIsMultiFile, false, myMarkerMap);
+ }
+
+
//----------------------------------------------------------------------------
CORBA::Boolean
VISU_Gen_i
const char* theURL,
bool theIsMultiFile)
{
- return Load(theComponent, theStream, theURL, theIsMultiFile);
+ Mutex mt(myMutex);
+ return LoadWithMarkerMap(theComponent, theStream, theURL, theIsMultiFile, true, myMarkerMap);
}
}
if(MYDEBUG) MESSAGE("VISU_Gen_i::Save - aFileNames.size() - "<<aFileNames.size());
+ // save textures of custom point markers
+ Result_i::TFileNames aTMPFileNames;
+ std::string aMarkerMapFileName, aMarkerMapFile;
+ if( SaveMarkerMap( aStudy, theURL, theIsMultiFile, false,
+ myMarkerMap, aMarkerMapFileName, aMarkerMapFile ) ) {
+ aTMPFileNames.push_back( aMarkerMapFileName );
+ aFileNames.push_back( aMarkerMapFileName );
+ aFiles.push_back( aMarkerMapFile );
+ }
+
SALOMEDS::TMPFile_var aStreamFile = new SALOMEDS::TMPFile(0);
if(aFileNames.empty())
return aStreamFile._retn();
else
aStreamFile = SALOMEDS_Tool::PutFilesToStream(aListOfFiles.in(), aListOfFileNames.in());
+ if(!theIsMultiFile && !aTMPFileNames.empty()) {
+ SALOMEDS::ListOfFileNames_var aListOfTMPFileNames = GetListOfFileNames(aTMPFileNames);
+ SALOMEDS_Tool::RemoveTemporaryFiles(theURL, aListOfTMPFileNames, true);
+ }
+
return aStreamFile._retn();
}
}
if(MYDEBUG) MESSAGE("VISU_Gen_i::SaveASCII - aFileNames.size() - "<<aFileNames.size());
+ // save textures of custom point markers
+ std::string aMarkerMapFileName, aMarkerMapFile;
+ if( SaveMarkerMap( aStudy, anURL.c_str(), theIsMultiFile, true,
+ myMarkerMap, aMarkerMapFileName, aMarkerMapFile ) ) {
+ aFileNames.push_back( aMarkerMapFileName );
+ aFiles.push_back( aMarkerMapFile );
+ }
+
SALOMEDS::TMPFile_var aStreamFile = new SALOMEDS::TMPFile(0);
if(aFileNames.empty())
return aStreamFile._retn();
//----------------------------------------------------------------------------
SALOMEDS::SObject_ptr
VISU_Gen_i
- ::ImportTables(const char* theFileName)
+ ::ImportTables(const char* theFileName, bool theFirstStrAsTitle)
{
if(myStudyDocument->GetProperties()->IsLocked())
return SALOMEDS::SObject::_nil();
- SALOMEDS::SObject_var aRes = VISU::ImportTables(theFileName,myStudyDocument);
+ SALOMEDS::SObject_var aRes = VISU::ImportTables(theFileName,myStudyDocument,
+ theFirstStrAsTitle);
SALOMEDS::Study_var aStudy = aRes->GetStudy();
SALOMEDS::ChildIterator_var anIter = aStudy->NewChildIterator(aRes);
CORBA::Long theHRow,
CORBA::Long theVRow)
{
- return CreateCurveWithZ( theTable, theHRow, theVRow, 0 );
+ return CreateCurveWithZExt( theTable, theHRow, theVRow, 0, false );
}
CORBA::Long theHRow,
CORBA::Long theVRow,
CORBA::Long theZRow)
+ {
+ return CreateCurveWithZExt( theTable, theHRow, theVRow, theZRow, false );
+ }
+
+
+ //---------------------------------------------------------------
+ Curve_ptr
+ VISU_Gen_i
+ ::CreateCurveWithZExt(Table_ptr theTable,
+ CORBA::Long theHRow,
+ CORBA::Long theVRow,
+ CORBA::Long theZRow,
+ CORBA::Boolean theIsV2)
{
if(myStudyDocument->GetProperties()->IsLocked())
return Curve::_nil();
Mutex mt(myMutex);
PortableServer::POA_ptr aPOA = GetPOA();
Table_i* pTable = dynamic_cast<Table_i*>(aPOA->reference_to_servant(theTable));
- Curve_i* pPresent = new Curve_i(myStudyDocument,pTable,theHRow,theVRow,theZRow);
+ Curve_i* pPresent = new Curve_i(myStudyDocument,pTable,theHRow,theVRow,theZRow,theIsV2);
if(pPresent->Create() != NULL)
return pPresent->_this();
else{
}
-
//---------------------------------------------------------------
Container_ptr
VISU_Gen_i
return res == 0;
}
+
+ CORBA::Long
+ VISU_Gen_i
+ ::LoadTexture(const char* theTextureFile)
+ {
+ if( CORBA::is_nil( myStudyDocument ) )
+ return 0;
+
+ int aStudyId = myStudyDocument->StudyId();
+
+ VTK::MarkerTexture aMarkerTexture;
+ if( !VTK::LoadTextureData( theTextureFile, VTK::MS_NONE, aMarkerTexture ) )
+ return 0;
+
+ VTK::MarkerMap& aMarkerMap = myMarkerMap[ aStudyId ];
+ int aMarkerId = VTK::GetUniqueId( aMarkerMap );
+
+ VTK::MarkerData& aMarkerData = aMarkerMap[ aMarkerId ];
+ aMarkerData.first = theTextureFile;
+ aMarkerData.second = aMarkerTexture;
+
+ return aMarkerId;
+ }
}
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : VISU_Gen_i.hh
// Author : Alexey Petrov
// Module : VISU
#include "VISU_ColoredPrs3d_i.hh"
#include "VISU_ClippingPlaneMgr.hxx"
+#include <VTKViewer_MarkerDef.h>
+
+#include <map>
#include <string>
namespace VISU
{
+ //----------------------------------------------------------------------------
+ typedef std::map<int, VTK::MarkerMap> StudyId2MarkerMap;
+
//----------------------------------------------------------------------------
class VISU_Gen_i : public virtual POA_VISU::VISU_Gen,
public virtual ::Engines_Component_i,
SALOMEDS::Study_var myStudyDocument;
VISU_ClippingPlaneMgr myClippingPlaneMgr;
+ StudyId2MarkerMap myMarkerMap;
+
VISU_Gen_i(const VISU::VISU_Gen_i &);
public:
VISU_Gen_i(CORBA::ORB_ptr theORB,
virtual
SALOMEDS::SObject_ptr
- ImportTables(const char* theFileName);
+ ImportTables(const char* theFileName, bool theFirstStrAsTitle = false);
virtual
CORBA::Boolean
CreateCurve(Table_ptr theTable,
CORBA::Long theHRow,
CORBA::Long theVRow);
+
virtual
Curve_ptr
CreateCurveWithZ(Table_ptr theTable,
- CORBA::Long theHRow,
- CORBA::Long theVRow,
- CORBA::Long theZRow);
+ CORBA::Long theHRow,
+ CORBA::Long theVRow,
+ CORBA::Long theZRow);
+
+ virtual
+ Curve_ptr
+ CreateCurveWithZExt(Table_ptr theTable,
+ CORBA::Long theHRow,
+ CORBA::Long theVRow,
+ CORBA::Long theZRow,
+ CORBA::Boolean theIsV2);
virtual
Container_ptr
const char* theMeshName,
const VISU::double_array& theTStamps);
+ /* Load texture from file */
+ virtual CORBA::Long LoadTexture(const char* theTextureFile);
+
+ StudyId2MarkerMap& GetMarkerMap() { return myMarkerMap; }
};
}
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SALOME VTKViewer : build VTK viewer into Salome desktop
// File :
// Author :
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : VISU_I.hxx
// Author : Oleg UVAROV
// Module : VISU
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File : VISU_PrsObject_i.cxx
// Author : Alexey PETROV
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File : VISU_PrsObject_i.hxx
// Author : Alexey PETROV
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File : VISU_PrsObject_i.cxx
// Author : Alexey PETROV
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File : VISU_PrsObject_i.hxx
// Author : Alexey PETROV
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File : VISU_MonoColorPrs_i.cxx
// Author : Vitaly Smetannikov
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File : VISU_MonoColorPrs_i.hxx
// Author : Vitaly Smetannikov
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File : VISU_MultiResult_i.cc
// Author : Alexey PETROV
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File : VISU_MultiResult_i.hh
// Author : Alexey PETROV
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : VISU_OptionalDeformation_i.cc
// Author :
// Module : VISU
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : VISU_Deformation_i.hxx
// Author :
// Module : VISU
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
#include "VISU_Plot3D_i.hh"
#include "VISU_Prs3dUtils.hh"
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
#ifndef VISU_Plot3D_i_HeaderFile
#define VISU_Plot3D_i_HeaderFile
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File : VISU_PointMap3d_i.cc
// Author : Dmitry Matveitchev
theDz = myOffset[2];
}
+void VISU::PointMap3d_i::SetMarkerStd(VISU::MarkerType, VISU::MarkerScale)
+{
+}
+
+void VISU::PointMap3d_i::SetMarkerTexture(CORBA::Long)
+{
+}
+
+VISU::MarkerType VISU::PointMap3d_i::GetMarkerType()
+{
+ return VISU::MT_NONE;
+}
+
+VISU::MarkerScale VISU::PointMap3d_i::GetMarkerScale()
+{
+ return VISU::MS_NONE;
+}
+
+CORBA::Long VISU::PointMap3d_i::GetMarkerTexture()
+{
+ return 0;
+}
+
CORBA::Float VISU::PointMap3d_i::GetMemorySize()
{
CORBA::Float aSize = GetSpecificPL()->GetMemorySize();
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File : VISU_PointMap3d_i.hh
// Author :
//! Gets offset parameters for the 3D presentation
virtual void GetOffset(CORBA::Float& theDx, CORBA::Float& theDy, CORBA::Float& theDz);
+ //! Do nothing, just for compilability
+ virtual void SetMarkerStd(VISU::MarkerType, VISU::MarkerScale);
+ virtual void SetMarkerTexture(CORBA::Long);
+ virtual VISU::MarkerType GetMarkerType();
+ virtual VISU::MarkerScale GetMarkerScale();
+ virtual CORBA::Long GetMarkerTexture();
+
//! Gets memory size actually used by the presentation (Mb).
virtual CORBA::Float GetMemorySize();
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File : VISU_Prs3dUtils.cc
// Author : Alexey PETROV
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File : VISU_Prs3dUtils.hh
// Author : Alexey PETROV
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File : VISU_Prs3d_i.cc
// Author : Alexey PETROV
//
#include "VISU_Prs3d_i.hh"
#include "VISU_Prs3dUtils.hh"
+#include "VISU_Gen_i.hh"
#include "VISU_PipeLine.hxx"
#include "VISU_Result_i.hh"
#include "SUIT_ResourceMgr.h"
#include "SUIT_MessageBox.h"
+#include <VTKViewer_MarkerUtils.h>
+
#include <vtkActorCollection.h>
#include <vtkUnstructuredGrid.h>
#include <vtkDataSet.h>
if(MYDEBUG) MESSAGE("Prs3d_i::Prs3d_i - this = "<<this);
myOffset[0] = myOffset[1] = myOffset[2] = 0;
myActorCollection->Delete();
+
+ SUIT_ResourceMgr* aResourceMgr = VISU::GetResourceMgr();
+ myMarkerType = (VISU::MarkerType)aResourceMgr->integerValue("VISU", "type_of_marker", 1); // dot
+ myMarkerScale = (VISU::MarkerScale)aResourceMgr->integerValue("VISU", "marker_scale", 9); // 5 pixels
+ myMarkerId = 0;
}
GetPipeLine()->SameAs(anOrigin->GetPipeLine());
anOrigin->GetOffset(myOffset);
+ myMarkerType = anOrigin->GetMarkerType();
+ myMarkerScale = anOrigin->GetMarkerScale();
+ myMarkerId = anOrigin->GetMarkerTexture();
+
SetForcedHidden(anOrigin->IsForcedHidden());
}
}
myOffset[0] = VISU::Storable::FindValue(theMap,"myOffset[0]").toFloat();
myOffset[1] = VISU::Storable::FindValue(theMap,"myOffset[1]").toFloat();
myOffset[2] = VISU::Storable::FindValue(theMap,"myOffset[2]").toFloat();
+ myMarkerType = VISU::MarkerType(VISU::Storable::FindValue(theMap,"myMarkerType").toInt());
+ myMarkerScale = VISU::MarkerScale(VISU::Storable::FindValue(theMap,"myMarkerScale").toInt());
+ myMarkerId = VISU::Storable::FindValue(theMap,"myMarkerId").toInt();
myParamsTime.Modified();
return this;
}
Storable::DataToStream( theStr, "myOffset[0]", myOffset[0] );
Storable::DataToStream( theStr, "myOffset[1]", myOffset[1] );
Storable::DataToStream( theStr, "myOffset[2]", myOffset[2] );
+ Storable::DataToStream( theStr, "myMarkerType", int(myMarkerType) );
+ Storable::DataToStream( theStr, "myMarkerScale", int(myMarkerScale) );
+ Storable::DataToStream( theStr, "myMarkerId", myMarkerId );
}
theActor->SetPrs3d(this);
theActor->SetShrinkFactor(aResourceMgr->integerValue("VISU", "shrink_factor", 80)/100.);
theActor->SetPosition(myOffset[0],myOffset[1],myOffset[2]);
+
+ if( myMarkerType != VISU::MT_USER )
+ theActor->SetMarkerStd( (VTK::MarkerType)myMarkerType, (VTK::MarkerScale)myMarkerScale );
+ else if( myMarkerId > 0 ) {
+ VTK::MarkerTexture aMarkerTexture;
+ if( LoadMarkerTexture( myMarkerId, aMarkerTexture ) )
+ theActor->SetMarkerTexture( myMarkerId, aMarkerTexture );
+ }
+
theActor->SetPipeLine(GetActorPipeLine());
if(theActor->GetPipeLine() != GetPipeLine()){
// To decrease actor'ss pipeline reference counter
if(VISU_Actor* anActor = dynamic_cast<VISU_Actor*>(theActor)){
if(MYDEBUG) MESSAGE("Prs3d_i::UpdateActor - this = "<<this<<"; theActor = "<<anActor);
anActor->SetPosition(myOffset[0],myOffset[1],myOffset[2]);
+
+ if( myMarkerType != VISU::MT_USER )
+ anActor->SetMarkerStd( (VTK::MarkerType)myMarkerType, (VTK::MarkerScale)myMarkerScale );
+ else if( myMarkerId > 0 ) {
+ VTK::MarkerTexture aMarkerTexture;
+ if( LoadMarkerTexture( myMarkerId, aMarkerTexture ) )
+ anActor->SetMarkerTexture( myMarkerId, aMarkerTexture );
+ }
+
anActor->ShallowCopyPL(GetPipeLine());
anActor->highlight(anActor->isHighlighted());
}
{
myIsForcedHidden = theFlag;
}
+
+//----------------------------------------------------------------------------
+void
+VISU::Prs3d_i
+::SetMarkerStd(VISU::MarkerType theMarkerType, VISU::MarkerScale theMarkerScale)
+{
+ myMarkerType = theMarkerType;
+ myMarkerScale = theMarkerScale;
+ myParamsTime.Modified();
+}
+
+//----------------------------------------------------------------------------
+void
+VISU::Prs3d_i
+::SetMarkerTexture(CORBA::Long theMarkerId)
+{
+ myMarkerType = VISU::MT_USER;
+ myMarkerId = theMarkerId;
+ myParamsTime.Modified();
+}
+
+//----------------------------------------------------------------------------
+VISU::MarkerType
+VISU::Prs3d_i
+::GetMarkerType()
+{
+ return myMarkerType;
+}
+
+//----------------------------------------------------------------------------
+VISU::MarkerScale
+VISU::Prs3d_i
+::GetMarkerScale()
+{
+ return myMarkerScale;
+}
+
+//----------------------------------------------------------------------------
+CORBA::Long
+VISU::Prs3d_i
+::GetMarkerTexture()
+{
+ return myMarkerId;
+}
+
+//----------------------------------------------------------------------------
+bool
+VISU::Prs3d_i
+::LoadMarkerTexture(int theMarkerId, VTK::MarkerTexture& theMarkerTexture)
+{
+ VISU::VISU_Gen_i* aVisuGen = VISU::VISU_Gen_i::GetVisuGenImpl();
+ if( !aVisuGen )
+ return false;
+
+ const VISU::StudyId2MarkerMap& aStudyId2MarkerMap = aVisuGen->GetMarkerMap();
+
+ const SALOMEDS::Study_var& aStudy = GetStudyDocument();
+ if( CORBA::is_nil( aStudy.in() ) )
+ return false;
+
+ int aStudyId = aStudy->StudyId();
+ VISU::StudyId2MarkerMap::const_iterator aStudyId2MarkerIter = aStudyId2MarkerMap.find( aStudyId );
+ if( aStudyId2MarkerIter == aStudyId2MarkerMap.end() )
+ return false;
+
+ VTK::MarkerMap aMarkerMap = aStudyId2MarkerIter->second;
+ VTK::MarkerMap::const_iterator aMarkerIter = aMarkerMap.find( theMarkerId );
+ if( aMarkerIter == aMarkerMap.end() )
+ return false;
+
+ theMarkerTexture = aMarkerIter->second.second;
+}
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File : VISU_PrsObject_i.hxx
// Author : Alexey PETROV
CORBA::Float& theDy,
CORBA::Float& theDz);
+ //----------------------------------------------------------------------------
+ //! Set standard point marker for the object
+ virtual
+ void
+ SetMarkerStd(VISU::MarkerType theMarkerType, VISU::MarkerScale theMarkerScale);
+
+ //! Set custom point marker
+ virtual
+ void
+ SetMarkerTexture(CORBA::Long theTextureId);
+
+ //! Get type of the point marker
+ virtual
+ VISU::MarkerType
+ GetMarkerType();
+
+ //! Get scale of the point marker
+ virtual
+ VISU::MarkerScale
+ GetMarkerScale();
+
+ //! Get texture identifier of the point marker
+ virtual
+ CORBA::Long
+ GetMarkerTexture();
+
//----------------------------------------------------------------------------
//! Gets memory size actually used by the presentation (Mb).
virtual
void
CheckDataSet();
+ bool
+ LoadMarkerTexture(int theMarkerId, VTK::MarkerTexture& theMarkerTexture);
+
protected:
vtkTimeStamp myUpdateTime;
vtkTimeStamp myParamsTime;
CORBA::Float myOffset[3];
+ VISU::MarkerType myMarkerType;
+ VISU::MarkerScale myMarkerScale;
+ int myMarkerId;
+
boost::signal0<void> myUpdateActorsSignal;
boost::signal0<void> myRemoveActorsFromRendererSignal;
vtkSmartPointer<vtkActorCollection> myActorCollection;
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File : VISU_PrsObject_i.cxx
// Author : Alexey PETROV
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File : VISU_PrsObject_i.hxx
// Author : Alexey PETROV
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File : VISU_ResultUtils.cc
// Author : Alexey PETROV
const TFamilySet& aFamilySet = aGroup->myFamilySet;
TFamilySet::const_iterator aFamilyIter = aFamilySet.begin();
for(; aFamilyIter != aFamilySet.end(); aFamilyIter++){
- const PFamily& aFamily = *aFamilyIter;
+ const PFamily& aFamily = (*aFamilyIter).second;
CreateReference(theStudy,
aGroup->myEntry,
aFamily->myEntry);
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File : VISU_ResultUtils.hh
// Author : Alexey PETROV
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File : VISU_Result_i.cc
// Author : Alexey PETROV
GetResult(SALOMEDS::Study_ptr theStudy,
const std::string& theResultEntry)
{
- if(CORBA::is_nil(theStudy))
- return NULL;
-
- SALOMEDS::SObject_var aSObject = theStudy->FindObjectID(theResultEntry.c_str());
- CORBA::Object_var anObject = SObjectToObject(aSObject);
- return dynamic_cast<VISU::Result_i*>(GetServant(anObject).in());
+ Result_i* result = NULL;
+ if (!CORBA::is_nil(theStudy)) {
+ SALOMEDS::SComponent_var aSComponent = theStudy->FindComponent("VISU");
+ if (!CORBA::is_nil(aSComponent)) {
+ std::string compid = aSComponent->GetID();
+ std::string aResultEntry = theResultEntry;
+ if (theResultEntry.substr(0, compid.length()) != compid) aResultEntry = compid + theResultEntry.substr(compid.length());
+ SALOMEDS::SObject_var aSObject = theStudy->FindObjectID(aResultEntry.c_str());
+ CORBA::Object_var anObject = SObjectToObject(aSObject);
+ result = dynamic_cast<VISU::Result_i*>(GetServant(anObject).in());
+ }
+ }
+ return result;
}
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File : VISU_Result_i.hh
// Author : Alexey PETROV
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File : VISU_PrsObject_i.cxx
// Author : Alexey PETROV
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File : VISU_PrsObject_i.hxx
// Author : Alexey PETROV
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File : VISU_PrsObject_i.cxx
// Author : Alexey PETROV
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File : VISU_PrsObject_i.hxx
// Author : Alexey PETROV
--- /dev/null
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+// File : VISU_TableDlg.cxx
+// Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com)
+//
+#include "VISU_TableDlg.h"
+
+#include "VISU_Table_i.hh"
+
+#include "SUIT_Tools.h"
+#include "SUIT_MessageBox.h"
+#include "SUIT_ResourceMgr.h"
+#include "SUIT_Session.h"
+
+#include "LightApp_Application.h"
+
+#include "CAM_Module.h"
+
+#include "SALOMEDSClient_Study.hxx"
+#include "SALOMEDSClient_GenericAttribute.hxx"
+#include "SALOMEDSClient_AttributeTableOfInteger.hxx"
+#include "SALOMEDSClient_AttributeTableOfReal.hxx"
+#include "SALOMEDSClient_StudyBuilder.hxx"
+
+#include <QLayout>
+#include <QTableWidget>
+#include <QTabWidget>
+#include <QList>
+#include <QInputDialog>
+#include <QLabel>
+#include <QIntValidator>
+#include <QDoubleValidator>
+#include <QKeyEvent>
+#include <QHeaderView>
+#include <QPushButton>
+#include <QLineEdit>
+#include <QCheckBox>
+#include <QComboBox>
+
+#include "utilities.h"
+
+const int MARGIN_SIZE = 11;
+const int SPACING_SIZE = 6;
+const int MIN_TABLE_WIDTH = 200;
+const int MIN_TABLE_HEIGHT = 200;
+
+NumDelegateItem::NumDelegateItem( QObject* parent, NumValidator mode )
+ : QItemDelegate( parent ),
+ myMode( mode )
+{
+}
+
+NumDelegateItem::~NumDelegateItem()
+{
+}
+
+QWidget* NumDelegateItem::createEditor( QWidget* parent,
+ const QStyleOptionViewItem& option,
+ const QModelIndex& index ) const
+{
+ QLineEdit* editor = new QLineEdit( parent );
+ switch ( myMode )
+ {
+ case NV_Int:
+ editor->setValidator( new QIntValidator( editor ) );
+ break;
+ case NV_Real:
+ editor->setValidator( new QDoubleValidator( editor ) );
+ break;
+ default:
+ break;
+ }
+ return editor;
+}
+
+void NumDelegateItem::setEditorData( QWidget* editor,
+ const QModelIndex& index ) const
+{
+ QLineEdit* aLE = qobject_cast<QLineEdit*>( editor );
+ if ( !aLE )
+ return;
+
+ switch ( myMode )
+ {
+ case NV_Int:
+ {
+ int value = index.model()->data( index, Qt::DisplayRole ).toInt();
+ aLE->setText( QString("%1").arg( value ) );
+ break;
+ }
+ case NV_Real:
+ {
+ double value = index.model()->data(index, Qt::DisplayRole).toDouble();
+ aLE->setText( QString("%1").arg( value ) );
+ break;
+ }
+ default:
+ aLE->setText( index.model()->data( index, Qt::DisplayRole ).toString() );
+ break;
+ }
+}
+
+class VISU_TableDlg::WidgetCointainer : public QWidget
+{
+public:
+ WidgetCointainer( QWidget* parent, Qt::Orientation o, int lm, int tm, int rm, int bm, int s )
+ : QWidget( parent )
+ {
+ QLayout* l = o == Qt::Horizontal ? (QLayout*)( new QHBoxLayout( this ) ) : ( QLayout* )( new QVBoxLayout( this ) );
+ l->setContentsMargins( lm, tm, rm, bm );
+ l->setSpacing( s );
+ setLayout( l );
+ }
+ void addWidget( QWidget* w )
+ {
+ if ( w ) {
+ QHBoxLayout* hl = qobject_cast<QHBoxLayout*>( layout() );
+ QVBoxLayout* wl = qobject_cast<QVBoxLayout*>( layout() );
+ if ( hl ) hl->addWidget( w );
+ else if ( wl ) wl->addWidget( w );
+ }
+ }
+ void addSpacing( int s )
+ {
+ if ( s > 0 ) {
+ QHBoxLayout* hl = qobject_cast<QHBoxLayout*>( layout() );
+ QVBoxLayout* wl = qobject_cast<QVBoxLayout*>( layout() );
+ if ( hl ) hl->addSpacing( s );
+ else if ( wl ) wl->addSpacing( s );
+ }
+ }
+ void addStretch( int s )
+ {
+ if ( s >= 0 ) {
+ QHBoxLayout* hl = qobject_cast<QHBoxLayout*>( layout() );
+ QVBoxLayout* wl = qobject_cast<QVBoxLayout*>( layout() );
+ if ( hl ) hl->addStretch( s );
+ else if ( wl ) wl->addStretch( s );
+ }
+ }
+};
+
+/*class VISU_Table : public QTableWidget {
+public:
+ VISU_Table( Orientation orient, QWidget* parent = 0 )
+ : QTableWidget( parent ), myValidator( 0 ), myOrientation( orient ) {}
+ VISU_Table( Orientation orient, int numRows, int numCols, QWidget* parent = 0 )
+ : QTableWidget( numRows, numCols, parent ), 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 == Qt::Horizontal && col == 0 ) || ( myOrientation == Qt::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;
+ };*/
+
+QString VISU_TableDlg::tableTitle( int type )
+{
+ QString tlt;
+ switch ( type ) {
+ case ttInt: tlt = tr( "TABLE_OF_INTEGER_TLT" ); break;
+ case ttReal: tlt = tr( "TABLE_OF_REAL_TLT" ); break;
+ default: tlt = tr( "TABLE_UNKNOWN_TLT" ); break;
+ }
+ return tlt;
+}
+/*!
+ Constructor
+*/
+VISU_TableDlg::VISU_TableDlg( QWidget* parent,
+ _PTR(Study) study,
+ VISU::Table_i* table,
+ bool allowEdition,
+ int which,
+ Qt::Orientation orient,
+ bool showColumnTitles )
+ : QDialog( parent, Qt::WindowTitleHint | Qt::WindowSystemMenuHint ),
+ myStudy( study ), myTable( table ), myEditCheck( 0 ), myUpdateCheck( 0 )
+{
+ allowEdition = true; //////////////////////////////////
+ setWindowTitle( tr( "VIEW_TABLE_TLT" ) );
+ setSizeGripEnabled( true );
+
+ bool bHasIntTable = false;
+ bool bHasRealTable = false;
+ if ( myStudy && myTable ) {
+ _PTR(SObject) aSObject = myStudy->FindObjectID( myTable->GetObjectEntry() );
+ if ( aSObject ) {
+ _PTR(GenericAttribute) anAttr;
+ bHasIntTable = aSObject->FindAttribute( anAttr, "AttributeTableOfInteger" );
+ bHasRealTable = aSObject->FindAttribute( anAttr, "AttributeTableOfReal" );
+ }
+ }
+
+ if ( allowEdition ) {
+ myEditCheck = new QCheckBox( tr( "ALLOW_EDIT_CHECK" ), this );
+ myUpdateCheck = new QCheckBox( tr( "DO_UPDATE_CHECK" ), this );
+ connect( myEditCheck, SIGNAL( toggled( bool ) ), myUpdateCheck, SLOT( setEnabled( bool ) ) );
+ myUpdateCheck->setEnabled( false );
+ myUpdateCheck->hide(); // the feature has been temporarily disabled
+ }
+
+ QWidget* top = 0;
+
+ if ( which == ttInt || which == ttAll || which == ttAuto && bHasIntTable ) {
+ myTableMap[ ttInt ] = new TableWidget( this, orient );
+ myTableMap[ ttInt ]->initialize( myStudy, myTable, ttInt );
+ myTableMap[ ttInt ]->setEditEnabled( false );
+ myTableMap[ ttInt ]->showColumnTitles( showColumnTitles );
+ if ( myEditCheck )
+ connect( myEditCheck, SIGNAL( toggled( bool ) ), myTableMap[ ttInt ], SLOT( setEditEnabled( bool ) ) );
+ }
+ if ( which == ttReal || which == ttAll || which == ttAuto && bHasRealTable ) {
+ myTableMap[ ttReal ] = new TableWidget( this, orient );
+ myTableMap[ ttReal ]->initialize( myStudy, myTable, ttReal );
+ myTableMap[ ttReal ]->setEditEnabled( false );
+ myTableMap[ ttReal ]->showColumnTitles( showColumnTitles );
+ if ( myEditCheck )
+ connect( myEditCheck, SIGNAL( toggled( bool ) ), myTableMap[ ttReal ], SLOT( setEditEnabled( bool ) ) );
+ }
+
+ if ( myTableMap.count() > 1 ) {
+ QTabWidget* tw = new QTabWidget( this );
+ for ( int i = ttInt; i < ttAll; i++ ) {
+ if ( myTableMap.contains( i ) ) {
+ tw->addTab( myTableMap[ i ], tableTitle( i ) );
+ myTableMap[ i ]->layout()->setMargin( MARGIN_SIZE );
+ }
+ }
+ top = tw;
+ }
+ else if ( myTableMap.count() == 1 ) {
+ top = myTableMap[myTableMap.keys().first()];
+ }
+ else {
+ QLabel* dumbLabel = new QLabel( tr( "ERR_TABLE_NOT_AVAILABLE" ), this );
+ dumbLabel->setAlignment( Qt::AlignCenter );
+ top = dumbLabel;
+ }
+
+ myOKBtn = new QPushButton( tr( "BUT_OK" ), this );
+ myHelpBtn = new QPushButton( tr( "BUT_HELP" ), this );
+
+ QHBoxLayout* btnLayout = new QHBoxLayout;
+ btnLayout->setMargin( 0 );
+ btnLayout->setSpacing( SPACING_SIZE );
+
+ btnLayout->addWidget( myOKBtn );
+ btnLayout->addStretch( 20 );
+ btnLayout->addWidget( myHelpBtn );
+ connect( myOKBtn, SIGNAL( clicked() ), this, SLOT( close() ) );
+ connect( myHelpBtn, SIGNAL( clicked() ), this, SLOT( help() ) );
+
+ QVBoxLayout* mainLayout = new QVBoxLayout( this );
+ mainLayout->setMargin( MARGIN_SIZE );
+ mainLayout->setSpacing( SPACING_SIZE );
+
+ if ( myEditCheck ) {
+ QHBoxLayout* checkLayout = new QHBoxLayout;
+ checkLayout->setMargin( 0 );
+ checkLayout->setSpacing( SPACING_SIZE );
+ checkLayout->addWidget( myEditCheck );
+ checkLayout->addWidget( myUpdateCheck );
+ mainLayout->addLayout( checkLayout );
+
+ if ( LightApp_Application* app = ( LightApp_Application* )SUIT_Session::session()->activeApplication() ) {
+ int anEnableEditing = app->resourceMgr()->booleanValue( "VISU", "tables_enable_editing", false );
+ myEditCheck->setChecked( anEnableEditing );
+ }
+ }
+ mainLayout->addWidget( top );
+ mainLayout->addLayout( btnLayout );
+
+ resize( 500, 400 );
+ SUIT_Tools::centerWidget( this, parent );
+}
+
+/*!
+ Destructor
+*/
+VISU_TableDlg::~VISU_TableDlg()
+{
+}
+
+/*!
+ <OK> button slot, saves table(s)
+ Called only in create/edit mode ( <edit> parameter for constructor is true )
+*/
+/*
+void VISU_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 ( myTableMap.contains( ttInt ) ) {
+ builder->RemoveAttribute( myObject, "AttributeTableOfInteger" );
+ tblIntAttr = builder->FindOrCreateAttribute( myObject, "AttributeTableOfInteger" );
+
+ int i;
+ int nbRows = myTableMap[ ttInt ]->getNumRows();
+ int nbCols = myTableMap[ ttInt ]->getNumCols();
+ QString tlt = myTableMap[ ttInt ]->getTableTitle();
+ QStringList rowTitles, colTitles, units;
+ myTableMap[ ttInt ]->getRowTitles( rowTitles );
+ myTableMap[ ttInt ]->getColTitles( colTitles );
+ myTableMap[ ttInt ]->getUnits( units );
+
+ if ( nbRows > 0) {
+ // data
+ int nRow = 0;
+ tblIntAttr->SetNbColumns( nbCols );
+ for ( i = 0; i < nbRows; i++ ) {
+ QStringList data;
+ myTableMap[ ttInt ]->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() ? "" : (const char*)rowTitles[ i ].toLatin1() );
+ // set row unit
+ tblIntAttr->SetRowUnit( nRow+1, units[ i ].isNull() ? "" : (const char*)units[ i ].toLatin1() );
+ 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() ? "" : (const char*)colTitles[ i ].toLatin1() );
+ }
+ }
+ // title
+ tblIntAttr->SetTitle( (const char*)myTableMap[ ttInt ]->getTableTitle().toLatin1() );
+ }
+ if ( myTableMap.contains( ttReal ) ) {
+ builder->RemoveAttribute( myObject, "AttributeTableOfReal" );
+ tblRealAttr = builder->FindOrCreateAttribute( myObject, "AttributeTableOfReal" );
+
+ int i;
+ int nbRows = myTableMap[ ttReal ]->getNumRows();
+ int nbCols = myTableMap[ ttReal ]->getNumCols();
+ QString tlt = myTableMap[ ttReal ]->getTableTitle();
+ QStringList rowTitles, colTitles, units;
+ myTableMap[ ttReal ]->getRowTitles( rowTitles );
+ myTableMap[ ttReal ]->getColTitles( colTitles );
+ myTableMap[ ttReal ]->getUnits( units );
+
+ if ( nbRows > 0) {
+ // data
+ int nRow = 0;
+ tblRealAttr->SetNbColumns( nbCols );
+ for ( i = 0; i < nbRows; i++ ) {
+ QStringList data;
+ myTableMap[ ttReal ]->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() ? "" : (const char*)rowTitles[ i ].toLatin1() );
+ // set row unit
+ tblRealAttr->SetRowUnit( nRow+1, units[ i ].isNull() ? "" : (const char*)units[ i ].toLatin1() );
+ 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() ? "" : (const char*)colTitles[ i ].toLatin1() );
+ }
+ }
+ // title
+ tblRealAttr->SetTitle( (const char*)myTableMap[ ttReal ]->getTableTitle().toLatin1() );
+ }
+ if ( myTableMap.contains( ttInt ) || myTableMap.contains( ttReal ) )
+ builder->CommitCommand(); // commit transaction !!!!!!!!!!!!!!!!!!!!!!!!!!!
+ else
+ builder->AbortCommand(); // abort transaction !!!!!!!!!!!!!!!!!!!!!!!!!!!
+ }
+ catch( ... ) {
+ MESSAGE("VISU_TableDlg::onOK : Exception has been caught !!!");
+ builder->AbortCommand(); // abort transaction !!!!!!!!!!!!!!!!!!!!!!!!!!!
+ done = false;
+ SUIT_MessageBox::critical ( this, tr("ERR_ERROR"), tr("ERR_APP_EXCEPTION") );
+ }
+ }
+ }
+ if ( done )
+ accept();
+}
+*/
+
+/*!
+ <Help> button slot, shows corresponding help page
+*/
+void VISU_TableDlg::help()
+{
+ QString aHelpFileName = "table_presentations_page.html";
+ LightApp_Application* app = (LightApp_Application*)(SUIT_Session::session()->activeApplication());
+ if (app)
+ app->onHelpContextModule(app->activeModule() ? app->moduleName(app->activeModule()->moduleName()) : QString(""), aHelpFileName);
+ else {
+ QString platform;
+#ifdef WIN32
+ platform = "winapplication";
+#else
+ platform = "application";
+#endif
+ SUIT_MessageBox::warning( this,
+ QObject::tr("WRN_WARNING"),
+ QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
+ arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(aHelpFileName) );
+ }
+}
+
+/*!
+ Provides help on F1 button click
+*/
+void VISU_TableDlg::keyPressEvent( QKeyEvent* e )
+{
+ QDialog::keyPressEvent( e );
+ if ( e->isAccepted() )
+ return;
+
+ if ( e->key() == Qt::Key_F1 ) {
+ e->accept();
+ help();
+ }
+}
+
+/*!
+ Constructor
+*/
+VISU_TableDlg::TableWidget::TableWidget( QWidget* parent,
+ Qt::Orientation orientation )
+ : QWidget( parent ), myOrientation( orientation )
+{
+ myTitleEdit = new QLineEdit( this );
+
+ myTable = new QTableWidget( 5, 5, this );
+ myTable->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ) );
+ myTable->setMinimumSize( MIN_TABLE_WIDTH, MIN_TABLE_HEIGHT );
+ myTable->setSelectionMode( QAbstractItemView::SingleSelection );
+ myTable->setShowGrid( true );
+ myTable->horizontalHeader()->setMovable( false );
+ myTable->verticalHeader()->setMovable( false );
+ myTable->setDragEnabled( false );
+
+ myAdjustBtn = new QPushButton( VISU_TableDlg::tr( "ADJUST_CELLS_BTN" ), this );
+ myAddRowBtn = new QPushButton( VISU_TableDlg::tr( "ADD_ROW_BTN" ), this );
+ myDelRowBtn = new QPushButton( VISU_TableDlg::tr( "REMOVE_ROW_BTN" ), this );
+ myAddColBtn = new QPushButton( VISU_TableDlg::tr( "ADD_COLUMN_BTN" ), this );
+ myDelColBtn = new QPushButton( VISU_TableDlg::tr( "REMOVE_COLUMN_BTN" ), this );
+ mySelectAllBtn = new QPushButton( VISU_TableDlg::tr( "SELECT_ALL_BTN" ), this );
+ myClearBtn = new QPushButton( VISU_TableDlg::tr( "CLEAR_BTN" ), this );
+
+ mySortPolicyLabel = new QLabel( VISU_TableDlg::tr( "VISU_TABLES_SORT_POLICY" ), this );
+ mySortPolicyCombo = new QComboBox( this );
+ mySortPolicyCombo->insertItems( 0, QStringList() <<
+ VISU_TableDlg::tr( "VISU_TABLES_EMPTY_LOWEST" ) <<
+ VISU_TableDlg::tr( "VISU_TABLES_EMPTY_HIGHEST" ) <<
+ VISU_TableDlg::tr( "VISU_TABLES_EMPTY_FIRST" ) <<
+ VISU_TableDlg::tr( "VISU_TABLES_EMPTY_LAST" ) <<
+ VISU_TableDlg::tr( "VISU_TABLES_EMPTY_IGNORE" ) );
+
+ if ( LightApp_Application* app = ( LightApp_Application* )SUIT_Session::session()->activeApplication() ) {
+ int aSortPolicy = app->resourceMgr()->integerValue( "VISU", "tables_sort_policy", 3 );
+ mySortPolicyCombo->setCurrentIndex( aSortPolicy );
+ }
+
+ // the features has been temporarily disabled
+ myAddRowBtn->hide();
+ myDelRowBtn->hide();
+ myAddColBtn->hide();
+ myDelColBtn->hide();
+ mySelectAllBtn->hide();
+ myClearBtn->hide();
+
+ QVBoxLayout* btnLayout = new QVBoxLayout;
+ btnLayout->setMargin( 0 );
+ btnLayout->setSpacing( SPACING_SIZE );
+ btnLayout->addWidget( myAdjustBtn );
+ btnLayout->addStretch( 20 );
+ btnLayout->addWidget( myAddRowBtn );
+ btnLayout->addWidget( myDelRowBtn );
+ btnLayout->addWidget( myAddColBtn );
+ btnLayout->addWidget( myDelColBtn );
+ btnLayout->addStretch( 20 );
+ btnLayout->addWidget( mySelectAllBtn );
+ btnLayout->addWidget( myClearBtn );
+
+ QHBoxLayout* sortLayout = new QHBoxLayout;
+ sortLayout->setMargin( 0 );
+ sortLayout->setSpacing( SPACING_SIZE );
+ sortLayout->addWidget( mySortPolicyLabel );
+ sortLayout->addWidget( mySortPolicyCombo );
+ sortLayout->addStretch( 1 );
+
+ QGridLayout* mainLayout = new QGridLayout( this );
+ mainLayout->setMargin( 0 );
+ mainLayout->setSpacing( SPACING_SIZE );
+ mainLayout->addWidget( myTitleEdit, 0, 0, 1, 2 );
+ mainLayout->addWidget( myTable, 1, 0 );
+ mainLayout->addLayout( btnLayout, 1, 1 );
+ mainLayout->addLayout( sortLayout, 2, 0, 1, 2 );
+
+ connect( myTable, SIGNAL( itemSelectionChanged() ),
+ this, SLOT( updateButtonsState() ) );
+ connect( myTable, SIGNAL( currentItemChanged( QTableWidgetItem*, QTableWidgetItem* ) ),
+ 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() ) );
+ connect( myTable->horizontalHeader(), SIGNAL( sectionClicked( int ) ),
+ this, SLOT( columnClicked( int ) ) );
+ connect( myTable->verticalHeader(), SIGNAL( sectionClicked( int ) ),
+ this, SLOT( rowClicked( int ) ) );
+ myTable->horizontalHeader()->installEventFilter( this );
+ myTable->verticalHeader()->installEventFilter( this );
+ myTable->installEventFilter( this );
+
+ updateButtonsState();
+}
+
+/*!
+ Destructor
+*/
+VISU_TableDlg::TableWidget::~TableWidget()
+{
+}
+
+/*!
+ Initialize widget
+*/
+void VISU_TableDlg::TableWidget::initialize( _PTR(Study) study, VISU::Table_i* table, int type )
+{
+ myStudy = study;
+ myTableObj = table;
+ myType = type;
+
+ setUnitsTitle( VISU_TableDlg::tr( "UNITS_TLT" ) );
+ setEditEnabled( false );
+ showColumnTitles( false );
+
+ updateTableFromServant();
+ updateButtonsState();
+}
+
+void VISU_TableDlg::TableWidget::updateTableFromServant()
+{
+ _PTR(SObject) aSObject = myStudy->FindObjectID( myTableObj->GetObjectEntry() );
+ if ( aSObject ) {
+ int i, j;
+ switch ( myType ) {
+ case ttInt:
+ myTable->setItemDelegate( new NumDelegateItem( this, NumDelegateItem::NV_Int ) );
+ if ( aSObject->FindAttribute( myAttr, "AttributeTableOfInteger" ) ) {
+ _PTR(AttributeTableOfInteger) intAttr = myAttr;
+ try {
+ // title
+ setTableTitle( intAttr->GetTitle().c_str() );
+ // nb of rows & cols
+ int nbRows = intAttr->GetNbRows() ;
+ int nbCols = intAttr->GetNbColumns();
+ setNumRows( nbRows );
+ setNumCols( nbCols );
+ // rows titles
+ QStringList strlist;
+ std::vector<std::string> titles = intAttr->GetRowTitles();
+ for ( i = 0; i < nbRows; i++ ) {
+ if ( titles.size() > 0 )
+ strlist.append( titles[i].c_str() );
+ else
+ strlist.append( "" );
+ }
+ setRowTitles( strlist );
+ // columns titles
+ strlist.clear();
+ titles = intAttr->GetColumnTitles();
+ for ( i = 0; i < nbCols; i++ ) {
+ if ( titles.size() > 0 )
+ strlist.append( titles[i].c_str() );
+ else
+ strlist.append( "" );
+ }
+ setColTitles( strlist );
+ // units
+ strlist.clear();
+ titles = intAttr->GetRowUnits();
+ if ( titles.size() > 0 ) {
+ for ( i = 0; i < nbRows; i++ )
+ strlist.append( titles[i].c_str() );
+ setUnits( strlist );
+ }
+ // data
+ for ( i = 1; i <= nbRows; i++ ) {
+ strlist.clear();
+ for ( j = 1; j <= nbCols; j++ ) {
+ if ( intAttr->HasValue( i, j ) )
+ strlist.append( QString::number( intAttr->GetValue( i, j ) ) );
+ else
+ strlist.append( QString::null );
+ }
+ setRowData( i-1, strlist );
+ }
+ adjustTable();
+ }
+ catch( ... ) {
+ MESSAGE("VISU_TableDlg::TableWidget::initialize : Exception has been caught !!!");
+ }
+ }
+ break;
+ case ttReal:
+ myTable->setItemDelegate( new NumDelegateItem( this, NumDelegateItem::NV_Real ) );
+ if ( aSObject->FindAttribute( myAttr, "AttributeTableOfReal" ) ) {
+ _PTR(AttributeTableOfReal) realAttr = myAttr;
+ try {
+ // title
+ setTableTitle( realAttr->GetTitle().c_str() );
+ // nb of rows & cols
+ int nbRows = realAttr->GetNbRows() ;
+ int nbCols = realAttr->GetNbColumns();
+ setNumRows( nbRows );
+ setNumCols( nbCols );
+ // rows titles
+ QStringList strlist;
+ std::vector<std::string> titles = realAttr->GetRowTitles();
+ for ( i = 0; i < nbRows; i++ ) {
+ if ( titles.size() > 0 )
+ strlist.append( titles[i].c_str() );
+ else
+ strlist.append( "" );
+ }
+ setRowTitles( strlist );
+ // columns titles
+ strlist.clear();
+ titles = realAttr->GetColumnTitles();
+ for ( i = 0; i < nbCols; i++ ) {
+ if ( titles.size() > 0 )
+ strlist.append( titles[i].c_str() );
+ else
+ strlist.append( "" );
+ }
+ setColTitles( strlist );
+ // units
+ strlist.clear();
+ titles = realAttr->GetRowUnits();
+ if ( titles.size() > 0 ) {
+ for ( i = 0; i < nbRows; i++ )
+ strlist.append( titles[i].c_str() );
+ setUnits( strlist );
+ }
+ // data
+ for ( i = 1; i <= nbRows; i++ ) {
+ strlist.clear();
+ for ( j = 1; j <= nbCols; j++ ) {
+ if ( realAttr->HasValue( i, j ) )
+ strlist.append( QString::number( realAttr->GetValue( i, j ) ) );
+ else
+ strlist.append( QString::null );
+ }
+ setRowData( i-1, strlist );
+ }
+ adjustTable();
+ }
+ catch( ... ) {
+ MESSAGE("VISU_TableDlg::TableWidget::initialize : Exception has been caught !!!");
+ }
+ }
+ break;
+ default:
+ break;
+ }
+ }
+}
+
+/*!
+ Enable / disable editing
+*/
+void VISU_TableDlg::TableWidget::setEditEnabled( bool enable )
+{
+ if( !enable ) {
+ myTable->horizontalHeader()->setSortIndicatorShown( false );
+ myTable->verticalHeader()->setSortIndicatorShown( false );
+ adjustTable();
+ }
+
+ mySortPolicyLabel->setEnabled( enable );
+ mySortPolicyCombo->setEnabled( enable );
+
+ // the rest features have been temporarily disabled
+ enable = false;
+
+ myTitleEdit->setReadOnly( !enable );
+ myTable->setEditTriggers( enable ?
+ QAbstractItemView::DoubleClicked |
+ QAbstractItemView::SelectedClicked |
+ QAbstractItemView::EditKeyPressed :
+ QAbstractItemView::NoEditTriggers );
+ myAddRowBtn->setVisible( enable );
+ myDelRowBtn->setVisible( enable );
+ myAddColBtn->setVisible( enable );
+ myDelColBtn->setVisible( enable );
+ mySelectAllBtn->setVisible( enable );
+ myClearBtn->setVisible( enable );
+}
+
+/*!
+ Show / hide column titles
+*/
+void VISU_TableDlg::TableWidget::showColumnTitles( bool showTitles )
+{
+ if ( myOrientation == Qt::Horizontal )
+ myTable->horizontalHeader()->setVisible( showTitles );
+ else
+ myTable->verticalHeader()->setVisible( showTitles );
+}
+
+/*!
+ Sets table title
+*/
+void VISU_TableDlg::TableWidget::setTableTitle( const QString& title )
+{
+ myTitleEdit->setText( title );
+}
+
+/*!
+ Gets table title
+*/
+QString VISU_TableDlg::TableWidget::getTableTitle()
+{
+ return myTitleEdit->text();
+}
+
+/*!
+ Sets total number of rows
+*/
+void VISU_TableDlg::TableWidget::setNumRows( const int num )
+{
+ myOrientation == Qt::Horizontal ? myTable->setRowCount( num ) : myTable->setColumnCount( num );
+}
+
+/*!
+ Gets total number of rows
+*/
+int VISU_TableDlg::TableWidget::getNumRows()
+{
+ return myOrientation == Qt::Horizontal ? myTable->rowCount() : myTable->columnCount();
+}
+
+/*!
+ Sets total number of columns
+*/
+void VISU_TableDlg::TableWidget::setNumCols( const int num )
+{
+ // !!! first column contains units !!!
+ myOrientation == Qt::Horizontal ? myTable->setColumnCount( num+1 ) : myTable->setRowCount( num+1 );
+// myOrientation == Qt::Horizontal ? myTable->setColumnReadOnly( 0, true ) : myTable->setRowReadOnly( 0, true );
+}
+
+/*!
+ Gets total number of columns
+*/
+int VISU_TableDlg::TableWidget::getNumCols()
+{
+ // !!! first column contains units !!!
+ return myOrientation == Qt::Horizontal ? myTable->columnCount()-1 : myTable->rowCount()-1;
+}
+/*!
+ Sets rows titles
+*/
+void VISU_TableDlg::TableWidget::setRowTitles( QStringList& tlts )
+{
+ QStringList aLabels;
+ for ( int i = 0; i < tlts.count(); i++ )
+ tlts[i].isNull() ? aLabels.append("") : aLabels.append( tlts[i] );
+
+ myOrientation == Qt::Horizontal ?
+ myTable->setVerticalHeaderLabels( aLabels ) :
+ myTable->setHorizontalHeaderLabels( aLabels );
+
+ // myTable->verticalHeader()->setLabel( i, tlts[i] ) :
+ //myTable->horizontalHeader()->setLabel( i, tlts[i] );
+ //}
+}
+/*!
+ Gets rows titles
+*/
+void VISU_TableDlg::TableWidget::getRowTitles( QStringList& tlts )
+{
+ tlts.clear();
+ if ( myOrientation == Qt::Horizontal ) {
+ for ( int i = 0; i < myTable->rowCount(); i++ ) {
+ tlts.append( myTable->verticalHeaderItem(i) ? myTable->verticalHeaderItem(i)->text() : "" );
+ }
+ }
+ else {
+ for ( int i = 0; i < myTable->columnCount(); i++ ) {
+ tlts.append( myTable->horizontalHeaderItem(i) ? myTable->horizontalHeaderItem(i)->text() : "" );
+ }
+ }
+}
+/*!
+ Sets columns titles
+*/
+void VISU_TableDlg::TableWidget::setColTitles( QStringList& tlts )
+{
+ QStringList aLabels;
+
+ // !!! first column contains units !!!
+ aLabels.append(""); // it'll be initialized below - in setUnitsTitle() method
+
+ for ( int i = 0; i < tlts.count(); i++ )
+ tlts[i].isNull() ? aLabels.append("") : aLabels.append( tlts[i] );
+
+ myOrientation == Qt::Horizontal ?
+ myTable->setHorizontalHeaderLabels( aLabels ) :
+ myTable->setVerticalHeaderLabels( aLabels );
+
+ setUnitsTitle( VISU_TableDlg::tr( "UNITS_TLT" ) );
+}
+/*!
+ Sets columns titles
+*/
+void VISU_TableDlg::TableWidget::getColTitles( QStringList& tlts )
+{
+ // !!! first column contains units !!!
+ tlts.clear();
+ if ( myOrientation == Qt::Horizontal ) {
+ for ( int i = 1; i < myTable->columnCount(); i++ ) {
+ tlts.append( myTable->horizontalHeaderItem(i) ? myTable->horizontalHeaderItem(i)->text() : "" );
+ }
+ }
+ else {
+ for ( int i = 1; i < myTable->rowCount(); i++ ) {
+ tlts.append( myTable->verticalHeaderItem(i) ? myTable->verticalHeaderItem(i)->text() : "" );
+ }
+ }
+}
+/*!
+ Sets units title
+*/
+void VISU_TableDlg::TableWidget::setUnitsTitle( const QString& tlt ) {
+ // !!! first column contains units !!!
+ myTable->model()->setHeaderData( 0, myOrientation, QVariant(tlt.isNull() ? "" : tlt), Qt::DisplayRole );
+}
+/*!
+ Sets units
+*/
+void VISU_TableDlg::TableWidget::setUnits( QStringList& units )
+{
+ QAbstractTableModel* aModel = qobject_cast<QAbstractTableModel*>( myTable->model() );
+ if ( aModel )
+ {
+ QModelIndex anIndex;
+ for ( int i = 0; i < units.count(); i++ )
+ {
+ myOrientation == Qt::Horizontal ?
+ anIndex = aModel->index( i, 0 ) :
+ anIndex = aModel->index( 0, i );
+
+ aModel->setData( anIndex, QVariant( units[i].isNull() ? "" : units[i] ) );
+ }
+ }
+}
+/*!
+ Gets units
+*/
+void VISU_TableDlg::TableWidget::getUnits( QStringList& units )
+{
+ units.clear();
+ QAbstractTableModel* aModel = qobject_cast<QAbstractTableModel*>( myTable->model() );
+ if ( aModel )
+ {
+ if ( myOrientation == Qt::Horizontal )
+ {
+ for ( int i = 0; i < myTable->rowCount(); i++ )
+ units.append( aModel->index( i, 0 ).data().toString() );
+ }
+ else {
+ for ( int i = 0; i < myTable->columnCount(); i++ )
+ units.append( aModel->index( 0, i ).data().toString() );
+ }
+ }
+}
+/*!
+ Sets row data
+*/
+void VISU_TableDlg::TableWidget::setRowData( int row, QStringList& data )
+{
+ QAbstractTableModel* aModel = qobject_cast<QAbstractTableModel*>( myTable->model() );
+ if ( aModel )
+ {
+ QModelIndex anIndex;
+ if ( row >= 0 && row < getNumRows() ) {
+ for ( int i = 0; i < data.count(); i++ )
+ {
+ myOrientation == Qt::Horizontal ? anIndex = aModel->index( row, i+1 ) :
+ anIndex = aModel->index( i+1, row );
+ aModel->setData( anIndex, QVariant( data[i] ) );
+
+ }
+ }
+ }
+}
+/*!
+ Gets row data
+*/
+void VISU_TableDlg::TableWidget::getRowData( int row, QStringList& data )
+{
+ data.clear();
+ QAbstractTableModel* aModel = qobject_cast<QAbstractTableModel*>( myTable->model() );
+ if ( aModel )
+ {
+ if ( row >= 0 && row < getNumRows() )
+ {
+ if ( myOrientation == Qt::Horizontal )
+ {
+ for ( int i = 1; i < myTable->columnCount(); i++ )
+ data.append( aModel->index( row, i ).data().toString() );
+ }
+ else {
+ for ( int i = 1; i < myTable->rowCount(); i++ )
+ data.append( aModel->index( i, row ).data().toString() );
+ }
+ }
+ }
+}
+/*!
+ Adjusts table cell to see contents, <Adjust Cells> button slot
+*/
+void VISU_TableDlg::TableWidget::adjustTable()
+{
+ myTable->resizeRowsToContents();
+ myTable->resizeColumnsToContents();
+}
+/*!
+ Called when selection changed in table
+*/
+void VISU_TableDlg::TableWidget::updateButtonsState()
+{
+ if ( myTable->editTriggers() == QAbstractItemView::NoEditTriggers )
+ return;
+ bool bDR = false; // <Delete Row(s)>
+ bool bDC = false; // <Delete Column(s)>
+ bool bSA = false; // <Select All>
+ bool bCT = false; // <Clear>
+ int i;
+ //TO DO column/row selection check
+ /*int c = myOrientation == Qt::Horizontal ? 0 : 1;
+ for ( i = c; i < myTable->rowCount(); i++ ) {
+
+ if ( myTable->isRowSelected( i, true ) )
+ bDR = true;
+ else
+ bSA = true;
+ }
+ c = myOrientation == Qt::Horizontal ? 1 : 0;
+ for ( i = c; i < myTable->columnCount(); i++ ) {
+ if ( myTable->isColumnSelected( i, true ) )
+ bDC = true;
+ else
+ bSA = true;
+ }*/
+ /*int nbSel = myTable->numSelections();
+ for ( i = 0; i < nbSel; i++ ) {
+ QTableSelection ts = myTable->selection( i );
+ for ( int j = ts.topRow(); j < ts.bottomRow()+1; j++) {
+ for ( int k = ts.leftCol(); k < ts.rightCol()+1; k++) {
+ if ( myTable->item( j, k ) )
+ bCT = true;
+ }
+ }
+ }*/
+ QList<QTableWidgetItem*> aSelection = myTable->selectedItems();
+ QList<QTableWidgetItem*>::ConstIterator anIt = aSelection.constBegin(),
+ anEndIt = aSelection.constEnd();
+ for ( ; anIt != anEndIt; anIt++ )
+ {
+ if( *anIt )
+ {
+ bCT = true;
+ break;
+ }
+ }
+
+ if ( myTable->item( myTable->currentRow(), myTable->currentColumn() ) )
+ bCT = true;
+ myDelRowBtn->setEnabled( bDR );
+ myDelColBtn->setEnabled( bDC );
+ mySelectAllBtn->setEnabled( bSA );
+ myClearBtn->setEnabled( bCT );
+}
+/*!
+ <Add row> button slot
+*/
+void VISU_TableDlg::TableWidget::addRow()
+{
+ myTable->insertRow( myTable->rowCount() );
+ updateButtonsState();
+}
+/*!
+ <Add column> button slot
+*/
+void VISU_TableDlg::TableWidget::addCol()
+{
+ myTable->insertColumn( myTable->columnCount() );
+ updateButtonsState();
+}
+/*!
+ <Delete row(s)> button slot
+*/
+void VISU_TableDlg::TableWidget::delRow()
+{
+ //TODO
+ /*int c = myOrientation == Qt::Horizontal ? 0 : 1;
+ QList<int> il;
+ int i;
+ for ( i = c; i < myTable->rowCount(); i++ )
+ if ( myTable->isRowSelected( i, true ) )
+ il.append( i );
+ if ( il.count() > 0 ) {
+ QMemArray<int> ildel( il.count() );
+ for ( i = 0; i < il.count(); i++ )
+ ildel[ i ] = il[ i ];
+ myTable->removeRows( ildel );
+ }*/
+
+ updateButtonsState();
+}
+/*!
+ <Delete column(s)> button slot
+*/
+void VISU_TableDlg::TableWidget::delCol()
+{
+ //TODO
+ /*int c = myOrientation == Qt::Horizontal ? 1 : 0;
+ QValueList<int> il;
+ int i;
+ for ( i = c; i < myTable->numCols(); i++ )
+ if ( myTable->isColumnSelected( i, true ) )
+ il.append( i );
+ if ( il.count() > 0 ) {
+ QMemArray<int> ildel( il.count() );
+ for ( i = 0; i < il.count(); i++ )
+ ildel[ i ] = il[ i ];
+ myTable->removeColumns( ildel );
+ }*/
+ updateButtonsState();
+}
+/*!
+ <Select All> button slot
+*/
+void VISU_TableDlg::TableWidget::selectAll()
+{
+ /*myTable->clearSelection();
+ QTableSelection ts;
+ ts.init( 0, 0 ); ts.expandTo( myTable->numRows()-1, myTable->numCols()-1 );
+ myTable->addSelection( ts );*/
+ myTable->selectAll();
+ updateButtonsState();
+}
+/*!
+ <Clear> button slot
+*/
+void VISU_TableDlg::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 == Qt::Vertical && j == 0 ) {
+// continue; // UNITS
+ }
+ for ( int k = ts.leftCol(); k < ts.rightCol()+1; k++) {
+ if ( myOrientation == Qt::Horizontal && k == 0 ) {
+// continue; // UNITS
+ }
+ myTable->clearCell( j, k );
+ }
+ }
+ }
+ if ( nbSel == 0 )
+ myTable->clearCell( myTable->currentRow(), myTable->currentColumn() );
+ myTable->clearSelection();*/
+ myTable->clearContents();
+ updateButtonsState();
+}
+/*!
+ Column clicked slot
+*/
+void VISU_TableDlg::TableWidget::columnClicked( int column )
+{
+ if ( myTableObj && mySortPolicyCombo->isEnabled() ) {
+ myTableObj->SortByRow( column + 1,
+ ( VISU::SortOrder )myTable->horizontalHeader()->sortIndicatorOrder(),
+ ( VISU::SortPolicy )mySortPolicyCombo->currentIndex() );
+ myTable->horizontalHeader()->setSortIndicatorShown( true );
+ myTable->verticalHeader()->setSortIndicatorShown( false );
+ updateTableFromServant();
+ }
+}
+/*!
+ Row clicked slot
+*/
+void VISU_TableDlg::TableWidget::rowClicked( int row )
+{
+ /* the feature has been temporarily disabled
+ if ( myTableObj && mySortPolicyCombo->isEnabled() && row > 0 ) { // first row contains units
+ myTableObj->SortByColumn( row,
+ ( VISU::SortOrder )myTable->verticalHeader()->sortIndicatorOrder(),
+ ( VISU::SortPolicy )mySortPolicyCombo->currentIndex() );
+ myTable->horizontalHeader()->setSortIndicatorShown( false );
+ myTable->verticalHeader()->setSortIndicatorShown( true );
+ updateTableFromServant();
+ }
+ */
+}
+/*!
+ Event filter - handles titles editing
+*/
+bool VISU_TableDlg::TableWidget::eventFilter( QObject* o, QEvent* e )
+{
+ if ( e->type() == QEvent::MouseButtonDblClick) {
+ //TODO
+ /*QMouseEvent* me = ( QMouseEvent* )e;
+ if ( me->button() == Qt::LeftButton && (myTable->editTriggers() != QAbstractItemView::NoEditTriggers ) ) {
+ 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 == Qt::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 == Qt::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() == Qt::Key_Delete && (myTable->editTriggers() != QAbstractItemView::NoEditTriggers) ) {
+ clearTable();
+ }
+ else if ( ke->key() == Qt::Key_Backspace && (myTable->editTriggers() != QAbstractItemView::NoEditTriggers) ) {
+ clearTable();
+ int i = myTable->currentRow();
+ int j = myTable->currentColumn() - 1;
+ if ( j < 0 ) { j = myTable->columnCount()-1; i--; }
+ if ( i >= 0 && j >= 0 )
+ myTable->setCurrentCell( i, j );
+ }
+ }
+ return QWidget::eventFilter( o, e );
+}
--- /dev/null
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+// File : VISU_TableDlg.h
+// Author : Vadim SANDLER
+// Module : VISU
+//
+#ifndef VISU_TABLEDLG_H
+#define VISU_TABLEDLG_H
+
+#include "VISU_I.hxx"
+
+#include <SALOMEDSClient_Study.hxx>
+
+#include <QDialog>
+#include <QItemDelegate>
+#include <QMap>
+
+class QLabel;
+class QLineEdit;
+class QPushButton;
+class QCheckBox;
+class QComboBox;
+class QTableWidget;
+
+namespace VISU
+{
+ class Table_i;
+}
+
+class VISU_I_EXPORT VISU_TableDlg : public QDialog
+{
+ Q_OBJECT
+
+ class TableWidget;
+ class WidgetCointainer;
+
+ enum { tcTitle, tcTable, tcControls, tcButtons };
+
+public:
+
+ enum { ttNone, ttInt, ttReal, ttAll, ttAuto };
+ enum { teNone = 0x00,
+ teAddRemove = 0x01,
+ teEditData = 0x02,
+ teRowColumn = 0x04,
+ teAll = teAddRemove | teEditData | teRowColumn
+ };
+
+ VISU_TableDlg( QWidget* parent,
+ _PTR(Study) study,
+ VISU::Table_i* table,
+ bool allowEdition = false,
+ int which = ttAuto,
+ Qt::Orientation orient = Qt::Horizontal,
+ bool showColumnTitles = true );
+ ~VISU_TableDlg();
+
+protected:
+ void keyPressEvent( QKeyEvent* e );
+
+private slots:
+ void help();
+
+private:
+ QString tableTitle( int type );
+
+private:
+ typedef QMap<int, TableWidget*> TableMap;
+ typedef QMap<int, WidgetCointainer*> ContMap;
+
+ TableMap myTableMap;
+ ContMap myContMap;
+ QCheckBox* myEditCheck;
+ QCheckBox* myUpdateCheck;
+ QPushButton* myOKBtn;
+ QPushButton* myHelpBtn;
+
+ _PTR(Study) myStudy;
+ VISU::Table_i* myTable;
+};
+
+class VISU_I_EXPORT VISU_TableDlg::TableWidget : public QWidget
+{
+ Q_OBJECT
+
+public:
+ TableWidget( QWidget* parent = 0, Qt::Orientation orientation = Qt::Horizontal );
+ ~TableWidget();
+
+ void initialize( _PTR(Study) study, VISU::Table_i* table, int type );
+
+ 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 );
+
+ bool eventFilter( QObject* o, QEvent* e);
+
+public slots:
+ void setEditEnabled( bool enable );
+ void showColumnTitles( bool showTitles );
+
+ void updateButtonsState();
+ void addRow();
+ void addCol();
+ void delRow();
+ void delCol();
+ void adjustTable();
+ void selectAll();
+ void clearTable();
+
+ void columnClicked( int );
+ void rowClicked( int );
+
+protected:
+ void updateTableFromServant();
+
+private:
+ _PTR(Study) myStudy;
+ VISU::Table_i* myTableObj;
+ _PTR(GenericAttribute) myAttr;
+ int myType;
+
+ QLineEdit* myTitleEdit;
+ QTableWidget* myTable;
+ QPushButton* myAddRowBtn;
+ QPushButton* myAddColBtn;
+ QPushButton* myDelRowBtn;
+ QPushButton* myDelColBtn;
+ QPushButton* myAdjustBtn;
+ QPushButton* mySelectAllBtn;
+ QPushButton* myClearBtn;
+ QLabel* mySortPolicyLabel;
+ QComboBox* mySortPolicyCombo;
+ Qt::Orientation myOrientation;
+};
+
+class VISU_I_EXPORT NumDelegateItem: public QItemDelegate
+{
+public:
+ enum NumValidator{ NV_Int, NV_Real };
+
+ NumDelegateItem( QObject* parent, NumValidator mode = NV_Int );
+ virtual ~NumDelegateItem();
+
+ virtual QWidget* createEditor( QWidget* parent,
+ const QStyleOptionViewItem& option,
+ const QModelIndex& index ) const;
+ virtual void setEditorData( QWidget* editor,
+ const QModelIndex& index ) const;
+private:
+ int myMode;
+};
+
+#endif // VISU_TABLEDLG_H
+
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File : VISU_Table_i.cc
// Author : Vadim SANDLER
return myOrientation;
}
+
+//----------------------------------------------------------------------------
+void
+VISU::Table_i
+::SortRow(CORBA::Long theRow, VISU::SortOrder theSortOrder, VISU::SortPolicy theSortPolicy)
+{
+ SALOMEDS::SObject_var SO = mySObj;
+ SALOMEDS::StudyBuilder_var Builder = GetStudyDocument()->NewBuilder();
+ if ( !SO->_is_nil() ) {
+ SALOMEDS::GenericAttribute_var anAttr;
+ if ( Builder->FindAttribute( SO, anAttr, "AttributeTableOfInteger" ) ) {
+ SALOMEDS::AttributeTableOfInteger_var anInt = SALOMEDS::AttributeTableOfInteger::_narrow( anAttr );
+ anInt->SortRow( theRow, (SALOMEDS::AttributeTable::SortOrder)theSortOrder,
+ (SALOMEDS::AttributeTable::SortPolicy)theSortPolicy );
+ }
+ else if ( Builder->FindAttribute( SO, anAttr, "AttributeTableOfReal" ) ) {
+ SALOMEDS::AttributeTableOfReal_var aReal = SALOMEDS::AttributeTableOfReal::_narrow( anAttr );
+ aReal->SortRow( theRow, (SALOMEDS::AttributeTable::SortOrder)theSortOrder,
+ (SALOMEDS::AttributeTable::SortPolicy)theSortPolicy );
+ }
+ UpdateCurves( std::map<int, int>() );
+ }
+}
+
+//----------------------------------------------------------------------------
+void
+VISU::Table_i
+::SortColumn(CORBA::Long theColumn, VISU::SortOrder theSortOrder, VISU::SortPolicy theSortPolicy)
+{
+ SALOMEDS::SObject_var SO = mySObj;
+ SALOMEDS::StudyBuilder_var Builder = GetStudyDocument()->NewBuilder();
+ if ( !SO->_is_nil() ) {
+ SALOMEDS::GenericAttribute_var anAttr;
+ if ( Builder->FindAttribute( SO, anAttr, "AttributeTableOfInteger" ) ) {
+ SALOMEDS::AttributeTableOfInteger_var anInt = SALOMEDS::AttributeTableOfInteger::_narrow( anAttr );
+ anInt->SortColumn( theColumn, (SALOMEDS::AttributeTable::SortOrder)theSortOrder,
+ (SALOMEDS::AttributeTable::SortPolicy)theSortPolicy );
+ }
+ else if ( Builder->FindAttribute( SO, anAttr, "AttributeTableOfReal" ) ) {
+ SALOMEDS::AttributeTableOfReal_var aReal = SALOMEDS::AttributeTableOfReal::_narrow( anAttr );
+ aReal->SortColumn( theColumn, (SALOMEDS::AttributeTable::SortOrder)theSortOrder,
+ (SALOMEDS::AttributeTable::SortPolicy)theSortPolicy );
+ }
+ UpdateCurves( std::map<int, int>() );
+ }
+}
+
+//----------------------------------------------------------------------------
+void
+VISU::Table_i
+::SortByRow(CORBA::Long theRow, VISU::SortOrder theSortOrder, VISU::SortPolicy theSortPolicy)
+{
+ SALOMEDS::SObject_var SO = mySObj;
+ SALOMEDS::StudyBuilder_var Builder = GetStudyDocument()->NewBuilder();
+ if ( !SO->_is_nil() ) {
+ SALOMEDS::GenericAttribute_var anAttr;
+ if ( Builder->FindAttribute( SO, anAttr, "AttributeTableOfInteger" ) ) {
+ SALOMEDS::AttributeTableOfInteger_var anInt = SALOMEDS::AttributeTableOfInteger::_narrow( anAttr );
+ anInt->SortByRow( theRow, (SALOMEDS::AttributeTable::SortOrder)theSortOrder,
+ (SALOMEDS::AttributeTable::SortPolicy)theSortPolicy );
+ }
+ else if ( Builder->FindAttribute( SO, anAttr, "AttributeTableOfReal" ) ) {
+ SALOMEDS::AttributeTableOfReal_var aReal = SALOMEDS::AttributeTableOfReal::_narrow( anAttr );
+ aReal->SortByRow( theRow, (SALOMEDS::AttributeTable::SortOrder)theSortOrder,
+ (SALOMEDS::AttributeTable::SortPolicy)theSortPolicy );
+ }
+ UpdateCurves( std::map<int, int>() );
+ }
+}
+
+//----------------------------------------------------------------------------
+void
+VISU::Table_i
+::SortByColumn(CORBA::Long theColumn, VISU::SortOrder theSortOrder, VISU::SortPolicy theSortPolicy)
+{
+ SALOMEDS::SObject_var SO = mySObj;
+ SALOMEDS::StudyBuilder_var Builder = GetStudyDocument()->NewBuilder();
+ if ( !SO->_is_nil() ) {
+ SALOMEDS::LongSeq_var aRowIndices;
+ SALOMEDS::GenericAttribute_var anAttr;
+ if ( Builder->FindAttribute( SO, anAttr, "AttributeTableOfInteger" ) ) {
+ SALOMEDS::AttributeTableOfInteger_var anInt = SALOMEDS::AttributeTableOfInteger::_narrow( anAttr );
+ aRowIndices = anInt->SortByColumn( theColumn, (SALOMEDS::AttributeTable::SortOrder)theSortOrder,
+ (SALOMEDS::AttributeTable::SortPolicy)theSortPolicy );
+ }
+ else if ( Builder->FindAttribute( SO, anAttr, "AttributeTableOfReal" ) ) {
+ SALOMEDS::AttributeTableOfReal_var aReal = SALOMEDS::AttributeTableOfReal::_narrow( anAttr );
+ aRowIndices = aReal->SortByColumn( theColumn, (SALOMEDS::AttributeTable::SortOrder)theSortOrder,
+ (SALOMEDS::AttributeTable::SortPolicy)theSortPolicy );
+ }
+ std::map<int, int> aMixData;
+ for ( int i = 0, n = aRowIndices->length(); i < n; i++ )
+ aMixData[ aRowIndices[i] ] = i+1;
+ UpdateCurves( aMixData );
+ }
+}
+
+//----------------------------------------------------------------------------
+void
+VISU::Table_i
+::UpdateCurves(std::map<int,int> theMixData)
+{
+ SALOMEDS::SObject_var SO = mySObj;
+ SALOMEDS::StudyBuilder_var Builder = GetStudyDocument()->NewBuilder();
+ SALOMEDS::ChildIterator_var CI = GetStudyDocument()->NewChildIterator( SO );
+ for ( CI->InitEx( true ); CI->More(); CI->Next() ) {
+ CORBA::Object_var anObj = SObjectToObject( CI->Value() );
+ VISU::Curve_var aCurve = VISU::Curve::_narrow( anObj );
+ if ( !aCurve->_is_nil() ) {
+ if ( VISU::Curve_i* pCurve = dynamic_cast<VISU::Curve_i*>( GetServant( aCurve ).in() ) ) {
+ int aHRow = pCurve->GetHRow(), aVRow = pCurve->GetVRow();
+ if ( theMixData.find( aHRow ) != theMixData.end() )
+ pCurve->SetHRow( theMixData[ aHRow ] );
+ if ( theMixData.find( aVRow ) != theMixData.end() )
+ pCurve->SetVRow( theMixData[ aVRow ] );
+ UpdatePlot2d( pCurve, eUpdateData );
+ }
+ }
+ }
+}
+
//----------------------------------------------------------------------------
SALOMEDS::SObject_var
VISU::Table_i
*/
VISU::Curve_i::Curve_i( SALOMEDS::Study_ptr theStudy, Table_i* theTable,
CORBA::Long theHRow, CORBA::Long theVRow,
- CORBA::Long theZRow )
+ CORBA::Long theZRow, CORBA::Boolean theIsV2 )
: PrsObject_i(theStudy), myTable( theTable ), myHRow( theHRow ),
- myVRow( theVRow ), myZRow( theZRow )
+ myVRow( theVRow ), myZRow( theZRow ), myIsV2( theIsV2 )
{
myAuto = true;
myLine = VISU::Curve::SOLIDLINE;
SPlot2d_Curve* VISU::Curve_i::CreatePresentation()
{
SPlot2d_Curve* crv = new SPlot2d_Curve();
+ crv->setYAxis( myIsV2 ? QwtPlot::yRight : QwtPlot::yLeft );
crv->setHorTitle( GetHorTitle().c_str() );
string tlt = GetTitle();
if ( tlt.length() <= 0 )
bool ok = false;
QString z_str = VISU::Storable::FindValue(theMap,"myZRow", &ok);
myZRow = ok ? z_str.toInt() : 0;
+ ok = false;
+ QString v2_str = VISU::Storable::FindValue(theMap,"myIsV2", &ok);
+ myIsV2 = ok ? v2_str.toInt() : false;
myColor.R = VISU::Storable::FindValue(theMap,"myColor.R").toDouble();
myColor.G = VISU::Storable::FindValue(theMap,"myColor.G").toDouble();
Storable::DataToStream( theStr, "myHRow", myHRow );
Storable::DataToStream( theStr, "myVRow", myVRow );
Storable::DataToStream( theStr, "myZRow", myZRow );
+ Storable::DataToStream( theStr, "myIsV2", myIsV2 );
Storable::DataToStream( theStr, "myColor.R", myColor.R );
Storable::DataToStream( theStr, "myColor.G", myColor.G );
Storable::DataToStream( theStr, "myColor.B", myColor.B );
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, 0 );
+ VISU::Curve_i* pResent = new VISU::Curve_i( aStudy, pTable, 0, 0, 0, false );
return pResent->Restore( theMap, theSObject);
}
return NULL;
}
SALOMEDS::SObject_var
-VISU::ImportTables(const char* theFileName, SALOMEDS::Study_ptr theStudy)
+VISU::ImportTables(const char* theFileName, SALOMEDS::Study_ptr theStudy,
+ bool theFirstStrAsTitle)
{
// Set "C" numeric locale to import numbers correctly
Kernel_Utils::Localizer loc;
TTableContainer aContainer;
- ImportTables( theFileName, aContainer );
+ ImportTables( theFileName, aContainer, theFirstStrAsTitle );
if ( aContainer.empty() )
return SALOMEDS::SObject::_nil();
anAttr = aStudyBuilder->FindOrCreateAttribute(aFileObject, "AttributeString");
SALOMEDS::AttributeString_var aComment = SALOMEDS::AttributeString::_narrow(anAttr);
QString aString;
- aString.sprintf("myComment=ImportTables;myFileName=%s",
- aFileInfo.absoluteFilePath().toLatin1().data());
+ aString.sprintf("myComment=ImportTables;myFileName=%s;myFirstStrAsTitle=%d",
+ aFileInfo.absoluteFilePath().toLatin1().data(),theFirstStrAsTitle);
aComment->SetValue(aString.toLatin1().data());
- for(int i = 0, iEnd = aContainer.size(); i < iEnd; i++){
+ for(int i = 0, iEnd = aContainer.size(); i < iEnd; i++) {
PTableIDMapper aTableIDMapper = aContainer[i];
const TTable2D& aTable2D = *aTableIDMapper;
SALOMEDS::SObject_var aRealObject = aStudyBuilder->NewObject(aFileObject);
if(MYDEBUG) MESSAGE("aTable2D.myTitle = "<<aTable2D.myTitle);
if ( aTable2D.myTitle != "" ) {
aName->SetValue(aTable2D.myTitle.c_str());
- } else {
+ }
+ else {
QString aNewName;
aNewName.sprintf("Table:%d",i);
aName->SetValue(aNewName.toLatin1().data());
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++){
+ // check empty columns
+ TColStd_MapOfInteger EmptyColumns;
+ for(int j = 0, jEnd = aNewTable2D.myRows.size(); j < jEnd; j++) {
+ bool hasVal = false;
+ for(int k = 0; k < kEnd; k++) {
+ QString aVal = aNewTable2D.myRows[j].myValues[k].c_str();
+ bool anIsOk = false;
+ double aValue = aVal.toDouble(&anIsOk);
+ if(anIsOk) {
+ hasVal = true;
+ break;
+ }
+ }
+ if(!hasVal) {
+ EmptyColumns.Add(j);
+ }
+ }
+ // create table of real
+ aTableOfReal->SetNbColumns( kEnd - EmptyColumns.Extent() );
+ int currNum = -1;
+ for(int j = 0, jEnd = aNewTable2D.myRows.size(); j < jEnd; j++) {
+ if( EmptyColumns.Contains(j) ) continue;
+ currNum++;
if(MYDEBUG) MESSAGE("j = "<<j<<"; kEnd = "<<kEnd);
-
- for(int k = 0; k < kEnd; k++){
+ for(int k = 0; k < kEnd; k++) {
QString aVal = aNewTable2D.myRows[j].myValues[k].c_str();
bool anIsOk = false;
double aValue = aVal.toDouble(&anIsOk);
- if(anIsOk && !aVal.contains("NAN",Qt::CaseInsensitive) && !aVal.contains("INF",Qt::CaseInsensitive))
- aTableOfReal->PutValue(aValue,j+1,k+1);
+ if( anIsOk && !aVal.contains("NAN",Qt::CaseInsensitive) &&
+ !aVal.contains("INF",Qt::CaseInsensitive) ) {
+ aTableOfReal->PutValue(aValue,currNum+1,k+1);
+ }
}
-
- aTableOfReal->SetRowTitle(j+1,aNewTable2D.myRows[j].myTitle.c_str());
- aTableOfReal->SetRowUnit(j+1,aNewTable2D.myRows[j].myUnit.c_str());
+ aTableOfReal->SetRowTitle(currNum+1,aNewTable2D.myRows[j].myTitle.c_str());
+ aTableOfReal->SetRowUnit(currNum+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;
}
+
+//=======================================================================
+//function : updateStrForCSV
+//purpose : auxilary for ExportTableToFile
+//=======================================================================
+void updateStrForCSV(QString& aStr, const char aSep)
+{
+ int index = aStr.indexOf('"');
+ while(index>=0) {
+ aStr.insert(index,'"');
+ if( index+2 >= aStr.size() ) break;
+ index = aStr.indexOf('"',index+2);
+ }
+ index = aStr.indexOf(aSep);
+ if(index>=0) {
+ // current string contains separator => need to use "..."
+ aStr.insert(0,'"');
+ aStr.push_back('"');
+ }
+}
+
+
+//=======================================================================
+//function : ExportTableToFile
+//purpose :
+//=======================================================================
template<class TTableAttr> bool ExportTableToFile(const TTableAttr& aTabAttr,
const char* theFileName)
{
SALOMEDS::StringSeq_var aRowUnits = aTabAttr->GetRowUnits();
SALOMEDS::StringSeq_var aColumnTitles = aTabAttr->GetColumnTitles();
+ //--------------------------------------------------
+ // write as *.csv file if it is needed
+ //--------------------------------------------------
+ QString tmp(theFileName);
+ tmp = tmp.trimmed();
+ tmp = tmp.right(3).trimmed();
+ if( tmp == QString("csv") ) {
+ const char aSep = ',';
+ // write column titles
+ QString aLine(aRowTitles[0]);
+ updateStrForCSV(aLine,aSep);
+ for(int i=1; i<aRowsNb; i++) {
+ aLine += aSep;
+ QString aTmp(aRowTitles[i]);
+ updateStrForCSV(aTmp,aSep);
+ aLine += aTmp;
+ }
+ aLine += "\n";
+ aFile.write(aLine.toLatin1() );
+ // write table data
+ QString aValue;
+ for (int j = 1; j <= aColNb; j++) {
+ QString aLine = "";
+ if(aTabAttr->HasValue(j,1)) {
+ aLine = aValue.sprintf("%.16g",(double)aTabAttr->GetValue(1,j));
+ }
+ for (int i = 2; i <= aRowsNb; i++) {
+ if(aTabAttr->HasValue(i,j)) {
+ aLine += aSep + aValue.sprintf("%.16g",(double)aTabAttr->GetValue(i,j));
+ }
+ else aLine += aSep;
+ }
+ aLine += "\n";
+ aFile.write(aLine.toLatin1() );
+ }
+
+ aFile.close();
+ return true;
+ }
+ //--------------------------------------------------
+ // end of writing as *.csv file
+ //--------------------------------------------------
+
/* The given table is rare (some cells is empty) or not? */
bool isRareTable = false;
for (int i = 1; i <= aRowsNb; i++)
/* COLUMN_TITLES */
if ( anAbscissTitle.length() || anOrdinate.length() ) {
- aLine = "#COLUMN_TITLES: " + anAbscissTitle + " | " + anOrdinate + "\n";
+ aLine = "#COLUMN_TITLES: " + anAbscissTitle + " | " + anOrdinate;
+ int tmpind = aLine.indexOf("\n");
+ while(tmpind>=0) {
+ aLine.remove(tmpind,1);
+ tmpind = aLine.indexOf("\n");
+ }
+ aLine += "\n";
aFile.write(aLine.toLatin1() );
}
QString aUnitsSep = "";
QString aTitlesStr = "#COLUMN_TITLES: ";
QString aUnitsStr = "#COLUMN_UNITS: ";
- for (int i = 1; i <= aRowsNb; i++)
- {
- if (!QString(aRowTitles[i-1]).trimmed().isEmpty()) {
- aTitlesStr += (aTitlesSep + aRowTitles[i-1]);
- if (aTitlesSep.isEmpty()) aTitlesSep = " | ";
- }
- if (!QString(aRowUnits[i-1]).trimmed().isEmpty()) {
- aUnitsStr += (aUnitsSep + aRowUnits[i-1]);
- if (aUnitsSep.isEmpty()) aUnitsSep = " ";
- }
+ for (int i = 1; i <= aRowsNb; i++) {
+ if (!QString(aRowTitles[i-1]).trimmed().isEmpty()) {
+ aTitlesStr += (aTitlesSep + aRowTitles[i-1]);
+ if (aTitlesSep.isEmpty()) aTitlesSep = " | ";
}
+ if (!QString(aRowUnits[i-1]).trimmed().isEmpty()) {
+ aUnitsStr += (aUnitsSep + aRowUnits[i-1]);
+ if (aUnitsSep.isEmpty()) aUnitsSep = " ";
+ }
+ }
+ int tmpind = aTitlesStr.indexOf("\n");
+ while(tmpind>=0) {
+ aTitlesStr.remove(tmpind,1);
+ tmpind = aTitlesStr.indexOf("\n");
+ }
aTitlesStr += "\n";
aUnitsStr += "\n";
aFile.write(aTitlesStr.toLatin1());
/* CURVE COORDINATES */
QString aSep, aValue, aColTitle;
- for (int j = 1; j <= aColNb; j++)
- {
- aLine = ""; aSep = "";
- for (int i = 1; i <= aRowsNb; i++)
- {
- aLine += (aSep + aValue.sprintf("%.16g", (double)(aTabAttr->GetValue(i,j))));
- if (aSep.isEmpty()) aSep = " ";
- }
- if (!aLine.trimmed().isEmpty()) {
- aColTitle = aColumnTitles[j-1];
- if (!aColTitle.trimmed().isEmpty())
- aLine = aLine + " #TITLE: " + aColTitle;
- aLine += "\n";
- aFile.write(aLine.toLatin1());
- }
+ for (int j = 1; j <= aColNb; j++) {
+ aLine = ""; aSep = "";
+ for (int i = 1; i <= aRowsNb; i++) {
+ aLine += (aSep + aValue.sprintf("%.16g", (double)(aTabAttr->GetValue(i,j))));
+ if (aSep.isEmpty()) aSep = " ";
}
+ if (!aLine.trimmed().isEmpty()) {
+ aColTitle = aColumnTitles[j-1];
+ if (!aColTitle.trimmed().isEmpty())
+ aLine = aLine + " #TITLE: " + aColTitle;
+ aLine += "\n";
+ aFile.write(aLine.toLatin1());
+ }
+ }
} //end of else
aFile.close();
{
//Find table
SALOMEDS::GenericAttribute_var anAttr ;
- if (theTable->FindAttribute(anAttr, "AttributeTableOfReal"))
- {
- SALOMEDS::AttributeTableOfReal_var aTabAttr = SALOMEDS::AttributeTableOfReal ::_narrow(anAttr);
- return ExportTableToFile ( aTabAttr , theFileName);
-
- }
+ 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);
+ SALOMEDS::AttributeTableOfInteger_var aTabAttr =
+ SALOMEDS::AttributeTableOfInteger ::_narrow(anAttr);
return ExportTableToFile ( aTabAttr , theFileName);
-
}
return false;
}
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File : VISU_Table_i.hh
// Author : Vadim SANDLER
virtual CORBA::Long GetNbRows();
virtual CORBA::Long GetNbColumns();
+ virtual void SortRow(CORBA::Long theRow, VISU::SortOrder theSortOrder, VISU::SortPolicy theSortPolicy);
+ virtual void SortColumn(CORBA::Long theColumn, VISU::SortOrder theSortOrder, VISU::SortPolicy theSortPolicy);
+ virtual void SortByRow(CORBA::Long theRow, VISU::SortOrder theSortOrder, VISU::SortPolicy theSortPolicy);
+ virtual void SortByColumn(CORBA::Long theColumn, VISU::SortOrder theSortOrder, VISU::SortPolicy theSortPolicy);
+
virtual void RemoveFromStudy();
protected:
Storable* Build(int theRestoring);
+ void UpdateCurves(std::map<int, int> theMixData);
protected:
VISU::Table::Orientation myOrientation;
virtual std::string GetObjectEntry();
};
- SALOMEDS::SObject_var ImportTables(const char* theFileName, SALOMEDS::Study_ptr theStudy);
+ SALOMEDS::SObject_var ImportTables(const char* theFileName, SALOMEDS::Study_ptr theStudy,
+ bool theFirstStrAsTitle = false);
bool ExportTableToFile(SALOMEDS::SObject_ptr theTable, const char* theFileName);
//==============================================================================
class VISU_I_EXPORT Curve_i : public virtual POA_VISU::Curve,
Curve_i( const Curve_i& );
public:
Curve_i( SALOMEDS::Study_ptr theStudy, Table_i* theTable,
- CORBA::Long theHRow, CORBA::Long theVRow, CORBA::Long theZRow );
+ CORBA::Long theHRow, CORBA::Long theVRow, CORBA::Long theZRow,
+ CORBA::Boolean theIsV2 );
virtual ~Curve_i();
virtual VISU::VISUType GetType() { return VISU::TCURVE;};
int myHRow;
int myVRow;
int myZRow;
+ bool myIsV2;
struct SALOMEDS::Color myColor;
VISU::Curve::MarkerType myMarker;
VISU::Curve::LineType myLine;
public:
virtual Storable* Create();
- int GetHRow() const { return myHRow;}
- int GetVRow() const { return myVRow;}
- int GetZRow() const { return myZRow;}
+ int GetHRow() const { return myHRow; }
+ void SetHRow( const int theHRow ) { myHRow = theHRow; }
+
+ int GetVRow() const { return myVRow; }
+ void SetVRow( const int theVRow ) { myVRow = theVRow; }
+
+ int GetZRow() const { return myZRow; }
+ void SetZRow( const int theZRow ) { myZRow = theZRow; }
+
+ int GetIsV2() const { return myIsV2; }
+ void SetIsV2( const int theIsV2 ) { myIsV2 = theIsV2; }
virtual Storable* Restore( const Storable::TRestoringMap& theMap, SALOMEDS::SObject_ptr theSO);
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : VISU_TimeAnimation.cxx
// Author : Vitaly SMETANNIKOV
// Module : VISU
myDumpPath = "";
myAVIMaker = "jpeg2yuv";
+
+ myDumpMode = VISU::GetResourceMgr()->integerValue("VISU", "dump_mode", 0);
+ myTimeStampFrequency = VISU::GetResourceMgr()->integerValue("VISU", "time_stamp_frequency", 1);
}
QString aDirPath = aFileInfo.absolutePath();
QString aBaseName = aFileInfo.fileName();
+ if( myTimeStampFrequency > 1 && myFrame % myTimeStampFrequency != 0 )
+ return;
+
switch (myFrame) {
case 0:
break;
// make AVI file if need
if (isDumping && myDumpFormat.compare("AVI") == 0 && myExecutionState->IsActive()) {
- double aFPS = 17.3 * mySpeed;
+ double aFPS = 17.3 * mySpeed / myTimeStampFrequency;
QFileInfo aFileInfo(myDumpPath);
QString aDirPath = aFileInfo.absolutePath();
QList<QByteArray> aDumpFormats = QImageWriter::supportedImageFormats();
if (myDumpFormat.isEmpty() ||
(aDumpFormats.indexOf(theFormat) < 0 && myDumpFormat.compare("AVI") != 0)) {
- if (aDumpFormats.indexOf("JPEG"))
+ if (aDumpFormats.indexOf("JPEG") >= 0 ||
+ aDumpFormats.indexOf("jpeg") >= 0)
myDumpFormat = "JPEG";
else
myDumpFormat = aDumpFormats.at(0);
return myDumpFormat.toLatin1().data();
}
+//------------------------------------------------------------------------
+void VISU_TimeAnimation::setTimeStampFrequency(CORBA::Long theFrequency)
+{
+ myTimeStampFrequency = theFrequency;
+}
+
//------------------------------------------------------------------------
bool VISU_TimeAnimation::checkAVIMaker() const
{
QList<QByteArray> aDumpFormats = QImageWriter::supportedImageFormats();
- if (aDumpFormats.indexOf("JPEG") < 0) return false;
+ if (aDumpFormats.indexOf("JPEG") < 0 &&
+ aDumpFormats.indexOf("jpeg") < 0)
+ return false;
QString aCmd("which ");
aCmd += myAVIMaker;
return CORBA::string_dup(aDumpFormat.c_str());
}
+void VISU_TimeAnimation_i::setTimeStampFrequency(CORBA::Long theFrequency)
+{
+ myAnim->setTimeStampFrequency(theFrequency);
+}
+
+CORBA::Long VISU_TimeAnimation_i::getTimeStampFrequency()
+{
+ return myAnim->getTimeStampFrequency();
+}
+
CORBA::Boolean VISU_TimeAnimation_i::isCycling()
{
return myAnim->isCycling();
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : VISU_TimeAnimation.h
// Author : Vitaly SMETANNIKOV
// Module : VISU
{
Q_OBJECT;
+ public:
+ enum DumpMode { DM_None = 0, DM_Picture, DM_Video };
+
protected:
CORBA::Boolean _generateFrames();
void _connectView();
void dumpTo(const char* thePath) { myDumpPath = thePath; }
std::string setDumpFormat(const char* theFormat);
+
+ void setTimeStampFrequency(CORBA::Long theFrequency);
+ CORBA::Long getTimeStampFrequency() { return myTimeStampFrequency; }
+
+ int getDumpMode() const { return myDumpMode; }
+
bool checkAVIMaker() const;
QString getLastErrorMsg() { return myLastError; }
long myFileIndex;
SVTK_ViewWindow* myView;
+ int myDumpMode;
+ int myTimeStampFrequency;
+
QString myAnimEntry;
static int myNBAnimations;
virtual void dumpTo(const char* thePath);
virtual char* setDumpFormat(const char* theFormat);
+ virtual void setTimeStampFrequency(CORBA::Long theFrequency);
+ virtual CORBA::Long getTimeStampFrequency();
+
virtual CORBA::Boolean isCycling();
virtual CORBA::Boolean isCleaningMemoryAtEachFrame();
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : VISU_Tools.cxx
// Author : Oleg UVAROV
// Module : VISU
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : VISU_Tools.h
// Author : Oleg UVAROV
// Module : VISU
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File : VISU_Vectors_i.cc
// Author : Alexey PETROV
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File : VISU_PrsObject_i.hxx
// Author : Alexey PETROV
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File : VISU_ViewManager_i.cc
// Author : Alexey PETROV
#include "SVTK_ViewModel.h"
#include "VTKViewer_Algorithm.h"
#include "SPlot2d_Curve.h"
+#include "SPlot2d_ViewModel.h"
#include "Plot2d_ViewFrame.h"
#include "Plot2d_ViewWindow.h"
#include "Plot2d_ViewModel.h"
+#include "Plot2d_ViewManager.h"
#include "SalomeApp_Study.h"
#include "SalomeApp_Application.h"
QList<SUIT_Application*> anApplications = aSession->applications();
QList<SUIT_Application*>::Iterator anIter = anApplications.begin();
while ( anIter != anApplications.end() ) {
- SUIT_Application* anApp = *anIter;
- if (SUIT_Study* aSStudy = anApp->activeStudy()) {
- if (SalomeApp_Study* aStudy = dynamic_cast<SalomeApp_Study*>(aSStudy)) {
+ SUIT_Application* anApp = *anIter;
+ if (SUIT_Study* aSStudy = anApp->activeStudy()) {
+ if (SalomeApp_Study* aStudy = dynamic_cast<SalomeApp_Study*>(aSStudy)) {
if (_PTR(Study) aCStudy = aStudy->studyDS()) {
//if (myStudyName == aCStudy->Name()) {
if (myStudyId == aCStudy->StudyId()) {
- myResult = dynamic_cast<SalomeApp_Application*>(anApp);
- break;
- }
- }
- }
- }
- anIter++;
+ myResult = dynamic_cast<SalomeApp_Application*>(anApp);
+ break;
+ }
+ }
+ }
+ }
+ anIter++;
}
if (!myResult) {
//MESSAGE("Error: application is not found for study : " << myStudyName);
{
VISU::View3D_i* aView = new View3D_i (myApplication);
if (aView->Create(0))
- myResult = aView->_this();
+ myResult = aView->_this();
}
};
{
//if (CheckStudy(myStudyDocument)) {
if (myApplication) {
- TViewFrame* pView = new TViewFrame (myApplication);
- if (pView->Create(1)) {
- myResult = pView->_this();
- qApp->processEvents(); // Fix for bug 9929
- }
+ TViewFrame* pView = new TViewFrame (myApplication);
+ if (pView->Create(1)) {
+ myResult = pView->_this();
+ qApp->processEvents(); // Fix for bug 9929
+ }
}
}
};
Table_ptr myTable;
public:
TCreateTableViewFrameEvent (SalomeApp_Application* theApplication,
- Table_ptr theTable):
+ Table_ptr theTable):
TCreateViewEvent(theApplication),
myTable(theTable),
myResult(VISU::TableView::_nil())
virtual void Execute()
{
//if (CheckStudy(myStudyDocument)) {
- VISU::TableView_i* pView = new TableView_i (myApplication);
- if (pView->Create(myTable) != NULL)
- myResult = pView->_this();
+ VISU::TableView_i* pView = new TableView_i (myApplication);
+ if (pView->Create(myTable) != NULL)
+ myResult = pView->_this();
//}
}
typedef VISU::TableView_ptr TResult;
View_ptr myView;
public:
TEvent(View_ptr theView):
- myView(theView)
+ myView(theView)
{}
virtual void Execute(){
- if (!CORBA::is_nil(myView)) {
- if (VISU::View_i* pView = dynamic_cast<VISU::View_i*>(VISU::GetServant(myView).in())) {
- pView->Close();
- pView->_remove_ref();
- }
- }
+ if (!CORBA::is_nil(myView)) {
+ if (VISU::View_i* pView = dynamic_cast<VISU::View_i*>(VISU::GetServant(myView).in())) {
+ pView->Close();
+ pView->_remove_ref();
+ }
+ }
}
};
VISU_Actor *anVISUActor = NULL, *aResActor = NULL;
for(anActColl->InitTraversal(); (anActor = anActColl->GetNextActor()) != NULL;){
if(anActor->IsA("VISU_Actor")){
- anVISUActor = VISU_Actor::SafeDownCast(anActor);
- if (thePrs == anVISUActor->GetPrs3d()) {
- aResActor = anVISUActor;
- if(theDisplaing < eErase)
- aResActor->VisibilityOn();
- else
- aResActor->VisibilityOff();
- } else {
- if(theDisplaing == eEraseAll || theDisplaing == eDisplayOnly)
- anVISUActor->VisibilityOff();
- else if ( theDisplaing == eDisplayAll )
- anVISUActor->VisibilityOn();
- }
+ anVISUActor = VISU_Actor::SafeDownCast(anActor);
+ if (thePrs == anVISUActor->GetPrs3d()) {
+ aResActor = anVISUActor;
+ if(theDisplaing < eErase)
+ aResActor->VisibilityOn();
+ else
+ aResActor->VisibilityOff();
+ } else {
+ if(theDisplaing == eEraseAll || theDisplaing == eDisplayOnly)
+ anVISUActor->VisibilityOff();
+ else if ( theDisplaing == eDisplayAll )
+ anVISUActor->VisibilityOn();
+ }
}
}
if (aResActor) {
}
if(thePrs != NULL && theDisplaing < eErase){
try{
- anVISUActor = thePrs->CreateActor();
- vf->AddActor(anVISUActor);
+ anVISUActor = thePrs->CreateActor();
+ vf->AddActor(anVISUActor);
}catch(std::exception& exc){
- if(MYDEBUG) INFOS(exc.what());
- return NULL;
+ if(MYDEBUG) INFOS(exc.what());
+ return NULL;
}catch(...){
- if(MYDEBUG) INFOS("Unknown exception was occured!!!");
- return NULL;
+ if(MYDEBUG) INFOS("Unknown exception was occured!!!");
+ return NULL;
}
}
RepaintView(theViewWindow);
return anVISUActor;
}
- void UpdatePlot2d (Plot2d_ViewFrame *theView,int theDisplaying, Curve_i* theCurve)
+ struct TUpdatePlot2dEvent: public SALOME_Event
+ {
+ Curve_i* myCurve;
+ int myDisplaying;
+
+ TUpdatePlot2dEvent (Curve_i* theCurve, const int theDisplaying):
+ myCurve(theCurve),
+ myDisplaying(theDisplaying)
+ {}
+
+ virtual void Execute()
+ {
+ SalomeApp_Application* anApp = NULL;
+ CORBA::String_var studyName = myCurve->GetStudyDocument()->Name();
+ std::string aStudyName = studyName.in();
+ SUIT_Session* aSession = SUIT_Session::session();
+ QList<SUIT_Application*> anApplications = aSession->applications();
+ QList<SUIT_Application*>::Iterator anIter = anApplications.begin();
+ while (anIter != anApplications.end()) {
+ SUIT_Application* aSUITApp = *anIter;
+ if (SUIT_Study* aSStudy = aSUITApp->activeStudy()) {
+ if (SalomeApp_Study* aStudy = dynamic_cast<SalomeApp_Study*>(aSStudy)) {
+ if (_PTR(Study) aCStudy = aStudy->studyDS()) {
+ if (aStudyName == aCStudy->Name()) {
+ anApp = dynamic_cast<SalomeApp_Application*>(aSUITApp);
+ break;
+ }
+ }
+ }
+ }
+ anIter++;
+ }
+ if (!anApp)
+ return;
+
+ ViewManagerList aViewManagerList;
+ anApp->viewManagers(SPlot2d_Viewer::Type(), aViewManagerList);
+ SUIT_ViewManager* aViewManager;
+ foreach( aViewManager, aViewManagerList ) {
+ if (Plot2d_ViewManager* aManager = dynamic_cast<Plot2d_ViewManager*>(aViewManager)) {
+ if (SPlot2d_Viewer* aViewer = dynamic_cast<SPlot2d_Viewer*>(aManager->getViewModel())) {
+ if (Plot2d_ViewFrame* aViewFrame = aViewer->getActiveViewFrame()) {
+ UpdatePlot2d(myCurve, myDisplaying, aViewFrame);
+ }
+ }
+ }
+ }
+ }
+ };
+
+ void UpdatePlot2d (Curve_i* theCurve, int theDisplaying, Plot2d_ViewFrame* theView)
{
if(MYDEBUG) MESSAGE("UpdatePlot2d - theDisplaying = " << theDisplaying);
- if (!theView)
+ if (!theView) {
+ // update all views
+ ProcessVoidEvent(new TUpdatePlot2dEvent(theCurve, theDisplaying));
return;
+ }
QList<Plot2d_Curve*> clist;
theView->getCurves(clist);
if (theDisplaying == eEraseAll) {
for (int i = 0; i < clist.count(); i++) {
- if(MYDEBUG) MESSAGE("UpdatePlot2d - erasing all : curve - " << clist.at(i));
- theView->eraseCurve(clist.at(i));
+ if(MYDEBUG) MESSAGE("UpdatePlot2d - erasing all : curve - " << clist.at(i));
+ theView->eraseCurve(clist.at(i));
}
} else if (theDisplaying == eErase) {
if (theCurve) {
- for (int i = 0; i < clist.count(); i++) {
- SPlot2d_Curve* aSPlot2dC = dynamic_cast<SPlot2d_Curve*>(clist.at(i));
- if (aSPlot2dC->hasIO() &&
- !strcmp(theCurve->GetEntry().c_str(), aSPlot2dC->getIO()->getEntry())) {
- if(MYDEBUG) MESSAGE("UpdatePlot2d - erasing : curve - " << aSPlot2dC);
- theView->eraseCurve(aSPlot2dC);
- }
- }
- }
- } else if (theDisplaying == eDisplay) {
- if (theCurve) {
- bool bFound = false;
- for (int i = 0; i < clist.count(); i++) {
- SPlot2d_Curve* aSPlot2dC = dynamic_cast<SPlot2d_Curve*>(clist.at(i));
- if (aSPlot2dC->hasIO() &&
- !strcmp(theCurve->GetEntry().c_str(), aSPlot2dC->getIO()->getEntry())) {
- if(MYDEBUG) MESSAGE("UpdatePlot2d - displaying : curve - " << aSPlot2dC);
- aSPlot2dC->setHorTitle( theCurve->GetHorTitle().c_str() );
- aSPlot2dC->setVerTitle( theCurve->GetVerTitle().c_str() );
- aSPlot2dC->setHorUnits( theCurve->GetHorUnits().c_str() );
- aSPlot2dC->setVerUnits( theCurve->GetVerUnits().c_str() );
- double* xList = 0;
- double* yList = 0;
- QStringList zList;
- int nbPoints = theCurve->GetData( xList, yList, zList );
- if (nbPoints > 0 && xList && yList) {
- aSPlot2dC->setData( xList, yList, nbPoints, zList );
- }
- if (!theCurve->IsAuto()) {
- aSPlot2dC->setLine((Plot2d::LineType)theCurve->GetLine(),
- theCurve->GetLineWidth());
- aSPlot2dC->setMarker((Plot2d::MarkerType)theCurve->GetMarker());
- SALOMEDS::Color color = theCurve->GetColor();
- aSPlot2dC->setColor(QColor((int)(color.R*255.),
- (int)(color.G*255.),
- (int)(color.B*255.)));
- }
- aSPlot2dC->setAutoAssign(theCurve->IsAuto());
- theView->displayCurve(aSPlot2dC);
- bFound = true;
- }
- }
- if (!bFound) {
- Plot2d_Curve* crv = theCurve->CreatePresentation();
- if(MYDEBUG) MESSAGE("UpdatePlot2d - displaying : curve (new) - "<<crv );
- if (crv) {
- theView->displayCurve( crv );
- theCurve->SetLine( (VISU::Curve::LineType)crv->getLine(), crv->getLineWidth() );
- theCurve->SetMarker( (VISU::Curve::MarkerType)crv->getMarker());
- SALOMEDS::Color newColor;
- newColor.R = crv->getColor().red()/255.;
- newColor.G = crv->getColor().green()/255.;
- newColor.B = crv->getColor().blue()/255.;
- theCurve->SetColor( newColor );
- crv->setAutoAssign( theCurve->IsAuto() );
- }
- }
+ for (int i = 0; i < clist.count(); i++) {
+ SPlot2d_Curve* aSPlot2dC = dynamic_cast<SPlot2d_Curve*>(clist.at(i));
+ if (aSPlot2dC->hasIO() &&
+ !strcmp(theCurve->GetEntry().c_str(), aSPlot2dC->getIO()->getEntry())) {
+ if(MYDEBUG) MESSAGE("UpdatePlot2d - erasing : curve - " << aSPlot2dC);
+ theView->eraseCurve(aSPlot2dC);
+ }
+ }
}
- } else if (theDisplaying == eDisplayOnly) {
+ } else if (theDisplaying == eDisplay ||
+ theDisplaying == eDisplayOnly ||
+ theDisplaying == eUpdateData) {
if (theCurve) {
- bool bFound = false;
- for (int i = 0; i < clist.count(); i++) {
- SPlot2d_Curve* aSPlot2dC = dynamic_cast<SPlot2d_Curve*>(clist.at(i));
- if (aSPlot2dC->hasIO() &&
- !strcmp(theCurve->GetEntry().c_str(), aSPlot2dC->getIO()->getEntry())) {
- if(MYDEBUG) MESSAGE("UpdatePlot2d - displaying only : curve - " << aSPlot2dC);
- aSPlot2dC->setHorTitle( theCurve->GetHorTitle().c_str() );
- aSPlot2dC->setVerTitle( theCurve->GetVerTitle().c_str() );
- aSPlot2dC->setHorUnits( theCurve->GetHorUnits().c_str() );
- aSPlot2dC->setVerUnits( theCurve->GetVerUnits().c_str() );
- double* xList = 0;
- double* yList = 0;
- QStringList zList;
- int nbPoints = theCurve->GetData( xList, yList, zList );
- if ( nbPoints > 0 && xList && yList ) {
- aSPlot2dC->setData( xList, yList, nbPoints, zList );
- }
- if ( !theCurve->IsAuto() ) {
- aSPlot2dC->setLine((Plot2d::LineType)theCurve->GetLine(), theCurve->GetLineWidth());
- aSPlot2dC->setMarker((Plot2d::MarkerType)theCurve->GetMarker());
- SALOMEDS::Color color = theCurve->GetColor();
- aSPlot2dC->setColor(QColor((int)(color.R*255.), (int)(color.G*255.), (int)(color.B*255.)));
- }
- aSPlot2dC->setAutoAssign(theCurve->IsAuto());
- theView->displayCurve(aSPlot2dC);
- bFound = true;
- } else {
- theView->eraseCurve(aSPlot2dC);
- }
- }
- if (!bFound) {
- Plot2d_Curve* crv = theCurve->CreatePresentation();
- if(MYDEBUG) MESSAGE("UpdatePlot2d - displaying only : curve (new) - " << crv);
- if (crv) {
- theView->displayCurve(crv);
- theCurve->SetLine((VISU::Curve::LineType)crv->getLine(), crv->getLineWidth());
- theCurve->SetMarker((VISU::Curve::MarkerType)crv->getMarker());
- SALOMEDS::Color newColor;
- newColor.R = crv->getColor().red()/255.;
- newColor.G = crv->getColor().green()/255.;
- newColor.B = crv->getColor().blue()/255.;
- theCurve->SetColor(newColor);
- crv->setAutoAssign(theCurve->IsAuto());
- }
- }
+ bool bFound = false;
+ for (int i = 0; i < clist.count(); i++) {
+ SPlot2d_Curve* aSPlot2dC = dynamic_cast<SPlot2d_Curve*>(clist.at(i));
+ if (aSPlot2dC->hasIO() &&
+ !strcmp(theCurve->GetEntry().c_str(), aSPlot2dC->getIO()->getEntry())) {
+ if (theDisplaying == eUpdateData) {
+ if(MYDEBUG) MESSAGE("UpdatePlot2d - updating data : curve - " << aSPlot2dC);
+ }
+ else {
+ if(MYDEBUG) MESSAGE("UpdatePlot2d - displaying : curve - " << aSPlot2dC);
+ }
+ double* xList = 0;
+ double* yList = 0;
+ QStringList zList;
+ int nbPoints = theCurve->GetData( xList, yList, zList );
+ if (nbPoints > 0 && xList && yList) {
+ aSPlot2dC->setData( xList, yList, nbPoints, zList );
+ }
+ if (theDisplaying == eUpdateData) {
+ theView->updateCurve(aSPlot2dC, true);
+ } else {
+ aSPlot2dC->setHorTitle( theCurve->GetHorTitle().c_str() );
+ aSPlot2dC->setVerTitle( theCurve->GetVerTitle().c_str() );
+ aSPlot2dC->setHorUnits( theCurve->GetHorUnits().c_str() );
+ aSPlot2dC->setVerUnits( theCurve->GetVerUnits().c_str() );
+ if (!theCurve->IsAuto()) {
+ aSPlot2dC->setLine((Plot2d::LineType)theCurve->GetLine(),
+ theCurve->GetLineWidth());
+ aSPlot2dC->setMarker((Plot2d::MarkerType)theCurve->GetMarker());
+ SALOMEDS::Color color = theCurve->GetColor();
+ aSPlot2dC->setColor(QColor((int)(color.R*255.),
+ (int)(color.G*255.),
+ (int)(color.B*255.)));
+ }
+ aSPlot2dC->setAutoAssign(theCurve->IsAuto());
+ theView->displayCurve(aSPlot2dC);
+ bFound = true;
+ }
+ } else if (theDisplaying == eDisplayOnly) {
+ theView->eraseCurve(aSPlot2dC);
+ }
+ }
+ if (!bFound && theDisplaying != eUpdateData) {
+ Plot2d_Curve* crv = theCurve->CreatePresentation();
+ if(MYDEBUG) MESSAGE("UpdatePlot2d - displaying : curve (new) - "<<crv );
+ if (crv) {
+ theView->displayCurve( crv );
+ theCurve->SetLine( (VISU::Curve::LineType)crv->getLine(), crv->getLineWidth() );
+ theCurve->SetMarker( (VISU::Curve::MarkerType)crv->getMarker());
+ SALOMEDS::Color newColor;
+ newColor.R = crv->getColor().red()/255.;
+ newColor.G = crv->getColor().green()/255.;
+ newColor.B = crv->getColor().blue()/255.;
+ theCurve->SetColor( newColor );
+ crv->setAutoAssign( theCurve->IsAuto() );
+ }
+ }
}
}
}
QList<SUIT_Application*> anApplications = aSession->applications();
QList<SUIT_Application*>::Iterator anIter = anApplications.begin();
while ( anIter != anApplications.end() ) {
- SUIT_Application* aSUITApp = *anIter;
- if (SUIT_Study* aSStudy = aSUITApp->activeStudy()) {
+ SUIT_Application* aSUITApp = *anIter;
+ if (SUIT_Study* aSStudy = aSUITApp->activeStudy()) {
if (SalomeApp_Study* aStudy = dynamic_cast<SalomeApp_Study*>(aSStudy)) {
if (_PTR(Study) aCStudy = aStudy->studyDS()) {
if (aStudyName == aCStudy->Name()) {
anApp = dynamic_cast<SalomeApp_Application*>(aSUITApp);
- break;
- }
- }
- }
+ break;
+ }
+ }
+ }
}
- anIter++;
+ anIter++;
}
if (!anApp)
return;
QList<SUIT_ViewManager*>::Iterator anVMIter = aViewManagerList.begin();
for (; anVMIter != aViewManagerList.end(); anVMIter++ ) {
SUIT_ViewManager* aViewManager = *anVMIter;
- QVector<SUIT_ViewWindow*> aViews = aViewManager->getViews();
- for (int i = 0, iEnd = aViews.size(); i < iEnd; i++) {
- if (SUIT_ViewWindow* aViewWindow = aViews.at(i)) {
- if (Plot2d_ViewWindow* vw = dynamic_cast<Plot2d_ViewWindow*>(aViewWindow)) {
+ QVector<SUIT_ViewWindow*> aViews = aViewManager->getViews();
+ for (int i = 0, iEnd = aViews.size(); i < iEnd; i++) {
+ if (SUIT_ViewWindow* aViewWindow = aViews.at(i)) {
+ if (Plot2d_ViewWindow* vw = dynamic_cast<Plot2d_ViewWindow*>(aViewWindow)) {
Plot2d_ViewFrame* vf = vw->getViewFrame();
- QList<Plot2d_Curve*> clist;
- vf->getCurves(clist);
- for (int i = 0; i < clist.count(); i++) {
+ QList<Plot2d_Curve*> clist;
+ vf->getCurves(clist);
+ for (int i = 0; i < clist.count(); i++) {
if (SPlot2d_Curve* cu = dynamic_cast<SPlot2d_Curve*>(clist.at(i))) {
- if (cu->hasIO() &&
- strcmp(myPrs->GetEntry().c_str(), cu->getIO()->getEntry())) {
- vf->eraseCurve(cu);
- }
- }
- }
- vf->Repaint();
- //jfa tmp:aViewFrame->unHighlightAll();
+ if (cu->hasIO() &&
+ strcmp(myPrs->GetEntry().c_str(), cu->getIO()->getEntry())) {
+ vf->eraseCurve(cu);
+ }
+ }
+ }
+ vf->Repaint();
+ //jfa tmp:aViewFrame->unHighlightAll();
}
}
}
if (_PTR(Study) aCStudy = aStudy->studyDS()) {
if (aStudyName == aCStudy->Name()) {
anApp = dynamic_cast<SalomeApp_Application*>(aSUITApp);
- break;
- }
- }
- }
+ break;
+ }
+ }
+ }
}
}
if (!anApp)
SUIT_ViewManager* aViewManager = anVMIter.current();
QPtrVector<SUIT_ViewWindow> aViews = aViewManager->getViews();
for (int i = 0, iEnd = aViews.size(); i < iEnd; i++) {
- if (SUIT_ViewWindow* aViewWindow = aViews.at(i)) {
- if (Plot2d_ViewWindow* vw = dynamic_cast<Plot2d_ViewWindow*>(aViewWindow)) {
+ if (SUIT_ViewWindow* aViewWindow = aViews.at(i)) {
+ if (Plot2d_ViewWindow* vw = dynamic_cast<Plot2d_ViewWindow*>(aViewWindow)) {
Plot2d_ViewFrame* vf = vw->getViewFrame();
QList<Plot2d_Curve> clist;
vf->getCurves(clist);
- for (int i = 0; i < clist.count(); i++) {
+ for (int i = 0; i < clist.count(); i++) {
if (SPlot2d_Curve* cu = dynamic_cast<SPlot2d_Curve*>(clist.at(i))) {
- if (cu->hasIO() &&
- strcmp(cu->getIO()->getEntry(), thePrs->GetEntry()) == 0) {
- vf->eraseCurve(cu);
- }
- }
- }
- vf->Repaint();
- //jfa tmp:aViewFrame->unHighlightAll();
+ if (cu->hasIO() &&
+ strcmp(cu->getIO()->getEntry(), thePrs->GetEntry()) == 0) {
+ vf->eraseCurve(cu);
+ }
+ }
+ }
+ vf->Repaint();
+ //jfa tmp:aViewFrame->unHighlightAll();
}
}
}
if (_PTR(Study) aCStudy = aStudy->studyDS()) {
if (aStudyName == aCStudy->Name()) {
anApp = dynamic_cast<SalomeApp_Application*>(aSUITApp);
- break;
- }
- }
- }
+ break;
+ }
+ }
+ }
}
anIter++;
}
SUIT_ViewManager* aViewManager = *anVMIter;
QVector<SUIT_ViewWindow*> 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<SVTK_ViewWindow*>(aViewWindow)) {
+ if (SUIT_ViewWindow* aViewWindow = aViews.at(i)) {
+ if (SVTK_ViewWindow* vw = dynamic_cast<SVTK_ViewWindow*>(aViewWindow)) {
VISU_Actor* anActor = NULL;
- VTK::ActorCollectionCopy aCopy(vw->getRenderer()->GetActors());
+ VTK::ActorCollectionCopy aCopy(vw->getRenderer()->GetActors());
vtkActorCollection *anActColl = aCopy.GetActors();
- anActColl->InitTraversal();
+ anActColl->InitTraversal();
vtkActor *aVTKActor = anActColl->GetNextActor();
- for (; !anActor && aVTKActor; aVTKActor = anActColl->GetNextActor()) {
+ for (; !anActor && aVTKActor; aVTKActor = anActColl->GetNextActor()) {
if (VISU_Actor* anVISUActor = dynamic_cast<VISU_Actor*>(aVTKActor)) {
- if (thePrs == anVISUActor->GetPrs3d()) {
- anActor = anVISUActor;
+ if (thePrs == anVISUActor->GetPrs3d()) {
+ anActor = anVISUActor;
}
}
}
if (anActor) {
- vw->RemoveActor(anActor);
+ vw->RemoveActor(anActor);
}
}
}
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File : VISU_ViewManager_i.hh
// Author : Alexey PETROV
void RepaintView (SUIT_ViewWindow* theViewWindow);
- enum Displaing {eDisplayAll, eDisplay, eDisplayOnly, eErase, eEraseAll};
+ enum Displaing {eDisplayAll, eDisplay, eDisplayOnly, eErase, eEraseAll, eUpdateData};
VISU_I_EXPORT VISU_Actor* UpdateViewer (SUIT_ViewWindow* theViewWindow, int theDisplaing, Prs3d_i* thePrs = NULL);
- void UpdatePlot2d (Plot2d_ViewFrame *theView, int theDisplaying, Curve_i* theCurve);
+ void UpdatePlot2d (Curve_i* theCurve, int theDisplaying, Plot2d_ViewFrame* theView = NULL);
VISU_I_EXPORT VISU_Actor* FindActor(SVTK_ViewWindow* theViewWindow, VISU::Prs3d_i* thePrs3d);
VISU_I_EXPORT VISU_ActorBase* FindActorBase(SVTK_ViewWindow* theViewWindow, VISU::TActorFactory* theActor);
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File : VISU_View_i.cc
// Author : Alexey PETROV
#include "VISU_PointMap3d_i.hh"
#include "VISU_ScalarMap_i.hh"
#include "VISU_ViewManager_i.hh"
-
-#include "VisuGUI_TableDlg.h"
+#include "VISU_TableDlg.h"
#include "VISU_Actor.h"
#include "VISU_ScalarMapAct.h"
{
// is it Curve ?
if (Curve_i* aCurve = dynamic_cast<Curve_i*>(VISU::GetServant(myPrsObj).in())) {
- UpdatePlot2d(myView,myDisplaing,aCurve);
+ UpdatePlot2d(aCurve,myDisplaing,myView);
}
// is it Container ?
if (Container_i* aContainer = dynamic_cast<Container_i*>(VISU::GetServant(myPrsObj).in())) {
for ( int i = 1; i <= nbCurves; i++ ) {
VISU::Curve_i* aCurve = aContainer->GetCurve( i );
if ( aCurve && aCurve->IsValid() ) {
- UpdatePlot2d(myView,myDisplaing,aCurve);
+ UpdatePlot2d(aCurve,myDisplaing,myView);
}
}
myView->Repaint();
if (!CORBA::is_nil(childObject)) {
CORBA::Object_ptr aCurve = VISU::Curve::_narrow(childObject);
if (!CORBA::is_nil(aCurve))
- UpdatePlot2d(myView, myDisplaing,
- dynamic_cast<VISU::Curve_i*>(VISU::GetServant(aCurve).in()));
+ UpdatePlot2d(dynamic_cast<VISU::Curve_i*>(VISU::GetServant(aCurve).in()),
+ myDisplaing, myView);
}
}
myView->Repaint();
SalomeApp_Application* myApplication;
VISU::Table_i* myTable;
- typedef VisuGUI_TableDlg* TResult;
+ typedef VISU_TableDlg* TResult;
TResult myResult;
TCreateTableViewEvent (SalomeApp_Application* theApplication,
if (SUIT_Study* aSStudy = myApplication->activeStudy()) {
if (SalomeApp_Study* aStudy = dynamic_cast<SalomeApp_Study*>(aSStudy)) {
if (_PTR(Study) aCStudy = aStudy->studyDS()) {
- _PTR(SObject) aSObject = aCStudy->FindObjectID(myTable->GetObjectEntry());
- if (aSObject) {
- myResult = new VisuGUI_TableDlg (myApplication->desktop(),
- aSObject,
- false,
- VisuGUI_TableDlg::ttAuto,
- Qt::Vertical);
- myResult->show();
- }
+ myResult = new VISU_TableDlg (myApplication->desktop(),
+ aCStudy,
+ myTable,
+ false,
+ VISU_TableDlg::ttAuto,
+ Qt::Vertical);
+ myResult->show();
}
}
}
void TableView_i::SetTitle (const char* theTitle)
{
- ProcessVoidEvent(new TVoidMemFun1ArgEvent<VisuGUI_TableDlg,const QString&,QString>
- (myView, &VisuGUI_TableDlg::setWindowTitle, QString(theTitle)));
+ ProcessVoidEvent(new TVoidMemFun1ArgEvent<VISU_TableDlg,const QString&,QString>
+ (myView, &VISU_TableDlg::setWindowTitle, QString(theTitle)));
}
char* TableView_i::GetTitle()
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File : VISU_View_i.hh
// Author : Alexey PETROV
class QWidget;
-class VisuGUI_TableDlg;
+class VISU_TableDlg;
class SalomeApp_Application;
virtual void Close();
protected:
- VisuGUI_TableDlg* myView;
+ VISU_TableDlg* myView;
public:
virtual Storable* Create (VISU::Table_ptr theTable);
};
-# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+# Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# VISU VISU_SWIG : binding of C++ implementation and Python
# File : Makefile.am
# Author : Paul RASCLE, EDF
visu_succcessive_animation.py visu_apply_properties.py visu_apply_properties_successive.py \
batchmode_visu_view.py visu_cache.py visu_pointmap3d.py visu_view3d_parameters.py visu_evolution.py \
VISU_Example_01.py VISU_Example_02.py VISU_Example_03.py VISU_Example_04.py \
- VISU_Example_05.py VISU_Example_06.py VISU_Example_07.py
+ VISU_Example_05.py VISU_Example_06.py VISU_Example_07.py VISU_Example_08.py \
+ VISU_Example_09.py
nodist_salomescript_DATA = libVISU_Swig.py
# -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
#
# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# T 2.23, 28: Displaying fields (scalar and vectorial) on nodes, change presentation options.
# Uses MED files ResOK_0000.med and Fields_group3D.med
# This script is equivalent to non-regression test script 003/A1
# -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
#
# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# T 2.24: Save/retrieve view parameters.
# Uses MED file fra.med from ${DATA_DIR}/MedFiles directory.
# This script is equivalent to non-regression test script 003/A3
# -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
#
# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# Animation of "vitesse" field, stored in file TimeStamps.med
# This script is equivalent to non-regression test script 003/A5
#
# -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
#
# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# Show some results presentations in different 3D and 2D viewers
# with different options (view parameters and display modes).
# Uses MED files fra.med and TimeStamps.med from ${DATA_DIR}/MedFiles directory.
# -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
#
# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# Create a table and show it in Plot2d viewer
# This script is equivalent to script VISU_SWIG/visu_big_table.py
#
# -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
#
# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# Import a table from file and show it in Plot2d viewer
#
import salome
# >>> Import a tables from a file ============================================
aFileName = os.getenv("DATA_DIR") + "/Tables/tables_test.xls"
-sobj = myVisu.ImportTables(aFileName)
+sobj = myVisu.ImportTables(aFileName, False)
# >>> Create container and insert curves =====================================
myContainer = myVisu.CreateContainer()
# -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
#
# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# Manage view parameters of presentations:
# Representation Mode, Shrink, Shading, Opacity, Line Width
#
--- /dev/null
+# -*- coding: iso-8859-1 -*-
+# Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+# Set different point markers for presentation
+#
+import salome
+
+import VISU
+import visu_gui
+
+import os
+import time
+
+data_dir = os.getenv("DATA_DIR")
+sleep_delay = 1
+
+myVisu = visu_gui.myVisu
+myVisu.SetCurrentStudy(salome.myStudy)
+myViewManager = myVisu.GetViewManager()
+myView = myViewManager.Create3DView()
+
+medFile = "fra.med"
+aMeshName ="LE VOLUME"
+anEntity = VISU.NODE
+aFieldName = "VITESSE";
+aTimeStampId = 1
+
+medFile = data_dir + "/MedFiles/" + medFile
+
+print "Build Scalar Map presentation"
+myResult = myVisu.ImportFile(medFile)
+aScalarMap = myVisu.ScalarMapOnField(myResult,aMeshName,anEntity,aFieldName,aTimeStampId)
+myView.Display(aScalarMap);
+myView.FitAll();
+
+print "Set representation type to Point"
+myView.SetPresentationType(aScalarMap, VISU.POINT)
+time.sleep(sleep_delay)
+
+print "Set standard marker 1"
+aScalarMap.SetMarkerStd(VISU.MT_PLUS, VISU.MS_10)
+myView.Update()
+time.sleep(sleep_delay)
+
+print "Set standard marker 2"
+aScalarMap.SetMarkerStd(VISU.MT_STAR, VISU.MS_35)
+myView.Update()
+time.sleep(sleep_delay)
+
+print "Set standard marker 3"
+aScalarMap.SetMarkerStd(VISU.MT_O, VISU.MS_25)
+myView.Update()
+time.sleep(sleep_delay)
+
+print "Set custom marker 1"
+texture_1 = myVisu.LoadTexture(os.path.join(data_dir, "Textures", "texture1.dat"))
+aScalarMap.SetMarkerTexture(texture_1)
+myView.Update()
+time.sleep(sleep_delay)
+
+print "Set custom marker 2"
+texture_2 = myVisu.LoadTexture(os.path.join(data_dir, "Textures", "texture2.dat"))
+aScalarMap.SetMarkerTexture(texture_2)
+myView.Update()
+time.sleep(sleep_delay)
+
+print "Set custom marker 3"
+texture_3 = myVisu.LoadTexture(os.path.join(data_dir, "Textures", "texture3.dat"))
+aScalarMap.SetMarkerTexture(texture_3)
+myView.Update()
--- /dev/null
+# -*- coding: iso-8859-1 -*-
+# Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+# Displaying curves attached to different Y axes of Plot2d view
+#
+import salome
+import time
+import SALOMEDS
+import VISU
+
+sleep_delay = 1
+
+# >>> 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( 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
+aTableObject = myBuilder.NewObject(myComponent)
+aTableName = myBuilder.FindOrCreateAttribute(aTableObject, "AttributeName")
+aTableName.SetValue("TestTable")
+aTable = myBuilder.FindOrCreateAttribute(aTableObject, "AttributeTableOfReal")
+
+aTable.AddRow([0,1,2,3,4,5,6,7,8,9,10])
+aTable.AddRow([2000,1900,1800,1700,1600,1500,1400,1300,1200,1100,1000])
+aTable.AddRow([1.0,1.5,2.0,2.5,3.0,3.5,4.0,4.5,5.0,5.5,6.0])
+aTable.SetTitle("Test table")
+aTable.SetRowTitle(1,"Time")
+aTable.SetRowUnit(1,"s")
+aTable.SetRowTitle(2,"Mass")
+aTable.SetRowUnit(2,"kg")
+aTable.SetRowTitle(3,"Temperature")
+aTable.SetRowUnit(3,"K")
+
+# >>> Create table of integer
+aVisuTable = myVisu.CreateTable(aTableObject.GetID())
+
+# >>> Create curve attached to the left axis
+aCurve1 = myVisu.CreateCurveWithZExt(aVisuTable, 1, 2, 0, False)
+
+# >>> Create curve attached to the right axis
+aCurve2 = myVisu.CreateCurveWithZExt(aVisuTable, 1, 3, 1, True)
+
+# >>> Create container and insert curves
+aContainer = myVisu.CreateContainer()
+aContainer.AddCurve(aCurve1)
+aContainer.AddCurve(aCurve2)
+
+# >>> Create XY plot and display container
+myViewManager = myVisu.GetViewManager();
+myView = myViewManager.CreateXYPlot();
+myView.SetTitle("The viewer for curves")
+myView.Display(aContainer)
+
+# >>> Update Object Browser
+salome.sg.updateObjBrowser(1)
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File : VISU_Gen_s.cc
// Author : Alexey PETROV
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU OBJECT : interactive object for VISU entities implementation
// File : VISU_Gen_s.hh
// Author : Alexey PETROV
# -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
#
# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
"""
"""
# -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
#
# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# VISU VISU_SWIG : binding of C++ implementation and Python
# File : batchmode_visu.py
# Module : VISU
# -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
#
# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# VISU VISU_SWIG : binding of C++ implementation and Python
# File : visu_big_table.py
# Author : Vadim SANDLER
# -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
#
# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# VISU VISU_SWIG : binding of C++ implementation and Python
# File : test_table.py
# Author : Alexey Petrov
# -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
#
# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# VISU VISU_SWIG : binding of C++ implementation and Python
# File : batchmode_visu_view3d.py
# Module : VISU
-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU VISU_SWIG : binding of C++ implementation and Python
// File : libVISU_Swig.i
// Author : Paul RASCLE, EDF
# -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
#
# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# VISU VISU_SWIG : binding of C++ implementation and Python
# File : visu.py
# Module : VISU
curve.SetLine( theLineType, theLineWidth )
pass
return curve
+
+def CreateCurveWithZ( theTable, theHRow, theVRow, theZRow, theTitle, theColor, theMarker, theLineType, theLineWidth ):
+ if theTitle is None: return
+ curve = myLocalVisu.CreateCurveWithZ( theTable, theHRow, theVRow, theZRow );
+ if curve:
+ curve.SetTitle( theTitle )
+ curve.SetColor( theColor )
+ curve.SetMarker( theMarker )
+ curve.SetLine( theLineType, theLineWidth )
+ pass
+ return curve
+
+def CreateCurveWithZExt( theTable, theHRow, theVRow, theZRow, theIsV2, theTitle, theColor, theMarker, theLineType, theLineWidth ):
+ if theTitle is None: return
+ curve = myLocalVisu.CreateCurveWithZExt( theTable, theHRow, theVRow, theZRow, theIsV2 );
+ if curve:
+ curve.SetTitle( theTitle )
+ curve.SetColor( theColor )
+ curve.SetMarker( theMarker )
+ curve.SetLine( theLineType, theLineWidth )
+ pass
+ return curve
# -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
#
# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# VISU VISU_SWIG : binding of C++ implementation and Python
# File : visu_apply_properties.py
# Module : VISU
# -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
#
# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# VISU VISU_SWIG : binding of C++ implementation and Python
# File : visu_apply_properties_consecutive.py
# Module : VISU
# -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
#
# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# VISU VISU_SWIG : binding of C++ implementation and Python
# File : visu_big_table.py
# Author : Vadim SANDLER
# -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
#
# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
import os
import time
import VISU
# -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
#
# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
import VISU
import SALOMEDS
import salome
# -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+# Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# VISU VISU_SWIG : binding of C++ implementation and Python
# File : visu_evolution.py
# Module : VISU
# -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
#
# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# VISU VISU_SWIG : binding of C++ implementation and Python
# File : visu_gui.py
# Module : VISU
# -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
#
# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# VISU VISU_SWIG : binding of C++ implementation and Python
# File : visu_med.py
# Module : VISU
# -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+# Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
import os
import VISU
import salome
aTableFile = os.getenv('DATA_DIR') + '/Tables/table_test.xls'
-aTableSObject = myVisu.ImportTables(aTableFile)
+aTableSObject = myVisu.ImportTables(aTableFile, False)
aTable = None
if aTableSObject:
# -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
#
# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# VISU VISU_SWIG : binding of C++ implementation and Python
# File : visu_prs_exam.py
# Module : VISU
# -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
#
# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
import VISU
import SALOMEDS
import salome
# -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
#
# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# VISU VISU_SWIG : binding of C++ implementation and Python
# File : visu_view3d.py
# Module : VISU
# -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
#
# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# VISU VISU_SWIG : binding of C++ implementation and Python
# File : visu_table.py
# Author : Vadim SANDLER
# -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
#
# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# VISU VISU_SWIG : binding of C++ implementation and Python
# File : visu_view.py
# Author : Alexey Petrov
# -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
#
# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# VISU VISU_SWIG : binding of C++ implementation and Python
# File : visu_view3d.py
# Module : VISU
# -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+# Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
# VISU VISU_SWIG : binding of C++ implementation and Python
# File : visu_view3d.py
# Module : VISU
#
-
import salome
import visu_gui
import VISU